/* ================================================================
   Shared Components — header, footer, buttons, cards, accordions,
   badges, trust strip, sticky CTA, placeholder media
   ================================================================ */

/* ---------------------------------------------------------------
   BUTTONS
--------------------------------------------------------------- */
.btn {
  --_bg: var(--color-ink);
  --_fg: var(--color-bg);
  --_bd: var(--color-ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: var(--step-sm);
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1;
  color: var(--_fg);
  background: var(--_bg);
  border: 1px solid var(--_bd);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out-soft),
              background var(--t-base) var(--ease-out-soft),
              border-color var(--t-base) var(--ease-out-soft),
              color var(--t-base) var(--ease-out-soft),
              box-shadow var(--t-base) var(--ease-out-soft);
  white-space: nowrap;
  user-select: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --_bg: var(--color-accent);
  --_fg: var(--color-accent-contrast);
  --_bd: var(--color-accent);
}
.btn--ink {
  --_bg: var(--color-ink);
  --_fg: var(--color-bg);
  --_bd: var(--color-ink);
}
.btn--ghost {
  --_bg: transparent;
  --_fg: var(--color-ink);
  --_bd: var(--color-line);
}
.btn--ghost:hover { --_bd: var(--color-ink); }

.btn--on-dark {
  --_bg: var(--color-bg);
  --_fg: var(--color-ink);
  --_bd: var(--color-bg);
}
.btn--on-dark.btn--ghost {
  --_bg: transparent;
  --_fg: var(--color-bg);
  --_bd: rgba(255, 255, 255, 0.28);
}

.btn--lg { padding: 18px 28px; font-size: var(--step-0); }
.btn--sm { padding: 10px 16px; font-size: var(--step-xs); }
.btn--block { width: 100%; }

.btn__arrow {
  display: inline-block;
  transition: transform var(--t-base) var(--ease-out-firm);
}
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Link-style inline CTA */
.link-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--step-sm);
  font-weight: 500;
  color: var(--color-accent-ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color var(--t-base), gap var(--t-base);
}
.link-cta:hover { color: var(--color-ink); gap: var(--s-3); }

/* ---------------------------------------------------------------
   BADGES / PILLS / REASSURANCE STRIP
--------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 12px;
  background: var(--color-accent-soft);
  color: var(--color-accent-ink);
  border-radius: var(--r-pill);
  font-size: var(--step-xs);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.badge--outline {
  background: transparent;
  border: 1px solid var(--color-line);
  color: var(--color-ink-soft);
}
.badge--dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.reassure {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-7);
  padding: var(--s-5) 0;
  border-block: 1px solid var(--color-line);
}
.reassure__item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--step-sm);
  color: var(--color-ink-soft);
}
.reassure__item svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  flex: none;
}

/* ---------------------------------------------------------------
   GLOBAL HEADER
--------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), background var(--t-base);
}
.site-header.is-scrolled {
  border-bottom-color: var(--color-line);
}
.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-5);
  height: 68px;
}
@media (min-width: 960px) {
  .site-header__inner { height: 84px; }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  letter-spacing: -0.012em;
  color: var(--color-ink);
}
.brand-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
}
@media (max-width: 720px) {
  .brand-logo { height: 36px; max-width: 200px; }
}
.site-footer .brand-logo { height: 48px; max-width: 280px; filter: brightness(0) invert(1); opacity: 0.92; }
.mobile-nav__head .brand-logo { height: 36px; max-width: 200px; }
.brand__mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-surface);
  font-size: 14px;
  font-family: var(--font-display);
  color: var(--color-accent-ink);
  flex: none;
}
.brand__mark svg.brand__logo,
.brand__logo {
  width: 70%;
  height: 70%;
  display: block;
  color: currentColor;
  fill: none;
  stroke: currentColor;
}
/* Inline SVG marks for checkout + upsell badges */
.checkout-header__mark svg,
.upsell__mark svg,
.step-row__n svg.brand__logo {
  width: 68%;
  height: 68%;
  color: currentColor;
}
.brand__name { line-height: 1; }
.brand__meta {
  display: block;
  font-family: var(--font-body);
  font-size: var(--step-fine);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 2px;
}

