/* Advent Calendar With Friends — Festive Winter Paper & Gift-Box System v2 */
:root {
  --forest: #112d24;
  --forest-deep: #0b2019;
  --forest-mid: #1d4a3a;
  --bg: #f6f1e6;
  --paper: #fbf7ef;
  --surface: #ffffff;
  --surface-alt: #ede5d4;
  --ink: #17231e;
  --muted: #4b5b53;
  --accent: #b8322a;
  --accent-dark: #8e231c;
  --accent-soft: #fbe8e6;
  --gold: #c98d24;
  --gold-ink: #6f4908;
  --gold-bg: #f8edd4;
  --slate: #2b4c63;
  --border: #d9ceba;
  --radius: 14px;
  --shadow-sm: 0 2px 6px rgba(11, 32, 25, 0.07);
  --shadow-md: 0 12px 32px rgba(11, 32, 25, 0.16);
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  accent-color: var(--accent);
}
::selection { background: var(--gold-bg); color: var(--forest-deep); }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest-mid); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--accent);
  color: var(--surface);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { left: 16px; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 880px;
}

/* Header — Dark Winter Forest Bookend */
.site-header {
  background: var(--forest-deep);
  border-bottom: 1px solid var(--forest-mid);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--surface);
  font-weight: 700;
  white-space: nowrap;
}
.brand-text {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.2;
  color: var(--surface);
  letter-spacing: -0.01em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  text-decoration: none;
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover {
  background: var(--forest-mid);
  color: var(--surface);
}
.site-nav a.nav-pill {
  background: var(--forest-mid);
  border: 1px solid var(--gold);
  color: var(--gold-bg);
  margin-left: 6px;
}
.site-nav a.nav-pill:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}
.nav-toggle {
  display: none;
  background: var(--forest-mid);
  color: var(--surface);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  cursor: pointer;
}

/* Full-Bleed Winter Forest Hero Stage */
.winter-stage {
  background-color: var(--forest);
  background-image:
    radial-gradient(2px 2px at 8% 14%, rgba(255, 255, 255, 0.55) 50%, transparent 100%),
    radial-gradient(2.5px 2.5px at 22% 32%, rgba(248, 237, 212, 0.45) 50%, transparent 100%),
    radial-gradient(2px 2px at 41% 12%, rgba(255, 255, 255, 0.4) 50%, transparent 100%),
    radial-gradient(3px 3px at 67% 18%, rgba(248, 237, 212, 0.5) 50%, transparent 100%),
    radial-gradient(2px 2px at 84% 26%, rgba(255, 255, 255, 0.5) 50%, transparent 100%),
    radial-gradient(2px 2px at 93% 10%, rgba(248, 237, 212, 0.45) 50%, transparent 100%),
    radial-gradient(2.5px 2.5px at 14% 76%, rgba(255, 255, 255, 0.35) 50%, transparent 100%),
    radial-gradient(2px 2px at 89% 72%, rgba(255, 255, 255, 0.35) 50%, transparent 100%),
    linear-gradient(180deg, var(--forest-deep) 0%, var(--forest) 45%, var(--forest-mid) 100%);
  color: var(--paper);
  border-bottom: 4px solid var(--gold);
  padding-bottom: 44px;
}
.winter-stage-compact {
  padding-bottom: 36px;
}

/* Hero inside winter stage */
.hero-band {
  padding: 22px 0 14px;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gold-bg);
  margin-bottom: 10px;
}
.breadcrumb a { color: var(--gold-bg); text-decoration: none; }
.breadcrumb a:hover { color: var(--surface); text-decoration: underline; }
.hero-copy {
  max-width: 820px;
}
h1 {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--surface);
}
h2 {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  color: var(--ink);
}
h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--ink);
}
.hero-lead {
  margin: 0 0 14px;
  max-width: 68ch;
  font-size: 16px;
  color: var(--paper);
}
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.hero-pills li {
  background: var(--gold-bg);
  color: var(--forest-deep);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
}

