/* ==========================================================================
   HYPEART HOMEPAGE — dark cinematic storefront.
   Loaded by HomePage.astro only; every rule is scoped under .hx / .hx-body so
   no inner page can inherit it. Colour comes from the pictures; the UI keeps
   one record-red accent for actions and the active state.
   ========================================================================== */

.hx-body {
  --hx-bg: #0a0a0c;
  --hx-bg-2: #0f0f13;
  --hx-panel: #141418;
  --hx-panel-2: #1b1b21;
  --hx-panel-3: #23232b;
  --hx-line: rgba(255, 255, 255, 0.08);
  --hx-line-2: rgba(255, 255, 255, 0.14);
  --hx-ink: #f4f4f6;
  --hx-ink-2: #b4b4be;
  --hx-ink-3: #85858f;
  --hx-accent: #ff4d2e;
  --hx-accent-fill: #d63a1c;   /* white text on it: 4.7:1 */
  --hx-accent-hover: #c93318;
  --hx-accent-ink: #ffffff;
  --hx-accent-soft: rgba(255, 77, 46, 0.14);
  --hx-warn: #ffb547;
  --hx-radius: 16px;
  --hx-radius-sm: 10px;
  --hx-pill: 999px;
  --hx-max: 1240px;
  --hx-gutter: clamp(16px, 4vw, 40px);
  --hx-band: clamp(72px, 9vw, 128px);
  --hx-ease: cubic-bezier(0.22, 1, 0.36, 1);
  background: var(--hx-bg);
  color: var(--hx-ink);
}

.hx {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--hx-bg);
  color: var(--hx-ink);
  font-family: "Golos Text", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}
.hx *, .hx *::before, .hx *::after { box-sizing: border-box; }
.hx img { display: block; max-width: 100%; height: auto; }
.hx a { color: inherit; }
a[data-unlinked] { cursor: default; }
.hx p { margin: 0; }
.hx :focus-visible { outline: 2px solid var(--hx-accent); outline-offset: 3px; border-radius: 6px; }
.hx-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- type */
.hx-h1 {
  margin: 0 auto;
  max-width: 24ch;
  font-size: clamp(2.3rem, 5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: balance;
  color: var(--hx-ink);
}
.hx-h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: balance;
  color: var(--hx-ink);
}
.hx-h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 650;
  color: var(--hx-ink);
  text-wrap: balance;
}
.hx-h3--big { font-size: clamp(1.4rem, 2.2vw, 1.85rem); letter-spacing: -0.025em; line-height: 1.12; margin-bottom: 16px; }
.hx-note { font-size: 0.86rem; color: var(--hx-ink-3); margin-top: 16px !important; }
.hx-note a { color: var(--hx-ink-2); }

/* prose */
.hx-prose { display: grid; gap: 14px; color: var(--hx-ink-2); }
.hx-prose > * { margin: 0; }
.hx-prose strong, .hx-list strong, .hx-rule strong { color: var(--hx-ink); font-weight: 650; }
.hx-prose a, .hx-list a, .hx-rule a, .hx-callout a, .hx-band-lead a, .hx-chapter a, .hx-card a:not(.hx-btn), .hx-use-copy a, .hx-qa a, .hx-summary-foot p a {
  color: var(--hx-ink);
  text-decoration: underline;
  text-decoration-color: rgba(255, 77, 46, 0.6);
  text-underline-offset: 3px;
}
.hx-prose a:hover, .hx-chapter a:hover { text-decoration-color: var(--hx-accent); }
.hx-prose code, .hx-list code, .hx-settings code, .hx-callout code, .hx-axis-text code {
  padding: 1px 6px; border-radius: 6px; background: var(--hx-panel-3); color: var(--hx-ink);
  font-family: "PT Mono Web", ui-monospace, monospace; font-size: 0.86em;
}
.hx-prose--small { font-size: 0.95rem; }
.hx-list { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; color: var(--hx-ink-2); }
.hx-list li::marker { color: var(--hx-ink-3); }
.hx-list--steps { counter-reset: s; list-style: none; padding: 0; }
.hx-list--steps li { counter-increment: s; position: relative; padding-left: 38px; }
.hx-list--steps li::before {
  content: counter(s); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--hx-panel-3); color: var(--hx-ink); font-size: 0.78rem; font-weight: 700;
}

.hx-quote { margin: 4px 0; padding: 20px 22px; border-radius: var(--hx-radius); background: var(--hx-panel); border: 1px solid var(--hx-line); }
.hx-quote blockquote { margin: 0; }
.hx-quote blockquote p { color: var(--hx-ink); font-size: 1.02rem; line-height: 1.5; }
.hx-quote figcaption { margin-top: 10px; font-size: 0.84rem; color: var(--hx-ink-3); }
.hx-quote figcaption cite { font-style: italic; }
.hx-quote-url { display: block; margin-top: 2px; font-family: "PT Mono Web", ui-monospace, monospace; font-size: 0.78rem; color: var(--hx-ink-3); word-break: break-all; }
/* A looked-up address prints as a link with the same muted look as the plain
   text; only hover/focus says it is clickable. */
a.hx-quote-url { color: var(--hx-ink-3); text-decoration: none; }
a.hx-quote-url:hover, a.hx-quote-url:focus { text-decoration: underline; }
.hx-callout { padding: 16px 18px; border-radius: var(--hx-radius-sm); background: rgba(255, 181, 71, 0.07); border: 1px solid rgba(255, 181, 71, 0.22); color: var(--hx-ink-2); font-size: 0.93rem; display: grid; gap: 8px; }
.hx-callout strong { color: var(--hx-ink); }
.hx-callout--fact { background: rgba(120, 170, 255, 0.07); border-color: rgba(120, 170, 255, 0.24); }
.hx-callout-kicker { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: #9cc0ff; }

.hx-table-wrap { overflow-x: auto; border-radius: var(--hx-radius); border: 1px solid var(--hx-line); background: var(--hx-panel); }
.hx-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 720px; }
.hx-table caption { caption-side: top; text-align: left; padding: 14px 16px 4px; color: var(--hx-ink-3); font-size: 0.8rem; }
.hx-table th, .hx-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hx-line); color: var(--hx-ink-2); }
.hx-table thead th { position: sticky; top: 0; background: var(--hx-panel-2); color: var(--hx-ink); font-weight: 600; font-size: 0.78rem; }
.hx-table tbody th { color: var(--hx-ink); font-weight: 600; min-width: 150px; }
.hx-table tbody tr:hover > * { background: rgba(255, 255, 255, 0.025); }
.hx-code {
  margin: 0; padding: 18px 20px; overflow-x: auto; border-radius: var(--hx-radius);
  background: #07070a; border: 1px solid var(--hx-line);
  color: #d9d9e3; font-family: "PT Mono Web", ui-monospace, monospace; font-size: 0.82rem; line-height: 1.6; white-space: pre;
}

/* ---------------------------------------------------------------- buttons, chips */
.hx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer;
  transition: background 0.2s var(--hx-ease), transform 0.2s var(--hx-ease), border-color 0.2s;
}
.hx-btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--hx-ease); }
.hx-btn:hover svg { transform: translateX(3px); }
.hx-btn:active { transform: scale(0.97); }
.hx-btn--primary { background: var(--hx-accent-fill); color: var(--hx-accent-ink); box-shadow: 0 10px 30px -10px rgba(255, 77, 46, 0.6); }
.hx-btn--primary:hover { background: var(--hx-accent-hover); }
.hx-btn--ghost { background: rgba(255, 255, 255, 0.06); color: var(--hx-ink); border-color: var(--hx-line-2); }
.hx-btn--ghost:hover { background: rgba(255, 255, 255, 0.11); }
.hx-btn--lg { min-height: 52px; padding: 0 26px; font-size: 1rem; border-radius: 14px; }
.hx-link-btn { background: none; border: 0; padding: 10px 8px; min-height: 40px; color: var(--hx-ink-3); font: inherit; font-size: 0.82rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.hx-pill { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--hx-pill); background: rgba(255, 77, 46, 0.1); border: 1px solid rgba(255, 77, 46, 0.35); margin-bottom: 22px !important; }
.hx-pill span { padding: 3px 12px; border-radius: var(--hx-pill); font-size: 0.8rem; font-weight: 600; color: #ffb3a3; }
.hx-pill span + span { border-left: 1px solid rgba(255, 77, 46, 0.25); border-radius: 0; }

.hx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hx-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 10px;
  border: 1px solid var(--hx-line-2); background: rgba(255, 255, 255, 0.04); color: var(--hx-ink);
  font: inherit; font-size: 0.86rem; font-weight: 500; cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.hx-chip:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.24); }
