/* The checkedincare.com.au theme: its Elementor global colours (navy #21325E, greens #007853 / #087D57 /
   #004931 / #3DAE2B, off-white #F7F8F4) and its type (League Spartan headings, Helvetica Neue body).
   Every text pair is at least 4.5:1; the accent green is for bars and borders only. */
:root {
  --bg: #f7f8f4; --panel: #ffffff; --fg: #21325e; --muted: #5b6382; --line: #e1e4dc;
  --brand: #007853; --brand-2: #087d57; --accent: #3dae2b; --pale: #edf5e9;
  --navy: #21325e; --primary: #21325e; --on-primary: #ffffff; --lime: #e4eb9a;
  --s-committed: #a3abc4; --s-dev: #087d57; --s-qa: #3dae2b; --s-blocked: #c2412d; --s-release: #d08a12; --s-closed: #21325e;
  --warn: #a8660a; --bad: #b3361f; --radius: 10px; --radius-sm: 5px;
  --font-head: "League Spartan", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111a30; --panel: #18233f; --fg: #e8ecf6; --muted: #a5b0cc; --line: #2d3a5e;
    --brand: #6cd158; --brand-2: #3dae2b; --pale: #1f2c4b;
    --navy: #0b1224; --primary: #6cd158; --on-primary: #111a30;
    --s-committed: #66718f; --s-dev: #3dae2b; --s-qa: #9be58a; --s-blocked: #ef7a63; --s-release: #f0b04a; --s-closed: #c9d4e8;
    --warn: #f0b04a; --bad: #ef7a63;
  }
}
:root[data-theme="dark"] {
  --bg: #111a30; --panel: #18233f; --fg: #e8ecf6; --muted: #a5b0cc; --line: #2d3a5e;
  --brand: #6cd158; --brand-2: #3dae2b; --pale: #1f2c4b;
  --navy: #0b1224; --primary: #6cd158; --on-primary: #111a30;
  --s-committed: #66718f; --s-dev: #3dae2b; --s-qa: #9be58a; --s-blocked: #ef7a63; --s-release: #f0b04a; --s-closed: #c9d4e8;
  --warn: #f0b04a; --bad: #ef7a63;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.45; }
/* The website's navy strip above its header. */
body::before { content: ""; display: block; height: 6px; background: var(--navy); }
h1, h2, .brand, .tile .val, .nav a, .btn, button.refresh, .pill { font-family: var(--font-head); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 24px clamp(16px, 3vw, 32px) 48px; display: flex; flex-direction: column; gap: 24px; }
header.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; border-bottom: 3px solid var(--accent); padding-bottom: 16px; }
.brandbar { display: flex; align-items: center; gap: 14px; }
.logo img { display: block; height: 52px; width: auto; }
.brandbar .brand { padding-left: 14px; border-left: 2px solid var(--line); line-height: 1.6; }
/* The logo's navy lettering disappears on the dark background: give it the white it was drawn for. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo img { box-sizing: content-box; background: #fff; padding: 6px 10px; border-radius: var(--radius-sm); } }
:root[data-theme="dark"] .logo img { box-sizing: content-box; background: #fff; padding: 6px 10px; border-radius: var(--radius-sm); }
.brand { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 0 6px -10px; max-width: calc(100% + 10px); }
/* A label never breaks inside itself; on a phone the name and Sign out wrap to the next line. */
.nav a { white-space: nowrap; }
.nav a { font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: var(--radius-sm); }
.nav a:hover { color: var(--fg); background: var(--pale); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--pale); }
h1 { margin: 2px 0 0; font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; line-height: 1.1; color: var(--fg); }
.lede { margin: 8px 0 0; color: var(--muted); max-width: 75ch; }
.lede b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
button.refresh { font-size: 14px; font-weight: 500; color: var(--on-primary); background: var(--primary); border: 0; border-radius: var(--radius-sm); padding: 9px 18px; cursor: pointer; }
button.refresh:disabled { opacity: .6; cursor: progress; }
.banner { display: none; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--bad); color: var(--bad); background: var(--panel); font-size: 14px; }
.banner.show { display: block; }
.banner.info { border-color: var(--warn); color: var(--warn); }
h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.note { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.tile, .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tile { display: flex; flex-direction: column; gap: 4px; min-height: 108px; border-top: 3px solid var(--line); }
.tile .lbl { font-size: 13px; color: var(--muted); }
.tile .val { font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile .val.date { font-size: 22px; line-height: 1.6; }
td.muted { color: var(--muted); }
.tile .sub { font-size: 12px; color: var(--muted); margin-top: auto; }
.tile.t-committed { border-top-color: var(--s-committed); }
.tile.t-dev { border-top-color: var(--s-dev); }
.tile.t-qa { border-top-color: var(--s-qa); }
.tile.t-blocked { border-top-color: var(--s-blocked); }
.tile.t-blocked .val, .tile.bad .val { color: var(--bad); }
.tile.t-release { border-top-color: var(--s-release); }
.tile.t-release .val, .tile.warn .val { color: var(--warn); }
.tile.t-closed { border-top-color: var(--s-closed); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 16px; }
.pipe { display: flex; flex-direction: column; gap: 10px; }
.pipe-row { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; align-items: center; gap: 10px; font-size: 13px; }
.pipe-row .name { color: var(--muted); }
.pipe-row .track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pipe-row .bar { height: 22px; border-radius: 4px; min-width: 2px; transition: width .4s ease-out; }
.pipe-row .num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.table-wrap { max-height: 420px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th { position: sticky; top: 0; background: var(--panel); text-align: left; font-weight: 500; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable::after { content: ""; margin-left: 4px; }
th[aria-sort="ascending"]::after { content: "▲"; font-size: 9px; }
th[aria-sort="descending"]::after { content: "▼"; font-size: 9px; }
td { padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th.n, td.n { text-align: right; }
td.blocked { color: var(--bad); font-weight: 500; }
td.sum { max-width: 30rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.nw { white-space: nowrap; }
td a { color: var(--brand-2); text-decoration: none; font-weight: 500; }
td a:hover { text-decoration: underline; }
.stack { display: flex; height: 12px; border-radius: 4px; overflow: hidden; min-width: 70px; background: var(--line); }
.stack span { height: 100%; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
input.search, select.filter { font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--fg); }
input.search { flex: 1 1 220px; max-width: 320px; }
.count { font-size: 12px; color: var(--muted); }
.skeleton { color: transparent !important; background: linear-gradient(90deg, var(--line), var(--pale), var(--line)); background-size: 200% 100%; border-radius: 6px; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .pipe-row .bar { transition: none; } }
footer { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .hide-narrow { display: none; } }

/* ---- Stand-up pages: forms, status pills, line editor ---- */
.banner.ok { border-color: var(--brand-2); color: var(--brand-2); }
.datebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.datebar input[type="date"] { font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--fg); }
.btn { font-size: 14px; font-weight: 500; border-radius: var(--radius-sm); padding: 7px 14px; cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--fg); }
.btn:hover:not(:disabled) { border-color: var(--brand-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.small { padding: 4px 9px; font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.Draft { color: var(--muted); }
.pill.Submitted { color: var(--warn); border-color: var(--warn); }
.pill.Returned { color: var(--bad); border-color: var(--bad); }
.pill.Approved { color: var(--brand-2); border-color: var(--brand-2); }
.pill.None { color: var(--muted); border-style: dashed; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.field input, .field textarea, .field select, .grid-input, .line select, .line input {
  font: inherit; font-size: 13px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 9px; min-width: 0; }
textarea { resize: vertical; min-height: 56px; width: 100%; }
.choices { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.choices label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--pale); max-width: 100%; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52ch; }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.lines { display: flex; flex-direction: column; gap: 10px; }
.line { display: grid; grid-template-columns: 130px 120px 92px 120px 1fr auto; gap: 8px; align-items: start; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.line .summary, .line .blocked-on { grid-column: 2 / -1; font-size: 12px; color: var(--muted); }
.line .summary.bad { color: var(--bad); }
.line .blocked-on input { width: 100%; border-color: var(--bad); }
@media (max-width: 760px) { .line { grid-template-columns: 1fr 1fr; } .line .summary, .line .blocked-on { grid-column: 1 / -1; } }
.totals { font-size: 14px; margin-top: 10px; }
.totals.warn { color: var(--warn); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.stack-v { display: flex; flex-direction: column; gap: 16px; }
.events { list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td, tr.selected td { background: var(--pale); }
.roster input, .roster select { width: 100%; }
.roster td { padding: 4px 6px; }
.warn-text { color: var(--warn); }

.nav .who { margin-left: auto; align-self: center; padding: 0 6px; white-space: nowrap; }
@media (max-width: 640px) { .nav .who { margin-left: 0; padding: 0 4px 0 10px; } }
