/* BreakBoard. Built from the brand kit and the reference pack: Inter; charcoal, mint, canvas, gray,
   slate and white; 12, 20 and 32px corners. Calm and operational, never alarming.
   --mint-ink is a darker mint for text (the brand mint is too light to read on white). The blue,
   amber and red status colours are not in the kit; a status board needs them. */
@font-face {
  font-family: Inter;
  src: url(/fonts/InterVariable.woff2) format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #f7faf9; --card: #fff; --text: #263238; --dim: #52615f; --line: #d8e0de; --surface: #eef3f1;
  --mint: #55d6b2; --mint-ink: #136b55; --mint-bg: #dff6ef; --mine: #f1fbf8;
  --on-mint: #263238; /* text on a mint background */
  --blue: #2f5e9e; --blue-bg: #e6effb;
  --d-blue: #2f5e9e; --d-amber: #8a4b00; --d-due: #b3261e; /* the defaults, for custom colours to fall back on */
  --amber: #8a4b00; --amber-bg: #fdf0d9;
  --due: #b3261e; --due-bg: #fce8e6;
  --r-sm: 12px; --r-md: 20px; --r-lg: 32px;
  --shadow: 0 1px 2px rgb(38 50 56 / 5%), 0 10px 30px rgb(38 50 56 / 7%);
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #161f23; --card: #1f2a2f; --text: #f2f6f5; --dim: #a9b8b5; --line: #33434a; --surface: #27353b;
  --mint-ink: #55d6b2; --mint-bg: rgb(85 214 178 / .15); --mine: rgb(85 214 178 / .07);
  --blue: #9dc3f5; --blue-bg: rgb(120 170 240 / .15);
  --d-blue: #9dc3f5; --d-amber: #ffcf8a; --d-due: #ff8a80;
  --amber: #ffcf8a; --amber-bg: rgb(255 190 100 / .14);
  --due: #ff8a80; --due-bg: rgb(255 138 128 / .14);
  --shadow: 0 0 #0000; /* not "none": it is combined with other shadows */
}
/* This device's own colours (theme.js sets the --c- values it has). Everything else is mixed from them. */
:root[data-custom] {
  --bg: var(--c-bg); --text: var(--c-text); --mint: var(--c-accent); --on-mint: var(--c-on);
  --card: var(--c-card, color-mix(in srgb, var(--c-bg) 94%, var(--c-text)));
  /* status colours: picked, or the theme's own; their tints are mixed into the card colour */
  --blue: var(--c-blue, var(--d-blue)); --amber: var(--c-amber, var(--d-amber)); --due: var(--c-due, var(--d-due));
  --blue-bg: color-mix(in srgb, var(--blue) 14%, var(--card));
  --amber-bg: color-mix(in srgb, var(--amber) 14%, var(--card));
  --due-bg: color-mix(in srgb, var(--due) 14%, var(--card));
  --surface: color-mix(in srgb, var(--c-bg) 88%, var(--c-text));
  --line: color-mix(in srgb, var(--c-bg) 78%, var(--c-text));
  --dim: color-mix(in srgb, var(--c-text) 72%, var(--c-bg));
  --mint-ink: color-mix(in srgb, var(--c-accent) 50%, var(--c-text));
  --mint-bg: color-mix(in srgb, var(--c-accent) 20%, var(--c-bg));
  --mine: color-mix(in srgb, var(--c-accent) 8%, var(--c-bg));
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--mint-ink); }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:focus-visible { outline: 2px solid var(--mint-ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

#app { max-width: 1280px; margin: 0 auto; padding: 20px 20px 96px; }
.narrow #app { max-width: 1120px; }

/* ---------- Controls ---------- */
button, input, select { font: inherit; color: inherit; }
button, input, select {
  min-height: 44px; padding: 9px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card);
}
input::placeholder { color: color-mix(in srgb, var(--dim) 75%, transparent); }
option { background: var(--card); color: var(--text); }
button { cursor: pointer; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:hover { background: var(--surface); }
button:disabled { opacity: .45; cursor: default; }
.primary, .primary:hover { background: var(--mint); color: var(--on-mint); border-color: var(--mint); }
.primary:hover { filter: brightness(.96); }
.danger { color: var(--due); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 16px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--text);
  font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface); }
.btn.primary, .btn.primary:hover { background: var(--mint); color: var(--on-mint); border-color: var(--mint); }
.btn.big, button.big { min-height: 52px; padding: 12px 24px; font-size: 1.05rem; border-radius: var(--r-sm); }
.armed, .armed:hover { background: var(--due); color: var(--card); border-color: var(--due); }
.ibtn { width: 44px; padding: 0; }
.ibtn .i { width: 20px; height: 20px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1; }
.row input { min-width: 0; }
select { min-width: 0; }
input[type=color] { flex: none; width: 48px; padding: 3px; }
.note { margin: 0 0 8px; color: var(--dim); font-size: .875rem; }
.push { margin-right: auto; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.num { text-align: right; }
.check { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--dim); font-size: .875rem; cursor: pointer; }
.check input { flex: none; min-height: 0; width: 18px; height: 18px; padding: 0; accent-color: var(--mint); }

