:root {
  --paper: #f5f2e9;
  --ink: #20282b;
  --muted: #59666b;
  --line: #a8b1b5;
  --panel: #fffdfa;
  --official: #24556a;
  --official-dark: #1d3945;
  --accent: #8a4d2b;
  --approved: #1f6f4a;
  --questioned: #806300;
  --rejected: #9a3131;
  --reclassified: #4c5f99;
  --ai: #6b4b7a;
  font-family: Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.45; font-size: 16px; }
a { color: #0b5870; }
.site-header { display: flex; justify-content: space-between; gap: 1rem; padding: 1.25rem; background: #dce8e6; border-bottom: 4px solid var(--official); }
.kicker { margin: 0; text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; color: var(--official); font-weight: 700; }
h1 { margin: .15rem 0; font-size: clamp(1.9rem, 4vw, 3.2rem); letter-spacing: 0; }
.subtitle { margin: 0; color: var(--muted); }
.stamp { align-self: center; border: 3px solid var(--accent); color: var(--accent); padding: .7rem; font-weight: 800; transform: rotate(-2deg); text-align: center; background: #fffaf3; min-width: 11rem; }
.quick-nav { display: flex; flex-wrap: wrap; gap: .5rem; padding: .75rem 1.25rem; background: var(--official-dark); position: sticky; top: 0; z-index: 4; }
.quick-nav a, .button-like { display: inline-block; color: #fff; background: var(--official); text-decoration: none; padding: .55rem .75rem; border-radius: 4px; font-weight: 700; }
.button-like.full { width: 100%; text-align: center; margin-top: .75rem; }
.layout-shell { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 1rem; max-width: 1480px; margin: 0 auto; padding: 1rem; align-items: start; }
main { min-width: 0; }
.status-sidebar { position: sticky; top: 4.1rem; align-self: start; max-height: calc(100vh - 5rem); overflow: auto; background: #fffef9; border: 1px solid var(--line); border-radius: 6px; padding: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.status-sidebar h2, .status-sidebar h3 { margin: .25rem 0 .5rem; }
.status-facts { margin: 0; }
.status-facts div { border-bottom: 1px solid #d9e0e2; padding: .45rem 0; }
.status-facts dt { font-size: .78rem; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.status-facts dd { margin: .1rem 0 0; font-weight: 700; }
.mobile-status { display: none; }
.training-cards { display: grid; gap: .6rem; }
.training-card { border: 1px solid var(--line); border-radius: 6px; padding: .65rem; background: #f8fbfb; }
.training-card h4 { margin: 0 0 .35rem; color: var(--official-dark); }
.progress { height: .55rem; background: #dde5e7; border-radius: 999px; overflow: hidden; margin-top: .35rem; }
.progress span { display: block; height: 100%; background: var(--approved); width: 0; }
.mini-list { padding-left: 1.1rem; margin: .35rem 0 1rem; }
section, details { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; margin: 1rem 0; padding: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
details summary { cursor: pointer; }
details summary h2 { display: inline; }
h2 { color: var(--official); margin-top: 0; border-bottom: 2px solid #dbe3e6; padding-bottom: .25rem; letter-spacing: 0; }
h3 { color: #2e4048; letter-spacing: 0; }
.notice { border-left: 6px solid var(--official); }
.opening { padding: 1.25rem; }
.time-mark { font-size: 1.18rem; font-weight: 800; color: var(--official-dark); }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.workspace-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.workspace-grid > div { border: 1px solid #d4dcdf; background: #f7fbfb; border-radius: 6px; padding: .75rem; }
.label { margin: 0; color: var(--muted); font-size: .78rem; text-transform: uppercase; font-weight: 700; }
.workspace-value { margin: .25rem 0 0; font-weight: 700; }
label { display: block; font-weight: 700; }
input, select, textarea, button { font: inherit; }
input, select, textarea { width: 100%; border: 1px solid #829199; border-radius: 4px; padding: .55rem; margin-top: .25rem; background: #fff; color: var(--ink); }
textarea { min-height: 5.5rem; resize: vertical; }
textarea.report-box { min-height: 10rem; }
.short-notes input { min-height: 2.4rem; }
.count { display: block; font-size: .78rem; color: var(--muted); text-align: right; font-weight: 400; }
button { border: 2px solid var(--official); background: #eff7f9; color: #173743; border-radius: 4px; padding: .5rem .7rem; cursor: pointer; font-weight: 700; }
button:hover, button:focus, a:focus, input:focus, select:focus, textarea:focus, summary:focus { outline: 3px solid #f2c84b; outline-offset: 2px; }
button.danger { border-color: var(--rejected); color: var(--rejected); }
.button-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .7rem 0; }
.blocks { border: 1px solid var(--line); padding: .7rem; margin-top: 1rem; }
.blocks label { display: inline-flex; align-items: center; gap: .25rem; margin-right: .75rem; margin-bottom: .35rem; }
.blocks input { width: auto; }
.forced-overtime { color: var(--accent); }
.hint, .rule-note { color: var(--muted); font-size: .94rem; }
.rule-note { border-left: 4px solid var(--accent); padding: .55rem .75rem; background: #fff8ee; }
.roll-output { border: 2px dashed var(--official); padding: .75rem; background: #f4fbfd; font-weight: 700; min-height: 3rem; }
.guided-panel { border-left: 6px solid var(--accent); }
.guide-step { font-size: 1.1rem; font-weight: 800; background: #fff8ee; border: 1px solid #e4c9aa; border-radius: 6px; padding: .85rem; }
.compact-list { columns: 2; padding-left: 1.4rem; }
table { border-collapse: collapse; width: 100%; margin: .75rem 0; background: #fff; }
th, td { border: 1px solid #aab5ba; padding: .45rem; vertical-align: top; }
th { background: #e8eef0; text-align: left; }
.training-table td:first-child { font-weight: 700; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .5rem; }
.status { display: inline-block; padding: .15rem .35rem; border-radius: 3px; border: 1px solid currentColor; }
.approved { color: var(--approved); }
.questioned { color: var(--questioned); }
.rejected { color: var(--rejected); }
.reclassified { color: var(--reclassified); }
.ai { color: var(--ai); }
.example-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.example-grid div { border: 1px solid #d4dcdf; background: #f8fbfb; border-radius: 6px; padding: .75rem; }
.locked-assignment { background: #edf7ef; color: var(--approved); font-weight: 700; }
.print-only { display: none; }
@media (max-width: 980px) {
  .layout-shell { grid-template-columns: 1fr; padding: .75rem; }
  .status-sidebar { position: fixed; left: 0; right: 0; top: auto; bottom: 0; max-height: 72vh; z-index: 6; border-radius: 10px 10px 0 0; transform: translateY(calc(100% - 3.25rem)); transition: transform .2s ease; }
  .status-sidebar.open { transform: translateY(0); }
  .mobile-status { display: flex; gap: .75rem; align-items: center; position: sticky; top: 0; z-index: 7; background: var(--official-dark); color: #fff; padding: .55rem .75rem; }
  .mobile-status button { background: #fff; color: var(--official-dark); border-color: #fff; padding: .35rem .55rem; }
  .quick-nav { position: static; }
}
@media (max-width: 760px) {
  .site-header, .grid.two, .grid.three, .grid.four, .form-grid, .workspace-grid, .example-grid { grid-template-columns: 1fr; display: grid; }
  .stamp { transform: none; width: 100%; }
  .compact-list { columns: 1; }
  table { font-size: .88rem; }
  th, td { padding: .35rem; }
}
