/* =========================================================================
   Perfumes - design system
   Single stylesheet. No framework, no CDN, no build step.
   ========================================================================= */

/* ---------- 0. Display face ---------------------------------------------
   Cormorant Garamond, SIL Open Font License 1.1.
   Self-hosted and subset to Latin + Latin Extended-A, 19 KB per weight.
   ------------------------------------------------------------------------ */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/cormorant-garamond-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/cormorant-garamond-600.woff2') format('woff2');
}

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  /* Warm near-black base - neutral, not the current blue-tinted navy */
  --bg:          #0d0c0b;
  --bg-elev:     #141310;
  --surface:     #1a1815;
  --surface-2:   #221f1b;
  --plinth:      #f2efe9;   /* light tile the product shots sit on */

  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);

  --text:       #f1ede6;
  --text-dim:   #a9a299;
  --text-faint: #6f6960;

  /* Brass / champagne - replaces the current red */
  --accent:      #c8a86b;
  --accent-hi:   #e2c894;
  --accent-soft: rgba(200, 168, 107, 0.13);
  --accent-line: rgba(200, 168, 107, 0.38);

  --good: #7fb069;
  --warn: #d9a441;
  --info: #7ba7c9;

  --r-xs: 4px;
  --r-sm: 7px;
  --r:    11px;
  --r-lg: 16px;
  --r-pill: 999px;

  --shadow:    0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.28);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.35), 0 18px 50px rgba(0,0,0,.42);

  --serif: 'Cormorant Garamond', 'Iowan Old Style', Palatino, Georgia, serif;
  --sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1280px;
  --gut:  clamp(1rem, 3vw, 2.5rem);
}

:root[data-theme="light"] {
  --bg:        #faf8f5;
  --bg-elev:   #ffffff;
  --surface:   #ffffff;
  --surface-2: #f4f1ec;
  --plinth:    #f4f1ec;

  --border:        rgba(0, 0, 0, 0.10);
  --border-strong: rgba(0, 0, 0, 0.20);

  --text:       #1a1815;
  --text-dim:   #635c53;
  --text-faint: #8d867c;

  --accent:      #8a6a2c;
  --accent-hi:   #6f5320;
  --accent-soft: rgba(138, 106, 44, 0.10);
  --accent-line: rgba(138, 106, 44, 0.35);

  --shadow:    0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.07);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.07), 0 18px 44px rgba(0,0,0,.10);
}

/* ---------- 2. Reset ----------------------------------------------------- */

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

/* Component display rules out-specify the UA stylesheet's [hidden] rule, so a
   hidden element carrying a display class would still render. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.2; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

::selection { background: var(--accent); color: #14120e; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ---------- 3. Layout ---------------------------------------------------- */

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.page { padding-block: clamp(1.75rem, 4vw, 3rem); }

.stack   { display: flex; flex-direction: column; }
.row     { display: flex; align-items: center; gap: .75rem; }
.row-wrap{ flex-wrap: wrap; }
.spacer  { flex: 1; }

/* ---------- 4. Typography ------------------------------------------------ */

.display {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.005em;
  font-size: clamp(2.15rem, 4.6vw, 3.5rem);
  line-height: 1.08;
}

.h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.7vw, 2rem);
  letter-spacing: 0;
}

/* Small letterspaced caps - used for brands, section labels, eyebrows */
.eyebrow {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--border);
}

/* A short brass rule under section titles */
.section-head .h2 { position: relative; padding-bottom: .55rem; }
.section-head .h2::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 34px; height: 2px;
  background: var(--accent);
}

/* ---------- 5. Header / nav ---------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Solid first, so browsers without color-mix still get an opaque bar */
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 64px;
}

.brandmark {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.brandmark .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.nav { display: flex; align-items: center; gap: .25rem; }

.nav a {
  position: relative;
  padding: .45rem .8rem;
  border-radius: var(--r-sm);
  font-size: .875rem;
  color: var(--text-dim);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--surface); }

