/* ==========================================================================
   Base: reset, typography, layout primitives, forms, buttons.
   Bootstrap 5 supplies the grid and a handful of components; everything
   visual is ours, so the site never reads as a Bootstrap default.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* The header is sticky, so anything scrolled to by an anchor link, a skip
     link, or a script moving focus to the next form step landed *underneath*
     it - visually cut off, and unclickable because the header sits on top.
     Reserving its height means every scroll target stops just below it. */
  scroll-padding-top: calc(var(--header-height) + var(--space-md));
}

/* Belt and braces for the elements most often jumped to directly. */
:target,
h1[id], h2[id], h3[id],
[data-step],
fieldset[id] {
  scroll-margin-top: calc(var(--header-height) + var(--space-md));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: var(--leading-normal);
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img,
picture,
video,
svg {
  max-width: 100%;
  display: block;
}

/* ---------------------------------------------------------------- Headings */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-snug);
  color: var(--text);
  text-wrap: balance;
}

/* The largest sizes need to be tracked in further: optical letter-spacing
   grows with point size, so a value tuned at 2rem looks loose at 5rem. */
h1,
.display-xl {
  font-weight: 300;
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
h5, h6 {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}

p { margin: 0 0 var(--space-md); max-width: 68ch; }
p:last-child { margin-bottom: 0; }

.display-xl { font-size: var(--step-5); }
.lede {
  font-size: var(--step-1);
  line-height: var(--leading-snug);
  color: var(--text-muted);
  max-width: 60ch;
}

/* The small gold line that introduces a section. */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin: 0 0 var(--space-sm);
  font-family: var(--font-ui);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--wine);
}
.kicker::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--line-gold);
}
.kicker--center::after {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--line-gold);
}

.text-muted-warm { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-accent { color: var(--accent); }
.small-caps {
  font-size: var(--step--2);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.tabular { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------- Links */
a {
  color: inherit;
  text-decoration-color: var(--line-gold);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--accent); }

.link-underline {
  text-decoration: underline;
  text-decoration-color: var(--line-gold);
}

/* An etched link: the rule draws itself on hover. */
.link-etched {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: var(--step-0);
  font-weight: 500;
  letter-spacing: var(--tracking-snug);
  text-decoration: none;
  color: var(--text);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease);
}
.link-etched::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.link-etched:hover,
.link-etched:focus-visible { color: var(--wine); }
.link-etched:hover::after,
.link-etched:focus-visible::after { transform: scaleX(1); }
.link-etched__arrow { transition: transform var(--dur) var(--ease); }
.link-etched:hover .link-etched__arrow { transform: translateX(3px); }

/* ------------------------------------------------------------------- Focus */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-md);
}

/* Headings and regions carrying tabindex="-1" exist so a script can move
   focus there and have a screen reader announce the new step or panel. They
   are not keyboard-reachable by tabbing, so a visible ring points at
   something the user did not do - and Chrome matches :focus-visible on
   programmatic focus, which painted a gold box around the engraving studio's
   step heading. Interactive controls are untouched: in a roving-tabindex
   widget the focused item carries tabindex="0", not "-1". */
:where(h1, h2, h3, h4, h5, h6, p, div, section, article, main, aside, form)[tabindex="-1"]:focus-visible {
  box-shadow: none;
}

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100%;
  z-index: var(--z-toast);
  padding: var(--space-sm) var(--space-md);
  background: var(--accent);
  color: var(--text-on-gold);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-md); color: var(--text-on-gold); }

.visually-hidden:not(:focus):not(:active) {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ Layout */
.shell {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-md);
}
@media (min-width: 48rem) {
  .shell { padding-inline: var(--space-xl); }
}
.shell--narrow { max-width: var(--container-narrow); }
.shell--wide { max-width: var(--container-wide); }
.shell--flush { padding-inline: 0; }

main { flex: 1 0 auto; }

