/* =========================================================================
   LAIN Shot Competition
   Design direction: a creative league kept on paper. Typography carries the
   hierarchy (one grotesque across weight and width, tabular figures for every
   number), hairline rules do the structure, and colour is reserved for state.
   ========================================================================= */

:root {
  --paper: #fcfbf8;
  --surface: #ffffff;
  --surface-sunk: #f6f4ee;
  --ink: #191813;
  --ink-2: #6a675c;
  --ink-3: #96928a;
  --rule: #e3e0d6;
  --rule-strong: #cfcbbe;

  --signal: #2438c8;
  --signal-soft: #eceefb;
  --late: #b3352b;
  --late-soft: #fbedeb;
  --good: #1d6b4a;
  --good-soft: #e9f3ee;
  --wait: #8a6a15;
  --wait-soft: #f8f1e1;
  --gold: #9c7519;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --rail-w: 212px;
  --radius: 3px;
  --shadow-pop: 0 12px 32px rgba(25, 24, 19, 0.14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: Archivo, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; }

h1 {
  font-size: 30px;
  font-variation-settings: "wdth" 88;
  letter-spacing: -0.015em;
}

h2 { font-size: 19px; letter-spacing: -0.01em; }
h3 { font-size: 15px; }

p { margin: 0 0 var(--space-3); }
a { color: var(--signal); }

/* The one editorial voice in the system: month names and the winner. */
.serif {
  font-family: Newsreader, Georgia, serif;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.005em;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------------------------------------------------------------- shell */
.app { display: flex; min-height: 100vh; }

.rail {
  width: var(--rail-w);
  flex: 0 0 var(--rail-w);
  border-right: 1px solid var(--rule);
  background: var(--surface);
  padding: var(--space-5) 0 var(--space-5);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.rail-brand {
  padding: 0 var(--space-5) var(--space-5);
  display: block;
  text-decoration: none;
  color: inherit;
}

.rail-brand b {
  display: block;
  font-size: 17px;
  font-weight: 700;
  font-variation-settings: "wdth" 78;
  letter-spacing: 0.02em;
}

.rail-brand span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }

.rail-group { padding: var(--space-4) 0 0; }

.rail-group-label {
  font-size: 11px;
  color: var(--ink-3);
  padding: 0 var(--space-5) var(--space-2);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.rail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 7px var(--space-5);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  border-left: 2px solid transparent;
  min-height: 36px;
}

.rail-link:hover { background: var(--surface-sunk); color: var(--ink); }

.rail-link[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-left-color: var(--signal);
  background: var(--surface-sunk);
}

.rail-count {
  font-size: 12px;
  color: var(--surface);
  background: var(--signal);
  border-radius: 10px;
  padding: 0 6px;
  min-width: 18px;
  text-align: center;
  font-weight: 600;
}

.rail-foot { margin-top: auto; padding: var(--space-4) var(--space-5) 0; border-top: 1px solid var(--rule); }
.rail-user { font-size: 13px; }
.rail-user b { display: block; font-weight: 600; }
.rail-user span { color: var(--ink-3); font-size: 12px; }

.main { flex: 1; min-width: 0; }
.page { max-width: 1180px; padding: var(--space-6) var(--space-6) var(--space-8); margin: 0 auto; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.page-head .sub { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.head-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* ---------------------------------------------------------------- panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.panel + .panel { margin-top: var(--space-5); }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

.panel-body { padding: var(--space-5); }
.panel-body.flush { padding: 0; }

.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ------------------------------------------------------- figures / stats */
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.figure { padding: var(--space-4) var(--space-5); border-right: 1px solid var(--rule); }
.figure:last-child { border-right: 0; }
.figure-label { font-size: 12px; color: var(--ink-2); }

.figure-value {
  font-size: 30px;
  font-weight: 600;
  font-variation-settings: "wdth" 82;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 2px;
}

.figure-value small { font-size: 16px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.figure-note { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.figure.alert .figure-value { color: var(--late); }
.figure.done .figure-value { color: var(--good); }

/* ---------------------------------------------------------------- coverage */
.coverage { display: flex; gap: 2px; margin-top: var(--space-3); }
.coverage i { height: 5px; flex: 1; background: var(--rule-strong); border-radius: 1px; }
.coverage i.on { background: var(--signal); }

/* ---------------------------------------------------------------- buttons */
.btn {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease;
}

.btn:hover { background: var(--surface-sunk); border-color: var(--ink-3); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn-primary:hover { background: #1c2ea8; border-color: #1c2ea8; }
.btn-danger { color: var(--late); border-color: #e4c4bf; }
.btn-danger:hover { background: var(--late-soft); border-color: var(--late); }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-sunk); border-color: var(--rule); }

/* ---------------------------------------------------------------- forms */
.field { display: block; margin-bottom: var(--space-4); }
.field-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.field-hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="number"], select, textarea {
  font: inherit;
  font-size: 14px;
  width: 100%;
  padding: 8px 10px;
  min-height: 38px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--signal); outline: none; box-shadow: 0 0 0 3px var(--signal-soft); }
input[aria-invalid="true"] { border-color: var(--late); }

.checkbox { display: flex; align-items: flex-start; gap: var(--space-2); font-size: 14px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; min-height: 0; margin-top: 3px; accent-color: var(--signal); }

.inline-form { display: flex; gap: var(--space-2); align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; }

/* ---------------------------------------------------------------- status */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px 2px 6px;
  border-radius: 2px;
  background: var(--surface-sunk);
  color: var(--ink-2);
  white-space: nowrap;
}

.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 6px; }
.status.s-live, .status.s-submitted, .status.s-claimed, .status.s-active { background: var(--signal-soft); color: var(--signal); }
.status.s-late, .status.s-rejected { background: var(--late-soft); color: var(--late); }
.status.s-scored, .status.s-approved, .status.s-completed { background: var(--good-soft); color: var(--good); }
.status.s-pending, .status.s-progress, .status.s-review, .status.s-judging { background: var(--wait-soft); color: var(--wait); }
.status.s-available { background: var(--surface-sunk); color: var(--ink-2); }

/* ---------------------------------------------------------------- tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 1;
}

.table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-sunk); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .muted { color: var(--ink-3); }
.table-wrap { overflow-x: auto; }
.sortable { cursor: pointer; user-select: none; }
.sortable[aria-sort="ascending"]::after { content: " \2191"; }
.sortable[aria-sort="descending"]::after { content: " \2193"; }

.row-link { color: inherit; text-decoration: none; font-weight: 500; }
.row-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- calendar */
.cal-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--rule);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface);
}

