/* FF briefing — galvanized steel + MSS red, decisions as lockout tags */
:root {
  --zinc: #e7eae8;
  --zinc-2: #d5dad7;
  --ink: #21272b;
  --steel: #5d6a72;
  --red: #c8102e;
  --red-dark: #9e0c24;
  --panel: #fafbfa;
  --amber: #d99a06;
  --amber-bg: #fbf1d6;

  --fs: clamp(20px, 1.32vw, 28px);
  --fs-small: 0.86em;
  --fs-h1: clamp(40px, 3.1vw, 68px);
  --fs-h2: clamp(24px, 1.55vw, 34px);
  --rail: clamp(220px, 15vw, 300px);
  --gap: clamp(20px, 1.6vw, 36px);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--zinc);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--fs);
  line-height: 1.42;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---------- frame ---------- */
.frame { display: grid; grid-template-columns: var(--rail) 1fr; height: 100vh; }

.rail {
  background: var(--ink);
  color: var(--zinc);
  padding: var(--gap) calc(var(--gap) * 0.8);
  display: flex; flex-direction: column; gap: 6px;
}
.rail .brand { font-weight: 800; font-stretch: 118%; font-size: 1.05em; letter-spacing: 0.01em; margin-bottom: 4px; }
.rail .when { color: #aab4ba; font-size: var(--fs-small); margin-bottom: calc(var(--gap) * 1.2); }
.rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; counter-reset: agenda; }
.rail button {
  all: unset; cursor: pointer; display: grid; grid-template-columns: 1.6em 1fr; gap: 6px;
  width: 100%; padding: 12px 10px; border-radius: 8px; color: #c9d1d5;
}
.rail button .n { font-weight: 800; color: #7f8b92; }
.rail button .t { font-weight: 600; }
.rail button .d { grid-column: 2; font-size: var(--fs-small); color: #9aa5ab; }
.rail button:hover { background: #2d3439; }
.rail button[aria-current="true"] { background: var(--zinc); color: var(--ink); }
.rail button[aria-current="true"] .n { color: var(--red); }
.rail button[aria-current="true"] .d { color: var(--steel); }
.rail button:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.rail .spacer { flex: 1; }
.rail .keys { font-size: var(--fs-small); color: #8f9aa0; }
.rail .sync { font-size: var(--fs-small); color: #8f9aa0; margin-top: 6px; }
.rail .sync.err { color: #ff9a9a; }

/* ---------- slides ---------- */
.deck { position: relative; overflow: hidden; }
.slide {
  position: absolute; inset: 0;
  padding: calc(var(--gap) * 1.4) calc(var(--gap) * 1.6) calc(var(--gap) * 1.2);
  display: grid; grid-template-rows: auto 1fr; row-gap: calc(var(--gap) * 0.9);
  grid-template-columns: minmax(0, 1fr) clamp(340px, 27vw, 520px); column-gap: calc(var(--gap) * 1.4);
  align-content: start; overflow-y: auto;
  visibility: hidden; opacity: 0;
}
.slide.on { visibility: visible; opacity: 1; transition: opacity 220ms ease; }

.head h1 {
  margin: 0; font-size: var(--fs-h1); line-height: 1.02; font-weight: 800; font-stretch: 118%;
  letter-spacing: -0.01em; max-width: 22ch;
}
.head .lede { margin: 10px 0 0; max-width: 62ch; color: var(--steel); font-size: 1.05em; }

.head { grid-column: 1; grid-row: 1; }
.body { display: contents; }
.main { grid-column: 1; grid-row: 2; }
.tags { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.body.wide .main { grid-column: 1 / -1; }
.main > * + * { margin-top: calc(var(--gap) * 0.9); }
.main h2 { font-size: var(--fs-h2); font-weight: 800; font-stretch: 110%; margin: 0 0 10px; line-height: 1.1; }
.main p { margin: 0; max-width: 64ch; }
.main ul { margin: 0; padding-left: 1.1em; max-width: 64ch; }
.main li + li { margin-top: 6px; }
.muted { color: var(--steel); }
.red { color: var(--red); }
strong { font-weight: 700; }

/* timeline — a real sequence, so numbered dates on a steel bar */
.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; border-left: 6px solid var(--zinc-2); }
.timeline li { position: relative; padding: 0 0 12px 14px; }
.timeline li::before {
  content: ""; position: absolute; left: -38px; top: 0.35em; width: 18px; height: 18px;
  border-radius: 50%; background: var(--zinc); border: 5px solid var(--steel);
}
.timeline li.hit::before { border-color: var(--red); background: var(--red); }
.timeline .date { font-weight: 800; display: block; }

/* citation bar */
.bar { display: flex; height: 76px; border-radius: 10px; overflow: hidden; border: 3px solid var(--ink); }
.bar > div { display: flex; align-items: center; padding: 0 14px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; }
.bar .b1 { background: var(--red); }
.bar .b2 { background: var(--ink); }
.bar .b3 { background: var(--steel); min-width: 70px; }
.legend { display: grid; grid-template-columns: auto 1fr auto; gap: 10px 18px; align-items: baseline; }
.legend .sw { width: 18px; height: 18px; border-radius: 4px; display: inline-block; transform: translateY(2px); }
.legend .amt { font-weight: 800; text-align: right; }
.legend .total { border-top: 3px solid var(--ink); padding-top: 8px; font-weight: 800; }

/* tables */
table.opts { width: 100%; border-collapse: collapse; }
table.opts th, table.opts td { text-align: left; vertical-align: top; padding: 12px 14px; }
table.opts th { font-weight: 800; font-stretch: 108%; border-bottom: 4px solid var(--ink); }
table.opts td { border-bottom: 2px solid var(--zinc-2); }
table.opts tr.pick td { background: var(--panel); }
table.opts tr.pick td:first-child { box-shadow: inset 6px 0 0 var(--red); }
table.opts .k { font-weight: 800; white-space: nowrap; }

.note {
  background: var(--amber-bg); border-left: 8px solid var(--amber);
  padding: 14px 18px; border-radius: 0 10px 10px 0; max-width: 64ch;
}
.note b { display: block; margin-bottom: 2px; }
.plain { background: var(--panel); border-radius: 10px; padding: 14px 20px 16px; max-width: 64ch; }
.plain h2 { font-size: var(--fs-h2); font-weight: 800; font-stretch: 110%; margin: 0 0 6px; line-height: 1.1; }
.plain p { margin: 0; }
.plain ul { margin: 0; padding-left: 1.1em; }
.tags > .plain + .plain { margin-top: -6px; }

.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.big { font-size: 2.1em; font-weight: 800; font-stretch: 115%; line-height: 1; }

/* ---------- lockout tags ---------- */
.tags { display: flex; flex-direction: column; gap: 18px; }
.tag {
  position: relative; background: var(--panel); border: 3px solid var(--red);
  border-radius: 16px 16px 12px 12px; padding: 0 0 16px; overflow: hidden;
  box-shadow: 0 2px 0 var(--zinc-2);
}
.tag .band {
  background: var(--red); color: #fff; font-weight: 700; padding: 28px 18px 6px;
  position: relative; font-size: var(--fs-small);
}
.tag .band::before { /* grommet */
  content: ""; position: absolute; top: 7px; left: 50%; width: 18px; height: 18px; margin-left: -9px;
  border-radius: 50%; background: var(--zinc); box-shadow: inset 0 0 0 4px #e0b4bb;
}
.tag .q { font-weight: 800; padding: 12px 18px 4px; line-height: 1.2; }
.tag .hint { color: var(--steel); padding: 0 18px 6px; font-size: var(--fs-small); }
.tag .choices { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 18px 2px; }
.tag .choices button {
  all: unset; cursor: pointer; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--ink);
  font-weight: 600; font-size: var(--fs-small);
}
.tag .choices button:hover { background: var(--zinc); }
.tag .choices button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tag .choices button:focus-visible, .tag input:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.tag label { display: block; padding: 6px 18px 0; font-size: var(--fs-small); color: var(--steel); }
.tag input {
  display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 1em; color: var(--ink);
  padding: 6px 10px; border: 2px solid var(--zinc-2); border-radius: 8px; background: #fff;
}
.tag.done { border-color: var(--ink); }
.tag.done .band { background: var(--ink); }
.tag.done .band::before { box-shadow: inset 0 0 0 4px #6b7479; }
.tag .band .state::after { content: "Needs your decision"; }
.tag.done .band .state::after { content: "Decided"; }

/* summary */
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.summary section h2 { border-bottom: 4px solid var(--ink); padding-bottom: 6px; }
.summary dl { margin: 0; }
.summary dt { color: var(--steel); font-size: var(--fs-small); margin-top: 12px; }
.summary dd { margin: 2px 0 0; font-weight: 700; }
.summary dd.empty { color: var(--red); font-weight: 600; }
.btn {
  all: unset; cursor: pointer; display: inline-block; background: var(--ink); color: #fff;
  padding: 12px 22px; border-radius: 10px; font-weight: 700;
}
.btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.foot { position: absolute; right: calc(var(--gap) * 1.6); bottom: 14px; color: var(--steel); font-size: var(--fs-small); }

@media (max-width: 900px) {
  body { overflow: auto; }
  .frame { grid-template-columns: 1fr; height: auto; }
  .rail { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .rail ol { flex-direction: row; flex-wrap: wrap; }
  .rail .spacer, .rail .keys { display: none; }
  .deck { overflow: visible; }
  .slide { position: relative; display: none; }
  .slide.on { display: grid; }
  .slide { grid-template-columns: 1fr; }
  .tags { grid-column: 1; grid-row: auto; }
  .cols2, .summary { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .slide.on { transition: none; } }
