/* The Council. Brand identity v1: ink, chamber and a little red; Caslon, Manrope, Plex Mono; rules, not shadows. */

@font-face { font-family: "Libre Caslon Text"; src: url("/static/fonts/caslon-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("/static/fonts/caslon-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope-var.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/static/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --ink: #141414;
  --chamber: #FBFAF7;
  --red: #C8341C;
  --red-deep: #A22714;
  --stone: #5E5B55;
  --rule: #E4E1DA;
  --paper: #FFFFFF;
  --bubble: #EDEBE6;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --tabs: 62px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--chamber); color: var(--ink); font: 400 16px/1.6 var(--sans); }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--red-deep); }
h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; }
h1 { font-size: 34px; line-height: 1.2; }
h2 { font-size: 21px; line-height: 1.3; }
p { margin: 0 0 12px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 18px 0; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.eyebrow { display: block; font: 700 12px/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); margin: 0; }
.eyebrow.red { color: var(--red-deep); }
.redbar { display: block; width: 44px; height: 3px; background: var(--red); margin: 14px 0 18px; }
.lead { color: var(--stone); font-size: 17px; }
.fine { color: var(--stone); font-size: 13px; text-align: center; margin: 10px 0 0; }
.fine.left { text-align: left; }
.hint { display: block; color: var(--stone); font-size: 13px; font-weight: 400; margin-top: 4px; }

/* ---------- top bar and tabs ---------- */

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; background: var(--chamber); border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; }
.brand img { height: 26px; width: auto; display: block; }
.top-right { display: flex; align-items: center; gap: 14px; }
.purse { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); text-decoration: none; font-size: 15px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); display: inline-block; flex: none; }
.who { font-weight: 600; font-size: 14px; text-decoration: none; color: var(--stone); }
.tabs { display: flex; gap: 6px; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--stone); font-weight: 500; font-size: 15px; border-top: 2px solid transparent; }
.tabs a.on { color: var(--ink); font-weight: 700; border-top-color: var(--red); }

@media (max-width: 819px) {
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; height: calc(var(--tabs) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); gap: 0; background: var(--paper); border-top: 1px solid var(--rule); }
  .tabs a { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 4px; font-size: 14px; }
  body.signed-in main { padding-bottom: calc(var(--tabs) + 28px + env(safe-area-inset-bottom)); }
  .who { display: none; }
  .brand img { height: 22px; }
}

main { max-width: 720px; margin: 0 auto; padding: 22px 18px 40px; }
main.wide { max-width: 980px; }

/* ---------- cards, forms, buttons ---------- */

.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 16px; padding: 22px; margin: 0 0 18px; }
.card h2 { margin-bottom: 12px; }
.stack { display: grid; gap: 16px; }
label { display: block; font-weight: 600; font-size: 14px; }
input, textarea, select { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--chamber); color: var(--ink); font: 400 16px/1.45 var(--sans); }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ink); outline-offset: 0; background: var(--paper); }
button, .button { display: inline-block; padding: 12px 20px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--paper); color: var(--ink); font: 700 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: var(--ink); color: var(--chamber); }
button.primary { background: var(--ink); color: var(--chamber); }
button.primary:hover { background: var(--red-deep); border-color: var(--red-deep); }
button.quiet { border-color: var(--rule); color: var(--stone); font-weight: 600; }
button.small { padding: 8px 12px; font-size: 13px; }
button:disabled { opacity: 0.5; cursor: default; }
.notice { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper); font-size: 15px; }
.notice.problem { border-color: var(--red); color: var(--red-deep); }
.notice.good { border-color: var(--ink); }
.notice.quiet { color: var(--stone); }

/* ---------- the door (signed out) ---------- */

.door { max-width: 420px; margin: 0 auto; padding-top: 6vh; text-align: center; }
.door-logo { width: 190px; height: auto; }
.tagline { font: italic 400 22px/1.3 var(--serif); margin: 6px 0 26px; }
.door-card { text-align: left; }
.door-card h1 { font-size: 26px; margin-bottom: 14px; }
.door-card button.primary { width: 100%; }

/* ---------- the chamber ---------- */

.sessionbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sessionbar a { font-size: 14px; color: var(--stone); margin-left: 16px; }
.opening { padding: 6vh 0 10px; }
.opening h1 { margin-top: 10px; }
.starters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); font: 600 14px/1.2 var(--sans); color: var(--ink); }
button.chip { border-width: 1px; border-color: var(--rule); font-weight: 500; text-align: left; }
button.chip:hover { border-color: var(--ink); background: var(--paper); color: var(--ink); }

.turn { margin: 0 0 22px; }
.turn.member { display: flex; justify-content: flex-end; }
.bubble { max-width: 88%; padding: 14px 18px; border-radius: 18px 18px 4px 18px; background: var(--bubble); font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.convened { margin-bottom: 10px; }
.seats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.turn .card { margin-bottom: 0; }
.turn .card > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.depth { color: var(--stone); font-size: 14px; }
.position h2 { font-size: 27px; line-height: 1.28; }
.signed { font: italic 400 15px/1.3 var(--serif); color: var(--stone); margin: 12px 0 0; }
.seat p, .depends p, .answer p, .asks p { font-size: 16.5px; }
.seat { margin-bottom: 4px; }
.depends { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); color: #33312d; }
.next { margin-top: 16px; padding: 16px 18px; border-radius: 10px; background: var(--ink); color: var(--chamber); font-size: 16.5px; line-height: 1.5; }
.next strong:first-child { color: #F0907C; }
.drawn { margin: 14px 0 0; color: var(--stone); font-size: 13px; }
.card ul, .card ol { margin: 0 0 12px; padding-left: 22px; }
.card li { margin-bottom: 6px; }
.charge { margin: 8px 4px 0; text-align: right; color: var(--stone); font: 400 12.5px/1.2 var(--mono); }
.trouble { border-color: var(--red); color: var(--red-deep); }
.conferring { display: flex; align-items: center; gap: 14px; }
.pulse { display: inline-flex; gap: 6px; }
.pulse i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); opacity: 0.25; animation: seat 1.2s infinite ease-in-out; }
.pulse i:first-child { background: var(--red); }
.pulse i:nth-child(2) { animation-delay: 0.2s; }
.pulse i:nth-child(3) { animation-delay: 0.4s; }
@keyframes seat { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pulse i { animation: none; opacity: 0.6; } }

.composer { position: sticky; bottom: 0; z-index: 4; margin: 26px -18px 0; padding: 16px 18px 14px; background: var(--paper); border-top: 1px solid var(--rule); }
.composer textarea { margin-top: 8px; font-size: 17px; resize: none; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.mode { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; }
.mode .num { font-size: 13px; font-weight: 400; }
.mode.primary { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }
.mode.primary:hover { background: var(--red); border-color: var(--red); }
@media (max-width: 819px) { .composer { bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); } }
@media (min-width: 820px) { .composer { border: 1px solid var(--rule); border-bottom: 0; border-radius: 16px 16px 0 0; margin-left: 0; margin-right: 0; } }

/* ---------- pages ---------- */

.page h1 { margin-top: 8px; }
.section { margin: 26px 0 12px; }
.cards { display: grid; gap: 16px; }
.instrument p { color: var(--stone); }
.figure { display: flex; align-items: baseline; gap: 10px; margin: 0 0 20px; }
.figure .num { font-size: 44px; line-height: 1; }
.figure .unit { color: var(--stone); }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.rows li { border-bottom: 1px solid var(--rule); }
.rows li, .rows li > a { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.rows li > a { width: 100%; padding: 14px 2px; text-decoration: none; }
.rows li > div { padding: 12px 2px; display: grid; gap: 2px; }
.rows .when { color: var(--stone); font-size: 13px; white-space: nowrap; }
.rows .plus { color: var(--red-deep); }
table { border-collapse: collapse; width: 100%; }
table.plain td { padding: 9px 0; border-bottom: 1px solid var(--rule); }
table.plain tr:last-child td { border-bottom: 0; }
table.plain td:last-child { text-align: right; }
table.card { display: table; padding: 0; }
table.card td { padding: 12px 18px; }
.scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 16px; background: var(--paper); }
table.grid th, table.grid td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--rule); font-size: 14px; white-space: nowrap; }
table.grid th { font: 700 12px/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); }
table.grid tr:last-child td { border-bottom: 0; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline input { width: 110px; margin: 0; padding: 7px 9px; font-size: 14px; }
.copy { font-family: var(--mono); font-size: 13px; }