.cal-head div {
  padding: var(--space-2) var(--space-3);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  border-right: 1px solid var(--rule);
}

.cal-head div:last-child { border-right: 0; }
.cal-head div.wknd { color: var(--ink-3); background: var(--surface-sunk); }

.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--rule);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--rule);
  gap: 1px;
  overflow: hidden;
}

.day {
  background: var(--surface);
  min-height: 116px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.day.wknd { background: var(--surface-sunk); }
.day.pad { background: var(--paper); }
.day.today .day-n { color: var(--signal); font-weight: 700; }
.day.drop-target { background: var(--signal-soft); box-shadow: inset 0 0 0 2px var(--signal); }
.day-top { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.day-n { font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.day-note { font-size: 10px; color: var(--ink-3); }
.day.dbl .day-note { color: var(--late); font-weight: 600; }

.chip {
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--ink-3);
  border-radius: 2px;
  background: var(--surface);
  padding: 5px 6px;
  font-size: 12px;
  line-height: 1.3;
  cursor: grab;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: inherit;
  display: block;
}

.chip:hover { border-color: var(--ink-3); background: var(--surface-sunk); }
.chip:active { cursor: grabbing; }
.chip.dragging { opacity: 0.4; }
.chip b { display: block; font-weight: 600; font-size: 12px; }
.chip span { display: block; color: var(--ink-2); font-size: 11px; }
.chip.c-live { border-left-color: var(--signal); }
.chip.c-late { border-left-color: var(--late); }
.chip.c-scored { border-left-color: var(--good); }
.chip.c-progress, .chip.c-review { border-left-color: var(--wait); }
.chip.mine { background: var(--signal-soft); border-color: #c3c9f0; }

.unplaced {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-sunk);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
}

.unplaced .chip { width: auto; min-width: 150px; background: var(--surface); }

/* ---------------------------------------------------------------- board */
.board { width: 100%; border-collapse: collapse; }
.board th {
  font-size: 12px;
  color: var(--ink-2);
  text-align: right;
  font-weight: 600;
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--rule-strong);
}

.board th:first-child, .board th:nth-child(2) { text-align: left; }
.board td { padding: var(--space-3); border-bottom: 1px solid var(--rule); text-align: right; }
.board td:first-child, .board td:nth-child(2) { text-align: left; }
.board tbody tr:last-child td { border-bottom: 0; }

.rank {
  font-size: 22px;
  font-weight: 600;
  font-variation-settings: "wdth" 76;
  color: var(--ink-3);
  width: 44px;
}

.rank.top { color: var(--ink); }
.board .score { font-size: 20px; font-weight: 600; font-variation-settings: "wdth" 84; letter-spacing: -0.01em; }
.board .score.dim { color: var(--ink-3); font-weight: 400; font-size: 15px; }
.board tr.is-winner { background: #fbf6e9; }

.trophy {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid #e0cf9f;
  background: #fbf6e9;
  border-radius: 2px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}

/* winner card: the one place the serif and a large score share the stage */
.winner {
  border: 1px solid #e0cf9f;
  background: linear-gradient(180deg, #fdfaf1, var(--surface));
  border-radius: var(--radius);
  padding: var(--space-5);
  display: flex;
  gap: var(--space-5);
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.winner-name { font-size: 26px; }
.winner-score { font-size: 46px; font-weight: 600; font-variation-settings: "wdth" 80; letter-spacing: -0.02em; line-height: 1; }

/* ---------------------------------------------------------------- brief */
.brief-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--space-5); }

.moodboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: var(--space-2); }
.moodboard figure { margin: 0; position: relative; }
.moodboard img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: 2px;
  display: block;
  background: var(--surface-sunk);
}

