/* Colorful Radiology - the public pages, in the apps' own look: the Rust window's
   slate grounds and the action palette both apps derive in src/mvp_rad/ui_theme.py
   (each hue's edge, full fill, quiet tint and label ink). Dark only, as the apps are. */

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* the apps' red is Copy's and Restart's (COPY_RED: #dc3545, pressed #c82333) over the
     cancel hue's tint and label; the rest are ui_theme.harmonized_action_fill_pair /
     quiet_action_palette / action_edge for the run (47), load (134.9), voice (215.8) and
     capture (261.3) hues */
  --red-edge: #dc3545;
  --red-fill: #c82333;
  --red-bright: #dc3545;
  --red-quiet: #5b181f;
  --red-label: #f27b87;
  --green-edge: #1daf41;
  --green-fill: #12ba3c;
  --green-bright: #16da46;
  --green-quiet: #185b29;
  --green-label: #6af08c;
  --gold-edge: #af901d;
  --gold-fill: #ba9512;
  --gold-bright: #dab016;
  --gold-quiet: #5b4c18;
  --gold-label: #f0d36a;
  --blue-edge: #3076dd;
  --blue-fill: #1256ba;
  --blue-bright: #1665da;
  --blue-quiet: #18335b;
  --blue-label: #70a4f1;
  --violet-edge: #8c5ce4;
  --violet-fill: #4e12ba;
  --violet-bright: #5b16da;
  --violet-quiet: #30185b;
  --violet-label: #a981f3;
  /* the Rust window's BACKGROUND, BOARD and PAGE */
  --ground: #1a2027;
  --surface: #20272f;
  --raised: #27313a;
  --ink: #ffffff;
  --body: #dfe3e8;
  --ink-2: #b0b0b0;
  --ink-3: #8b949e;
  --rule: #2f3944;
  --link: var(--blue-label);
  --link-hover: #a3c4f6;
  /* the apps' call to action (Load exam): full green with the navy label */
  --cta: var(--green-fill);
  --cta-hover: var(--green-bright);
  --cta-ink: #080b1a;
  --caution-edge: var(--gold-edge);
  --caution-quiet: #373523;
  --focus: var(--blue-label);
  --display: Bahnschrift, 'DIN Alternate', 'D-DIN', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --text: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --read: 'Sitka Text', Charter, 'Bitstream Charter', 'Iowan Old Style', Cambria, Georgia, serif;
  --page: 74rem;
  --measure: 44rem;
  --gutter: clamp(16px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.6;
}

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.frame {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */

.band { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: 4px; }
.band i { display: block; }
.band i:nth-child(1) { background: var(--red-edge); }
.band i:nth-child(2) { background: var(--gold-edge); }
.band i:nth-child(3) { background: var(--green-edge); }
.band i:nth-child(4) { background: var(--blue-edge); }
.band i:nth-child(5) { background: var(--violet-edge); }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.125rem;
  line-height: 1;
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--ink); }
.brand img { display: block; width: 32px; height: 32px; }
.brand .word span { font-weight: 700; }

.site-nav { display: flex; gap: 28px; font-size: 0.95rem; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--blue-edge); }

/* Main */

.site-main { flex: 1; }

.display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Home */

.hero {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
  padding-block: clamp(40px, 8vh, 88px) clamp(48px, 8vh, 88px);
}

.hero h1 {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.1;
}

/* Five step wedges, one per action hue, each the apps' own four steps of it:
   the quiet tint a button rests on, its full fill, the fill when pressed, the
   label ink. */
