/* guides.css V1.1 - 2026-10-05, Nolan (Karl's walk GD-01/02/05). The look-alike controls are retired for the GLOBAL ones (.h-gd__cb, .h-gd__btn*, .h-gd__srch, .h-gd__seg, .h-gd__menu, the step-mode button sizes): what is left here is layout and the pressed state. Step mode scrolls as one page; the search highlight is green ink, not a solid block; a Help row with no art drops its thumbnail. */
/* guides.css V1.0 - 2026-10-05, Harmony. The member Guides library, reader and step/drill mode (Sloane's approved playground, contract h365-guides-display-v1). Tokens only. */
/* ============================================================================
   GUIDES - a full-screen module layer over the app (the Stat Tracker's own
   pattern: both navs under it, every sheet above it). Phone is a single column
   at 390; tablet and laptop keep the same content in the same order inside a
   centred readable column (Karl's ruling 1, Quinn's handback), driven by a
   container query on the layer so the Tools Preview Editor matches by width.

   NOT ONE COLOUR, RADIUS OR FONT IS INVENTED HERE. Category colours arrive as
   `--cat`, set by the renderer to a token (`var(--green)` …), and tints are
   made by opacity so a theme swap reaches them.
   ========================================================================== */

/* --- the layer ---------------------------------------------------------- */
.h-gd {
  position: absolute; inset: 0; z-index: 46; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); container: h365gd / inline-size;
  opacity: 0; transform: translateY(8px); transition: opacity var(--t-fast), transform var(--t-fast);
}
.h-gd.is-open { opacity: 1; transform: none; }
.h-gd--lib { z-index: 46; }
.h-gd--reader { z-index: 47; }
.h-gd__head {
  flex: none; display: flex; align-items: center; gap: var(--sp-2);
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--sp-4) 12px;
  border-bottom: 1px solid var(--line); background: var(--panel);
}
.h-gd__head .h-topicons { flex: none; padding-right: 4px; }
.h-gd__tt { flex: 1; min-width: 0; }
.h-gd__tt small {
  display: block; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; color: var(--green);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.h-gd__tt h2 {
  margin: 2px 0 0; font-family: var(--font-head); font-weight: 400; font-size: 18px; line-height: 1.05;
  letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.h-gd__scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.h-gd__col { width: 100%; max-width: 100%; margin: 0 auto; padding: var(--sp-4) var(--sp-4) calc(28px + env(safe-area-inset-bottom, 0px)); }
.h-gd__ic { flex: none; }

/* --- shared bits -------------------------------------------------------- */
.h-gd__lab {
  display: flex; align-items: baseline; justify-content: space-between; margin: 24px 2px 10px;
  font-family: var(--font-head); font-weight: 400; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
}
.h-gd__lab small { font-family: var(--font-body); font-weight: 700; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.h-gd__ph { position: relative; display: block; overflow: hidden; background: var(--panel2); }
.h-gd__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.h-gd__sample { position: absolute; right: 6px; bottom: 5px; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.h-gd__stock { position: absolute; inset: 0; display: grid; place-items: center; color: var(--cat, var(--muted)); background: var(--panel2); }
.h-gd__stock::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 25%, var(--cat, var(--muted)), transparent 60%); opacity: .2; }
.h-gd__stock .h-gd__ic { position: relative; }
.h-gd__sl { position: absolute; left: 10px; bottom: 8px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.h-gd__cd .h-gd__sl, .h-gd__rel .h-gd__sl, .h-gd__res .h-gd__sl, .h-gd__cont .h-gd__sl, .h-gd__ph--drill .h-gd__sl { display: none; }
.h-gd__cl { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cat, var(--muted)); }
.h-gd__cl--quiet { color: var(--muted); }
.h-gd__mt { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.h-gd__tg { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--muted); }
.h-gd__mode {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800;
  padding: 2px 8px; border-radius: var(--r-pill); color: var(--green); position: relative; isolation: isolate;
}
.h-gd__mode::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--green); opacity: .12; z-index: -1; }
.h-gd__mts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.h-gd__dn { display: inline-flex; gap: 3px; align-items: center; font-size: 10.5px; font-weight: 800; color: var(--gold); }
/* GD-05 (Karl): the matched words read as green ink, underlined; never a solid block. Help's guide search uses the same rows. */
.h-gd__hl { color: var(--green); font-weight: 800; text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 3px; }
/* THE PRESSED STATE ON THE HOUSE CONTROLS (the only colour this file adds to a
   global): Saved, Liked, Done and a chosen Category read in green ink and edge,
   the way the retired private buttons showed it. */
