:root {
  color-scheme: dark;
  --bg: #12161c;
  --bg-2: #1b2430;
  --ink: #f4efe4;
  --muted: #c3b7a4;
  --line: #314054;
  --accent: #c45a3a;
  --tab: #243044;
}

body[data-theme="dusk"] {
  --bg: #14110f;
  --bg-2: #241910;
  --ink: #f6efe4;
  --muted: #cbb9a4;
  --line: #3d3126;
  --accent: #e08a3c;
  --tab: #2a221b;
}

body[data-theme="folk"] {
  color-scheme: light;
  --bg: #f3ead7;
  --bg-2: #efe2c8;
  --ink: #2a2118;
  --muted: #6d5b48;
  --line: #d7c6a6;
  --accent: #9b2d2d;
  --tab: #e7d7b8;
}

body[data-theme="wood"] {
  --bg: #1a1612;
  --bg-2: #2a221b;
  --ink: #f0e6d4;
  --muted: #cbb89a;
  --line: #43362a;
  --accent: #c4a15a;
  --tab: #2c241c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

img { display: block; width: 100%; height: auto; }

.dress {
  max-height: 168px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.dress img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  object-position: center 72%;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, black);
}

.mark {
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
}

.tabs, .themes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tabs { flex: 1; }

.tabs button, .themes button {
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--tab);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.tabs button.is-on, .themes button.is-on {
  background: var(--accent);
  color: #fff8ee;
  border-color: transparent;
}

.intro {
  padding: 2.2rem 1.5rem 1.2rem;
  max-width: 40rem;
}

h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  letter-spacing: -0.03em;
}

h2 {
  margin: 0 0 0.4rem;
  font-weight: 500;
  font-size: 1.25rem;
}

.lede {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero, figure { margin: 0; }

.hero { padding: 0 1.5rem 1.5rem; }

.hero img {
  max-height: 74vh;
  object-fit: cover;
  border: 1px solid var(--line);
}

.hero.map img { object-fit: contain; background: #1a140e; max-height: none; }

figcaption {
  padding: 0.65rem 0 0;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.gallery, .cards, .split, .recipes {
  display: grid;
  gap: 1.4rem;
  padding: 0 1.5rem 3.5rem;
}

.cards article, .split {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 1.1rem 1.15rem 1.2rem;
}

.split { padding: 0; overflow: hidden; }
.split figure { background: #000; }
.split .cards {
  padding: 1rem;
  gap: 0.8rem;
}
.split .cards article {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 0.9rem 0.2rem;
}
.split .cards article:first-child { border-top: 0; }

p { margin: 0; line-height: 1.5; color: var(--muted); }

.panel[hidden] { display: none; }

.recipes article ul {
  margin: 0.7rem 0 0.8rem;
  padding-left: 1.1rem;
  color: var(--ink);
}
.serves {
  margin-top: 0.25rem;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lessons { grid-template-columns: 1fr; }
.lessons article { max-width: 46rem; }
.maps { padding-top: 0.4rem; }
.words h2 { font-family: Georgia, serif; letter-spacing: 0; text-transform: none; font-size: 1.6rem; }

@media (min-width: 800px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure:last-child { grid-column: 1 / -1; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .recipes { grid-template-columns: 1fr 1fr; }
  .lessons { grid-template-columns: 1fr; }
  .words { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1.1fr 0.9fr; align-items: stretch; }
}

.flag {
  width: 42px;
  height: 28px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--line);
}
a.mark { color: inherit; text-decoration: none; }
.tabs a {
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--tab);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
}
.lesson {
  padding: 1.6rem 1.5rem 4rem;
  max-width: 42rem;
}
.crumb { margin: 0 0 0.8rem; }
.crumb a { color: var(--muted); }
.lesson h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
.lesson p { margin: 0 0 1rem; color: var(--ink); }
.lesson .lede { color: var(--muted); }
.lesson .hero { padding: 0 0 1.2rem; }
.more a { color: var(--accent); }