.hx-chip:active { transform: scale(0.95); }
.hx-chip-icon { width: 14px; height: 14px; border: 1.6px solid var(--hx-ink-2); border-radius: 3px; }
.hx-chip-icon--duration { border-radius: 50%; }
.hx-chip-icon--resolution { border-radius: 2px; border-bottom-width: 3px; }
.hx-chip-icon--model { border: 0; background: linear-gradient(135deg, var(--hx-accent), #ffb547); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.hx-chip [data-cycle-value] { display: inline-block; }
.hx-chip.is-bump [data-cycle-value] { animation: hx-bump 0.32s var(--hx-ease); }
@keyframes hx-bump { 0% { transform: translateY(6px); opacity: 0; } 100% { transform: none; opacity: 1; } }

.hx-rec { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--hx-accent-fill); box-shadow: 0 0 0 0 rgba(255, 77, 46, 0.7); animation: hx-rec 1.6s infinite; vertical-align: 0.05em; }
@keyframes hx-rec { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 46, 0.6); } 70% { box-shadow: 0 0 0 8px rgba(255, 77, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 46, 0); } }

/* ---------------------------------------------------------------- band scaffold */
.hx-band { width: 100%; max-width: calc(var(--hx-max) + 2 * var(--hx-gutter)); margin: 0 auto; padding: var(--hx-band) var(--hx-gutter) 0; scroll-margin-top: 80px; }
.hx-band-head { margin-bottom: 40px; max-width: 760px; }
.hx-band-head--split { max-width: none; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 20px 56px; align-items: end; }
.hx-band-head--center { margin-inline: auto; text-align: center; }
.hx-band-lead { color: var(--hx-ink-2); font-size: 1.05rem; line-height: 1.6; margin-top: 14px; }
.hx-band-head--split .hx-band-lead { margin-top: 0; }
.hx-band-head--center .hx-band-lead { margin-inline: auto; max-width: 640px; }
.hx-card { padding: 28px; border-radius: 20px; background: var(--hx-panel); border: 1px solid var(--hx-line); display: flex; flex-direction: column; gap: 14px; }
.hx-card > * { margin: 0; }
.hx-card p { color: var(--hx-ink-2); }
[id] { scroll-margin-top: 84px; }
/* One <article> wraps the whole guide (AI Models → FAQ) for reading modes; it
   is a grouping label only and lays nothing out. */
.hx-guide { display: contents; }

/* more */
.hx-more { margin-top: 20px; }
.hx-more > summary {
  display: inline-flex; align-items: center; gap: 8px; list-style: none; cursor: pointer;
  padding: 8px 14px 8px 16px; border-radius: var(--hx-pill); border: 1px solid var(--hx-line-2);
  color: var(--hx-ink); font-size: 0.88rem; font-weight: 550; background: rgba(255, 255, 255, 0.03);
  transition: background 0.2s, border-color 0.2s;
}
.hx-more > summary::-webkit-details-marker { display: none; }
.hx-more > summary:hover { background: rgba(255, 255, 255, 0.08); }
.hx-more > summary svg { width: 16px; height: 16px; transition: transform 0.3s var(--hx-ease); }
.hx-more[open] > summary svg { transform: rotate(180deg); }
.hx-more-close, .hx-more[open] .hx-more-open { display: none; }
.hx-more[open] .hx-more-close { display: inline; }
.hx-more-body { padding-top: 20px; max-width: 820px; animation: hx-fade 0.4s var(--hx-ease); }
.hx-more--table .hx-more-body { max-width: none; }
@keyframes hx-fade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ================================================================= HERO */
.hx-hero { position: relative; padding: clamp(48px, 6vw, 80px) var(--hx-gutter) clamp(140px, 17vw, 250px); text-align: center; isolation: isolate; }
.hx-hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 80%; z-index: -1;
  background: radial-gradient(60% 50% at 50% 0%, rgba(255, 77, 46, 0.16), transparent 70%);
  pointer-events: none;
}
.hx-hero-inner { position: relative; max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.hx-lead { margin-top: 20px !important; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--hx-ink-2); max-width: 44ch; }
.hx-updated { margin-top: 18px !important; padding: 5px 14px; border-radius: var(--hx-pill); background: rgba(10, 10, 12, 0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 0.8rem; color: var(--hx-ink-2); }

.hx-wall {
  position: absolute; left: 0; right: 0; top: clamp(260px, 28vw, 340px); bottom: -40px; z-index: -1;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 0 14px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 55%, transparent 100%);
  opacity: 0.6;
}
.hx-wall-col { display: flex; flex-direction: column; gap: 14px; animation: hx-drift 60s linear infinite; }
.hx-wall-col--2, .hx-wall-col--4 { animation-direction: reverse; animation-duration: 75s; }
.hx-wall-col img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; }
.hx-wall-col--1 img:nth-child(3n + 2), .hx-wall-col--3 img:nth-child(3n) { aspect-ratio: 16 / 10; }
@keyframes hx-drift { from { transform: translateY(0); } to { transform: translateY(-50%); } }

.hx-console {
  position: relative; width: 100%; max-width: 860px; margin-top: 40px; padding: 10px; text-align: left;
  border-radius: 24px; background: rgba(20, 20, 24, 0.82); border: 1px solid var(--hx-line-2);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.hx-console-tabs { display: flex; gap: 4px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.hx-console-tabs button {
  flex: 1 0 auto; height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent;
  color: var(--hx-ink-2); font: inherit; font-size: 0.92rem; font-weight: 550; cursor: pointer; white-space: nowrap; transition: color 0.2s, background 0.2s;
}
.hx-console-tabs button:hover { color: var(--hx-ink); background: rgba(255, 255, 255, 0.05); }
.hx-console-tabs { border-bottom: 1px solid var(--hx-line); padding-bottom: 0; }
.hx-console-tabs button { border-radius: 0; }
.hx-console-tabs button[aria-pressed="true"] { color: var(--hx-accent); background: transparent; box-shadow: inset 0 -2px 0 var(--hx-accent); }
.hx-console-body { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 12px 6px 6px; }
.hx-console-preview { position: relative; margin: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--hx-panel-2); }
.hx-console-preview img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s, transform 6s linear; }
.hx-console-preview:hover img { transform: scale(1.06); }
.hx-console-preview figcaption { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: var(--hx-pill); background: rgba(0, 0, 0, 0.6); font-size: 0.72rem; color: var(--hx-ink); }
.hx-console-field textarea {
  width: 100%; height: 100%; min-height: 110px; padding: 14px 16px; resize: none;
  border-radius: 14px; border: 1px solid var(--hx-line); background: rgba(0, 0, 0, 0.25);
  color: var(--hx-ink); font: inherit; font-size: 1.02rem; line-height: 1.5;
}
.hx-console-field textarea:focus { outline: none; border-color: rgba(255, 77, 46, 0.6); box-shadow: 0 0 0 3px var(--hx-accent-soft); }
.hx-console-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 6px 6px; flex-wrap: wrap; }

/* ================================================================= HEADER MARK */
/* The homepage prints the same logo as every inner page (owner, 2026-09-26).
   The page text here is always light (--hx-ink), so the header takes its ink
   from the theme like inner pages do: after the theme switch to light the name
   stayed white on a light header and vanished (owner, 2026-09-27). */
.hx-body .topbar,
.hx-body .brand { color: var(--ink); }