.section { padding-block: var(--space-2xl); }
@media (min-width: 62rem) {
  .section { padding-block: var(--space-3xl); }
}
.section--tight { padding-block: var(--space-xl); }
.section--sunken { background: var(--bg-sunken); }
.section--surface { background: var(--surface); }
.section--wine { background: var(--wine-soft); }
.section--olive { background: var(--olive-soft); }
.section--wine .kicker,
.section--wine .link-etched { color: var(--wine); }
.section--olive .kicker,
.section--olive .link-etched { color: var(--olive); }
.section--inverse {
  background: var(--onyx);
  color: var(--on-dark);
}
.section--inverse h1,
.section--inverse h2,
.section--inverse h3 { color: var(--on-dark); }
.section--inverse .lede,
.section--inverse .text-muted-warm { color: var(--on-dark-muted); }
.section--inverse .kicker { color: var(--gold-light); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.section-head__text { max-width: 46rem; }
.section-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: var(--space-xl);
}
.rule--gold { border-top-color: var(--line-gold); }
.rule--short { max-width: 4rem; margin-inline: 0; }

.stack > * + * { margin-top: var(--space-md); }
.stack-sm > * + * { margin-top: var(--space-xs); }
.stack-lg > * + * { margin-top: var(--space-lg); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}
.cluster--between { justify-content: space-between; }
.cluster--tight { gap: var(--space-xs); }

/* auto-fit, not auto-fill.

   auto-fill keeps the empty tracks it created, so two categories in a
   three-column grid sat in the left half of the band with the right half
   blank - which reads as content failing to load. auto-fit collapses the
   empty tracks and lets the items share the full width. The `--3` and `--4`
   variants were the only ones still on auto-fill, so this also makes them
   consistent with `--2`. */
.grid { display: grid; gap: var(--space-lg); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }

/* Occasion shortcuts: an explicit count at each breakpoint, so six tiles are
   always a whole number of rows.

   auto-fit put five in a track and orphaned the sixth. Three columns fixed
   the balance but pushed the band from 950px to 1250px, which is expensive on
   a homepage that is already long. Six across is balanced *and* short - these
   are navigation chips, not merchandising, so they can be small. */
.grid--shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 40rem) {
  .grid--shortcuts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 62rem) {
  .grid--shortcuts {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-md);
  }
}
/* Explicit column counts rather than auto-fill.

   `minmax(min(100%, 15.5rem), 1fr)` collapses to a single column below about
   500px, which made the homepage 26,000px tall on a phone - roughly thirty
   screens of scrolling to reach the footer. Every catalogue worth copying
   shows two cards per row on mobile; the cards are small, but a shopper can
   see four at a time instead of one. */
.grid--products {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg) var(--space-sm);
}

/* On a phone the homepage is a curated browse, not a search-results page.
   Native horizontal rails keep each edit to one compact row, expose the next
   card as a visual affordance, and preserve ordinary links without JS. */
@media (max-width: 39.99rem) {
  .home-page .mobile-rail {
    display: flex;
    gap: var(--space-sm);
    margin-inline: calc(var(--space-md) * -1);
    padding: 0 var(--space-md) var(--space-sm);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
  }
  .home-page .mobile-rail > * {
    flex: 0 0 min(78vw, 19rem);
    scroll-snap-align: start;
  }
  .home-page .mobile-rail--compact > * {
    flex-basis: min(48vw, 12rem);
  }
  .home-page .mobile-rail::after {
    content: "";
    flex: 0 0 1px;
  }
}
@media (min-width: 40rem) {
  .grid--products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-xl) var(--space-md);
  }
}
@media (min-width: 62rem) {
  .grid--products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-2xl) var(--space-lg);
  }
}

.split {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}
@media (min-width: 62rem) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-2xl); }
  .split--media-first > :first-child { order: -1; }
  .split--wide-text { grid-template-columns: 1.15fr 0.85fr; }
}

