/* ============================================================================
   archive.css  (theme update v7, 2026-10-12)
   All Flavors hub (template-flavor-archive.php) and Monthly Archive
   (template-monthly-archive.php). Design approved 2026-10-12.

   Rules carried over from the build: the archive stays ONE flat page
   (Internal Linking Rule 1.3); every colour on a flavor surface derives from
   the contract (--flavor-color, --on), never a hardcoded value; Frank Ruhl
   Libre is never set in italics.
   ========================================================================== */

.hub,
.month-archive {
    --hub-ink: #16100C;
    --hub-rose: #E4738E;
    --hub-rose-text: #A83C57;
    --hub-blush: #FFB9CD;
    --hub-date: #D95A7B;
    --hub-muted: var(--color-text-muted, #5E524B);
    --hub-light: var(--color-text-light, #8A7E77);
    --hub-border: var(--color-border, #EDE6E1);
    --hub-border-ui: var(--color-border-ui, #D9CFC8);
    --hub-surface-2: var(--color-surface-2, #FAF6F3);
}

.hub-eyebrow { color: var(--hub-rose-text); }

.hub-link {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--hub-ink);
    text-decoration: underline;
    text-decoration-color: var(--hub-rose);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}
.hub-link:hover { color: var(--hub-rose-text); }

.hub-section { padding-block: clamp(56px, 7vw, 96px); }
.hub-section--tight { padding-top: 0; }

.hub-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 28px;
}
.hub-head__title {
    margin-top: 10px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.9rem, 3vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
.hub-head__title--sm { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.hub-head__note { max-width: 46ch; font-size: 0.9375rem; color: var(--hub-muted); }

.hub-btn { min-height: 50px; padding: 0 26px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.hub-btn--ink { background: var(--hub-ink); color: #FFF9F5; }
.hub-btn--ink:hover { background: #2B1B12; color: #FFF9F5; }
.hub-btn--ghost { border: 1.5px solid var(--hub-border-ui); color: var(--hub-ink); background: #fff; }


/* ============================================================
   HERO (also used, shorter, on monthly archives)
============================================================ */

.hub-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--hub-border);
    background: linear-gradient(180deg, #FFF7FA 0%, #FFFFFF 72%);
}
.hub-hero .breadcrumbs { padding-top: 22px; }

.hub-hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-block: 24px 56px;
}
.hub-hero__title {
    margin-top: 16px;
    font-family: var(--font-display);
    font-weight: 900;
    font-style: normal;
    font-size: clamp(2.3rem, 4.6vw, 4.25rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    text-wrap: balance;
}
.hub-hero__title--month { font-size: clamp(2.1rem, 4vw, 3.5rem); max-width: 20ch; }
.hub-hero__hl { color: var(--hub-date); }
.hub-hero__sub { margin-top: 20px; max-width: 52ch; font-size: clamp(1rem, 1.3vw, 1.125rem); color: var(--hub-muted); }

.hub-hero__stats { display: flex; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--hub-border); }
.hub-stat { padding-inline: 16px; border-left: 1px solid var(--hub-border); }
.hub-stat:first-child { padding-left: 0; border-left: 0; }
.hub-stat b {
    display: block;
    white-space: nowrap;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.75rem, 2.6vw, 2.25rem);
    line-height: 1;
    letter-spacing: -0.02em;
}
.hub-stat span {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hub-light);
}
.hub-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Colour wall: every flavor on its own colour */
.hub-wall {
    order: -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    transform: rotate(-3deg);
}
.hub-wall__tile {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 14px;
    background-color: var(--flavor-color);
    box-shadow: 0 18px 36px -18px color-mix(in srgb, var(--flavor-color) 70%, #16100C);
}
.hub-wall__tile:nth-child(4n+2) { transform: translateY(18px); }
.hub-wall__tile:nth-child(4n+4) { transform: translateY(-12px); }
.hub-wall__image { width: 68%; height: auto; aspect-ratio: 1; object-fit: contain; }

.month-archive__head { padding-block: 24px 48px; }


/* ============================================================
   ON THE MENU NOW
============================================================ */

.hub-now { padding-block: 44px; background: var(--hub-surface-2); border-bottom: 1px solid var(--hub-border); }
.hub-now .hub-head { margin-bottom: 20px; }
.hub-now__row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
}
.hub-mini {
    flex: 0 0 136px;
    scroll-snap-align: start;
    display: block;
    padding: 14px 14px 16px;
    border-radius: 18px;
    background-color: var(--flavor-color);
    color: var(--on);
    text-decoration: none;
    transition: transform 300ms ease;
}
.hub-mini:hover { transform: translateY(-3px); color: var(--on); }
.hub-mini__no {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--on) var(--on-a-label, 72%), transparent);
}
.hub-mini__image { display: block; width: 70%; height: auto; aspect-ratio: 1; object-fit: contain; margin: 6px auto 4px; }
.hub-mini__name { display: block; font-weight: 800; font-size: 15px; line-height: 1.1; letter-spacing: -0.03em; }
.hub-now__sep { flex: 0 0 1px; margin-inline: 4px; border-left: 1px dashed var(--hub-border-ui); }
.hub-now__legend {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hub-light);
}


/* ============================================================
   FILTERS
============================================================ */

.hub-list { padding-top: 56px; }

.hub-filters {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--hub-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 40px -28px rgba(22, 16, 12, 0.35);
}
.hub-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.hub-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 1.5px solid var(--hub-border-ui);
    border-radius: 999px;
    background: #fff;
    color: var(--hub-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.hub-chip small { font-size: 12px; font-weight: 600; opacity: 0.6; }
.hub-chip:hover { border-color: var(--hub-ink); }
.hub-chip.is-active { background: var(--hub-ink); border-color: var(--hub-ink); color: #FFF9F5; }

.hub-selects { display: flex; flex-wrap: wrap; gap: 10px; }
.hub-select {
    position: relative;
    flex: 1 1 140px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding-left: 14px;
    border-radius: 12px;
    background: var(--hub-surface-2);
    font-size: 14px;
    font-weight: 600;
}
.hub-select > span { color: var(--hub-light); }
.hub-select select {
    flex: 1;
    height: 100%;
    padding: 0 34px 0 0;
    border: 0;
    background: transparent;
    color: var(--hub-ink);
    font: inherit;
    font-weight: 600;
    appearance: none;
    cursor: pointer;
}
.hub-select::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--hub-ink);
    border-bottom: 2px solid var(--hub-ink);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.hub-count {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding-top: 12px;
    border-top: 1px solid var(--hub-border);
    font-size: 14px;
    color: var(--hub-muted);
}
.hub-count b { color: var(--hub-ink); }
.hub-az { display: none; gap: 2px; font-size: 12.5px; font-weight: 700; }
.hub-az a,
.hub-az span { width: 22px; text-align: center; }
.hub-az a { color: var(--hub-rose-text); text-decoration: none; }
.hub-az a:hover { text-decoration: underline; }
.hub-az span { color: #CFC5BE; }
.hub-az[hidden] { display: none !important; }


/* ============================================================
   CARDS (grid + monthly weeks)
   Mobile: flooded with the flavor colour at rest (same rule as every
   other card on the site). Desktop: white at rest, floods on hover.
============================================================ */

.hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 24px;
}
.hub-grid .hub-card { scroll-margin-top: 110px; } /* clears the sticky header */

.hub-card {
    display: flex;
    flex-direction: column;
    padding: 10px 10px 14px;
    border: 1px solid transparent;
    border-radius: 18px;
    background-color: var(--flavor-color);
    color: var(--on);
    text-decoration: none;
    transition: background-color 400ms ease, border-color 400ms ease, transform 400ms ease, box-shadow 400ms ease;
}
.hub-card[hidden] { display: none; }
.hub-card__tile {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 0.86;
    border-radius: 14px;
    background: color-mix(in srgb, var(--flavor-color) 70%, #FFFFFF);
}
.hub-card__image { width: 62%; height: auto; aspect-ratio: 1; object-fit: contain; }
.hub-card__name {
    margin-top: 12px;
    padding-inline: 4px;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.12;
    letter-spacing: -0.035em;
}
.hub-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 1.4em;
    margin-top: 6px;
    padding-inline: 4px;
    font-size: 12.5px;
    color: color-mix(in srgb, var(--on) var(--on-a-label, 72%), transparent);
}
.hub-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.hub-card__rate {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 8px;
    margin: auto 4px 0;
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--on) var(--on-a-hairline, 22%), transparent);
    font-size: 13px;
}
.hub-card__name + .hub-card__meta + .hub-card__rate { margin-top: 12px; }
.hub-card__score b { font-weight: 800; }
.hub-card .stars { color: var(--on); letter-spacing: 1px; font-size: 12px; }
.hub-card .stars__empty { opacity: 0.35; }
.hub-card__none { font-weight: 600; }
.hub-card__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--on) var(--on-a-label, 72%), transparent);
}

