:root {
  --navy: #0b1d2a;
  --navy-2: #143044;
  --gold: #c8914f;
  --gold-2: #e2c39a;
  --ink: #1c2b36;
  --muted: #5c6b75;
  --line: #e4d9c8;
  --cream: #f7f5f1;
  --paper: #ffffff;
  --good: #1f7a4d;
  --good-bg: #e8f6ef;
  --bad: #8c2f2f;
  --bad-bg: #fdecec;
  --warn: #8a5a12;
  --warn-bg: #fbf4ea;
  --shadow: 0 8px 24px rgba(11, 29, 42, 0.06);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-size: 16.5px; line-height: 1.45; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--navy); }
img { max-width: 100%; }
.top {
  background: var(--navy);
  color: white;
  border-bottom: 3px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: white; min-width: 0; }
.brand-logo { height: 44px; width: auto; display: block; flex: none; }
.brand-text { color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; border-left: 1px solid rgba(200, 145, 79, 0.45); padding-left: 12px; line-height: 1.2; }
.workspace { margin-left: auto; text-align: right; font-size: 14px; }
.workspace b { display: block; }
.burger { display: none; border: 1px solid var(--gold); color: var(--gold); padding: 8px 10px; border-radius: 8px; }
.shell { display: grid; grid-template-columns: 220px 1fr; flex: 1; min-height: 0; }
nav { background: white; border-right: 1px solid var(--line); padding: 12px; }
nav a, nav .linkish {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 4px;
}
nav a.active, nav a:hover { background: var(--cream); color: var(--navy); box-shadow: inset 3px 0 var(--gold); }
main { padding: 20px 22px 48px; max-width: 1100px; }
.public-main { max-width: 760px; margin: 0 auto; padding: 28px 18px 64px; }
h1 { font-size: 1.7rem; margin: 0 0 8px; color: var(--navy); font-weight: 650; }
h2 { font-size: 1.15rem; margin: 0 0 8px; color: var(--navy); }
.lede, .muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.card, .stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px;
  margin: 0 0 14px;
}
.stat b { display: block; font-size: 1.4rem; color: var(--navy); }
.stat span { color: var(--muted); font-size: 0.92rem; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: white;
}
input[type="checkbox"] {
  width: 1.1rem;
  min-height: 1.1rem;
  padding: 0;
  accent-color: var(--gold);
}
.nav-toggle {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
textarea { min-height: 90px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
button, .button {
  background: var(--navy);
  color: white;
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-shadow: inset 0 -3px 0 var(--gold);
}
button:hover, .button:hover { background: var(--navy-2); }
button:focus-visible, .button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
button.secondary, .button.secondary { background: white; color: var(--navy); border: 1px solid var(--navy); box-shadow: none; }
button.secondary:hover, .button.secondary:hover { background: var(--cream); }
button.warn { background: var(--warn); }
button.bad { background: var(--bad); }
.banner { padding: 10px 12px; border-radius: 8px; margin: 0 0 12px; }
.banner.good { background: var(--good-bg); color: var(--good); }
.banner.bad { background: var(--bad-bg); color: var(--bad); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); font-size: 0.85rem; }
.pill.current { background: var(--navy); color: white; border-color: var(--navy); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; margin: 0 0 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; background: var(--line); }
.timeline .done .dot { background: var(--good); }
.timeline .current .dot { background: var(--gold); box-shadow: 0 0 0 4px #f3e6d2; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--navy); color: white; font-weight: 600; }
.thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; background: var(--cream); }
.checks { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 8px 0; }
.card form + h2, .card form + form { margin-top: 18px; }
.draft { border-left: 4px solid var(--gold); background: var(--warn-bg); padding: 10px 12px; }
footer.site-footer {
  background: var(--navy);
  color: #f3e6d2;
  border-top: 3px solid var(--gold);
  padding: 14px 16px 18px;
  text-align: center;
  font-size: 0.92rem;
  margin-top: auto;
}
footer.site-footer a { color: white; text-decoration: none; }
footer.site-footer a:hover { color: var(--gold-2); text-decoration: underline; }
footer.site-footer .sep { color: var(--gold); margin: 0 0.15em; }
footer.site-footer .test-note { color: #e2c39a; font-size: 0.85rem; margin: 10px 0 0; }
.login-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 22px 20px 20px;
  margin: 0 0 16px;
}
.public-main { width: 100%; flex: 1; }
.userbox { display: flex; gap: 8px; align-items: center; }
@media (max-width: 860px) {
  .top { gap: 8px; padding: 10px 12px; }
  .brand-logo { height: 36px; }
  .brand-text { display: none; }
  .workspace { max-width: 42vw; font-size: 12px; }
  .workspace span { display: none; }
  .burger { display: inline-block; }
  .shell { display: block; }
  nav { display: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav-toggle:checked ~ .shell nav { display: block; }
  .row { grid-template-columns: 1fr; }
  .workspace b { max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  table.cards thead { display: none; }
  table.cards tr { display: block; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
  table.cards td { display: flex; justify-content: space-between; gap: 12px; border: 0; }
  table.cards td::before { content: attr(data-label); color: var(--muted); }
}
@media print {
  .top, nav, .no-print, footer.site-footer { display: none !important; }
  .shell { display: block; }
  body { background: white; }
}
