/* PRISM AI — ai.sbprism.com
   One stylesheet for every hub page. No framework, no icon font, no inline styles (the CSP
   forbids them). Light is the default; dark follows the OS. */

@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --ink: #1a1a2e;
  --ink-2: #2b2b44;
  --paper: #f7f6f2;
  --paper-2: #efede6;
  --card: #ffffff;
  --text: #1a1a2e;
  --muted: #5c5c6f;
  --faint: #8d8d9c;
  --line: rgba(26, 26, 46, 0.12);
  --line-strong: rgba(26, 26, 46, 0.28);
  --red: #cc0000;
  --red-text: #b30000;
  --red-soft: #fbe9e7;
  --ok: #0f6b3a;
  --band-1: #cc0000;
  --band-2: #de3b30;
  --band-3: #ec7466;
  --band-4: #f4aa9f;
  --band-5: #f9d9d3;
  --hero-bg: #1a1a2e;
  --hero-text: #f7f6f2;
  --hero-muted: #b9b8c8;
  --focus: #cc0000;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f0f1c;
    --paper-2: #16162a;
    --card: #1a1a2e;
    --text: #f1f0ec;
    --muted: #b1b0c2;
    --faint: #85849a;
    --line: rgba(241, 240, 236, 0.12);
    --line-strong: rgba(241, 240, 236, 0.3);
    --red-text: #ff6b62;
    --red-soft: #3a1418;
    --ok: #5fd39a;
    --hero-bg: #1a1a2e;
    --focus: #ff6b62;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "tnum" 1;
}

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10;
}
.skip:focus { left: 16px; }

/* ---------- top bar ---------- */

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 22px;
}
.bar--on-dark { color: var(--hero-text); }

.mark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.mark b { font-size: 21px; font-weight: 800; letter-spacing: 0.02em; }
.mark i { width: 8px; height: 8px; background: var(--red); display: block; }
.mark span {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint); margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--line-strong);
}
.bar--on-dark .mark span { color: var(--hero-muted); border-left-color: rgba(247, 246, 242, 0.25); }

.bar nav { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 600; }
.bar nav a { text-decoration: none; }
.bar nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.who { color: var(--muted); font-weight: 500; }
.bar--on-dark .who { color: var(--hero-muted); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 700; font-size: 15px; line-height: 1;
  padding: 16px 22px; border-radius: 2px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: #a80000; }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: rgba(127, 127, 127, 0.12); }
.btn--small { padding: 10px 14px; font-size: 13px; }
.btn--link { background: none; border: none; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }

/* Google's sign-in guidelines keep the "G" in its own colours on white. */
.g-tile { display: inline-grid; place-items: center; width: 26px; height: 26px; background: #fff; border-radius: 2px; margin: -6px 2px -6px -8px; }
.g { width: 18px; height: 18px; flex: none; }

/* ---------- hero ---------- */

.hero { background: var(--hero-bg); color: var(--hero-text); overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 32px;
  align-items: center; padding-block: 56px 96px;
}
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--hero-muted); margin: 0 0 22px;
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 84px); line-height: 0.98; letter-spacing: -0.035em;
  font-weight: 800; margin: 0 0 28px; max-width: 12ch;
}
.hero h1 em { font-style: normal; color: #ff5a4f; }
.hero__lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--hero-muted); max-width: 34em; margin: 0 0 36px; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; }
.hero__note { font-size: 13.5px; color: var(--hero-muted); max-width: 26em; margin: 0; }

.prism { width: 100%; height: auto; display: block; }
/* On wide screens the bands run off the right edge of the window instead of stopping at the grid. */
@media (min-width: 861px) {
  .hero__art { margin-right: min(0px, calc((1180px - 100vw) / 2)); }
}
.prism .beam { stroke: var(--hero-text); stroke-width: 2.5; stroke-dasharray: 520; stroke-dashoffset: 520; animation: beam 1.1s 0.2s ease-out forwards; }
.prism .glass { fill: rgba(247, 246, 242, 0.04); stroke: var(--hero-text); stroke-width: 2; }
.prism .glass-inner { fill: none; stroke: rgba(247, 246, 242, 0.18); stroke-width: 1; }
.prism .band { transform-box: view-box; transform-origin: 392px 262px; transform: scaleX(0); animation: fan 0.9s cubic-bezier(0.2, 0.7, 0.1, 1) forwards; }
.prism .b1 { fill: var(--band-1); animation-delay: 1.05s; }
.prism .b2 { fill: var(--band-2); animation-delay: 1.13s; }
.prism .b3 { fill: var(--band-3); animation-delay: 1.21s; }
.prism .b4 { fill: var(--band-4); animation-delay: 1.29s; }
.prism .b5 { fill: var(--band-5); animation-delay: 1.37s; }
.prism .label--end { text-anchor: end; }
.prism .label { fill: var(--hero-muted); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0; animation: show 0.6s 1.9s forwards; }

@keyframes beam { to { stroke-dashoffset: 0; } }
@keyframes fan { to { transform: scaleX(1); } }
@keyframes show { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .prism .beam, .prism .band, .prism .label { animation: none; stroke-dashoffset: 0; transform: none; opacity: 1; }
}

/* ---------- sections ---------- */

.section { padding-block: 96px; }
.section + .section { border-top: 1px solid var(--line); }
.kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red-text); margin: 0 0 14px;
}
.section h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 18px; }

