/* ==========================================================================
   SliceTrace — landing page styles
   Plain CSS, no framework. Tokens first, then layout, then components.
   ========================================================================== */

/* --------------------------------------------------------------- tokens */
:root {
  --st-bg:         #0b0e12;
  --st-bg-soft:    #0e1216;
  --st-surface:    #12171d;
  --st-surface-2:  #161c23;
  --st-border:     #232c36;
  --st-border-soft:#1b222a;
  --st-text:       #eef2f6;
  --st-muted:      #94a1ae;
  --st-muted-dim:  #6f7c8a;

  --st-accent:     #7cc4ff;
  --st-accent-dim: #4ea6ec;
  --st-accent-2:       #b7dcff;
  --st-danger:     #f43f5e;
  --st-warn:       #f59e0b;
  --st-ok:         #34d399;

  --grad-accent: linear-gradient(100deg, var(--st-accent) 0%, var(--st-accent-2) 100%);

  --font-ui:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --shell:      1140px;
  --gutter:     clamp(1rem, 4vw, 2rem);
  --radius:     14px;
  --radius-lg:  20px;
  --header-h:   64px;

  --shadow-card: 0 1px 0 rgba(255,255,255,.03) inset, 0 18px 40px -22px rgba(0,0,0,.9);
  --ring: 0 0 0 3px rgba(124,196,255,.35);
}

/* --------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }

/* Components set display:grid/flex; the hidden attribute must still win. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--st-bg);
  color: var(--st-text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* body must never scroll sideways */
}

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; font-weight: 700; }
p  { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; height: auto; }
code, pre { font-family: var(--font-mono); font-size: .875em; }

a { color: inherit; text-decoration: none; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--st-accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: .75rem 1.25rem;
  background: var(--st-accent);
  color: #fff;
  font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* --------------------------------------------------------------- layout */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell-narrow { max-width: 720px; }

.section {
  padding-block: clamp(4rem, 9vw, 7rem);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  max-width: 22ch;
  margin-block: .5rem 0;
}

.section-lede {
  color: var(--st-muted);
  margin-top: 1rem;
  max-width: 56ch;
  font-size: 1.0625rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--st-muted);
}

.grad {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--st-accent);
  box-shadow: 0 0 0 0 rgba(124,196,255,.55);
  animation: pulse 2.6s ease-out infinite;
}
.pulse-dot.dot-accent-2 { background: var(--st-accent-2); box-shadow: 0 0 0 0 rgba(183,220,255,.55); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 currentColor; }
  70%  { box-shadow: 0 0 0 8px rgba(0,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

/* --------------------------------------------------------------- buttons */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6rem 1.1rem;
  border: 1px solid var(--st-border);
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--st-text);
  font: inherit;
  font-weight: 600;
  font-size: .9375rem;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background-color .16s ease, opacity .16s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-lg { padding: .85rem 1.6rem; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }

.btn-primary {
  border-color: transparent;
  background-image: var(--grad-accent);
  color: #07131f;
  font-weight: 700;
  box-shadow: 0 10px 30px -12px rgba(124,196,255,.75);
}
.btn-primary:hover { box-shadow: 0 16px 38px -12px rgba(124,196,255,.9); }

.btn-ghost { background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: var(--st-accent); }

.btn-quiet { color: var(--st-muted); }
.btn-quiet:hover { color: var(--st-text); border-color: var(--st-border); }

.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: not-allowed; transform: none; }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(11,14,18,.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--st-border-soft);
  background: rgba(11,14,18,.9);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: 1.0625rem;
  margin-right: auto;
}
.wordmark-glyph { font-size: 1.15rem; line-height: 1; }

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: .9375rem;
  color: var(--st-muted);
}
.site-nav a { transition: color .16s ease; }
.site-nav a:hover { color: var(--st-text); }

@media (max-width: 860px) {
  .site-nav { display: none; }
}

/* --------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 11vw, 8rem) clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
  isolation: isolate;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 55% at 18% 0%,  rgba(124,196,255,.20), transparent 70%),
    radial-gradient(55% 50% at 85% 12%, rgba(183,220,255,.14), transparent 70%),
    linear-gradient(180deg, var(--st-bg-soft), var(--st-bg));
}
/* faint grid overlay */
.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 20%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 20%, #000 20%, transparent 85%);
}

