/* Hoot v2 secondary pages: /pomodoro-timer, /readme (Guide), /privacy, 404.
   Spec: v2-build/DESIGN.md. Uses base.css tokens and components; every class starts with h-,
   page rules are scoped under body.v2. Owner: pages. No external requests. */

/* =====================================================================
   Page header band: sky + stars + moon + hand-drawn valley
   ===================================================================== */
body.v2 .h-page-hero {
  --pg-sky: var(--h-sky-night);
  --pg-land-h: clamp(170px, 21vw, 320px);
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--h-bg);
}
body.v2 .h-page-hero--night {
  --pg-sky: linear-gradient(180deg, #101318 0%, #111827 24%, #121f33 52%, #15283d 74%, #173244 100%);
}
body.v2 .h-page-hero--predawn {
  --pg-sky: linear-gradient(180deg, #101318 0%, #111b26 26%, #13202f 48%, #1b3340 72%, #24484a 88%, #2c5552 100%);
}
body.v2 .h-page-hero--dusk {
  --pg-sky: linear-gradient(180deg, #101318 0%, #141a29 22%, #1d2539 40%, #2a3350 54%, #4a4560 66%, #7a5660 76%, #b8705c 86%, #dd8f62 93%, #eaa36c 100%);
}
body.v2 .h-page-hero__sky { position: absolute; inset: 0; z-index: 0; background: var(--pg-sky); }
/* The sky melts into the page colour behind the bottom of the land, so no straight edge shows while the land
   fades in (or if it is ever transparent); once the land is in, its own hills and fade cover this strip. */
body.v2 .h-page-hero__sky {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - var(--pg-land-h) * .34), transparent calc(100% - 2px));
          mask-image: linear-gradient(180deg, #000 calc(100% - var(--pg-land-h) * .34), transparent calc(100% - 2px));
}
body.v2 .h-page-hero__stars { position: absolute; inset: 0 0 auto 0; height: min(72%, 560px); z-index: 0; pointer-events: none; }
body.v2 .h-page-hero__sky-art { width: 100%; height: 100%; }
body.v2 .h-page-hero__moon-wrap {
  position: absolute; z-index: 1; pointer-events: none;
  top: clamp(8px, 3.4vw, 54px);
  right: clamp(-6px, 8vw, 150px);
  width: clamp(92px, 12vw, 190px);
}
body.v2 .h-page-hero__moon { width: 100%; height: auto; }
html.motion-ready body.v2 .h-page-hero__moon { animation: pages-moonrise 1.6s var(--h-ease-out) both; }
@keyframes pages-moonrise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

body.v2 .h-page-hero__inner {
  position: relative; z-index: 2;
  padding-top: clamp(56px, 7.5vw, 112px);
  display: flex; flex-direction: column; gap: 18px;
}
body.v2 .h-page-hero__inner--center { align-items: center; text-align: center; }
body.v2 .h-page-hero__inner--center :is(.h-h1, .h-lead) { margin-inline: auto; }
body.v2 .h-page-hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; min-width: 0; }
body.v2 .h-page-hero .h-h1 { max-width: 19ch; }
body.v2 .h-page-hero .h-lead { color: var(--h-ink-soft); }
body.v2 .h-page-hero__actions { margin-top: 8px; }

body.v2 .h-page-hero__land {
  position: relative; z-index: 1;
  height: var(--pg-land-h);
  margin-top: clamp(-28px, -1.5vw, -8px);
  pointer-events: none;
}
body.v2 .h-page-hero__svg { display: block; width: 100%; height: 100%; }

/* split header (Guide, Privacy) */
@media (min-width: 900px) {
  body.v2 .h-page-hero__inner--split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; gap: clamp(32px, 5vw, 72px); }
  body.v2 .h-page-hero__inner--policy { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: end; }
}