.sidebar-layout {
  display: grid;
  gap: var(--space-xl);
}
@media (min-width: 62rem) {
  .sidebar-layout {
    grid-template-columns: 16rem 1fr;
    gap: var(--space-2xl);
    align-items: start;
  }
  .sidebar-layout__aside { position: sticky; top: calc(var(--header-height) + var(--space-md)); }
}

/* ------------------------------------------------------------------ Images */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--image-bg);
}
/* Full-bleed contexts opt out. */
.media--bleed { border-radius: 0; }
/* A flush card already clips with overflow:hidden, so an inner radius would
   leave a sliver of card background showing in each corner. */
.card--flush .media { border-radius: 0; }
/* The photograph sits inside a <picture> (display: contents), so a child
   selector would never match and the image would keep its natural height,
   leaving the rest of the frame empty. */
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur) var(--ease);
}
.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 4 / 5; }
.media--tall { aspect-ratio: 3 / 4; }
.media--landscape { aspect-ratio: 3 / 2; }
.media--wide { aspect-ratio: 16 / 9; }
.media--hero { aspect-ratio: 16 / 10; }
@media (min-width: 62rem) {
  .media--hero { aspect-ratio: 21 / 9; }
}

/* A slow, restrained zoom. No bounce, no rotation. */
.media--zoom:hover img { transform: scale(1.035); }

.media__scrim {
  position: absolute;
  inset: 0;
  background: var(--overlay-scrim);
  pointer-events: none;
}

.media__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: var(--space-md);
  color: var(--on-dark);
  font-size: var(--step--1);
}

/* ----------------------------------------------------------------- Buttons */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 2.875rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  font-weight: 500;
  letter-spacing: var(--tracking-snug);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* One dominant CTA per section: gold is reserved for it. */
.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--text-on-gold);
  --btn-border: var(--accent);
}
.btn--primary:hover {
  --btn-bg: var(--accent-bright);
  --btn-border: var(--accent-bright);
  color: var(--text-on-gold);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: var(--line-strong);
}
.btn--secondary:hover {
  --btn-border: var(--accent);
  color: var(--accent);
}

.btn--ghost {
  --btn-border: transparent;
  padding-inline: var(--space-sm);
}
.btn--ghost:hover { color: var(--accent); }

.btn--danger {
  --btn-bg: transparent;
  --btn-fg: var(--danger);
  --btn-border: var(--danger);
}
.btn--danger:hover {
  --btn-bg: var(--danger-soft);
  --btn-fg: var(--danger);
  --btn-border: var(--danger);
}

.btn--inverse {
  --btn-bg: transparent;
  --btn-fg: var(--on-dark);
  --btn-border: var(--on-dark-line);
}
.btn--inverse:hover {
  --btn-bg: var(--on-dark);
  --btn-fg: var(--ink);
  --btn-border: var(--on-dark);
}

.btn--whatsapp {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: var(--line-strong);
}
.btn--whatsapp:hover {
  --btn-border: #1f9d57;
  color: #1f9d57;
}