.primary-nav {
  display: none;
  justify-content: center;
  gap: var(--s-6);
}
.primary-nav a {
  font-size: var(--step-sm);
  color: var(--color-ink-soft);
  padding: 8px 0;
  position: relative;
  transition: color var(--t-base);
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { color: var(--color-ink); }
.primary-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--color-accent);
}
@media (min-width: 960px) {
  .primary-nav { display: flex; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.lang-switch {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--r-pill);
  font-size: var(--step-xs);
  color: var(--color-ink-soft);
  letter-spacing: 0.02em;
}
.lang-switch:hover { border-color: var(--color-ink); color: var(--color-ink); }
@media (min-width: 720px) {
  .lang-switch { display: inline-flex; }
}

/* Mobile nav toggle */
.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-line);
}
.nav-toggle:hover { border-color: var(--color-ink); }
.nav-toggle svg { width: 18px; height: 18px; }
@media (min-width: 960px) {
  .nav-toggle { display: none; }
}

/* Mobile nav overlay */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--color-bg);
  padding: var(--s-5) var(--page-gutter) var(--s-8);
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base);
}
.mobile-nav.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.mobile-nav__top {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: var(--s-2);
}
.mobile-nav__list {
  display: flex; flex-direction: column;
  gap: var(--s-1);
}
.mobile-nav__list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-5) 0;
  font-family: var(--font-display);
  font-size: var(--step-3);
  letter-spacing: -0.018em;
  border-bottom: 1px solid var(--color-line-soft);
}
.mobile-nav__list a[aria-current="page"] { color: var(--color-accent-ink); }
.mobile-nav__foot {
  margin-top: auto;
  padding-top: var(--s-7);
  border-top: 1px solid var(--color-line);
  display: flex; flex-direction: column; gap: var(--s-4);
  color: var(--color-muted); font-size: var(--step-sm);
}

/* ---------------------------------------------------------------
   FOOTER
--------------------------------------------------------------- */
.site-footer {
  background: var(--color-bg-deep);
  color: oklch(from var(--color-bg) l c h / 0.9);
  padding-block: var(--s-11) var(--s-7);
  margin-top: var(--section-y);
}
.site-footer--light {
  background: var(--color-bg-alt);
  color: var(--color-ink);
}
/* a11y contrast fix: the newsletter aside sits on a LIGHT bg (--color-bg-alt)
   inside the dark footer. Per-site rules ([data-site] .site-footer p) force light
   text !important for the dark footer; we out-specify them (0,2,2 > 0,2,1) so the
   panel text stays readable — dark on light themes, light on Basilica's dark panel. */
.site-footer aside.footer-newsletter,
.site-footer aside.footer-newsletter h3,
.site-footer aside.footer-newsletter h3 em,
.site-footer aside.footer-newsletter p,
.site-footer aside.footer-newsletter label,
.site-footer aside.footer-newsletter input { color: var(--color-ink) !important; }
.site-footer aside.footer-newsletter input::placeholder { color: oklch(from var(--color-ink) l c h / 0.62) !important; }

/* a11y: inline content links (no class, just an inline colour) must be underlined
   so they're distinguishable by more than colour (Lighthouse link-in-text-block). */
p a:not([class]) { text-decoration: underline; text-underline-offset: 0.15em; }
.site-footer__grid {
  display: grid;
  gap: var(--s-9);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .site-footer__grid { grid-template-columns: 1.4fr repeat(3, 1fr); }
}
.site-footer__brand { max-width: 36ch; }
.site-footer__brand .brand { color: inherit; }
.site-footer__brand .brand__mark { background: transparent; border-color: currentColor; color: inherit; }
.site-footer__about {
  margin-top: var(--s-4);
  color: oklch(from currentColor l c h / 0.72);
  font-size: var(--step-sm);
  line-height: 1.55;
}
.footer-col h2 {
  font-family: var(--font-body);
  font-size: var(--step-fine);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  margin: 0 0 var(--s-4);
  color: oklch(from currentColor l c h / 0.55);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--s-2); }