/* ---------- App bar ---------- */
header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h1 { margin: 0; font-size: 1.45rem; font-weight: 750; letter-spacing: -.035em; line-height: 1.05; }
h1 b { color: var(--mint); font-weight: inherit; }
h1 a { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-text { display: grid; }
.tagline { color: var(--dim); font-size: .72rem; font-weight: 500; letter-spacing: 0; }
.appbar { padding: 4px 0 16px; }
.appbar .sep { width: 1px; height: 32px; background: var(--line); margin: 0 6px; }
#board-name { font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.today { color: var(--dim); font-weight: 500; white-space: nowrap; }
.clockchip { padding: 6px 12px; border-radius: var(--r-sm); background: var(--mint-bg); color: var(--mint-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.appbar .spacer { margin-left: auto; }
.navlink { color: var(--text); font-weight: 600; text-decoration: none; padding: 8px 10px; border-radius: var(--r-sm); }
.navlink:hover { background: var(--surface); }
#chat-btn { position: relative; }
#chat-dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--due); box-shadow: 0 0 0 2px var(--card); }
@media (max-width: 1100px) {
  .appbar .sep, .today { display: none; }
  #board-name { order: 5; flex-basis: 100%; }
  #board-name:empty { display: none; }
}
@media (max-width: 600px) {
  .clockchip, .tagline { display: none; }
  .appbar .label { display: none; }
}

/* colour mark on light, the kit's one-colour white mark on dark */
.logo-w, [data-theme=dark] .logo-c { display: none; }
[data-theme=dark] .logo-w { display: inline; }

/* ---------- Cards, notices, banners ---------- */
.card, .panel {
  padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow);
}
.notice {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--mine); font-weight: 600;
}
#retired { margin-top: 20px; }
#alert {
  position: sticky; top: 0; z-index: 3; padding: 14px 16px; text-align: center; cursor: pointer;
  background: var(--mint); color: var(--on-mint); font-weight: 700;
}
#offline { display: none; padding: 10px 16px; text-align: center; background: var(--due-bg); color: var(--due); font-weight: 600; }
.offline #offline { display: block; }
.offline #app { opacity: .5; }
#toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 10; translate: -50% 0; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: var(--r-sm); background: var(--text); color: var(--bg); font-weight: 600;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
#toast.show { opacity: 1; pointer-events: auto; }
#toast button { min-height: 32px; padding: 4px 12px; border-color: currentColor; background: none; color: inherit; }

/* ---------- Board: toolbar, summary, notices ---------- */
#add {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 10px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card);
}
#add .i { color: var(--dim); margin-left: 6px; }
.tfield { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: .85rem; font-weight: 600; }
#name { flex: 1 1 200px; min-width: 0; border-color: transparent; background: none; }
#name:focus { border-color: var(--line); background: var(--card); }

/* Today at a glance: one card per number, each with its colour */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 0 0 20px; }
.stat {
  --tone: var(--blue); --tone-bg: var(--blue-bg);
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--r-md);
  background: var(--card); box-shadow: inset 0 3px 0 var(--tone), var(--shadow);
  color: var(--dim); font-size: .875rem; font-weight: 600;
}
.stat > span:last-child { display: grid; min-width: 0; }
.stat b { color: var(--text); font-size: 1.75rem; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat small { color: var(--due); font-size: .78rem; }
.ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--tone-bg); color: var(--tone); }
.ic .i { width: 22px; height: 22px; }
.s-mint, .limit { --tone: var(--mint-ink); --tone-bg: var(--mint-bg); }
.s-amber, .limit.full { --tone: var(--amber); --tone-bg: var(--amber-bg); }
.s-gray { --tone: var(--dim); --tone-bg: var(--surface); }
.limit b { font-size: 1.25rem; }
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; gap: 10px; }
  .stat .ic { width: 36px; height: 36px; }
  .limit { grid-column: 1 / -1; }
}

#due { flex-wrap: wrap; border-color: var(--mint-ink); }
#due .row { flex: 1 1 260px; }
#myshift { background: var(--card); font-weight: 500; }
#myshift .i { color: var(--mint-ink); }

#whoami { margin-bottom: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--mine); }
#whoami strong { font-size: 1.1rem; }
#whoami .note { display: block; margin: 4px 0 0; }
#whoami-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }

#empty { text-align: center; padding: 56px 16px; color: var(--dim); border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--card); }
#empty strong { display: block; margin: 14px 0 4px; color: var(--text); font-size: 1.4rem; letter-spacing: -.03em; }

/* ---------- Board: the table ---------- */
#grid, .tablebox {
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow); overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }
th {
  padding: 14px 16px; text-align: left; color: var(--dim);
  font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; border-bottom: 1px solid var(--line);
}
td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:first-child td { border-top: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--surface) 45%, transparent); }

/* The board itself: each person is a soft row of their own, with a coloured edge for their status
   (blue at console, mint on break, amber due, red over). */
#grid { border: 0; background: none; box-shadow: none; }
#grid table { border-collapse: separate; border-spacing: 0 10px; margin-top: -10px; }
#grid th { border: 0; padding-top: 4px; padding-bottom: 0; }
#grid tbody tr { --edge: var(--blue); background: var(--card); box-shadow: var(--shadow); }
#grid tbody tr.out { --edge: var(--mint); }
#grid tbody tr.due { --edge: var(--amber); }
#grid tbody tr.over { --edge: var(--due); }
#grid tbody tr.mine { background: var(--mine); }
#grid td { border: 0; padding: 16px 18px; }
#grid td:first-child { border-radius: var(--r-md) 0 0 var(--r-md); box-shadow: inset 4px 0 0 var(--edge); width: 34%; min-width: 260px; }
#grid td:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
#grid .name { font-size: 1.05rem; }
#grid .avatar { width: 46px; height: 46px; }
#grid .breaks { max-width: 260px; }
[data-theme=dark] #grid tbody tr { box-shadow: 0 0 0 1px var(--line); }
.planned, .timer, .chip, .time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.time { color: var(--dim); font-weight: 600; }
.time b { color: var(--text); }
.actions { text-align: right; white-space: nowrap; }
.actions button { min-height: 38px; padding: 6px 12px; margin-left: 6px; }
.actions .more { width: 38px; padding: 0; }
.lbl { color: var(--dim); font-size: .85rem; }
.lbl:not(.done) { display: none; } /* wide screens: the column header already says "Start a break" */

