/* The AVS corporate design (avs360.io), as the avs-doc plugin's "AVS" theme
   documents it: light only, Teal as the one interactive accent, Dark Blue
   headlines, hairline borders, small radii, flat cards. AV Red only in the
   logo. BechtlePro is used where it is installed; the font file is not
   shipped here (its licence covers finished presentations only). */
:root {
  --bg: #fff;
  --soft: #f2f4f6;
  --card: #fff;
  --bdr: #d2d5d9;
  --bdrh: rgba(20, 101, 105, .3);
  --fg: #07141b;
  --dim: #383840;
  --faint: #5f6b70;
  --accent: #146569;
  --accent-hover: #0f4c4f;
  --aglow: #e4efef;
  --ok: #15803d;
  --warn: #92400e;
  --warn-bg: #fdf6e3;
  --bad: #991b1b;
  --sans: "BechtlePro", "Helvetica Neue", Arial, system-ui, sans-serif;
  --code: Menlo, Consolas, "Courier New", monospace;
  --r: 8px;
  --r-sm: 6px;
  --shadow: 0 1px 2px rgba(7, 20, 27, .06);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--soft); color: var(--fg); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--code); font-size: 13px; }

/* ---- top bar: always light, the AV mark needs a light ground */
header.top { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; min-height: 64px; padding: 0 24px; background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--bdr); }
.brand { display: inline-flex; align-items: center; gap: 12px; padding-right: 20px; border-right: 1px solid var(--bdr); color: var(--fg); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand:last-child { border-right: 0; }
.logo-av { height: 18px; width: auto; display: block; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
header.top nav { display: flex; gap: 4px; }
header.top nav a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--dim); line-height: 1; }
header.top nav a:hover { color: var(--fg); background: var(--soft); text-decoration: none; }
header.top nav a.on { color: var(--accent); font-weight: 700; background: var(--aglow); }
header.top .who { margin: 0 0 0 auto; color: var(--faint); font-size: 14px; }

/* ---- page */
main { max-width: 1440px; margin: 0 auto; padding: 8px 24px 48px; }
main.narrow { max-width: 30em; padding-top: 48px; }
section { margin-top: 24px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 34px; height: 3px; flex: none; background: var(--accent); border-radius: 2px; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 16px 0 8px; }
h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 24px 0 8px; }
h4 { font-size: 15px; font-weight: 700; margin: 12px 0 4px; }
.hint { color: var(--faint); margin: 4px 0 12px; font-size: 14px; }
.error { color: var(--bad); font-weight: 600; }