.btn--sm { min-height: 2.25rem; padding: 0.4rem 0.9rem; font-size: var(--step--2); }
.btn--lg { min-height: 3.25rem; padding: 0.9rem 2rem; }
.btn--block { width: 100%; }
.btn--icon {
  min-height: 2.5rem;
  width: 2.5rem;
  padding: 0;
  border-color: transparent;
}
.btn--icon:hover { border-color: var(--line); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
@media (max-width: 30rem) {
  .btn-row--stack { flex-direction: column; }
  .btn-row--stack .btn { width: 100%; }
}

/* ------------------------------------------------------------------ Badges */
.badge-set {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--gold {
  border-color: var(--line-gold);
  background: var(--accent-soft);
  color: var(--accent);
}
.badge--solid {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--text-on-gold);
}
.badge--stone {
  border-color: color-mix(in srgb, var(--accent-secondary) 45%, transparent);
  color: var(--accent-secondary);
}
.badge--success { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.badge--warning { border-color: var(--warning); background: var(--warning-soft); color: var(--warning); }
.badge--danger { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.badge--info { border-color: var(--info); background: var(--info-soft); color: var(--info); }
.badge--demo {
  border-style: dashed;
  border-color: var(--warning);
  color: var(--warning);
}

/* ------------------------------------------------------------------- Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}
.card--flush { padding: 0; overflow: hidden; }
.card--quiet { background: transparent; border-color: transparent; padding: 0; }
.card--raised { background: var(--surface-raised); box-shadow: var(--shadow-sm); }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--line);
}
.panel__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}
.panel__body { padding: var(--space-lg); }
.panel__body--flush { padding: 0; }
.panel__foot {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--line);
  background: var(--surface-muted);
}

/* Trust panel on the product page: quiet rows, gold icons. */
.trust-list { list-style: none; margin: 0; padding: 0; }
.trust-list > li {
  display: flex;
  gap: var(--space-sm);
  padding-block: var(--space-sm);
  border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
}
.trust-list > li:last-child { border-bottom: 0; }
.trust-list__icon { color: var(--accent); flex: none; margin-top: 0.15em; }

/* ------------------------------------------------------------------- Forms */
.field { margin-bottom: var(--space-md); }
.field__label,
.form-label {
  display: block;
  margin-bottom: var(--space-2xs);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text);
}
.field__required { color: var(--accent); }
.field__hint {
  margin-top: var(--space-2xs);
  font-size: var(--step--1);
  color: var(--text-subtle);
}
.field__error {
  margin-top: var(--space-2xs);
  font-size: var(--step--1);
  color: var(--danger);
  font-weight: 500;
}

.input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="url"],
select,
textarea {
  width: 100%;
  min-height: 2.875rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.4;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
textarea { min-height: 8rem; resize: vertical; }
/* The caret used to be two linear-gradients with hard colour stops, drawing a
   blocky triangle. It is now the same chevron the icon macro uses, inlined as
   an SVG data URI.

   The stroke colour has to be baked into the URI - a data URI is an isolated
   document and cannot see `currentColor` - so it is the one place a raw hex
   is unavoidable here, and it needs a dark-theme counterpart below. */
select {
  appearance: none;
  padding-right: 2.4rem;
}
select:not([multiple]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d0d0c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 5 6-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 0.85rem 0.85rem;
}
:root[data-theme="dark"] select:not([multiple]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6f5f2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 5 6-5'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) select:not([multiple]) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6f5f2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 5 6-5'/%3E%3C/svg%3E");
  }
}
select[multiple] { min-height: 9rem; background-image: none; padding-right: 0.85rem; }

.input:hover,
input:hover:not([type="checkbox"]):not([type="radio"]),
select:hover,
textarea:hover { border-color: var(--accent); }

.input:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--accent);
  background: var(--surface-raised);
}

.input--error,
[aria-invalid="true"] { border-color: var(--danger); }

::placeholder { color: var(--text-subtle); opacity: 1; }

