/* AI League One — the desk.
 *
 * Dark editorial sports pages, not a neon AI lab. The single decision doing
 * most of that work is the type pairing: a serif for headlines against the
 * system UI stack for body copy reads as a newspaper. A geometric sans for
 * both would read as a dashboard, whatever the colours are.
 *
 * The club colour is used ONLY as a 3px left rule and the active-nav
 * underline. Tinting panels with it makes the whole thing read as a toy.
 *
 * No framework, no build step, one file.
 */

:root {
  --ink:        #0b0d10;   /* page */
  --card:       #14181d;   /* raised surface */
  --card-2:     #191e24;   /* nested surface */
  --rule:       #232a31;   /* hairlines */
  --newsprint:  #e8e6e1;   /* body text — warm, not #fff */
  --muted:      #9aa4ad;
  --dim:        #6b757e;

  --win:  #3f9c6b;
  --draw: #8a8f96;
  --loss: #b4503f;

  --accent: #c7a34a;       /* the desk's own gold, used sparingly */
  --club:   var(--accent); /* overridden per-club once a chair is taken */

  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --rail-w: 190px;
  --chat-w: 320px;
  --tabbar-h: 56px;
  --continue-h: 60px;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--newsprint);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  /* Room for the tab bar and the Continue bar, plus the home indicator. */
  padding-bottom: calc(var(--tabbar-h) + var(--continue-h) + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

h1, h2, h3, .wordmark {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
h1 { font-size: 1.65rem; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }

a { color: var(--newsprint); text-decoration-color: var(--dim); }
a:hover { text-decoration-color: var(--club); }

.muted, .lede { color: var(--muted); }
.lede { margin: 0 0 1rem; }
.dim { color: var(--dim); }

/* Scores, wages, league positions. A table whose columns do not line up is a
   table nobody trusts. */
table, .num, .money, .score, .clock, .joblog { font-variant-numeric: tabular-nums; }

.skip {
  position: absolute; left: -9999px;
}
.skip:focus {
  left: var(--gutter); top: 8px; z-index: 50;
  background: var(--card); padding: .5rem .75rem; border-radius: 6px;
}

/* ------------------------------------------------------------- masthead */

.masthead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .75rem var(--gutter);
  border-bottom: 1px solid var(--rule);
  background: var(--ink);
  position: sticky; top: 0; z-index: 20;
}
.wordmark {
  font-size: 1.05rem; letter-spacing: .02em; text-decoration: none;
  border-bottom: 2px solid var(--club); padding-bottom: 1px;
}
.clock { color: var(--muted); font-size: .85rem; }

/* --------------------------------------------------------------- layout */

.frame { display: block; }
.content { padding: 1.25rem var(--gutter) 2rem; max-width: 68ch; }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--club);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}
.card.pending { border-left-color: var(--dim); color: var(--muted); }
.flash {
  background: var(--card-2); border: 1px solid var(--rule);
  border-radius: 6px; padding: .6rem .8rem; margin-bottom: 1rem;
}
.error { color: var(--loss); }

.win  { color: var(--win); }
.draw { color: var(--draw); }
.loss { color: var(--loss); }

/* The desktop rail is hidden on a phone; the tab bar takes over. */
.rail { display: none; }

.tabbar {
  position: fixed; left: 0; right: 0;
  bottom: calc(var(--continue-h) + env(safe-area-inset-bottom, 0px));
  height: var(--tabbar-h);
  display: flex; align-items: stretch;
  background: var(--card); border-top: 1px solid var(--rule);
  z-index: 25;
}
.tabbar > a, .tabbar summary {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center;
  font-size: .78rem; color: var(--muted);
  text-decoration: none; cursor: pointer; list-style: none;
  border-top: 2px solid transparent;
}
.tabbar summary::-webkit-details-marker { display: none; }
.tabbar > a.is-active {
  color: var(--newsprint); border-top-color: var(--club);
}
.more { flex: 1 1 0; display: flex; position: relative; }
.more-sheet {
  position: absolute; bottom: 100%; right: 0; min-width: 160px;
  background: var(--card); border: 1px solid var(--rule);
  border-radius: 8px 8px 0 0; padding: .35rem 0;
}
.more-sheet a {
  display: block; padding: .6rem 1rem; font-size: .9rem; text-decoration: none;
}