/* Guide owl: moves only as a whole (float wrapper); never filtered or tinted */
body.v2 .h-page-hero__owl { position: relative; z-index: var(--h-z-owl); justify-self: center; width: clamp(150px, 17vw, 236px); }
body.v2 .h-page-hero__owl .hm-owl { width: 100%; height: auto; display: block; overflow: visible; forced-color-adjust: none; }
@media (max-width: 899px) {
  body.v2 .h-page-hero__owl { order: -1; justify-self: start; width: 112px; margin-bottom: -6px; }
}
body.v2.page-guide .h-page-hero__moon-wrap { right: auto; left: clamp(-20px, 44vw, 640px); top: clamp(6px, 2vw, 30px); width: clamp(84px, 9vw, 150px); }
@media (max-width: 899px) { body.v2.page-guide .h-page-hero__moon-wrap { left: auto; right: -8px; } }
@media (min-width: 900px) { body.v2.page-privacy .h-page-hero__moon-wrap { right: clamp(8px, 2vw, 40px); top: 4px; width: clamp(92px, 9vw, 140px); } }

/* =====================================================================
   /pomodoro-timer: the timer
   ===================================================================== */
body.v2 .h-page-hero--overlap { --pg-land-h: clamp(230px, 25vw, 380px); }
body.v2 .h-page-hero--overlap .h-page-hero__inner { padding-bottom: 8px; }
body.v2 .h-timer-section { position: relative; z-index: 3; margin-top: calc(-1 * clamp(150px, 17vw, 270px)); }

body.v2 .h-timer {
  position: relative;
  max-width: 680px;
  margin-inline: auto;
  padding: clamp(12px, 2.2vw, 20px);
  border-radius: var(--h-r-xl);
  background: linear-gradient(180deg, #19202a 0%, var(--h-panel) 46%);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 22px 40px -24px rgba(0, 0, 0, .7), 0 10px 22px -12px rgba(0, 0, 0, .45), 0 34px 60px -40px rgba(77, 100, 230, .55);
  text-align: center;
}
/* break phases turn the timer mint (web-timer.js sets data-break on [data-phase]) */
body.v2 .h-timer:has([data-phase][data-break]) { --h-accent: var(--h-mint); --h-accent-rgb: 130 221 209; --h-accent-tint: var(--h-mint-tint); --h-accent-line: rgb(130 221 209 / .35); }

/* mode switch with a sliding pill */
body.v2 .h-timer__modes {
  --pg-i: 0;
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 420px);
  margin-inline: auto;
  padding: 4px;
  border-radius: var(--h-r-pill);
  background: var(--h-bg);
  border: 1px solid var(--h-line-soft);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
}
body.v2 .h-timer__modes::before {
  content: "";
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / 3);
  border-radius: var(--h-r-pill);
  background: linear-gradient(180deg, #2c3550, var(--h-blue-tint));
  box-shadow: inset 0 0 0 1px rgba(148, 169, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .08), 0 6px 18px -8px rgba(77, 100, 230, .8);
  transform: translateX(calc(var(--pg-i) * 100%));
  transition: transform var(--h-dur-2) var(--h-ease-spring);
}
body.v2 .h-timer__modes:has([data-mode="countdown"][aria-selected="true"]) { --pg-i: 1; }
body.v2 .h-timer__modes:has([data-mode="stopwatch"][aria-selected="true"]) { --pg-i: 2; }
body.v2 .h-timer__mode {
  position: relative; z-index: 1;
  min-height: 44px; padding: 0 10px;
  border-radius: var(--h-r-pill);
  color: var(--h-muted);
  font-size: .9375rem; font-weight: 600; letter-spacing: -.005em;
  transition: color var(--h-dur-2) var(--h-ease-out);
}
body.v2 .h-timer__mode[aria-selected="true"] { color: var(--h-ink); }
@media (hover: hover) { body.v2 .h-timer__mode:hover { color: var(--h-ink); } }

