/* ============================================================================
   components.css — buttons, cards, chrome, forms, and the Access Dock.
   ========================================================================= */

/* ---------------------------------------------------------------- BUTTONS */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text-1);
  --btn-line: var(--line-strong);

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  min-height: 48px;
  padding: 0.85em 1.7em;
  border: 1px solid var(--btn-line);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-ui);
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--d-base) var(--e-soft),
              border-color var(--d-base) var(--e-soft),
              background-color var(--d-base) var(--e-soft),
              box-shadow var(--d-base) var(--e-soft),
              translate var(--d-base) var(--e-spring);
}

/* The wipe that fills the button on hover. Transform-only, so it never
   triggers layout. */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-fill, var(--accent));
  scale: 0 1;
  transform-origin: left center;
  transition: scale var(--d-slow) var(--e-out);
}
.btn:hover::before,
.btn:focus-visible::before { scale: 1 1; }

.btn:active { translate: 0 1px; }

.btn .btn-ico {
  inline-size: 1.1em;
  block-size: 1.1em;
  flex: none;
  transition: translate var(--d-base) var(--e-out);
}
.btn:hover .btn-ico { translate: 0.25em 0; }

/* -- primary: the grass-green pill from the reference */
.btn-primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--on-accent);
  --btn-line: var(--accent);
  --btn-fill: var(--accent-quiet);
  box-shadow: var(--shadow-glow);
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: var(--w-nav);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  --btn-fg: #fff;
  border-color: var(--accent-quiet);
}

/* -- ghost: outline that fills with accent */
.btn-ghost { --btn-fill: var(--accent); }
.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--on-accent);
  border-color: var(--accent);
}

/* -- quiet: text + arrow, for tertiary actions */
.btn-quiet {
  min-height: 44px;
  padding: 0.5em 0;
  border: 0;
  border-radius: 0;
  color: var(--accent);
  background: none;
}
.btn-quiet::before { display: none; }
.btn-quiet::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  block-size: 1px;
  background: currentColor;
  scale: 0 1;
  transform-origin: left;
  transition: scale var(--d-base) var(--e-out);
}
.btn-quiet:hover::after,
.btn-quiet:focus-visible::after { scale: 1 1; }

.btn-lg { min-height: 58px; padding: 1.05em 2.3em; font-size: var(--t-base); }
.btn-block { display: flex; width: 100%; }

/* Icon-only buttons always carry a visible label for assistive tech via
   aria-label; the class only handles geometry. */
.btn-icon {
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
}
.btn-icon::before { border-radius: 50%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-s);
  align-items: center;
}

/* ------------------------------------------------------------------ CHIPS */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.44em 0.95em;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  /* A chip label must never wrap to a second line mid-word */
  white-space: nowrap;
}
.chip svg { inline-size: 1em; block-size: 1em; flex: none; }
.chip-accent {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.chip-gold {
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  color: var(--gold);
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ------------------------------------------------------------------ CARDS */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  overflow: hidden;
  isolation: isolate;
  transition: border-color var(--d-base) var(--e-soft),
              box-shadow var(--d-slow) var(--e-out),
              translate var(--d-slow) var(--e-out);
}
.card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow-3);
  translate: 0 -6px;
}

/* A soft spotlight that follows the pointer. --mx/--my are written by JS;
   without JS the gradient simply sits in the centre. */
.card-spot::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    22rem 22rem at var(--mx, 50%) var(--my, 50%),
    var(--accent-glow), transparent 68%
  );
  transition: opacity var(--d-slow) var(--e-soft);
}
.card-spot:hover::after { opacity: 1; }

.card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--card-ar, 4 / 3);
  background: var(--surface-2);
}
.card-media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: scale var(--d-epic) var(--e-out),
              filter var(--d-slow) var(--e-soft);
}
.card:hover .card-media img { scale: 1.07; }