.nav a.is-active { color: var(--text); }
.nav a.is-active::after {
  content: '';
  position: absolute;
  left: .8rem; right: .8rem; bottom: -.35rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* Search sits inline in the bar, not on its own row */
.search {
  position: relative;
  flex: 1 1 320px;
  max-width: 420px;
  min-width: 0;
}
.search input {
  width: 100%;
  height: 38px;
  padding: 0 .9rem 0 2.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text);
  font-size: .875rem;
  transition: border-color .15s, background .15s;
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--surface-2);
}
.search .icon {
  position: absolute;
  left: .8rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
  display: flex;
}

.icon-btn {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  flex: none;
  transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface);
}

.nav-toggle { display: none; }

/* ---------- 6. Buttons --------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 38px;
  padding: 0 1.05rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { background: var(--surface); border-color: var(--accent-line); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #14120e;
}
.btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }

.btn-ghost { border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); background: var(--surface); border-color: var(--border); }

.btn-danger { border-color: rgba(209, 106, 90, .5); color: #e08a7a; }
.btn-danger:hover { background: rgba(209, 106, 90, .12); border-color: rgba(209, 106, 90, .8); }
:root[data-theme="light"] .btn-danger { color: #b03a26; border-color: rgba(176, 58, 38, .4); }

.btn-sm { height: 32px; padding: 0 .75rem; font-size: .8rem; }

/* Segmented control - replaces the two "Show X notes" buttons */
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.segmented button {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  padding: .4rem .95rem;
  border-radius: var(--r-xs);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.segmented button:hover:not(:disabled) { color: var(--text); }
.segmented button[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent-hi);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.segmented button:disabled { opacity: .35; cursor: not-allowed; }

/* Native select, restyled */
.select {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.select select {
  appearance: none;
  height: 34px;
  padding: 0 2rem 0 .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: .82rem;
  cursor: pointer;
}
.select select:hover { border-color: var(--border-strong); }
.select::after {
  content: '';
  position: absolute;
  right: .7rem;
  width: 6px; height: 6px;
  border-right: 1.5px solid var(--text-faint);
  border-bottom: 1.5px solid var(--text-faint);
  transform: translateY(-2px) rotate(45deg);
  pointer-events: none;
}

/* ---------- 6b. Forms ---------------------------------------------------- */

.field-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: .35rem;
}

/* Element-qualified on purpose. Bulma, which the admin panel still uses,
   defines .field as a form-row wrapper, so an unqualified .field here would
   put an input's border, background and fixed height around every admin
   field row. */
input.field,
textarea.field,
select.field {
  width: 100%;
  height: 40px;
  padding: 0 .8rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: .92rem;
  transition: border-color .15s, background .15s;
}
textarea.field { height: auto; padding: .6rem .8rem; min-height: 96px; resize: vertical; }
input.field::placeholder,
textarea.field::placeholder { color: var(--text-faint); }
input.field:focus,
textarea.field:focus,
select.field:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input.field:disabled,
textarea.field:disabled,
select.field:disabled { opacity: .55; cursor: not-allowed; }

.field-hint { font-size: .78rem; color: var(--text-faint); margin-top: .35rem; }
.field-row { display: grid; gap: 1rem; margin-bottom: 1rem; }

/* Centred single-column form, used by the login and account pages */
.form-narrow {
  max-width: 420px;
  margin-inline: auto;
}
.form-narrow .panel { padding: 1.6rem; }

.checkline {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .88rem;
  color: var(--text-dim);
}
.checkline input[type="checkbox"] {
  margin: .2rem 0 0;
  accent-color: var(--accent);
  width: 15px; height: 15px;
  flex: none;
}

/* ---------- 7. Product card ---------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
  gap: clamp(.85rem, 1.6vw, 1.4rem);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* The plinth: product shots have white backgrounds, so give them a
   deliberate light tile instead of letting them glow on the dark page. */
.card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--plinth);
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12%;
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.card:hover .card-media img { transform: scale(1.06); }

