:root {
  --ink: #1f1d19; --ink-2: #5b564b; --line: #cfc6b3; --paper: #fffdf8;
  --green-bg: #c8e6c9; --green-fg: #1b5e20; --blue-bg: #bbdefb; --blue-fg: #0d47a1;
  --yellow-bg: #fff59d; --yellow-fg: #5d4037; --orange-bg: #ffcc80; --orange-fg: #8a3a00;
  --red-bg: #ffcdd2; --red-fg: #b71c1c;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif; --serif: "Fraunces", Georgia, serif; --mono: "IBM Plex Mono", Consolas, monospace;
}
* { box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { margin: 0; background: #e9e4d8; color: var(--ink); font: 13px/1.45 var(--sans); }
.toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 12px 24px; background: var(--ink); color: #f3efe6; }
.tb-link { color: #f3efe6; text-decoration: none; font-weight: 500; }
.tb-link:hover { text-decoration: underline; }
.tb-check { display: flex; align-items: center; gap: 8px; margin-left: auto; cursor: pointer; }
.tb-btn { border: 0; border-radius: 999px; padding: 8px 22px; background: #f3efe6; color: var(--ink); font: 600 14px var(--sans); cursor: pointer; transition: transform .15s; }
.tb-btn:hover { transform: translateY(-1px); }
.sheet { max-width: 1180px; margin: 28px auto 60px; padding: 40px 44px; background: var(--paper); box-shadow: 0 10px 40px rgba(31,29,25,.15); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.eyebrow { margin: 0 0 4px; font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
h1 { margin: 0; font: 650 34px/1 var(--serif); }
.meta { margin: 0; display: grid; gap: 3px; text-align: right; font-size: 12px; }
.meta div { display: flex; gap: 8px; justify-content: flex-end; }
.meta dt { color: var(--ink-2); }
.meta dd { margin: 0; font-weight: 500; }
.key { list-style: none; display: flex; flex-wrap: wrap; gap: 14px; padding: 0; margin: 12px 0 14px; font-size: 11px; color: var(--ink-2); }
.key li { display: flex; align-items: center; gap: 5px; }
.sw { width: 11px; height: 11px; border-radius: 3px; border: 1px solid rgba(0,0,0,.25); }
.sw-green { background: var(--green-bg); } .sw-blue { background: var(--blue-bg); } .sw-yellow { background: var(--yellow-bg); }
.sw-orange { background: var(--orange-bg); } .sw-red { background: var(--red-bg); }
.sheet-table { width: 100%; border-collapse: collapse; }
.sheet-table th { text-align: left; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); padding: 6px 8px; border-bottom: 1px solid var(--ink); }
.sheet-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sheet-table tr { break-inside: avoid; page-break-inside: avoid; }
.sheet-table thead { display: table-header-group; }
tr.r-green td:first-child { border-left: 5px solid var(--green-fg); } tr.r-blue td:first-child { border-left: 5px solid var(--blue-fg); }
tr.r-yellow td:first-child { border-left: 5px solid #c9a400; } tr.r-orange td:first-child { border-left: 5px solid var(--orange-fg); }
tr.r-red td:first-child { border-left: 5px solid var(--red-fg); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.tag-green { background: var(--green-bg); color: var(--green-fg); } .tag-blue { background: var(--blue-bg); color: var(--blue-fg); }
.tag-yellow { background: var(--yellow-bg); color: var(--yellow-fg); } .tag-orange { background: var(--orange-bg); color: var(--orange-fg); }
.tag-red { background: var(--red-bg); color: var(--red-fg); }
.c-urg { width: 150px; }
.c-task b { font-weight: 600; font-size: 13.5px; }
.notes { margin-top: 3px; color: var(--ink-2); white-space: pre-wrap; font-size: 12px; }
.p-comments { margin: 6px 0 0; padding: 6px 0 0 10px; list-style: none; border-top: 1px dotted var(--line); font-size: 11.5px; }
.p-comments li { margin: 2px 0; white-space: pre-wrap; }
.cm-meta { color: var(--ink-2); font-weight: 500; }
.mono { font-family: var(--mono); font-size: 12px; }
.nowrap { white-space: nowrap; }
.rel { font-family: var(--sans); font-size: 11px; color: var(--ink-2); }
.c-link { max-width: 200px; word-break: break-all; font-size: 11px; color: var(--ink-2); }
.c-tick { width: 44px; text-align: center; }
.box { display: inline-block; width: 14px; height: 14px; border: 1.5px solid var(--ink); border-radius: 2px; }
.muted { color: var(--ink-2); }
.empty { padding: 40px 0; text-align: center; color: var(--ink-2); }
.file-note { margin-top: 28px; break-inside: avoid; }
.lines span { display: block; height: 28px; border-bottom: 1px solid var(--line); }
@page { size: landscape; margin: 12mm; }
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .sheet { margin: 0; padding: 0; max-width: none; box-shadow: none; }
}
@media (max-width: 800px) { .sheet { padding: 20px; margin: 0; } .sheet-head { flex-direction: column; align-items: flex-start; } .meta, .meta div { text-align: left; justify-content: flex-start; } }