.footer-col a {
  display: inline-block;        /* a11y target-size: give links a >=24px tap box */
  padding-block: 4px;
  min-width: 24px;              /* short links (e.g. "FAQ" 23.6px) clear the 24px min */
  font-size: var(--step-sm);
  color: oklch(from currentColor l c h / 0.85);
  transition: color var(--t-base);
}
.footer-col a:hover { color: currentColor; }

.site-footer__fine,
.site-footer__meta {
  margin-top: var(--s-10);
  padding-top: var(--s-6);
  border-top: 1px solid oklch(from currentColor l c h / 0.14);
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  font-size: var(--step-xs);
  color: oklch(from currentColor l c h / 0.6);
}
.powered-by {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.powered-by strong { color: oklch(from currentColor l c h / 0.9); font-weight: 500; }

/* ---------------------------------------------------------------
   PLACEHOLDER MEDIA (editorial, for when stock unavailable)
--------------------------------------------------------------- */
.ph-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background-color: var(--color-bg-alt);
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent 0 10px,
      oklch(from var(--color-line) l c h / 0.5) 10px 11px
    );
  border-radius: var(--r-4);
  color: var(--color-muted);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  letter-spacing: 0.02em;
}
.ph-media::after {
  content: attr(data-label);
  position: absolute;
  inset: auto var(--s-4) var(--s-4) var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  color: var(--color-ink);
  background: var(--color-bg);
  padding: 6px 10px;
  border-radius: var(--r-2);
  box-shadow: var(--shadow-xs);
  max-width: max-content;
}

.media {
  position: relative;
  border-radius: var(--r-4);
  overflow: hidden;
  background: var(--color-bg-alt);
}
.media img { position: absolute; inset: 0; 
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media--ratio-4x3 { position: relative; aspect-ratio: 4 / 3; }
.media--ratio-3x4 { position: relative; aspect-ratio: 3 / 4; }
.media--ratio-16x9 { position: relative; aspect-ratio: 16 / 9; }
.media--ratio-square { position: relative; aspect-ratio: 1 / 1; }

.media__caption {
  position: absolute;
  left: var(--s-4);
  bottom: var(--s-4);
  background: color-mix(in oklab, var(--color-bg) 82%, transparent);
  color: var(--color-ink);
  padding: 6px 10px;
  font-size: var(--step-xs);
  font-family: var(--font-mono);
  border-radius: var(--r-2);
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------
   CARDS — generic
--------------------------------------------------------------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-4);
  padding: var(--s-6);
  transition: border-color var(--t-base), transform var(--t-base), box-shadow var(--t-base);
}
.card:hover {
  border-color: var(--color-ink);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card--flat:hover { border-color: var(--color-line); box-shadow: none; transform: none; }

/* Quick facts (S-05) */
.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-4);
  overflow: hidden;
}
@media (min-width: 720px) {
  .facts { grid-template-columns: repeat(var(--facts-cols, 4), 1fr); }
}
.facts__item {
  padding: var(--s-6) var(--s-5);
  border-top: 1px solid var(--color-line-soft);
  border-left: 1px solid var(--color-line-soft);
}
.facts__item:nth-child(1),
.facts__item:nth-child(2) { border-top: 0; }
.facts__item:nth-child(2n+1) { border-left: 0; }
@media (min-width: 720px) {
  .facts__item { border-top: 0; border-left: 1px solid var(--color-line-soft); }
  .facts__item:first-child { border-left: 0; }
  .facts__item:nth-child(2n+1) { border-left: 1px solid var(--color-line-soft); }
  .facts__item:first-child { border-left: 0; }
}
.facts__label {
  display: block;
  font-size: var(--step-fine);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--color-muted);
  margin-bottom: var(--s-2);
  font-weight: 500;
}
.facts__value {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.1;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}
.facts__sub {
  display: block;
  font-family: var(--font-body);
  font-size: var(--step-xs);
  color: var(--color-muted);
  margin-top: 4px;
}

