/* QuantumLeep. Brand tokens are documented in brand/brand-guide.html.
   Leap blue and Spark are brand colours. The status colours are kept apart
   from them so a status never looks like decoration. */
@font-face {
  font-family: "Outfit";
  src: url("/static/fonts/outfit-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #0a1330;
  --paper: #ffffff;
  --leap: #3d2bff;
  --leap-deep: #2a1bd6;
  --spark: #ffc933;
  --frost: #f4f5fa;
  --rule: #e1e4ee;
  --field: #c6ccdc;
  --muted: #55607a;
  --week: #b4231a;
  --quarter: #9a5b00;
  --place: #0b6e4f;
  --measure: 38rem;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { font-size: 106.25%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Outfit", system-ui, sans-serif; font-weight: 400; line-height: 1.55; -webkit-font-smoothing: antialiased; }

.masthead, main, .hero-inner, .foot-inner { max-width: 62rem; margin: 0 auto; padding: 0 1.5rem; }

.masthead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.brand { display: block; line-height: 0; margin-left: -8px; }
.brand img { height: 2.5rem; width: auto; }
.brand-note { color: var(--muted); font-size: 0.875rem; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-size: 0.95rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 0.4rem 0; }
.nav a:hover { color: var(--leap); text-decoration: underline; }

h1, h2, h3 { font-weight: 500; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 3.9rem); line-height: 1.04; letter-spacing: -0.035em; margin: 0 0 1.1rem; max-width: 17ch; text-wrap: balance; }
h2 { font-size: 1.55rem; line-height: 1.2; margin: 3.25rem 0 0.75rem; }
h3 { font-size: 1.2rem; line-height: 1.25; margin: 0 0 0.25rem; }
strong, th { font-weight: 600; }

p, li { max-width: var(--measure); }
.lede { font-size: 1.15rem; line-height: 1.5; }
.hint, .scanned, .applies, .optional { color: var(--muted); font-size: 0.875rem; }
.optional { font-weight: 400; margin-left: 0.4rem; }
.nowrap { white-space: nowrap; }

a { color: var(--leap); text-underline-offset: 0.15em; }
:focus-visible { outline: 2px solid var(--leap); outline-offset: 2px; border-radius: 4px; }

/* Home page band */
.hero { background: var(--ink); color: var(--paper); padding: 4.5rem 0 8rem; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -16rem; top: -15rem; width: 30rem; height: 30rem; border-radius: 50%; border: 3.25rem solid rgba(61, 43, 255, 0.5); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; }
.hero .lede { color: #b9c0d8; max-width: 34rem; }
.hero :focus-visible { outline-color: var(--spark); }

/* Forms */
.scan-form, .help { background: var(--paper); border: 1px solid var(--rule); border-radius: 18px; box-shadow: 0 24px 60px -28px rgba(10, 19, 48, 0.35); }
.scan-form { padding: 1.75rem 1.75rem 1.5rem; margin: -5.25rem 0 3rem; max-width: 44rem; position: relative; z-index: 2; }
.scan-form label, .help-form label { display: block; font-weight: 500; margin: 1.1rem 0 0.35rem; }
.scan-form label:first-of-type { margin-top: 0; }
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; font: inherit; color: var(--ink); padding: 0.65rem 0.8rem; border: 1px solid var(--field); border-radius: 10px; background: var(--paper);
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--leap); outline-offset: 0; border-color: var(--leap); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; }
.scan-form .check, .help-form .check { display: flex; font-weight: 400; margin-top: 1.25rem; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.22rem; flex: none; accent-color: var(--leap); }
.scan-form button[type="submit"], .help-form button[type="submit"] {
  margin-top: 1.4rem; font: inherit; font-size: 1.05rem; font-weight: 500; color: var(--paper); background: var(--leap); border: 0; border-radius: 10px; padding: 0.8rem 1.6rem; cursor: pointer;
}
.scan-form button[type="submit"]:hover, .help-form button[type="submit"]:hover { background: var(--leap-deep); }
.scan-form button[disabled] { opacity: 0.6; cursor: progress; }
.error { border: 1px solid var(--week); color: var(--week); background: #fdf3f2; border-radius: 10px; padding: 0.65rem 0.85rem; font-weight: 500; margin: 0 0 1rem; }
.notice-line { border: 1px solid var(--place); color: var(--place); background: #f0f8f5; border-radius: 10px; padding: 0.65rem 0.85rem; font-weight: 500; margin: 0 0 1rem; }

fieldset { border: 0; border-top: 1px solid var(--rule); margin: 1.6rem 0 0; padding: 1.1rem 0 0; }
legend { font-weight: 500; font-size: 1.05rem; padding: 0 0.6rem 0 0; }
.group-label { font-weight: 500; margin: 1.1rem 0 0.2rem; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 1rem; }
.scan-form .choices .check, .scan-form fieldset > .check { margin-top: 0.5rem; }

/* Information pages */
.prose h2 { font-size: 1.35rem; margin-top: 2.5rem; }
.prose h1 { max-width: 22ch; }
table.plain { font-size: 0.95rem; max-width: 52rem; margin-top: 0.5rem; }
table.plain tbody th { white-space: normal; min-width: 9rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; margin: 2rem 0 0.5rem; max-width: 52rem; }
.stats > div { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.stats p { margin: 0; color: var(--muted); }
.stats .stat { font-size: 2.6rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); }
.brief { margin-top: 2rem; }
#intro-details[hidden] { display: none; }
.intro-detail { margin: 0.4rem 0 0 1.75rem; max-width: 36rem; }
.explain h3 { margin-top: 1.6rem; }
.explain ul { padding-left: 1.2rem; }
.firm-form { max-width: 44rem; }

/* Report */
.readiness { border: 1px solid var(--rule); border-radius: 18px; padding: 0.25rem 1.6rem 1.1rem; margin-top: 2rem; max-width: 46rem; }
.readiness h2 { margin-top: 1.2rem; font-size: 1.2rem; color: var(--muted); letter-spacing: 0; }
.readiness-label { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; margin: 0.2rem 0 0.6rem; }
.level-fast .readiness-label { color: var(--place); }
.level-moderate .readiness-label { color: var(--quarter); }
.level-slow .readiness-label { color: var(--week); }

.report-head h1 { margin-top: 0.4rem; max-width: 22ch; font-size: clamp(2rem, 5vw, 3.2rem); }
.intro > h1:first-child, .prose h1 { margin-top: 2.75rem; }
.scanned { margin: 2.75rem 0 0; }
.actions-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: none; }
.button-link { display: inline-block; font: inherit; font-size: 0.9rem; font-weight: 500; color: var(--ink); background: var(--paper); border: 1px solid var(--field); border-radius: 10px; padding: 0.5rem 0.95rem; text-decoration: none; cursor: pointer; }
.button-link:hover { border-color: var(--ink); }
.button-link.primary { background: var(--leap); border-color: var(--leap); color: var(--paper); }
.button-link.primary:hover { background: var(--leap-deep); border-color: var(--leap-deep); }

.actions { list-style: none; padding: 0; margin: 0; counter-reset: action; }
.action { max-width: 46rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); padding: 1.2rem 1.4rem 1.1rem; margin: 0 0 0.85rem; }
ol.actions > .action { counter-increment: action; }
ol.actions > .action h3::before { content: counter(action) ". "; }
.action p { margin: 0.4rem 0; }
.action .when { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; font-size: 0.82rem; margin: 0 0 0.45rem; padding: 0.15rem 0.65rem 0.15rem 0.55rem; border-radius: 999px; background: var(--frost); color: var(--muted); }
.action .when::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.when-this-week .when, .when-this-month .when { color: var(--week); background: #fdf1f0; }
.when-this-quarter .when { color: var(--quarter); background: #fbf4e8; }
.when-in-place .when { color: var(--place); background: #edf7f3; }
.steps { margin: 0.6rem 0 0.2rem; padding-left: 1.3rem; }
.steps li { margin-bottom: 0.3rem; }

.notice { border: 1px solid var(--week); border-radius: var(--radius); padding: 0 1.4rem 0.6rem; margin-top: 2rem; max-width: 46rem; }
.notice h2 { margin-top: 1.1rem; font-size: 1.2rem; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; font-size: 0.86rem; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.9rem 0.6rem 0; border-bottom: 1px solid var(--rule); }
thead th { border-bottom: 1px solid var(--ink); color: var(--muted); font-weight: 500; }
tbody th { white-space: nowrap; }
.tag { font-weight: 600; }
.tag-classical { color: var(--quarter); }
.tag-post-quantum { color: var(--place); }

.checklist { padding-left: 1.2rem; }
pre { font-family: inherit; font-size: 0.92rem; white-space: pre-wrap; background: var(--frost); border-radius: var(--radius); padding: 1.1rem 1.3rem; max-width: 44rem; margin: 0.75rem 0; }

.help { padding: 0.25rem 1.75rem 1.5rem; margin-top: 3.5rem; max-width: 46rem; scroll-margin-top: 1rem; }
.help h2 { margin-top: 1.4rem; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1rem; }
.trap { position: absolute; left: -200vw; }
.remove h2 { font-size: 1.2rem; }
.status-form { display: flex; gap: 0.4rem; align-items: center; }
.status-form select { width: auto; padding: 0.35rem 0.5rem; font-size: 0.86rem; }

.foot { margin-top: 5rem; background: var(--ink); }
.foot-inner { display: flex; gap: 1rem; align-items: flex-start; padding-top: 1.75rem; padding-bottom: 2.25rem; }
.foot img { flex: none; margin-top: 0.1rem; }
.foot p { color: #aeb6d0; font-size: 0.85rem; margin: 0; }
.foot a { color: #ffffff; }

@media (max-width: 34rem) {
  .hero { padding-top: 3rem; }
  .hero::after { width: 16rem; height: 16rem; right: -8rem; top: -8rem; border-width: 2rem; }
  .scan-form, .help { padding-left: 1.2rem; padding-right: 1.2rem; }
  .brand-note { display: none; }
  .nav { gap: 0.25rem 1rem; font-size: 0.9rem; }
}

@media print {
  html { font-size: 90%; }
  .actions-bar, .report-head .hint, #copy-message, .nav, .help, .remove { display: none; }
  .action { break-inside: avoid; }
  .foot { background: none; border-top: 1px solid var(--rule); }
  .foot p { color: var(--muted); }
}
