/*
 * Alliance Intelligence, interface v04.
 *
 * Built to Jen's Design Brief v04 mockup (2026-09-18). The palette, the faces
 * and the square corners are hers, not chosen here: Emerald and Dark Green,
 * Playfair Display on the masthead, Poppins for interface type, --radius: 0.
 *
 * The same token VALUES live in alliance-console.css, which the invoicing
 * consoles use. That file is not imported here because it styles a document
 * (body padding, a 960px .wrap) and this is a full-bleed application shell, so
 * importing it would fight the grid on every rule. Duplicating five hex values
 * is the cheaper of the two problems; if a third surface appears, lift the
 * :root block into a shared tokens file rather than copying it again.
 */
:root {
  --emerald: #006a5b;
  --dark-green: #153e35;
  --dark-gray: #636569;
  --mid-gray: #828c95;
  --pale-gray: #f2f2f2;
  --gold: #e9d094;
  --alliance-blue: #066999;
  --white: #ffffff;

  --ink: #1a1c1b;
  --ground: #ffffff;
  --rail: #f7f8f8;
  --surface: #ffffff;
  --rule: rgba(99, 101, 105, 0.16);
  --rule-strong: rgba(99, 101, 105, 0.30);

  /* Freshness and match states. Semantic, and deliberately separate from the
     Emerald accent: a source badge must not read as a brand flourish. */
  --ok: #1d6f4f;
  --ok-bg: #eef6f2;
  --warn: #8a5a00;
  --warn-bg: #fdf6e8;
  --live: var(--alliance-blue);
  --live-bg: #eaf3f8;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --size-meta: 0.6875rem;
  --track-caps: 0.06em;
  --radius: 0;
  --rail-w: 268px;
  --rail-w-collapsed: 56px;
}

/* Jen's interface is a single committed look, so there is no dark variant here.
   Every colour is still painted explicitly rather than inherited, so the page
   holds on any host ground. */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; border-radius: var(--radius); }

[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--emerald); outline-offset: 2px; }

/* ---------------------------------------------------------------- shell */
.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  height: 100vh;
}

.shell.rail-collapsed { grid-template-columns: var(--rail-w-collapsed) minmax(0, 1fr); }

/* ----------------------------------------------------------------- rail */
.rail {
  background: var(--rail);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.rail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 10px;
}

.masthead {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--dark-green);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
}

.rail-toggle {
  margin-left: auto;
  background: none;
  border: 1px solid var(--rule);
  color: var(--dark-gray);
  width: 28px; height: 28px;
  display: grid; place-items: center;
  cursor: pointer;
  flex: none;
}

.rail-toggle:hover { border-color: var(--rule-strong); color: var(--dark-green); }

.rail-collapsed .masthead,
.rail-collapsed .rail-section,
.rail-collapsed .rail-foot,
.rail-collapsed .new-q span { display: none; }

.rail-collapsed .rail-head { padding: 14px 10px; }
.rail-collapsed .rail-toggle { margin: 0; }

.new-q {
  margin: 0 14px 14px;
  padding: 9px 12px;
  background: var(--emerald);
  border: 1px solid var(--emerald);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  font-size: var(--size-meta);
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  width: calc(100% - 28px);
}

.new-q:hover { background: var(--dark-green); border-color: var(--dark-green); }
.rail-collapsed .new-q { margin: 0 10px 14px; width: calc(100% - 20px); justify-content: center; }

.rail-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 8px; }

.rail-section { padding: 6px 14px 12px; }

.rail-section h2 {
  font-size: var(--size-meta);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  color: var(--mid-gray);
  font-weight: 500;
  margin: 8px 0 6px;
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  background: none;
  border: 0;
  border-left: 2px solid transparent;
  padding: 5px 8px 5px 7px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.35;
}

.rail-item:hover { background: rgba(0, 106, 91, 0.06); }
.rail-item[aria-current="true"] { border-left-color: var(--emerald); background: rgba(0, 106, 91, 0.08); }

/* Wraps to two lines rather than truncating with an ellipsis. A chat title IS
   the question that was asked, and the distinguishing words are usually at the
   end of it ("Who is our contact at Sample State…" is three useless titles). */
.rail-item .label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere;
                    display: -webkit-box; -webkit-line-clamp: 2;
                    -webkit-box-orient: vertical; overflow: hidden; }

