/* Base: reset, typography, layout primitives and the shared component classes
   the reference uses everywhere (.container-x .btn .eyebrow .card .badge .slide-panel). */

*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--line); }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: var(--text-body); line-height: var(--leading-relaxed);
  font-synthesis-weight: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 100; padding: .5rem .75rem; background: var(--color-ink); color: #fff; border-radius: var(--radius-md); }
.skip-link:focus { top: 1rem; }

/* Type */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--fg); }
h1, .h1 { font-size: var(--text-h1); font-weight: 700; }
h2, .h2 { font-size: var(--text-h2); font-weight: 700; }
h3, .h3 { font-size: var(--text-h3); font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.lede { font-size: 1.125rem; color: var(--fg-muted); max-width: 60ch; }
.muted { color: var(--fg-muted); }
.eyebrow { font-family: var(--font-display); font-size: var(--text-eyebrow); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-muted); }
.tabular { font-variant-numeric: tabular-nums; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2em; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.prose th, .prose td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--font-display); font-weight: 600; }

/* Layout */
.container-x { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--container-pad); }
.section { padding-block: 2.5rem; }
@media (min-width: 48rem) { .section { padding-block: 3rem; } }
.section--sunken { background: var(--bg-sunken); border-block: 1px solid var(--line); }
.section--raised { background: var(--bg-raised); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 48rem) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 64rem) { .grid--5 { grid-template-columns: repeat(5, 1fr); } .grid--6 { grid-template-columns: repeat(6, 1fr); } }
.flex { display: flex; align-items: center; gap: .5rem; }
.between { justify-content: space-between; }

/* Buttons */
.btn { font-family: var(--font-display); font-weight: 600; font-size: .9375rem; letter-spacing: -.01em; line-height: 1; white-space: nowrap; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.25rem; border-radius: var(--radius-pill); border: 1px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease-out), background-color .18s, color .18s, border-color .18s, box-shadow .18s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--color-ink); color: #fff; }
.btn-primary:hover { background: #000; color: #fff; box-shadow: var(--shadow-lift); }
.dark-surface .btn-primary { background: var(--color-gold-bright); color: var(--color-ink); }
.dark-surface .btn-primary:hover { background: #f0cc7c; color: var(--color-ink); }
.btn-accent { background: var(--color-gold-bright); color: var(--color-ink); }
.btn-accent:hover { background: #f0cc7c; color: var(--color-ink); }
.btn-secondary { background: var(--bg-raised); color: var(--fg); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--fg-muted); color: var(--fg); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--bg-sunken); color: var(--fg); }
.btn-sm { padding: .55rem .9rem; font-size: .8125rem; }
.btn-icon { padding: .5rem; border-radius: var(--radius-pill); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* Surfaces */
.card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-card); }
.card--lift { box-shadow: var(--shadow-card); transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.card--lift:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.badge { font-family: var(--font-display); font-size: var(--text-eyebrow); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .5rem; border-radius: 6px; background: var(--bg-sunken); color: var(--fg); }
.badge--sale { background: var(--color-sale); color: #fff; }
.badge--ok { background: var(--color-success); color: #fff; }
.badge--gold { background: var(--color-gold-bright); color: var(--color-ink); }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: var(--text-sm); background: var(--bg-raised); }
.chip[aria-pressed="true"], .chip.is-active { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.divider { border-top: 1px solid var(--line); }
.slide-panel { transition: translate var(--dur-slow) var(--ease-out); will-change: translate; }

/* Forms */
.input, .woocommerce input.input-text, .woocommerce select, .woocommerce textarea { width: 100%; padding: .8rem .95rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-raised); color: var(--fg); }
.input:focus, .woocommerce input.input-text:focus, .woocommerce select:focus, .woocommerce textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
label { font-size: var(--text-sm); font-weight: 500; }
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.help { font-size: var(--text-xs); color: var(--fg-muted); }
.notice { padding: .9rem 1rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--bg-raised); font-size: var(--text-sm); }
.notice--warn { border-color: var(--color-gold); }
.notice--error { border-color: var(--color-sale); }

/* Pending-fact marker (owner must replace; page stays noindex while present) */
.ccc-pending { background: #fff3cd; color: #7a5a00; padding: 0 .3em; border-radius: 3px; font-family: var(--font-mono); font-size: .85em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