/* animated "trace" lines */
.trace-line {
  position: absolute;
  height: 1px;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--st-accent), transparent);
  opacity: .5;
  animation: trace 9s linear infinite;
}
.trace-line-2 { background: linear-gradient(90deg, transparent, var(--st-accent-2), transparent); animation-duration: 12s; animation-delay: -4s; }
.trace-line-3 { animation-duration: 15s; animation-delay: -8s; opacity: .3; }
.trace-line-1 { top: 22%; }
.trace-line-2 { top: 48%; }
.trace-line-3 { top: 71%; }

@keyframes trace {
  from { transform: translateX(-110%); }
  to   { transform: translateX(320%); }
}

.hero-title {
  font-size: clamp(2.25rem, 6.2vw, 4.25rem);
  font-weight: 800;
  max-width: 18ch;
  margin-top: 1.25rem;
}

.hero-sub {
  margin-top: 1.5rem;
  max-width: 64ch;
  color: var(--st-muted);
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
}

.hero-offer {
  margin-top: 1.25rem;
  font-weight: 600;
  color: var(--st-text);
  font-size: clamp(1rem, 1.6vw, 1.125rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .875rem;
  margin-top: 2.25rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.75rem;
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: .8125rem;
  color: var(--st-muted-dim);
}
.hero-meta li { display: flex; align-items: center; gap: .5rem; }
.hero-meta li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--st-accent);
  opacity: .8;
}

/* --------------------------------------------------------------- loop steps */
.steps {
  margin-top: 3rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1.75rem;
  border: 1px solid var(--st-border);
  border-radius: var(--radius);
  background: var(--st-surface);
}

/* connective tissue: a faint trace running between the steps */
@media (min-width: 860px) {
  .step + .step::before {
    content: "";
    position: absolute;
    top: 2.55rem;
    left: -1.25rem;
    width: 1.25rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--st-accent));
    opacity: .5;
  }
}

.step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 500;
  color: var(--st-accent);
  letter-spacing: .1em;
  margin-bottom: 1rem;
}

.step h3 { font-size: 1.0625rem; margin-bottom: .6rem; }
.step p  { color: var(--st-muted); font-size: .9375rem; }
.step code {
  padding: .12em .4em;
  border-radius: 5px;
  background: rgba(255,255,255,.05);
  color: var(--st-accent-2);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.loop-bridge {
  margin-top: 2.25rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--st-border);
  color: var(--st-muted-dim);
  font-size: .9375rem;
  max-width: 68ch;
}

/* --------------------------------------------------------------- prompt block */
.prompt-block {
  margin-top: 1.1rem;
  border: 1px solid var(--st-border);
  border-radius: 10px;
  overflow: hidden;
  background: #080a0d;
}

.prompt-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .5rem .6rem .5rem 1rem;
  border-bottom: 1px solid var(--st-border);
  background: rgba(255,255,255,.02);
}

.prompt-label {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--st-muted-dim);
}

.copy-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  border: 1px solid var(--st-border);
  border-radius: 7px;
  background: rgba(255,255,255,.03);
  color: var(--st-text);
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.copy-btn:hover { border-color: var(--st-accent); }
.copy-btn.is-copied { color: var(--st-ok); border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.08); }
.copy-btn.is-failed { color: #ff8497; border-color: rgba(244,63,94,.4); }

.prompt-block .json-scroll {
  margin-top: 0;
  border: 0;
  border-radius: 0;
}

/* the instruction lines above the JSON */
.json-box .c { color: var(--st-muted); }

/* --------------------------------------------------------------- PR card */
.section-platform { padding-top: clamp(1rem, 3vw, 2rem); }

/* own scroll container — keeps the body from scrolling sideways.
   overflow-x:auto forces overflow-y:auto, which would clip the card shadow,
   so the container is padded below to give the shadow room. No horizontal
   padding/negative margin here: that would eat into the page gutter. */
.pr-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 22px;
  margin-bottom: -22px;
}

