/* All the Presents! - one stylesheet for the whole site. No external fonts, images or scripts. */

:root {
  color-scheme: light dark;
  --paper: #f6ead3;
  --card: #fffaf0;
  --ink: #3b1f0f;
  --muted: #6b4a30;
  --line: #e4cfa9;
  --link: #a8231b;
  --link-hover: #7c160f;
  --accent: #1f6b45;
  --gold: #c98a1a;
  --note-bg: #fdf1d6;
  --note-line: #e7c77d;
  --night: #101c45;
  --night-2: #1b2f6e;
  --aurora: rgba(63, 214, 160, 0.35);
  --head-ink: #fff7e6;
  --shadow: 0 1px 2px rgba(59, 31, 15, 0.08), 0 6px 24px rgba(59, 31, 15, 0.08);
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1430;
    --card: #142046;
    --ink: #f6ead3;
    --muted: #c8b797;
    --line: #2a3b72;
    --link: #ff9d8f;
    --link-hover: #ffc2b8;
    --accent: #7fdcb0;
    --gold: #f2c25a;
    --note-bg: #1c2a58;
    --note-line: #3d5196;
    --night: #070d24;
    --night-2: #142456;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--card); color: var(--ink); padding: 0.5rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---- The night-sky header ---- */
.site-head {
  color: var(--head-ink);
  background:
    radial-gradient(ellipse 70% 45% at 85% 10%, var(--aurora), transparent 70%),
    radial-gradient(ellipse 60% 35% at 10% 0%, rgba(120, 200, 255, 0.18), transparent 70%),
    radial-gradient(1.5px 1.5px at 20% 30%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 70% 60%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 75%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 80%, #fff 50%, transparent 51%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  padding: 1.25rem 16px 1.5rem;
  border-bottom: 4px solid var(--gold);
}
.head-inner { max-width: 46rem; margin: 0 auto; display: flex; align-items: center; gap: 0.9rem; }
.head-inner img {
  width: 64px; height: 64px; border-radius: 15px; flex: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.brand { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.45rem; line-height: 1.2; letter-spacing: 0.01em; }
.brand a { color: inherit; text-decoration: none; }
.brand-sub { margin: 0.15rem 0 0; font-size: 0.92rem; opacity: 0.85; }

nav.site-nav { max-width: 46rem; margin: 1rem auto 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
nav.site-nav a {
  color: var(--head-ink); text-decoration: none; font-size: 0.95rem; font-weight: 600;
  padding: 0.35rem 0.85rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22);
}
nav.site-nav a:hover { background: rgba(255, 255, 255, 0.2); }
nav.site-nav a[aria-current="page"] { background: #fff7e6; color: #3b1f0f; border-color: #fff7e6; }

/* ---- The page ---- */
main { max-width: 46rem; margin: 0 auto; padding: 1.5rem 16px 2rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.1rem;
  margin: 0 0 1.25rem;
}
@media (min-width: 40rem) { .card { padding: 1.75rem 2rem; } }

h1, h2, h3 { font-family: var(--serif); line-height: 1.25; color: var(--ink); }
h1 { font-size: 1.9rem; margin: 0 0 0.4rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.6rem; padding-top: 0.25rem; border-top: 1px dashed var(--line); }
h2:first-child, .card > h2:first-of-type { border-top: 0; margin-top: 0.25rem; }
h3 { font-size: 1.1rem; margin: 1.4rem 0 0.4rem; }
p, ul, ol { margin: 0 0 0.9rem; }
ul, ol { padding-left: 1.3rem; }
li { margin: 0.25rem 0; }
.meta { color: var(--muted); font-size: 0.95rem; margin: 0 0 1rem; }
.lead { font-size: 1.12rem; }
strong { font-weight: 700; }
code, .path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em;
}
.path { font-family: var(--sans); font-weight: 600; }

.note {
  background: var(--note-bg); border: 1px solid var(--note-line); border-left: 5px solid var(--gold);
  border-radius: 12px; padding: 0.8rem 1rem; margin: 0 0 1rem;
}
.note p:last-child, .note ul:last-child { margin-bottom: 0; }

.toc { columns: 1; padding-left: 1.3rem; }
@media (min-width: 40rem) { .toc { columns: 2; column-gap: 2rem; } }
.toc li { break-inside: avoid; }

/* Tables scroll inside their own box on narrow screens, never the page. */
.table-wrap { overflow-x: auto; margin: 0 0 1rem; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; min-width: 34rem; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); }
th { background: var(--note-bg); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* On phones, each table row becomes a small card with its column names as labels. */
@media (max-width: 39.99rem) {
  table.stack { min-width: 0; }
  table.stack thead { position: absolute; left: -9999px; }
  table.stack tr { display: block; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { display: block; border: 0; padding: 0.15rem 0 0.35rem; }
  table.stack td::before {
    content: attr(data-label); display: block;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
  }
}

/* FAQ */
details { border: 1px solid var(--line); border-radius: 12px; padding: 0.2rem 1rem; margin: 0 0 0.6rem; background: var(--card); }
details[open] { padding-bottom: 0.6rem; }
summary { cursor: pointer; font-weight: 700; padding: 0.6rem 0; list-style-position: outside; }
details > *:not(summary) { margin-top: 0.4rem; }

/* Steps */
ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 2.6rem; margin: 0.7rem 0; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--link); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 0.95rem;
}
@media (prefers-color-scheme: dark) { ol.steps > li::before { color: #3b1f0f; } }

/* Buttons and link tiles */
.tiles { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin: 0 0 1rem; }
@media (min-width: 34rem) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}
.tile:hover { border-color: var(--gold); color: var(--ink); }
.tile strong { display: block; font-family: var(--serif); font-size: 1.1rem; color: var(--link); }
.tile span { font-size: 0.95rem; color: var(--muted); }

.stores { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.5rem 0 0; }
.store {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 0.6rem 1.1rem; border-radius: 999px;
  background: var(--accent); color: #fff;
}
.store:hover { color: #fff; filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { .store, .store:hover { color: #0b1430; } }

.hero { text-align: center; }
.hero .stores { justify-content: center; }
.hero img { width: 128px; height: 128px; border-radius: 28px; box-shadow: var(--shadow); }
.hero h1 { margin-top: 0.75rem; }

.email { font-weight: 700; white-space: nowrap; }

/* Footer */
.site-foot { max-width: 46rem; margin: 0 auto; padding: 0 16px 2.5rem; color: var(--muted); font-size: 0.9rem; }
.site-foot p { margin: 0.25rem 0; }
.site-foot a { color: var(--muted); }

@media print {
  .site-head { background: none; color: #000; border-bottom: 1px solid #000; }
  nav.site-nav, .skip { display: none; }
  .card { box-shadow: none; border: 0; padding: 0; }
  a { color: #000; }
}
