/* AccessPass palette, page rules and display modes. base.css holds the shared layout.
   The display modes are set as data attributes on the root element by js/hub-page.js,
   from the passport's display settings. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f1efe8;
  --ink: #1c2330;
  --ink-soft: #4a5565;
  --line: #d9d5ca;
  --brand: #1f4e79;
  --accent: #b4541a;
}

/* Page rules */
.hero .tags { margin-top: 1rem; }
.preset-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; margin-bottom: 0.5rem; }
.preset { text-align: left; display: grid; gap: 0.15rem; font-weight: 400; align-content: start; }
.preset strong { font-size: 1.05em; }

.need-row { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; align-items: start; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.need-row:last-child { border-bottom: 0; }
.need-row .share { font-size: 0.9em; color: var(--ink-soft); white-space: nowrap; }
.need-row .share input:disabled + span { opacity: 0.55; }

.share-yes { border-top: 5px solid var(--ok); }
.share-no { border-top: 5px solid var(--ink-soft); }
#shared-list li, #held-list li { line-height: 1.5; }

.display-controls { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.timeline { list-style: none; margin: 0.5rem 0 1rem; padding: 0; border-left: 4px solid var(--brand); }
.timeline .step { padding: 0.6rem 0 0.6rem 1rem; border-bottom: 1px solid var(--line); }
.timeline .step:last-child { border-bottom: 0; }
.timeline .step.unconfirmed { border-left: 4px dashed var(--unknown); margin-left: -4px; }
.timeline .step.avoid { opacity: 0.85; }
.step-head { display: flex; flex-wrap: wrap; gap: 0.3rem 0.7rem; align-items: baseline; }
.step-time { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 3.2rem; }
.reference { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; letter-spacing: 0.04em; }

/* ----- Display modes ----- */

/* High contrast: black on white, solid borders, no tinted backgrounds. */
:root[data-contrast="high"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --ink: #000000;
  --ink-soft: #000000;
  --line: #000000;
  --brand: #000000;
  --brand-ink: #ffffff;
  --ok: #000000; --ok-bg: #ffffff;
  --warn: #000000; --warn-bg: #ffffff;
  --bad: #000000; --bad-bg: #ffffff;
  --unknown: #000000; --unknown-bg: #ffffff;
  --focus: #0033cc;
  --shadow: none;
}
:root[data-contrast="high"] .panel,
:root[data-contrast="high"] .card,
:root[data-contrast="high"] .notice { border: 2px solid #000; }
:root[data-contrast="high"] .tag { border: 2px solid #000; font-weight: 700; }
:root[data-contrast="high"] a { text-decoration-thickness: 2px; }
:root[data-contrast="high"] :focus-visible { outline-width: 4px; }

/* Calm colours: low saturation, no shadows, no gradients. High contrast wins if both are on. */
:root[data-palette="calm"]:not([data-contrast="high"]) {
  --bg: #eeeeea;
  --surface: #f6f6f2;
  --surface-2: #e6e6e0;
  --ink: #2b2f33;
  --ink-soft: #4d5358;
  --line: #cfcfc6;
  --brand: #46586a;
  --ok: #3f5c4b; --ok-bg: #e2e8e1;
  --warn: #6b5630; --warn-bg: #ebe6d8;
  --bad: #6e4744; --bad-bg: #ecdfdc;
  --unknown: #4f5270; --unknown-bg: #e3e3ea;
  --focus: #46586a;
  --shadow: none;
}

/* Text size scales everything that uses em or rem. */
:root[data-text-size="large"] { font-size: 118%; }
:root[data-text-size="larger"] { font-size: 138%; }

/* Reduced motion, whatever the system setting says. */
:root[data-motion="reduced"] { scroll-behavior: auto; }
:root[data-motion="reduced"] *,
:root[data-motion="reduced"] *::before,
:root[data-motion="reduced"] *::after { animation: none !important; transition: none !important; }

/* Simple layout: one column, more space, fewer things at once. */
:root[data-layout="simple"] .wrap { max-width: 44rem; }
:root[data-layout="simple"] .grid.two,
:root[data-layout="simple"] .grid.three,
:root[data-layout="simple"] .assistant-panels,
:root[data-layout="simple"] .display-controls { grid-template-columns: 1fr; }
:root[data-layout="simple"] main section { padding: 2.25rem 0; }
:root[data-layout="simple"] .decorative,
:root[data-layout="simple"] .demo-banner { display: none; }
:root[data-layout="simple"] body { line-height: 1.75; }
:root[data-layout="simple"] .need-row { grid-template-columns: 1fr; }