.pr-card {
  min-width: min(320px, 100%);
  border: 1px solid var(--st-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--st-surface-2), var(--st-surface));
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.pr-chrome {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .75rem 1.125rem;
  border-bottom: 1px solid var(--st-border);
  background: rgba(255,255,255,.02);
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--st-muted-dim);
}
.dots { display: inline-flex; gap: .4rem; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #28313c; }
.dots i:nth-child(1) { background: #34404c; }

.pr-chrome-tab {
  padding: .2rem .6rem;
  border: 1px solid var(--st-border);
  border-radius: 999px;
  color: var(--st-text);
  white-space: nowrap; /* otherwise "PR #412" wraps into a tall oval on mobile */
}
.pr-chrome-path {
  margin-left: auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pr-body { padding: clamp(1.25rem, 3.5vw, 2.25rem); }

.pr-h1 {
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--st-border-soft);
}

.pr-h2 {
  font-size: clamp(1rem, 2vw, 1.125rem);
  margin-top: 2rem;
  color: var(--st-text);
}

.pr-list {
  margin-top: .9rem;
  display: grid;
  gap: .5rem;
  font-size: .9375rem;
  color: var(--st-muted);
}
.pr-list li { padding-left: 1.1rem; position: relative; }
.pr-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .72em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--st-border);
}
.pr-list strong { color: var(--st-text); font-weight: 600; }