.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who-text { display: grid; gap: 2px; min-width: 0; }
.who-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.who .meta { color: var(--dim); font-size: .82rem; }
.avatar {
  flex: none; width: 42px; height: 42px; min-height: 0; padding: 0; border: 0; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--surface); color: var(--text); font-weight: 700; line-height: 1; font-size: 1rem;
}
.avatar:hover { background: var(--surface); }
.avatar img { width: 100%; height: 100%; display: block; }
.avatar.ring { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--mint); } /* leads */
.mine .avatar { background: var(--text); color: var(--bg); }
.name { font-weight: 650; overflow-wrap: break-word; min-width: 0; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--dim); font-size: .72rem; font-weight: 600; }
.tag .i { width: 13px; height: 13px; }
.you { color: var(--mint-ink); border-color: color-mix(in srgb, var(--mint-ink) 45%, transparent); background: var(--mint-bg); }
.foodbtn { min-height: 0; padding: 1px 8px; cursor: pointer; background: none; }
.chip {
  display: inline-block; margin: 2px 6px 2px 0; padding: 3px 9px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--dim); font-size: .78rem;
}
.late { color: var(--due); border-color: color-mix(in srgb, var(--due) 50%, transparent); }
tr.mine { background: var(--mine); }
tr.mine:hover { background: var(--mine); }

/* status pills: At console (blue), On break (mint), Break due (amber), Over (red) */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font-size: .8rem; font-weight: 650; white-space: nowrap; background: var(--blue-bg); color: var(--blue);
}
.pill .i { width: 15px; height: 15px; }
.pill.st-out { background: var(--mint-bg); color: var(--mint-ink); }
.pill.st-due { background: var(--amber-bg); color: var(--amber); }
.pill.st-over { background: var(--due-bg); color: var(--due); }
.pill.st-ok { background: var(--mint-bg); color: var(--mint-ink); }
.progress { height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; margin-top: 6px; min-width: 90px; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--mint); }
.over .progress span { background: var(--due); }

#away { margin-top: 16px; color: var(--dim); }
#away summary { padding: 8px 0; cursor: pointer; font-size: .875rem; font-weight: 600; }
#away-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
#away-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card);
}

/* When the board's own column is narrow (a phone, a tablet or a small window)
   each row stacks into name + status, then the details. */
@container board (max-width: 900px) {
  #grid thead { display: none; }
  #grid table { margin: 0; }
  #grid table, #grid tbody { display: block; }
  #grid tbody { display: grid; gap: 10px; }
  #grid tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; padding: 14px 16px;
    border-radius: var(--r-md); box-shadow: inset 4px 0 0 var(--edge), var(--shadow);
  }
  [data-theme=dark] #grid tbody tr { box-shadow: inset 4px 0 0 var(--edge), 0 0 0 1px var(--line); }
  #grid td, #grid td:first-child { padding: 0; border: 0; border-radius: 0; box-shadow: none; width: auto; min-width: 0; }
  #grid td:empty { display: none; }
  .status { justify-self: end; }
  .time, .planned, .breaks, .actions { grid-column: 1 / -1; }
  .time { font-size: .875rem; }
  .planned { color: var(--dim); font-size: .85rem; }
  .planned::before { content: 'Planned '; }
  .actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
  .actions button { flex: 1; max-width: 140px; margin: 0; min-height: 40px; }
  .actions .more { flex: none; }
  .actions .lbl { display: inline; margin-right: auto; }
}
/* Phones: the big "Take a break" button at the bottom does your own row; everyone else's is in their menu */
@media (max-width: 760px) {
  .actions .lbl, .actions button:not(.more) { display: none; }
  .actions { justify-content: space-between; }
  #grid tr { grid-template-columns: minmax(0, 1fr) auto; }
  #grid .actions { grid-column: 2; grid-row: 1; }
  #grid .status { grid-column: 1 / -1; justify-self: start; }
}

/* the pinned button on a phone */
#takebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
#takebar button { width: 100%; min-height: 56px; font-size: 1.1rem; border-radius: var(--r-md); box-shadow: var(--shadow); }
#takebar .i { width: 22px; height: 22px; }
@media (min-width: 761px) { #takebar { display: none; } }

/* ---------- Dialogs and sheets ---------- */
dialog {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 28px; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgb(38 50 56 / .5); }
dialog h2 { margin: 0 0 8px; font-size: 1.45rem; font-weight: 750; letter-spacing: -.03em; overflow-wrap: anywhere; }
dialog h3 { margin: 18px 0 8px; font-size: .8rem; font-weight: 650; color: var(--dim); letter-spacing: .02em; }
dialog form[method=dialog] { margin-top: 20px; } /* the Close button; other forms in a dialog are plain rows */
dialog form[method=dialog] button { width: 100%; }
dialog .row { margin-bottom: 8px; }
.sheet-lead { margin: 0 0 16px; color: var(--dim); }
@media (max-width: 760px) { /* on a phone, dialogs rise from the bottom */
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px)); }
  dialog::before { content: ''; display: block; width: 44px; height: 5px; margin: -8px auto 14px; border-radius: 999px; background: var(--line); }
}

#emojis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 8px; }
#emojis button { padding: 0; font-size: 1.3rem; }
#plan-form input, #plan-min { flex: 1 1 110px; }
#pass-form input { flex: 1 1 100%; }

/* the person menu: two columns on a computer, so there is little to scroll */
@media (min-width: 820px) {
  #menu { width: min(800px, calc(100vw - 32px)); }
  #menu-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-items: start; }
  .col > :first-child, .col > form:first-child > h3:first-child { margin-top: 0; }
  #pass-form input { flex: 1 1 130px; }
}
.menu-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.menu-head h2 { margin: 0; }
#menu-break { margin-bottom: 8px; }