.rail-item .star { flex: none; color: var(--gold); }
.rail-item.soon { color: var(--mid-gray); cursor: default; }
.rail-item.soon:hover { background: none; }

.soon-tag {
  flex: none;
  font-size: var(--size-meta);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  color: var(--mid-gray);
  border: 1px solid var(--rule);
  padding: 0 4px;
}

.pin-btn {
  flex: none;
  background: none; border: 0; padding: 2px;
  color: var(--mid-gray);
  cursor: pointer;
  opacity: 0;
}

.rail-item:hover .pin-btn, .pin-btn[aria-pressed="true"] { opacity: 1; }
.pin-btn[aria-pressed="true"] { color: var(--gold); }

/* Pinned's own order (Jen, 10 Nov): "Arrange" beside the heading shows an up
   and a down button on each pin, 44px each so a thumb can hit them. */
.pins-head { display: flex; align-items: baseline; justify-content: space-between; }
.rail-link {
  background: none; border: 0; padding: 0 2px; min-height: 44px;
  color: var(--emerald); cursor: pointer; font: inherit;
  font-size: var(--size-meta); text-transform: uppercase; letter-spacing: var(--track-caps);
}
.rail-link:focus-visible, .move-btn:focus-visible { outline: 2px solid var(--emerald); outline-offset: -2px; }
.rail-item.pin-arrange { cursor: default; padding-right: 0; }
.rail-item.pin-arrange:hover { background: none; }
.move-btn {
  flex: none; width: 44px; height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--emerald); cursor: pointer;
}
.move-btn:hover { background: rgba(0, 106, 91, 0.06); }
.move-btn:disabled { color: var(--rule-strong); cursor: default; background: none; }

.rail-empty { font-size: 0.8125rem; color: var(--mid-gray); padding: 2px 8px; margin: 0; }

.rail-foot {
  border-top: 1px solid var(--rule);
  padding: 10px 14px 14px;
  display: flex; flex-direction: column; gap: 2px;
}

.rail-foot a, .rail-foot button {
  background: none; border: 0; padding: 3px 0;
  color: var(--dark-gray);
  font-size: 0.8125rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.rail-foot a:hover, .rail-foot button:hover { color: var(--emerald); text-decoration: underline; }

/* ------------------------------------------------------------- surfaces */
/* 🚨 WRAPS ON DESKTOP. Without it the row neither wrapped nor scrolled, so a
   person with every surface (Jen, Heather) lost Governance and Costs & Models
   off the right edge of a 1280 window, found renaming the performance tab
   (5 Nov 2026). Phones still scroll sideways, below. */
.surfaces {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0 24px;
  background: var(--surface);
}

.surface-tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 13px 14px 11px;
  color: var(--dark-gray);
  cursor: pointer;
  font-size: 0.875rem;
  white-space: nowrap;
}

.surface-tab[aria-current="true"] { color: var(--dark-green); border-bottom-color: var(--emerald); font-weight: 500; }
.surface-tab:disabled { color: var(--mid-gray); cursor: not-allowed; }
.surface-tab .soon-tag { margin-left: 6px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.panel { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* -------------------------------------------------------------- landing */
.landing { max-width: 720px; margin: 0 auto; padding: 7vh 24px 40px; }

.greeting {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--dark-green);
  margin: 0 0 4px;
  text-wrap: balance;
}

.landing .sub {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--mid-gray);
  margin: 0 0 26px;
}

.asker { border: 1px solid var(--rule-strong); background: var(--surface); }

.asker:focus-within { border-color: var(--emerald); }

.asker-row { display: flex; align-items: flex-end; gap: 10px; padding: 12px 14px; }

.asker textarea {
  flex: 1 1 auto;
  border: 0;
  padding: 0;
  resize: none;
  max-height: 180px;
  color: var(--ink);
  background: transparent;
}

.asker textarea::placeholder { color: var(--mid-gray); }
.asker textarea:focus { outline: none; }

.ask-go {
  flex: none;
  padding: 8px 20px;
  background: var(--emerald);
  border: 1px solid var(--emerald);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  font-size: var(--size-meta);
  cursor: pointer;
}

.ask-go:hover:not(:disabled) { background: var(--dark-green); border-color: var(--dark-green); }
.ask-go:disabled { opacity: 0.45; cursor: not-allowed; }

/* Beneath the box, per the brief. The current interface puts these AFTER the
   Ask button, which is one of the seven things the mockup calls out. */