.h-gd .h-btn--ghost[aria-pressed="true"], .h-gd .h-btn--ghost.is-on, .h-gd__head .h-topicon[aria-pressed="true"] { color: var(--green); border-color: var(--green); }
.h-gd__nn { margin-left: 6px; color: var(--muted); font-weight: 700; }
.h-gd__note { display: inline-flex; align-items: center; gap: 4px; margin: 8px 0 0; font-size: var(--fs-sm); font-weight: 800; color: var(--green); }
.h-gd__empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 30px 10px; margin-top: 14px;
  border-radius: var(--r-xl); border: 1px dashed var(--line2);
}
.h-gd__empty p { margin: 0; font-size: 13px; color: var(--muted); }
.h-gd__retry { margin-top: var(--sp-3); }

/* --- library ------------------------------------------------------------ */
/* The search is the global row (`.h-searchrow` / `.h-search`); the clear (x)
   is a plain 36px icon button, as in Gear and Partners: the row has no global
   clear yet. */
.h-gd__col > .h-searchrow:first-child { margin-top: 0; }
.h-gd__clr { flex: none; width: 36px; height: 36px; margin-right: -8px; padding: 0; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
/* All / Saved / Liked is the global `.h-seg` (one row, shares the width, never
   scrolls); the Category menu is a house ghost button beside it whose name
   gives way (ellipsis) before the segment does. Layout only. */
.h-gd__tb { display: flex; gap: 8px; margin-top: 6px; }
.h-gd__tb .h-seg { flex: 1; min-width: 0; margin: 0; }
.h-gd__tb .h-seg button { min-width: 0; white-space: nowrap; }
.h-gd__cat { flex: 0 1 auto; max-width: 48%; min-width: 0; padding-inline: 14px; }
.h-gd__cat span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-gd__cont {
  display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px;
  border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); margin-top: 14px; color: inherit; cursor: pointer;
}
.h-gd__cont .h-gd__ph { height: 84px; border-radius: var(--r-md); }
.h-gd__cont strong { display: block; font-size: 15px; margin-top: 4px; }
.h-gd__pb { display: block; height: 5px; border-radius: var(--r-pill); background: var(--line); margin-top: 8px; overflow: hidden; }
.h-gd__pb span { display: block; height: 100%; background: var(--green); }
.h-gd__feat {
  display: block; width: 100%; text-align: left; border-radius: var(--r-2xl); overflow: hidden; border: 1px solid var(--line);
  background: var(--panel); margin-top: 14px; padding: 0; color: inherit; cursor: pointer;
}
.h-gd__feat .h-gd__ph { height: 190px; }
.h-gd__feat .h-gd__tx { padding: 12px 14px 14px; display: block; }
.h-gd__feat h3 { margin: 6px 0 8px; font-family: var(--font-head); font-weight: 400; font-size: 24px; line-height: 1; text-transform: uppercase; }
.h-gd__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.h-gd__cd {
  display: block; width: 100%; text-align: left; border-radius: var(--r-lg); overflow: hidden; background: var(--panel);
  border: 1px solid var(--line); padding: 0; color: inherit; cursor: pointer;
}
.h-gd__cd .h-gd__ph { height: 108px; }
.h-gd__cd .h-gd__tx { display: block; padding: 10px; }
/* THE PREVIEW IS CLAMPED, NOT TRUNCATED SERVER-SIDE TO A GUESS (the house
   pattern content.css set for card previews): two lines, the box decides. */
