:root {
  color-scheme: light;
  --ink: #172e36;
  --muted: #4d6370;
  --line: #d7e1e3;
  --paper: #f3f7f7;
  --action: #165c58;
  --wash: #e1f0ec;
  font: 16px/1.5 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
header { background: #122f39; color: white; }
.header-inner { max-width: 1192px; margin: auto; min-height: 72px; padding: 8px 24px; display: flex; align-items: center; gap: 24px; }
main { max-width: 1192px; margin: 0 auto; padding: 32px 24px 56px; }
a { color: var(--action); text-underline-offset: 4px; }
header a { color: #edf7f5; text-decoration: none; }
.brand { font-size: 1.24rem; font-weight: 750; white-space: nowrap; }
.brand span { font-size: .74rem; border: 1px solid #6e918e; padding: 3px 5px; border-radius: 4px; margin-left: 8px; }
nav, .identity, .heading, .filters, .meta, .job-head, .buttons { display: flex; align-items: center; gap: 12px; }
nav { gap: 3px; flex-wrap: wrap; }
nav a { padding: 11px 12px; border-radius: 7px; white-space: nowrap; }
nav a:hover, nav a[aria-current] { background: #284b53; }
.identity { margin-left: auto; font-size: .92rem; gap: 5px; }
.quiet { color: #fff; border-color: transparent; background: transparent; text-decoration: underline; }
.quiet:hover { background: #284b53; }
h1, h2, h3, p { margin: 0 0 13px; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.12; letter-spacing: -.045em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.18rem; line-height: 1.24; }
.heading { justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; }
.heading h1, .job-head h3 { margin: 0; overflow-wrap: anywhere; }
.panel { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin-bottom: 18px; }
.jobs { padding: 0; }
.job { padding: 19px 22px; border-left: 4px solid #82b4aa; }
.job:first-child { border-radius: 11px 11px 0 0; }
.job:last-child { border-radius: 0 0 11px 11px; }
.job:only-child { border-radius: 11px; }
.job + .job { border-top: 1px solid var(--line); }
.job-head { flex-wrap: wrap; justify-content: space-between; }
.meta { flex-wrap: wrap; color: var(--muted); margin: 10px 0 12px; }
.job-actions { display: flex; flex-wrap: wrap; align-items: start; gap: 8px 16px; }
.job-actions details { flex: 0 1 auto; }
.job-actions details[open] { flex: 1 1 100%; }
.handoff-note { background: var(--wash); padding: 8px 11px; border-radius: 6px; }
.handoff-note strong { display: block; }
summary { cursor: pointer; color: var(--action); min-height: 44px; padding: 10px 0; font-weight: 650; }
.pill { display: inline-block; white-space: nowrap; font-size: .85rem; background: #eef2f3; color: #334f58; padding: 3px 9px; border-radius: 16px; }
.pill.working { background: #fff0d2; color: #754409; }
.pill.done { background: var(--wash); color: #135246; }
.pill.late { background: #fce5e2; color: #812c26; }
.summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 16px; border-block: 1px solid var(--line); }
.summary > div { padding: 12px 18px; display: flex; align-items: baseline; gap: 12px; }
.summary > div + div { border-left: 1px solid var(--line); }
.summary strong { font-size: 1.7rem; }
.summary span { color: var(--muted); }
form { margin: 0; }
.stack { display: grid; gap: 14px; }
.stack > button { justify-self: start; }
.grid, .columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px 18px; align-items: start; }
.filters { flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filters label { flex: 1 1 190px; }
label { display: grid; gap: 4px; font-weight: 600; }
input, select, textarea { width: 100%; min-width: 0; padding: 9px 11px; min-height: 45px; font: inherit; font-weight: 400; color: var(--ink); background: white; border: 1px solid #9aafb3; border-radius: 7px; }
textarea { min-height: 94px; resize: vertical; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; background: var(--action); color: white; border: 1px solid var(--action); border-radius: 7px; font: inherit; font-weight: 650; text-decoration: none; text-align: center; cursor: pointer; }
button:hover, .button:hover { background: #124944; }
.secondary { background: #f5faf9; color: var(--action); border-color: #b3cbc7; }
.secondary:hover { background: var(--wash); }
:focus-visible { outline: 3px solid #26918e; outline-offset: 3px; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
legend { padding: 0 6px; font-weight: 700; }
dt { color: var(--muted); }
dd { margin: 0 0 10px; overflow-wrap: anywhere; }
.buttons { flex-wrap: wrap; gap: 5px; }
.timeline { margin: 0 0 14px; padding-left: 26px; }
.timeline li + li { margin-top: 8px; }
.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.back { display: inline-block; margin-bottom: 10px; }
.empty { padding: 22px; color: var(--muted); }
.notice { padding: 12px; background: #fce5e2; color: #812c26; border-radius: 8px; }
.muted { color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 580px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
th { font-size: .9rem; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.login { max-width: 430px; margin: 24px auto; }
.login h1 { font-size: 2rem; }
@media (max-width: 740px) {
  .header-inner { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 8px 14px; }
  nav { grid-column: 1/-1; grid-row: 2; }
  .identity { grid-column: 2; grid-row: 1; }
  nav a { padding-inline: 9px; }
  main { padding: 22px 13px 38px; }
  .grid, .columns { grid-template-columns: minmax(0, 1fr); }
  .panel, .job { padding: 14px; }
  .jobs { padding: 0; }
  .summary > div { flex-direction: column; gap: 0; padding: 6px 8px 10px; }
  .summary span { font-size: .8rem; }
  .stack > button, .job-actions > form > button { width: 100%; }
  .job-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
}
