/* CalcChest — Style D "Tool Chest"
 * Tokens are copied verbatim from docs/design/DESIGN-SPEC.md (taken from
 * docs/design/mockup-d.html :root). Fonts are self-hosted; the site makes
 * zero external requests.
 */

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/oswald-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/archivo-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --chest: #14342b;
  --chest-deep: #0d2620;
  --chest-line: #0a1d18;
  --cream: #f3e9d2;
  --cream-hi: #fffaf0;
  --kraft: #d6b98c;
  --kraft-deep: #b79764;
  --amber: #f2a93b;
  --ink: #16150f;
  --muted: #5f5747;
  --eye: #8d846f;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

* { box-sizing: border-box; }

/* class rules with display:flex must not resurrect a [hidden] element */
[hidden] { display: none !important; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--chest);
  /* Hard 1px diagonal weave only — DESIGN-SPEC forbids gradient glow, so the
     mockup's radial vignette is deliberately not ported. */
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .028) 0 1px, rgba(255, 255, 255, 0) 1px 7px);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15.5px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.grotesk {
  font-family: "Oswald", Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 44px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

/* ---------------- header ---------------- */

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 36px;
  padding: 30px 0 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.plate {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 8px 16px 8px 12px;
  box-shadow: 4px 4px 0 var(--chest-deep);
  transition: transform .12s ease, box-shadow .12s ease;
}
.brand:hover .plate { transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--chest-deep); }

.bolt {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--chest); border: 1.5px solid var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--cream);
  flex: none;
}

.brand-name {
  font-family: "Oswald", Impact, sans-serif;
  font-size: 23px; font-weight: 600;
  letter-spacing: .045em; text-transform: uppercase; line-height: 1;
}

.brand-tag { margin: 0; color: #cfe0d6; font-size: 12.5px; font-weight: 400; }
.brand-tag b { color: var(--cream); font-weight: 600; }

.nav { display: flex; gap: 7px; padding-top: 2px; flex-wrap: wrap; }
.nav a {
  display: block; text-decoration: none; color: var(--ink); background: var(--cream);
  border: 1.5px solid var(--ink); border-radius: 3px; padding: 9px 14px 8px;
  font-family: "Oswald", Impact, sans-serif; font-size: 11.5px; font-weight: 600;
  letter-spacing: .11em; text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--chest-deep);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.nav a:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--chest-deep); }
.nav a[aria-current="page"] { background: var(--amber); box-shadow: 3px 3px 0 var(--ink); }
.nav a:focus-visible, .plate:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------------- hero ---------------- */

.hero { padding: 46px 0 28px; max-width: 720px; }
.hero h1 {
  margin: 0;
  font-family: "Oswald", Impact, sans-serif; font-weight: 600;
  text-transform: uppercase; font-size: 62px; line-height: .98;
  letter-spacing: .005em; color: var(--cream-hi);
  text-shadow: 2px 2px 0 var(--chest-line);
}
.hero p { margin: 16px 0 0; font-size: 16px; line-height: 1.6; color: #bfd2c7; max-width: 590px; }
.hero p b { color: var(--cream); font-weight: 600; }
.hero-compact { padding: 40px 0 22px; }
.hero-compact h1 { font-size: 46px; }

/* ---------------- chest (tool card) ---------------- */

.chest {
  display: flex; flex-direction: column; position: relative;
  /* The shift table scrolls inside .table-scroll; keep that overflow from
     widening the document on narrow screens. */
  overflow-x: clip;
  background: var(--cream); border: 2.5px solid var(--ink); border-radius: 5px;
  box-shadow: 10px 10px 0 var(--chest-deep);
  margin-bottom: 34px;
}

.rail {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 9px 16px; background: var(--chest-deep); border-bottom: 2.5px solid var(--ink);
}
.rail .label {
  font-family: "Oswald", Impact, sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: #a9c4b6;
}
.rail .rivets { display: flex; gap: 10px; }
.rivets i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--kraft);
  border: 1px solid var(--ink); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35);
}

.body {
  display: grid; grid-template-columns: minmax(0, 1fr) 344px;
  gap: 0; padding: 18px; flex: 1;
}

.shifts { padding-right: 18px; border-right: 2px solid var(--ink); display: flex; flex-direction: column; min-width: 0; }
.bay-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin-bottom: 2px;
}
.bay-head h2 {
  margin: 0; font-family: "Oswald", Impact, sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--ink);
}
.bay-head .idx { font-family: "Oswald", Impact, sans-serif; font-size: 12px; letter-spacing: .16em; color: var(--kraft-deep); }

/* ---------------- shift table ---------------- */