/* Live tool: offset number column, wide copy column, facts as a ruled list */
.tool-feature { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 40px; }
.tool-feature__num { font-size: 96px; font-weight: 800; line-height: 0.8; color: var(--red-text); letter-spacing: -0.04em; }
.tool-feature h3 { font-size: clamp(32px, 4vw, 56px); line-height: 1; letter-spacing: -0.03em; margin: 0 0 20px; font-weight: 800; }
.tool-feature__summary { font-size: 21px; line-height: 1.45; max-width: 30em; margin: 0 0 18px; font-weight: 600; }
.tool-feature__detail { color: var(--muted); max-width: 38em; margin: 0 0 40px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 0; border-top: 1px solid var(--line-strong); }
.facts div { padding: 18px 24px 0 0; }
.facts dt { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.facts dd { margin: 0; font-weight: 600; }

/* Access rules: heading sticks left, rules run right */
.rules { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; }
.rules__intro p { color: var(--muted); max-width: 26em; }
.rules ol { list-style: none; counter-reset: r; margin: 0; padding: 0; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.rules li:first-child { padding-top: 0; }
.rules li::before { content: counter(r, decimal-leading-zero); font-weight: 800; color: var(--red-text); font-size: 15px; padding-top: 3px; }
.rules h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.rules p { margin: 0; color: var(--muted); }

.next { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 32px; }
.next p:not(.kicker) { color: var(--muted); max-width: 34em; margin: 0; font-size: 18px; }

/* ---------- desk (signed in) ---------- */

.desk-head { padding-block: 40px 56px; border-bottom: 1px solid var(--line); }
.desk-head h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1; letter-spacing: -0.03em; margin: 0 0 14px; font-weight: 800; }
.desk-head p { color: var(--muted); margin: 0; max-width: 40em; }

.toollist { list-style: none; margin: 0; padding: 0; }
.toollist li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 24px; align-items: start; padding: 30px 0; border-bottom: 1px solid var(--line); }
.toollist .n { font-weight: 800; color: var(--red-text); font-size: 15px; padding-top: 10px; }
.toollist .btn { margin-top: 4px; }
.toollist h2 { font-size: 28px; margin: 0 0 6px; letter-spacing: -0.02em; }
.toollist p { margin: 0; color: var(--muted); max-width: 44em; }

.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 64px; padding-block: 56px 96px; }
.side h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin: 0 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 36px; padding: 0; list-style: none; }
.chips li { border: 1px solid var(--line-strong); padding: 6px 12px; font-size: 14px; font-weight: 600; border-radius: 2px; }
.empty { color: var(--muted); padding: 30px 0; border-bottom: 1px solid var(--line); }
.adminlink { display: block; padding: 20px; background: var(--paper-2); text-decoration: none; }
.adminlink b { display: block; font-size: 17px; }
.adminlink span { color: var(--muted); font-size: 14px; }

/* ---------- simple pages (not invited, errors) ---------- */

.solo { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.solo__box { width: min(460px, 100%); }
.solo__box h1 { font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; margin: 34px 0 12px; }
.solo__box p { color: var(--muted); margin: 0 0 24px; }
.solo__box h2 { font-size: 15px; margin: 22px 0 6px; }
.solo__box p a { color: var(--text); }
.solo__box .who-line { font-weight: 700; color: var(--text); word-break: break-all; }
.solo__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- admin ---------- */

.admin h1 { font-size: 40px; letter-spacing: -0.02em; margin: 24px 0 8px; }
.admin > .wrap > p { color: var(--muted); }
.panel { padding-block: 40px; border-top: 1px solid var(--line); }
.panel h2 { font-size: 22px; margin: 0 0 6px; letter-spacing: -0.01em; }
.panel > p { color: var(--muted); margin: 0 0 20px; max-width: 48em; }
.flash { padding: 14px 16px; margin: 20px 0 0; font-weight: 600; border-left: 3px solid var(--ok); background: var(--paper-2); }
.flash--err { border-left-color: var(--red); background: var(--red-soft); }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); background: var(--paper-2); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td .sub { display: block; color: var(--faint); font-size: 12.5px; }
.pill { display: inline-block; padding: 2px 8px; font-size: 12px; font-weight: 700; border: 1px solid var(--line-strong); border-radius: 2px; }
.pill--super { border-color: var(--red); color: var(--red-text); }
.pill--off { color: var(--faint); }
.rowactions { display: flex; gap: 14px; align-items: center; flex-wrap: nowrap; white-space: nowrap; }
.tablewrap + .form { margin-top: 28px; }
.form + .form { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.rowactions form { display: inline-flex; gap: 6px; align-items: center; }

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 28px; max-width: 980px; }
.form .full { grid-column: 1 / -1; }
label, legend { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
fieldset { border: none; margin: 0; padding: 0; }
input[type="text"], input[type="email"], select {
  width: 100%; font: inherit; font-size: 15px; padding: 11px 12px; color: var(--text);
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 2px;
}
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; margin: 0; }
.hint { font-size: 13px; color: var(--faint); margin: 6px 0 0; }
.audit { font-size: 13px; }
.audit td:first-child { white-space: nowrap; color: var(--faint); }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--line); padding-block: 36px 48px; font-size: 13px; color: var(--faint); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; padding-block: 24px 64px; }
  .hero__art { order: -1; max-width: 520px; }
  .tool-feature { grid-template-columns: 1fr; gap: 12px; }
  .tool-feature__num { font-size: 64px; }
  .rules { grid-template-columns: 1fr; gap: 24px; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .section { padding-block: 64px; }
  .toollist li { grid-template-columns: 1fr; gap: 12px; }
  .mark span { display: none; }
}
