/* OncoTwin landing page -- no external fonts or resources (privacy by design) */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d2430;
  --muted: #5b6475;
  --line: #e6e2d8;
  --brand: #1f3b57;
  --brand-2: #2e5a82;
  --accent: #e0a800;       /* mobile cancer cells */
  --pink: #d61f7a;         /* irradiation field */
  --radius: 14px;
  --max: 1400px;           /* content width of the sections */
  --max-app: 1440px;       /* the embedded app may be a bit wider */
  --gutter: clamp(16px, 5vw, 80px);  /* side margin, grows with the window */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151c; --surface: #181e27; --text: #e8ebf0; --muted: #9aa4b5; --line: #273041;
    --brand: #8fb8e0; --brand-2: #b5d1ec; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; font-size: 17px; }
a { color: var(--brand-2); }
img, svg { max-width: 100%; }
.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
#app .wrap { max-width: calc(var(--max-app) + 2 * var(--gutter)); }

/* header */
header.site { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.logo { font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; letter-spacing: .2px;
  display: flex; align-items: center; gap: 10px; }
.logo .dot { width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--accent) 0 35%, #d62728 36% 55%, #000 56% 100%); }
nav.main { display: flex; gap: 20px; font-size: 15px; }
nav.main a { color: var(--muted); text-decoration: none; }
nav.main a:hover { color: var(--text); }
@media (max-width: 640px) { nav.main a:not(.cta) { display: none; } }

.btn { display: inline-block; padding: 11px 20px; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; font-size: 15px; font-family: inherit; cursor: pointer; }
.btn.primary { background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0e1620; } }
.btn.ghost { border-color: var(--line); color: var(--text); }
nav.main a.cta { color: var(--brand-2); font-weight: 600; }

/* hero */
.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 80px); }
.hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.hero svg { width: 100%; max-height: 420px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
.eyebrow { color: var(--brand-2); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
h1 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.1; margin: 10px 0 18px; letter-spacing: -.5px; }
.lead { font-size: clamp(18px, 1.4vw, 21px); color: var(--muted); max-width: 40em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* sections */
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }
h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 14px; letter-spacing: -.3px; }
.intro { color: var(--muted); max-width: 46em; margin-bottom: 30px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 6px 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.step { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .step { color: #0e1620; } }

.model { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.eq { font-family: "Cambria Math", "STIX Two Math", Georgia, serif; font-size: 18px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 10px 0; line-height: 1.8; overflow-wrap: anywhere; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; font-size: 15px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 7px;
  vertical-align: -1px; background: var(--c); border: 1px solid rgba(0,0,0,.15); }

/* app embed */
.app-frame { width: 100%; height: min(88vh, 1100px); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); display: block; }
.app-start { height: auto; min-height: 220px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 24px; text-align: center; color: var(--muted); }
.app-start[hidden], .app-frame[hidden] { display: none; }
.app-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.note { font-size: 14px; color: var(--muted); }
.notice { border-left: 4px solid var(--accent); background: var(--surface); padding: 14px 18px; border-radius: 8px;
  margin-top: 18px; font-size: 15px; color: var(--muted); }

/* legal pages */
.legal { max-width: 780px; padding: 48px 16px 72px; margin: 0 auto; }
.legal h1 { font-size: 36px; }
.legal h2 { font-size: 22px; margin-top: 34px; }
.placeholder { background: #fff3c4; color: #5a4600; padding: 0 4px; border-radius: 4px; }

footer.site { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
footer.site .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer.site a { color: var(--muted); margin-left: 18px; }
footer.site a:first-child { margin-left: 0; }