.table-scroll { overflow-x: auto; min-width: 0; max-width: 100%; }
table.sheet { width: 100%; border-collapse: collapse; }
.sheet thead th {
  font-family: "Oswald", Impact, sans-serif; font-size: 10.5px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: #8b7f67;
  text-align: left; padding: 10px 6px 9px; border-bottom: 1.5px solid var(--ink); white-space: nowrap;
}
.sheet thead th:first-child { padding-left: 12px; }
.sheet thead th:last-child { text-align: right; padding-right: 12px; }
.sheet tbody td { padding: 7px 6px; border-bottom: 1.5px solid #d9c8a9; vertical-align: middle; }
.sheet tbody td:first-child { padding-left: 12px; }
.sheet tbody td:last-child { padding-right: 12px; text-align: right; }
.sheet tbody tr:last-child td { border-bottom: none; }

.col-day { width: 18%; }
.col-time { width: 20%; }
.col-break { width: 15%; }

.day { display: flex; align-items: baseline; gap: 7px; font-size: 14.5px; font-weight: 700; white-space: nowrap; }
.day b { font-family: "Oswald", Impact, sans-serif; font-size: 10px; font-weight: 500; letter-spacing: .1em; color: var(--kraft-deep); }

input.cell, select.cell {
  width: 100%; height: 34px; padding: 0 8px;
  background: var(--cream-hi); border: 1.5px solid var(--ink); border-radius: 3px;
  font-family: "Archivo", sans-serif; font-size: 12.5px; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
  box-shadow: inset 1px 1px 0 rgba(22, 21, 15, .07);
  transition: background .12s ease, box-shadow .12s ease;
  appearance: none;
}
select.cell {
  background-image: none;
  padding-right: 20px;
  cursor: pointer;
}
input.cell:focus, select.cell:focus {
  outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(242, 169, 59, .55);
}
input.cell::placeholder { color: var(--eye); font-weight: 500; }
input.cell.err { border-color: #a3231b; box-shadow: 0 0 0 3px rgba(163, 35, 27, .18); }

.hrs {
  display: inline-block; min-width: 62px; text-align: center;
  padding: 6px 8px; border-radius: 3px;
  background: var(--chest); color: var(--cream-hi);
  font-family: "Archivo", sans-serif; font-size: 12.5px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -.005em;
  border: 1px solid var(--chest-line);
}
.hrs.blank { background: transparent; color: var(--eye); border-color: #cbb894; }

.row-del {
  border: 1.5px solid var(--ink); background: var(--kraft); color: var(--ink);
  width: 22px; height: 22px; line-height: 1; border-radius: 3px; cursor: pointer;
  font-family: "Archivo", sans-serif; font-size: 13px; font-weight: 700; padding: 0;
}
.row-del:hover { background: var(--amber); }

.row-tools { display: flex; gap: 8px; padding-top: 12px; flex-wrap: wrap; }
.row-tools .hint { min-width: 0; flex: 1 1 200px; }

/* ---------------- side drawer ---------------- */

.side { padding-left: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.drawer { background: var(--cream); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 4px 4px 0 var(--kraft-deep); padding: 10px 12px 12px; }
.drawer .k {
  display: block; font-family: "Oswald", Impact, sans-serif; font-size: 10px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.money { display: flex; align-items: baseline; gap: 6px; }
.money .cur { font-family: "Oswald", Impact, sans-serif; font-size: 22px; font-weight: 600; color: var(--ink); }
.money input {
  flex: 1; min-width: 0; border: none; border-bottom: 2px solid var(--ink);
  background: transparent; font-family: "Archivo", sans-serif; font-size: 24px; font-weight: 700;
  color: var(--ink); padding: 2px 0; font-variant-numeric: tabular-nums;
}
.money input:focus { outline: none; border-bottom-color: var(--amber); box-shadow: 0 1px 0 0 var(--amber); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.field-grid.one { grid-template-columns: 1fr; }
.field { min-width: 0; }
.field .k {
  display: block; font-family: "Oswald", Impact, sans-serif; font-size: 9.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px;
}
.field select, .field input {
  width: 100%; height: 32px; padding: 0 8px; background: var(--cream-hi);
  border: 1.5px solid var(--ink); border-radius: 3px;
  font-family: "Archivo", sans-serif; font-size: 12px; font-weight: 600; color: var(--ink);
  appearance: none; cursor: pointer;
}
.field input { cursor: text; }
.field select:focus, .field input:focus { outline: none; box-shadow: 0 0 0 3px rgba(242, 169, 59, .55); }

.switch { display: flex; align-items: center; gap: 9px; padding: 4px 0 0; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.switch input { width: 17px; height: 17px; accent-color: var(--chest); border: 1.5px solid var(--ink); margin: 0; cursor: pointer; }
.switch span { line-height: 1.25; }
.switch small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }

/* ---------------- results ---------------- */

.results { display: flex; flex-direction: column; gap: 8px; }
.stat {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--cream); border: 1.5px solid var(--kraft-deep); border-radius: 4px;
  padding: 8px 12px;
}
.stat .k {
  font-family: "Oswald", Impact, sans-serif; font-size: 10px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.stat .k em { font-style: normal; color: var(--amber); letter-spacing: .06em; }
.stat .v { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat.gross { background: var(--amber); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--kraft-deep); padding: 12px; }
.stat.gross .k { color: var(--ink); }
.stat.gross .v { font-size: 24px; }

/* ---------------- actions ---------------- */

.actions { display: flex; flex-direction: column; gap: 9px; margin-top: auto; padding-top: 6px; }
.btn-primary {
  display: block; width: 100%; padding: 12px 16px;
  background: var(--amber); color: var(--ink); border: 2px solid var(--ink); border-radius: 4px;
  font-family: "Oswald", Impact, sans-serif; font-size: 13.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .1s ease, box-shadow .1s ease;
}
.btn-primary:hover { transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }
.btn-primary:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.btn-ghost {
  display: block; width: 100%; padding: 9px 10px;
  background: var(--cream); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 4px;
  font-family: "Archivo", sans-serif; font-size: 12px; font-weight: 600; text-align: center;
  text-decoration: none; cursor: pointer;
  box-shadow: 3px 3px 0 var(--kraft-deep); transition: transform .1s ease, box-shadow .1s ease, background .1s ease;
}
.btn-ghost:hover { background: var(--cream-hi); transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--kraft-deep); }
.btn-ghost:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--kraft-deep); }
.btn-row.three { grid-template-columns: 1fr 1fr 1fr; }
.btn-row.four { grid-template-columns: 1fr 1fr; }

.toast {
  margin: 0; padding: 8px 10px; border: 1.5px solid var(--chest);
  background: var(--chest); color: var(--cream-hi); border-radius: 3px;
  font-size: 11.5px; font-weight: 600; text-align: center;
}
.toast[hidden] { display: none; }

.hint { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.45; }

/* ---------------- content panels ---------------- */

.content { padding: 0 0 40px; }
.panel {
  background: var(--cream); border: 2.5px solid var(--ink); border-radius: 5px;
  box-shadow: 8px 8px 0 var(--chest-deep); padding: 26px 30px 28px; margin-bottom: 26px;
}
.panel > h2 {
  margin: 0 0 14px; font-family: "Oswald", Impact, sans-serif; font-size: 21px; font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase; padding-bottom: 10px; border-bottom: 2px solid var(--ink);
}
.panel h3 {
  margin: 22px 0 8px; font-family: "Oswald", Impact, sans-serif; font-size: 14px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.panel p { margin: 0 0 12px; max-width: 74ch; }
.panel p:last-child { margin-bottom: 0; }
.panel ul, .panel ol { margin: 0 0 12px; padding-left: 20px; max-width: 74ch; }
.panel li { margin-bottom: 6px; }
.panel a { color: var(--chest); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.panel a:hover { color: var(--ink); background: rgba(242, 169, 59, .38); }
.panel code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px;
  background: var(--cream-hi); border: 1px solid var(--kraft); border-radius: 3px; padding: 1px 5px;
}
.panel .lede { font-size: 16px; color: var(--muted); }
.fineprint { font-size: 12.5px; color: var(--muted); }
.hairline { border: none; border-top: 1.5px solid var(--kraft); margin: 20px 0; }

.formula {
  background: var(--cream-hi); border: 1.5px solid var(--kraft-deep); border-left: 5px solid var(--chest);
  border-radius: 3px; padding: 12px 14px; margin: 0 0 14px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; line-height: 1.7;
  overflow-x: auto;
}
.formula b { font-weight: 700; }

/* worked example table */
table.example { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 13.5px; }
table.example th {
  font-family: "Oswald", Impact, sans-serif; font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: left;
  padding: 8px 10px; border-bottom: 2px solid var(--ink); white-space: nowrap;
}
table.example td { padding: 7px 10px; border-bottom: 1.5px solid #e0d2b6; font-variant-numeric: tabular-nums; }
table.example tr:last-child td { border-bottom: none; }
table.example td.num, table.example th.num { text-align: right; }
table.example tfoot td { border-top: 2px solid var(--ink); font-weight: 700; padding-top: 9px; }
.table-scroll.wide { margin: 0 0 14px; }

/* faq */
.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1.5px solid #d9c8a9; }
.faq summary {
  cursor: pointer; padding: 13px 26px 13px 2px; list-style: none;
  font-weight: 700; font-size: 15px; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 11px;
  font-family: "Oswald", Impact, sans-serif; font-size: 17px; font-weight: 600; color: var(--kraft-deep);
}
.faq details[open] summary::after { content: "–"; color: var(--ink); }
.faq details > div { padding: 0 2px 15px; color: var(--muted); max-width: 74ch; }
.faq details > div p { margin: 0 0 10px; }
.faq details > div p:last-child { margin-bottom: 0; }

/* channel / tool cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--cream-hi); border: 2px solid var(--ink); border-radius: 4px;
  box-shadow: 5px 5px 0 var(--kraft-deep); padding: 16px 18px 18px;
  text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease;
}
a.card:hover { transform: translate(1px, 1px); box-shadow: 4px 4px 0 var(--kraft-deep); }
.card h3 {
  margin: 0; font-family: "Oswald", Impact, sans-serif; font-size: 16px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
}
.card p { margin: 0; font-size: 13.5px; color: var(--muted); }
.card .tag {
  align-self: flex-start; font-family: "Oswald", Impact, sans-serif; font-size: 9.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
  background: var(--kraft); border: 1px solid var(--ink); border-radius: 2px; padding: 2px 6px;
}
.card.disabled { opacity: .62; }
.card.disabled .tag { background: var(--kraft); }

/* ---------------- results block used by the simple tools ---------------- */

.readout { display: grid; gap: 10px; }
.result-big {
  background: var(--amber); border: 2px solid var(--ink); border-radius: 4px;
  box-shadow: 5px 5px 0 var(--kraft-deep); padding: 14px 16px; text-align: right;
}
.result-big .k {
  display: block; font-family: "Oswald", Impact, sans-serif; font-size: 10px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink); margin-bottom: 4px; text-align: left;
}
.result-big .v { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.result-big .sub { font-size: 12px; font-weight: 600; color: var(--ink); opacity: .72; }

/* ---------------- footer ---------------- */

footer { padding: 26px 0 34px; }
.foot-in { display: flex; align-items: center; gap: 8px; color: #9fbfae; font-size: 12.5px; }
.foot-in svg { flex: none; }
.foot-in p { margin: 0; }
.foot-links { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { color: #9fbfae; text-decoration: none; font-size: 12.5px; }
.foot-links a:hover { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }
.copyright { margin: 14px 0 0; color: #7d9a8b; font-size: 11.5px; }

/* ---------------- print ---------------- */

@media print {
  @page { size: letter portrait; margin: 0.5in; }
  body {
    background: #fff !important; background-image: none !important;
    color: #000; font-size: 11pt; min-height: 0; display: block;
  }
  .wrap { max-width: none; padding: 0; display: block; }
  .top, .hero, footer, .content, .side .actions, .row-tools, .no-print, .toast { display: none !important; }
  .chest { border: none; box-shadow: none; margin: 0; }
  .rail { background: #fff !important; border-bottom: 2px solid #000; color: #000; padding: 0 0 6px; }
  .rail .label { color: #000; }
  .rail .rivets { display: none; }
  .body { display: block; padding: 0; }
  .shifts { border-right: none; padding: 0; }
  .bay-head { border-bottom: 2px solid #000; }
  .bay-head .idx { display: none; }
  input.cell, select.cell {
    border: none !important; border-bottom: 1px solid #666 !important; border-radius: 0;
    box-shadow: none !important; background: transparent !important; color: #000 !important;
    height: auto; padding: 2px 4px; font-size: 11pt;
  }
  .sheet thead th { color: #000; border-bottom: 1.5px solid #000; }
  .sheet tbody td { border-bottom: 1px solid #999; }
  .hrs { background: transparent !important; color: #000 !important; border: none; }
  .row-del { display: none; }
  .side { padding: 12px 0 0; }
  .drawer, .stat { border: 1.5px solid #000 !important; box-shadow: none !important; background: #fff !important; }
  .stat.gross { background: #fff !important; border: 2px solid #000 !important; }
  .money input { border-bottom: 1.5px solid #000; }
  .field select, .field input { border: 1px solid #666; background: #fff; }
  select.cell { text-align: center; }
  .print-only { display: block !important; }
}

.print-only { display: none; }

/* ---------------- responsive ---------------- */

@media (max-width: 980px) {
  .wrap { padding: 0 24px; }
  .body { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .shifts { padding-right: 0; border-right: none; border-bottom: 2px solid var(--ink); padding-bottom: 16px; }
  .side { padding-left: 0; padding-top: 16px; }
  .nav { padding-top: 4px; }
  .hero h1 { font-size: 44px; }
  .hero-compact h1 { font-size: 36px; }
  .cards, .cards.three { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .top { gap: 18px; }
  .nav a { padding: 7px 10px 6px; font-size: 10.5px; letter-spacing: .08em; }
  .hero { padding: 30px 0 20px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 14.5px; }
  .panel { padding: 20px 18px 22px; }
  .chest { box-shadow: 6px 6px 0 var(--chest-deep); }
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .btn-row.three { grid-template-columns: minmax(0, 1fr); }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.sheet { min-width: 520px; }
  .result-big .v { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