.card-body {
  padding: .8rem .85rem .95rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  flex: 1;
}

.card-brand {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-name {
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.22;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card-name { color: var(--accent-hi); }

.card-meta {
  margin-top: auto;
  padding-top: .55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .78rem;
  color: var(--text-faint);
}

/* Rating chip */
.rating {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rating svg { width: 12px; height: 12px; }

/* Stretched link keeps the whole card clickable without nesting anchors */
.stretch::after {
  content: '';
  position: absolute;
  inset: 0;
}

/* ---------- 8. Chips (notes / accords) ----------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: .32rem .7rem;
  border-radius: var(--r-pill);
  font-size: .8rem;
  line-height: 1.3;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* Accords carry the accent; notes stay neutral */
.chip-accent {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-hi);
}

/* Chips that are links to a filtered view */
a.chip {
  transition: border-color .15s, background .15s, color .15s;
  cursor: pointer;
}
a.chip:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
a.chip.chip-accent:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent-hi);
}

/* Active filter bar above the results grid */
.filter-bar {
  margin-bottom: 1.4rem;
  align-items: center;
}
.chip-key {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-right: .45rem;
}
.chip-remove {
  padding-right: .5rem;
  gap: .4rem;
}
.chip-remove svg {
  width: 11px; height: 11px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  fill: none;
  opacity: .55;
}
.chip-remove:hover svg { opacity: 1; }
.chip-remove:hover { border-color: var(--accent-line); color: var(--accent-hi); }

/* ---------- 9. Detail page ----------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.hero-media {
  background: var(--plinth);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 9%;
}

.hero-title { margin: .5rem 0 .35rem; }

.hero-brand {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-brand:hover { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }

.hero-sub {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: .875rem;
}
.hero-sub .sep { color: var(--text-faint); }

/* Stat tiles - ratings, longevity, sillage */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: .7rem;
  margin: 1.5rem 0;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: .75rem .85rem;
}
.stat-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: .3rem;
}
.stat-value {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-value .unit {
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--text-faint);
  margin-left: .12rem;
}
.stat-note { font-size: .72rem; color: var(--text-faint); margin-top: .25rem; }
.stat-empty .stat-value { color: var(--text-faint); font-size: 1.15rem; }

/* Source-dependent tiles sit directly in the .stats grid, so the wrapper
   must not create a box of its own. */
.src-group { display: contents; }
.src-group[hidden] { display: none; }

/* Spec list - replaces the <p><strong>Label:</strong> value</p> stack */
.specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .5rem 1.4rem;
  margin: 0;
  font-size: .9rem;
}
.specs dt {
  color: var(--text-faint);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  align-self: center;
}
.specs dd { margin: 0; }

/* Note pyramid */
.pyramid { display: grid; gap: 1.1rem; }
.pyramid-tier {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1rem;
  align-items: start;
}
.pyramid-tier .tier-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: .45rem;
  border-top: 1px solid var(--accent-line);
}

/* ---------- 10. Panels & bars -------------------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.15rem 1.25rem;
}

.panel-title {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
  margin-bottom: .9rem;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.blurb {
  font-family: var(--serif);
  font-size: 1.22rem;
  line-height: 1.55;
  color: var(--text);
}

.bar-row {
  display: grid;
  grid-template-columns: 84px 1fr 38px;
  align-items: center;
  gap: .75rem;
  padding: .3rem 0;
}
.bar-row .bar-label { font-size: .82rem; color: var(--text-dim); }
.bar-row .bar-pct {
  font-size: .75rem;
  color: var(--text-faint);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.bar.is-cool  > span { background: var(--info); }
.bar.is-warm  > span { background: var(--warn); }
.bar.is-green > span { background: var(--good); }

/* ---------- 10b. Long-form prose ----------------------------------------- */