.wedges {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(4px, 0.6vw, 8px);
  height: clamp(32px, 4vw, 56px);
}
.wedges span { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wedges i {
  display: block;
  transform-origin: 50% 100%;
  animation: step-in 480ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc((var(--g) * 4 + var(--s)) * 35ms);
}
.wedges span:nth-child(1) { --g: 0; --q: var(--red-quiet); --f: var(--red-fill); --b: var(--red-bright); --l: var(--red-label); }
.wedges span:nth-child(2) { --g: 1; --q: var(--gold-quiet); --f: var(--gold-fill); --b: var(--gold-bright); --l: var(--gold-label); }
.wedges span:nth-child(3) { --g: 2; --q: var(--green-quiet); --f: var(--green-fill); --b: var(--green-bright); --l: var(--green-label); }
.wedges span:nth-child(4) { --g: 3; --q: var(--blue-quiet); --f: var(--blue-fill); --b: var(--blue-bright); --l: var(--blue-label); }
.wedges span:nth-child(5) { --g: 4; --q: var(--violet-quiet); --f: var(--violet-fill); --b: var(--violet-bright); --l: var(--violet-label); }
.wedges i:nth-child(1) { background: var(--q); --s: 0; }
.wedges i:nth-child(2) { background: var(--f); --s: 1; }
.wedges i:nth-child(3) { background: var(--b); --s: 2; }
.wedges i:nth-child(4) { background: var(--l); --s: 3; }

@keyframes step-in {
  from { transform: scaleY(0.15); }
  to { transform: scaleY(1); }
}

.hero-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: start;
}

.lead {
  margin: 0 0 14px;
  max-width: 44ch;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.5;
}

.note { margin: 0; color: var(--ink-2); }

.actions { display: grid; gap: 18px; justify-items: start; }
.actions p { margin: 0; }

/* Buttons as the apps draw them: the call to action in full green, any other
   action in its hue's quiet tint with the hue's label and edge. */
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 22px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--cta);
  color: var(--cta-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--cta-hover); color: var(--cta-ink); }
.button.quiet { background: var(--blue-quiet); border-color: var(--blue-edge); color: var(--blue-label); }
.button.quiet:hover { background: #1a3968; color: var(--blue-label); }

/* Documents: Terms, Privacy */

.doc-head {
  max-width: var(--measure);
  padding-block: clamp(36px, 6vh, 72px) 32px;
}
.doc-head h1 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  line-height: 1;
}
.doc-date {
  margin: 0 0 28px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.conspicuous {
  margin: 0;
  padding: 16px 20px;
  border-left: 3px solid var(--caution-edge);
  background: var(--caution-quiet);
  line-height: 1.6;
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  padding-bottom: clamp(64px, 10vh, 112px);
}

.contents h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-2);
}
.contents ol {
  margin: 0;
  padding-left: 2em;
  columns: 2 14rem;
  column-gap: 32px;
  font-size: 0.92rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
.contents li { break-inside: avoid; padding-block: 2px; }
.contents li::marker { font-weight: 600; }
.contents li:nth-child(5n+1)::marker { color: var(--red-label); }
.contents li:nth-child(5n+2)::marker { color: var(--gold-label); }
.contents li:nth-child(5n+3)::marker { color: var(--green-label); }
.contents li:nth-child(5n+4)::marker { color: var(--blue-label); }
.contents li:nth-child(5n+5)::marker { color: var(--violet-label); }
.contents a { color: var(--ink-2); text-decoration: none; }
.contents a:hover { color: var(--ink); text-decoration: underline; }

@media (min-width: 1100px) {
  .doc-layout {
    grid-template-columns: 15rem minmax(0, var(--measure));
    gap: 72px;
  }
  .contents {
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }
  .contents ol { columns: 1; }
}

.doc {
  color: var(--body);
  font-family: var(--read);
  font-size: 1.0625rem;
  line-height: 1.7;
}
.doc section { scroll-margin-top: 24px; }
.doc section + section { margin-top: 44px; }
.doc h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
}
.doc h2 .num {
  display: inline-block;
  min-width: 2.1em;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 1100px) {
  .doc h2 .num { margin-left: -2.1em; }
}
.doc section:nth-child(5n+1) .num { color: var(--red-label); }
.doc section:nth-child(5n+2) .num { color: var(--gold-label); }
.doc section:nth-child(5n+3) .num { color: var(--green-label); }
.doc section:nth-child(5n+4) .num { color: var(--blue-label); }
.doc section:nth-child(5n+5) .num { color: var(--violet-label); }
.doc p { margin: 0 0 14px; }
.doc p:last-child { margin-bottom: 0; }
.doc ul { margin: 0 0 14px; padding-left: 1.4em; }
.doc li + li { margin-top: 8px; }
.doc .caps {
  font-family: var(--text);
  font-size: 0.9rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
}
.doc p.caps {
  padding: 16px 20px;
  border-left: 3px solid var(--caution-edge);
  background: var(--caution-quiet);
  color: var(--ink);
}