/* ------------------------------------------------------------- continue */

.continuebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 26;
  padding: 6px var(--gutter) calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--ink); border-top: 1px solid var(--rule);
}
.continue {
  width: 100%; min-height: 46px;
  font-family: var(--serif); font-size: 1.02rem;
  color: var(--ink); background: var(--accent);
  border: 0; border-radius: 7px; cursor: pointer;
}
.continue:disabled { background: var(--rule); color: var(--muted); cursor: default; }

/* The round's own story, written in the sports-desk voice. Not telemetry. */
.joblog {
  list-style: none; margin: .5rem 0 0; padding: 0;
  max-height: 22vh; overflow-y: auto;
  font-size: .82rem; color: var(--muted);
}
.joblog li { padding: .15rem 0; border-bottom: 1px solid var(--rule); }

/* ----------------------------------------------------------- chat panel */

.chatpanel {
  border-top: 1px solid var(--rule);
  padding: 1rem var(--gutter) 1.5rem;
}
.chatpanel h2 { margin-top: 0; }

/* ----------------------------------------------------------------- auth */

.loginpage {
  display: grid; place-items: center; min-height: 100vh; padding: var(--gutter);
}
.login { max-width: 22rem; width: 100%; border-left-color: var(--accent); }
.login label { display: block; margin: 1rem 0 .25rem; font-size: .85rem; color: var(--muted); }
.login input[type=password] {
  width: 100%; padding: .6rem .7rem; font-size: 1rem;
  color: var(--newsprint); background: var(--card-2);
  border: 1px solid var(--rule); border-radius: 6px;
}
.login button {
  width: 100%; margin-top: 1rem; min-height: 44px;
  font-family: var(--serif); font-size: 1rem;
  color: var(--ink); background: var(--accent);
  border: 0; border-radius: 6px; cursor: pointer;
}

/* -------------------------------------------------------------- desktop */

@media (min-width: 900px) {
  body { padding-bottom: 0; }

  .frame {
    display: grid;
    grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--chat-w);
    align-items: start;
    gap: 0;
  }

  .rail {
    display: block; position: sticky; top: 49px;
    padding: 1.25rem 0; border-right: 1px solid var(--rule);
    min-height: calc(100vh - 49px);
  }
  .rail ul { list-style: none; margin: 0; padding: 0; }
  .rail a {
    display: block; padding: .45rem 1rem .45rem calc(1rem - 3px);
    color: var(--muted); text-decoration: none;
    border-left: 3px solid transparent;
  }
  .rail a.is-active { color: var(--newsprint); border-left-color: var(--club); }

  .content { padding: 1.5rem 2rem 4rem; }

  .tabbar { display: none; }

  .chatpanel {
    position: sticky; top: 49px;
    border-top: 0; border-left: 1px solid var(--rule);
    min-height: calc(100vh - 49px);
  }

  .continuebar {
    left: var(--rail-w); right: var(--chat-w);
    display: flex; align-items: center; gap: 1rem;
  }
  .continue { width: auto; min-width: 16rem; }
  .joblog { margin: 0; flex: 1; max-height: 3.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ===================================================================
 * M1 — the world made visible.
 * =================================================================== */

h3 { font-family: var(--serif); font-size: 1rem; margin: 0 0 .25rem; }

.meta { color: var(--dim); font-size: .82rem; margin: .4rem 0 0; }
.quote {
  font-family: var(--serif); font-size: 1.02rem; font-style: italic;
  color: var(--newsprint); margin: .5rem 0;
}
.card h2 { margin: 0 0 .5rem; font-size: 1rem; }
.card.crisis { border-left-color: var(--loss); }
.card.next { border-left-color: var(--accent); }

/* Anything below 420px hides the columns a phone cannot carry without
   wrapping. Wrapping a league table is worse than dropping two columns. */
@media (max-width: 460px) { .hide-narrow { display: none; } }

/* ---------------------------------------------------------- tables */

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th {
  text-align: right; font-weight: 600; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--dim); padding: .5rem .35rem; border-bottom: 1px solid var(--rule);
}
tbody td { text-align: right; padding: .5rem .35rem; border-bottom: 1px solid var(--rule); }
thead th.club, thead th.name, tbody td.club, tbody td.name { text-align: left; }
tbody td.pts, thead th.pts { font-weight: 700; color: var(--newsprint); }
tbody td.pos, thead th.pos { color: var(--dim); width: 1.6rem; text-align: right; }
tbody tr.is-mine { background: color-mix(in srgb, var(--club) 12%, transparent); }
tbody tr.is-mine td.club a { font-weight: 700; }
td.money, td.num { font-variant-numeric: tabular-nums; }
table a { text-decoration: none; }
table a:hover { text-decoration: underline; }