.h-gd__cd strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.25; margin: 4px 0 6px; min-height: 34px; }
.h-gd__res {
  display: grid; grid-template-columns: 1fr 80px; gap: 12px; width: 100%; text-align: left; padding: 14px 0; border: 0;
  border-bottom: 1px solid var(--line); background: none; color: inherit; cursor: pointer;
}
.h-gd__res .h-gd__ph { height: 80px; border-radius: var(--r-md); }
.h-gd__res--plain { grid-template-columns: 1fr; }
.h-gd__res strong { display: block; font-size: 15px; line-height: 1.25; margin: 4px 0 8px; }
.h-gd__mts--tags { margin-top: 8px; }

/* --- reader ------------------------------------------------------------- */
.h-gd__hero { position: relative; height: 290px; margin: calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)) 0; }
.h-gd__hero .h-gd__ph { position: absolute; inset: 0; }
.h-gd__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, var(--bg)); pointer-events: none; }
.h-gd__htx { position: absolute; left: var(--sp-4); right: var(--sp-4); bottom: 10px; z-index: 1; }
.h-gd__htx h1 { margin: 6px 0 0; font-family: var(--font-head); font-weight: 400; font-size: 34px; line-height: .95; text-transform: uppercase; }
.h-gd__tagrow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.h-gd__dek { font-size: 14px; color: var(--muted); line-height: var(--lh); margin: 10px 0 0; }
.h-gd__glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; margin-top: 12px; }
.h-gd__glance div { padding: 9px 6px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); text-align: center; }
.h-gd__glance b { display: block; font-family: var(--font-head); font-weight: 400; font-size: 18px; line-height: 1; }
.h-gd__glance small { font-size: 10.5px; color: var(--muted); font-weight: 800; }
.h-gd__author { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.h-gd__author b { color: var(--ink); }
.h-gd__fc {
  width: 34px; height: 34px; border-radius: var(--r-pill); flex: none; display: grid; place-items: center;
  background: var(--panel2); border: 1px solid var(--line2); font-size: 12px; font-weight: 800; color: var(--ink);
}
.h-gd__acts { display: flex; gap: 8px; margin-top: 12px; align-items: stretch; }
.h-gd__acts > .h-btn, .h-gd__rt { flex: 1 1 0; min-width: 0; }
/* An icon-only house button beside the main action keeps its own width. */
.h-gd__acts > .h-gd__icb { flex: none; padding-inline: 14px; }
/* An explainer's read time: words, not a button. */
.h-gd__rt { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--muted); }
.h-gd__strip {
  position: sticky; top: 0; z-index: 3; margin: 14px calc(-1 * var(--sp-4)) 0; padding: 10px var(--sp-4);
  background: var(--bg); border-bottom: 1px solid var(--line); display: flex; gap: 4px;
}
.h-gd__strip button { flex: 1; height: 30px; border-radius: var(--r-sm); background: var(--panel2); border: 1px solid var(--line2); font: 800 11.5px var(--font-body); color: var(--muted); padding: 0; cursor: pointer; }
.h-gd__strip button.is-on { border-color: var(--green); color: var(--green); }
.h-gd__strip button.is-dn { background: transparent; border-color: var(--green); color: var(--green); opacity: .7; }
.h-gd__toc { border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); padding: 4px 12px; margin-top: 14px; }
.h-gd__toc button { display: flex; gap: 10px; width: 100%; text-align: left; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: none; font: 13.5px var(--font-body); color: var(--ink); cursor: pointer; }
.h-gd__toc button:last-child { border: 0; }
.h-gd__toc b { color: var(--green); font-family: var(--font-head); font-weight: 400; font-size: 16px; width: 18px; }
.h-gd__need { border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); padding: 4px 12px; }
.h-gd__r { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.h-gd__r:last-child { border: 0; }
.h-gd__d { width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--green); flex: none; }
.h-gd__d.is-o { background: transparent; border: 1.5px solid var(--faint); }
.h-gd__nm { flex: 1; }
.h-gd__nm small { color: var(--muted); font-size: var(--fs-sm); }
.h-gd__shop { font: 800 11.5px var(--font-body); color: var(--muted); display: inline-flex; gap: 3px; align-items: center; background: none; border: 0; padding: 0; cursor: pointer; }
.h-gd__st { margin-top: 20px; scroll-margin-top: 60px; }
.h-gd__n { display: flex; align-items: baseline; gap: 10px; }
.h-gd__n b { font-family: var(--font-head); font-weight: 400; font-size: 30px; line-height: 1; color: var(--green); }
.h-gd__n h3 { margin: 0; font-size: 17px; }
.h-gd__ph--step { height: 180px; border-radius: var(--r-lg); margin-top: 10px; }
.h-gd__st p, .h-gd__para { margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.h-gd__uses { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.h-gd__uses span { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: var(--r-pill); color: var(--green); border: 1px solid var(--green); }
.h-gd__h2 { margin: 22px 0 0; font: 800 19px/1.25 var(--font-body); scroll-margin-top: 60px; }
.h-gd__tip, .h-gd__caution { display: flex; gap: 10px; padding: 12px; border-radius: var(--r-lg); font-size: 13.5px; line-height: 1.45; margin-top: 14px; position: relative; isolation: isolate; }
.h-gd__tip::before, .h-gd__caution::before { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .1; z-index: -1; }
.h-gd__tip { border: 1px solid var(--green); }
.h-gd__tip::before { background: var(--green); }
.h-gd__tip .h-gd__i { color: var(--green); flex: none; }
.h-gd__tip small { display: block; color: var(--muted); margin-top: 4px; font-size: var(--fs-sm); }
.h-gd__caution { border: 1px solid var(--warn); }
.h-gd__caution::before { background: var(--warn); }
.h-gd__caution .h-gd__i { color: var(--warn); flex: none; }
.h-gd__rw { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.h-gd__rw > div { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.h-gd__rw .h-gd__ph { height: 100px; }
.h-gd__rw p { margin: 0; padding: 8px 10px; font-size: 12px; line-height: 1.35; }
.h-gd__rwg b { color: var(--green); }
.h-gd__rwx b { color: var(--danger); }
.h-gd__cmp { --cols: 2; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.h-gd__cmp > div { padding: 10px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.h-gd__cmp b { display: block; font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.h-gd__cmp ul { margin: 0; padding-left: 16px; }
.h-gd__photos { margin: 14px 0 0; }
.h-gd__pgrid { display: grid; gap: 6px; grid-template-columns: 1fr 1fr; }
.h-gd__pgrid[data-n="1"] { grid-template-columns: 1fr; }
.h-gd__pgrid[data-n="3"] > :first-child, .h-gd__pgrid[data-n="5"] > :first-child { grid-column: span 2; }
.h-gd__imgcell { position: relative; display: block; height: 120px; border-radius: var(--r-md); overflow: hidden; background: var(--panel2); }
.h-gd__pgrid[data-n="1"] .h-gd__imgcell, .h-gd__pgrid > :first-child:nth-last-child(odd) { height: 170px; }
.h-gd__photos figcaption { color: var(--muted); font-size: var(--fs-sm); margin-top: 6px; }
.h-gd__vid { position: relative; height: 200px; border-radius: var(--r-lg); overflow: hidden; margin-top: 14px; background: var(--panel2); }
.h-gd__vidbtn { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: none; cursor: pointer; }
.h-gd__vidbtn .h-gd__ph { position: absolute; inset: 0; }
.h-gd__dim { opacity: .5; }
.h-gd__pl { position: absolute; inset: 0; display: grid; place-items: center; }
.h-gd__pl span { width: 56px; height: 56px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.h-gd__vid small { position: absolute; left: 10px; bottom: 8px; font-size: 11px; font-weight: 800; color: var(--ink); pointer-events: none; }
.h-gd__vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.h-gd__q { margin: 16px 0 0; padding: 12px 14px; border-left: 3px solid var(--green); font-size: 15px; line-height: 1.45; font-style: italic; color: var(--ink); }
.h-gd__q small { display: block; font-style: normal; color: var(--muted); font-size: 12px; margin-top: 6px; }
.h-gd__ck { border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); padding: 4px 12px; margin-top: 14px; }
.h-gd__ck h4 { margin: 10px 0 4px; font-size: 13px; display: flex; justify-content: space-between; }
.h-gd__ck h4 small { color: var(--muted); }
.h-gd__ckr { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); background: none; font: 14px var(--font-body); color: var(--ink); cursor: pointer; }
.h-gd__ckr:last-child { border: 0; }
.h-gd__ckr.is-on { color: var(--muted); text-decoration: line-through; }
.h-gd__box { width: 24px; height: 24px; border-radius: var(--r-sm); border: 1.5px solid var(--line2); display: grid; place-items: center; flex: none; color: var(--on-green); }
.h-gd__ckr.is-on .h-gd__box { background: var(--green); border-color: var(--green); }
.h-gd__drill { margin-top: 16px; border-radius: var(--r-xl); background: var(--panel); border: 1px solid var(--line); overflow: hidden; scroll-margin-top: 60px; }
.h-gd__ph--drill { height: 130px; }
.h-gd__drill .h-gd__tx { padding: 12px; }
.h-gd__drill h3 { margin: 0; font-size: 16px; display: flex; gap: 8px; align-items: baseline; }
.h-gd__drill h3 b { font-family: var(--font-head); font-weight: 400; font-size: 22px; color: var(--ci-teal); }
.h-gd__rp { display: flex; gap: 8px; margin-top: 8px; }
.h-gd__rp span { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: var(--r-pill); color: var(--ci-teal); border: 1px solid var(--ci-teal); display: inline-flex; align-items: center; gap: 3px; }
.h-gd__drill p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.h-gd__end { margin-top: 24px; padding: 16px; border-radius: var(--r-xl); background: var(--panel); border: 1px solid var(--green); text-align: center; }
.h-gd__end h3 { margin: 8px 0 4px; font-family: var(--font-head); font-weight: 400; font-size: 24px; text-transform: uppercase; }
.h-gd__end p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.h-gd__ms { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--panel2); border: 1px solid var(--gold); font-size: 12.5px; color: var(--ink); text-align: left; }
.h-gd__ms .h-gd__i { color: var(--gold); flex: none; }
.h-gd__rs { border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); padding: 4px 12px; }
.h-gd__rsr { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink); text-decoration: none; }
.h-gd__rsr:last-child { border: 0; }
.h-gd__rsr small { display: block; color: var(--muted); font-size: var(--fs-sm); }
.h-gd__rel { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; cursor: pointer; }
.h-gd__rel .h-gd__ph { height: 62px; border-radius: var(--r-md); }
.h-gd__rel strong { display: block; font-size: 14px; margin-bottom: 4px; }
/* The HTML fallback: an older guide with no blocks reads as it does today. */
.h-gd__html { margin-top: 14px; }
.h-gd__ptitle { margin: 10px 0 6px; font-family: var(--font-head); font-weight: 400; font-size: 30px; line-height: 1; text-transform: uppercase; }

/* --- step mode / drill mode ---------------------------------------------- */
/* GD-02 (Karl): THE WHOLE VIEW SCROLLS AS ONE PAGE. The words used to be the
   one flexible child of a fixed-height column under a 280px picture, so on a
   phone they shrank into a ~40px box with its own scrollbar. Now nothing
   shrinks (`flex-shrink: 0`), the view itself scrolls, and the buttons sit at
   the end of the words (pushed to the floor when the step is short). */
.h-gd__smode {
  position: absolute; inset: 0; z-index: 48; background: var(--bg); display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(18px + env(safe-area-inset-bottom, 0px));
}
.h-gd__smode > * { flex-shrink: 0; }
.h-gd__top { display: flex; align-items: center; gap: 10px; }
.h-gd__pg { flex: 1; display: flex; gap: 4px; }
.h-gd__pg span { flex: 1; height: 5px; border-radius: var(--r-pill); background: var(--line); }
.h-gd__pg span.is-on { background: var(--green); }
.h-gd__pg span.is-on.is-teal { background: var(--ci-teal); }
.h-gd__of { font-weight: 800; font-size: 13px; }
.h-gd__awake { display: inline-flex; gap: 6px; align-items: center; font-size: 11.5px; font-weight: 800; color: var(--green); margin-top: 10px; }
/* The picture keeps its place but never starves the words: a 16:9 frame, capped at a third of the screen. */
.h-gd__pic { width: 100%; aspect-ratio: 16 / 9; max-height: 32vh; border-radius: var(--r-2xl); overflow: hidden; margin-top: 12px; position: relative; flex: none; }
.h-gd__nb { font-family: var(--font-head); font-weight: 400; font-size: 60px; line-height: 1; color: var(--green); margin-top: 12px; }
.h-gd__nb.is-teal { color: var(--ci-teal); }
.h-gd__smode h2 { margin: 4px 0 8px; font: 800 25px/1.15 var(--font-body); }
.h-gd__smode p { margin: 0; font-size: 19px; line-height: 1.45; color: var(--ink); }
/* Back and Next are the house `.h-btn` at its standard size; this only lays them out (Next takes two parts, alone on step 1). */
.h-gd__nav { margin-top: auto; display: flex; gap: 10px; padding-top: 18px; }
.h-gd__nav > [data-gd-smp] { flex: 1 1 0; }
.h-gd__nav > [data-gd-smn] { flex: 2 1 0; }
.h-gd__tmr { margin-top: 14px; display: flex; align-items: center; gap: 14px; }
.h-gd__tmr b { font-family: var(--font-head); font-weight: 400; font-size: 44px; line-height: 1; color: var(--ci-teal); font-variant-numeric: tabular-nums; min-width: 90px; }

/* --- sheets (opened through H365UI.open) --------------------------------- */
.h-gd__sheet { display: block; }
.h-gd__opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font: 700 14px var(--font-body); color: var(--ink); cursor: pointer; }
.h-gd__opt:last-child { border: 0; }
.h-gd__dot { width: 10px; height: 10px; border-radius: var(--r-pill); flex: none; background: var(--cat, var(--ink)); }
.h-gd__opt small { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600; }
.h-gd__opt .h-gd__ck2 { color: var(--green); display: inline-flex; }

/* --- tablet and laptop: the centred readable column ---------------------- */
@container h365gd (min-width: 640px) {
  .h-gd.h-gd .h-gd__col { max-width: 720px; padding-inline: var(--sp-6); }
  .h-gd.h-gd .h-gd__hero { height: 360px; margin: 0; border-radius: var(--r-2xl); overflow: hidden; }
  .h-gd.h-gd .h-gd__strip { margin-inline: 0; border-radius: var(--r-md); border: 1px solid var(--line); }
  .h-gd.h-gd .h-gd__feat .h-gd__ph { height: 260px; }
  .h-gd.h-gd .h-gd__cd .h-gd__ph { height: 150px; }
  .h-gd.h-gd .h-gd__ph--step { height: 260px; }
  .h-gd.h-gd .h-gd__pic { max-height: 320px; }
  .h-gd.h-gd .h-gd__smode { padding-inline: calc((100cqw - 720px) / 2 + 16px); }
  .h-gd.h-gd .h-gd__grid { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .h-gd { transition: none; transform: none; }
}