/* ================================================================= MODE PICKER */
.hx-modes { }
.hx-h2--nav { margin-bottom: 28px !important; }
.hx-mode-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hx-mode { display: block; text-decoration: none; padding: 8px 8px 14px; border-radius: 18px; background: var(--hx-panel); border: 1px solid var(--hx-line); transition: transform 0.35s var(--hx-ease), border-color 0.3s, background 0.3s; }
.hx-mode:hover { transform: translateY(-4px); border-color: rgba(255, 77, 46, 0.45); background: var(--hx-panel-2); }
.hx-mode-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px; }
.hx-mode-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--hx-ease), filter 0.5s; filter: saturate(0.9); }
.hx-mode:hover .hx-mode-media img { transform: scale(1.08); filter: saturate(1.1); }
.hx-play { position: absolute; left: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.28); transition: transform 0.3s var(--hx-ease), background 0.3s, left 0.4s var(--hx-ease), bottom 0.4s var(--hx-ease); }
.hx-play::after { content: ""; position: absolute; left: 13px; top: 10px; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #fff; }
.hx-mode:hover .hx-play { background: var(--hx-accent-fill); border-color: var(--hx-accent); transform: scale(1.12); }
.hx-mode-label { display: block; padding: 12px 6px 0; font-weight: 600; color: var(--hx-ink); }

/* ================================================================= SUMMARY */
.hx-rules {
  list-style: none; margin: 0; padding: 0 0 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--hx-panel-3) transparent;
}
.hx-rule {
  position: relative; scroll-snap-align: start; min-height: 200px; padding: 24px; border-radius: 20px;
  background: linear-gradient(180deg, var(--hx-panel-2), var(--hx-panel)); border: 1px solid var(--hx-line);
  display: flex; flex-direction: column; gap: 18px; color: var(--hx-ink-2); font-size: 0.95rem; overflow: hidden;
}
.hx-rule::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 77, 46, 0.18), transparent 70%); opacity: 0; transition: opacity 0.4s; }
.hx-rule:hover::after { opacity: 1; }
.hx-rule-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--hx-panel-3); font-size: 0.85rem; font-weight: 650; color: var(--hx-ink); font-variant-numeric: tabular-nums; transition: background 0.3s; }
.hx-rule:hover .hx-rule-n { background: var(--hx-accent-fill); }
.hx-summary-foot { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px 56px; align-items: start; }
.hx-summary-foot > p { color: var(--hx-ink-2); }
.hx-chapter-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hx-chapter-chips a { display: inline-flex; height: 36px; align-items: center; padding: 0 14px; border-radius: var(--hx-pill); border: 1px solid var(--hx-line-2); text-decoration: none; font-size: 0.88rem; color: var(--hx-ink); transition: background 0.2s, border-color 0.2s; }
.hx-chapter-chips a:hover { background: var(--hx-accent-soft); border-color: rgba(255, 77, 46, 0.5); }

/* strips (models, rules, shots) */
[data-strip] { scroll-padding-inline: 2px; }

/* ================================================================= MODELS */
.hx-model-strip { list-style: none; margin: 0; padding: 0 0 10px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--hx-panel-3) transparent; }
.hx-model { scroll-snap-align: start; }
.hx-model-card { position: relative; height: 100%; border-radius: 18px; background: var(--hx-panel); border: 1px solid var(--hx-line); transition: border-color 0.3s, transform 0.35s var(--hx-ease); }
.hx-model-card:hover { transform: translateY(-3px); border-color: var(--hx-line-2); }
.hx-model-card[open] { border-color: rgba(255, 77, 46, 0.5); }
.hx-model-card > summary { list-style: none; cursor: pointer; padding: 8px 8px 14px; display: flex; flex-direction: column; gap: 10px; }
.hx-model-card > summary::-webkit-details-marker { display: none; }
.hx-model-media { display: block; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; position: relative; }
.hx-model-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55)); }
.hx-model-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--hx-ease); }
.hx-model-card:hover .hx-model-media img { transform: scale(1.06); }
.hx-model-name { padding: 0 6px; font-size: 1.08rem; font-weight: 650; letter-spacing: -0.01em; }
.hx-model-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 6px; }
.hx-model-chips span { padding: 2px 8px; border-radius: 6px; background: var(--hx-panel-3); font-size: 0.72rem; color: var(--hx-ink-2); line-height: 1.5; }
.hx-model-more { padding: 0 6px; font-size: 0.8rem; color: var(--hx-accent); font-weight: 600; }
.hx-model-sheet { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; border-radius: 18px; background: rgba(20, 20, 24, 0.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: hx-sheet 0.35s var(--hx-ease); }
@keyframes hx-sheet { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hx-model-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 8px 16px; border-bottom: 1px solid var(--hx-line); }
.hx-model-sheet-title { font-weight: 650; }
.hx-model-close { position: relative; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--hx-panel-3); cursor: pointer; }
.hx-model-close::before, .hx-model-close::after { content: ""; position: absolute; left: 10px; right: 10px; top: 16px; height: 2px; border-radius: 2px; background: var(--hx-ink); transform: rotate(45deg); }
.hx-model-close::after { transform: rotate(-45deg); }
.hx-model-close:hover { background: var(--hx-accent-fill); }
.hx-model-facts { margin: 0; padding: 12px 16px 16px; display: grid; gap: 6px; font-size: 0.8rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--hx-panel-3) transparent; }
.hx-model-facts dt { color: var(--hx-ink-3); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.hx-model-facts dd { margin: 0 0 4px; color: var(--hx-ink-2); }

.hx-models-grid { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hx-roles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hx-roles li { padding: 14px 16px; border-radius: 12px; background: var(--hx-panel-2); border: 1px solid var(--hx-line); color: var(--hx-ink-2); font-size: 0.93rem; }
.hx-roles strong { display: block; margin-bottom: 4px; color: var(--hx-ink); }
.hx-card--rights { background: linear-gradient(160deg, rgba(255, 181, 71, 0.08), var(--hx-panel) 55%); }
.hx-specs { margin-top: 48px; padding: 28px; border-radius: 20px; border: 1px solid var(--hx-line); background: var(--hx-bg-2); }
.hx-specs > .hx-prose { max-width: 820px; }

.hx-api { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 28px; align-items: start; }
.hx-api-copy > p { color: var(--hx-ink-2); }
.hx-calc { margin-top: 24px; padding: 22px; border-radius: 20px; background: var(--hx-panel); border: 1px solid var(--hx-line); display: grid; gap: 16px; }
.hx-calc-title { font-weight: 650; color: var(--hx-ink); }
.hx-range { display: grid; gap: 8px; font-size: 0.88rem; color: var(--hx-ink-2); }
.hx-range > span { display: flex; justify-content: space-between; gap: 12px; }
.hx-range output { color: var(--hx-ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.hx-range input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--hx-accent) var(--fill, 20%), var(--hx-panel-3) var(--fill, 20%)); outline-offset: 6px; }
.hx-range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--hx-accent); cursor: grab; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); }
.hx-range input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--hx-accent); cursor: grab; }
.hx-calc-result { display: flex; align-items: baseline; gap: 10px; }
.hx-calc-result output { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.04em; color: var(--hx-ink); font-variant-numeric: tabular-nums; }
.hx-calc-result span { color: var(--hx-ink-3); font-size: 0.9rem; }
.hx-calc-sub { font-size: 0.82rem; color: var(--hx-ink-3); }
.hx-code-tabs { position: sticky; top: 96px; }
.hx-code-caption { font-size: 0.85rem; color: var(--hx-ink-3); margin-bottom: 10px !important; }