.league td.club { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.squad td.name .nat { color: var(--dim); font-size: .72rem; margin-left: .3rem; }
.flag { font-size: .8rem; margin-left: .2rem; }
.flag.star { color: var(--accent); }
.flag.problem { color: var(--loss); font-weight: 700; }
.flag.locked { color: var(--draw); }

.band {
  display: inline-block; padding: .1rem .4rem; border-radius: 3px;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .04em;
  border: 1px solid var(--rule); color: var(--muted); white-space: nowrap;
}
.band.b1 { border-color: var(--accent); color: var(--accent); }
.band.b2 { border-color: #5c7a99; color: #9fc0e0; }
.band.b5 { border-color: var(--loss); color: var(--loss); }

.pips { display: inline-flex; gap: 2px; }
.pip {
  width: 1.05rem; height: 1.05rem; line-height: 1.05rem; text-align: center;
  border-radius: 2px; font-size: .62rem; font-style: normal; font-weight: 700;
  color: var(--ink);
}
.pip.win { background: var(--win); }
.pip.draw { background: var(--draw); }
.pip.loss { background: var(--loss); }
.pip.none { background: transparent; color: var(--dim); }

/* ------------------------------------------------------- fixtures */

.round { margin: 1.25rem 0; }
.round h2 { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .35rem; }
.round h2 a { text-decoration: none; }
.round h2 .meta { margin: 0; }
.round.is-current h2 a { color: var(--accent); }

ul.fixtures { list-style: none; margin: 0; padding: 0; }
ul.fixtures li {
  display: grid; grid-template-columns: 1fr auto 1fr auto;
  align-items: center; gap: .5rem;
  padding: .45rem .5rem; border-bottom: 1px solid var(--rule);
}
ul.fixtures .side { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.fixtures .side.home { text-align: right; }
ul.fixtures .side.away { text-align: left; }
ul.fixtures .score {
  font-variant-numeric: tabular-nums; color: var(--muted);
  min-width: 3rem; text-align: center;
}
ul.fixtures li.is-mine { background: color-mix(in srgb, var(--club) 12%, transparent); }
ul.fixtures.big { font-size: 1.05rem; }
ul.fixtures.big .score { font-family: var(--serif); color: var(--newsprint); }
.derby {
  font-size: .62rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--loss); border: 1px solid var(--loss);
  border-radius: 3px; padding: 0 .25rem;
}
.matchline { display: flex; gap: .75rem; align-items: baseline; font-size: 1.05rem; }
.matchline .score { font-family: var(--serif); color: var(--muted); }

/* ------------------------------------------------- the wage ceiling */

.ceiling .bar {
  height: 6px; background: var(--card-2); border-radius: 3px;
  overflow: hidden; margin: .35rem 0;
}
.ceiling .bar span { display: block; height: 100%; background: var(--win); }
.ceiling.warn .bar span { background: var(--accent); }
.ceiling.block .bar span { background: var(--loss); }

/* --------------------------------------------------------- player */

.attrs { margin: 0; }
.attr { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; align-items: center; }
.attr dt { color: var(--muted); font-size: .8rem; }
.attr dd { margin: 0; display: flex; align-items: center; gap: .5rem; }
.meter { flex: 1; height: 5px; background: var(--card-2); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--club); }
.attr .num { width: 1.8rem; text-align: right; color: var(--muted); font-size: .8rem; }

ul.rosterlist { list-style: none; margin: 0; padding: 0; }
ul.rosterlist li {
  display: grid; grid-template-columns: 1fr auto 2.2rem; gap: .5rem;
  align-items: baseline; padding: .4rem .25rem; border-bottom: 1px solid var(--rule);
}
ul.rosterlist .meta { margin: 0; }
ul.rosterlist .num { text-align: right; }

/* --------------------------------------------------------- tabs */

nav.tabs { display: flex; gap: .25rem; margin: .75rem 0; border-bottom: 1px solid var(--rule); }
nav.tabs a {
  padding: .4rem .7rem; text-decoration: none; color: var(--muted);
  border-bottom: 2px solid transparent; font-size: .9rem;
}
nav.tabs a.is-active { color: var(--newsprint); border-bottom-color: var(--club); }

/* ---------------------------------------------------- choose a chair */

.chairs { display: grid; gap: .85rem; margin: .75rem 0 1.5rem; }
.chair {
  background: var(--card); border: 1px solid var(--rule);
  border-left: 3px solid var(--club); border-radius: 8px; padding: .9rem;
}
.chair h3 { font-size: 1.1rem; }
.chair .quote { font-size: .92rem; margin: .4rem 0 .6rem; }
.chair .facts { margin: 0 0 .6rem; font-size: .84rem; }
.chair .facts > div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .2rem 0; border-bottom: 1px solid var(--rule);
}
.chair .facts dt { color: var(--dim); }
.chair .facts dd { margin: 0; text-align: right; }
.chair .crisisline {
  font-size: .84rem; color: var(--muted);
  border-left: 2px solid var(--rule); padding-left: .6rem; margin: .6rem 0;
}
.chair .take {
  width: 100%; min-height: 40px; margin-top: .3rem;
  font-family: var(--serif); font-size: .95rem; cursor: pointer;
  color: var(--newsprint); background: transparent;
  border: 1px solid var(--club); border-radius: 6px;
}
.chair .take:hover { background: var(--club); color: var(--ink); }
.chair .take:disabled { opacity: .5; cursor: default; }
.chair.tier1 h3::after { content: " · strong"; color: var(--dim); font-size: .7rem; font-weight: 400; }
.chair.tier3 h3::after { content: " · thin"; color: var(--dim); font-size: .7rem; font-weight: 400; }