/* ---- forms and buttons: one filled Teal pill per view, the rest quiet chips */
.filters, .inline { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; margin: 12px 0; }
.filters label, .inline label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.stack { display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--card); border: 1px solid var(--bdr); border-radius: var(--r); box-shadow: var(--shadow); }
.stack label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
input, select { font: inherit; font-size: 15px; padding: 7px 10px; color: var(--fg); background: var(--card); border: 1px solid var(--bdr); border-radius: var(--r-sm); text-transform: none; letter-spacing: normal; font-weight: 400; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button { font: inherit; font-size: 14px; padding: 7px 14px; color: var(--fg); background: var(--card); border: 1px solid var(--bdr); border-radius: var(--r-sm); cursor: pointer; transition: border-color 140ms, background 140ms; }
button:hover { border-color: var(--bdrh); background: var(--soft); }
button.primary { padding: 9px 22px; color: #fff; background: var(--accent); border-color: var(--accent); border-radius: 100px; font-weight: 700; }
button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.link { padding: 0; border: 0; background: none; color: var(--accent); font-size: inherit; }
button.link:hover { text-decoration: underline; background: none; }

/* ---- tables: a white card, Teal uppercase column labels, hairline rows */
.scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--bdr); border-radius: var(--r); box-shadow: var(--shadow); }
.scroll:has(table:empty), .scroll:has(tbody:empty) { display: none; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--bdr); }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
tbody tr:last-child td { border-bottom: none; }
th { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
th.topic { white-space: normal; min-width: 7em; }
td { color: var(--dim); }
td:first-child { color: var(--fg); font-weight: 600; }
td.num { text-align: right; }
td.topic { min-width: 8em; }
td.topic.required { border-left: 2px solid var(--aglow); }
td.actions { white-space: nowrap; text-align: right; }
td.actions button + button, .token-line .link { margin-left: 12px; }
.token-line + .token-line { margin-top: 6px; }
.req { color: var(--accent); font-weight: 700; }
tr.flagged td { background: var(--warn-bg); }
.flag { color: var(--warn); font-weight: 600; font-size: 13px; }
.holder, .carried, .note { color: var(--faint); font-size: 13px; font-weight: 400; }

/* ---- state chips */
.state, .verdict, .status { display: inline-block; padding: 1px 8px; border: 1px solid var(--bdr); border-radius: var(--r-sm); font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; color: var(--dim); background: var(--card); }
.state-claimed, .state-in_review { color: var(--accent); border-color: var(--bdrh); background: var(--aglow); }
.state-submitted { color: var(--fg); }
.state-approved, .verdict-approve, .status-active { color: var(--ok); border-color: rgba(21, 128, 61, .3); background: #ecf7f0; }
.state-changes_requested, .verdict-request_changes, .status-stale { color: var(--warn); border-color: rgba(146, 64, 14, .3); background: var(--warn-bg); }
.verdict-block { color: #fff; border-color: var(--bad); background: var(--bad); }
.status-ended, .state-open { color: var(--faint); background: var(--soft); }
.live { color: var(--warn); }
.live.on { color: var(--ok); }

/* ---- request detail */
#detail > h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 4px 0; color: var(--dim); }
.timeline time { color: var(--faint); font-size: 13px; margin-right: 6px; }
.round { margin-top: 24px; padding: 4px 20px 16px; background: var(--card); border: 1px solid var(--bdr); border-radius: var(--r); box-shadow: var(--shadow); }

/* ---- admin */
.notice { margin: 12px 0; padding: 16px 20px; background: var(--aglow); border-left: 4px solid var(--accent); border-radius: var(--r); }
.notice p { margin: 0 0 8px; }
code.token { display: block; padding: 8px 12px; background: var(--card); border: 1px solid var(--bdr); border-radius: var(--r-sm); word-break: break-all; user-select: all; }

/* ---- how-to guide */
main.guide { max-width: 60rem; padding-top: 32px; }
main.guide td:first-child code { white-space: nowrap; }
main.guide h1 { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 4px 0 12px; color: var(--fg); }
main.guide .lede { font-size: 17px; color: var(--dim); max-width: 46rem; margin: 0 0 20px; }
main.guide section { margin-top: 40px; padding-top: 8px; border-top: 1px solid var(--bdr); }
main.guide h3 { font-size: 22px; margin: 16px 0 10px; }
main.guide h4 { font-size: 16px; margin: 20px 0 6px; }
main.guide p, main.guide li { color: var(--dim); }
main.guide ol, main.guide ul { padding-left: 1.4em; }
main.guide li { margin: 6px 0; }
main.guide .scroll { margin: 12px 0; }
main.guide .notice { margin-top: 16px; }
main.guide q { color: var(--fg); font-style: italic; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.toc a { padding: 6px 12px; border: 1px solid var(--bdr); border-radius: var(--r-sm); background: var(--card); color: var(--accent); font-size: 14px; }
.toc a:hover { border-color: var(--bdrh); text-decoration: none; }
pre { position: relative; margin: 12px 0; padding: 14px 16px; padding-right: 76px; overflow-x: auto; background: var(--card); color: var(--fg); border: 1px solid var(--bdr); border-radius: var(--r); font-size: 13px; line-height: 1.6; }
pre code { font-size: inherit; white-space: pre; }
pre .site { color: var(--accent); font-weight: 600; }
pre .copy { position: absolute; top: 8px; right: 8px; padding: 3px 10px; font-size: 12px; }
p code, li code, td code { padding: 1px 5px; background: var(--card); border: 1px solid var(--bdr); border-radius: 4px; }