.check {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-xs) 0;
  cursor: pointer;
}
.check input[type="checkbox"],
.check input[type="radio"] {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.18rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.check__label { font-size: var(--step-0); line-height: var(--leading-snug); }

fieldset { border: 0; margin: 0; padding: 0; }
legend {
  padding: 0;
  margin-bottom: var(--space-sm);
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-grid { display: grid; gap: var(--space-md); }
@media (min-width: 40rem) {
  .form-grid--2 { grid-template-columns: 1fr 1fr; }
  .form-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .form-grid__full { grid-column: 1 / -1; }
}

/* Honeypot: off-screen rather than display:none, so a real user who
   somehow reaches it can still perceive it. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.error-summary {
  border: 1px solid var(--danger);
  border-left-width: 3px;
  background: var(--danger-soft);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-md);
}
.error-summary h2 { font-size: var(--step-0); font-family: var(--font-ui); margin-bottom: var(--space-xs); }
.error-summary ul { margin: 0; padding-left: 1.2rem; font-size: var(--step--1); }

/* ------------------------------------------------------------------- Table */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.table th,
.table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th {
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.table tbody tr:hover { background: var(--surface-muted); }
.table--flush th:first-child,
.table--flush td:first-child { padding-left: 0; }
.table--flush th:last-child,
.table--flush td:last-child { padding-right: 0; }
.table__numeric { text-align: right; font-variant-numeric: tabular-nums; }

.spec-list {
  display: grid;
  gap: 0;
  margin: 0;
  font-size: var(--step--1);
}
.spec-list > div {
  display: grid;
  grid-template-columns: minmax(7rem, 32%) 1fr;
  gap: var(--space-md);
  padding-block: var(--space-sm);
  border-bottom: 1px solid var(--line);
}
.spec-list dt { color: var(--text-muted); }
.spec-list dd { margin: 0; }

/* ------------------------------------------------------------------ Notices */
.notice {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--step--1);
}
.notice__icon { flex: none; margin-top: 0.1em; }
.notice--info { border-left-color: var(--info); background: var(--info-soft); }
.notice--success { border-left-color: var(--success); background: var(--success-soft); }
.notice--warning { border-left-color: var(--warning); background: var(--warning-soft); }
.notice--error,
.notice--danger { border-left-color: var(--danger); background: var(--danger-soft); }
.notice--gold { border-left-color: var(--accent); background: var(--accent-soft); }

/* --------------------------------------------------------------- Utilities */
.u-center { text-align: center; }
.u-right { text-align: right; }
.u-nowrap { white-space: nowrap; }
.u-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.u-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.u-mt-0 { margin-top: 0 !important; }
.u-mb-0 { margin-bottom: 0 !important; }
.u-mt-sm { margin-top: var(--space-sm); }
.u-mt-md { margin-top: var(--space-md); }
.u-mt-lg { margin-top: var(--space-lg); }
.u-mt-xl { margin-top: var(--space-xl); }
.u-full { width: 100%; }
.u-hidden { display: none !important; }
@media (min-width: 62rem) { .u-desktop-hidden { display: none !important; } }
@media (max-width: 61.99rem) { .u-mobile-hidden { display: none !important; } }

.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich h2 { margin-top: var(--space-xl); font-size: var(--step-2); }
.rich h3 { margin-top: var(--space-lg); font-size: var(--step-1); }
.rich ul,
.rich ol { margin: 0 0 var(--space-md); padding-left: 1.35rem; max-width: 66ch; }
.rich li + li { margin-top: var(--space-2xs); }
.rich blockquote {
  margin: var(--space-lg) 0;
  padding-left: var(--space-lg);
  border-left: 2px solid var(--line-gold);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-style: italic;
  color: var(--text-muted);
}
.rich img { margin-block: var(--space-lg); border-radius: var(--radius-sm); }
.rich table { width: 100%; border-collapse: collapse; margin-bottom: var(--space-lg); }
.rich th,
.rich td { padding: var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--line); text-align: left; }

/* ---------------------------------------------------------------- Skeleton */
.is-loading {
  background: var(--surface-muted);
  animation: pulse 1.4s var(--ease) infinite;
}
@keyframes pulse {
  50% { opacity: 0.55; }
}

/* --------------------------------------------------- Reveal on first paint */
/* Gated on the `js` class the head script stamps before first paint.

   Unqualified, this rule hides every band below the hero until a script runs
   and adds `.is-revealed` - so a visitor with JavaScript blocked, or on a
   failed bundle load, gets a hero and an empty page. The animation is a
   nicety; the content is not. */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* ------------------------------------------------------- Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .media--zoom:hover img { transform: none; }
  .btn:hover { transform: none; }
}

/* --------------------------------------------------------------- Print */
@media print {
  .site-header,
  .site-footer,
  .assist-dock,
  .sticky-actions,
  .announcement { display: none !important; }
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}
