/* ============================================================
   FIELD OPERATIONS — after-action boards
   Self-contained skin (no styles.css), so it carries its own reset.

   This is the working end of the agency, so it looks like work:
   steel and cyan, a dossier strip across the top, and a numbered
   spine of events down the left that you walk rather than browse.
   No amber archive, no television, no curtains. A room with a
   whiteboard in it and somebody's coffee going cold.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --fo-room:   #05090e;
  --fo-panel:  #0b131c;
  --fo-panel2: #101c28;
  --fo-rule:   #1d2f40;
  --fo-rule-hi:#2f4a63;
  --fo-ink:    #dbe9f4;
  --fo-dim:    #9ab2c6;
  --fo-low:    #6a8298;
  --fo-cyan:   #22d3ee;
  --fo-cyan-d: #0e7f92;
  --fo-gold:   #f0b429;
  --fo-green:  #34d399;
  --fo-violet: #a855f7;
  --fo-red:    #e2483d;
  --fo-mono: "Share Tech Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fo-disp: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --fo-pad: clamp(1rem, 3vw, 2.2rem);
}

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

body.fo-body {
  margin: 0;
  min-height: 100dvh;
  background: var(--fo-room);
  color: var(--fo-ink);
  font-family: var(--fo-disp);
  font-size: 17px;
  line-height: 1.5;
  background-image:
    radial-gradient(ellipse 110% 55% at 50% 0%, rgba(34, 211, 238, .06), transparent 62%),
    linear-gradient(rgba(47, 74, 99, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 74, 99, .06) 1px, transparent 1px);
  background-size: auto, 46px 46px, 46px 46px;
}

.fo-skip { position: absolute; left: -9999px; top: 0; background: var(--fo-cyan); color: #04121a; padding: .6rem 1rem; z-index: 100; }
.fo-skip:focus { left: 0; }

/* ------------------------------------------------------- top rail */
.fo-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: .7rem var(--fo-pad);
  border-bottom: 1px solid var(--fo-rule);
  background: linear-gradient(180deg, rgba(11, 19, 28, .96), rgba(5, 9, 14, .9));
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(6px);
}
.fo-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.fo-brand img { display: block; border-radius: 4px; }
.fo-brand strong { display: block; font-size: 1rem; letter-spacing: .1em; color: #fff; }
.fo-brand em {
  display: block; font-style: normal; font-family: var(--fo-mono);
  font-size: .63rem; letter-spacing: .2em; color: var(--fo-cyan-d);
}
.fo-top-right { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.fo-clr {
  font-family: var(--fo-mono); font-size: .62rem; letter-spacing: .16em;
  border: 1px solid var(--fo-gold); color: var(--fo-gold);
  padding: .3rem .55rem; border-radius: 2px;
}

.fo-wrap { max-width: 84rem; margin: 0 auto; padding: var(--fo-pad) var(--fo-pad) 5rem; }

/* --------------------------------------------------------- header */
.fo-kicker {
  margin: 0 0 .5rem; font-family: var(--fo-mono);
  font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--fo-cyan);
}
.fo-wrap h1 {
  margin: 0; font-size: clamp(2rem, 6.5vw, 3.6rem); line-height: 1;
  letter-spacing: .02em; color: #fff; text-wrap: balance;
}
.fo-strap {
  margin: .4rem 0 0; font-family: var(--fo-mono); font-size: .72rem;
  letter-spacing: .16em; color: var(--fo-low);
}

/* the dossier strip */
.fo-dossier {
  display: grid; gap: .7rem; margin: 1.5rem 0 0;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  border-top: 1px solid var(--fo-rule); border-bottom: 1px solid var(--fo-rule);
  padding: .9rem 0;
}
.fo-d span {
  display: block; font-family: var(--fo-mono); font-size: .6rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--fo-low);
}
.fo-d b {
  display: block; font-family: var(--fo-mono); font-size: .86rem;
  color: var(--fo-ink); line-height: 1.3;
}
.fo-d.is-status b { color: var(--fo-gold); }

.fo-brief { margin: 1.4rem 0 0; max-width: 68ch; }
.fo-brief p { margin: 0 0 .8rem; color: var(--fo-dim); font-size: 1.04rem; }

