/* The app's exam-side visual language, on the static pages.
 *
 * WHY A SEPARATE FILE. The calculator pages are the only place on the
 * marketing site that is a TOOL rather than a document, and a tool that does
 * not look like the product is a broken promise before anybody signs up. The
 * rest of the site keeps its own layout; this brings the things that behave
 * like the app to look like the app.
 *
 * EVERY VALUE BELOW IS A TOKEN, AND THAT IS THE POINT. A rebrand is coming
 * with the new domain, and when it does this is a dozen custom properties to
 * change in one file — not three pages to hunt through. Nothing downstream
 * hard-codes a colour, a radius or a size.
 *
 * The tokens mirror lib/core/theme/app_pro_theme.dart exactly, so the two
 * sides cannot drift by accident:
 *   primary #4F46E5 · surface #FFFFFF · text #0F172A · muted #64748B
 *   border #E2E8F0 · warning #F59E0B · radius 8 / 12
 *
 * FONT. The app renders Inter. This page cannot: the site ships
 * `font-src 'self'` and no webfont is bundled, so loading Inter from a CDN
 * would either be blocked or force us to weaken the CSP for a typeface. The
 * system stack below is the closest thing that costs nothing and cannot fail
 * — and it is what the rest of the site already uses, so the pages match each
 * other today and match the app the day a font is self-hosted.
 */

.pro {
  /* Light — the complete palette, defined on the bare selector so the
     un-stamped default (system theme) always resolves. */
  --pro-primary: #4F46E5;
  --pro-primary-ink: #FFFFFF;
  --pro-primary-wash: rgba(79, 70, 229, .07);
  --pro-bg: #F8FAFC;
  --pro-surface: #FFFFFF;
  --pro-surface-2: #F1F5F9;
  --pro-text: #0F172A;
  --pro-muted: #64748B;
  --pro-border: #E2E8F0;
  --pro-warning: #F59E0B;
  --pro-radius-sm: 8px;
  --pro-radius-md: 12px;
  --pro-sans: var(--sans);
}

/* System dark, only when the reader has not chosen light explicitly. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pro {
    --pro-primary: #6366F1;
    --pro-primary-ink: #0B1120;
    --pro-primary-wash: rgba(99, 102, 241, .14);
    --pro-bg: #0B1120;
    --pro-surface: #1E293B;
    --pro-surface-2: #0F172A;
    --pro-text: #F1F5F9;
    --pro-muted: #94A3B8;
    --pro-border: #334155;
  }
}

/* An explicit dark choice wins in the other direction too. */
:root[data-theme="dark"] .pro {
  --pro-primary: #6366F1;
  --pro-primary-ink: #0B1120;
  --pro-primary-wash: rgba(99, 102, 241, .14);
  --pro-bg: #0B1120;
  --pro-surface: #1E293B;
  --pro-surface-2: #0F172A;
  --pro-text: #F1F5F9;
  --pro-muted: #94A3B8;
  --pro-border: #334155;
}

/* ---------------------------------------------------------------------------
   The tool itself.
   --------------------------------------------------------------------------- */

.pro {
  font-family: var(--pro-sans);
  color: var(--pro-text);
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

/* One card, one job — matching the app's card: surface, hairline border, no
   shadow. The app deliberately does not float its cards. */
.pro-card {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius-md);
  padding: 8px 20px;
}

.pro-field {
  display: grid;
  grid-template-columns: 1fr 108px;
  gap: 4px 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--pro-border);
}
.pro-field:last-child { border-bottom: 0; }

/* 16px label, 600 — the app's titleMedium. */
.pro-field label {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  grid-column: 1;
}

/* 15px, 400, 1.55 — the app's bodyMedium, used for every helper line. */
.pro-hint {
  grid-column: 1;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--pro-muted);
  margin: 0;
}

.pro-field input {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 100%;
  padding: 12px 14px;
  font: 600 17px/1.2 var(--pro-sans);
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--pro-text);
  background: var(--pro-surface-2);
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius-sm);
  -moz-appearance: textfield;
  appearance: textfield;
}
.pro-field input::-webkit-outer-spin-button,
.pro-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pro-field input:focus-visible {
  outline: 2px solid var(--pro-primary);
  outline-offset: 2px;
  border-color: var(--pro-primary);
}

/* The live band beside each raw score — the same primary the app uses to mark
   a derived value rather than an entered one. */
.pro-derived {
  grid-column: 2;
  margin: 6px 0 0;
  font: 600 14px/1 var(--pro-sans);
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--pro-primary);
}

/* The result. In the app this is a primary-washed panel with a primary border
   and the number at display weight — it reads as an ANSWER, not another row. */
.pro-result {
  margin-top: 20px;
  padding: 24px;
  background: var(--pro-primary-wash);
  border: 1px solid var(--pro-primary);
  border-radius: var(--pro-radius-md);
}
.pro-result-label {
  margin: 0;
  font: 600 14px/1 var(--pro-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pro-muted);
}
.pro-result-value {
  margin: 8px 0 12px;
  font: 700 40px/1.1 var(--pro-sans);
  font-variant-numeric: tabular-nums;
  color: var(--pro-primary);
}
.pro-working {
  margin: 0;
  font: 400 15px/1.55 var(--pro-sans);
  color: var(--pro-text);
}
.pro-note {
  margin: 16px 0 0;
  font: 400 15px/1.55 var(--pro-sans);
  color: var(--pro-muted);
}

/* Tables read as data, so they get tabular figures and a hairline rhythm
   rather than zebra stripes. */
.pro-table-wrap { overflow-x: auto; margin: 12px 0 32px; }
.pro-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-family: var(--pro-sans);
}
.pro-table th {
  text-align: left;
  padding: 10px 14px;
  font: 600 13px/1 var(--pro-sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pro-muted);
  border-bottom: 1px solid var(--pro-border);
}
.pro-table td {
  padding: 11px 14px;
  font-size: 15px;
  border-bottom: 1px solid var(--pro-border);
}
.pro-table tbody tr:last-child td { border-bottom: 0; }

/* 22px, 700 — the app's headlineMedium, for the prose sections below. */
.pro h2 {
  font: 700 22px/1.25 var(--pro-sans);
  margin: 36px 0 10px;
  color: var(--pro-text);
}
.pro p, .pro li {
  font: 400 16px/1.6 var(--pro-sans);
  color: var(--pro-text);
}
.pro p { margin: 0 0 14px; }
.pro a { color: var(--pro-primary); }

/* The one call to action. Solid primary, small radius — the app's filled
   button, not the marketing site's pill. */
.pro-cta {
  display: inline-block;
  padding: 13px 22px;
  font: 600 15px/1 var(--pro-sans);
  color: var(--pro-primary-ink);
  background: var(--pro-primary);
  border-radius: var(--pro-radius-sm);
  text-decoration: none;
}
.pro-cta:hover { text-decoration: none; opacity: .92; }
.pro-cta:focus-visible { outline: 2px solid var(--pro-primary); outline-offset: 3px; }

@media (max-width: 520px) {
  .pro-field { grid-template-columns: 1fr 88px; }
  .pro-result-value { font-size: 34px; }
}
