/* Feast Planner styles */
:root {
  --ground: #FBF6EE;
  --ink: #1A2B24;
  --muted: #4F625A;
  --evergreen: #1F4D3A;
  --night: #163B2E;
  --holly: #A3241B;
  --berry: #8E1B1B;
  --gold: #F1C873;
  --line: #E6DCCB;
  --soft: #EFE7D8;
  --card: #FFFFFF;
  --serif: 'Young Serif', Georgia, serif;
  --script: 'Pinyon Script', cursive;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.55; }
a { color: var(--evergreen); }
a:hover { color: var(--holly); }
img, svg { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background-color: var(--night);
  background-image: radial-gradient(rgba(255,255,255,.6) 1.3px, transparent 1.8px), radial-gradient(rgba(255,255,255,.32) 1px, transparent 1.5px);
  background-size: 52px 52px, 31px 31px; background-position: 0 0, 14px 21px;
}
.lights { display: block; width: 100%; height: 54px; position: relative; }
.site-head { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 4px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-family: var(--serif); font-size: 23px; }
.brand:hover { color: #fff; }
.site-nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: 16px; font-weight: 500; }
.site-nav a { color: #fff; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; color: #fff; }
.hero-body { position: relative; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; padding-top: 32px; padding-bottom: 120px; }
.hero-text { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px; background: rgba(241,200,115,.16); border: 1px solid rgba(241,200,115,.5); color: #F6DDA6; font-size: 15px; font-weight: 600; }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; letter-spacing: -0.015em; }
.hero h1 .script { font-family: var(--script); font-size: 1.62em; line-height: .8; color: var(--gold); letter-spacing: 0; }
.hero-text p { margin: 0; max-width: 600px; font-size: 20px; color: #D6E5DC; }
.tree { flex: 0 1 240px; }
.holly-deco { position: absolute; left: 4px; bottom: 54px; }
.snow-edge { position: absolute; left: 0; bottom: -1px; width: 100%; height: 60px; display: block; }

.flake { position: absolute; top: 0; border-radius: 50%; background: #fff; pointer-events: none; animation: fall linear infinite; }
@keyframes fall { 0% { transform: translate3d(0,-30px,0); } 50% { transform: translate3d(14px,280px,0); } 100% { transform: translate3d(-6px,620px,0); } }
.bulb { animation: twinkle 2.4s ease-in-out infinite; }
.bulb:nth-of-type(3n+1) { animation-delay: .8s; }
.bulb:nth-of-type(3n+2) { animation-delay: 1.6s; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .flake, .bulb { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Planner controls ---------- */
.controls-wrap { position: relative; margin-top: -70px; padding-bottom: 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.card.red-top { border-top: 6px solid var(--holly); }
.card.green-top { border-top: 6px solid var(--evergreen); }
.controls { display: flex; flex-direction: column; gap: 24px; box-shadow: 0 20px 40px -30px rgba(26,43,36,.4); }
.controls-row { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-weight: 700; font-size: 16px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button, .select { width: 48px; height: 48px; border-radius: 12px; border: 1px solid #DCCFB8; background: var(--ground); color: var(--ink); font-size: 24px; font-weight: 600; cursor: pointer; }
.stepper output { min-width: 52px; text-align: center; font-family: var(--serif); font-size: 30px; }
.select { width: auto; min-width: 150px; padding: 0 14px; font: inherit; font-size: 18px; font-weight: 600; }
.segmented { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #F3ECDF; }
.segmented button { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: transparent; color: #3E5149; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--holly); color: #fff; }
.check { display: flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 600; font-size: 16px; cursor: pointer; }
.check input, .list input { width: 22px; height: 22px; margin: 0; accent-color: var(--evergreen); flex: none; }
.sides { display: flex; flex-direction: column; gap: 10px; border-top: 1px dashed #E2D6C1; padding-top: 20px; }
.sides .hint { font-weight: 500; color: #5E6E66; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; background: #fff; color: #3E5149; border: 1px dashed #BFB094; }
.chip[aria-pressed="true"] { background: var(--evergreen); color: #fff; border: 1px solid var(--evergreen); }

/* ---------- Results ---------- */
.results { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding-bottom: 56px; }
.results > .card { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.shop-card { flex: 1 1 420px; min-width: 0; }
.time-card { flex: 1 1 480px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 400; font-size: 30px; }
.card-head .sub { font-size: 15px; color: var(--muted); }
.turkey { background: #FBF3E6; border-radius: 14px; padding: 18px; display: flex; gap: 16px; align-items: center; }
.turkey strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; }
.turkey .note { display: block; font-size: 15px; color: #5C4310; }
.progress { display: flex; flex-direction: column; gap: 6px; }
.progress-top { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.progress-top b { color: var(--evergreen); }
.bar { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--evergreen); transition: width .3s; }
.time-card .progress-top b { color: var(--holly); }
.time-card .bar { background: #F3E2E0; }
.time-card .bar > i { background: var(--holly); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--soft); }
.list label { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 4px 0; cursor: pointer; }
.list .item { flex: 1; font-size: 17px; }
.list .amount { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.list li.is-done .item, .list li.is-done .amount { color: #8E9A94; text-decoration: line-through; }
.steps label { align-items: flex-start; padding: 12px 0; }
.steps input { accent-color: var(--holly); margin-top: 3px; }
.steps .time { flex: none; width: 60px; font-family: var(--serif); font-size: 20px; color: var(--evergreen); font-variant-numeric: tabular-nums; }
.steps li.is-key .time { color: var(--holly); }
.steps .what { display: flex; flex-direction: column; }
.steps .what strong { font-size: 17px; }
.steps .what span { font-size: 15px; color: var(--muted); }
.steps li.is-done .what, .steps li.is-done .time { opacity: .5; text-decoration: line-through; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn { min-height: 48px; padding: 0 20px; border-radius: 12px; border: 0; background: var(--evergreen); color: #fff; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #DCCFB8; }
.btn.link { background: transparent; color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: underline; padding: 0 12px; }
/* Always rendered (even when empty) so screen readers announce new messages; the negative margin hides the gap */
.share-msg { margin: -8px 0 0; font-size: 15px; font-weight: 600; color: var(--evergreen); }
.share-msg:empty { margin-top: -18px; }
.defrost { background: #EEF3F8; border-radius: 14px; padding: 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 16px; color: #1F3A57; }
.defrost[hidden] { display: none; }
.fine { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Safety, extras ---------- */
.safety { background-color: var(--berry); background-image: radial-gradient(rgba(255,255,255,.18) 1.2px, transparent 1.7px); background-size: 34px 34px; color: #FBEAEA; border-radius: 20px; padding: 32px; display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; }
.safety h2 { margin: 0 0 8px; font-family: var(--serif); font-weight: 400; font-size: 30px; color: #fff; }
.safety p { margin: 0; font-size: 16px; }
.safety > div { flex: 1 1 320px; }
.safety ul { flex: 2 1 480px; margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 17px; }
.safety strong { color: #fff; }
.section { padding-bottom: 56px; }
.extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; padding-bottom: 64px; }
.slot { border: 1px dashed #CDBF9F; border-radius: 16px; padding: 22px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.slot .kicker { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.slot small { font-size: 14px; color: var(--muted); }
.slot.ad { min-height: 110px; align-items: center; justify-content: center; }
.more { background: #fff; border-top: 1px solid var(--line); }
.more .wrap { padding-top: 56px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 22px; }
.more h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 32px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tile { border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
a.tile:hover { border-color: var(--evergreen); color: var(--ink); }
.tile small { font-size: 14px; color: var(--muted); }

/* ---------- Article pages ---------- */
.article-hero .hero-body { padding-bottom: 100px; }
.article { max-width: 760px; margin: -40px auto 0; padding: 0 24px 64px; position: relative; }
.article .card { padding: 36px; }
.article h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 32px 0 8px; }
.article h2:first-child { margin-top: 0; }
.article table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 17px; }
.article th, .article td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--soft); }
.article th { background: #FBF3E6; }
.cta { display: inline-flex; align-items: center; min-height: 52px; padding: 0 22px; border-radius: 12px; background: var(--holly); color: #fff; font-weight: 700; text-decoration: none; margin-top: 8px; }
.cta:hover { color: #fff; background: var(--berry); }

/* ---------- Footer ---------- */
.site-foot { background-color: var(--night); background-image: radial-gradient(rgba(255,255,255,.4) 1.2px, transparent 1.7px); background-size: 46px 46px; color: #C9D8CF; }
.site-foot .wrap { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; gap: 32px; font-size: 15px; }
.site-foot .wrap > div { flex: 1 1 320px; display: flex; flex-direction: column; gap: 10px; }
.site-foot p { margin: 0; }
.site-foot a { color: var(--gold); }
.site-foot .name { font-family: var(--serif); font-size: 22px; color: #fff; }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .site-nav { gap: 16px; font-size: 15px; }
  .tree { display: none; }
  .holly-deco { display: none; }
  .card, .results > .card { padding: 20px; }
}

/* ---------- Print: just the list and timeline ---------- */
@media print {
  body { background: #fff; font-size: 12pt; }
  .hero, .controls-wrap, .safety-wrap, .extras, .more, .site-foot, .actions, .progress, .skip { display: none !important; }
  .results { display: block; padding: 0; }
  .results > .card { border: 0; padding: 0; margin-bottom: 18pt; break-inside: avoid; }
  .list input { display: none; }
  .share-msg { display: none; }
  body[data-print="shop"] .time-card, body[data-print="timeline"] .shop-card { display: none; }
  a { color: #000; text-decoration: none; }
}