/* choice chips (break length, now or later, food) */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-bottom: 8px; }
.pick, .choice {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; font-weight: 650; background: var(--card);
}
.pick { justify-content: flex-start; }
.pick input, .choice input { min-height: 0; width: 18px; height: 18px; padding: 0; accent-color: var(--mint); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.pick:has(:checked), .choice:has(:checked) { border-color: var(--mint-ink); background: var(--mint-bg); color: var(--mint-ink); box-shadow: 0 0 0 1px var(--mint-ink) inset; }
.choice:has(:disabled) { opacity: .45; cursor: default; }
#food-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
#food-people { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.review { display: flex; align-items: center; gap: 12px; padding: 14px; margin: 8px 0 16px; border-radius: var(--r-sm); background: var(--surface); color: var(--dim); font-size: .875rem; }
.review .i { width: 26px; height: 26px; color: var(--text); }
.review strong { color: var(--text); display: block; }

/* the sign-in box at a board's own address */
#gate .gate-logo { display: block; margin: 0 auto 12px; }
#gate h2 { text-align: center; }

/* ---------- Settings: a side menu and one section at a time ---------- */
#settings { width: min(1000px, calc(100vw - 32px)); padding: 0; overflow: hidden; }
#settings[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100dvh - 32px); }
.set-head { padding: 24px 28px 8px; }
.set-head h2 { font-size: 1.9rem; margin: 0; }
.set-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 0; }
.set-nav { display: grid; align-content: start; gap: 4px; padding: 12px; border-right: 1px solid var(--line); overflow-y: auto; }
.set-nav button { justify-content: flex-start; border: 0; background: none; color: var(--text); font-weight: 600; min-height: 44px; }
.set-nav button:hover { background: var(--surface); }
.set-nav button[aria-current=true] { background: var(--mint-bg); color: var(--mint-ink); }
.set-panels { padding: 12px 28px 24px; overflow-y: auto; min-height: 0; }
.set-panel h3:first-of-type { margin-top: 6px; }
.set-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 28px; border-top: 1px solid var(--line); background: var(--surface); }
.set-foot .i { width: 30px; height: 30px; color: var(--mint-ink); }
.set-foot p { margin: 0; flex: 1 1 260px; font-size: .875rem; color: var(--dim); }
.set-foot strong { color: var(--text); display: block; }
.set-foot form { margin: 0; }
@media (max-width: 760px) {
  #settings[open] { max-height: 92dvh; }
  .set-body { grid-template-columns: 1fr; }
  .set-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .set-panels { padding: 12px 20px 20px; }
  .set-head, .set-foot { padding-inline: 20px; }
  #settings::before { display: none; }
}

/* ---------- Share ---------- */
#share-dialog { width: min(720px, calc(100vw - 32px)); }
.share-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); margin: 12px 0 16px; }
.qrbox { padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
#qr { display: block; width: 180px; height: 180px; }
.linkbox { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); margin: 6px 0 12px; }
#share-link { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; font-weight: 600; font-size: .9rem; color: var(--text); }
.linkbox button { min-height: 36px; width: 36px; padding: 0; border: 0; background: none; }
.optrow { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.optrow > .i { width: 40px; height: 40px; padding: 9px; border-radius: var(--r-sm); background: var(--surface); }
.optrow div { flex: 1; min-width: 0; }
.optrow strong { display: block; }
.optrow p { margin: 0; color: var(--dim); font-size: .85rem; }
.optrow button { flex: none; }
.poster { display: none; }
@media (max-width: 600px) {
  .share-grid { grid-template-columns: 1fr; justify-items: center; }
  .share-grid > div { width: 100%; }
  .optrow { flex-wrap: wrap; }
}
/* Print from the Share panel: a one-page poster with the mark, the QR code and the link */
@media print {
  body > :not(#share-dialog), #share-dialog button, #share-dialog .btn, #share-dialog h2, #share-note, .optrow, .sheet-lead { display: none !important; }
  dialog::backdrop { display: none; }
  #share-dialog { position: static; width: auto; max-height: none; margin: 12vh auto 0; border: 0; box-shadow: none; background: #fff; color: #263238; text-align: center; }
  .share-grid { display: block; border: 0; }
  .qrbox { display: inline-block; border: 0; }
  .poster { display: block; margin: 0 auto 24px; }
  #qr { width: 320px; height: 320px; }
  .linkbox { border: 0; background: none; justify-content: center; }
  #share-link { color: #263238; font-size: .9rem; }
}

/* ---------- Chat ---------- */
#layout { display: grid; gap: 16px; }
#main { min-width: 0; container: board / inline-size; }
#main > :first-child { margin-top: 0; }
#chat {
  display: none; flex-direction: column; gap: 10px; min-width: 0; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow);
}
.chat-open #chat { display: flex; position: fixed; inset: 0; z-index: 5; border: 0; border-radius: 0; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-head h2 { margin: 0; font-size: 1.35rem; font-weight: 750; letter-spacing: -.03em; }
#chat-log { flex: 1; min-height: 0; list-style: none; margin: 0; padding: 0 4px 0 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
#chat-log li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 10px; align-items: start; max-width: 92%; }
#chat-log .cav { grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-weight: 700; font-size: .85rem; }
#chat-log strong { font-size: .875rem; }
#chat-log time { margin-left: 8px; color: var(--dim); font-size: .75rem; font-weight: 500; font-variant-numeric: tabular-nums; }
#chat-log p { margin: 2px 0 0; padding: 10px 14px; border-radius: 4px var(--r-md) var(--r-md) var(--r-md); background: var(--surface); overflow-wrap: anywhere; white-space: pre-wrap; justify-self: start; }
#chat-log li.own { align-self: flex-end; grid-template-columns: minmax(0, 1fr) 36px; }
#chat-log li.own .cav { grid-column: 2; grid-row: 1 / span 2; background: var(--mint-bg); color: var(--mint-ink); }
#chat-log li.own .who-time { text-align: right; grid-column: 1; grid-row: 1; }
#chat-log li.own p { grid-column: 1; justify-self: end; background: var(--mint-bg); border-radius: var(--r-md) 4px var(--r-md) var(--r-md); }
#chat-quick { display: flex; flex-wrap: wrap; gap: 6px; }
#chat-quick button { min-height: 36px; padding: 6px 12px; border-color: transparent; background: var(--mint-bg); color: var(--mint-ink); font-size: .85rem; }
#chat-form { flex-wrap: nowrap; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-md); }
#chat-form input { border: 0; background: none; }
#chat-form button { flex: none; width: 44px; padding: 0; border-radius: 50%; }
#chat-join-list { display: flex; flex-wrap: wrap; gap: 6px; }
#chat .note { margin: 0; }
@media (min-width: 761px) {
  /* opened on a computer or tablet: a small window in the corner, floating over the board, which stays put */
  .chat-open #chat {
    inset: auto 24px 24px auto; width: 380px; height: min(560px, calc(100dvh - 48px));
    border: 1px solid var(--line); border-radius: var(--r-md);
    box-shadow: 0 4px 12px rgb(38 50 56 / 10%), 0 24px 60px rgb(38 50 56 / 22%);
  }
}