/* the face: a small night window */
body.v2 .h-timer__face {
  position: relative;
  margin-top: 14px;
  min-height: clamp(250px, 50vw, 360px);
  border-radius: var(--h-r-lg);
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  box-shadow: inset 0 0 0 1px rgba(148, 169, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .05);
}
body.v2 .h-timer__sky, body.v2 .h-timer__sky::after { position: absolute; inset: 0; z-index: -2; }
body.v2 .h-timer__sky { background: linear-gradient(180deg, #111827 0%, #13203a 50%, #18304a 78%, #1b3a4c 100%); }
body.v2 .h-timer__sky::after { content: ""; z-index: 0; background: linear-gradient(180deg, #101a20 0%, #142a2e 48%, #1f4544 78%, #2c5552 100%); opacity: 0; transition: opacity 900ms var(--h-ease-in-out); }
body.v2 .h-timer:has([data-phase][data-break]) .h-timer__sky::after { opacity: 1; }
body.v2 .h-timer__art { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
body.v2 .h-timer__far { fill: #1f2c40; }
body.v2 .h-timer__mid { fill: #121922; }
body.v2 .h-timer__trees { fill: #0d1219; stroke: #0d1219; }

body.v2 .h-timer__readout { position: relative; display: flex; flex-direction: column; align-items: center; padding: clamp(26px, 6cqi, 40px) 12px 104px; }
body.v2 .h-timer__phase {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 30px; padding: 4px 14px;
  border-radius: var(--h-r-pill);
  background: rgb(var(--h-accent-rgb) / .12);
  border: 1px solid var(--h-accent-line);
  color: var(--h-accent);
  font-size: .8125rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  transition: color var(--h-dur-2), background-color var(--h-dur-2), border-color var(--h-dur-2);
}
body.v2 .h-timer__phase::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
body.v2 .h-timer__phase:empty { visibility: hidden; }
body.v2 .h-timer__time {
  margin-top: 10px;
  font-size: clamp(3.5rem, 19cqi, 7.75rem);
  font-weight: 700; line-height: 1; letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  color: #f5f7ff;
  text-shadow: 0 0 42px rgb(var(--h-accent-rgb) / .38), 0 0 2px rgba(207, 216, 255, .25), 0 2px 0 rgba(0, 0, 0, .25);
  white-space: nowrap;
}
body.v2 .h-timer__sub { margin-top: 12px; min-height: 22px; color: var(--h-ink-soft); font-size: .9375rem; font-weight: 500; }

body.v2 .h-timer__bar {
  position: absolute; left: clamp(18px, 8%, 56px); right: clamp(18px, 8%, 56px); bottom: 24px;
  height: 8px;
  border-radius: var(--h-r-pill);
  background: rgba(8, 11, 16, .62);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
}
body.v2 .h-timer__bar span {
  position: relative; display: block; height: 100%; width: 0; max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5a72ee 0%, var(--h-accent) 70%, #dfe5ff 100%);
  box-shadow: 0 0 16px rgb(var(--h-accent-rgb) / .55);
  transition: width .4s linear;
}
body.v2 .h-timer:has([data-phase][data-break]) .h-timer__bar span { background: linear-gradient(90deg, #4fb3a6 0%, var(--h-mint) 70%, #dff8f3 100%); }
body.v2 .h-timer__bar span::after {
  content: ""; position: absolute; right: -7px; top: 50%;
  width: 14px; height: 14px; margin-top: -7px;
  border-radius: 50%;
  background: #f5f7ff;
  box-shadow: 0 0 0 3px rgb(var(--h-accent-rgb) / .35), 0 0 14px rgb(var(--h-accent-rgb) / .9);
}

body.v2 .h-timer__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
body.v2 .h-timer__start { grid-column: 1 / -1; }
body.v2 .h-timer__actions:has([data-skip][hidden]) [data-reset] { grid-column: 1 / -1; }
@media (min-width: 520px) {
  body.v2 .h-timer__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
  body.v2 .h-timer__actions .h-btn { min-width: 124px; }
  body.v2 .h-timer__actions .h-timer__start { min-width: 168px; }
}

/* settings */
body.v2 .h-timer__set { margin-top: 16px; text-align: left; }
body.v2 .h-timer__set-toggle {
  list-style: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: fit-content; min-height: 44px; margin-inline: auto; padding: 0 16px;
  border-radius: var(--h-r-pill);
  color: var(--h-muted);
  font-size: .9375rem; font-weight: 600;
  cursor: pointer;
  transition: color var(--h-dur-1), background-color var(--h-dur-2);
}
body.v2 .h-timer__set-toggle::-webkit-details-marker { display: none; }
body.v2 .h-timer__set-toggle::marker { content: ""; }
body.v2 .h-timer__set-toggle svg { width: 18px; height: 18px; flex: none; }
body.v2 .h-timer__chev { transition: transform var(--h-dur-2) var(--h-ease-out); }
body.v2 .h-timer__set[open] .h-timer__chev { transform: rotate(180deg); }
body.v2 .h-timer__set[open] .h-timer__set-toggle { color: var(--h-ink); }
@media (hover: hover) { body.v2 .h-timer__set-toggle:hover { color: var(--h-ink); background: var(--h-panel-2); } }
body.v2 .h-timer__grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
body.v2 .h-timer__set-panel { margin-top: 10px; padding: 18px; display: grid; gap: 14px; border-radius: var(--h-r-md); background: var(--h-panel-2); border: 1px solid var(--h-line-soft); }
@media (min-width: 560px) { body.v2 .h-timer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; } }
body.v2 .h-timer__field { display: flex; flex-direction: column; gap: 8px; font-size: .875rem; font-weight: 600; color: var(--h-ink-soft); }
body.v2 .h-timer__field .h-input { min-height: 46px; font-variant-numeric: tabular-nums; font-weight: 600; }
body.v2 .h-timer__check { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: .9375rem; color: var(--h-ink-soft); cursor: pointer; }
body.v2 .h-timer__check input { flex: none; margin: 0; }
body.v2 .h-timer__hint { margin-top: 12px; color: var(--h-faint); font-size: .8125rem; }
body.v2 .h-timer__hint .h-kbd { margin-inline: 2px; color: var(--h-ink-soft); }
@media (hover: none) and (pointer: coarse) { body.v2 .h-timer__hint { display: none; } }

/* extension strip under the timer */
body.v2 .h-timer-cta {
  max-width: 680px;
  margin: 18px auto 0;
  padding: 18px 18px 18px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border-radius: var(--h-r-lg);
  background: radial-gradient(120% 140% at 0% 0%, var(--h-ember-tint) 0%, var(--h-panel) 60%);
  border: 1px solid rgb(255 148 115 / .2);
  box-shadow: var(--h-shadow-1);
  text-align: left;
}
body.v2 .h-timer-cta p { flex: 1 1 260px; min-width: 0; color: var(--h-ink-soft); font-size: .9375rem; line-height: 1.55; }
body.v2 .h-timer-cta strong { color: var(--h-ink); }
body.v2 .h-timer-cta__icons { display: flex; flex: none; }
body.v2 .h-timer-cta__icon, body.v2 .h-pomo-alt__icon {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px;
  background: var(--h-accent-tint); color: var(--h-accent);
  box-shadow: inset 0 0 0 1px var(--h-accent-line), 0 6px 14px -8px rgba(0, 0, 0, .8);
}
body.v2 .h-timer-cta__icon + .h-timer-cta__icon, body.v2 .h-pomo-alt__icon + .h-pomo-alt__icon { margin-left: -8px; transform: rotate(6deg) translateY(4px); }
body.v2 .h-timer-cta__icon:first-child, body.v2 .h-pomo-alt__icon:first-child { transform: rotate(-5deg); }
body.v2 :is(.h-timer-cta__icon, .h-pomo-alt__icon) svg { width: 22px; height: 22px; stroke: currentColor; }
@media (max-width: 519px) { body.v2 .h-timer-cta .h-btn { width: 100%; } }

/* "How to use the Pomodoro technique" */
body.v2 .h-pomo-how { padding-top: clamp(72px, 8vw, 120px); }
body.v2 .h-pomo-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(14px, 2vw, 22px); grid-template-columns: 1fr; counter-reset: none; }
@media (min-width: 640px) { body.v2 .h-pomo-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { body.v2 .h-pomo-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
body.v2 .h-pomo-step {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 22px 26px;
  border-radius: var(--h-r-lg);
  background: linear-gradient(180deg, var(--h-accent-tint) 0%, var(--h-panel) 72%);
  border: 1px solid var(--h-line-soft);
  box-shadow: var(--h-shadow-1);
  overflow: hidden;
  transition: transform var(--h-dur-2) var(--h-ease-out), border-color var(--h-dur-2), box-shadow var(--h-dur-2);
}
body.v2 .h-pomo-step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--h-accent), rgb(var(--h-accent-rgb) / 0)); }
body.v2 .h-pomo-step__num { font-size: .8125rem; font-weight: 700; letter-spacing: .16em; color: var(--h-accent); font-variant-numeric: tabular-nums; }
body.v2 .h-pomo-step__stat { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
body.v2 .h-pomo-step__stat b { font-size: clamp(3rem, 2.4rem + 2vw, 4.25rem); font-weight: 700; line-height: .95; letter-spacing: -.05em; color: var(--h-accent); font-variant-numeric: tabular-nums; text-shadow: 0 0 30px rgb(var(--h-accent-rgb) / .3); }
body.v2 .h-pomo-step__stat small { font-size: .875rem; font-weight: 600; color: var(--h-muted); }
body.v2 .h-pomo-step__text { color: var(--h-ink); font-size: 1.0625rem; line-height: 1.5; font-weight: 500; }
@media (hover: hover) { body.v2 .h-pomo-step:hover { transform: translateY(-4px); border-color: var(--h-accent-line); box-shadow: var(--h-shadow-2), var(--h-glow-accent); } }

body.v2 .h-pomo-alt {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  max-width: 860px; margin: clamp(22px, 3vw, 36px) auto 0;
  padding: 20px 24px;
  border-radius: var(--h-r-lg);
  background: var(--h-panel);
  border: 1px dashed var(--h-line);
}
body.v2 .h-pomo-alt__icons { display: flex; flex: none; }
body.v2 .h-pomo-alt p { flex: 1 1 280px; min-width: 0; color: var(--h-ink-soft); line-height: 1.6; }
body.v2 .h-pomo-alt strong { color: var(--h-ink); }

body.v2 .h-pomo-faq { padding-top: 0; }

/* =====================================================================
   Long text pages: sticky contents + prose (Guide, Privacy)
   ===================================================================== */
body.v2 .h-doc-section { padding-top: clamp(40px, 5vw, 72px); }
body.v2 .h-doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 40px); }
@media (min-width: 1000px) {
  body.v2 .h-doc { grid-template-columns: 264px minmax(0, 1fr); gap: clamp(48px, 5vw, 80px); align-items: start; }
  body.v2 .h-doc__aside { position: sticky; top: calc(var(--h-nav-h) + 28px); max-height: calc(100vh - var(--h-nav-h) - 56px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 8px; }
}
body.v2 .h-doc__main { min-width: 0; }
body.v2 .h-doc__main .h-prose { margin-inline: 0; }

body.v2 .h-toc { display: flex; flex-direction: column; gap: 10px; }
body.v2 .h-toc__title { margin: 0; padding-inline: 12px; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--h-faint); }
body.v2 .h-toc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
body.v2 .h-toc__link {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 8px 12px;
  border-radius: 10px;
  color: var(--h-muted);
  font-size: .9375rem; font-weight: 500; line-height: 1.35;
  transition: color var(--h-dur-1), background-color var(--h-dur-2), box-shadow var(--h-dur-2);
}
@media (hover: hover) { body.v2 .h-toc__link:hover { color: var(--h-ink); background: var(--h-panel); } }
body.v2 .h-toc__link.is-current { color: var(--h-ink); background: var(--h-panel-2); box-shadow: inset 2px 0 0 var(--pg-sec, var(--h-blue)); }
body.v2 .h-toc__dot { width: 8px; height: 8px; flex: none; border-radius: 3px; background: var(--pg-sec, var(--h-blue)); box-shadow: 0 0 10px var(--pg-sec, var(--h-blue)); transform: rotate(45deg); opacity: .9; }

/* section colors (one accent per product area) */
body.v2 .h-guide { --pg-sec: var(--h-blue); }
body.v2 .h-guide [data-sec="install"], body.v2 .h-guide #install { --pg-sec: var(--h-honey); }
body.v2 .h-guide [data-sec="timers"], body.v2 .h-guide #timers { --pg-sec: var(--h-blue); }
body.v2 .h-guide [data-sec="tasks"], body.v2 .h-guide #tasks { --pg-sec: var(--h-mint); }
body.v2 .h-guide [data-sec="blocker"], body.v2 .h-guide #blocker { --pg-sec: var(--h-ember); }
body.v2 .h-guide [data-sec="sessions"], body.v2 .h-guide #sessions { --pg-sec: var(--h-sky); }
body.v2 .h-guide [data-sec="appearance"], body.v2 .h-guide #appearance { --pg-sec: var(--h-moon); }
body.v2 .h-guide [data-sec="privacy-model"], body.v2 .h-guide #privacy-model { --pg-sec: var(--h-leaf); }

/* Guide contents become wrapping chips on small screens */
@media (max-width: 999px) {
  body.v2 .h-guide .h-toc { padding: 16px; border-radius: var(--h-r-lg); background: var(--h-panel); border: 1px solid var(--h-line-soft); }
  body.v2 .h-guide .h-toc__title { padding-inline: 4px; }
  body.v2 .h-guide .h-toc__list { display: flex; flex-wrap: wrap; gap: 8px; }
  body.v2 .h-guide .h-toc__link { min-height: 44px; padding: 6px 14px 6px 12px; border-radius: var(--h-r-pill); background: var(--h-panel-2); border: 1px solid var(--h-line-soft); font-size: .875rem; color: var(--h-ink-soft); }
}

/* Guide article */
body.v2 .h-guide__article { max-width: 70ch; }
body.v2 .h-guide__article h2 { position: relative; scroll-margin-top: calc(var(--h-nav-h) + 24px); }
body.v2 .h-guide__article h2::before {
  content: ""; display: block;
  width: 40px; height: 5px; margin-bottom: 16px;
  border-radius: 5px;
  background: var(--pg-sec);
  box-shadow: 0 0 16px var(--pg-sec);
}
body.v2 .h-guide__article > h2:first-child { margin-top: 0; }
body.v2 .h-guide__article ol { padding-left: 0; list-style: none; counter-reset: pg-step; display: grid; gap: 10px; }
body.v2 .h-guide__article ol > li { position: relative; counter-increment: pg-step; padding: 14px 16px 14px 58px; border-radius: var(--h-r-md); background: var(--h-panel); border: 1px solid var(--h-line-soft); }
body.v2 .h-guide__article ol > li + li { margin-top: 0; }
body.v2 .h-guide__article ol > li::before {
  content: counter(pg-step);
  position: absolute; left: 14px; top: 12px;
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%;
  background: var(--h-honey); color: var(--h-on-accent);
  font-weight: 700; font-size: .9375rem; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 4px rgb(255 198 92 / .14);
}
body.v2 .h-guide__article ul { padding-left: 0; list-style: none; display: grid; gap: 8px; }
body.v2 .h-guide__article ul > li { position: relative; padding-left: 26px; }
body.v2 .h-guide__article ul > li + li { margin-top: 0; }
body.v2 .h-guide__article ul > li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 9px; height: 9px; border-radius: 3px; transform: rotate(45deg); background: var(--h-blue); box-shadow: 0 0 10px rgb(148 169 255 / .6); }

/* screenshot "jewel frames" in the section color */
body.v2 .h-guide__article .readme-shot { --pg-shot: var(--h-blue); --pg-shot-deep: #5c699e; }
body.v2 .h-guide__article #blocker ~ .readme-shot { --pg-shot: var(--h-ember); --pg-shot-deep: #9e5c47; }
body.v2 .h-guide__article #sessions ~ .readme-shot { --pg-shot: var(--h-sky); --pg-shot-deep: #4d7e98; }
body.v2 .h-guide__article .readme-shot:has(img[src*="dashboard"]) { --pg-shot: var(--h-honey); --pg-shot-deep: #9e7b39; }
body.v2 .h-guide__article .readme-shot picture {
  display: block;
  padding: clamp(6px, 1vw, 9px);
  border-radius: var(--h-r-lg);
  background: linear-gradient(145deg, var(--pg-shot) 0%, var(--pg-shot-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), var(--h-shadow-3);
}
body.v2 .h-guide__article .readme-shot img { display: block; width: 100%; border: 0; box-shadow: none; border-radius: var(--h-r-md); background: var(--h-panel); }
body.v2 .h-guide__article .readme-shot--narrow picture { max-width: 300px; margin-inline: auto; }
body.v2 .h-guide__article .readme-shot--narrow img { max-width: 100%; }

/* Privacy */
body.v2 .h-policy-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 0; }
body.v2 .h-policy-meta__item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 16px;
  border-radius: var(--h-r-md);
  background: rgba(16, 19, 24, .55);
  border: 1px solid rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
body.v2 .h-policy-meta dt { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--h-muted); }
body.v2 .h-policy-meta dd { margin: 0; color: var(--h-ink); font-size: .9375rem; font-weight: 600; }
body.v2 .h-policy-summary { max-width: 440px; justify-self: end; gap: 10px; }
body.v2 .h-policy-summary .h-card__title { font-size: 1.25rem; }
@media (max-width: 899px) { body.v2 .h-policy-summary { justify-self: stretch; max-width: none; margin-top: 8px; } }

body.v2 .h-toc-details { border-radius: var(--h-r-lg); }
body.v2 .h-toc-details__summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 10px 12px 10px 18px;
  border-radius: var(--h-r-lg);
  background: var(--h-panel);
  border: 1px solid var(--h-line-soft);
  font-weight: 600; color: var(--h-ink);
  cursor: pointer;
}
body.v2 .h-toc-details__summary::-webkit-details-marker { display: none; }
body.v2 .h-toc-details__summary::marker { content: ""; }
body.v2 .h-toc-details[open] .h-faq__toggle { transform: rotate(45deg); background: var(--h-mint); box-shadow: none; }
body.v2 .h-toc-details[open] .h-faq__toggle::before, body.v2 .h-toc-details[open] .h-faq__toggle::after { background: var(--h-on-accent); }
body.v2 .h-toc-details .h-toc { margin-top: 10px; }
body.v2 .h-policy-layout .h-toc__link { font-size: .9rem; min-height: 38px; padding-block: 7px; }
body.v2 .h-policy-layout { --pg-sec: var(--h-mint); }
@media (max-width: 999px) {
  body.v2 .h-toc__link, body.v2 .h-policy-layout .h-toc__link { min-height: 44px; }
  body.v2 .h-toc-details .h-toc { padding: 8px; border-radius: var(--h-r-lg); background: var(--h-panel); border: 1px solid var(--h-line-soft); }
  body.v2 .h-toc-details[open] .h-toc-details__summary { border-radius: var(--h-r-lg); }
}
@media (min-width: 1000px) {
  body.v2 .h-toc-details__summary { display: none; }
  body.v2 .h-toc-details .h-toc { margin-top: 0; }
}

body.v2 .h-policy { max-width: 72ch; }
body.v2 .h-policy > section { position: relative; }
body.v2 .h-policy > section + section { margin-top: clamp(40px, 5vw, 56px); padding-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--h-line-soft); }
body.v2 .h-policy > section > * + * { margin-top: 1em; }
body.v2 .h-policy > section > h2 { margin-top: 0; padding-top: 0; display: flex; align-items: center; gap: 12px; }
body.v2 .h-policy > section > h2::before { content: ""; width: 10px; height: 10px; flex: none; border-radius: 3px; transform: rotate(45deg); background: var(--h-mint); box-shadow: 0 0 12px rgb(130 221 209 / .6); }
body.v2 .h-policy > section > h3 { margin-top: 1.8em; }
body.v2 .h-policy > section > :is(h2, h3) + * { margin-top: .7em; }
body.v2 .h-policy .note { --h-accent: var(--h-mint); }
body.v2 .h-policy .h-table-wrap { margin-block: 1.4em; }
body.v2 .h-policy .h-table-wrap table { margin: 0; }
body.v2 .h-policy td:first-child { color: var(--h-ink); font-weight: 600; white-space: nowrap; }
/* phones: stack the permissions table (one card-like row per permission, no sideways scroll) */
@media (max-width: 600px) {
  body.v2 .h-policy .h-table-wrap { overflow: visible; }
  body.v2 .h-policy :is(table, tbody, tr, td) { display: block; width: 100%; min-width: 0; }
  body.v2 .h-policy thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  body.v2 .h-policy tr { border-bottom: 1px solid var(--h-line-soft); }
  body.v2 .h-policy tr:last-child { border-bottom: 0; }
  body.v2 .h-policy td { border-bottom: 0; }
  body.v2 .h-policy td:first-child { white-space: normal; padding-bottom: 2px; }
  body.v2 .h-policy td + td { padding-top: 2px; }
}
body.v2 .h-policy ul { padding-left: 1.3em; }
body.v2 .h-policy li::marker { color: var(--h-mint); }

/* =====================================================================
   404: dusk, an empty branch, the owl floating above
   ===================================================================== */
body.v2 .h-page-hero--full { --pg-land-h: clamp(250px, 31vw, 460px); min-height: calc(100svh - var(--h-nav-h)); display: flex; flex-direction: column; }
body.v2 .h-page-hero--full .h-page-hero__inner { flex: 1 0 auto; padding-bottom: 12px; }
body.v2 .h-page-hero--full .h-page-hero__land { margin-top: auto; }
/* 404: the ground melts into the footer's deeper colour, so the page ends without a seam */
body.v2 .h-page-hero--full::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; pointer-events: none;
  height: clamp(48px, 6vw, 96px);
  background: linear-gradient(180deg, rgb(12 15 19 / 0) 0%, rgb(12 15 19 / .35) 40%, rgb(12 15 19 / .8) 72%, var(--h-bg-deep) 100%);
}
body.v2 .h-404 { gap: 16px; }
body.v2 .h-404__owl { width: clamp(108px, 11vw, 150px); margin: 0 auto 4px; position: relative; z-index: var(--h-z-owl); }
body.v2 .h-404__owl img { width: 100%; height: auto; forced-color-adjust: none; }
body.v2 .h-404__actions { justify-content: center; margin-top: 14px; }
body.v2 .h-404 .h-lead { max-width: 40ch; }

/* =====================================================================
   Print
   ===================================================================== */
@media print {
  body.v2 :is(.h-page-hero__sky, .h-page-hero__stars, .h-page-hero__moon-wrap, .h-page-hero__land, .h-timer__art, .h-doc__aside) { display: none; }
  body.v2 .h-page-hero, body.v2 .h-page-hero * { color: #000 !important; text-shadow: none !important; }
}

/* paper grain fades out before the ground meets the page, so the seam stays invisible */
body.v2 .h-page-hero.h-grain::before { -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 92%); mask-image: linear-gradient(180deg, #000 55%, transparent 92%); }

/* Guide + Privacy: the night header fills the first screen, so the Contents links start below the fold
   and the owl's corner peek (bottom-left, owl-web) has a clear corner to rise into. Capped for very tall screens. */
body.v2:is(.page-guide, .page-privacy) .h-page-hero {
  min-height: min(calc(100svh - var(--h-nav-h)), 1200px);
  display: flex; flex-direction: column;
}
body.v2:is(.page-guide, .page-privacy) .h-page-hero__inner { flex: 1 0 auto; align-content: center; justify-content: center; }
body.v2:is(.page-guide, .page-privacy) .h-page-hero__land { flex: none; }
