/* Holiday Deadlines palette: midnight navy, one signal-orange action colour (PALETTES.md section 3). Dark-only. */
:root {
  color-scheme: dark;
  --bg: #0C1A2B;
  --surface: #15263D;
  --text: #EAF0F8;
  --muted: #9FB0C8;
  --accent: #FF8A4C;
  --accent-ink: #0E1726;
  --focus-ring: #8AD4FF;
  --border: #2A3A57;
  --link: #9CC7FF;
  --bg-deep: #07121F;
  --lit: #FFD38A;
  --closed: #7F8FA8;
  --heading: var(--text);
  --accent-hover: #FF9F6C; /* accent lightened 18% toward white; ink on it is 8.6:1 */
  --link-hover: #CFE3FF;
  --focus-width: 2px;
  --gift-alert-bg: var(--surface); --gift-alert-ink: var(--text);
  /* Fallback: sticky header (padding + 44px target + hairline) plus an 8px gap.
     gifts.mjs overwrites this from the measured header height. */
  --header-offset: calc(0.5rem + 44px + 0.5rem + 1px + 8px);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1.06rem/1.7 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--link); text-underline-offset: 2px; }
:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 3px; }
a:hover { color: var(--link-hover); }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; }
.skip:focus { left: 8px; }
.wrap, main { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }
.top { padding-top: clamp(2.2rem, 6vw, 3.5rem); }
.kicker { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
/* One lit lantern dot: the single warm light on the cool field (decorative). */
.kicker::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--lit); margin-right: .6rem; vertical-align: .08em; }
h1, h2, h3, h4 { color: var(--heading); letter-spacing: -.03em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.08; margin: 0 0 1rem; max-width: 20ch; }
.lede { font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--muted); max-width: 56ch; margin: 0 0 1.5rem; }
nav ul { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: .25rem 1.15rem; }
section { padding: clamp(2.2rem, 5vw, 3.5rem) 0 0; border-top: 1px solid var(--border); margin-top: 2.2rem; scroll-margin-top: var(--header-offset); }
section > p { max-width: 70ch; }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.2; margin: 0 0 1rem; }
.picker { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: .7rem; padding: 16px; }
.picker label { font-weight: 600; }
.picker input { font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-deep); color: var(--text); min-height: 44px; }
.picker output { flex-basis: 100%; }
.plan { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.plan li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; border-bottom: 1px solid var(--border); padding: 6px 0; }
.late { color: var(--muted); text-decoration: line-through; }
.scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: .7rem; }
table { border-collapse: collapse; width: 100%; min-width: 640px; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
thead th { font-size: 14px; color: var(--muted); }
time { white-space: nowrap; font-weight: 600; }
.checked { color: var(--muted); font-size: 14px; }
.checked time { font-weight: 400; }
.links { list-style: none; padding: 0; display: grid; gap: 10px; }
.links li { background: var(--surface); border: 1px solid var(--border); border-radius: .7rem; padding: 12px 14px; }
.links a { font-weight: 600; }
.what { display: block; color: var(--muted); }
.small, .note { font-size: 14px; color: var(--muted); }
.site-footer { margin-top: 3.5rem; padding-block: 2rem 3rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.site-footer p { margin-block: .5rem; }
.site-footer nav ul { margin: 0; }
code { font-size: 14px; }
@media (max-width: 640px) {
  table { min-width: 0; background: transparent; }
  thead { position: absolute; left: -9999px; }
  table, tbody, tr, th, td { display: block; }
  tr { background: var(--surface); border: 1px solid var(--border); border-radius: .7rem; margin-bottom: 12px; padding: 4px 0; }
  th[scope="row"] { font-size: 18px; border-bottom: 0; padding-bottom: 2px; }
  td { border-bottom: 0; padding: 4px 12px; display: grid; grid-template-columns: 7.5rem 1fr; gap: 8px; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 14px; }
}
.disclose { font-size: 14px; color: var(--muted); border-left: 3px solid var(--link); padding: 4px 0 4px 10px; margin: 0 0 14px; max-width: 46rem; }
@media (max-width: 640px) {
  .plan li { display: grid; grid-template-columns: minmax(0, 1fr); align-items: baseline; }
  .plan li span:last-child { font-weight: 600; }
}
.plan li span:last-child { font-weight: 600; }
@media (max-width: 640px) {
  td[data-label="Source"] { grid-template-columns: 1fr; gap: 2px; border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 8px; }
}

/* Gift finder: reuse the page palette; the question and checked evidence lead. */
.gift-intro { max-width: 46rem; }
.gift-form { background: var(--surface); border: 1px solid var(--border); border-radius: .7rem; padding: 20px; }
.gift-form label { display: block; font-weight: 600; }
.gift-form textarea, .gift-form select, .gift-form input { font: inherit; width: 100%; max-width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-deep); color: var(--text); min-height: 44px; }
.gift-form textarea { resize: vertical; }
.gift-form button { font: inherit; font-weight: 650; border: 0; border-radius: .3rem; background: var(--accent); color: var(--accent-ink); padding: 12px 20px; min-height: 44px; margin-top: 16px; cursor: pointer; }
.gift-form button:hover:not(:disabled) { background: var(--accent-hover); }
.gift-form button:disabled { opacity: .65; cursor: wait; }

.gift-controls { margin-top: 14px; }
.gift-controls summary { cursor: pointer; padding: 6px 0; min-height: 44px; }
.gift-fields { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 14px; margin-top: 12px; }
.gift-fields > div { min-width: 0; }
.gift-fields label { font-size: 14px; margin-bottom: 6px; }
#gift-example { margin: 4px 0 10px; }
#gift-processing { max-width: 48rem; margin-bottom: 0; }
.gift-status { font-weight: 600; scroll-margin-top: var(--header-offset); }
.gift-products { list-style: none; margin: 0; padding: 0; }
.gift-product { background: var(--surface); border: 1px solid var(--border); border-radius: .7rem; padding: 1.25rem; margin-block: .8rem; }
.gift-product h4 { font-size: 20px; line-height: 1.3; margin: 0 0 6px; }
.gift-product p { max-width: 50rem; margin: 6px 0; }
.gift-price { font-weight: 700; font-size: 18px; }
.gift-evidence { font-size: 14px; color: var(--muted); }
.gift-message { max-width: 48rem; }
.gift-fallbacks { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-left: 20px; }
@media (max-width: 640px) { .gift-fields { grid-template-columns: 1fr; } .gift-form { padding: 16px; } }
.gift-message-alert { background: var(--gift-alert-bg); color: var(--gift-alert-ink); border-left: 3px solid var(--accent); padding: 12px 14px; border-radius: 0 8px 8px 0; }
.gift-form-complete #gift-example,
.gift-form-complete #gift-processing { display: none; }
@media (max-width: 640px) {
  .gift-form-complete textarea { min-height: 44px; height: 44px; }
}

/* A quiet catalog shelf for the premium edit, using the existing family tokens. */
.premium-list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 5vw, 4rem); }
.premium-item { display: flex; flex-direction: column; min-width: 0; border-top: 1px solid var(--border); padding: 1.1rem 0 1.35rem; }
.premium-item h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.3; margin: 0 0 .45rem; }
.premium-item p { color: var(--muted); line-height: 1.5; margin: 0 0 .6rem; max-width: 48ch; }
.premium-item a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; margin-top: auto; }
@media (max-width: 640px) { .premium-list { grid-template-columns: minmax(0, 1fr); } }

.site-header { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0 1rem; padding-block: .5rem; }
.site-brand { color: var(--heading); font-size: 1.08rem; font-weight: 650; text-decoration: none; }
.site-header a, nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-header a:not(.site-brand), nav a { color: var(--link); text-decoration: underline; text-underline-offset: .3em; }
nav a:hover, .site-header a:hover { color: var(--link-hover); }
nav a[aria-current="location"] { color: var(--accent); }
.skip { z-index: 20; }
#gift-form, #gift-question { scroll-margin-top: var(--header-offset); }
#gift-results, #gift-results h3, .gift-product { scroll-margin-top: var(--header-offset); }
#gift-results:empty { display: none; }
@media (min-width: 641px) {
  #stores th:nth-child(2),
  #stores td[data-label="Order by"] { white-space: nowrap; min-width: 7.5rem; }
}
@media (max-width: 640px) { .scroll { border: 0; border-radius: 0; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