/* ---------- Tiles (dashboard and reports) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 16px; }
.tiles div { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.tiles dt { color: var(--dim); font-size: .8rem; font-weight: 600; }
.tiles dd { margin: 4px 0 0; font-size: 1.8rem; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* ---------- Landing page ---------- */
.landing { display: grid; gap: 72px; }
.hero { display: grid; gap: 40px; align-items: center; padding: 40px 0 8px; }
.hero h2 { margin: 0 0 16px; font-size: clamp(2.4rem, 7vw, 4rem); font-weight: 800; line-height: 1.02; letter-spacing: -.045em; }
.lead { max-width: 560px; margin: 0 0 28px; color: var(--dim); font-size: 1.2rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 12px; }
.cta .textlink { color: var(--text); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 1.05fr; } }
.hero > *, .split > *, .cards > *, .landing > * { min-width: 0; } /* let long content wrap instead of widening the page */
.demo-row .pill { white-space: normal; }
.cta > * { max-width: 100%; }
#reopen { white-space: normal; text-align: center; }
@media (max-width: 420px) { .demo-row { grid-template-columns: auto minmax(0, 1fr); } .demo-row > :last-child { grid-column: 2; justify-self: start; } }

.demo { text-align: left; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.demo-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 18px 20px 12px; }
.demo-top h3 { margin: 0; font-size: 1.2rem; font-weight: 750; letter-spacing: -.02em; }
.demo-top .meta { flex-basis: 100%; display: flex; gap: 16px; color: var(--dim); font-size: .85rem; }
.demo-top .meta span { display: inline-flex; align-items: center; gap: 6px; }
.demo-top .meta .i { width: 16px; height: 16px; }
.demo-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.demo-row.mine { background: var(--mine); }
.demo-row .avatar { cursor: default; }
.demo-row .sub { color: var(--dim); font-size: .82rem; }
.demo-row .right { text-align: right; font-size: .82rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.demo-row .progress { width: 110px; margin-left: auto; }

.strip { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding: 24px; border-radius: var(--r-md); background: var(--mine); }
.strip div { display: flex; gap: 14px; align-items: flex-start; }
.strip .i, .feature .i, .callout .i { flex: none; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--mint-bg); color: var(--mint-ink); }
.strip strong, .feature strong { display: block; font-size: 1.02rem; }
.strip p, .feature p { margin: 2px 0 0; color: var(--dim); font-size: .9rem; }

.sec { margin: 0 0 20px; font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.sec-lead { max-width: 640px; margin: -8px 0 24px; color: var(--dim); font-size: 1.05rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.steps li { position: relative; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: var(--dim); }
.steps li::before {
  counter-increment: step; content: counter(step); display: grid; place-items: center; width: 32px; height: 32px;
  margin-bottom: 12px; border-radius: 50%; background: var(--mint); color: var(--on-mint); font-weight: 750;
}
.steps strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 1.08rem; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feature { display: flex; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.rule { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rule:first-of-type { border-top: 0; }
.rule small { display: block; color: var(--dim); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper span { padding: 8px 14px; }
.stepper span + span { border-left: 1px solid var(--line); }
.callout { display: flex; gap: 14px; align-items: center; margin-top: 18px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface); color: var(--dim); font-size: .9rem; }
.callout strong { color: var(--text); }
.callout .i { width: 36px; height: 36px; padding: 8px; }
.final { display: grid; gap: 16px; justify-items: center; text-align: center; padding: 48px 24px; border-radius: var(--r-lg); background: var(--mine); }
.final h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.04em; }
.final p { margin: 0; color: var(--dim); max-width: 520px; }
.site-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--dim); font-size: .875rem; }
.site-foot a { color: inherit; text-decoration: none; }

/* ---------- Landing page: dispatch operations brief ---------- */
.home { background: var(--bg); }
.home #app { max-width: 1440px; padding: 22px clamp(18px, 4vw, 64px) 44px; }
.home-nav { position: relative; z-index: 10; min-height: 64px; padding: 0 0 18px; border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent); }
.home-nav h1 { font-size: 1.35rem; }
.home-nav .tagline { text-transform: uppercase; letter-spacing: .12em; font-size: .61rem; font-weight: 700; }
.home-links { display: flex; align-items: center; gap: 2px; }
.home-nav > .btn { margin-left: 2px; }

