/* ronaldmcqueen.com
 *
 * Theme-aware by tokens: the complete light palette is defined on bare :root,
 * and ONLY the tokens are redefined for dark. No colour gets its sole
 * definition inside a media query — a page whose light theme lives only in
 * @media renders unstyled for anyone whose browser reports no preference.
 *
 * McQueen red #B00000 is the house brand colour and is used as the accent, so
 * this site reads as a sibling of the McQueen Homes properties rather than a
 * stranger.
 */

:root {
  --bg:        #f7f6f4;
  --surface:   #ffffff;
  --surface-2: #f0eeea;
  --text:      #1a1a1a;
  --text-dim:  #5f5c58;
  --border:    #ddd9d3;
  --accent:    #b00000;
  --accent-dim:#8a0000;
  --focus:     #b00000;

  --sev-now:     #c62828;
  --sev-soon:    #e07000;
  --sev-monitor: #b8960b;
  --sev-routine: #2e7d32;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.05);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #14140f;
    --surface:   #1d1d19;
    --surface-2: #262620;
    --text:      #ece9e3;
    --text-dim:  #a09c94;
    --border:    #34342c;
    --accent:    #ff6b6b;
    --accent-dim:#ff9494;

    --sev-now:     #ff6b6b;
    --sev-soon:    #ffa04d;
    --sev-monitor: #ffd24d;
    --sev-routine: #7bd88f;

    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  }
}

:root[data-theme="dark"] {
  --bg:        #14140f;
  --surface:   #1d1d19;
  --surface-2: #262620;
  --text:      #ece9e3;
  --text-dim:  #a09c94;
  --border:    #34342c;
  --accent:    #ff6b6b;
  --accent-dim:#ff9494;

  --sev-now:     #ff6b6b;
  --sev-soon:    #ffa04d;
  --sev-monitor: #ffd24d;
  --sev-routine: #7bd88f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dim); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--surface);
  padding: .6rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
}

.brand {
  font-weight: 650;
  letter-spacing: -.015em;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { color: var(--accent); }

/* ---------- primary nav ----------
 * Items get real affordances: padding, a hover ground, and an ACTIVE state
 * that is a background + weight change, not colour alone. The first version of
 * this bar was three links with three different treatments and no hover — it
 * read as a status line rather than navigation, which is exactly how it was
 * received. */

.topnav {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-right: auto;      /* pushes the user menu to the far right */
  margin-left: 1.5rem;
  font-size: .92rem;
}

/* Right-align the whole nav instead of letting it hold the left edge.
 *
 * Used on the signed-OUT bar, where "Sign in" is the only item. The base rule's
 * `margin-right: auto` exists to push the USER MENU to the far right when
 * signed in; with no user menu present it pushes empty space instead and the
 * button sits next to the brand. Both margins are restated because `auto` on
 * the left cannot win against the base rule's explicit 1.5rem.
 *
 * Matches McQueen Homes, whose nav puts the login in a justify-content-end
 * right section. */
.topnav.end {
  margin-left: auto;
  margin-right: 0;
}

.topnav a {
  text-decoration: none;
  color: var(--text-dim);
  padding: .42rem .85rem;
  border-radius: 8px;
  font-weight: 500;
  transition: background .13s ease, color .13s ease;
}
.topnav a:hover {
  color: var(--text);
  background: var(--surface-2);
}
.topnav a.on {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 640;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.topnav .ghost {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
}
.topnav .ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: transparent;
}

/* ---------- user menu (a <details> dropdown, no JS required) ---------- */

.usermenu { position: relative; }

.usermenu summary {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .3rem .7rem .3rem .35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text);
  list-style: none;        /* kill the default disclosure triangle */
  user-select: none;
  transition: border-color .13s ease, background .13s ease;
}
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { border-color: var(--accent); background: var(--surface-2); }
.usermenu[open] summary { border-color: var(--accent); background: var(--surface-2); }

.usermenu .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.usermenu .uname { font-weight: 550; }

.usermenu .caret {
  font-size: .7rem;
  color: var(--text-dim);
  transition: transform .15s ease;
}
.usermenu[open] .caret { transform: rotate(180deg); }