@media (min-width: 640px) {
  .chairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.chair .take.is-armed {
  background: var(--club); color: var(--ink); font-weight: 700;
}
#choose-error:not(:empty) {
  color: var(--loss); border-left: 2px solid var(--loss);
  padding-left: .6rem; margin-top: 1rem;
}

/* "10,228 cr" must never break across two lines -- a wrapped currency unit
   makes a money column look like two columns. */
td.money, .ceiling .meta strong, .chair .facts dd { white-space: nowrap; }
.squad td.name { max-width: 9.5rem; }

/* =================================================================== */
/* M3 — a round that has been played.                                   */
/* =================================================================== */

.scoreline { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.scoreline .side { font-size: 1.25rem; }
.scoreline .score { font-size: 1.6rem; color: var(--accent); }

.card.report h2 { font-size: 1.15rem; }
.card.report p { margin: .5rem 0 0; }
.card.quotecard { border-left-color: var(--draw); }
.tickerline { margin: .3rem 0; }

ol.ticker { list-style: none; margin: .5rem 0 1.5rem; padding: 0; }
ol.ticker li {
  display: grid; grid-template-columns: 3rem 4.5rem 1fr; gap: .5rem;
  align-items: baseline; padding: .35rem .25rem;
  border-bottom: 1px solid var(--rule); font-size: .88rem;
}
ol.ticker .min { color: var(--dim); font-variant-numeric: tabular-nums; }
ol.ticker .kind {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted);
}
ol.ticker .dim { color: var(--dim); }
ol.ticker .ev.goal { background: color-mix(in srgb, var(--win) 10%, transparent); }
ol.ticker .ev.goal .kind { color: var(--win); font-weight: 700; }
ol.ticker .ev.red .kind { color: var(--loss); font-weight: 700; }
ol.ticker .ev.yellow .kind { color: var(--accent); }
ol.ticker .ev.chance .kind, ol.ticker .ev.sub .kind { color: var(--dim); }

