@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Source+Serif+4:ital,wght@0,400;1,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:    #1a1a1a;
  --paper:  #f5f0e8;
  --rule:   #c8bfaa;
  --accent: #2a4a3e;
  --muted:  #888;
  --width:  990px;
}

html { font-size: 18px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

/* ── Header ── */

header {
  width: 100%;
  max-width: var(--width);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--rule);
}

header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

header > p {
  margin-top: 0.4rem;
  font-style: italic;
  color: var(--muted);
}

a.back {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

a.back:hover { text-decoration: underline; }

/* ── Puzzle list ── */

main {
    width: 100%;
    max-width: var(--width);
    flex: 1;
}

ol.puzzle-list { list-style: none; }

ol.puzzle-list li { border-bottom: 1px solid var(--rule); }

ol.puzzle-list li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.9rem 0;
  text-decoration: none;
  color: var(--ink);
  gap: 1rem;
}

ol.puzzle-list li a:hover .puzzle-title {
  color: var(--accent);
  text-decoration: underline;
}

.puzzle-title { flex: 1; }

.puzzle-date {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  font-style: italic;
}

/* ── Puzzle page ── */

main.puzzle-page iframe {
  width: 100%;
  height: 75vh;
  border: none;
  display: block;
}

/* ── Footer ── */

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  width: 100%;
  max-width: var(--width);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

footer a { color: var(--accent); }