/* tabs */
.hx-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: var(--hx-panel); border: 1px solid var(--hx-line); width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.hx-tabs button { flex: 0 0 auto; height: 38px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--hx-ink-2); font: inherit; font-size: 0.9rem; font-weight: 550; cursor: pointer; transition: background 0.2s, color 0.2s; }
.hx-tabs button:hover { color: var(--hx-ink); }
.hx-tabs button[aria-selected="true"] { background: var(--hx-accent-fill); color: #fff; }
.hx-tabs--big button { height: 48px; padding: 0 20px; font-size: 1rem; display: inline-flex; align-items: center; gap: 10px; }
.hx-tab-n { font-size: 0.72rem; font-weight: 700; opacity: 0.7; font-variant-numeric: tabular-nums; }
.js .hx-tabpanel:not(.is-active) { display: none; }
.hx-tabpanel.is-active { animation: hx-fade 0.45s var(--hx-ease); }

/* ================================================================= CAPABILITIES */
.hx-lanes { margin: 0; padding: 24px; border-radius: 24px; background: radial-gradient(120% 140% at 50% 0%, rgba(255, 77, 46, 0.09), transparent 60%), var(--hx-bg-2); border: 1px solid var(--hx-line); display: grid; gap: 12px; }
.hx-lanes figcaption { margin-top: 4px; font-size: 0.78rem; color: var(--hx-ink-3); text-align: center; letter-spacing: 0.08em; text-transform: uppercase; }
.hx-lane { display: grid; grid-template-columns: minmax(130px, 0.7fr) 1fr minmax(180px, 1.3fr) 1fr minmax(110px, 0.6fr); align-items: center; gap: 10px; }
.hx-lane-in, .hx-lane-out, .hx-lane-engine { padding: 10px 14px; border-radius: 12px; font-size: 0.88rem; text-align: center; }
.hx-lane-in { background: var(--hx-panel-2); border: 1px solid var(--hx-line-2); color: var(--hx-ink); font-weight: 600; }
.hx-lane-engine { background: var(--hx-panel); border: 1px dashed var(--hx-line-2); color: var(--hx-ink-2); }
.hx-lane-out { background: var(--hx-accent-soft); border: 1px solid rgba(255, 77, 46, 0.4); color: #ffc2b5; font-weight: 600; }
.hx-lane-wire { position: relative; height: 2px; background: var(--hx-line-2); overflow: hidden; border-radius: 2px; }
.hx-lane-wire i { position: absolute; top: 0; left: -30%; width: 30%; height: 100%; background: linear-gradient(90deg, transparent, var(--hx-accent), transparent); animation: hx-wire 2.4s linear infinite; animation-delay: calc(var(--i) * 0.3s); }
@keyframes hx-wire { to { left: 100%; } }

.hx-chapter-tabs { margin-top: 56px; }
.hx-chapter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: start; padding: 32px; border-radius: 24px; background: var(--hx-panel); border: 1px solid var(--hx-line); }
.js .hx-chapter:not(.is-active) { display: none; }
.hx-chapter-copy > p { color: var(--hx-ink-2); margin-bottom: 14px !important; }
.hx-grammar { counter-reset: g; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hx-grammar li { counter-increment: g; position: relative; padding: 14px 16px 14px 56px; border-radius: 12px; background: var(--hx-panel-2); border: 1px solid var(--hx-line); color: var(--hx-ink-2); font-size: 0.93rem; }
.hx-grammar li::before { content: counter(g); position: absolute; left: 14px; top: 13px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--hx-accent-fill); color: #fff; font-weight: 700; font-size: 0.85rem; }
.hx-chapter-media { margin: 0; position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 10; }
.hx-chapter-media img { width: 100%; height: 100%; object-fit: cover; animation: hx-kenburns 16s ease-in-out infinite alternate; }
.hx-chapter-media figcaption { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 0.85rem; color: var(--hx-ink); }
@keyframes hx-kenburns { from { transform: scale(1); } to { transform: scale(1.1) translate(-2%, -1%); } }
.hx-eq { position: absolute; left: 16px; right: 16px; bottom: 16px; height: 56px; display: flex; align-items: flex-end; gap: 4px; }
.hx-eq i { flex: 1; height: 30%; border-radius: 3px; background: linear-gradient(0deg, var(--hx-accent), #ffb547); animation: hx-eq 0.9s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -0.09s); }
@keyframes hx-eq { to { height: 100%; } }

/* shot builder */
.hx-builder { padding: 18px; border-radius: 20px; background: var(--hx-bg-2); border: 1px solid var(--hx-line); display: grid; gap: 14px; }
.hx-builder-title { font-weight: 650; }
.hx-builder-stage { margin: 0; position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.hx-builder-stage img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; }
.hx-builder-stage figcaption { position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: var(--hx-pill); background: rgba(0, 0, 0, 0.6); font-size: 0.75rem; }
.hx-builder-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 33.33% 0 / 33.33% 100%, linear-gradient(0deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 33.33% / 100% 33.33%; }
[data-move="static"] { animation: none; }
[data-move="dolly"] { animation: hx-dolly 5s ease-in-out infinite alternate; }
[data-move="pan"] { animation: hx-pan 6s ease-in-out infinite alternate; }
[data-move="tilt"] { animation: hx-tilt 6s ease-in-out infinite alternate; }
[data-move="orbit"] { animation: hx-orbit 7s ease-in-out infinite alternate; }
[data-move="crash"] { animation: hx-crash 2.6s cubic-bezier(0.7, 0, 0.2, 1) infinite; }
[data-move="tracking"] { animation: hx-track 5s linear infinite alternate; }
[data-move="roll"] { animation: hx-roll 6s ease-in-out infinite alternate; }
[data-move="aerial"] { animation: hx-aerial 8s ease-in-out infinite alternate; }
@keyframes hx-dolly { from { transform: scale(1.02); } to { transform: scale(1.22); } }
@keyframes hx-pan { from { transform: scale(1.2) translateX(-7%); } to { transform: scale(1.2) translateX(7%); } }
@keyframes hx-tilt { from { transform: scale(1.2) translateY(7%); } to { transform: scale(1.2) translateY(-7%); } }
@keyframes hx-orbit { from { transform: scale(1.18) perspective(900px) rotateY(-7deg) translateX(-3%); } to { transform: scale(1.18) perspective(900px) rotateY(7deg) translateX(3%); } }
@keyframes hx-crash { 0%, 30% { transform: scale(1); } 45% { transform: scale(1.55); } 85%, 100% { transform: scale(1.55); } }
@keyframes hx-track { from { transform: scale(1.25) translate(-6%, 1%); } to { transform: scale(1.25) translate(6%, -1%); } }
@keyframes hx-roll { from { transform: scale(1.3) rotate(-5deg); } to { transform: scale(1.3) rotate(5deg); } }
@keyframes hx-aerial { from { transform: scale(1.35) translateY(-6%); } to { transform: scale(1.05) translateY(0); } }
[data-look="film"] { filter: sepia(0.25) saturate(1.1) contrast(1.05); }
[data-look="volumetric"] { filter: brightness(1.1) contrast(0.92) saturate(1.05); }
[data-look="noir"] { filter: grayscale(0.85) contrast(1.35) brightness(0.9); }
[data-look="anamorphic"] { filter: saturate(1.25) hue-rotate(-8deg) contrast(1.1); }
.hx-slot { margin: 0; padding: 0; border: 0; min-width: 0; }
.hx-slot legend { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.82rem; font-weight: 600; color: var(--hx-ink-2); }
.hx-slot legend span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--hx-panel-3); color: var(--hx-ink); font-size: 0.72rem; }
.hx-slot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hx-choice { position: relative; }
.hx-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hx-choice span { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--hx-pill); border: 1px solid var(--hx-line-2); font-size: 0.82rem; color: var(--hx-ink-2); transition: all 0.2s; }
.hx-choice input:hover + span { color: var(--hx-ink); border-color: rgba(255, 255, 255, 0.3); }
.hx-choice input:checked + span { background: var(--hx-accent-fill); border-color: var(--hx-accent-fill); color: #fff; }
.hx-choice input:focus-visible + span { outline: 2px solid var(--hx-accent); outline-offset: 2px; }
.hx-builder-out { display: flex; gap: 10px; align-items: stretch; padding: 10px; border-radius: 14px; background: #07070a; border: 1px solid var(--hx-line); }
.hx-builder-out code, .hx-shot-prompt code { background: none; border-radius: 0; }
.hx code:not(pre code) { background: var(--hx-panel-3); color: var(--hx-ink); }
.hx-builder-out code { flex: 1; font-family: "PT Mono Web", ui-monospace, monospace; font-size: 0.84rem; line-height: 1.55; color: #ffd0c5; padding: 4px 6px; }

/* ================================================================= BROWSER */
.hx-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; counter-reset: st; }
.hx-steps li { position: relative; padding: 18px 16px; border-radius: 16px; background: var(--hx-panel); border: 1px solid var(--hx-line); display: flex; flex-direction: column; gap: 14px; font-weight: 600; font-size: 0.95rem; min-height: 120px; }
.hx-steps li:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 32px; width: 8px; height: 2px; background: var(--hx-line-2); }
.hx-step-n { flex: 0 0 30px; width: 30px; height: 30px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--hx-panel-3); font-size: 0.82rem; transition: background 0.3s; }
.hx-steps li:hover .hx-step-n, .hx-steps li:last-child .hx-step-n { background: var(--hx-accent-fill); }
.hx-browser-grid { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hx-card--panel { background: linear-gradient(180deg, var(--hx-panel-2), var(--hx-panel)); }
.hx-settings-intro { font-size: 0.88rem; }
.hx-settings { margin: 0; display: grid; gap: 1px; border-radius: 14px; overflow: hidden; border: 1px solid var(--hx-line); background: var(--hx-line); }
.hx-settings dt, .hx-settings dd { margin: 0; background: var(--hx-bg-2); }
.hx-settings dt { padding: 12px 14px 0; font-weight: 650; font-size: 0.86rem; color: var(--hx-ink); display: flex; align-items: center; gap: 8px; }
.hx-settings dt::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--hx-accent-fill); }
.hx-settings dd { padding: 4px 14px 12px; font-size: 0.86rem; color: var(--hx-ink-2); }
.hx-gate { margin-top: 16px; border-radius: 20px; border: 1px solid var(--hx-line); background: var(--hx-panel); overflow: hidden; }
/* A heading may not sit inside a span, so the title and its note are direct children of the summary:
   the switch takes the first column across both rows, the two lines stack in the second. */