.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  padding: var(--sp-m);
  flex: 1;
}
.card-title {
  font-family: var(--font-display);
  font-size: var(--t-lg);
  line-height: var(--lh-snug);
}
.card-foot {
  margin-top: auto;
  padding-top: var(--sp-s);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-s);
  border-top: 1px solid var(--line);
}

/* Makes the whole card clickable while keeping ONE link in the tab order
   and leaving inner links (if any) clickable above it. */
.card-link::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
}
.card:has(.card-link:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* A ribbon that marks a verified access rating */
.card-flag {
  position: absolute;
  inset: var(--sp-s) var(--sp-s) auto auto;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.4em 0.8em;
  border-radius: var(--r-pill);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px) saturate(140%);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-1);
}

/* ------------------------------------------------------------ GLASS PANEL */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-l);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

/* ----------------------------------------------------------------- HEADER */
.site-header {
  /* Sticky, not fixed: the utility bar above it scrolls away naturally and
     the header then pins to the top, as on the reference. */
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  block-size: var(--header-h);
  display: flex;
  align-items: center;
  /* A solid bar, as on the reference. A transparent header over hero
     photography cannot hold legible navigation in both themes, and tinting
     the text per-section is worse than simply giving the bar a surface. */
  background: var(--surface-1);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--d-base) var(--e-soft),
              translate var(--d-slow) var(--e-out);
}
.site-header[data-stuck='true'] { box-shadow: var(--shadow-1); }
/* Hide on scroll down, reveal on scroll up — but never while a menu is open
   or while anything inside it has focus. */
.site-header[data-hidden='true'] { translate: 0 -105%; }
.site-header:focus-within { translate: 0 0 !important; }

.header-inner {
  width: min(100% - (var(--gutter) * 2), var(--maxw));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-m);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex: none;
}
.brand img { block-size: 40px; inline-size: auto; }
.brand-sub {
  display: none;
  padding-left: 0.8rem;
  border-left: 1px solid var(--line-strong);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: var(--track-wider);
  text-transform: uppercase;
  color: var(--accent);
}
@media (width >= 60rem) { .brand-sub { display: block; } }

/* -- desktop nav */

/* Cramped means the header's contents no longer fit across, which a media
   query cannot detect: its `rem` is resolved against the browser's initial
   font size, not the reader's. header-fit.js measures and sets this, and
   the drawer — which already holds every link — takes over. Without it, a
   reader at 200% text gets 470px of sideways scrolling on every page. */
.site-header[data-cramped='true'] .nav-main { display: none; }
.site-header[data-cramped='true'] .menu-btn { display: inline-grid; }

.nav-main { display: none; }
@media (width >= 64rem) {
  .nav-main {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.4vw, 1.6rem);
  }
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.3rem;
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text-2);
  transition: color var(--d-fast) var(--e-soft);
}
.nav-link::after {
  content: '';
  position: absolute;
  inset: auto 0 14px 0;
  block-size: 2px;
  border-radius: 2px;
  background: var(--spectrum);
  scale: 0 1;
  transform-origin: center;
  transition: scale var(--d-base) var(--e-out);
}
.nav-link:hover,
.nav-link[aria-current='page'] { color: var(--text-1); }
.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link[aria-current='page']::after { scale: 1 1; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}
.header-cta { display: none; }
@media (width >= 48rem) { .header-cta { display: inline-flex; } }