.scopebar {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0 14px 12px;
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}

.scope-wrap { position: relative; }

.scope-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--white);
  border: 1px solid var(--rule);
  color: var(--dark-gray);
  padding: 4px 10px;
  font-size: 0.8125rem;
  cursor: pointer;
}

.scope-pill:hover { border-color: var(--rule-strong); color: var(--dark-green); }
.scope-pill .chev { color: var(--mid-gray); }

.scope-menu {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0;
  min-width: 240px; max-height: 320px; overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--rule-strong);
  box-shadow: 0 6px 24px rgba(21, 62, 53, 0.12);
  padding: 4px;
}

.scope-menu button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; background: none; border: 0;
  padding: 6px 9px; text-align: left; cursor: pointer;
  font-size: 0.875rem; color: var(--ink);
}

/* ⭐ The name on its own line and the explanation under it, small and grey.
   Side by side, a 240px menu squeezed a one-line explanation into eight
   lines (Jairek, 20 Oct). */
.scope-menu button:has(> .h) {
  display: grid; gap: 2px; align-items: start; padding: 8px 10px;
}
.scope-menu button > .h {
  font-size: 0.75rem; line-height: 1.4; color: var(--mid-gray); font-weight: 400;
}
.scope-menu button > .h.by { font-style: italic; margin-top: 1px; }
.scope-menu.wide { width: min(440px, calc(100vw - 32px)); max-height: 440px; }

.scope-menu button:hover { background: var(--pale-gray); }
.scope-menu button[aria-selected="true"] { color: var(--emerald); font-weight: 500; }
.scope-menu .group { font-size: var(--size-meta); text-transform: uppercase;
                     letter-spacing: var(--track-caps); color: var(--mid-gray);
                     padding: 8px 9px 3px; }

/* A menu row with its pin star beside it (Jen, 2 Nov). The star is a sibling
   button, so the row is a flex pair: the agent takes the width, the star a
   44px column, always visible here because a menu has no hover on a phone. */
.scope-menu .menu-pin-row { display: flex; align-items: stretch; }
.scope-menu .menu-pin-row > button:first-child { flex: 1 1 auto; min-width: 0; }
.scope-menu .menu-pin-row > .pin-btn {
  flex: none; width: 44px; min-height: 44px; padding: 0;
  justify-content: center; opacity: 1;
}
.scope-menu .menu-pin-row > .pin-btn:focus-visible { outline: 2px solid var(--emerald); outline-offset: -2px; }

/* --------------------------------------------------------- quick prompts */
.quick { margin-top: 26px; }

.quick h2, .card h2 {
  font-size: var(--size-meta);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  color: var(--mid-gray);
  font-weight: 500;
  margin: 0 0 8px;
}

.quick-row { display: flex; flex-wrap: wrap; gap: 8px; }

.quick-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white);
  border: 1px solid var(--rule);
  color: var(--dark-green);
  padding: 7px 12px;
  font-size: 0.8438rem;
  cursor: pointer;
  text-align: left;
}

.quick-chip:hover { border-color: var(--emerald); background: rgba(0, 106, 91, 0.04); }

.quick-chip .drop {
  background: none; border: 0; padding: 0; margin: 0;
  color: var(--mid-gray); cursor: pointer; line-height: 1;
}

.quick-chip .drop:hover { color: var(--warn); }

/* One light intelligence card. One, per the brief: a landing page of cards is a
   dashboard, and she asked for an ask box. */
.card {
  margin-top: 26px;
  border-left: 2px solid var(--emerald);
  background: var(--pale-gray);
  padding: 12px 16px;
  font-size: 0.875rem;
}

.card .row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.card a, .card button.link {
  background: none; border: 0; padding: 0;
  color: var(--emerald); cursor: pointer; text-decoration: underline;
  font-size: inherit; text-align: left;
}

/* --------------------------------------------------- conversation state */
.convo { max-width: 1040px; margin: 0 auto; padding: 24px 24px 8px; }

.qindex {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px; margin-bottom: 18px;
  font-size: 0.8125rem;
}

.qindex .lead {
  text-transform: uppercase; letter-spacing: var(--track-caps);
  font-size: var(--size-meta); color: var(--mid-gray);
}

.qindex button {
  background: none; border: 0; padding: 0 2px;
  color: var(--dark-gray); cursor: pointer; font-size: inherit;
  text-decoration: underline; text-decoration-color: var(--rule-strong);
}