.hx-gate > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: center; padding: 20px 24px; }
.hx-gate > summary > .hx-switch { grid-row: 1 / span 2; }
.hx-gate > summary > .hx-gate-title, .hx-gate > summary > .hx-gate-sub { grid-column: 2; }
.hx-gate > summary::-webkit-details-marker { display: none; }
.hx-switch { flex: 0 0 auto; width: 46px; height: 26px; border-radius: 99px; background: var(--hx-panel-3); position: relative; transition: background 0.25s; }
.hx-switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.3s var(--hx-ease); }
.hx-gate[open] .hx-switch { background: var(--hx-accent-fill); }
.hx-gate[open] .hx-switch i { transform: translateX(20px); }
/* A heading since stage 06: the type stays exactly the paragraph look it had
   (the global h3 rule would set line-height 1.3 and re-wrap every summary). */
.hx-gate-title { display: block; font-size: inherit; line-height: inherit; letter-spacing: normal; text-wrap: auto; font-weight: 650; color: var(--hx-ink); }
.hx-gate-sub { display: block; font-size: 0.88rem; color: var(--hx-ink-3); }
.hx-gate-body { padding: 0 24px 24px 86px; max-width: 900px; animation: hx-fade 0.4s var(--hx-ease); }

/* ================================================================= CONTROL */
.hx-rig { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
.hx-rig-copy > p { color: var(--hx-ink-2); margin-bottom: 14px !important; }
.hx-axis { padding: 16px 0; border-top: 1px solid var(--hx-line); }
.hx-axis-title { margin-bottom: 4px !important; }
.hx-axis-text { font-size: 0.9rem; color: var(--hx-ink-3); }
.hx-axis-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hx-term { height: 34px; padding: 0 13px; border-radius: var(--hx-pill); border: 1px solid var(--hx-line-2); background: transparent; color: var(--hx-ink-2); font: inherit; font-size: 0.84rem; cursor: pointer; transition: all 0.2s; }
.hx-term:hover { color: var(--hx-ink); border-color: rgba(255, 255, 255, 0.3); }
.hx-term[aria-pressed="true"] { background: var(--hx-accent-fill); border-color: var(--hx-accent-fill); color: #fff; }
.hx-rig-stage { margin: 0; position: sticky; top: 96px; }
.hx-rig-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; border: 1px solid var(--hx-line-2); }
.hx-rig-frame::before { content: ""; position: absolute; inset: 7% 5%; z-index: 1; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 4px; pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) top left / 22px 22px no-repeat, linear-gradient(#000 0 0) top right / 22px 22px no-repeat, linear-gradient(#000 0 0) bottom left / 22px 22px no-repeat, linear-gradient(#000 0 0) bottom right / 22px 22px no-repeat; mask: linear-gradient(#000 0 0) top left / 22px 22px no-repeat, linear-gradient(#000 0 0) top right / 22px 22px no-repeat, linear-gradient(#000 0 0) bottom left / 22px 22px no-repeat, linear-gradient(#000 0 0) bottom right / 22px 22px no-repeat; }
.hx-rig-frame img { width: 100%; height: 100%; object-fit: cover; transition: object-position 0.6s var(--hx-ease), scale 0.6s var(--hx-ease); animation-duration: calc(6s / var(--speed, 1)); }
.hx-rig-frame img[data-frame="wide"] { scale: 1; }
.hx-rig-frame img[data-frame="medium"] { scale: 1.5; }
.hx-rig-frame img[data-frame="close"] { scale: 2.1; }
.hx-rig-frame img[data-frame="xclose"] { scale: 3; }
.hx-rig-frame img[data-frame="ots"] { scale: 1.6; object-position: 70% 50%; }
.hx-rig-stage figcaption { margin-top: 12px; font-family: "PT Mono Web", ui-monospace, monospace; font-size: 0.82rem; color: var(--hx-ink-2); }

.hx-sync { margin-top: 72px; }
.hx-sync-grid { margin: 28px 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hx-sync-track { padding: 10px 10px 24px; border-radius: 20px; background: var(--hx-panel); border: 1px solid var(--hx-line); display: grid; gap: 16px; }
.hx-sync-track img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: 50% 22%; border-radius: 12px; }
.hx-sync-track > :not(img) { margin-inline: 14px; }
.hx-sync-title { font-size: 1.02rem; }

.hx-restyle { margin-top: 72px; padding: clamp(20px, 3vw, 32px); border-radius: 28px; background: var(--hx-panel); border: 1px solid var(--hx-line); }
.hx-restyle-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 40px; align-items: end; margin-bottom: 24px; }
.hx-restyle-head > p { color: var(--hx-ink-2); }
.hx-restyle-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; }
.hx-restyle-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hx-restyle-stage { --pos: 50%; touch-action: pan-y; }
.hx-restyle-layer { opacity: 0; transition: opacity 0.5s var(--hx-ease); clip-path: inset(0 0 0 var(--pos)); }
.hx-restyle-layer.is-on { opacity: 1; }
.hx-split-line { position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 18px rgba(0, 0, 0, 0.6); pointer-events: none; }
.hx-split-knob { position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); transition: transform 0.2s var(--hx-ease); }
.hx-restyle-stage.is-dragging .hx-split-knob, .hx-restyle-stage:hover .hx-split-knob { transform: scale(1.1); }
.hx-restyle-stage.is-dragging .hx-restyle-layer { transition: opacity 0.5s var(--hx-ease); }
.hx-split-knob::before, .hx-split-knob::after { content: ""; position: absolute; top: 16px; border-style: solid; border-width: 6px 7px; border-color: transparent; }
.hx-split-knob::before { left: 6px; border-right-color: #0a0a0c; }
.hx-split-knob::after { right: 6px; border-left-color: #0a0a0c; }
.hx-split-chip { position: absolute; z-index: 2; top: 14px; padding: 5px 12px; border-radius: var(--hx-pill); font-size: 0.8rem; font-weight: 650; }
.hx-split-chip--before { left: 14px; background: rgba(0, 0, 0, 0.6); color: #fff; }
.hx-split-chip--after { right: 14px; background: var(--hx-accent-fill); color: #fff; }
.hx-restyle-stage { cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.hx-restyle-stage img { pointer-events: none; -webkit-user-drag: none; }
.hx-split-range { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; overflow: hidden; }
.hx-split-range input { width: 100%; margin: 0; }
.hx-restyle-stage:has(input:focus-visible) .hx-split-knob { outline: 3px solid var(--hx-accent); outline-offset: 3px; }
.hx-restyle-intro { margin: 22px 0 12px !important; color: var(--hx-ink-3); font-size: 0.9rem; }
.hx-restyle-tabs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.hx-restyle-tabs button { width: 100%; height: 100%; text-align: left; padding: 8px 8px 14px; border-radius: 16px; border: 1px solid var(--hx-line); background: var(--hx-bg-2); color: inherit; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: border-color 0.25s, transform 0.3s var(--hx-ease), background 0.25s; }
.hx-restyle-tabs button:hover { transform: translateY(-3px); }
.hx-restyle-tabs button[aria-pressed="true"] { border-color: var(--hx-accent); background: rgba(255, 77, 46, 0.07); }
.hx-restyle-thumb { display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; }
.hx-restyle-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hx-restyle-label { padding: 0 4px; font-weight: 650; font-size: 0.9rem; color: var(--hx-ink); }
.hx-restyle-text { padding: 0 4px; font-size: 0.8rem; color: var(--hx-ink-3); line-height: 1.45; }

.hx-board { margin-top: 72px; }
.hx-board-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 40px; margin-bottom: 24px; }
.hx-board-head h3 { grid-row: span 2; }
.hx-board-head p { color: var(--hx-ink-2); }
.hx-board-head .hx-note { margin-top: 0 !important; }
.hx-shots { list-style: none; margin: 0 0 20px; padding: 0 0 10px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--hx-panel-3) transparent; }
.hx-shot { scroll-snap-align: start; padding: 8px 8px 14px; border-radius: 18px; background: var(--hx-panel); border: 1px solid var(--hx-line); display: flex; flex-direction: column; gap: 10px; }
.hx-shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.hx-shot > p, .hx-shot > div { margin-inline: 6px; }
.hx-shot-type { display: flex; gap: 8px; align-items: baseline; font-weight: 650; }
.hx-shot-type span { font-size: 0.72rem; color: var(--hx-accent); font-variant-numeric: tabular-nums; }
.hx-shot-purpose { font-size: 0.85rem; color: var(--hx-ink-2); }
.hx-shot-label { display: block; font-size: 0.78rem; color: var(--hx-ink-3); margin-bottom: -4px !important; }
.hx-shot-purpose .hx-shot-label { margin-bottom: 2px !important; }
.hx-shot-prompt { margin-top: auto; display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: 10px; background: #07070a; border: 1px solid var(--hx-line); }
.hx-shot-prompt code { flex: 1; font-family: "PT Mono Web", ui-monospace, monospace; font-size: 0.74rem; line-height: 1.5; color: #ffd0c5; }
.hx-copy { flex: 0 0 auto; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--hx-line-2); background: rgba(255, 255, 255, 0.05); color: var(--hx-ink); font: inherit; font-size: 0.75rem; cursor: pointer; }
.hx-copy.is-done, .hx-btn.is-done { background: #1f7a4d; border-color: #1f7a4d; color: #fff; }
.hx-board > .hx-prose, .hx-board > p:last-child { color: var(--hx-ink-2); max-width: 820px; }

.hx-edit { margin-top: 72px; padding: 32px; border-radius: 24px; border: 1px solid var(--hx-line); background: var(--hx-bg-2); }
.hx-edit-copy { max-width: 820px; }
.hx-edit-copy > p { color: var(--hx-ink-2); }
.hx-flow { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: 1.4fr 0.8fr 1fr 1fr; gap: 8px; }
.hx-flow li { position: relative; height: 64px; border-radius: 12px; display: grid; place-items: center; padding: 0 12px; text-align: center; font-weight: 600; font-size: 0.88rem; background: var(--hx-panel-2); border: 1px solid var(--hx-line-2); overflow: hidden; }
.hx-flow li::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 77, 46, 0.28), rgba(255, 77, 46, 0.05)); transform: scaleX(0); transform-origin: left; animation: hx-fill 6s var(--hx-ease) infinite; animation-delay: calc(var(--i) * 1.2s); }
.hx-flow li span { position: relative; }
@keyframes hx-fill { 0% { transform: scaleX(0); } 20%, 80% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }

/* ================================================================= USE CASES */
.hx-tabs--cards { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0; background: none; border: 0; }
.hx-tabs--cards button { height: auto; min-height: 104px; padding: 16px; text-align: left; border-radius: 16px; background: var(--hx-panel); border: 1px solid var(--hx-line); display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.hx-tabs--cards button[aria-selected="true"] { background: var(--hx-panel-2); border-color: var(--hx-accent); color: var(--hx-ink); }
.hx-tab-title { font-weight: 650; font-size: 0.98rem; color: var(--hx-ink); }
.hx-tab-sub { font-size: 0.8rem; color: var(--hx-ink-3); font-weight: 400; line-height: 1.4; }
.hx-use { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 0; border-radius: 24px; overflow: hidden; background: var(--hx-panel); border: 1px solid var(--hx-line); margin-bottom: 12px; }
.hx-use > img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.hx-use-copy { padding: 32px; }
.hx-use-copy > p { color: var(--hx-ink-2); }

/* ================================================================= TIERS */
.hx-versus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hx-tier { padding: 32px; }
.hx-tier--pro { background: radial-gradient(120% 90% at 100% 0%, rgba(255, 77, 46, 0.14), transparent 55%), var(--hx-panel); border-color: rgba(255, 77, 46, 0.3); }
.hx-tier-sub { font-size: 0.86rem; color: var(--hx-ink-3) !important; }
.hx-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hx-ticks li { position: relative; padding-left: 30px; color: var(--hx-ink-2); font-size: 0.93rem; }
.hx-ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--hx-panel-3) no-repeat center / 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.hx-tier--pro .hx-ticks li::before { background-color: var(--hx-accent-fill); }
.hx-more--wide { text-align: center; }
.hx-more--wide .hx-more-body { max-width: none; text-align: left; }
.hx-legal { margin-top: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.hx-plans { margin-top: 56px; padding: clamp(20px, 3vw, 32px); border-radius: 28px; background: linear-gradient(180deg, var(--hx-panel-2), var(--hx-bg-2)); border: 1px solid var(--hx-line); }
.hx-plans-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.hx-plans-title { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
.hx-billing { display: inline-flex; padding: 4px; border-radius: var(--hx-pill); background: var(--hx-bg); border: 1px solid var(--hx-line); }
.hx-billing button { height: 36px; padding: 0 16px; border: 0; border-radius: var(--hx-pill); background: transparent; color: var(--hx-ink-2); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.hx-billing button span { margin-left: 4px; font-size: 0.74rem; color: #7ee2a8; }
.hx-billing button[aria-pressed="true"] { background: var(--hx-ink); color: #0a0a0c; }
.hx-plan-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hx-plan { position: relative; padding: 24px; border-radius: 20px; background: var(--hx-panel); border: 1px solid var(--hx-line); display: flex; flex-direction: column; gap: 10px; }
.hx-plan--hot { border-color: var(--hx-accent); box-shadow: 0 20px 60px -30px rgba(255, 77, 46, 0.6); }
/* A heading since stage 06: the type stays exactly the paragraph look it had. */
.hx-plan-name { font-size: inherit; line-height: inherit; letter-spacing: normal; text-wrap: auto; font-weight: 650; color: var(--hx-ink-2); }
.hx-plan-price { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.hx-plan-price small { font-size: 0.85rem; font-weight: 500; color: var(--hx-ink-3); letter-spacing: 0; margin-left: 4px; }
.hx-plan-aud { font-size: 0.85rem; color: var(--hx-ink-3); }
.hx-plan-save { min-height: 1.35em; font-size: 0.8rem; line-height: 1.35; font-weight: 600; color: #7ee2a8; }
/* the height of the missing discount line plus the card gap */
.hx-plan--flat .hx-plan-aud { margin-bottom: calc(0.8rem * 1.35 + 10px); }
.hx-plan ul { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 8px; font-size: 0.88rem; color: var(--hx-ink-2); }
.hx-plan ul[hidden] { display: none; }
.hx-plan ul li { padding-left: 18px; position: relative; }
.hx-plan ul li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 2px; background: var(--hx-accent-fill); }
.hx-plan ul li.hx-plan-rate { margin-top: -4px; font-size: 0.8rem; color: var(--hx-ink-3); font-variant-numeric: tabular-nums; }
.hx-plan ul li.hx-plan-rate::before { content: none; }
/* The two buttons sit at the bottom of the card, so they line up across a row whatever the list length. */
.hx-plan-more { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--hx-line); border-radius: var(--hx-pill); background: transparent; color: var(--hx-ink-2); font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer; }
.hx-plan-more::after { content: ""; width: 7px; height: 7px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.2s ease; }
.hx-plan-more[aria-expanded="true"]::after { margin-top: 3px; transform: rotate(-135deg); }
.hx-plan-more:hover { color: var(--hx-ink); border-color: var(--hx-ink-3); }
.hx-plan-more:focus-visible { outline: 2px solid var(--hx-accent); outline-offset: 2px; }
.hx-plan .hx-btn { margin-top: 4px; }
.hx-plans { scroll-margin-top: 88px; }
.hx-plan { scroll-margin-top: 88px; }
@media (prefers-reduced-motion: reduce) { .hx-plan-more::after { transition: none; } }
[data-price-yearly][hidden], [data-price-monthly][hidden] { display: none; }

/* ================================================================= LIBRARY */
.hx-search { position: relative; display: flex; gap: 10px; margin-bottom: 24px; }
.hx-search label { flex: 1; }
.hx-search input { width: 100%; height: 56px; padding: 0 20px 0 50px; border-radius: 16px; border: 1px solid var(--hx-line-2); color: var(--hx-ink); font: inherit; font-size: 1rem; background: var(--hx-panel) no-repeat 18px center / 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='9' cy='9' r='6' fill='none' stroke='%2385858f' stroke-width='1.8'/%3E%3Cpath d='M14 14l4 4' stroke='%2385858f' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.hx-search input:focus { outline: none; border-color: rgba(255, 77, 46, 0.6); box-shadow: 0 0 0 3px var(--hx-accent-soft); }
.hx-search .hx-btn { height: 56px; border-radius: 16px; }
.hx-search-results { position: absolute; z-index: 5; left: 0; right: 0; top: 64px; list-style: none; margin: 0; padding: 8px; border-radius: 16px; background: var(--hx-panel-2); border: 1px solid var(--hx-line-2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9); max-height: 360px; overflow-y: auto; }
.hx-search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--hx-ink); font-size: 0.92rem; }
.hx-search-results a:hover, .hx-search-results a:focus { background: var(--hx-panel-3); }
.hx-search-results small { color: var(--hx-ink-3); }
.hx-shelves { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hx-shelf { padding: 8px 8px 20px; border-radius: 20px; background: var(--hx-panel); border: 1px solid var(--hx-line); display: flex; flex-direction: column; gap: 12px; }
.hx-shelf-cover { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; text-decoration: none; }
.hx-shelf-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--hx-ease); }
.hx-shelf-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.8)); }
.hx-shelf-cover:hover img { transform: scale(1.07); }
.hx-shelf-name { position: absolute; z-index: 1; left: 16px; bottom: 14px; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.hx-shelf-count { position: absolute; z-index: 1; right: 12px; top: 12px; padding: 3px 10px; border-radius: var(--hx-pill); background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 0.76rem; font-weight: 600; color: #fff; }
.hx-shelf-blurb { padding: 0 8px; font-size: 0.88rem; color: var(--hx-ink-2); }
.hx-shelf-links { list-style: none; margin: 0; padding: 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.hx-shelf-links a { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px; border-radius: var(--hx-pill); background: var(--hx-panel-2); border: 1px solid var(--hx-line); font-size: 0.78rem; color: var(--hx-ink-2); text-decoration: none; transition: color 0.2s, border-color 0.2s; }
.hx-shelf-links a:hover { color: var(--hx-ink); border-color: rgba(255, 77, 46, 0.5); }

/* ================================================================= GOVERNANCE ZONE */
.hx-zone { margin-top: var(--hx-band); background: linear-gradient(180deg, #0c0d12, #0a0a0c 40%); border-top: 1px solid var(--hx-line); }
.hx-zone .hx-band:first-of-type { padding-top: 56px; }
/* The quote is the figure's content, the attribution its caption; the image
   fills the frame while quote and caption stack on it from the bottom. */
.hx-zone-banner { position: relative; margin: 0; height: clamp(360px, 42vw, 520px); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 48px; }
.hx-zone-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.hx-zone-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 12, 0.3), #0c0d12 96%), linear-gradient(90deg, rgba(10, 10, 12, 0.85), transparent 70%); }
.hx-zone-quote { position: relative; z-index: 1; width: 100%; max-width: calc(var(--hx-max) + 2 * var(--hx-gutter)); margin: 0 auto; padding: 0 var(--hx-gutter); }
.hx-zone-quote p { max-width: 820px; font-size: clamp(1.25rem, 2.3vw, 1.85rem); line-height: 1.35; letter-spacing: -0.015em; font-weight: 550; color: var(--hx-ink); }
/* The caption keeps the box the attribution <p> had: the old container's
   content width, centred — not the container's padded width. */
.hx-zone-caption { position: relative; z-index: 1; width: calc(100% - 2 * var(--hx-gutter)); max-width: var(--hx-max); margin: 14px auto 0; font-size: 0.86rem; color: var(--hx-ink-3); }
.hx-gov-intro { color: var(--hx-ink-2); margin-bottom: 16px !important; }
.hx-bounds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hx-bounds li { padding: 24px; border-radius: 20px; background: var(--hx-panel); border: 1px solid var(--hx-line); color: var(--hx-ink-2); font-size: 0.93rem; display: grid; gap: 14px; align-content: start; }
.hx-bound > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 40px 1fr 28px; align-items: center; gap: 14px; color: var(--hx-ink); font-size: 1.02rem; }
.hx-bound > summary::-webkit-details-marker { display: none; }
.hx-bound-more { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--hx-panel-3); }
.hx-bound-more::before, .hx-bound-more::after { content: ""; position: absolute; left: 8px; right: 8px; top: 13px; height: 2px; background: var(--hx-ink); border-radius: 2px; }
.hx-bound-more::after { transform: rotate(90deg); transition: transform 0.3s var(--hx-ease); }
.hx-bound[open] .hx-bound-more { background: var(--hx-warn); }
.hx-bound[open] .hx-bound-more::after { transform: none; }
.hx-bound > p { margin-top: 14px !important; animation: hx-fade 0.4s var(--hx-ease); }
.hx-bound-n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 181, 71, 0.12); color: var(--hx-warn); font-weight: 700; border: 1px solid rgba(255, 181, 71, 0.3); }
.hx-matrix { margin-top: 48px; }
.hx-matrix-table .hx-table tbody th { color: var(--hx-warn); }
.hx-matrix .hx-prose--small { margin-top: 20px; max-width: 900px; }

.hx-check-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; margin-bottom: 28px; }
.hx-progress { position: relative; width: 150px; text-align: center; }
.hx-progress svg { width: 120px; height: 120px; transform: rotate(-90deg); display: block; margin: 0 auto; }
.hx-progress circle { fill: none; stroke: var(--hx-panel-3); stroke-width: 8; }
.hx-progress circle[data-check-ring] { stroke: var(--hx-accent); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 0.6s var(--hx-ease), stroke 0.3s; }
.hx-progress.is-complete circle[data-check-ring] { stroke: #3ccf8e; }
.hx-progress p { position: absolute; top: 34px; left: 0; right: 0; display: grid; }
.hx-progress output { font-size: 1.9rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.hx-progress span { font-size: 0.72rem; color: var(--hx-ink-3); }
.hx-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hx-check-group { margin: 0; padding: 20px; border-radius: 20px; background: var(--hx-panel); border: 1px solid var(--hx-line); display: grid; gap: 10px; align-content: start; min-width: 0; }
.hx-check-group legend { float: left; width: 100%; margin-bottom: 6px; font-weight: 650; color: var(--hx-ink); }
.hx-check-item { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 10px; margin: 0 -10px; border-radius: 10px; font-size: 0.9rem; color: var(--hx-ink-2); cursor: pointer; transition: background 0.2s; }
.hx-check-item:hover { background: rgba(255, 255, 255, 0.04); }
.hx-check-item input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.hx-box { width: 22px; height: 22px; border-radius: 7px; border: 1.6px solid var(--hx-line-2); transition: all 0.2s; }
.hx-check-item input:checked + .hx-box { background: var(--hx-accent-fill) no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); border-color: var(--hx-accent); transform: scale(1.06); }
.hx-check-item input:checked ~ span:last-child { color: var(--hx-ink-3); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.25); }
.hx-check-item input:focus-visible + .hx-box { outline: 2px solid var(--hx-accent); outline-offset: 2px; }
.hx-check-next { margin-top: 24px !important; padding: 18px 22px; border-radius: 16px; border: 1px solid rgba(255, 77, 46, 0.35); background: linear-gradient(90deg, var(--hx-accent-soft), var(--hx-panel) 60%); color: var(--hx-ink); max-width: 900px; }
.hx-appendix { padding-bottom: var(--hx-band); }
.hx-log { border-radius: 20px; border: 1px solid var(--hx-line); background: var(--hx-panel); }
.hx-log > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; }
.hx-log > summary::-webkit-details-marker { display: none; }
.hx-log > summary h2 { margin: 0; }
.hx-log > summary > span { flex: 0 0 auto; font-size: 0.85rem; color: var(--hx-accent); font-weight: 600; }
.hx-log[open] > summary > span { color: var(--hx-ink-3); }
.hx-log > .hx-prose { padding: 0 24px 24px; }

