:root {
  color-scheme: light;
  --paper: #f4f2eb;
  --card: #fffefa;
  --ink: #20201d;
  --muted: #77766e;
  --line: #dedbd1;
  --accent: #376657;
  --accent-soft: #e7efe9;
  --wood: #ead9aa;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, select { font: inherit; }
button { cursor: pointer; }
.page-shell { max-width: 1180px; padding: 30px 26px 22px; margin: 0 auto; }
.masthead, .puzzle-heading, .archive-topline, .calendar-header, .solution-title-row, .puzzle-footer, .site-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.masthead { padding: 6px 2px 24px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.04em; }
h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.025em; }
h3 { margin: 0; font-size: 1.05rem; }
.text-link, .site-footer a { color: var(--accent); font-weight: 700; text-decoration: none; }
.text-link:hover, .site-footer a:hover { text-decoration: underline; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .85fr); gap: 22px; padding-top: 22px; }
.puzzle-card, .archive-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 24px #26251c0a; }
.puzzle-card { padding: 22px; }
.archive-card { padding: 22px; align-self: start; }
.rank-badge { min-width: 66px; padding: 9px 13px; color: var(--accent); background: var(--accent-soft); border-radius: 99px; text-align: center; font-size: .9rem; font-weight: 800; }
.board-wrap { min-height: 360px; display: grid; place-items: center; padding: 14px 0; }
.board-svg { display: block; width: min(100%, 760px); height: auto; border-radius: 9px; background: var(--card); }
.empty-state { max-width: 470px; margin: 40px auto; color: var(--muted); line-height: 1.6; text-align: center; }
.puzzle-footer { min-height: 46px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.primary-button, .quiet-button, .month-arrow { border: 0; border-radius: 9px; font-weight: 700; }
.primary-button { padding: 10px 15px; color: white; background: var(--accent); }
.primary-button:hover { background: #294f43; }
.quiet-button { padding: 8px 10px; color: var(--accent); background: var(--accent-soft); }
.quiet-button:hover { filter: brightness(.97); }
.solution-panel { margin: 4px 0 16px; padding: 16px; background: #f5f4ee; border: 1px solid var(--line); border-radius: 12px; }
.solution-list { display: flex; flex-wrap: wrap; gap: 7px 18px; margin: 14px 0 0; padding-left: 24px; line-height: 1.5; }
.solution-list li { min-width: 90px; font-variant-numeric: tabular-nums; }
.field-label { display: block; margin: 22px 0 7px; color: var(--muted); font-size: .78rem; font-weight: 750; }
select { width: 100%; padding: 11px 12px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 9px; }
.calendar-header { margin: 22px 0 12px; }
.month-arrow { width: 34px; height: 34px; color: var(--ink); background: #f2f1eb; font-size: 1.3rem; line-height: 1; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.weekday, .day-cell { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; font-size: .81rem; }
.weekday { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.day-cell { color: #aaa99f; }
button.day-cell { color: var(--ink); background: #f4f3ed; border: 1px solid transparent; font-weight: 650; }
button.day-cell:hover { border-color: var(--accent); }
button.day-cell.selected { color: white; background: var(--accent); }
.archive-status { min-height: 20px; margin: 12px 0 0; color: var(--muted); font-size: .78rem; }
.small-note { margin: 10px 0 0; color: var(--muted); font-size: .77rem; line-height: 1.5; }
.site-footer { margin-top: 20px; padding: 14px 2px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
@media (max-width: 800px) {
  .content-grid { grid-template-columns: 1fr; }
  .page-shell { padding: 20px 14px; }
  .puzzle-card, .archive-card { padding: 17px; }
  .board-wrap { min-height: unset; }
}