.moodboard .rm {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(25, 24, 19, 0.78);
  color: #fff;
  border: 0;
  border-radius: 2px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { display: flex; align-items: center; gap: var(--space-2); padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.linklist li:last-child { border-bottom: 0; }
.linklist a { word-break: break-all; }

.keywords { display: flex; flex-wrap: wrap; gap: 5px; }
.kw { font-size: 12px; border: 1px solid var(--rule-strong); border-radius: 2px; padding: 2px 7px; color: var(--ink-2); }

.pool-item { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); padding: var(--space-4); }
.pool-item.taken { background: var(--surface-sunk); }
.pool-item h3 { margin-bottom: 2px; }
.pool-thumbs { display: flex; gap: 4px; margin: var(--space-3) 0; }
.pool-thumbs img { width: 56px; height: 44px; object-fit: cover; border: 1px solid var(--rule); border-radius: 2px; }

/* ---------------------------------------------------------------- scoring */
.score-grid { display: grid; gap: var(--space-4); }

.criterion { border-bottom: 1px solid var(--rule); padding-bottom: var(--space-4); }
.criterion:last-child { border-bottom: 0; padding-bottom: 0; }
.criterion-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.criterion-name { font-weight: 600; font-size: 14px; }
.criterion-hint { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.criterion-input { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-3); }
.criterion-input input[type="range"] { flex: 1; accent-color: var(--signal); min-height: 24px; }
.criterion-input input[type="number"] { width: 76px; text-align: right; }
.criterion-max { font-size: 13px; color: var(--ink-3); white-space: nowrap; }

.total-line { display: flex; align-items: baseline; justify-content: space-between; padding-top: var(--space-4); border-top: 2px solid var(--ink); margin-top: var(--space-4); }
.total-line .n { font-size: 32px; font-weight: 600; font-variation-settings: "wdth" 82; letter-spacing: -0.02em; }

.review-card { border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--space-4); background: var(--surface); }
.review-card.empty { border-style: dashed; color: var(--ink-3); }
.review-line { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.review-line .v { font-weight: 600; }

/* ---------------------------------------------------------------- misc */
.empty {
  text-align: center;
  padding: var(--space-7) var(--space-5);
  color: var(--ink-2);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty h3 { margin-bottom: 6px; }
.empty p { max-width: 46ch; margin: 0 auto var(--space-4); font-size: 14px; }

.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--rule); margin-bottom: var(--space-5); flex-wrap: wrap; }
.tab {
  padding: 9px 14px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

.meta { display: flex; gap: var(--space-4); flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.meta b { color: var(--ink); font-weight: 600; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }

.notice { border-left: 3px solid var(--signal); background: var(--signal-soft); padding: var(--space-3) var(--space-4); border-radius: 0 var(--radius) var(--radius) 0; font-size: 14px; }
.notice.warn { border-left-color: var(--wait); background: var(--wait-soft); }
.notice.bad { border-left-color: var(--late); background: var(--late-soft); }

/* ---------------------------------------------------------------- modal */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(25, 24, 19, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
  overflow-y: auto;
  z-index: 40;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-pop);
  margin: auto;
}

.modal.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--rule); }
.modal-body { padding: var(--space-5); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--rule); }