/* ================================================== the board */
.fo-board { margin: 2.2rem 0 0; display: grid; gap: 1.4rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 62rem) {
  .fo-board { grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); align-items: start; }
  .fo-viewer { position: sticky; top: 5.4rem; }
}

/* ---------------------------------------------------- the viewer */
/* Below the two-column breakpoint the viewer is the full page width,
   and a 704x1280 frame at that width is over a thousand pixels tall -
   it stops being a monitor and becomes the whole page. Hold it to the
   width it gets in the sidebar and centre it. */
.fo-viewer { display: grid; gap: .8rem; max-width: 21rem; margin-inline: auto; width: 100%; }
@media (min-width: 62rem) { .fo-viewer { margin-inline: 0; } }
.fo-monitor {
  position: relative;
  aspect-ratio: 704 / 1280;
  background: #02060a;
  border: 1px solid var(--fo-rule-hi);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
}
.fo-monitor .cap { position: absolute; inset: 0; height: 100%; }
.fo-monitor .cap video { width: 100%; height: 100%; object-fit: cover; }

/* the standby card, before anything is selected */
.fo-standby {
  position: absolute; inset: 0; z-index: 8;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; padding: 1.2rem; text-align: center;
  background: radial-gradient(ellipse at center, #0a1620 0%, #04080c 78%);
  font-family: var(--fo-mono);
}
.fo-standby b { font-size: 1rem; letter-spacing: .2em; color: var(--fo-cyan); font-weight: 400; }
.fo-standby span { font-size: .66rem; letter-spacing: .14em; color: var(--fo-low); max-width: 26ch; line-height: 1.6; }

.fo-controls { display: flex; flex-wrap: wrap; gap: .4rem; }
.fo-key {
  flex: 1 1 auto; min-width: 5rem; min-height: 44px;
  font-family: var(--fo-mono); font-size: .63rem; letter-spacing: .1em; text-transform: uppercase;
  background: linear-gradient(180deg, #13202c, #0d1721);
  color: var(--fo-dim);
  border: 1px solid var(--fo-rule-hi); border-radius: 4px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 2px 0 #060b10;
}
.fo-key:hover { color: #fff; border-color: var(--fo-cyan); }
.fo-key[aria-pressed="true"] { color: #04121a; background: var(--fo-cyan); border-color: var(--fo-cyan); }
.fo-key:active { transform: translateY(1px); box-shadow: none; }

.fo-nowcard {
  background: var(--fo-panel); border: 1px solid var(--fo-rule);
  border-left: 3px solid var(--fo-cyan); padding: .85rem 1rem;
}
.fo-nowcard .fo-nref {
  display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap;
  font-family: var(--fo-mono); font-size: .62rem; letter-spacing: .1em; color: var(--fo-low);
}
.fo-nowcard h2 { margin: .3rem 0 .35rem; font-size: 1.3rem; color: #fff; line-height: 1.15; }
.fo-nowcard p { margin: 0 0 .5rem; color: var(--fo-dim); font-size: .95rem; }
.fo-nowcard .fo-note {
  margin: 0; font-family: var(--fo-mono); font-size: .72rem; line-height: 1.55;
  color: var(--fo-cyan-d); border-left: 2px solid var(--fo-rule-hi); padding-left: .55rem;
}
.fo-nowcard .fo-note::before { content: "BOARD NOTE  "; color: var(--fo-low); }

/* ------------------------------------------------------ the spine */
.fo-spine { min-width: 0; }
.fo-spine > h2 {
  margin: 0 0 .2rem; font-size: .82rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--fo-cyan); border-bottom: 1px solid var(--fo-rule); padding-bottom: .45rem;
}
.fo-spine > p {
  margin: .6rem 0 1rem; color: var(--fo-dim); font-size: .95rem; max-width: 62ch;
}

.fo-events { list-style: none; margin: 0; padding: 0 0 0 1.6rem; position: relative; }
/* the spine itself */
.fo-events::before {
  content: ""; position: absolute; left: .42rem; top: .5rem; bottom: .5rem;
  width: 1px; background: var(--fo-rule);
}
.fo-ev { position: relative; margin: 0 0 .55rem; }
.fo-ev::before {
  content: ""; position: absolute; left: -1.32rem; top: 1.05rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--fo-room); border: 1px solid var(--fo-rule-hi);
}
.fo-ev.is-on::before { background: var(--fo-cyan); border-color: var(--fo-cyan); box-shadow: 0 0 10px var(--fo-cyan); }
.fo-ev.is-done::before { background: var(--fo-rule-hi); }

.fo-evbtn {
  display: grid; gap: .3rem; width: 100%; text-align: left;
  background: var(--fo-panel); border: 1px solid var(--fo-rule);
  border-radius: 3px; padding: .7rem .85rem; min-height: 44px;
  cursor: pointer; -webkit-tap-highlight-color: transparent; color: inherit;
  font: inherit;
  transition: border-color .15s, background .15s;
}
.fo-evbtn:hover { border-color: var(--fo-rule-hi); background: var(--fo-panel2); }
.fo-ev.is-on .fo-evbtn { border-color: var(--fo-cyan); background: var(--fo-panel2); }

.fo-evhead {
  display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap;
  font-family: var(--fo-mono); font-size: .62rem; letter-spacing: .1em; color: var(--fo-low);
}
.fo-tc { color: var(--fo-cyan); }
.fo-src {
  border: 1px solid currentColor; border-radius: 2px; padding: .05rem .3rem; font-size: .92em;
}
.fo-src-intercept { color: var(--fo-cyan) }
.fo-src-seccam    { color: var(--fo-green) }
.fo-src-chrono    { color: var(--fo-gold) }
.fo-evbtn strong { font-family: var(--fo-disp); font-size: 1.14rem; color: #fff; font-weight: 400; line-height: 1.2; }
.fo-evbtn span.fo-syn { color: var(--fo-dim); font-size: .92rem; }

/* -------------------------------------------------------- outcome */
.fo-outcome { margin: 2.6rem 0 0; }
.fo-outcome h2, .fo-others h2 {
  margin: 0 0 .8rem; font-size: .82rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--fo-cyan); border-bottom: 1px solid var(--fo-rule); padding-bottom: .45rem;
}
.fo-outcome p { margin: 0 0 .9rem; color: var(--fo-dim); max-width: 70ch; font-size: 1.02rem; }
.fo-stamp {
  font-family: var(--fo-mono); font-size: .76rem; line-height: 1.6; letter-spacing: .06em;
  color: var(--fo-gold); border: 1px dashed rgba(240, 180, 41, .5);
  padding: .7rem .9rem; max-width: 70ch;
}

/* ------------------------------------------------ other boards */
.fo-others { margin: 2.6rem 0 0; }
.fo-oplist {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.fo-oplist a {
  display: block; text-decoration: none; color: inherit;
  background: var(--fo-panel); border: 1px solid var(--fo-rule);
  border-left: 3px solid var(--fo-rule-hi); padding: .75rem .9rem;
}
.fo-oplist a:hover { border-left-color: var(--fo-cyan); }
.fo-oplist span {
  font-family: var(--fo-mono); font-size: .6rem; letter-spacing: .16em; color: var(--fo-low);
  display: flex; justify-content: space-between; gap: .5rem;
}
.fo-oplist b { display: block; font-size: 1.1rem; color: #fff; font-weight: 400; margin-top: .15rem; }
.fo-c-gold a   { border-left-color: var(--fo-gold) }
.fo-c-violet a { border-left-color: var(--fo-violet) }
.fo-c-green a  { border-left-color: var(--fo-green) }
.fo-c-red a    { border-left-color: var(--fo-red) }
.fo-c-cyan a   { border-left-color: var(--fo-cyan-d) }

/* --------------------------------------------------------- footer */
.fo-foot {
  margin-top: 3rem; padding-top: 1.1rem; border-top: 1px solid var(--fo-rule);
  font-family: var(--fo-mono); font-size: .74rem; color: var(--fo-low);
}
.fo-foot a { color: var(--fo-cyan); }
.fo-foot p { margin: 0 0 .4rem; max-width: 76ch; }

.fo-key:focus-visible, .fo-evbtn:focus-visible, .fo-oplist a:focus-visible {
  outline: 2px solid var(--fo-cyan); outline-offset: 2px;
}

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .fo-evbtn { transition: none !important; }
}