/* -- round chrome button (theme, access, menu) */
.chrome-btn {
  display: inline-grid;
  place-items: center;
  inline-size: 46px;
  block-size: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-1);
  color: var(--text-1);
  cursor: pointer;
  transition: background-color var(--d-fast) var(--e-soft),
              border-color var(--d-fast) var(--e-soft),
              rotate var(--d-slow) var(--e-spring),
              scale var(--d-fast) var(--e-spring);
}
.chrome-btn:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  scale: 1.06;
}
.chrome-btn:active { scale: 0.95; }
.chrome-btn svg { inline-size: 20px; block-size: 20px; }
.chrome-btn[aria-expanded='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

@media (width >= 64rem) { .menu-btn { display: none; } }

/* -- mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  background: var(--surface-0);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--d-base) var(--e-soft),
              visibility 0s linear var(--d-base);
}
.drawer[data-open='true'] {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}
.drawer-body {
  overflow-y: auto;
  padding: var(--sp-l) var(--gutter) var(--sp-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-s);
}
.drawer-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-s);
  padding: var(--sp-s) 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: var(--t-xl);
  text-decoration: none;
  color: var(--text-1);
  opacity: 0;
  translate: 0 1.2rem;
}
.drawer[data-open='true'] .drawer-link {
  animation: drawer-in var(--d-slow) var(--e-out) forwards;
  animation-delay: calc(var(--i, 0) * 60ms + 80ms);
}
.drawer-link span {
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  letter-spacing: var(--track-wider);
  color: var(--text-3);
}
@keyframes drawer-in {
  to { opacity: 1; translate: 0 0; }
}

/* ------------------------------------------------------------ ACCESS DOCK
   The accessibility control panel. This is a product feature, not a plugin:
   every control maps to a documented CSS behaviour and persists per visitor. */
.access-dock { position: fixed; inset: auto auto 1.25rem 1.25rem; z-index: var(--z-toolbar); }

.access-fab {
  display: inline-grid;
  place-items: center;
  inline-size: 56px;
  block-size: 56px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--surface-1);
  color: var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-2);
  transition: scale var(--d-base) var(--e-spring),
              background-color var(--d-fast) var(--e-soft),
              color var(--d-fast) var(--e-soft);
}
.access-fab:hover { scale: 1.08; background: var(--accent); color: var(--on-accent); }
.access-fab svg { inline-size: 26px; block-size: 26px; }
.access-fab::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.45;
  animation: pulse-ring 3.2s var(--e-soft) infinite;
  pointer-events: none;
}
@keyframes pulse-ring {
  0%   { scale: 0.9; opacity: 0.5; }
  70%  { scale: 1.22; opacity: 0; }
  100% { scale: 1.22; opacity: 0; }
}

.access-panel {
  position: absolute;
  inset: auto auto calc(100% + 0.9rem) 0;
  inline-size: min(22rem, calc(100vw - 2.5rem));
  max-block-size: min(32rem, calc(100svh - 8rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sp-m);
  border-radius: var(--r-l);
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-3);
  transform-origin: bottom left;
  scale: 0.92;
  opacity: 0;
  visibility: hidden;
  transition: scale var(--d-base) var(--e-spring),
              opacity var(--d-fast) var(--e-soft),
              visibility 0s linear var(--d-base);
}
.access-panel[data-open='true'] {
  scale: 1;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.access-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-s);
  margin-bottom: var(--sp-s);
}
.access-group { padding-block: var(--sp-s); border-top: 1px solid var(--line); }
.access-group:first-of-type { border-top: 0; padding-top: 0; }
.access-group > h3 {
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: var(--track-wider);
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.65rem;
}

/* -- switch */
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-s);
  min-height: 44px;
  cursor: pointer;
}
.switch-text { display: flex; flex-direction: column; gap: 0.1rem; }
.switch-text b { font-size: var(--t-sm); font-weight: 600; }
.switch-text small { font-size: var(--t-xs); color: var(--text-3); line-height: 1.4; }
.switch input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; }
.switch-track {
  position: relative;
  flex: none;
  inline-size: 48px;
  block-size: 28px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  transition: background-color var(--d-base) var(--e-soft),
              border-color var(--d-base) var(--e-soft);
}
.switch-track::after {
  content: '';
  position: absolute;
  inset: 3px auto auto 3px;
  inline-size: 20px;
  block-size: 20px;
  border-radius: 50%;
  background: var(--text-2);
  transition: translate var(--d-base) var(--e-spring),
              background-color var(--d-base) var(--e-soft);
}
.switch input:checked + .switch-track {
  background: var(--accent);
  border-color: var(--accent);
}
.switch input:checked + .switch-track::after {
  translate: 20px 0;
  background: var(--on-accent);
}
.switch input:focus-visible + .switch-track {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* -- segmented control */
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
}
.seg button {
  min-height: 38px;
  padding: 0 0.5rem;
  border-radius: var(--r-pill);
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  transition: background-color var(--d-fast) var(--e-soft),
              color var(--d-fast) var(--e-soft);
}
.seg button:hover { background: var(--surface-3); color: var(--text-1); }
.seg button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); }