/* ---------------------------------------------------------------
   ACCORDION (FAQ / Practical info)
--------------------------------------------------------------- */
.accordion { display: flex; flex-direction: column; }
.accordion__item {
  border-top: 1px solid var(--color-line);
}
.accordion__item:last-child { border-bottom: 1px solid var(--color-line); }

.accordion__summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s-6) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-5);
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: -0.012em;
  color: var(--color-ink);
  transition: color var(--t-base);
}
.accordion__summary::-webkit-details-marker { display: none; }
.accordion__summary:hover { color: var(--color-accent-ink); }

.accordion__icon {
  flex: none;
  width: 28px; height: 28px;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: transform var(--t-base) var(--ease-out-firm),
              background var(--t-base);
}
.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.accordion__icon::before { width: 11px; height: 1px; }
.accordion__icon::after  { width: 1px; height: 11px; transition: transform var(--t-base) var(--ease-out-firm); }

.accordion__item[open] > .accordion__summary .accordion__icon {
  background: var(--color-ink);
  color: var(--color-bg);
  border-color: var(--color-ink);
}
.accordion__item[open] > .accordion__summary .accordion__icon::after {
  transform: rotate(90deg);
}

.accordion__body {
  padding: 0 0 var(--s-7);
  max-width: 70ch;
  color: var(--color-ink-soft);
  font-size: var(--step-0);
  line-height: var(--leading-relaxed);
}
.accordion__body > * + * { margin-top: var(--s-4); }

/* ---------------------------------------------------------------
   CHECKLIST (Included / Not included)
--------------------------------------------------------------- */
.checklist {
  display: flex; flex-direction: column;
  gap: var(--s-3);
  list-style: none;
  padding: 0; margin: 0;
}
/* Bullet is absolute-positioned so the <strong> label and the
   trailing description text wrap together as a single inline
   text flow. The previous `display: flex` made the strong a
   separate flex item and shrank it to ~min-content width, which
   forced labels like "Palace entry ticket" to wrap into "Palace
   entry" / "ticket" beside the rest of the description. */
.checklist li {
  position: relative;
  padding-left: 26px;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--color-ink-soft);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 14px; height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}
.checklist--no li::before { background: var(--color-line); }
.checklist li strong { color: var(--color-ink); font-weight: 500; }

/* ---------------------------------------------------------------
   STEPS (How it works)
--------------------------------------------------------------- */
.steps {
  counter-reset: step;
  display: grid;
  gap: var(--s-5);
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(var(--steps-cols, 4), 1fr); }
}
.steps__item {
  counter-increment: step;
  padding: var(--s-7) var(--s-6);
  border: 1px solid var(--color-line);
  border-radius: var(--r-4);
  background: var(--color-surface);
  display: grid; gap: var(--s-3);
  position: relative;
}
.steps__item::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  color: var(--color-accent-ink);
  letter-spacing: 0.04em;
}
.steps__item h4 {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 440;
  line-height: 1.15;
  letter-spacing: -0.014em;
  margin: 0;
  color: var(--color-ink);
}
.steps__item p {
  font-size: var(--step-sm);
  line-height: 1.55;
  color: var(--color-ink-soft);
}

/* ---------------------------------------------------------------
   STICKY MOBILE CTA
--------------------------------------------------------------- */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--z-sticky);
  background: var(--color-bg);
  border-top: 1px solid var(--color-line);
  padding: 10px var(--page-gutter) calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: var(--s-4);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.06);
}
@media (min-width: 840px) { .sticky-cta { display: none; } }
.sticky-cta__price {
  display: flex; flex-direction: column; line-height: 1.1;
}
.sticky-cta__price small { color: var(--color-muted); font-size: var(--step-xs); }
.sticky-cta__price strong { font-family: var(--font-display); font-size: var(--step-2); color: var(--color-ink); font-weight: 500; }
.sticky-cta .btn { flex: 1; justify-content: center; }

