/* The Guide (guide.js): the desk dims, a soft spotlight glides to one part, a card beside it says what it is.
   IRIS's own look: the dark grained plate, Caslon heading, Inter words, bone ink, the red main button and the
   diamond the menu uses. The spotlight moves promptly; the words crossfade without blocking navigation. Reduced
   motion: no glide, just fades.
   #174 (Dodd, 10-26: "make the guides much bigger too... lock that in"): a wide card, big words, big buttons and a lit
   ring round the part, so Joe can read it at a glance. The back office uses this same card (ops-guide.js). */
.guide { position: fixed; inset: 0; z-index: 90; opacity: 0; transition: opacity .18s ease-out; }
.guide.on { opacity: 1; }
.guide.off { opacity: 0; pointer-events: none; transition-duration: .14s; }
html.guiding .desk { pointer-events: none; } /* the desk waits; clicks on it nudge the card instead */

/* the spotlight: a clear window cut in the dim, edged with a faint bone line and a soft halo of light */
.gd-spot { position: absolute; left: 0; top: 0; border-radius: 14px; pointer-events: none;
  box-shadow: inset 0 0 0 1.5px rgba(236, 228, 216, .62), 0 0 0 1px rgba(0, 0, 0, .55), 0 0 30px 8px rgba(236, 228, 216, .14), 0 0 0 200vmax rgba(5, 3, 4, .78);
  transition: transform .22s cubic-bezier(.2,.8,.2,1), width .22s cubic-bezier(.2,.8,.2,1), height .22s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease; }