/* ------------------------------------------------------------------ FORMS */
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field > label {
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.field .hint { font-size: var(--t-xs); color: var(--text-3); line-height: 1.5; }
.req { color: var(--accent); margin-left: 0.15em; }

.input,
.select,
.textarea {
  inline-size: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-m);
  background: var(--surface-1);
  color: var(--text-1);
  font-size: var(--t-base);
  transition: border-color var(--d-fast) var(--e-soft),
              box-shadow var(--d-fast) var(--e-soft),
              background-color var(--d-fast) var(--e-soft);
}
.textarea { min-height: 9rem; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  padding-right: 2.8rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23889' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.1rem;
}
.input:hover,
.select:hover,
.textarea:hover { border-color: var(--text-3); }
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.input::placeholder,
.textarea::placeholder { color: var(--text-3); opacity: 1; }

/* Invalid state is never colour-only: it also gets an icon and a message
   adjacent to the field. */
.field[data-invalid='true'] .input,
.field[data-invalid='true'] .select,
.field[data-invalid='true'] .textarea {
  border-color: var(--danger);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e1524a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6M12 16.5v.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 2.9rem;
}
.field[data-invalid='true'] .textarea {
  background-position: right 1rem top 1rem;
}
.err {
  display: none;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--danger);
}
.field[data-invalid='true'] .err { display: flex; }
.err svg { inline-size: 1.05em; block-size: 1.05em; flex: none; }

/* Checkbox / radio cards — big targets, obvious state */
.opt {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  min-height: 56px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface-1);
  cursor: pointer;
  transition: border-color var(--d-fast) var(--e-soft),
              background-color var(--d-fast) var(--e-soft);
}
.opt:hover { border-color: var(--text-3); background: var(--surface-2); }
.opt input {
  flex: none;
  inline-size: 22px;
  block-size: 22px;
  margin-top: 0.15rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.opt-text { display: flex; flex-direction: column; gap: 0.15rem; }
.opt-text b { font-size: var(--t-sm); font-weight: 650; }
.opt-text small { font-size: var(--t-xs); color: var(--text-3); line-height: 1.5; }
.opt:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface-1));
}
.opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }

.grid-opts {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

/* Error summary at the top of a form — focus moves here on failed submit */
.err-summary {
  display: none;
  padding: var(--sp-m);
  border: 2px solid var(--danger);
  border-radius: var(--r-m);
  background: color-mix(in srgb, var(--danger) 10%, var(--surface-1));
}
.err-summary[data-show='true'] { display: block; }
.err-summary h3 { font-family: var(--font-ui); font-size: var(--t-md); font-weight: 700; color: var(--danger); }
.err-summary ol { margin: 0.7rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.err-summary a { color: var(--danger); font-weight: 600; }

/* ------------------------------------------------------------- ACCORDION */
.acc-item { border-bottom: 1px solid var(--line); }
.acc-btn {
  inline-size: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-s);
  min-height: 64px;
  padding: var(--sp-s) 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--t-md);
  color: var(--text-1);
  transition: color var(--d-fast) var(--e-soft);
}
.acc-btn:hover { color: var(--accent); }
.acc-sign {
  flex: none;
  position: relative;
  inline-size: 34px;
  block-size: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: rotate var(--d-slow) var(--e-out),
              background-color var(--d-base) var(--e-soft),
              border-color var(--d-base) var(--e-soft);
}
.acc-sign::before,
.acc-sign::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  background: currentColor;
}
.acc-sign::before { inline-size: 13px; block-size: 1.5px; }
.acc-sign::after {
  inline-size: 1.5px;
  block-size: 13px;
  transition: scale var(--d-base) var(--e-out);
}
.acc-btn[aria-expanded='true'] .acc-sign {
  rotate: 180deg;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.acc-btn[aria-expanded='true'] .acc-sign::after { scale: 0 1; }

.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--d-slow) var(--e-in-out);
}
.acc-panel[data-open='true'] { grid-template-rows: 1fr; }
.acc-panel > div { overflow: hidden; }
.acc-panel .acc-inner {
  padding-bottom: var(--sp-m);
  padding-right: var(--sp-l);
  color: var(--text-2);
  max-width: var(--measure);
}

