/* /christmas-gift-ideas — the Christmas gift page (2026-11-28).
   Built to the owner's concept: a green hero, gift-tag chips for who you are
   buying for, a sticky budget and sort bar, and one grid of cards.

   Its own palette rather than borrowed site tokens, because the page is a
   Christmas page and home.css has no accent token to lean on. Every colour is
   declared for light AND dark and contrast-checked both ways. */

.gi {
    --gi-page: #F5F7F4;
    --gi-ink: #14211A;
    --gi-muted: #3F4F45;
    --gi-faint: #5E6D63;
    --gi-card: #FFFFFF;
    --gi-line: #E1E8E2;
    --gi-line2: #C9D6CC;
    --gi-green: #0E4D33;
    --gi-green-ink: #FFFFFF;
    --gi-gold: #F2C14E;
    --gi-gold-ink: #14211A;
    --gi-red: #B3262B;
    --gi-save: #1E6B3F;
    --gi-code-bg: #FFF6DC;
    --gi-code-line: #C9962B;
    --gi-code-ink: #5E4100;
    --gi-dark: #14211A;
    --gi-dark-sub: #BFD0C5;
    --gi-shadow: 0 1px 2px rgba(20, 33, 26, .06), 0 10px 28px -16px rgba(20, 33, 26, .28);
    --gi-disp: "Bricolage Grotesque", Figtree, system-ui, sans-serif;

    background: var(--gi-page);
    color: var(--gi-ink);
    padding-bottom: 8px;
}

html.dark .gi {
    --gi-page: #0E1512;
    --gi-ink: #E8F0EA;
    --gi-muted: #A7BBAE;
    --gi-faint: #8FA498;
    --gi-card: #171F1A;
    --gi-line: rgba(255, 255, 255, .09);
    --gi-line2: rgba(255, 255, 255, .18);
    --gi-green: #19774E;
    --gi-red: #D8454A;
    --gi-save: #4FBF80;
    --gi-code-bg: rgba(242, 193, 78, .12);
    --gi-code-line: #C9962B;
    --gi-code-ink: #F0CE86;
    --gi-dark: #202A24;
    --gi-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -16px rgba(0, 0, 0, .7);
}

.gi-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---- Hero -------------------------------------------------------------- */

.gi-hero {
    background-color: #0E4D33;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, .16) 1.4px, transparent 1.7px),
        radial-gradient(circle, rgba(255, 255, 255, .09) 1px, transparent 1.3px);
    background-size: 34px 34px, 21px 21px;
    background-position: 0 0, 10px 14px;
    color: #fff;
    padding: clamp(26px, 5vw, 56px) 0 clamp(20px, 3vw, 36px);
}

