/* Panel page. Nothing loads from outside this site. */

/* ET Book, the typeface aifutures.org uses. MIT licensed, see fonts/LICENSE-et-book.txt. */
@font-face {
  font-family: "ET Book"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/et-book-roman-line-figures.woff") format("woff");
}
@font-face {
  font-family: "ET Book"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("fonts/et-book-display-italic-old-style-figures.woff") format("woff");
}
@font-face {
  font-family: "ET Book"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/et-book-bold-line-figures.woff") format("woff");
}

:root {
  color-scheme: light dark;
  --paper: #ffffff; --surface: #ffffff;
  --ink: #222222; --ink-2: #4a4a46; --ink-3: #6b6b66;
  --rule: rgba(17,17,17,0.12); --rule-strong: rgba(17,17,17,0.24);
  --accent: #28507d; --accent-hover: #1c3a5c; --accent-underline: rgba(40,80,125,0.4);
  --on-accent: #ffffff;
  --wash: rgba(40,80,125,0.06); --selection: rgba(40,80,125,0.16);
  --bg-warning: #faeeda; --text-warning: #854f0b;
  --serif: "ET Book", Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: max(16px, 5vw);
  --measure: 700px;
  --radius: 4px;
}
/* Dark palette: follows the device unless the theme switch says otherwise.
   It appears twice below; keep both copies the same. */
@media (prefers-color-scheme: dark) {
  :root:not(:has(#theme-light:checked)) {
    --paper: #121519; --surface: rgba(255,255,255,0.03);
    --ink: #ece9e0; --ink-2: #bdbab1; --ink-3: #95928a;
    --rule: rgba(236,233,224,0.12); --rule-strong: rgba(236,233,224,0.26);
    --accent: #9dbfe4; --accent-hover: #c4daf1; --accent-underline: rgba(157,191,228,0.45);
    --on-accent: #0f1f33;
    --wash: rgba(157,191,228,0.07); --selection: rgba(157,191,228,0.22);
    --bg-warning: #633806; --text-warning: #fac775;
  }
}
:root:has(#theme-dark:checked) {
  color-scheme: dark;
  --paper: #121519; --surface: rgba(255,255,255,0.03);
  --ink: #ece9e0; --ink-2: #bdbab1; --ink-3: #95928a;
  --rule: rgba(236,233,224,0.12); --rule-strong: rgba(236,233,224,0.26);
  --accent: #9dbfe4; --accent-hover: #c4daf1; --accent-underline: rgba(157,191,228,0.45);
  --on-accent: #0f1f33;
  --wash: rgba(157,191,228,0.07); --selection: rgba(157,191,228,0.22);
  --bg-warning: #633806; --text-warning: #fac775;
}
:root:has(#theme-light:checked) { color-scheme: light; }

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.45;
  font-variant-numeric: oldstyle-nums;
  /* Thinner strokes on macOS, closer to the light ET Book look */
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
::selection { background: var(--selection); }

/* Left-aligned reading column, as on aifutures.org */
.wrap { padding: 0 var(--gutter); }
main section > *, .site-footer .wrap > * { max-width: var(--measure); }

h1, h2, h3 { font-weight: 400; }
h1 {
  margin: 0 0 0.3em;
  font-size: clamp(3rem, 7vw + 1.5rem, 5.625rem); line-height: 1; letter-spacing: -0.025em;
}
h2 { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.0625rem); line-height: 1.1; margin: 0 0 0.55em; }
/* Small sans labels, like "Share forecast" on aifutures.org */
h3, .label {
  font: 500 0.8125rem/1.3 var(--sans);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-2);
}
h3 { margin: 2em 0 0.9em; }
p { margin: 0 0 0.85em; }
ul, ol { margin: 0 0 0.85em; padding-left: 1.3em; }
li { margin-bottom: 0.5em; padding-left: 0.2em; }
strong { font-weight: 700; }

a {
  color: var(--accent);
  text-decoration-line: underline; text-decoration-thickness: 1px;
  text-decoration-color: var(--accent-underline); text-underline-offset: 0.18em;
}
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* Skip link */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  padding: 10px 14px; background: var(--paper); color: var(--ink);
  font: 500 0.875rem var(--sans);
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
}
.skip-link:focus { top: 8px; }

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

/* Theme switch: plain radio buttons, no script. Resets to Auto on each visit. */
.theme-bar { display: flex; justify-content: flex-end; padding-top: 12px; }
.theme-switch {
  display: flex; margin: 0; padding: 2px; min-inline-size: 0;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
}
.theme-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.theme-switch label {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px;
  font: 500 0.6875rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); border-radius: 2px; cursor: pointer;
}
.theme-switch label:hover { color: var(--ink); }
.theme-switch input:checked + label { color: var(--accent); background: var(--wash); }
.theme-switch input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Browsers that can't read the switch still follow the device */
@supports not selector(:has(*)) { .theme-bar { display: none; } }

/* Footer */
.site-footer {
  margin-top: 3rem; padding: 0.75rem 0 2.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85em; font-style: italic; color: var(--ink-3);
}
.site-footer p { margin: 0; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); }

/* Sections: whitespace, not rules */
main section { padding: 2.75rem 0 0; }

/* Hero */
.hero { padding-top: clamp(0.75rem, 2vw, 1.5rem); }
.lead { font-size: 1.35em; font-style: italic; line-height: 1.3; color: var(--ink-2); margin-bottom: 1em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }

.steps li::marker { color: var(--accent); }
.question {
  margin: 0 0 1.25em; padding: 0.1em 0 0.1em 1.1em;
  font-size: 1.12em; font-style: italic;
  border-left: 2px solid var(--accent);
}
.question p:last-child { margin-bottom: 0; }
.notes {
  margin: 1.25em 0 0; padding: 0.9em 1.1em 0.9em 2.2em;
  font-size: 0.92em;
  background: var(--wash);
  border-radius: var(--radius);
}
.notes li:last-child { margin-bottom: 0; }

/* Status note in "Join the panel" */
.status-card {
  margin-top: 1.5em; padding: 1.1em 1.25em;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
}

/* Where the owner's copy goes */
.placeholder-inline {
  padding: 0 4px;
  background: var(--bg-warning); color: var(--text-warning);
  border: 1px dashed currentColor; border-radius: var(--radius);
}

/* Buttons and hints */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 20px;
  font: 500 0.8125rem/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  text-align: center; text-decoration: none;
  color: var(--ink); background: transparent;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  cursor: pointer;
}
.button:hover { color: var(--ink); background: var(--wash); border-color: var(--accent); }
.button.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.hint { margin: 0.4em 0 0; font-size: 0.85em; font-style: italic; color: var(--ink-3); }

/* Common questions */
#faq { padding-bottom: 1rem; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item:first-of-type { border-top: 1px solid var(--rule); }
.faq-item summary { padding: 0.6em 0; cursor: pointer; }
.faq-item summary::marker { color: var(--accent); }
.faq-item summary:hover { color: var(--accent); }
.faq-item[open] summary { color: var(--accent); }
.faq-item > p, .faq-item > ul { margin: 0 0 1em; }