td.rating { font-weight: 700; }

ul.post { list-style: none; margin: .5rem 0; padding: 0; }
ul.post li { border-bottom: 1px solid var(--rule); }
ul.post a {
  display: grid; grid-template-columns: 7rem 1fr 2.5rem; gap: .5rem;
  align-items: baseline; padding: .6rem .25rem; text-decoration: none;
}
ul.post .from { color: var(--muted); font-size: .8rem; }
ul.post .when { color: var(--dim); font-size: .8rem; text-align: right; }
ul.post li.unread .subject { font-weight: 700; }
ul.post li.unread .from::before { content: "● "; color: var(--accent); }
ul.post .from.board { color: var(--accent); }
ul.post .from.coach { color: #9fc0e0; }

.card.letter pre {
  margin: 0; white-space: pre-wrap; font-family: var(--sans);
  font-size: .95rem; line-height: 1.55;
}
ul.fixtures .into { text-decoration: none; color: var(--dim); padding: 0 .25rem; }
ul.fixtures li > a.row:hover .into { color: var(--accent); }

/* A fixture row that leads somewhere hands its whole area to the anchor.
   44px is the floor a thumb needs; the chevron alone was 15x25. */
ul.fixtures li.linked { display: block; padding: 0; }
ul.fixtures li.linked > a.row {
  display: grid; grid-template-columns: 1fr auto 1fr auto;
  align-items: center; gap: .5rem;
  min-height: 44px; padding: .45rem .5rem;
  color: inherit; text-decoration: none;
}
ul.fixtures li.linked > a.row:hover { background: var(--card-2); }
ul.fixtures li.linked > a.row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Dense tables: the name is the link, so give it the whole cell rather than
   the 17px its text happens to occupy. */
table td.name > a, table td.club > a {
  display: block; padding: .35rem 0; margin: -.35rem 0;
}

/* A 375px phone cannot fit "Gothenburg Harbour 3-0 Mexico City Altura" with a
   score between them, and a truncated club name is worse than an abbreviation:
   "Buenos Aires ..." and "Buenos Aires Sur" look like different clubs. */
ul.fixtures .short { display: none; }
ul.fixtures .full { font-weight: inherit; }
@media (max-width: 460px) {
  ul.fixtures .full { display: none; }
  ul.fixtures .short { display: inline; letter-spacing: .04em; }
}

/* =================================================================== */
/* M4 — the confirm sheet, forms, and the market.                       */
/* =================================================================== */

form.stack { display: grid; gap: .35rem; }
form.stack label { color: var(--muted); font-size: .85rem; margin-top: .5rem; }
form.inline { display: inline; }
select, textarea, input[type=number], input[type=text] {
  width: 100%; padding: .5rem .6rem; font: inherit; font-size: .95rem;
  color: var(--newsprint); background: var(--card-2);
  border: 1px solid var(--rule); border-radius: 6px;
}
button {
  font-family: var(--serif); font-size: .95rem; cursor: pointer;
  min-height: 38px; padding: 0 1rem;
  color: var(--ink); background: var(--accent);
  border: 0; border-radius: 6px;
}
button.quiet {
  background: transparent; color: var(--newsprint);
  border: 1px solid var(--rule);
}
button.quiet:hover { border-color: var(--club); }
button.danger { background: var(--loss); color: var(--newsprint); }
button:disabled { opacity: .5; cursor: default; }

ul.bids { list-style: none; margin: .5rem 0 1.5rem; padding: 0; }
ul.bids li {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  padding: .7rem .25rem; border-bottom: 1px solid var(--rule);
}
ul.bids .acts { display: flex; gap: .4rem; }

.confirmsheet {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, .6);
  display: grid; place-items: end center; padding: 0;
}
.sheetcard {
  width: 100%; max-width: 32rem;
  background: var(--card); border: 1px solid var(--rule);
  border-top: 3px solid var(--club);
  border-radius: 10px 10px 0 0;
  padding: 1.1rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
}
.sheetcard h2 { margin: 0 0 .6rem; font-size: 1.1rem; }
.sheetcard ul { list-style: none; margin: 0 0 .5rem; padding: 0; font-size: .9rem; }
.sheetcard .effects li { padding: .2rem 0; color: var(--newsprint); }
.sheetcard .risks li {
  padding: .2rem 0 .2rem .7rem; color: var(--loss);
  border-left: 2px solid var(--loss); margin: .2rem 0;
}
.sheetacts { display: flex; gap: .5rem; margin-top: .9rem; }
.sheetacts button { flex: 1; }