/* ---------------------------------------------------------------
   TRUST STRIP (S-06) — horizontal reassurance row
--------------------------------------------------------------- */
.trust-strip {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-6) var(--s-7);
  border: 1px solid var(--color-line);
  border-radius: var(--r-4);
  background: var(--color-surface);
}
@media (min-width: 720px) { .trust-strip { grid-template-columns: repeat(var(--trust-cols, 4), 1fr); } }
.trust-strip__item { display: flex; align-items: flex-start; gap: var(--s-3); }
.trust-strip__item svg { width: 22px; height: 22px; color: var(--color-accent); flex: none; margin-top: 1px; }
.trust-strip__item span { display: block; font-size: var(--step-sm); color: var(--color-ink); line-height: 1.4; }
.trust-strip__item small { display: block; font-size: var(--step-xs); color: var(--color-muted); margin-top: 2px; }

/* ---------------------------------------------------------------
   PULL QUOTE / ANSWER SUMMARY (S-27)
--------------------------------------------------------------- */
.answer-summary {
  padding: var(--s-7) var(--s-7);
  border-left: 2px solid var(--color-accent);
  background: var(--color-bg-alt);
  border-radius: 0 var(--r-3) var(--r-3) 0;
  max-width: 72ch;
}
.answer-summary__label {
  font-size: var(--step-fine);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--color-accent-ink);
  font-weight: 600;
  margin-bottom: var(--s-3);
}
.answer-summary__body {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.35;
  color: var(--color-ink);
  letter-spacing: -0.012em;
}

/* ---------------------------------------------------------------
   INLINE ICONS (tiny stroke set, reusable)
--------------------------------------------------------------- */
.ico {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.14em;
}

/* ────────────────────────────────────────────────────────────────────
   Admin demo-data banner (injected by admin-sidebar.js).
   ──────────────────────────────────────────────────────────────────── */