/* ================================================================= FAQ */
.hx-faq-list { display: grid; gap: 10px; max-width: 980px; }
.hx-qa { border-radius: 18px; background: var(--hx-panel); border: 1px solid var(--hx-line); transition: border-color 0.3s; }
.hx-qa[open] { border-color: var(--hx-line-2); }
.hx-qa > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; }
.hx-qa > summary::-webkit-details-marker { display: none; }
.hx-qa-q { margin: 0; font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; }
.hx-qa-icon { position: relative; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: var(--hx-panel-3); transition: background 0.25s, transform 0.35s var(--hx-ease); }
.hx-qa-icon::before, .hx-qa-icon::after { content: ""; position: absolute; left: 10px; right: 10px; top: 15px; height: 2px; border-radius: 2px; background: var(--hx-ink); }
.hx-qa-icon::after { transform: rotate(90deg); transition: transform 0.35s var(--hx-ease); }
.hx-qa[open] .hx-qa-icon { background: var(--hx-accent-fill); }
.hx-qa[open] .hx-qa-icon::after { transform: rotate(0deg); }
.hx-qa > .hx-prose { padding: 0 24px 22px; animation: hx-fade 0.4s var(--hx-ease); }

/* ================================================================= CLOSE */
.hx-close { position: relative; margin-top: var(--hx-band); min-height: 480px; display: grid; place-items: center; text-align: center; overflow: hidden; isolation: isolate; }
.hx-close > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hx-close::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 50% 60%, rgba(10, 10, 12, 0.35), #0a0a0c 85%), linear-gradient(180deg, #0a0a0c, transparent 30%, transparent 70%, #0a0a0c); }
.hx-close-inner { padding: 80px var(--hx-gutter); max-width: 760px; }
.hx-close-inner > p { margin-top: 16px !important; color: var(--hx-ink-2); font-size: 1.1rem; }
.hx-close-actions { margin-top: 32px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ================================================================= REVEAL */
.js .hx-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--hx-ease), transform 0.8s var(--hx-ease); }
.js .hx-reveal.is-in { opacity: 1; transform: none; }