/* Tool stage — Transparent wrapper on winter forest */
.tool-band {
  padding: 6px 0 0;
}
.tool-shell {
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--forest); color: var(--surface); }
.btn-primary:hover { background: var(--forest-deep); color: var(--surface); }
.btn-accent { background: var(--accent); color: var(--surface); box-shadow: 0 4px 12px rgba(184, 50, 42, 0.28); }
.btn-accent:hover { background: var(--accent-dark); color: var(--surface); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-alt); color: var(--forest); }
.btn-light { background: var(--paper); color: var(--forest-deep); border-color: var(--gold-bg); }
.btn-light:hover { background: var(--gold-bg); color: var(--forest-deep); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 7px 13px; font-size: 13px; }

/* Builder Hero Split: LEFT 24-Door Advent Box (1.42fr) | RIGHT Quick Create Card (0.95fr) */
.builder-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 0.95fr);
  gap: 24px;
  align-items: start;
}

/* Left Tray: Warm Cream Advent Box Framing 24 Illustrated Gift Doors */
.advent-tray {
  background: var(--paper);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-md);
  color: var(--ink);
}
.advent-tray[data-theme="cranberry"] { background: var(--accent-soft); border-color: var(--accent); }
.advent-tray[data-theme="snowfall"] { background: var(--surface); border-color: var(--slate); }
.advent-tray[data-theme="candlelight"] { background: var(--gold-bg); border-color: var(--gold); }