.demo-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 16px;
  background: oklch(95% 0.06 75);
  color: oklch(30% 0.12 60);
  border-bottom: 1px solid oklch(80% 0.12 70);
  font-family: var(--font-body, system-ui);
  font-size: 13px;
  line-height: 1.5;
}
.demo-banner__icon { flex: none; color: oklch(60% 0.18 65); padding-top: 2px; }
.demo-banner__body { flex: 1; min-width: 0; }
.demo-banner__body code {
  background: oklch(from currentColor l c h / 0.1);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
}
.demo-banner__close {
  flex: none;
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: inherit;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.demo-banner__close:hover { opacity: 1; }

/* ────────────────────────────────────────────────────────────────────
   Newsletter signup widget (designs/shared/newsletter.html + .js).
   ──────────────────────────────────────────────────────────────────── */
.newsletter-widget {
  background: var(--color-bg-alt, oklch(96% 0.01 80));
  border: 1px solid var(--color-line);
  border-radius: var(--r-4);
  padding: clamp(20px, 3vw, 32px);
  margin: var(--s-7) auto;
  max-width: 880px;
}
.newsletter-widget__inner {
  display: grid;
  gap: var(--s-5);
  align-items: start;
}
@media (min-width: 720px) {
  .newsletter-widget__inner { grid-template-columns: 1.1fr 1fr; gap: var(--s-6); }
}
.newsletter-widget__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step-fine);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-ink);
  font-weight: 700;
  margin-bottom: var(--s-3);
}
.newsletter-widget__title {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 420;
  letter-spacing: -0.018em;
  line-height: 1.1;
  color: var(--color-ink);
  margin: 0 0 var(--s-3);
}
.newsletter-widget__title em {
  font-style: italic;
  color: var(--color-accent-ink);
}
.newsletter-widget__sub {
  font-size: var(--step-sm);
  color: var(--color-ink-soft);
  line-height: 1.55;
  margin: 0;
}
.newsletter-widget__form {
  display: grid;
  gap: var(--s-3);
}
.newsletter-widget__field { display: block; }
.newsletter-widget__field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--r-2);
  font-family: inherit;
  font-size: var(--step-sm);
  background: var(--color-surface);
  color: var(--color-ink);
}
.newsletter-widget__field input:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.newsletter-widget__msg {
  font-size: var(--step-xs);
  margin: 0;
  min-height: 1.2em;
}
.newsletter-widget__msg[data-status="ok"] { color: oklch(48% 0.12 145); }
.newsletter-widget__msg[data-status="error"] { color: oklch(50% 0.18 30); }
.newsletter-widget__legal {
  font-size: var(--step-fine);
  color: var(--color-muted);
  margin: 0;
}
.newsletter-widget__legal a {
  color: var(--color-accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ────────────────────────────────────────────────────────────────────
   Lang-switch dropdown menu (lang-switch.js).
   The `.lang-switch` button styling exists already — this is just the
   listbox that the JS appends as a sibling.
   ──────────────────────────────────────────────────────────────────── */
.lang-switch-wrap { position: relative; }
.lang-switch__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-3);
  box-shadow: 0 10px 30px oklch(20% 0.02 60 / 0.12);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  z-index: 100;
}
.lang-switch__menu[hidden] { display: none; }
.lang-switch__menu li { margin: 0; }
.lang-switch__menu a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--color-ink);
  text-decoration: none;
  transition: background 0.12s;
}
.lang-switch__menu a:hover,
.lang-switch__menu a:focus-visible {
  background: var(--color-bg-alt, oklch(95% 0.005 80));
}
.lang-switch__menu li[aria-selected="true"] a {
  color: var(--color-accent-ink);
  font-weight: 500;
  background: oklch(from var(--color-accent) 96% 0.04 h);
}

/* ====================================================================
   WCAG color-contrast overrides for Topkapi legal / utility / sitemap /
   search pages.

   These pages inline ONLY tokens.css + base.css + components.css; the
   per-site stylesheets (site-topkapi.css / site-topkapi-pages.css) are
   NOT inlined here, so prior fixes there never reach these pages.  The
   failing rules live in each page's own <style> block as bare-class
   selectors (specificity 0,1,0).  The [data-site="topkapi"] selectors
   below are (0,2,0) and therefore win regardless of source order.

   Effective tokens on these pages (from the page :root):
     --color-bg     oklch(98% 0.008 110)  ivory
     --color-bg-alt oklch(95% 0.012 110)
     --color-accent oklch(72% 0.14 78)    gold  (2.39:1 — fails)
     --color-muted  oklch(55% 0.015 150)         (4.17:1 — fails)
   ==================================================================== */

/* Decorative-but-meaningful numerals coloured with --color-accent.
   .clause__num is large (36px) so needs >=3:1; .sm-group__num shrinks to
   22px so needs the full 4.5:1.  --color-accent-ink (oklch 46% 0.12 70 =
   #814900) keeps the imperial-gold hue and gives 6.88:1 on bg /
   6.29:1 on bg-alt — clears both bars.                                  */
[data-site="topkapi"] .clause__num,
[data-site="topkapi"] .sm-group__num {
  color: oklch(46% 0.12 70);
}

/* Small mono label / count text coloured with --color-muted (4.17:1 on
   bg-alt — fails for <=12px).  Darken to oklch(48% 0.02 150): 5.59:1 on
   bg-alt, 6.12:1 on bg, 5.59:1 on accent-soft — passes on every surface
   these labels appear on while staying a muted neutral.                 */
[data-site="topkapi"] .legal-toc__label,
[data-site="topkapi"] .sidebar__label,
[data-site="topkapi"] .sidebar__n,
[data-site="topkapi"] .cookie-table th,
[data-site="topkapi"] .vendor-table th,
[data-site="topkapi"] .tech-table th {
  color: oklch(48% 0.02 150);
}

