:root {
  --paper: #f7f2e6; --paper-deep: #ebe1c9; --ink: #201d18; --muted: #6d665a;
  --rule: #aaa08e; --orange: #c9671d; --danger: #a62e29; --good: #22694b;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: var(--ink); background: #ddd3be;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
a { color: #884111; }
.site-head { min-height: 66px; padding: 10px clamp(14px,4vw,44px); border-bottom: 1px solid var(--ink); display: flex; align-items: center; gap: 28px; background: var(--ink); color: var(--paper); }
.brand { color: inherit; text-decoration: none; display: grid; text-transform: uppercase; line-height: 1.1; }
.brand span, .kicker { font: 700 10px/1.4 ui-monospace,monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin: 0 0 4px; }
.brand strong { font: 800 19px/1 Georgia,serif; }
nav { display: flex; gap: 18px; align-items: center; margin-left: auto; }
nav a,.link-button { color: var(--paper); font: 600 13px system-ui; }
.inline { display: inline; }
.link-button { border: 0; padding: 0; text-decoration: underline; background: transparent; cursor: pointer; }
.signed-in { font-size: 12px; color: #cfc4b0; }
.page { width: min(1440px,100%); margin: auto; padding: clamp(18px,3vw,40px); }
footer { padding: 20px; text-align: center; border-top: 1px solid var(--rule); color: var(--muted); font-size: 11px; }
.edition { display: flex; justify-content: space-between; gap: 20px; border-block: 1px solid var(--rule); padding: 7px 0; color: var(--muted); font: 700 10px ui-monospace,monospace; letter-spacing: .08em; text-transform: uppercase; }
.masthead { text-align: center; padding: 22px 0 16px; border-bottom: 5px double var(--ink); }
h1,h2,h3 { font-family: Georgia,"Times New Roman",serif; }
.masthead h1 { margin: 0; font-size: clamp(38px,7vw,78px); line-height: .95; text-transform: uppercase; letter-spacing: -.045em; }
.masthead p:last-child { color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(3,1fr); border-bottom: 2px solid var(--ink); }
.metrics article { padding: 18px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.metrics article:nth-child(3n) { border-right: 0; }
.metrics article:nth-last-child(-n+3) { border-bottom: 0; }
.metrics span { display: block; color: var(--muted); font: 700 10px ui-monospace,monospace; text-transform: uppercase; letter-spacing: .1em; }
.metrics strong { display: block; font: 800 clamp(26px,3vw,42px) Georgia,serif; margin-top: 4px; }
.metrics small { display: block; color: var(--muted); margin-top: 5px; }
.bad { color: var(--danger); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 22px; padding: 24px 0 12px; border-bottom: 2px solid var(--ink); }
.section-head h1,.section-head h2 { margin: 0; }
.section-head h1 { font-size: clamp(30px,5vw,54px); }
.section-head h2 { font-size: 28px; }
.section-head > p { color: var(--muted); max-width: 54ch; }
.section-head.compact { padding-top: 0; }
.triage-list { display: grid; }
.triage-card { display: grid; grid-template-columns: minmax(160px,.65fr) minmax(260px,2fr) auto; gap: 18px; align-items: center; padding: 15px 12px; border-bottom: 1px solid var(--rule); background: rgba(255,255,255,.18); }
.triage-card.priority-high { border-left: 5px solid var(--danger); }
.triage-card.priority-medium { border-left: 5px solid var(--orange); }
.triage-card.priority-low { border-left: 5px solid var(--good); }
.triage-card h3 { margin: 0 0 4px; font-size: 20px; }
.triage-card p,.triage-card small { display: block; margin: 0; color: var(--muted); }
.triage-card .worked { color: var(--good); margin-top: 5px; }
.triage-card .unworked { color: var(--danger); margin-top: 5px; }
.rollup { background: var(--paper-deep); color: var(--muted); }
.priority { display: grid; gap: 5px; }
.priority span { font: 800 11px ui-monospace,monospace; color: var(--danger); }
.button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid var(--ink); color: var(--ink); background: transparent; min-height: 42px; padding: 9px 14px; text-decoration: none; font: 700 13px system-ui; cursor: pointer; }
.button.primary { background: var(--ink); color: var(--paper); }
.button.disabled { opacity: .55; cursor: not-allowed; }
.alert-panel.stale { max-width: none; margin: 18px 0 0; border-top-color: var(--danger); }
.columns { display: grid; grid-template-columns: 1fr 1.2fr; gap: 34px; padding-top: 28px; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 10px; }
.summary-grid > div { border: 1px solid var(--rule); padding: 12px; background: var(--paper-deep); }
.summary-grid h3 { margin-top: 0; }
.summary-grid p { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.period,.hint { color: var(--muted); font-size: 12px; }
.table-scroll { overflow-x: auto; border-bottom: 1px solid var(--ink); }
table { width: 100%; min-width: 680px; border-collapse: collapse; }
table.wide { min-width: 1150px; }
th { border-bottom: 2px solid var(--ink); padding: 9px; text-align: left; color: var(--muted); font: 700 10px ui-monospace,monospace; text-transform: uppercase; }
td { border-bottom: 1px solid var(--rule); padding: 10px 9px; vertical-align: top; font-size: 12px; }
td small { display: block; color: var(--muted); margin-top: 3px; }
.login-card,.form-page,.alert-panel { max-width: 720px; margin: 5vh auto; border: 1px solid var(--rule); border-top: 5px solid var(--ink); padding: clamp(20px,4vw,38px); background: var(--paper-deep); }
.login-card h1,.form-page h1,.alert-panel h1 { font-size: clamp(30px,5vw,48px); margin: 4px 0 14px; }
form label:not(.check) { display: grid; gap: 6px; margin: 15px 0; font-weight: 700; font-size: 13px; }
input,select,textarea { width: 100%; border: 1px solid var(--rule); background: #fffdf7; color: var(--ink); min-height: 44px; padding: 9px; font: inherit; }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.check input { width: auto; min-height: auto; }
.form-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.actions { display: flex; gap: 10px; margin-top: 20px; }
.miner-callout { display: grid; gap: 4px; border-block: 1px solid var(--rule); padding: 14px 0; color: var(--muted); }
.miner-callout strong { color: var(--ink); font: 800 20px Georgia,serif; }
.flash { padding: 12px 15px; margin-bottom: 14px; border: 1px solid var(--rule); }
.flash.error { border-color: var(--danger); color: var(--danger); }
.flash.success { border-color: var(--good); color: var(--good); }
.field-error { display: block; color: var(--danger); font-size: 12px; margin-top: -8px; }
.empty { padding: 28px; text-align: center; color: var(--muted); border-bottom: 1px solid var(--rule); }
@media (max-width: 850px) {
  .site-head { flex-wrap: wrap; gap: 10px 18px; } nav { order: 3; width: 100%; overflow-x: auto; margin: 0; padding-top: 8px; border-top: 1px solid #5c574f; } .signed-in { margin-left: auto; }
  .metrics { grid-template-columns: repeat(2,1fr); } .metrics article { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); } .metrics article:nth-child(2n) { border-right: 0; } .metrics article:nth-last-child(-n+2) { border-bottom: 0; }
  .triage-card { grid-template-columns: 110px 1fr; } .triage-card .button { grid-column: 1/-1; width: 100%; }
  .columns { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .page { padding: 14px; } .edition { display: grid; } .masthead h1 { font-size: 38px; }
  .metrics { grid-template-columns: 1fr 1fr; } .metrics article { padding: 12px; }
  .section-head { display: grid; align-items: start; } .section-head .button { width: 100%; }
  .triage-card { grid-template-columns: 1fr; gap: 8px; padding: 16px 10px; } .triage-card .button { grid-column: auto; }
  .summary-grid { grid-template-columns: 1fr; } .login-card,.form-page { margin: 0; } nav { gap: 14px; }
}