@media (min-width: 640px) {
  .confirmsheet { place-items: center; }
  .sheetcard { border-radius: 10px; border-top-width: 3px; }
}

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--continue-h) + 12px);
  z-index: 70; max-width: 90vw;
  background: var(--card); color: var(--newsprint);
  border: 1px solid var(--rule); border-left: 3px solid var(--win);
  border-radius: 8px; padding: .6rem .9rem; font-size: .9rem;
}
.toast.bad { border-left-color: var(--loss); }
@media (min-width: 900px) { .toast { bottom: 5rem; } }

/* The tape room. Deliberately understated: it is a tool, not a slot machine. */
.card.taperoom { border-left-color: var(--draw); }
.tapecontrols { display: grid; gap: .8rem; margin: .6rem 0; }
.tapeside { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.tapeside .meta { flex-basis: 100%; margin: 0 0 .2rem; }
.tapeside button { min-height: 32px; font-size: .85rem; padding: 0 .7rem; }
.tapeside button.is-running { opacity: .6; }
.tapeout { margin-top: .8rem; border-top: 1px solid var(--rule); padding-top: .7rem; }
.tapeline {
  display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap;
  font-variant-numeric: tabular-nums; margin: 0 0 .3rem;
}
.tapeline .was { color: var(--muted); }
.tapeline .arrow { color: var(--dim); }
.tapeline .now strong { color: var(--accent); }
.tapeverdict { font-family: var(--serif); font-size: 1.02rem; margin: .2rem 0; }

/* =================================================================== */
/* M5 — the chat panel and its proposal cards.                          */
/* =================================================================== */

.chatlog { display: grid; gap: .5rem; margin: .5rem 0; max-height: 46vh; overflow-y: auto; }
.bubble {
  padding: .5rem .7rem; border-radius: 8px; font-size: .9rem; line-height: 1.45;
  white-space: pre-wrap;
}
.bubble.you { background: var(--card-2); justify-self: end; max-width: 85%; }
.bubble.them { background: var(--card); border: 1px solid var(--rule); }
.bubble.system { color: var(--muted); font-size: .82rem; padding: .2rem .4rem; }
.bubble.bad { color: var(--loss); }

.chatform { display: flex; gap: .4rem; }
.chatform input { flex: 1; }

.propcard {
  background: var(--card); border: 1px solid var(--rule);
  border-left: 3px solid var(--accent); border-radius: 8px;
  padding: .7rem; font-size: .88rem;
}
.propcard h3 { margin: 0 0 .2rem; font-size: .98rem; }
.propcard .summary { margin: 0 0 .4rem; color: var(--muted); }
.propcard ul { list-style: none; margin: 0 0 .4rem; padding: 0; }
.propcard .effects li { padding: .1rem 0; }
.propcard .risks li {
  padding: .1rem 0 .1rem .6rem; color: var(--loss);
  border-left: 2px solid var(--loss); margin: .15rem 0;
}
.propcard button { width: 100%; min-height: 34px; margin-top: .3rem; }

/* ------------------------------------------------- the press conference */

.stances { display: grid; gap: .5rem; }
.stances form { display: block; }
.stances button {
  width: 100%; text-align: left; min-height: 44px;
  display: grid; gap: .15rem;
}
.stances .what { font-size: .95rem; }
.stances .cost { color: var(--dim); font-size: .75rem; }

.windowwarn {
  margin: 0 0 .4rem; font-size: .78rem; color: var(--muted);
  text-align: center;
}
.windowwarn strong { color: var(--accent); }