/* ================================================================= RESPONSIVE */
@media (max-width: 1100px) { .hx-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .hx-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hx-steps li:nth-child(4)::after { display: none; }
  .hx-restyle-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hx-plan-grid, .hx-shelves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hx-band-head--split, .hx-summary-foot, .hx-models-grid, .hx-api, .hx-chapter, .hx-browser-grid, .hx-rig, .hx-restyle-head, .hx-board-head, .hx-use, .hx-versus, .hx-legal { grid-template-columns: minmax(0, 1fr); }
  .hx-band-head--split .hx-band-lead { margin-top: 0; }
  .hx-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-lane { grid-template-columns: 1fr; gap: 6px; padding: 12px; border-radius: 14px; background: var(--hx-panel); }
  .hx-lane-wire { width: 2px; height: 14px; margin: 0 auto; }
  .hx-lane-wire i { animation: none; }
  .hx-tabs--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-bounds { grid-template-columns: 1fr; }
  .hx-code-tabs, .hx-rig-stage { position: static; }
  .hx-rig-stage { order: -1; }
  .hx-use > img { min-height: 220px; max-height: 280px; }
  .hx-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hx { font-size: 15px; }
  .hx-h1 { font-size: clamp(2.05rem, 9vw, 2.6rem); }
  .hx-console { margin-top: 28px; padding: 6px; border-radius: 20px; }
  .hx-console-tabs button { font-size: 0.84rem; padding: 0 10px; }
  .hx-console-body { grid-template-columns: 1fr; }
  .hx-console-preview { aspect-ratio: 16 / 9; }
  .hx-console-bar .hx-btn { width: 100%; }
  .hx-wall { grid-template-columns: repeat(2, 1fr); top: 480px; }
  .hx-wall-col--3, .hx-wall-col--4 { display: none; }
  .hx-modes { padding-top: 120px; }
  .hx-mode-grid { gap: 10px; }
  .hx-mode { padding: 6px 6px 10px; border-radius: 14px; }
  .hx-mode-label { font-size: 0.86rem; padding-top: 8px; }
  .hx-rules { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; }
  .hx-builder-out { flex-direction: column; }
  .hx-rule { min-height: 0; }
  .hx-model-strip { grid-auto-columns: 62%; }
  .hx-shots { grid-auto-columns: 84%; }
  .hx-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-steps li { min-height: 0; flex-direction: row; align-items: center; padding: 14px; min-width: 0; overflow-wrap: anywhere; }
  .hx-steps li::after { display: none; }
  .hx-chapter, .hx-card, .hx-tier, .hx-use-copy, .hx-edit, .hx-specs { padding: 20px; }
  .hx-restyle-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-tabs--cards, .hx-plan-grid, .hx-shelves, .hx-check-grid { grid-template-columns: minmax(0, 1fr); }
  /* one column: no neighbour to line up with */
  .hx-plan--flat .hx-plan-aud { margin-bottom: 0; }
  .hx-tabs--cards button { min-height: 0; }
  .hx-search { flex-direction: column; }
  .hx-gate-body { padding: 0 20px 20px; }
  .hx-check-head { grid-template-columns: 1fr; }
  .hx-progress { width: auto; display: flex; align-items: center; gap: 16px; text-align: left; }
  .hx-progress svg { width: 80px; height: 80px; margin: 0; }
  .hx-progress p { position: static; }
  .hx-qa > summary { padding: 16px 18px; }
  .hx-qa > .hx-prose { padding: 0 18px 18px; }
  .hx-zone-banner { padding-bottom: 28px; }
  .hx-flow { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 374px) {
  .hx-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .hx *, .hx *::before, .hx *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js .hx-reveal { opacity: 1; transform: none; }
}