/* ----------------------------------------------------------------- FOOTER */
.site-footer {
  position: relative;
  padding-block: var(--sp-2xl) var(--sp-l);
  background: var(--surface-sunk);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  gap: var(--sp-xl);
  grid-template-columns: 1fr;
}
@media (width >= 56rem) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}
.footer-col h3 {
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: var(--track-wider);
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--sp-s);
}
.footer-list { display: grid; gap: 0.1rem; }
.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--t-sm);
  transition: color var(--d-fast) var(--e-soft), translate var(--d-fast) var(--e-out);
}
.footer-list a:hover { color: var(--accent); translate: 4px 0; }

.footer-bottom {
  margin-top: var(--sp-xl);
  padding-top: var(--sp-m);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-s) var(--sp-m);
  align-items: center;
  justify-content: space-between;
  font-size: var(--t-xs);
  color: var(--text-3);
}

/* -------------------------------------------------------------- UTILITIES */
.notice {
  display: flex;
  gap: var(--sp-s);
  padding: var(--sp-m);
  border-radius: var(--r-m);
  border: 1px solid var(--line);
  background: var(--surface-1);
  font-size: var(--t-sm);
  color: var(--text-2);
  line-height: 1.6;
}
.notice svg { inline-size: 1.4rem; block-size: 1.4rem; flex: none; color: var(--accent); }
.notice-warn {
  border-color: color-mix(in srgb, var(--gold) 50%, transparent);
  background: color-mix(in srgb, var(--gold) 9%, var(--surface-1));
}
.notice-warn svg { color: var(--gold); }

.grid-auto {
  display: grid;
  gap: var(--sp-m);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--col, 19rem)), 1fr));
}

.divider-glow {
  block-size: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

/* ------------------------------------------------- THEME-AWARE SWAPS ----
   Pairs of elements where exactly one is shown. The hidden one is removed
   from the accessibility tree too, so a screen reader never announces both. */
/* Light is the default surface, so the light-surface lockup shows first. */
.logo-dark { display: none; }
.logo-light { display: block; }
:root[data-theme='dark'] .logo-dark { display: block; }
:root[data-theme='dark'] .logo-light { display: none; }

.brand img { block-size: 34px; }
@media (width >= 30rem) { .brand img { block-size: 40px; } }
.site-footer .brand img { block-size: 46px; }

/* The icon shows the destination: a moon while light, a sun while dark. */
.ico-sun { display: none; }
.ico-moon { display: block; }
:root[data-theme='dark'] .ico-moon { display: none; }
:root[data-theme='dark'] .ico-sun { display: block; }

/* Hamburger ⇄ close */
.menu-btn .ico-close { display: none; }
.menu-btn[aria-expanded='true'] .ico-menu { display: none; }
.menu-btn[aria-expanded='true'] .ico-close { display: block; }

/* Pause ⇄ play on the carousel control */
[data-car-toggle] .ico-play { display: none; }
[data-car-toggle][data-playing='false'] .ico-pause { display: none; }
[data-car-toggle][data-playing='false'] .ico-play { display: block; }

/* Disabled gallery arrows stay visible but read as unavailable. */
.chrome-btn:disabled { opacity: 0.38; cursor: not-allowed; }
.chrome-btn:disabled:hover { background: var(--surface-1); border-color: var(--line); scale: 1; }

kbd {
  font-family: var(--font-ui);
  font-size: 0.85em;
  padding: 0.1em 0.42em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface-2);
}
