/* The front door, plain like the app (owner, 2026-10-05: "simple, like Grok; light mode white"): a white page, one
   centred column, ink on paper. Dark is the same page inverted. */
:root {
  --bg: #ffffff;
  --ink: #141414;
  --ink-2: #474747;
  --muted: #8a8a8a;
  --line: #ececec;
  --button: #141414;
  --button-ink: #ffffff;
  --coral: #d9583f;
  --error: #c0352b;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --brand: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --ink: #f2f2f2; --ink-2: #c2c2c2; --muted: #8c8c8c; --line: #242424;
    --button: #f2f2f2; --button-ink: #000000; --coral: #f0846c; --error: #f28b7d;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

.bar { width: min(1180px, calc(100% - 32px)); height: 64px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.brand { font: 800 22px/1 var(--brand); letter-spacing: -.04em; }
.brand small { margin-left: 5px; font: 700 10px/1 var(--sans); letter-spacing: .02em; text-transform: uppercase; color: var(--muted); vertical-align: middle; }
.brand::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 3px; border-radius: 50%; background: var(--coral); vertical-align: 2px; }
.bar-right { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.who { color: var(--ink-2); font-weight: 600; max-width: min(36vw, 280px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link { color: var(--muted); text-underline-offset: 3px; }
.link:hover { color: var(--ink); }

.gate { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px 14vh; }
.gate section { width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; }
.gate h1 { margin: 0; font-size: clamp(34px, 6vw, 52px); font-weight: 650; line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }
.lede { margin: 16px 0 0; max-width: 46ch; color: var(--ink-2); font-size: clamp(16px, 2vw, 18px); text-wrap: balance; }
.note { margin: 14px 0 0; color: var(--muted); font-size: 13.5px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; margin-top: 28px; padding: 11px 28px; border: 0; border-radius: 999px; background: var(--button); color: var(--button-ink); font-weight: 600; cursor: pointer; text-decoration: none; transition: opacity .15s ease; }
.button:hover:not(:disabled) { opacity: .86; }
.button:disabled { opacity: .5; cursor: default; }
.error { color: var(--error) !important; }

.spinner { width: 36px; height: 36px; margin-bottom: 26px; border: 2.5px solid var(--line); border-top-color: var(--ink); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .spinner { animation: spin .9s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  /* Each state of the door (sign in, starting, failed) settles in as it is shown, as the app moves. */
  section[id^="gate-"]:not([hidden]) { animation: gateIn .32s cubic-bezier(.2, .8, .2, 1); }
  @keyframes gateIn { from { opacity: 0; transform: translateY(8px); } }
}

/* The landing: the pitch on the left, a small live preview of the crew on the right. Plain, flat, no shadows. */
.gate section.landing { width: min(1120px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(28px, 6vw, 80px); align-items: center; text-align: left; }
.landing__copy { display: flex; flex-direction: column; align-items: flex-start; }
.landing h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.02; font-weight: 800; font-family: var(--brand); letter-spacing: -.04em; }
.landing .lede { max-width: 34ch; text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.button--quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.button--small { min-height: 0; margin: 0 0 0 auto; padding: 6px 14px; font-size: 13px; }
.facts { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); font-size: 15px; }
.facts b { color: var(--ink); font-weight: 600; }
.landing__desktop { grid-column: 1 / -1; text-align: center; }
.landing__desktop button.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
/* Each face is a <picture> that shows the still face to anyone who asked for less motion, as the app does (S14-13);
   the wrapper takes no box of its own, so the chips and rows lay out as if the picture were the bare image. */
picture { display: contents; }
.demo { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--bg); text-align: left; }
.demo__top { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 4px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.chip--on { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); font-weight: 600; }
.demo__count { margin-left: auto; font-size: 12px; color: var(--muted); }
.demo__body { display: flex; flex-direction: column; gap: 12px; padding: 20px; font-size: 14.5px; }
.demo p { margin: 0; }
.bubble { align-self: flex-end; max-width: 80%; padding: 9px 14px; border-radius: 18px 18px 6px 18px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.reply { display: flex; gap: 10px; }
.task { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.task b { display: block; font-size: 13.5px; font-weight: 600; }
.task span { font-size: 12.5px; color: var(--muted); }
.task .bar { width: 90px; height: 4px; margin-left: auto; border-radius: 2px; background: var(--line); overflow: hidden; }
.task .bar u { display: block; height: 100%; background: var(--ink); text-decoration: none; }
.task--need { border-color: var(--coral); }
@media (prefers-reduced-motion: no-preference) {
  .step { animation: stepIn .5s cubic-bezier(.2, .8, .2, 1) both; }
  .s2 { animation-delay: .25s; } .s3 { animation-delay: .5s; } .s4 { animation-delay: .7s; } .s5 { animation-delay: .9s; }
  @keyframes stepIn { from { opacity: 0; transform: translateY(6px); } }
}
@media (max-width: 860px) {
  .gate { align-items: flex-start; padding-top: 12px; }
  .gate section.landing { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .landing .lede { max-width: 46ch; }
}

/* Log out is a form (a POST): its button looks like the link it replaced. */
.logout { display: inline; margin: 0; }
.logout[hidden] { display: none; }
.logout button.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* Agreeing to the privacy policy and terms before the assistant is made (H4), and the links at the bottom. */
.consent { display: block; margin: 0 0 1rem; font-size: .95rem; }
.consent[hidden] { display: none; }
.consent input { margin-right: .4rem; vertical-align: middle; }
.legal { text-align: center; padding: 1.5rem 1rem; font-size: .85rem; opacity: .75; }
.legal a { color: inherit; }

/* Where to write for help: in the footer, and beside "Try again" when Chief could not start (S1-15). */
#gate-failed .cta { justify-content: center; }
.ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; user-select: all; }

/* The owner's notice (S1-16): text only, a thin line under the bar; an outage is coral and stays. */
.notices { width: min(1180px, calc(100% - 32px)); margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.notices:empty { display: none; }
.notice { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; color: var(--ink-2); }
.notice span { flex: 1; }
.notice--warning { border-color: var(--ink-2); color: var(--ink); }
.notice--outage { border-color: var(--error); color: var(--error); font-weight: 600; }
.notice__close { background: none; border: 0; padding: 0 4px; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; }
.notice__close:hover { color: var(--ink); }
/* The web could not be reached or answered with an error (S6-20): said under the bar while the door keeps trying. */
.door-trouble { width: min(1180px, calc(100% - 32px)); margin: 8px auto 0; }