.prose {
  max-width: 68ch;
  color: var(--text-dim);
  font-size: .95rem;
  line-height: 1.7;
}
.prose h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--text);
  margin: 2.2rem 0 .6rem;
  text-wrap: balance;
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.prose li { margin-bottom: .4rem; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--text); }

/* ---------- 11. Table ---------------------------------------------------- */

.table-wrap { overflow-x: auto; }

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
table.tbl th {
  text-align: left;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: .6rem .8rem;
  border-bottom: 1px solid var(--border);
}
table.tbl td {
  padding: .7rem .8rem;
  border-bottom: 1px solid var(--border);
}
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl a { color: var(--accent); }
table.tbl a:hover { text-decoration: underline; text-underline-offset: 2px; }
.price { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- 12. Notices -------------------------------------------------- */

.notice {
  padding: .8rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .88rem;
  border-left: 3px solid var(--text-faint);
}
.notice-ok   { border-left-color: var(--good); }
.notice-warn { border-left-color: var(--warn); }
.notice-err  { border-left-color: #d16a5a; }

.empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-faint);
  border: 1px dashed var(--border);
  border-radius: var(--r);
}

/* ---------- 13. Pagination ----------------------------------------------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}
.pager a, .pager span {
  min-width: 36px;
  height: 36px;
  padding: 0 .6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: .85rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.pager a:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface); }
.pager .is-current {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-hi);
  font-weight: 600;
}
.pager .is-disabled { opacity: .35; pointer-events: none; }
.pager .gap { border: 0; color: var(--text-faint); }

/* ---------- 14. Tabs + A-Z (browse) -------------------------------------- */

.tabs {
  display: flex;
  gap: .35rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.6rem;
  overflow-x: auto;
  /* Without this the other axis computes to auto and Windows draws a
     vertical scrollbar down the right of the tab strip. */
  overflow-y: hidden;
  scrollbar-width: thin;
}
.tabs a, .tabs button {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  padding: .65rem 1rem;
  font-size: .9rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs a[aria-selected="true"],
.tabs button[aria-selected="true"] { color: var(--accent-hi); border-bottom-color: var(--accent); }

.alpha {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem;
  margin-bottom: 1.6rem;
}
.alpha a {
  min-width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .45rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  font-size: .8rem;
  color: var(--text-dim);
  transition: all .15s;
}
.alpha a:hover { border-color: var(--border-strong); color: var(--text); }
.alpha a.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #14120e;
  font-weight: 600;
}

/* Compact link tiles for brand/year/country lists */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .6rem;
}
.tile {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
  padding: .7rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-color .15s, background .15s;
}
.tile:hover { border-color: var(--accent-line); background: var(--surface-2); }
.tile .tile-name {
  font-size: .9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile .tile-count {
  font-size: .75rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  flex: none;
}

/* ---------- 15. Footer --------------------------------------------------- */

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.75rem;
  font-size: .82rem;
  color: var(--text-faint);
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); }
.site-footer nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }

/* ---------- 16. Responsive ----------------------------------------------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { max-width: 320px; }
}

@media (max-width: 780px) {
  .site-header .wrap { height: auto; flex-wrap: wrap; padding-block: .7rem; gap: .6rem; }
  .nav-toggle { display: grid; order: 2; margin-left: auto; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .nav {
    order: 4;
    flex-basis: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: .4rem;
    border-top: 1px solid var(--border);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .65rem .5rem; }
  .nav a.is-active::after { left: .5rem; right: auto; width: 18px; bottom: .35rem; }
  .header-actions { order: 1; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); }
  .pyramid-tier { grid-template-columns: 1fr; gap: .5rem; }
  .pyramid-tier .tier-label { border-top: 0; padding-top: 0; }
  .bar-row { grid-template-columns: 72px 1fr 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