.toast-wrap { position: fixed; bottom: var(--space-5); left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: var(--space-2); align-items: center; }
.toast {
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow-pop);
  max-width: 90vw;
}
.toast.bad { background: var(--late); }
.toast.good { background: var(--good); }

/* ---------------------------------------------------------------- auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--space-5); }
.auth { width: 100%; max-width: 380px; }
.auth-mark { font-size: 20px; font-weight: 700; font-variation-settings: "wdth" 78; letter-spacing: 0.02em; }
.auth-sub { color: var(--ink-2); font-size: 14px; margin: 4px 0 var(--space-5); }
.auth .panel-body { padding: var(--space-5); }
.auth-switch { text-align: center; font-size: 13px; margin-top: var(--space-4); color: var(--ink-2); }

.err { color: var(--late); font-size: 13px; margin-bottom: var(--space-3); }

/* ---------------------------------------------------------------- loading */
.loading { padding: var(--space-8); text-align: center; color: var(--ink-3); font-size: 14px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .rail {
    width: 100%;
    flex: none;
    height: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: var(--space-4) 0;
    flex-direction: column;
  }
  .rail-nav { display: flex; overflow-x: auto; gap: var(--space-1); padding: 0 var(--space-4); }
  .rail-group { display: flex; padding: 0; }
  .rail-group-label { display: none; }
  .rail-link { border-left: 0; border-bottom: 2px solid transparent; padding: 8px 12px; white-space: nowrap; }
  .rail-link[aria-current="page"] { border-left: 0; border-bottom-color: var(--signal); }
  .rail-foot { margin-top: var(--space-3); }
  .page { padding: var(--space-5) var(--space-4) var(--space-7); }
  .brief-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 24px; }
  .cal, .cal-head { grid-template-columns: repeat(7, minmax(74px, 1fr)); }
  .cal-scroll { overflow-x: auto; }
  .day { min-height: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  .rail, .head-actions, .btn { display: none !important; }
  .page { max-width: none; padding: 0; }
  .panel { break-inside: avoid; }
}