.tray-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.tray-head > div:first-child { min-width: 0; flex: 1; }
.mode-switch { flex-shrink: 0; }
.tray-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  color: var(--forest-deep);
}
.tray-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Mode switch pills inside tray header */
.mode-switch {
  display: inline-flex;
  background: var(--surface-alt);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  gap: 2px;
}
.mode-btn {
  min-height: 34px;
  padding: 5px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.mode-btn[aria-selected="true"] {
  background: var(--forest);
  color: var(--surface);
}

/* 24 Tactile Gift-Wrapped Doors (ZERO truncation, ZERO overlap!) */
.doors-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.door-tile {
  position: relative;
  aspect-ratio: 1 / 1.02;
  min-height: 84px;
  border-radius: 12px;
  border: 2px solid var(--forest-deep);
  background: var(--forest-mid);
  color: var(--surface);
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  overflow: hidden;
  font-family: var(--font-sans);
  box-shadow: 0 3px 0 rgba(11, 32, 25, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
/* Crisp wrapped-gift ribbon bands */
.door-tile::before,
.door-tile::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background: rgba(251, 247, 239, 0.2);
}
.door-tile::before {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 10px;
  transform: translateX(-50%);
}
.door-tile::after {
  left: 0;
  right: 0;
  top: 50%;
  height: 10px;
  transform: translateY(-50%);
}

/* Harmonious 4-wrap festive color cycle across the 24 doors (all from :root palette!) */
.door-tile[data-wrap="0"] { background: var(--forest-mid); border-color: var(--forest-deep); }
.door-tile[data-wrap="1"] { background: var(--accent); border-color: var(--accent-dark); }
.door-tile[data-wrap="2"] { background: var(--gold); border-color: var(--gold-ink); }
.door-tile[data-wrap="3"] { background: var(--slate); border-color: var(--forest-deep); }

/* Theme variations */
.advent-tray[data-theme="snowfall"] .door-tile[data-wrap="0"],
.advent-tray[data-theme="snowfall"] .door-tile[data-wrap="2"] { background: var(--slate); border-color: var(--forest-deep); }
.advent-tray[data-theme="snowfall"] .door-tile[data-wrap="1"],
.advent-tray[data-theme="snowfall"] .door-tile[data-wrap="3"] { background: var(--forest-mid); border-color: var(--forest-deep); }

.advent-tray[data-theme="cranberry"] .door-tile[data-wrap="0"],
.advent-tray[data-theme="cranberry"] .door-tile[data-wrap="3"] { background: var(--accent); border-color: var(--accent-dark); }
.advent-tray[data-theme="cranberry"] .door-tile[data-wrap="1"],
.advent-tray[data-theme="cranberry"] .door-tile[data-wrap="2"] { background: var(--forest-mid); border-color: var(--forest-deep); }

.advent-tray[data-theme="candlelight"] .door-tile[data-wrap="0"],
.advent-tray[data-theme="candlelight"] .door-tile[data-wrap="2"] { background: var(--gold); border-color: var(--gold-ink); }
.advent-tray[data-theme="candlelight"] .door-tile[data-wrap="1"],
.advent-tray[data-theme="candlelight"] .door-tile[data-wrap="3"] { background: var(--forest); border-color: var(--forest-deep); }

.door-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(11, 32, 25, 0.24);
}

/* Crisp circular number medallion — centered, zero overlap */
.door-num {
  position: relative;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--paper);
  border: 2px solid var(--forest-deep);
  color: var(--forest-deep);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Short clean status tag (only rendered when filled/opened/ready — NEVER "Open f..."!) */
.door-tag {
  position: relative;
  z-index: 2;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--forest-deep);
  color: var(--gold-bg);
  max-width: calc(100% - 6px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Filled door state: warm parchment wax-sealed look */
.door-tile.is-filled {
  background: var(--surface) !important;
  border: 2px solid var(--accent) !important;
  color: var(--ink);
}
.door-tile.is-filled::before,
.door-tile.is-filled::after { display: none; }
.door-tile.is-filled .door-num {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: var(--surface);
  width: 34px;
  height: 34px;
  font-size: 16px;
}
.door-tile.is-filled .door-tag {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* Opened door state */
.door-tile.is-opened {
  background: var(--gold-bg) !important;
  border: 2px solid var(--gold) !important;
  color: var(--ink);
}
.door-tile.is-opened::before,
.door-tile.is-opened::after { display: none; }
.door-tile.is-opened .door-num {
  background: var(--forest);
  border-color: var(--forest-deep);
  color: var(--gold-bg);
  width: 34px;
  height: 34px;
  font-size: 16px;
}
.door-tile.is-opened .door-tag {
  background: var(--forest);
  color: var(--surface);
}

/* Special Day 24 finale door */
.door-tile.is-day24 {
  border: 2.5px solid var(--gold);
  box-shadow: 0 3px 0 rgba(111, 73, 8, 0.35);
}

.tray-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

/* Right Side: Streamlined Quick-Start Creation Card */
.create-card {
  background: var(--paper);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-md);
  color: var(--ink);
}
.create-card-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.2;
  color: var(--forest-deep);
}
.create-card-lead {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}

/* Style swatch picker */
.style-swatches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.swatch-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.swatch-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.swatch-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  flex-shrink: 0;
  border: 1.5px solid var(--forest-deep);
}
.swatch-dot[data-c="evergreen"] { background: var(--forest-mid); }
.swatch-dot[data-c="cranberry"] { background: var(--accent); }
.swatch-dot[data-c="snowfall"] { background: var(--slate); }
.swatch-dot[data-c="candlelight"] { background: var(--gold); }

/* Expandable advanced options inside create card */
.more-opts {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.more-opts summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--forest-mid);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}
.more-opts summary::-webkit-details-marker { display: none; }
.more-opts summary::after { content: "+"; font-size: 16px; font-weight: 700; }
.more-opts[open] summary::after { content: "−"; }
.more-opts-body {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Quick Code Join Strip below create card */
.code-strip {
  margin-top: 14px;
  background: var(--forest-deep);
  border: 1px solid var(--forest-mid);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--paper);
}
.code-strip label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-bg);
  margin-bottom: 8px;
}
.code-strip-row {
  display: flex;
  gap: 8px;
}
.code-strip-row input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}