.hub-empty { margin-top: 28px; text-align: center; color: var(--hub-muted); }
.hub-reset {
    margin-left: 6px;
    border: 0;
    background: none;
    color: var(--hub-ink);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--hub-rose);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    cursor: pointer;
}


/* ============================================================
   TOP THREE + NEWEST
============================================================ */

.hub-duo { display: grid; grid-template-columns: 1fr; gap: 22px; }
.hub-panel { padding: clamp(24px, 3vw, 40px); border: 1px solid var(--hub-border); border-radius: 28px; background: #fff; }
.hub-panel--dark { background: #2B1B12; border-color: transparent; color: #FFF9F5; }
.hub-panel--dark .hub-eyebrow { color: var(--hub-blush); }
.hub-panel__title {
    margin-top: 10px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.5rem, 2.4vw, 2.1rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: inherit;
}
.hub-panel__text { margin-top: 10px; max-width: 44ch; font-size: 15px; opacity: 0.82; }
.hub-panel__empty { margin-top: 22px; color: var(--hub-muted); font-size: 15px; }
.hub-panel--dark .hub-panel__empty { color: rgba(255, 249, 245, 0.75); }
.hub-panel__more { margin-top: 22px; }
.hub-panel--dark .hub-link { color: #FFF9F5; text-decoration-color: var(--hub-blush); }

.hub-podium { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hub-pod {
    display: grid;
    grid-template-columns: 30px 56px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 10px 16px 10px 10px;
    border-radius: 18px;
    background: rgba(255, 249, 245, 0.06);
}
.hub-pod__n { font-family: var(--font-display); font-weight: 900; font-size: 26px; text-align: center; color: var(--hub-blush); }
.hub-pod__tile { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background-color: var(--flavor-color); }
.hub-pod__image { width: 70%; height: auto; aspect-ratio: 1; object-fit: contain; }
.hub-pod__name { font-weight: 800; font-size: 16px; letter-spacing: -0.03em; color: #FFF9F5; text-decoration: none; }
.hub-pod__name:hover { text-decoration: underline; text-decoration-color: var(--hub-blush); }
.hub-pod__score { font-weight: 800; font-size: 17px; text-align: right; }
.hub-pod__score small { display: block; font-size: 11px; font-weight: 600; opacity: 0.6; }

.hub-newlist { list-style: none; margin: 22px 0 0; padding: 0; }
.hub-nl {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--hub-border);
}
.hub-nl:last-child { border-bottom: 1px solid var(--hub-border); }
.hub-nl__tile { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background-color: var(--flavor-color); }
.hub-nl__image { width: 72%; height: auto; aspect-ratio: 1; object-fit: contain; }
.hub-nl__name { display: block; font-weight: 800; font-size: 16px; letter-spacing: -0.03em; color: var(--hub-ink); text-decoration: none; }
.hub-nl__name:hover { text-decoration: underline; text-decoration-color: var(--hub-rose); }
.hub-nl__when { display: block; font-size: 13px; color: var(--hub-light); }
.hub-tag {
    padding: 6px 10px;
    border-radius: 999px;
    background: #FBDFE8;
    color: var(--hub-rose-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}
.hub-tag--back { background: #EEF3E6; color: #3F6212; }


/* ============================================================
   RETIRED
============================================================ */

.hub-retired { background: var(--hub-surface-2); border-block: 1px solid var(--hub-border); }
.hub-ret { columns: 2; column-gap: 20px; }
.hub-ret__group { break-inside: avoid; margin-bottom: 22px; }
.hub-ret__letter {
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 28px;
    line-height: 1;
    color: var(--hub-rose);
}
.hub-ret ul { list-style: none; margin: 0; padding: 0; }
.hub-ret li { padding: 5px 0; border-bottom: 1px solid var(--hub-border); font-size: 14.5px; }
.hub-ret a {
    color: var(--hub-ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--hub-rose);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}


/* ============================================================
   HOW MANY
============================================================ */

.hub-answer { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
.hub-answer__text p { margin-top: 14px; font-size: 1.0625rem; line-height: 1.75; color: var(--hub-muted); max-width: 64ch; }
.hub-answer__text p:first-child { margin-top: 0; }
.hub-answer__text strong { color: var(--hub-ink); }
.hub-answer__text a {
    color: var(--hub-ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--hub-rose);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}
.hub-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.hub-bar { display: grid; grid-template-columns: 120px 1fr 40px; align-items: center; gap: 14px; font-size: 13.5px; font-weight: 600; }
.hub-bar__track { height: 12px; border-radius: 999px; background: var(--hub-surface-2); overflow: hidden; }
.hub-bar__fill { display: block; height: 100%; border-radius: 999px; background-color: var(--flavor-color, #D8C4AE); }
.hub-bar__n { text-align: right; color: var(--hub-muted); }


/* ============================================================
   MONTHLY ARCHIVE WEEKS
============================================================ */

.month-archive__toc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.month-archive__toc a {
    padding: 9px 18px;
    border: 1.5px solid var(--hub-border-ui);
    border-radius: 999px;
    background: #fff;
    color: var(--hub-ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.month-archive__toc a:hover { border-color: var(--hub-ink); }
.month-archive__empty { padding-block: 48px; }

.month-week { padding-top: clamp(40px, 5vw, 64px); scroll-margin-top: 70px; }
.month-week + .month-week { margin-top: clamp(24px, 3vw, 40px); border-top: 1px solid var(--hub-border); }
.month-week__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; }
.month-week__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.75rem, 2.8vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.month-week__range { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hub-light); }
.month-week__lineup { margin-top: 12px; max-width: 80ch; font-size: 1rem; line-height: 1.7; color: var(--hub-muted); }
.month-week__lineup a {
    color: var(--hub-ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--hub-rose);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}
.month-archive__more { display: flex; flex-wrap: wrap; gap: 24px; padding-block: 56px 72px; }


/* ============================================================
   >= 860px  DESKTOP
============================================================ */

@media (min-width: 860px) {

    .hub-hero__grid { grid-template-columns: 1.02fr 0.98fr; align-items: center; gap: 56px; padding-block: 40px 72px; }
    .hub-stat { padding-inline: 28px; }
    .hub-wall { order: 0; gap: 14px; transform: rotate(-4deg); margin-right: -60px; }
    .hub-wall__tile { border-radius: 22px; }
    .hub-wall__tile:nth-child(4n+2) { transform: translateY(26px); }
    .hub-wall__tile:nth-child(4n+4) { transform: translateY(-18px); }

    .hub-now__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); overflow: visible; gap: 14px; }
    .hub-now__sep { margin-inline: auto; }

    .hub-filters { grid-template-columns: 1fr auto; padding: 18px 20px; }
    .hub-chips { flex-wrap: wrap; overflow: visible; }
    .hub-selects { flex-wrap: nowrap; }
    .hub-select { flex: none; }
    .hub-count { grid-column: 1 / -1; }
    .hub-az { display: flex; }

    .hub-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px 20px; margin-top: 30px; }
    .hub-grid--week { grid-template-columns: repeat(6, minmax(0, 1fr)); }

    .hub-card { padding: 12px 12px 16px; border-color: var(--hub-border); border-radius: 22px; background-color: #fff; color: var(--hub-ink); }
    .hub-card__tile { border-radius: 16px; background-color: var(--flavor-color); }
    .hub-card__name { font-size: 16.5px; }
    .hub-card__meta,
    .hub-card__label { color: var(--hub-light); }
    .hub-card__rate { border-top-color: var(--hub-border); }
    .hub-card .stars { color: var(--hub-date); }

    .hub-card:hover,
    .hub-card:focus-visible {
        background-color: var(--flavor-color);
        border-color: transparent;
        color: var(--on);
        transform: translateY(-4px);
        box-shadow: 0 22px 44px -20px color-mix(in srgb, var(--flavor-color) 80%, #16100C);
    }
    .hub-card:hover .hub-card__tile,
    .hub-card:focus-visible .hub-card__tile { background-color: transparent; }
    .hub-card:hover .hub-card__meta,
    .hub-card:hover .hub-card__label,
    .hub-card:focus-visible .hub-card__meta,
    .hub-card:focus-visible .hub-card__label { color: color-mix(in srgb, var(--on) var(--on-a-label, 72%), transparent); }
    .hub-card:hover .hub-card__rate,
    .hub-card:focus-visible .hub-card__rate { border-top-color: color-mix(in srgb, var(--on) var(--on-a-hairline, 22%), transparent); }
    .hub-card:hover .stars,
    .hub-card:focus-visible .stars { color: var(--on); }

    .hub-duo { grid-template-columns: 1.1fr 0.9fr; }
    .hub-ret { columns: 4; column-gap: 40px; }
    .hub-answer { grid-template-columns: 0.9fr 1.1fr; gap: 56px; }
}

@media (min-width: 860px) and (max-width: 1100px) {
    .hub-grid--week { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    .hub-card,
    .hub-mini { transition: none; }
}