.usermenu .menu {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .35rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.usermenu .menu a {
  display: block;
  padding: .55rem .7rem;
  border-radius: 7px;
  text-decoration: none;
  color: var(--text);
  font-size: .9rem;
  white-space: nowrap;
}
.usermenu .menu a:hover { background: var(--surface-2); }
.usermenu .menu a.on {
  background: var(--surface-2);
  font-weight: 640;
  box-shadow: inset 2px 0 0 var(--accent);
}
.usermenu .menu a.danger { color: var(--accent); }
.usermenu .menu a.danger:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* Narrow screens: the brand and the user menu matter most; the nav wraps
   under them rather than crushing the bar. */
@media (max-width: 560px) {
  .topnav { margin-left: 0; gap: .1rem; font-size: .86rem; }
  .topnav a { padding: .35rem .6rem; }
  .usermenu .uname { display: none; }   /* avatar + caret still read as a menu */
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem) 4rem;
}

/* ---------- the public hub ---------- */

.hero {
  margin-bottom: 2.75rem;
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 2.25rem);
}

.hero .portrait {
  width: clamp(88px, 17vw, 148px);
  height: clamp(88px, 17vw, 148px);
  border-radius: 50%;
  object-fit: cover;
  /* The source is a 480px square, so it is never upscaled at these sizes. */
  flex: 0 0 auto;
  border: 3px solid var(--surface);
  /* A ring rather than a hard edge — reads as deliberate at any theme, and
     keeps the portrait from dissolving into a same-tone background. */
  box-shadow: 0 0 0 1px var(--border), var(--shadow);
}

.hero-text { min-width: 0; }   /* lets long text wrap instead of overflowing */

/* Stack on narrow screens: side by side crushes the heading to two words a
   line on a phone. */
@media (max-width: 520px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 0 0 .5rem;
  font-weight: 680;
}

.hero .tag {
  color: var(--text);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  font-weight: 550;
  line-height: 1.4;
  margin: 0;
  max-width: 44ch;
}

/* The company line sits UNDER the role, dimmer and lighter — so the two read
   as title-then-affiliation rather than one long run-on. */
.hero .tag .orgs {
  display: inline-block;
  margin-top: .2rem;
  color: var(--text-dim);
  font-weight: 400;
  font-size: .92em;
}

.hero .rule {
  width: 3.5rem;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 1.4rem 0 0;
}

.links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.links a {
  display: block;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .15s ease;
}
.links a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.links .label {
  display: block;
  font-weight: 620;
  margin-bottom: .2rem;
}
.links .blurb {
  display: block;
  color: var(--text-dim);
  font-size: .9rem;
  line-height: 1.45;
}
.links .lock {
  display: inline-block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: .05rem .5rem;
  margin-left: .45rem;
  vertical-align: 2px;
}

/* ---------- login ---------- */