.qindex button:hover { color: var(--emerald); }

.turn { margin-bottom: 30px; }

/* The question is ANCHORED at the top of its turn and the follow-up box sits at
   the bottom of the panel, which is the arrangement in the mockup. */
.turn .q {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 400;
  color: var(--dark-green);
  margin: 0 0 6px;
  text-wrap: balance;
}

.searched {
  font-size: 0.8125rem;
  color: var(--mid-gray);
  margin: 0 0 16px;
  display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline;
}

.searched .sep { color: var(--rule-strong); }

.answer { font-size: 0.9375rem; }
.answer p { margin: 0 0 12px; }
.answer ul, .answer ol { margin: 0 0 12px; padding-left: 20px; }
.answer li { margin-bottom: 4px; }
.answer code { background: var(--pale-gray); padding: 1px 4px; font-size: 0.875em; }

/* The distinguished conclusion. Set apart because the mockup sets it apart: the
   answer above it may carry caveats, and this is the line she would act on. */
.conclusion {
  border-left: 2px solid var(--dark-green);
  background: var(--ok-bg);
  padding: 10px 14px;
  margin: 0 0 14px;
  font-size: 0.9375rem;
}

.conclusion .lead {
  display: block;
  text-transform: uppercase; letter-spacing: var(--track-caps);
  font-size: var(--size-meta); color: var(--dark-green); font-weight: 500;
}

/* -------------------------------------------------------- contact card */
.contact {
  border: 1px solid var(--rule-strong);
  border-left: 2px solid var(--emerald);
  padding: 14px 16px;
  margin: 0 0 16px;
  background: var(--surface);
}

.contact .name { font-family: var(--font-display); font-size: 1.125rem;
                 color: var(--dark-green); margin: 0; }
.contact .role { font-size: 0.8438rem; color: var(--dark-gray); margin: 2px 0 8px; }
.contact .reach { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.875rem; }
.contact .reach a { color: var(--emerald); }

.flag {
  display: inline-flex; align-items: baseline; gap: 6px;
  margin-top: 10px; padding: 5px 10px;
  background: var(--warn-bg);
  border-left: 2px solid var(--warn);
  color: var(--warn);
  font-size: 0.8125rem;
}

/* ------------------------------------------------------------- actions */
.turn-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }

.act {
  background: var(--white);
  border: 1px solid var(--rule);
  color: var(--dark-gray);
  padding: 5px 11px;
  font-size: 0.8125rem;
  cursor: pointer;
}

.act:hover { border-color: var(--emerald); color: var(--emerald); }
.act[data-done="1"] { border-color: var(--ok); color: var(--ok); }