.pr-list code, .alert-list code, .pr-para code {
  padding: .12em .4em;
  border-radius: 5px;
  background: rgba(255,255,255,.05);
  color: var(--st-accent-2);
  /* keep the padded box intact when a long path wraps across lines */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Long file paths (Invoice.cs:line 42) have no spaces to break at. The card
   clips its overflow, so without this they'd be cut off on narrow screens. */
.pr-list li, .alert-list li, .pr-para, .pr-h2, .pr-h1 { overflow-wrap: break-word; }
.pr-list code, .alert-list code, .pr-para code { overflow-wrap: anywhere; }

.tag {
  display: inline-block;
  padding: .1rem .5rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 500;
}
.tag-danger { background: rgba(244,63,94,.12); color: #ff8497; border: 1px solid rgba(244,63,94,.28); }
.tag-accent { background: rgba(124,196,255,.12); color: #b9dcff; border: 1px solid rgba(124,196,255,.28); }

.alert {
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--st-border);
  border-left-width: 3px;
  border-radius: 10px;
  background: rgba(255,255,255,.015);
}
.alert-danger { border-left-color: var(--st-danger); }
.alert-warn   { border-left-color: var(--st-warn); }

.alert-title { font-size: .9375rem; }
.alert-danger .alert-title strong { color: #ff8497; }
.alert-warn   .alert-title strong { color: #f8c169; }

.alert-list {
  margin-top: .65rem;
  display: grid;
  gap: .45rem;
  font-size: .875rem;
  color: var(--st-muted);
  padding-left: 1.6rem;
}
.alert-list li { position: relative; }
.alert-list li::before {
  content: "–";
  position: absolute;
  left: -1rem;
  color: var(--st-muted-dim);
}
.alert-list em { color: var(--st-text); font-style: normal; font-weight: 600; }

.pr-para { margin-top: .9rem; font-size: .9375rem; color: var(--st-muted); }

/* JSON block gets its own scroller too */
.json-scroll {
  margin-top: 1.1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--st-border);
  border-radius: 10px;
  background: #080a0d;
}
.json-box {
  margin: 0;
  padding: 1.1rem 1.25rem;
  font-size: .8125rem;
  line-height: 1.75;
  /* pre-wrap, not pre: the remediation string is ~120 chars and would otherwise
     force a 940px line that scrolls sideways on every screen size. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--st-text);
}
.json-box .k { color: var(--st-accent-2); }
.json-box .s { color: #b7f7c0; }
.json-box .p { color: var(--st-muted-dim); }

.pr-await {
  margin-top: 1rem;
  font-size: .875rem;
  color: var(--st-muted-dim);
}

/* --------------------------------------------------------------- cards */
.card-grid {
  margin-top: 3rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  padding: 1.75rem;
  border: 1px solid var(--st-border);
  border-radius: var(--radius);
  background: var(--st-surface);
  transition: border-color .2s ease, transform .2s ease, background-color .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #2f3a46;
  background: var(--st-surface-2);
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}
.icon-accent { background: rgba(124,196,255,.12); color: #b9dcff; border: 1px solid rgba(124,196,255,.25); }
.icon-accent-2   { background: rgba(183,220,255,.10);  color: #d6ebff; border: 1px solid rgba(183,220,255,.25); }

.card h3 { font-size: 1.0625rem; margin-bottom: .65rem; }
.card p  { color: var(--st-muted); font-size: .9375rem; }
.card em { color: var(--st-text); font-style: italic; }

/* --------------------------------------------------------------- compliance */
.compliance {
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid rgba(183,220,255,.18);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(183,220,255,.08), transparent 60%),
    var(--st-surface);
}

.compliance-grid {
  margin-top: 2.25rem;
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.compliance-item { padding-top: 1.25rem; border-top: 1px solid var(--st-border); }
.compliance-item h3 { font-size: 1rem; margin-bottom: .6rem; color: var(--st-accent-2); }
.compliance-item p  { color: var(--st-muted); font-size: .9375rem; }

/* --------------------------------------------------------------- founder */
.section-founder { padding-block: clamp(3rem, 7vw, 5rem); }

.founder {
  margin: 0;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-left: 2px solid transparent;
  border-image: var(--grad-accent) 1;
  background: linear-gradient(90deg, rgba(124,196,255,.06), transparent 70%);
}
.founder p {
  font-size: clamp(1.0625rem, 2.2vw, 1.375rem);
  line-height: 1.55;
  letter-spacing: -.01em;
  max-width: 62ch;
}

/* --------------------------------------------------------------- form */
.section-beta {
  background: linear-gradient(180deg, transparent, rgba(124,196,255,.05));
  border-top: 1px solid var(--st-border-soft);
}

.beta-head { text-align: center; display: grid; justify-items: center; }
.beta-head .section-title { max-width: none; }

.beta-form {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--st-border);
  border-radius: var(--radius-lg);
  background: var(--st-surface);
  box-shadow: var(--shadow-card);
}

.field { display: grid; gap: .5rem; }

.field > label, .fieldset legend {
  font-size: .875rem;
  font-weight: 600;
  color: var(--st-text);
}

.fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.fieldset legend { padding: 0; margin-bottom: .75rem; }

input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  padding: .75rem .9rem;
  border: 1px solid var(--st-border);
  border-radius: 10px;
  background: var(--st-bg-soft);
  color: var(--st-text);
  font: inherit;
  font-size: .9375rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}
input::placeholder { color: var(--st-muted-dim); }

input[type="text"]:focus, input[type="email"]:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--st-accent);
  box-shadow: var(--ring);
}

.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 1rem; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--st-muted);
  border-bottom: 2px solid var(--st-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
}
select:invalid { color: var(--st-muted-dim); }
select option { background: var(--st-surface); color: var(--st-text); }

.radio-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.radio {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem 1.1rem;
  border: 1px solid var(--st-border);
  border-radius: 10px;
  background: var(--st-bg-soft);
  cursor: pointer;
  font-size: .9375rem;
  transition: border-color .16s ease, background-color .16s ease;
}
.radio:hover { border-color: #2f3a46; }
.radio input { accent-color: var(--st-accent); width: 16px; height: 16px; cursor: pointer; }
.radio:has(input:checked) {
  border-color: var(--st-accent);
  background: rgba(124,196,255,.08);
}
.radio:has(input:focus-visible) { box-shadow: var(--ring); }

.field-error {
  font-size: .8125rem;
  color: #ff8497;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--st-danger); }

textarea { resize: vertical; min-height: 5.5rem; line-height: 1.5; }
.optional { font-weight: 400; color: var(--st-muted-dim); }

/* honeypot — visually gone, not display:none (some bots skip those) */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-status {
  font-size: .9375rem;
  min-height: 1.25rem;
}
/* Stays in the layout while empty: an aria-live region must already be in the
   accessibility tree when its text arrives, or screen readers may miss it. */
.form-status.is-ok    { color: var(--st-ok); }
.form-status.is-error { color: #ff8497; }

.form-note {
  font-size: .8125rem;
  color: var(--st-muted-dim);
  text-align: center;
}

/* --------------------------------------------------------------- problems */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.problem-list {
  margin-top: 2.5rem;
  display: grid;
  gap: .625rem;
}

.problem {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1rem .9rem 1.15rem;
  border: 1px solid var(--st-border);
  border-radius: var(--radius);
  background: var(--st-surface);
}
.problem-num {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--st-muted-dim);
}
.problem-text { font-size: .9375rem; min-width: 0; overflow-wrap: break-word; }

.vote-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  min-height: 3.25rem; /* comfortable touch target */
  padding: .35rem .6rem;
  border: 1px solid var(--st-border);
  border-radius: 10px;
  background: var(--st-bg-soft);
  color: var(--st-muted);
  font: inherit;
  font-family: var(--font-mono);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.vote-btn:hover:not([disabled]) { border-color: var(--st-accent); color: var(--st-text); }
.vote-btn[disabled] { opacity: .5; cursor: default; }
.vote-btn.is-voted {
  border-color: var(--st-accent);
  background: rgba(124,196,255,.12);
  color: var(--st-accent-2);
}
.vote-arrow { font-size: .7rem; }

.link-btn {
  margin-top: 1rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--st-accent);
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--st-accent-2); }

.vote-status { margin-top: .75rem; }
.section-problems .form-note { text-align: left; margin-top: .25rem; }

.mini-form {
  margin-top: 1.25rem;
  display: grid;
  gap: .9rem;
  justify-items: start;
}
.mini-form .field { width: 100%; }
.mini-form .form-note { text-align: left; }

/* --------------------------------------------------------------- pilot confirm */
.form-confirm {
  margin-top: 2.5rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid rgba(52,211,153,.35);
  border-radius: var(--radius-lg);
  background: rgba(52,211,153,.06);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: .75rem;
}
.form-confirm:focus { outline: none; }
.form-confirm p { color: var(--st-muted); max-width: 46ch; }
.form-confirm a { color: var(--st-accent); text-decoration: underline; }
.confirm-icon {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(52,211,153,.15);
  color: var(--st-ok);
  font-size: 1.25rem;
  font-weight: 700;
}

/* --------------------------------------------------------------- book */
.section-book { padding-top: clamp(2rem, 5vw, 3.5rem); }
.book-card {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--st-border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(124,196,255,.08), transparent 60%),
    var(--st-surface);
  display: grid;
  justify-items: start;
  gap: .25rem;
}
.book-card .btn { margin-top: 1.5rem; }