.gd-spot.none { box-shadow: 0 0 0 200vmax rgba(5, 3, 4, .78); }
/* the lit ring just outside the window: clear at a glance; it breathes gently but never fades away */
.gd-spot:not(.none)::after { content: ""; position: absolute; inset: -6px; border-radius: 19px; pointer-events: none;
  box-shadow: 0 0 0 2.5px color-mix(in oklab, var(--red-hi) 88%, #fff), 0 0 22px 2px color-mix(in oklab, var(--red-hi) 45%, transparent);
  opacity: .9; }
@keyframes gd-breathe { 50% { opacity: .62; } }
body[data-theme="holo"] .gd-spot:not(.none)::after { box-shadow: 0 0 0 2.5px rgba(205, 218, 255, .85), 0 0 22px 2px rgba(190, 205, 255, .4); }

/* the card */
.gd-card { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; max-height: calc(100vh - 24px); padding: 0; border-radius: calc(var(--r-lg) + 2px); color: var(--bone);
  background: var(--grain) 0 0 / 160px, var(--surface-solid); box-shadow: var(--edge-hi), var(--shadow-3);
  transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.guide:not(.on) .gd-card { transition: none; }
.gd-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 28px 0; }
.gd-step { flex: none; font: 600 14.5px/1 var(--sans); letter-spacing: .02em; color: var(--bone-2); font-variant-numeric: tabular-nums; }
.gd-pips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.gd-pips i { width: 8px; height: 8px; transform: rotate(45deg); background: rgba(236, 228, 216, .18); transition: background-color .2s ease; }
.gd-pips i.done { background: rgba(236, 228, 216, .42); }
.gd-pips i.on { background: var(--red-hi); box-shadow: 0 0 8px var(--red-hi); }
body[data-theme="holo"] .gd-pips i.on { background: #d9e0ff; box-shadow: 0 0 8px rgba(200, 215, 255, .7); }
.gd-inner { min-height: 0; overflow-y: auto; padding: 16px 28px 6px; transition: opacity .065s ease; }
.gd-card.swap .gd-inner { opacity: 0; }
.gd-title { margin: 0 0 14px; font: 400 32px/1.12 var(--serif); letter-spacing: -.01em; color: #fff; text-wrap: balance; }
.gd-text p { margin: 0 0 14px; font: 400 17.5px/1.6 var(--sans); color: #ddd4c8; text-wrap: pretty; }
.gd-text b { font-weight: 600; color: var(--bone); }
.gd-text kbd, .gd-skip kbd, .gd-keys kbd { display: inline-grid; place-items: center; min-width: 27px; height: 25px; padding: 0 6px; margin: 0 1px; border-radius: 6px;
  font: 600 13.5px/1 var(--sans); color: var(--bone); vertical-align: 1px; background: rgba(236, 228, 216, .07); box-shadow: inset 0 0 0 1px var(--line-hi), inset 0 -2px 0 rgba(0, 0, 0, .45); }
.gd-foot { display: flex; align-items: center; gap: 12px; padding: 10px 22px 22px; }
.gd-keys { display: inline-flex; gap: 4px; margin-left: auto; opacity: .75; }
.gd-btn { min-height: 52px; padding: 0 22px; border: 0; border-radius: var(--r-md); font: 600 17px/1 var(--sans); cursor: pointer; transition: background-color .15s ease, transform .12s var(--ease), color .15s ease; }
.gd-btn:active { transform: scale(.97); }
.gd-btn:focus-visible { outline: 1.5px solid rgba(236, 228, 216, .6); outline-offset: 3px; }
.gd-back { background: transparent; color: var(--bone-2); }
.gd-next { min-width: 144px; color: #fff3e4; background: linear-gradient(180deg, var(--red-hi), var(--red)); box-shadow: inset 0 1px 0 rgba(255, 230, 220, .25), 0 6px 18px rgba(120, 10, 16, .35); }
html[data-skin] .gd-next { color: var(--skin-ink, #fff3e4); }
body[data-theme="holo"] .gd-next { color: #14121a; background: linear-gradient(115deg, #f1d3e2, #d9e7ff 50%, #e6dbff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 6px 18px rgba(150, 170, 230, .25); }
@media (hover: hover) and (pointer: fine) {
  .gd-back:hover { background: rgba(236, 228, 216, .07); color: #fff; }
  .gd-next:hover { filter: brightness(1.08); }
}

/* the pointer at the part: a small diamond, like the menu's */
.gd-caret { position: absolute; display: none; width: 16px; height: 16px; transform: rotate(45deg); background: #120c0d; box-shadow: 0 0 0 1px var(--line-hi); }
.gd-caret::after { content: ""; position: absolute; inset: -1px; background: inherit; } /* (covers the inner half of its line) */
.gd-card[data-side="right"] .gd-caret { display: block; left: -8px; top: calc(var(--ty) - 8px); clip-path: polygon(-20% -20%, -20% 120%, 120% 120%); }
.gd-card[data-side="left"] .gd-caret { display: block; right: -8px; top: calc(var(--ty) - 8px); clip-path: polygon(-20% -20%, 120% -20%, 120% 120%); }
.gd-card[data-side="bottom"] .gd-caret { display: block; top: -8px; left: calc(var(--tx) - 8px); clip-path: polygon(-20% -20%, 120% -20%, -20% 120%); }
.gd-card[data-side="top"] .gd-caret { display: block; bottom: -8px; left: calc(var(--tx) - 8px); background: #0a0708; clip-path: polygon(120% -20%, 120% 120%, -20% 120%); }

/* skip, bottom right (bottom left when the part is there) */
.gd-skip { position: absolute; right: 24px; bottom: 22px; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border: 0; border-radius: var(--r-md);
  font: 600 15.5px/1 var(--sans); color: var(--bone-2); background: rgba(10, 7, 8, .72); box-shadow: var(--edge); cursor: pointer; transition: color .15s ease, background-color .15s ease; }
.gd-skip.left { right: auto; left: 24px; }
.gd-skip:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .gd-skip:hover { color: #fff; background: rgba(20, 14, 15, .9); } }

/* reduced motion: no glide, no breathing; the words still swap and the card still fades */
.guide.calm .gd-spot, .guide.calm .gd-card { transition: none; }
.guide.calm .gd-spot::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .gd-spot, .gd-card { transition: none !important; } .gd-spot::after { animation: none !important; } }

/* a big screen (1920 x 1080 and up): one step bigger again (guide.js widens the card to match) */
@media (min-width: 1700px) and (min-height: 950px) {
  .gd-step { font-size: 15.5px; }
  .gd-title { font-size: 36px; }
  .gd-text p { font-size: 19px; }
  .gd-btn { min-height: 56px; font-size: 18px; }
  .gd-skip { min-height: 52px; font-size: 16.5px; }
}
@media (max-width: 640px) {
  .gd-top { padding: 18px 20px 0; }
  .gd-inner { padding: 12px 20px 4px; }
  .gd-title { font-size: 26px; margin-bottom: 10px; }
  .gd-text p { font-size: 16.5px; line-height: 1.55; margin-bottom: 11px; }
  .gd-foot { padding: 8px 16px 16px; }
  .gd-btn { min-height: 50px; font-size: 16.5px; }
  .gd-keys { display: none; }
  .gd-foot .gd-next { margin-left: auto; }
  .gd-skip { right: 12px; bottom: 12px; }
  .gd-skip.left { left: 12px; }
  .gd-skip.top { top: calc(12px + env(safe-area-inset-top)); bottom: auto; }
  .gd-skip kbd { display: none; }
}