.login-wrap {
  max-width: 380px;
  margin: clamp(1rem, 8vh, 5rem) auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.card h1 {
  margin: 0 0 1.25rem;
  font-size: 1.3rem;
  letter-spacing: -.02em;
}

label {
  display: block;
  font-size: .85rem;
  color: var(--text-dim);
  margin-bottom: .3rem;
}

input[type=text], input[type=password] {
  width: 100%;
  padding: .65rem .75rem;
  margin-bottom: 1rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
}

/* ---------- password field + show/hide eye ---------- */

.password-toggle-wrapper {
  position: relative;
  display: block;
}

/* The input inside a wrapper carries its own margin, and reserves room on the
   right so a long password never runs underneath the eye. */
.password-toggle-wrapper input[type=password],
.password-toggle-wrapper input[type=text] {
  padding-right: 2.9rem;
  margin-bottom: 1rem;
}

.password-toggle-btn {
  /* Reset the site's full-width primary button styling — this is an icon
     button sitting inside a field, not a form action. */
  position: absolute;
  top: .65rem;
  right: .4rem;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  transition: color .13s ease, background .13s ease;
}
.password-toggle-btn:hover {
  color: var(--accent);
  background: var(--surface-2);
}

.password-toggle-btn .eye {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

/* Default state: password hidden, so offer the "show" (open eye) icon.
   When toggled visible the button gains .is-visible and the crossed-out eye
   takes over — the icon shows what clicking will DO, which is the convention
   the McQueen Homes version follows too. */
.password-toggle-btn .eye-closed { display: none; }
.password-toggle-btn.is-visible .eye-open { display: none; }
.password-toggle-btn.is-visible .eye-closed { display: block; }
.password-toggle-btn.is-visible { color: var(--accent); }

button {
  width: 100%;
  padding: .7rem 1rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}
button:hover { background: var(--accent-dim); }

/* A SECONDARY button. `button` above is full-width, filled and accent-coloured
 * — correct for the one action a form exists to perform, wrong for an escape
 * hatch sitting beneath it. Two identical primary buttons make the reader
 * choose between them; this one recedes until it is wanted. */
.ghost-btn {
  width: auto;
  padding: .45rem .9rem;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.ghost-btn:hover {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

/* A form that is one small control, not a block of fields. */
.inline-form {
  margin: 1.25rem 0 .35rem;
}

.err {
  background: color-mix(in srgb, var(--sev-now) 12%, transparent);
  border: 1px solid var(--sev-now);
  color: var(--text);
  border-radius: 7px;
  padding: .6rem .8rem;
  margin: 0 0 1rem;
  font-size: .9rem;
}

/* ---------- two-factor ----------
 *
 * Added 2026-09-03 with the MFA pages. These three classes were WRITTEN INTO
 * the markup before they existed in any stylesheet — the pages rendered, they
 * just rendered unstyled, which is the quiet failure worth naming: a class
 * that does not exist is a no-op, not an error, and nothing reports it.
 */

.muted {
  color: var(--text-dim);
  font-size: .9rem;
}

/* The setup key and the otpauth URI. Both are long, both must be transcribable
   by eye onto a phone, and neither may overflow the card and be clipped —
   a truncated secret is an enrolment that silently cannot work. */
.secret {
  display: block;
  font-family: var(--mono);
  font-size: .95rem;
  line-height: 1.5;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: .6rem .7rem;
  margin: .2rem 0 1rem;
  overflow-wrap: anywhere;   /* wrap mid-token rather than overflow */
  user-select: all;          /* one click selects the whole value */
}

/* Backup codes: shown exactly once, so they must be easy to copy accurately
   and hard to mistake for ordinary body text. */
.codes {
  list-style: none;
  margin: 0 0 1rem;
  padding: .6rem .7rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: .35rem .8rem;
}

.codes code {
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: .02em;
  user-select: all;
}

/* ---------- the manual (document engine) ----------
 *
 * A governance document is READ, at length, by two people who did not write
 * the paragraph they are looking at. So: a measured line length, real spacing
 * between sections, and numbering that stays visible while you scroll past it.
 */

.doc {
  max-width: 46rem;          /* ~75 characters; past that the eye loses the line */
}

.doc-toc {
  max-width: 46rem;
  margin: 0 0 2.5rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.doc-toc h2 {
  margin: 0 0 .6rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
}
.doc-toc ol { margin: 0; padding-left: 1.2rem; }
.doc-toc li { margin: .25rem 0; }
.doc-toc a { color: var(--text); text-decoration: none; }
.doc-toc a:hover { color: var(--accent); text-decoration: underline; }

.doc-sec { margin: 0 0 2rem; scroll-margin-top: 1.5rem; }

/* Indent by depth, but only to three levels — deeper nesting keeps rendering,
   it just stops marching rightwards off the page. */
.doc-depth-1 { margin-left: 1.25rem; }
.doc-depth-2 { margin-left: 2.5rem; }
.doc-depth-3 { margin-left: 3.75rem; }

.doc-sec h2, .doc-sec h3, .doc-sec h4 {
  margin: 0 0 .5rem;
  line-height: 1.3;
}
.doc-sec h2 { font-size: 1.35rem; }
.doc-sec h3 { font-size: 1.12rem; }
.doc-sec h4 { font-size: 1rem; }

/* The section number, held in a lighter weight so the title reads first. */
.doc-num {
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  margin-right: .15rem;
}

.doc-body { line-height: 1.65; }
.doc-body p { margin: 0 0 .9rem; }
.doc-body ul, .doc-body ol { margin: 0 0 .9rem; padding-left: 1.4rem; }
.doc-body li { margin: .2rem 0; }
.doc-body h3, .doc-body h4, .doc-body h5, .doc-body h6 {
  margin: 1.4rem 0 .5rem;
  font-size: 1rem;
}
.doc-body code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--surface-2);
  border-radius: 4px;
  padding: .1rem .3rem;
}
.doc-body blockquote {
  margin: 0 0 .9rem;
  padding: .1rem 0 .1rem 1rem;
  border-left: 3px solid var(--border);
  color: var(--text-dim);
}
.doc-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}
.doc-body a { color: var(--accent); }

/* ⛔ THE TABLE SCROLLS INSIDE ITS OWN BOX. A wide policy table must never make
   the PAGE scroll sideways — that breaks every other column on the screen and
   is the single most common way a document layout fails on a phone. */
.doc-table-wrap {
  overflow-x: auto;
  margin: 0 0 1.1rem;
  border: 1px solid var(--border);
  border-radius: 7px;
}
.doc-table {
  border-collapse: collapse;
  width: 100%;
  font-size: .92rem;
}
.doc-table th, .doc-table td {
  padding: .5rem .7rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.doc-table th {
  background: var(--surface-2);
  font-weight: 600;
  white-space: nowrap;
}
.doc-table tr:last-child td { border-bottom: 0; }

/* ---------- the manual's editor ---------- */

.notice {
  background: color-mix(in srgb, var(--sev-routine) 12%, transparent);
  border: 1px solid var(--sev-routine);
  color: var(--text);
  border-radius: 7px;
  padding: .6rem .8rem;
  margin: 0 0 1rem;
  font-size: .9rem;
  max-width: 46rem;
}

.edit-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  max-width: 46rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.edit-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .7rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.edit-row:last-child { border-bottom: 0; }
.edit-row-main { flex: 1 1 auto; min-width: 0; }
.edit-row-main a { color: var(--text); text-decoration: none; }
.edit-row-main a:hover { color: var(--accent); text-decoration: underline; }

/* Indentation by nesting depth. Set as classes rather than an inline custom
   property — ROTR Rule 13, styling lives here. */
.edit-depth-1 { padding-left: 1.25rem; }
.edit-depth-2 { padding-left: 2.5rem; }
.edit-depth-3 { padding-left: 3.75rem; }
.edit-depth-4 { padding-left: 5rem; }

/* A retired section stays visible and legible — it is recoverable, and hiding
   it in the EDITOR would make restoring it impossible from the UI. */
.edit-row.retired .edit-row-main a { color: var(--text-dim); text-decoration: line-through; }

.edit-row-actions {
  flex: 0 0 auto;
  display: flex;
  gap: .25rem;
}
.edit-row-actions .ghost-btn { padding: .25rem .5rem; }

.doc-form { max-width: 46rem; margin: 0 0 2rem; }
.doc-form label { display: block; margin: .9rem 0 .3rem; font-weight: 550; }
.doc-form input[type="text"],
.doc-form select,
.doc-form textarea {
  width: 100%;
  padding: .55rem .7rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
}
/* The body is markdown and is written, not filled in — monospace so alignment
   in a pipe table is visible while typing it. */
.doc-form textarea {
  font-family: var(--mono);
  font-size: .92rem;
  line-height: 1.5;
  resize: vertical;
}
.doc-form input:focus, .doc-form select:focus, .doc-form textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.doc-form button { margin-top: 1.1rem; }

.hist-head {
  max-width: 46rem;
  margin: 2.5rem 0 .8rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
}

/* ---------- dashboard ---------- */

.page-head { margin-bottom: 2rem; }
.page-head h1 {
  margin: 0 0 .35rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -.025em;
}
.page-head p {
  margin: 0;
  color: var(--text-dim);
}

.agents {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.agents a {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .15s ease;
}
.agents a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.agents .name {
  font-weight: 640;
  font-size: 1.06rem;
  letter-spacing: -.01em;
}
.agents .meta {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--text-dim);
  margin: .15rem 0 .55rem;
}
.agents .purpose {
  color: var(--text-dim);
  font-size: .88rem;
  line-height: 1.45;
  flex: 1;
}

.counts {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .9rem;
  padding-top: .8rem;
  border-top: 1px solid var(--border);
}

.pill {
  font-size: .74rem;
  font-weight: 600;
  padding: .18rem .55rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
  white-space: nowrap;
}
.pill.live   { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.pill.empty  { font-weight: 500; font-style: italic; }

/* ---------- ticket board ---------- */

.legend {
  color: var(--text-dim);
  font-size: .85rem;
  margin: 0 0 1rem;
}

.board-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table.board {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  /* 1180, not 860. At 860 the eight columns all FIT inside a desktop window,
     so the browser has no reason to scroll and instead squeezes "Next step"
     and "Docs" into ~10-character ribbons that wrap mid-word. Making the
     table wider than the viewport is what hands those columns real width and
     turns the wrapper's overflow-x into the thing that pays for it. */
  min-width: 1180px;
}

table.board th {
  text-align: left;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #fff;
  background: var(--accent);
  padding: .6rem .8rem;
  white-space: nowrap;
  position: sticky;
  top: 0;
}

table.board td {
  padding: .7rem .8rem;
  border-top: 1px solid var(--border);
  vertical-align: top;
}

table.board tr.terminal td { opacity: .58; }
table.board tr.terminal .t-title { text-decoration: line-through; }

.t-ref {
  font-family: var(--mono);
  font-size: .82rem;
  white-space: nowrap;
  font-weight: 600;
}
.t-title { font-weight: 550; }
.t-notes {
  display: block;
  color: var(--text-dim);
  font-size: .84rem;
  margin-top: .3rem;
  line-height: 1.45;
}
.t-sev  { white-space: nowrap; font-size: .95rem; }
.t-next { color: var(--text-dim); font-size: .86rem; min-width: 22ch; max-width: 34ch; }
.t-due  { white-space: nowrap; font-family: var(--mono); font-size: .82rem; }
.t-due.over { color: var(--sev-now); font-weight: 700; }
/* One line, clipped, full path on hover via the cell's title attribute.
   word-break: break-all turned a 60-character path into an eight-line tower
   that set the height of the whole row — the path is a REFERENCE you follow,
   not prose you read in the table. */
.t-docs {
  font-family: var(--mono);
  font-size: .74rem;
  max-width: 26ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paused {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  color: var(--sev-monitor);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: .02rem .45rem;
  margin-left: .35rem;
}

/* ---------- empty state ---------- */

.empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
  color: var(--text-dim);
}
.empty strong { color: var(--text); display: block; margin-bottom: .5rem; }
.empty code {
  font-family: var(--mono);
  font-size: .85rem;
  background: var(--surface-2);
  padding: .12rem .4rem;
  border-radius: 4px;
  color: var(--text);
}

.back {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: .88rem;
  text-decoration: none;
}

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--border);
  padding: 1.5rem clamp(1rem, 4vw, 3rem);
  color: var(--text-dim);
  font-size: .85rem;
}
.foot p { margin: 0; }

/* ---------- DataTables ----------
 *
 * The vendor stylesheet ships a light, blue, Bootstrap-neutral look that is a
 * stranger on this page. Everything below re-skins its CONTROLS onto the same
 * tokens the rest of the site uses, so the table stays McQueen red in light
 * mode and legible in dark mode. Nothing here changes DataTables' behaviour —
 * only its colours, spacing and the sort affordances.
 *
 * ⚑ TOKENS ONLY, NO LITERAL COLOURS. A hardcoded #fff here would look correct
 *   in light mode and disappear in dark, and dark is the mode this site opens
 *   in on most of Ronald's screens.
 */

.dt-container { color: var(--text); }

/* Length menu, filter box and info line sit OUTSIDE .board-wrap's card, so
   they need their own breathing room rather than inheriting the card padding. */
.dt-container .dt-length,
.dt-container .dt-search,
.dt-container .dt-info,
.dt-container .dt-paging {
  font-size: .85rem;
  color: var(--text-dim);
  padding: .55rem .2rem;
}

.dt-container select,
.dt-container input[type="search"] {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .3rem .5rem;
  font: inherit;
  font-size: .85rem;
}
.dt-container input[type="search"] { min-width: min(22rem, 60vw); }
.dt-container select:focus-visible,
.dt-container input[type="search"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

/* Paging buttons. The vendor default is a blue gradient pill; these are flat
   and take the accent only for the current page, so the eye lands on where it
   is rather than on the controls. */
.dt-container .dt-paging .dt-paging-button {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  padding: .22rem .6rem;
  margin: 0 .12rem;
}
.dt-container .dt-paging .dt-paging-button.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.dt-container .dt-paging .dt-paging-button.disabled {
  opacity: .4;
  cursor: default;
}
.dt-container .dt-paging .dt-paging-button:hover:not(.disabled):not(.current) {
  background: var(--surface-2);
  color: var(--text);
}

/* Sort affordances on a RED header row.
 * DataTables draws its arrows in currentColor at low opacity; against
 * var(--accent) that is nearly invisible, so the header's own white is forced
 * through and the active direction is given full opacity. Without this the
 * table looks sortable-but-broken: clicking works and nothing appears to
 * change. */
table.board thead th.dt-orderable-asc,
table.board thead th.dt-orderable-desc { cursor: pointer; }

table.board thead th .dt-column-order::before,
table.board thead th .dt-column-order::after {
  color: #fff;
  opacity: .35;
}
table.board thead th.dt-ordering-asc  .dt-column-order::before,
table.board thead th.dt-ordering-desc .dt-column-order::after {
  opacity: 1;
}

/* The vendor CSS puts a light row-stripe and hover behind rows. Both are set
   in RGB channels via its own custom properties, so they are retuned here
   rather than overridden rule by rule. */
table.board.dataTable > tbody > tr { background-color: transparent; }
table.board.dataTable > tbody > tr:hover > * {
  box-shadow: inset 0 0 0 9999px color-mix(in srgb, var(--accent) 6%, transparent);
}

/* DataTables wraps the table in .dt-container; when that sits inside
   .board-wrap the card's rounded corners clip the paging controls. The card
   moves to the container instead. */
.board-wrap:has(.dt-container) {
  background: none;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
.board-wrap .dt-container > .dt-layout-row:has(table) {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