/* Form Controls */
.field-stack { display: flex; flex-direction: column; gap: 12px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.field input[type="text"],
.field input[type="url"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
}
.field textarea { min-height: 88px; resize: vertical; }
.field-hint { font-size: 12px; color: var(--muted); }

.builder-panel {
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--ink);
}
.panel-heading { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--ink); }
.builder-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.status-msg {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  background: var(--surface);
  color: var(--forest);
  border: 1.5px solid var(--forest-mid);
}
.status-msg.is-error { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }

/* Share Link Box */
.share-box {
  margin-top: 14px;
  padding: 16px;
  background: var(--gold-bg);
  border: 1.5px solid var(--gold);
  border-radius: 12px;
}
.share-box-title { margin: 0 0 6px; font-weight: 700; font-size: 15px; color: var(--forest-deep); }
.share-url-row { display: flex; gap: 8px; margin-top: 10px; }
.share-url-row input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Saved calendars list */
.saved-list { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.saved-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  margin-top: 8px;
  font-size: 13px;
}

/* Door Modal */
.door-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 32, 25, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 80;
}
.door-modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-md);
  padding: 24px;
}
.door-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.door-note-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.door-note-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}
.tag-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--gold-bg);
  color: var(--gold-ink);
  font-size: 12px;
  font-weight: 700;
}

/* Shared Viewer Page (/c) */
.viewer-card {
  background: var(--paper);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-md);
}
.viewer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