/* contact-support.html: inline style="…color: var(--color-muted)…" on a
   <span class="…font-mono…"> and a <p>.  Inline styles outrank any
   selector, so !important is required to override the colour only
   (everything else inline is preserved).  oklch(48% 0.02 150) gives
   6.12:1 on bg / 5.59:1 on bg-alt.                                      */
[data-site="topkapi"] [style*="font-mono"][style*="color-muted"],
[data-site="topkapi"] p[style*="color-muted"] {
  color: oklch(48% 0.02 150) !important;
}

/* ====================================================================
   WCAG color-contrast override for Bosphorus primary package-select CTA.
   index.html inlines its rule (.bo-pkg-select--primary, 0,1,0) setting
   dark text oklch(22% 0.04 50) on the amber accent — 3.62:1.  White text
   on the same amber gives 4.81:1.  (0,2,0) selector wins on specificity;
   the page's hover rule already uses accent-ink on a light hover bg.    */
[data-site="bosphorus"] .bo-pkg-select--primary {
  color: #fff;
}
[data-site="bosphorus"] .bo-pkg-select--primary:hover {
  color: var(--color-accent-ink);
}

/* ==== a11y round-3: extend the accent-as-text + muted-label contrast fixes to
   ALL light-theme sites (hagia-sophia / topkapi / bosphorus / whirling-dervish)
   and add the missed .right__n / .flow__step-n. basilica-cistern is dark-theme
   (its bright accent passes as text on dark) so it is excluded. --color-accent-ink
   is each site's dark text-safe accent (verified >=4.5 per site: HS 10.2, TK 7.3,
   BO 6.9, WD 5.1). :is() keeps (0,2,0) so it beats each page's bare-class block. */
:is([data-site="topkapi"],[data-site="hagia-sophia"],[data-site="bosphorus"],[data-site="whirling-dervish"]) :is(.clause__num,.sm-group__num,.right__n,.flow__step-n) {
  color: var(--color-accent-ink);
}
:is([data-site="topkapi"],[data-site="hagia-sophia"],[data-site="bosphorus"],[data-site="whirling-dervish"]) :is(.legal-toc__label,.sidebar__label,.sidebar__n,.cookie-table th,.vendor-table th,.tech-table th) {
  color: oklch(48% 0.02 150);
}
:is([data-site="topkapi"],[data-site="hagia-sophia"],[data-site="bosphorus"],[data-site="whirling-dervish"]) :is([style*="font-mono"][style*="color-muted"],p[style*="color-muted"]) {
  color: oklch(48% 0.02 150) !important;
}

/* a11y round-3: the cookie persist-bar has a DARK gradient inner; .btn--ghost is
   styled for light backgrounds (dark text/border) -> on the dark bar the Revert
   ghost button was ~1.0:1 (invisible). Force light text+border inside the bar. */
.persist-bar__inner .btn--ghost {
  color: oklch(96% 0.01 90);
  --_bd: oklch(96% 0.01 90 / 0.5);
}
.persist-bar__inner .btn--ghost:hover {
  color: oklch(96% 0.01 90);
  --_bd: oklch(96% 0.01 90);
}

/* a11y round-3: floating cart. The per-site --color-accent is mid-light AND
   inconsistent across pages (e.g. topkapi 0.555 on most pages but 0.72 on a few),
   so neither white nor dark text clears 4.5:1 on every page (dead-zone). Fix:
   pin the cart fill to each site's accent HUE at a fixed DARK lightness via the
   relative-color syntax, with white text -> >=5:1 everywhere, brand hue preserved. */
#iwc-fc__pill, .iwc-fc-btn--primary {
  background: oklch(from var(--color-accent) 0.43 c h) !important;
}
#iwc-fc__pill, #iwc-fc__lead, #iwc-fc__sub, .iwc-fc-btn--primary {
  color: #fff !important;
}
#iwc-fc__sub { opacity: 1 !important; }