.table-wrap { overflow-x: auto; margin: 0 0 14px; }
.doc table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-family: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
}
.doc th, .doc td {
  padding: 12px 16px 12px 0;
  border-top: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.doc th { font-weight: 600; border-top: 0; color: var(--ink-2); }
.doc td:first-child { font-weight: 600; color: var(--ink); }

/* Forms and short pages */

.page-head {
  max-width: var(--measure);
  padding-block: clamp(36px, 7vh, 80px) 28px;
}
.page-head h1 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  line-height: 1;
}
.page-head p { margin: 0; color: var(--ink-2); font-size: 1.05rem; }
.page-action { margin: 0 0 clamp(64px, 10vh, 112px); }

.panel {
  max-width: 34rem;
  margin-bottom: clamp(64px, 10vh, 112px);
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
}
.panel > :first-child { margin-top: 0; }
.panel p { color: var(--ink-2); font-size: 0.95rem; }
.panel p:last-child { margin-bottom: 0; }
.panel .button { width: 100%; justify-content: center; margin-top: 20px; }
.panel .steps {
  margin: 24px 0 0;
  padding: 20px 0 0 1.2em;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.95rem;
}
.panel .steps li + li { margin-top: 10px; }

.field-label { display: block; margin-bottom: 8px; font-weight: 600; }
.key-input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--ground);
  color: var(--ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.key-input:focus { border-color: var(--blue-edge); }
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
}
.check input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--green-fill); }
.form-message { min-height: 1.6em; margin: 14px 0 0; }

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
  padding-block: 24px 36px;
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: 0.875rem;
}
.site-footer p { margin: 0; line-height: 1.6; }
.site-footer a { color: var(--ink-2); }
.site-footer .disclaimer { flex-basis: 100%; max-width: var(--measure); }

@media (max-width: 760px) {
  .hero-detail { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .wedges i { animation: none; }
}

/* The download and privacy pages */

.doc-single { max-width: var(--measure); padding-bottom: clamp(64px, 10vh, 112px); }
.doc-single section + section { margin-top: 36px; }

.content {
  display: grid;
  gap: clamp(40px, 6vh, 64px);
  max-width: 52rem;
  padding-bottom: clamp(64px, 10vh, 112px);
}
.content h2 { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.2; }
.content .sub { margin: 0 0 20px; color: var(--ink-2); }
.content h3 { margin: 0 0 8px; font-size: 1.05rem; }
.get-it { display: grid; gap: 14px; justify-items: start; }
.get-it p { margin: 0; }
.small { font-size: 0.875rem; color: var(--ink-3); }

.pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 16px;
}
.pair > div {
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
}
.pair .is h3 { color: var(--green-label); }
.pair .isnot h3 { color: var(--red-label); }
.pair ul { margin: 0; padding-left: 1.2em; color: var(--body); line-height: 1.7; }
.pair-note { margin: 20px 0 0; font-size: 0.95rem; }

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  gap: 0 28px;
  margin: 0;
}
.specs div { padding: 12px 0; border-top: 1px solid var(--rule); }
.specs dt { color: var(--ink-3); font-size: 0.875rem; }
.specs dd { margin: 4px 0 0; }
.get-again { margin: 24px 0 0; }

.activation {
  counter-reset: step;
  list-style: none;
  display: grid;
  gap: 18px;
  margin: 0 0 20px;
  padding: 0;
}
.activation li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 14px;
}
.activation li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--blue-edge);
  border-radius: 50%;
  background: var(--blue-quiet);
  color: var(--blue-label);
  font-weight: 600;
}
.activation li > * { grid-column: 2; }
.activation h3 { margin-top: 6px; }
.activation p { margin: 0; color: var(--ink-2); }
.help-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

.site-footer div.disclaimer { color: var(--ink-3); }
.site-footer .disclaimer-title { margin: 0 0 6px; color: var(--gold-label); font-weight: 600; }