/* Non-builder tool shells (Ideas & Printable Template) inside winter stage */
.acf-ideas-tool,
.acf-template-tool {
  background: var(--paper);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

/* Steps Band — Full Symmetric 4-Column Row */
.steps-band {
  padding: 56px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.section-title { margin-bottom: 28px; }
.section-centered { text-align: center; }
.steps-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.step-card {
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--surface);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
}
.step-card p { margin: 0; font-size: 15px; color: var(--muted); }

/* Diagram Band — Perfectly Aligned to Reading Width */
.diagram-band { padding: 48px 0 0; }
.diagram-frame {
  margin: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.diagram-frame figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }

/* Editorial Prose — SYMMETRICALLY CENTERED 880px Column (ZERO right-side dead void!) */
.article-band { padding: 52px 0; }
.prose {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 40px 44px;
  box-shadow: var(--shadow-sm);
}
.prose h2 { margin-top: 38px; margin-bottom: 14px; color: var(--forest-deep); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 26px; margin-bottom: 8px; color: var(--forest); }
.prose p { margin: 0 0 16px; max-width: 72ch; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 22px; max-width: 72ch; }
.prose li { margin-bottom: 8px; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0 28px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}
.prose thead { background: var(--surface-alt); }
.prose th, .prose td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.prose th { font-weight: 700; color: var(--forest-deep); }
.prose tr:last-child td { border-bottom: 0; }

/* Related Grid — Balanced 6-column smart layout (5 items = 3 + 2, 4 items = 2 + 2, ZERO awkward orphan gap!) */
.related-band {
  padding: 56px 0;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}
.related-card {
  grid-column: span 2;
  display: block;
  text-decoration: none;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
/* 5 cards: top row 3 cards (span 2 each), bottom row 2 balanced cards (span 3 each!) */
.related-card:nth-child(4):nth-last-child(2),
.related-card:nth-child(5):nth-last-child(1) {
  grid-column: span 3;
}
/* 4 cards: crisp 2x2 grid (span 3 each!) */
.related-card:first-child:nth-last-child(4),
.related-card:first-child:nth-last-child(4) ~ .related-card {
  grid-column: span 3;
}
.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.related-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.related-card h3 { color: var(--forest-deep); margin-bottom: 6px; }
.related-card p { margin: 0; font-size: 14px; color: var(--muted); }

/* FAQ Band — Centered 880px width matching prose column symmetrically! */
.faq-band { padding: 56px 0 64px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.faq-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 16px;
  color: var(--forest-deep);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 22px 18px; color: var(--muted); font-size: 15px; }
.faq-answer p { margin: 0; }

/* Idea picker & Printable specific styles */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip-btn {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.chip-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}
.ideas-24-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.idea-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px;
  font-size: 14px;
}
.idea-day { font-weight: 700; color: var(--accent); font-size: 12px; margin-bottom: 4px; }

/* Printable preview sheet */
.print-sheet {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 20px;
  margin-top: 18px;
}
.print-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.print-sheet-title { margin: 0; font-family: var(--font-display); font-size: 24px; color: var(--ink); }
.print-grid-24 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.print-cell {
  border: 1.5px dashed var(--forest);
  border-radius: 8px;
  min-height: 78px;
  padding: 8px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.print-sheet.is-bw .print-cell { background: var(--surface); border-color: var(--ink); }
.print-cell-num { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--forest); }
.print-sheet.is-bw .print-cell-num { color: var(--ink); }
.print-cell-text { font-size: 12px; color: var(--muted); word-break: break-word; }
.print-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.print-table th, .print-table td { border: 1px solid var(--border); padding: 7px 9px; text-align: left; }

/* Footer — Dark Winter Forest Bookend */
.site-footer {
  background: var(--forest-deep);
  color: var(--paper);
  padding: 52px 0 32px;
  border-top: 4px solid var(--gold);
}
.site-footer a { color: var(--gold-bg); text-decoration: none; }
.site-footer a:hover { color: var(--surface); text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--forest-mid);
}
.brand-footer .brand-text { color: var(--surface); font-size: 20px; }
.footer-note { margin: 12px 0; color: var(--paper); font-size: 14px; max-width: 44ch; }
.footer-contact { font-size: 14px; color: var(--paper); margin: 0; }
.footer-heading { margin: 0 0 12px; font-weight: 700; font-size: 14px; color: var(--gold-bg); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-bottom { padding-top: 20px; font-size: 13px; color: var(--gold-bg); }
.footer-bottom p { margin: 0; }

.notfound-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* Responsive */
@media (max-width: 960px) {
  .builder-hero-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .ideas-24-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prose { padding: 28px 24px; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .header-inner { gap: 8px; }
  .brand { min-width: 0; gap: 8px; }
  .brand-mark svg { width: 26px; height: 26px; }
  .brand-text { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
  .tray-head { flex-wrap: wrap; }
  h1 { font-size: 27px; }
  h2 { font-size: 23px; }
  .nav-toggle { display: inline-flex; align-items: center; flex-shrink: 0; padding: 6px 12px; font-size: 13px; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    background: var(--forest-deep);
    border-bottom: 2px solid var(--gold);
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-md);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px; }
  .site-nav a.nav-pill { margin-left: 0; text-align: center; }
  .advent-tray, .create-card, .viewer-card, .acf-ideas-tool, .acf-template-tool { padding: 16px; }
  .field-grid { grid-template-columns: 1fr; }
  .doors-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .door-tile { min-height: 74px; }
  .door-num { width: 32px; height: 32px; font-size: 15px; }
  .steps-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .related-card,
  .related-card:nth-child(4):nth-last-child(2),
  .related-card:nth-child(5):nth-last-child(1),
  .related-card:first-child:nth-last-child(4),
  .related-card:first-child:nth-last-child(4) ~ .related-card { grid-column: span 1; }
  .ideas-24-grid { grid-template-columns: 1fr; }
  .print-grid-24 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prose { padding: 22px 18px; }
  .prose table { display: block; overflow-x: auto; }
  .share-url-row, .code-strip-row { flex-direction: column; }
  .btn { width: 100%; }
  .btn-sm { width: auto; }
}
@media print {
  .site-header, .site-footer, .hero-band, .steps-band, .diagram-band, .article-band, .related-band, .faq-band, .no-print {
    display: none !important;
  }
  .winter-stage { background: var(--surface) !important; border: 0 !important; padding: 0 !important; }
  body { background: var(--surface); }
  .tool-band { padding: 0; }
  .container { max-width: 100%; padding: 0; }
  .acf-template-tool { border: 0; box-shadow: none; padding: 0; background: var(--surface); }
  .print-sheet { border: 1.5px solid var(--ink); margin: 0; }
  .print-grid-24 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
}