.gi-hero__top { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; }
.gi-hero__words { flex: 1 1 520px; min-width: 0; }
.gi-hero h1 {
    margin: 0; font-family: var(--gi-disp); font-weight: 800;
    font-size: clamp(34px, 6.6vw, 76px); line-height: .98; letter-spacing: -.025em; color: #fff;
}
.gi-hero__words p { margin: 14px 0 0; font-size: clamp(16px, 1.6vw, 20px); line-height: 1.45; color: #DCEBE1; max-width: 46ch; }

.gi-count {
    flex: 0 1 320px; display: flex; align-items: center; gap: 14px;
    background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 20px; padding: 14px 18px;
}
.gi-count > svg { width: 38px; height: 38px; flex: none; color: var(--gi-gold); }
.gi-count__n { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.gi-count__n b { font-family: var(--gi-disp); font-weight: 800; font-size: 40px; line-height: 1; }
.gi-count__n span { font-weight: 600; font-size: 16px; }
.gi-count__sub { margin: 4px 0 0; font-size: 14px; color: #DCEBE1; }

.gi-hero__h { margin: clamp(24px, 4vw, 40px) 0 12px; font-size: 18px; font-weight: 700; color: #fff; }

/* The gift-tag chips: a label with a hole punched in the left edge.
   They WRAP, they never scroll (owner, 2026-11-28: "the tag slider isn't easy
   to use and the scroll bar looks bad"). A sideways strip of twelve chips is
   the hard way to choose on any screen, and it is the only thing on the page
   that was drawing a scrollbar. On a phone they go to one line each so all
   twelve fit in a few rows. */
.gi-tags { display: flex; flex-wrap: wrap; gap: 10px; padding: 2px 0 4px; }
.gi-tag {
    flex: 0 0 auto; min-height: 72px; border: 0; cursor: pointer; text-align: left;
    padding: 11px 18px 11px 36px; background: var(--gi-card); color: var(--gi-ink);
    clip-path: polygon(20px 0, 100% 0, 100% 100%, 20px 100%, 0 50%);
    border-radius: 0 14px 14px 0; position: relative;
    display: flex; flex-direction: column; justify-content: center; gap: 2px; font: inherit;
}
.gi-tag i { position: absolute; left: 17px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 999px; background: #0E4D33; }
.gi-tag b { font-family: var(--gi-disp); font-weight: 700; font-size: 19px; line-height: 1.1; white-space: nowrap; }
.gi-tag small { font-size: 13px; font-weight: 600; color: var(--gi-muted); white-space: nowrap; }
.gi-tag.is-on { background: var(--gi-gold); color: var(--gi-gold-ink); }
.gi-tag.is-on small { color: #3F4F45; }

.gi-more {
    margin-top: 6px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 0; padding: 0; cursor: pointer; color: #DCEBE1; font: 700 15px/1 inherit;
}
.gi-more svg { width: 18px; height: 18px; transition: transform .16s ease; }
.gi-more.is-open svg { transform: rotate(180deg); }

/* A display rule beats the browser's own [hidden], so every box that the
   script opens and closes has to say so itself. */
.gi-finder { padding: 4px 0 2px; display: flex; flex-direction: column; gap: 8px; }
.gi-finder[hidden], .gi-saved[hidden] { display: none; }
.gi-finder__row { display: flex; flex-wrap: wrap; gap: 8px; }
.gi-finder__row button {
    min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; font: 600 14px/1 inherit;
}
.gi-finder__row button.is-on { background: #fff; color: #14211A; border-color: #fff; }

/* ---- The bar ----------------------------------------------------------- */

.gi-bar {
    position: sticky; top: 0; z-index: 5;
    background: var(--gi-page); border-bottom: 1px solid var(--gi-line);
}
@supports (backdrop-filter: blur(8px)) {
    .gi-bar { background: color-mix(in srgb, var(--gi-page) 92%, transparent); backdrop-filter: blur(8px); }
}
.gi-bar__in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-top: 10px; padding-bottom: 10px; }
/* Wraps rather than scrolls, for the same reason as the chips above. */
.gi-budget { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; padding: 2px; }
.gi-budget__l { font-weight: 700; font-size: 14px; color: var(--gi-muted); flex: 0 0 auto; }
.gi-budget button {
    flex: 0 0 auto; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
    border: 1.5px solid var(--gi-line2); background: var(--gi-card); color: var(--gi-ink);
    font: 600 14px/1 inherit; white-space: nowrap;
}
.gi-budget button.is-on { border-color: var(--gi-ink); background: var(--gi-ink); color: var(--gi-page); }
.gi-sort { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--gi-muted); flex: 0 0 auto; }
.gi-sort select {
    min-height: 44px; border-radius: 12px; border: 1.5px solid var(--gi-line2); padding: 0 12px;
    font: 600 14px/1 inherit; color: var(--gi-ink); background: var(--gi-card); cursor: pointer;
}

/* ---- The grid ---------------------------------------------------------- */

.gi-main { padding-top: 28px; }
.gi-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.gi-head h2 { margin: 0; font-family: var(--gi-disp); font-weight: 800; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.02em; }
.gi-head__n { margin: 0; font-weight: 600; color: var(--gi-muted); }
.gi-head__line { margin: 6px 0 22px; color: var(--gi-muted); font-size: 17px; }

.gi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(156px, 25% - 15px), 1fr)); gap: 20px 16px; }

.gi-card {
    background: var(--gi-card); border-radius: 20px; padding: 10px;
    display: flex; flex-direction: column; gap: 10px; box-shadow: var(--gi-shadow); min-width: 0;
}
.gi-card[hidden] { display: none; }
.gi-card__media { position: relative; aspect-ratio: 1 / 1; border-radius: 14px; background: #fff; overflow: hidden; box-shadow: inset 0 0 0 1px var(--gi-line); }
.gi-card__media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gi-off { position: absolute; top: 8px; left: 8px; background: var(--gi-red); color: #fff; font-weight: 700; font-size: 13px; line-height: 1; padding: 6px 9px; border-radius: 999px; }
.gi-heart {
    position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border-radius: 999px; border: 0;
    background: #fff; color: #14211A; display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 2px 8px rgba(20, 33, 26, .18);
}
.gi-heart svg { width: 22px; height: 22px; }
.gi-heart.is-on { color: var(--gi-red); }
.gi-heart.is-on svg { fill: currentColor; }

.gi-card__body { padding: 0 4px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.gi-card__body h3 { margin: 0; font-family: var(--gi-disp); font-weight: 700; font-size: 17px; line-height: 1.2; }
.gi-card__body > p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--gi-muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.gi-how {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
    background: var(--gi-code-bg); border: 1.5px dashed var(--gi-code-line); color: var(--gi-code-ink);
    border-radius: 8px; padding: 5px 8px; font-weight: 600; font-size: 12.5px; line-height: 1.3;
}
.gi-how svg { width: 14px; height: 14px; flex: 0 0 auto; }
.gi-money { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: auto; padding-top: 6px; }
.gi-money b { font-family: var(--gi-disp); font-weight: 800; font-size: 23px; line-height: 1.1; }
.gi-money s { font-size: 14px; color: var(--gi-faint); }
.gi-money em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--gi-save); }

.gi-see {
    min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px;
    background: var(--gi-green); color: var(--gi-green-ink); text-decoration: none; font-weight: 700; font-size: 15px;
}
.gi-see:hover { filter: brightness(1.08); color: var(--gi-green-ink); }

.gi-none { text-align: center; color: var(--gi-muted); padding: 32px 0 8px; font-size: 16px; }
.gi-empty { background: var(--gi-card); border: 1px solid var(--gi-line); border-radius: 18px; padding: 24px; color: var(--gi-muted); line-height: 1.6; }
.gi-empty b { display: block; color: var(--gi-ink); font-size: 18px; margin-bottom: 6px; }
.gi-empty a { color: var(--gi-save); font-weight: 700; }

/* ---- The family band --------------------------------------------------- */

.gi-family { margin-top: clamp(40px, 6vw, 64px); padding: 0 20px; }
.gi-family__in {
    padding: clamp(22px, 4vw, 34px); background: var(--gi-card); border-radius: 24px;
    box-shadow: var(--gi-shadow); display: flex; flex-wrap: wrap; gap: 24px 32px; align-items: center; justify-content: space-between;
}
.gi-family h2 { margin: 0 0 8px; font-family: var(--gi-disp); font-weight: 800; font-size: clamp(24px, 3vw, 34px); line-height: 1.1; letter-spacing: -.02em; }
.gi-family > .gi-family__in > div:first-child { flex: 1 1 420px; min-width: 0; }
.gi-family p { margin: 0 0 16px; color: var(--gi-muted); font-size: 17px; max-width: 52ch; }
.gi-family ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gi-family li { display: flex; gap: 10px; align-items: flex-start; color: var(--gi-ink); }
.gi-family li svg { width: 22px; height: 22px; flex: 0 0 auto; color: var(--gi-save); }
.gi-family__go { flex: 0 1 260px; display: flex; flex-direction: column; gap: 10px; }
.gi-family__go small { text-align: center; font-size: 14px; color: var(--gi-muted); }
.gi-btn {
    min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 999px; background: var(--gi-green); color: var(--gi-green-ink);
    text-decoration: none; font-weight: 700; font-size: 16px; padding: 0 24px;
}
.gi-btn:hover { filter: brightness(1.08); color: var(--gi-green-ink); }

/* ---- Every list (the phrases people search for, as real links) ---------- */

.gi-lists { margin-top: clamp(32px, 5vw, 52px); }
.gi-lists h2 { margin: 0 0 12px; font-family: var(--gi-disp); font-weight: 800; font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.02em; }
.gi-lists__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.gi-lists__grid a {
    min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 0 14px; border: 1px solid var(--gi-line); border-radius: 14px; background: var(--gi-card);
    color: var(--gi-ink); text-decoration: none; font-weight: 700; font-size: 15px;
}
.gi-lists__grid a:hover { border-color: var(--gi-line2); color: var(--gi-ink); }
.gi-lists__grid i { font-style: normal; font-weight: 600; font-size: 13px; color: var(--gi-faint); }

/* ---- Questions --------------------------------------------------------- */

.gi-faq { max-width: 820px; margin: clamp(40px, 6vw, 64px) auto 0; }
.gi-faq h2 { margin: 0 0 8px; font-family: var(--gi-disp); font-weight: 800; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.02em; }
.gi-q { border-bottom: 1px solid var(--gi-line2); }
.gi-q h3 { margin: 0; }
.gi-q button {
    width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: none; border: 0; padding: 12px 0; text-align: left; cursor: pointer;
    color: var(--gi-ink); font: 700 17px/1.35 inherit;
}
.gi-q button svg { width: 20px; height: 20px; flex: 0 0 auto; transition: transform .16s ease; }
.gi-q.is-open button svg { transform: rotate(180deg); }
.gi-a { display: none; }
.gi-q.is-open .gi-a { display: block; padding: 0 0 16px; }
.gi-a p { margin: 0; color: var(--gi-muted); line-height: 1.6; max-width: 70ch; }

.gi-small { margin: clamp(32px, 5vw, 48px) 0 0; padding-bottom: 40px; font-size: 13px; color: var(--gi-faint); max-width: 90ch; line-height: 1.6; }

/* ?why=1, staff only: where the page loses deals. */
.gi-why {
    margin: 0 0 20px; padding: 14px 16px; background: var(--gi-card); border: 1px solid var(--gi-line2);
    border-radius: 14px; font: 12.5px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--gi-ink); white-space: pre-wrap; overflow-x: auto;
}

/* ---- What the reader has saved ----------------------------------------- */

.gi-saved { position: sticky; bottom: 16px; z-index: 6; padding: 0 16px 16px; display: flex; justify-content: center; pointer-events: none; }
.gi-saved__in {
    pointer-events: auto; background: var(--gi-dark); color: #fff; border-radius: 999px;
    padding: 8px 8px 8px 10px; display: flex; align-items: center; gap: 12px;
    box-shadow: 0 14px 36px -10px rgba(0, 0, 0, .45); max-width: 100%;
}
.gi-saved__pics { display: flex; flex: 0 0 auto; }
.gi-saved__pics img { width: 36px; height: 36px; border-radius: 999px; border: 2px solid var(--gi-dark); background: #fff; object-fit: contain; margin-left: -12px; }
.gi-saved__pics img:first-child { margin-left: 0; }
.gi-saved__txt { min-width: 0; }
.gi-saved__txt b { display: block; font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap; }
.gi-saved__txt span { font-size: 13px; color: var(--gi-dark-sub); white-space: nowrap; }
.gi-saved__go {
    flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px;
    border-radius: 999px; background: var(--gi-gold); color: var(--gi-gold-ink);
    text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.gi-saved__go:hover { color: var(--gi-gold-ink); filter: brightness(1.05); }

@media (max-width: 560px) {
    /* One line each, so all twelve fit in a few rows instead of a slider. */
    .gi-tags { gap: 8px; }
    .gi-tag {
        /* They grow to fill the row, so the wrap has a straight edge. */
        flex: 1 1 auto; min-height: 46px; padding: 0 13px 0 26px;
        flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 7px;
        clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
    }
    .gi-tag i { left: 11px; width: 8px; height: 8px; margin-top: -4px; }
    .gi-tag b { font-size: 15px; }
    .gi-tag small { font-size: 12px; }
    .gi-budget button { min-height: 40px; padding: 0 13px; }
    .gi-count { flex: 1 1 100%; }
    .gi-head__line { font-size: 16px; }
    .gi-saved__in { width: 100%; }
    .gi-saved__txt b { font-size: 14px; }
    .gi-saved__go { padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .gi-more svg, .gi-q button svg { transition: none; }
}