/* A generated document: the one primary action on the turn. */
.turn-downloads { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.act.download {
  background: var(--emerald);
  border-color: var(--emerald);
  color: var(--white);
  font-weight: 500;
  min-height: 44px;
  padding: 8px 16px;
}
.act.download:hover { background: var(--dark-green); border-color: var(--dark-green); color: var(--white); }
.act.download:disabled { opacity: .6; cursor: default; }
.act.download:focus-visible { outline: 2px solid var(--emerald); outline-offset: 2px; }
.turn .remade { color: var(--mid-gray); font-size: var(--size-meta); margin: 4px 0 0; }

/* -------------------------------------------------------- source cards */
.sources { margin-top: 6px; }

.sources h3 {
  font-size: var(--size-meta);
  text-transform: uppercase; letter-spacing: var(--track-caps);
  color: var(--mid-gray); font-weight: 500;
  margin: 0 0 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

.src {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}

.src .n {
  font-size: 0.8125rem; color: var(--mid-gray);
  font-variant-numeric: tabular-nums;
}

.src .head { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; }
.src .title { font-weight: 500; color: var(--dark-green); overflow-wrap: anywhere; }
.src a.title { color: var(--emerald); }
.src .loc { font-size: 0.8125rem; color: var(--mid-gray); overflow-wrap: anywhere; }

.badge {
  flex: none;
  font-size: var(--size-meta);
  text-transform: uppercase; letter-spacing: var(--track-caps);
  padding: 1px 6px;
  border: 1px solid currentColor;
}

.badge.current { color: var(--ok); background: var(--ok-bg); }
.badge.aging   { color: var(--warn); background: var(--warn-bg); }
.badge.dated   { color: var(--dark-gray); background: var(--pale-gray); }
.badge.live    { color: var(--live); background: var(--live-bg); }

.src .meta { font-size: 0.8125rem; color: var(--dark-gray); margin-top: 3px;
             display: flex; flex-wrap: wrap; gap: 4px 8px; }

/* Two lines, per the brief. The current interface shows a raw pipe-delimited
   run of a spreadsheet row, which is how unrelated people's contact details
   ended up on screen. */
.src .excerpt {
  margin-top: 6px;
  padding-left: 10px;
  border-left: 2px solid var(--rule-strong);
  font-size: 0.875rem;
  color: var(--dark-gray);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.src .note { font-size: 0.8125rem; color: var(--warn); margin-top: 4px; }

/* ------------------------------------------------------- follow-up dock */
/* Work Product Library. Cards on the same square, ruled language as the
   source cards, so a document looks the same wherever ACE shows it. */
.library { max-width: 1040px; margin: 0 auto; padding: 28px 24px 40px; }

.lib-h {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.75rem;
  color: var(--dark-green);
  margin: 0 0 16px;
}

.lib-controls { display: flex; flex-wrap: wrap; gap: 8px; }

.lib-controls input, .lib-controls select {
  min-height: 44px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
}

.lib-controls input { flex: 1 1 280px; min-width: 0; }
.lib-controls select { flex: 0 1 200px; min-width: 0; }
.lib-controls input:focus-visible, .lib-controls select:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 1px;
}

.lib-status { font-size: 0.8125rem; color: var(--dark-gray); margin: 14px 0 12px; min-height: 1.2em; }

.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}

.lib-card {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.lib-card .head { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; }
.lib-card .type {
  font-size: var(--size-meta);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  color: var(--mid-gray);
}
.lib-card .title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--dark-green);
  margin: 0;
  overflow-wrap: anywhere;
}
.lib-card .meta { font-size: 0.8125rem; color: var(--dark-gray); overflow-wrap: anywhere; }
.lib-card .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.lib-card a.act { text-decoration: none; }

/* One document as the whole scope, above the ask box. */
.docscope {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-basis: 100%;
  font-size: 0.8125rem;
  color: var(--dark-green);
  background: rgba(0, 106, 91, 0.06);
  border-left: 2px solid var(--emerald);
  padding: 6px 10px;
  min-width: 0;
}
.docscope .lead {
  font-size: var(--size-meta);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  color: var(--mid-gray);
  flex: none;
}
.docscope .t { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.docscope .clear {
  flex: none;
  border: 0;
  background: none;
  color: var(--emerald);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.dock {
  flex: none;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  padding: 14px 24px 10px;
}

.dock-inner { max-width: 1040px; margin: 0 auto; }

.review {
  max-width: 1040px; margin: 8px auto 0;
  font-size: var(--size-meta);
  letter-spacing: 0.01em;
  color: var(--mid-gray);
  text-align: center;
}

/* ------------------------------------------------------------- sign-in */
.signin { max-width: 440px; margin: 12vh auto; padding: 0 24px; text-align: left; }
.signin h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 400;
             color: var(--dark-green); margin: 0 0 10px; }
.signin p { color: var(--dark-gray); margin: 0 0 20px; }
.signin .err { color: #9b2226; }

/* -------------------------------------------------------------- states */
.thinking { display: flex; align-items: center; gap: 8px; color: var(--mid-gray);
            font-size: 0.875rem; margin: 0 0 18px; }

.dot { width: 5px; height: 5px; background: var(--emerald); border-radius: 50%;
       animation: pulse 1.2s ease-in-out infinite; }
.dot:nth-child(2) { animation-delay: 0.15s; }
.dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; opacity: 0.6; }
}

.err-msg { border-left: 2px solid #9b2226; background: #fdf0f0; color: #9b2226;
           padding: 10px 14px; margin: 0 0 18px; font-size: 0.875rem; }

/* --------------------------------------------------------------- small */
@media (max-width: 860px) {
  .shell, .shell.rail-collapsed { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .landing { padding-top: 4vh; }
  /* Phones: the tabs scroll sideways in their own strip instead of pushing
     the whole page wider than the screen. */
  .surfaces { flex-wrap: nowrap; overflow-x: auto; padding: 0 8px; scrollbar-width: none;
              -webkit-overflow-scrolling: touch; }
  .surfaces::-webkit-scrollbar { display: none; }
  .surface-tab { flex: 0 0 auto; }
}