.home .landing { display: grid; gap: clamp(76px, 9vw, 132px); }
.ops-hero { display: grid; gap: clamp(38px, 6vw, 78px); align-items: center; min-height: 730px; padding: clamp(54px, 8vw, 108px) 0 48px; }
.hero-copy { max-width: 680px; }
.eyebrow, .section-kicker { margin: 0 0 22px; color: var(--mint-ink); font-size: .76rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow > span { width: 28px; height: 2px; background: var(--mint); }
.ops-hero h2 { margin: 0 0 28px; font-size: clamp(3.2rem, 7vw, 6.4rem); font-weight: 760; letter-spacing: -.065em; line-height: .92; }
.ops-hero h2 em { color: var(--mint-ink); font-style: normal; }
.ops-hero .lead { max-width: 650px; margin: 0 0 30px; color: var(--dim); font-size: clamp(1.08rem, 1.7vw, 1.28rem); line-height: 1.65; }
.home .cta { gap: 12px; margin: 0; }
.home .btn.big { min-height: 56px; padding: 14px 22px; }
.home .reopen { white-space: normal; }
.quiet-link { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 2px; border-bottom: 1px solid currentColor; color: var(--text); font-weight: 700; text-decoration: none; }
.quiet-link:hover { color: var(--mint-ink); }
.hero-assurance { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; color: var(--dim); font-size: .83rem; font-weight: 650; }
.hero-assurance span { display: inline-flex; align-items: center; gap: 7px; }
.hero-assurance .i { width: 17px; height: 17px; color: var(--mint-ink); }

.ops-frame { overflow: hidden; border: 1px solid rgb(255 255 255 / .12); border-radius: 26px; background: #1b272c; color: #f5faf8; box-shadow: 0 34px 90px rgb(27 39 44 / 28%); transform: rotate(.35deg); }
.ops-frame-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid rgb(255 255 255 / .1); color: #aebdba; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ops-frame-bar > div { display: flex; gap: 5px; }
.window-dot { width: 7px; height: 7px; border-radius: 50%; background: #52615f; }
.window-dot:nth-child(2) { background: #71827f; }
.window-dot:nth-child(3) { background: #55d6b2; }
.live-mark { justify-self: end; display: inline-flex; align-items: center; gap: 7px; color: #55d6b2; }
.live-mark i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgb(85 214 178 / .12); }
.ops-summary { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 28px 28px 22px; }
.ops-summary > div span, .list-heading, .ops-summary dt { color: #93a5a1; font-size: .68rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.ops-summary > div strong { display: block; margin-top: 5px; font-size: clamp(1.45rem, 3vw, 2.05rem); letter-spacing: -.035em; }
.ops-summary dl { display: flex; gap: 22px; margin: 0; }
.ops-summary dl div { min-width: 54px; }
.ops-summary dd { margin: 3px 0 0; color: #55d6b2; font-size: 1.35rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.ops-columns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(210px, .85fr); border-top: 1px solid rgb(255 255 255 / .1); }
.coverage-list { border-right: 1px solid rgb(255 255 255 / .1); }
.list-heading { display: flex; justify-content: space-between; padding: 15px 18px 10px; }
.list-heading small { color: #71827f; font: inherit; }
.operator-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 65px; padding: 10px 18px; border-top: 1px solid rgb(255 255 255 / .07); }
.operator-row.mine { background: rgb(85 214 178 / .08); }
.operator-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #304047; color: #dce6e3; font-size: .7rem; font-weight: 800; }
.operator-row.mine .operator-avatar { background: #55d6b2; color: #1b272c; }
.operator-row strong, .operator-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operator-row strong { font-size: .84rem; }
.operator-row small { color: #93a5a1; font-size: .68rem; }
.operator-row b { padding: 5px 8px; border-radius: 7px; font-size: .65rem; font-variant-numeric: tabular-nums; }
.state-console { background: #29373d; color: #b9c7c4; }
.state-break { background: rgb(85 214 178 / .14); color: #70e4c2; }
.relief-queue ol { list-style: none; margin: 0; padding: 0 18px; }
.relief-queue li { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-top: 1px solid rgb(255 255 255 / .07); }
.relief-queue li > span { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #4b5d62; border-radius: 50%; color: #aebdba; font-size: .68rem; font-weight: 800; }
.relief-queue li strong, .relief-queue li small { display: block; }
.relief-queue li strong { font-size: .78rem; }
.relief-queue li small { color: #93a5a1; font-size: .65rem; }
.queue-note { display: flex; gap: 10px; align-items: center; margin: 10px 18px 18px; padding: 12px; border-radius: 11px; background: rgb(85 214 178 / .1); color: #b8c7c3; font-size: .66rem; }
.queue-note .i { color: #55d6b2; }
.queue-note strong { display: block; color: #70e4c2; font-size: .72rem; }

.proof-line { display: grid; gap: 24px; align-items: center; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof-line p { margin: 0; color: var(--text); font-size: 1.05rem; font-weight: 700; }
.proof-line div { display: flex; flex-wrap: wrap; gap: 10px; }
.proof-line span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--dim); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.editorial-intro { max-width: 980px; }
.editorial-intro h2, .control-room h2, .role-pair h2, .trust-section h2, .final-brief h2 { margin: 0; font-size: clamp(2.5rem, 5.5vw, 5rem); line-height: .98; letter-spacing: -.06em; }
.editorial-intro > p:last-child { max-width: 720px; margin: 28px 0 0 auto; color: var(--dim); font-size: 1.12rem; line-height: 1.7; }
.shift-flow { display: grid; border-top: 1px solid var(--line); }
.shift-flow article { position: relative; min-height: 260px; padding: 28px 24px 34px; border-bottom: 1px solid var(--line); }
.flow-number { color: var(--dim); font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.flow-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 42px 0 22px; border-radius: 14px; background: var(--mint-bg); color: var(--mint-ink); }
.shift-flow article:nth-child(even) .flow-icon { background: var(--surface); color: var(--text); }
.shift-flow h3 { margin: 0 0 8px; font-size: 1.35rem; }
.shift-flow p { margin: 0; color: var(--dim); }

.control-room { display: grid; gap: 56px; align-items: center; padding: clamp(40px, 7vw, 86px); border-radius: 34px; background: color-mix(in srgb, var(--mint-bg) 55%, var(--card)); }
.control-copy > p:not(.section-kicker) { margin: 24px 0 0; color: var(--dim); font-size: 1.08rem; }
.check-list { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 20px; }
.check-list li { display: flex; gap: 12px; color: var(--dim); }
.check-list .i { margin-top: 2px; color: var(--mint-ink); }
.check-list strong { display: block; margin-bottom: 2px; color: var(--text); }
.policy-console { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.policy-head, .policy-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.policy-head { color: var(--dim); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.policy-head b { padding: 5px 8px; border-radius: 7px; background: var(--surface); color: var(--text); font-size: .65rem; }
.policy-row span strong, .policy-row span small { display: block; }
.policy-row span strong { font-size: .9rem; }
.policy-row span small { color: var(--dim); font-size: .72rem; }
.policy-row > b { font-size: .82rem; font-variant-numeric: tabular-nums; }
.policy-status { display: flex; align-items: center; gap: 10px; margin: 16px; padding: 14px; border-radius: 12px; background: var(--mint-bg); color: var(--dim); font-size: .72rem; }
.policy-status .i { color: var(--mint-ink); }
.policy-status strong { display: block; color: var(--mint-ink); }

.role-pair { display: grid; gap: 18px; }
.role-pair article { min-height: 520px; padding: clamp(34px, 6vw, 70px); border-radius: 30px; }
.dispatcher-panel { background: var(--card); border: 1px solid var(--line); }
.lead-panel { background: #1b272c; color: #f5faf8; }
.role-pair h2 { font-size: clamp(2.25rem, 4.5vw, 4rem); }
.role-pair article > p:not(.section-kicker) { max-width: 540px; margin: 24px 0; color: var(--dim); font-size: 1.03rem; line-height: 1.65; }
.lead-panel .section-kicker { color: #55d6b2; }
.lead-panel > p:not(.section-kicker) { color: #aebdba; }
.mini-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
.mini-actions span { padding: 9px 12px; border-radius: 9px; background: var(--surface); color: var(--dim); font-size: .75rem; font-weight: 700; }
.quiet-link.light { color: #f5faf8; }
.quiet-link.light:hover { color: #55d6b2; }

.trust-section { display: grid; gap: 48px; padding: clamp(28px, 5vw, 64px) 0; border-top: 1px solid var(--line); }
.trust-copy > p { max-width: 630px; margin: 0 0 30px; color: var(--dim); font-size: 1.08rem; line-height: 1.7; }
.trust-copy dl { margin: 0; }
.trust-copy dl div { display: grid; gap: 5px; padding: 16px 0; border-top: 1px solid var(--line); }
.trust-copy dt { color: var(--dim); font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.trust-copy dd { margin: 0; font-weight: 650; }

.final-brief { display: grid; gap: 36px; align-items: end; padding: clamp(38px, 7vw, 84px); border-radius: 34px; background: #1b272c; color: #f5faf8; }
.final-brief .eyebrow { color: #70e4c2; }
.final-brief h2 { max-width: 760px; }
.final-brief p:not(.eyebrow) { max-width: 580px; margin: 24px 0 0; color: #aebdba; font-size: 1.05rem; }
.final-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.home-foot { margin-top: 34px; padding: 26px 0 0; }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text) !important; }

@media (min-width: 780px) {
  .proof-line { grid-template-columns: .8fr 1.2fr; }
  .proof-line div { justify-content: flex-end; }
  .shift-flow { grid-template-columns: repeat(2, 1fr); }
  .shift-flow article:nth-child(odd) { border-right: 1px solid var(--line); }
  .role-pair { grid-template-columns: 1fr 1fr; }
  .trust-section { grid-template-columns: .9fr 1.1fr; }
  .final-brief { grid-template-columns: minmax(0, 1fr) auto; }
  .final-actions { display: grid; justify-items: start; }
}
@media (min-width: 1060px) {
  .ops-hero { grid-template-columns: minmax(0, .9fr) minmax(560px, 1.1fr); }
  .ops-hero h2 { font-size: clamp(4rem, 5.8vw, 6.4rem); }
  .shift-flow { grid-template-columns: repeat(4, 1fr); }
  .shift-flow article { border-right: 1px solid var(--line); }
  .shift-flow article:last-child { border-right: 0; }
  .control-room { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 779px) {
  .home-links { display: none; }
  .ops-hero { min-height: 0; padding-top: 58px; }
  .ops-frame { border-radius: 20px; transform: none; }
  .ops-frame-bar { grid-template-columns: 1fr auto; }
  .ops-frame-bar > span:nth-child(2) { display: none; }
  .ops-summary { align-items: start; flex-direction: column; }
  .ops-summary dl { width: 100%; justify-content: space-between; }
  .ops-columns { grid-template-columns: 1fr; }
  .coverage-list { border-right: 0; border-bottom: 1px solid rgb(255 255 255 / .1); }
  .control-room { padding: 32px 20px; border-radius: 24px; }
  .role-pair article { min-height: 430px; border-radius: 24px; }
  .final-brief { border-radius: 24px; }
}
@media (max-width: 520px) {
  .home #app { padding-inline: 15px; }
  .home-nav .brand-text .tagline, .home-nav > .btn { display: none; }
  .ops-hero h2 { font-size: clamp(2.8rem, 15vw, 4rem); }
  .ops-summary { padding: 22px 16px 18px; }
  .ops-summary dl { gap: 10px; }
  .operator-row { grid-template-columns: 34px minmax(0, 1fr); padding-inline: 14px; }
  .operator-row > b { grid-column: 2; justify-self: start; }
  .role-pair article, .final-brief { padding: 30px 22px; }
  .site-foot .push { flex-basis: 100%; }
}

/* ---------- Dashboard ---------- */
.dash-head { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 24px 0 20px; }
.dash-head h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.04em; }
.dash-head p { margin: 0; color: var(--dim); flex-basis: 100%; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 16px; }
.card h3 { margin: 0 0 12px; font-size: 1.05rem; font-weight: 700; }
.card .big { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.active-board { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-sm); background: var(--mine); margin-bottom: 14px; }
.active-board .i { width: 34px; height: 34px; color: var(--mint-ink); }
.active-board strong { display: block; }
.active-board span { color: var(--dim); font-size: .85rem; }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; }
.board-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.board-list li:first-child { border-top: 0; }
.board-list li.sel .info strong { color: var(--mint-ink); }
.board-list .info { flex: 1 1 220px; margin-right: auto; min-width: 0; }
.board-list .info strong { display: block; overflow-wrap: anywhere; }
.board-list .meta { color: var(--dim); font-size: .85rem; }
.board-list button, .board-list .btn { min-height: 38px; padding: 6px 14px; }
.panel .row { max-width: 480px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
#report h3 { margin: 24px 0 10px; font-size: 1rem; }
#report details summary { padding: 8px 0; cursor: pointer; color: var(--dim); font-size: .875rem; font-weight: 600; }
.chart { display: block; width: 100%; height: auto; }
.chart text { fill: var(--dim); font-size: 11px; font-family: inherit; }
.chart .gridline { stroke: var(--line); }
.chart .barfill { fill: var(--mint); }

/* ---------- Accents: light, with a little colour ---------- */
/* a soft mint wash behind the top of every page */
body { background: linear-gradient(180deg, color-mix(in srgb, var(--mint-bg) 75%, var(--bg)), var(--bg) 380px) no-repeat, var(--bg); }
/* softer edges: shadows and tint carry the cards, the lines just whisper */
.card, .panel, .feature, .steps li, #add, .tiles div { border-color: color-mix(in srgb, var(--line) 55%, transparent); }
.feature, .steps li, .tiles div { box-shadow: var(--shadow); }
/* icons take turns in the status colours instead of all mint */
.features > :nth-child(3n+2) .i, .strip > :nth-child(2) .i { background: var(--blue-bg); color: var(--blue); }
.features > :nth-child(3n) .i, .strip > :nth-child(3) .i { background: var(--amber-bg); color: var(--amber); }
.steps li:nth-child(2)::before { background: var(--blue-bg); color: var(--blue); }
.steps li:nth-child(3)::before { background: var(--amber-bg); color: var(--amber); }
/* two soft circles behind the sample board on the landing page */
.hero { position: relative; isolation: isolate; overflow: clip; }
.hero::before, .hero::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.hero::before { width: 260px; height: 260px; top: 0; right: 0; background: var(--mint-bg); }
.hero::after { width: 180px; height: 180px; bottom: 0; right: 42%; background: var(--blue-bg); }
.steps li::before { background: var(--mint-bg); color: var(--mint-ink); }

/* ---------- Your own colours (Settings, Look) ---------- */
.palettes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.palette { min-height: 40px; padding: 6px 14px 6px 8px; border-radius: 999px; font-size: .875rem; }
.palette .dots { display: flex; }
.palette .dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--card); margin-left: -6px; }
.palette .dots span:first-child { margin-left: 0; box-shadow: inset 0 0 0 1px var(--line); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0 0 12px; }
.swatch { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .875rem; font-weight: 600; cursor: pointer; }
.swatch input { width: 40px; height: 32px; min-height: 0; padding: 2px; border-radius: 8px; cursor: pointer; }

/* ---------- Relief ready ---------- */
.tag.relief { color: var(--mint-ink); border-color: var(--mint); background: var(--mint-bg); font-weight: 700; }
#takebar.ready button { box-shadow: 0 0 0 4px var(--mint-bg), var(--shadow); }

/* ---------- Shift timeline ---------- */
#timeline { margin-top: 16px; padding: 0; }
#timeline summary { display: flex; align-items: center; gap: 10px; padding: 16px 20px; cursor: pointer; font-weight: 700; }
#timeline summary .i { color: var(--blue); }
#timeline[open] summary { padding-bottom: 8px; }
.tl-key { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0 20px 12px; color: var(--dim); font-size: .8rem; font-weight: 600; }
.tl-key span::before { content: ''; display: inline-block; width: 14px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.k-break::before { background: var(--mint); }
.k-open::before { background: var(--mint-ink); }
.k-plan::before { border: 2px dashed var(--blue); }
#tl { display: grid; gap: 6px; padding: 0 20px 18px; }
.tl-row { display: grid; grid-template-columns: minmax(70px, 150px) minmax(0, 1fr); gap: 12px; align-items: center; }
.tl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; font-weight: 600; }
.tl-row.mine .tl-name { color: var(--mint-ink); }
.tl-track { position: relative; height: 22px; }
.tl-track > span { position: absolute; top: 0; height: 100%; border-radius: 6px; }
.tl-shift { background: var(--surface); }
.tl-break { background: var(--mint); min-width: 3px; }
.tl-open { background: var(--mint-ink); }
.tl-plan { border: 2px dashed var(--blue); background: var(--blue-bg); min-width: 6px; }
.tl-track > .tl-now { width: 2px; top: -3px; height: calc(100% + 6px); border-radius: 1px; background: var(--due); }
.tl-hours .tl-track { height: 16px; }
.tl-track > .tl-mark { top: 0; height: auto; translate: -50% 0; color: var(--dim); font-size: .72rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-track > .tl-mark:first-child { translate: 0 0; }

/* ---------- Setup for a new board ---------- */
#setup { width: min(520px, calc(100vw - 32px)); }
#setup h2 { margin: 0 0 6px; }
#setup input { width: 100%; }
.setup-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 20px; padding: 0; }
.setup-steps li { flex: 1; height: 6px; border-radius: 999px; background: var(--surface); }
.setup-steps li.on { background: var(--mint); }
.setup-choices { display: grid; gap: 10px; margin: 8px 0 12px; }
.setup-choices button { min-height: 56px; justify-content: flex-start; padding: 12px 18px; }
.setup-choices .i { color: var(--mint-ink); }
.setup-nav { margin-top: 18px; }
.setup-nav #setup-skip { flex: 0 1 auto; margin-right: auto; border-color: transparent; background: none; color: var(--dim); }