/* --------------------------------------------------------------- feedback */
.feedback-btn {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 60;
  padding: .55rem .95rem;
  border: 1px solid var(--st-border);
  border-radius: 999px;
  background: var(--st-surface-2);
  color: var(--st-text);
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.9);
  cursor: pointer;
  transition: border-color .16s ease;
}
.feedback-btn:hover { border-color: var(--st-accent); }

.feedback-dialog {
  width: min(28rem, calc(100vw - 2rem));
  padding: 0;
  border: 1px solid var(--st-border);
  border-radius: var(--radius-lg);
  background: var(--st-surface);
  color: var(--st-text);
  box-shadow: var(--shadow-card);
}
.feedback-dialog::backdrop { background: rgba(5,7,10,.7); }
.feedback-form { display: grid; gap: 1rem; padding: 1.5rem; }
.feedback-head { display: flex; align-items: center; justify-content: space-between; }
.feedback-head h2 { font-size: 1.125rem; }
.feedback-close {
  width: 2.25rem; height: 2.25rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--st-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.feedback-close:hover { color: var(--st-text); background: rgba(255,255,255,.05); }

/* --------------------------------------------------------------- footer */
.site-footer {
  border-top: 1px solid var(--st-border-soft);
  padding-block: 2.5rem 5rem; /* room for the fixed feedback button */
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.footer-copy { color: var(--st-muted-dim); font-size: .875rem; }

/* --------------------------------------------------------------- reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s cubic-bezier(.2,.7,.3,1), transform .6s cubic-bezier(.2,.7,.3,1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
/* Without JS the `js` class is never set, so nothing is ever hidden. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .trace-line { display: none; }
}
