/* The consent prompt (progress.js): a small glass card that never blocks the page or takes focus on its own, and the
   "Privacy" control that brings it back (the floor's corner on the desktop stage, home's corner, the phones' sheet).
   Tokens only (_shell/tokens.css, host.css's .xp-glass). */
/* compact (19 Nov): it stays up until a choice, so it must cover as little of the frames as it can. Desktop: one row,
   the words left, the two buttons right (~100 px tall), over the floor's right end (chrome: the timeline's later ticks
   and Prev / Next), never over a frame's own closing lines, which sit just above the floor (FIA's) */
.xp-consent { position: fixed; z-index: 46; right: var(--margin); bottom: .75rem; width: min(36rem, calc(100vw - 2 * var(--margin)));
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.1rem; align-items: center;
  padding: .7rem .75rem .7rem 1.15rem; color: var(--ivory); --glass-radius: 18px;
  opacity: 0; transform: translateY(10px); transition: opacity 360ms var(--ease-out), transform 480ms var(--ease-out); }
.xp-consent.on { opacity: 1; transform: none; }
.xp-consent[hidden] { display: none; }
.xp-on-home .xp-consent { bottom: calc(var(--margin) + 2.75rem); }
.xc-t { margin: 0 0 .2rem; font-family: var(--f-display); font-weight: 300; font-size: 1.0625rem; line-height: 1.2; letter-spacing: -.01em; }
.xc-t:focus { outline: none; }
.xc-t:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 2px; }
.xc-b { margin: 0; font-size: .78rem; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.xc-now { margin: .3rem 0 0; font-family: var(--f-mono, ui-monospace, monospace); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.xc-now[hidden] { display: none; }
.xc-acts { display: flex; gap: .45rem; }
/* equal weight: declining is as easy and as visible as accepting */
.xc-btn { flex: none; min-width: 5.5rem; min-height: 44px; padding: 0 .9rem; border-radius: 22px; font-size: var(--ui); letter-spacing: .02em; color: var(--ivory);
  background: rgba(6, 7, 6, .35); box-shadow: inset 0 0 0 1px rgba(216, 173, 85, .6); transition: box-shadow var(--t-ui) var(--ease-out), background var(--t-ui) var(--ease-out); }
.xc-btn[aria-pressed="true"] { background: rgba(216, 173, 85, .14); box-shadow: inset 0 0 0 1px var(--gold); }
@media (hover: hover) { .xc-btn:hover { box-shadow: inset 0 0 0 1px var(--ivory); } }
.xc-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* the way back to the choice: small, quiet, always in the same corner (desktop) */
.xp-privacy { min-height: 24px; padding: .25rem .1rem; font-family: var(--f-mono, ui-monospace, monospace); font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); background: none; }
@media (hover: hover) { .xp-privacy:hover { color: var(--ivory); } }
.xp-privacy:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.xp-floor .xp-privacy { position: absolute; right: var(--margin); bottom: .55rem; }
.xp-privacy-home { position: fixed; z-index: 40; right: var(--margin); bottom: .9rem; display: none; }
.xp-on-home .xp-privacy-home { display: block; }
html.xp-consenting .xp-privacy { visibility: hidden; }
.xp-privacy-sheet { display: block; width: 100%; min-height: 44px; margin: .5rem 0 0; text-align: left; border-top: 1px solid var(--edge); }

/* phones and short windows: above the bar (or the bottom, on home), the margins' width; the corner control stays off
   (the sheet holds it; a framed page's [data-xp-privacy] link works everywhere) */
@media (max-width: 1023px), (max-height: 599px) {
  .xp-consent { left: max(.75rem, var(--margin)); right: max(.75rem, var(--margin)); width: auto; bottom: calc(.6rem + 44px + .75rem + env(safe-area-inset-bottom)); }
  .xp-on-home .xp-consent { bottom: calc(.75rem + env(safe-area-inset-bottom)); }
  .xp-on-home .xp-privacy-home { display: none; }
  html.xp-gated .xp-consent { display: none; }
}
/* phones and tablets upright: the title and the two buttons share the top row, the words run full width under them
   (~120 px tall at 390, was ~170) */
@media (max-width: 1023px) and (min-height: 600px) {
  .xp-consent { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t a" "b b" "n n"; row-gap: .35rem; padding: .6rem .6rem .75rem 1rem; }
  .xc-txt { display: contents; }
  .xc-t { grid-area: t; margin: 0; font-size: 1rem; }
  .xc-b { grid-area: b; font-size: .75rem; }
  .xc-now { grid-area: n; margin: 0; }
  .xc-acts { grid-area: a; gap: .4rem; }
  .xc-btn { min-width: 4.6rem; padding: 0 .8rem; }
}
/* phones held sideways (and short windows): one row under the header, text left, the two buttons right, so the card
   never covers the plate (≈ 50-60 % of the height) or the bar; same words, smaller */
@media (max-height: 599px) and (orientation: landscape) {
  .xp-consent, .xp-on-home .xp-consent { top: calc(var(--top) + .4rem); bottom: auto; display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: center;
    padding: .55rem .6rem .55rem 1rem; transform: translateY(-8px); }
  .xp-consent[hidden] { display: none; }
  .xc-txt { min-width: 0; }
  .xc-t { font-size: 1rem; margin-bottom: .15rem; }
  .xc-b { font-size: .75rem; line-height: 1.4; }
  .xc-now { margin-top: .2rem; }
  .xc-acts { margin: 0; gap: .45rem; }
  .xc-btn { flex: none; min-width: 6rem; padding: 0 .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .xp-consent { transform: none; transition: opacity 120ms linear; }
}
@media (forced-colors: active) {
  .xp-consent { border: 1px solid CanvasText; }
  .xc-btn { border: 1px solid ButtonText; }
}
