/* Scout Ashes — marketing site base styles (shared across pages) */

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Break over-long words instead of letting them overflow sideways — matters
     for localized copy (e.g. Swahili/Urdu headings) where a single word at a
     large display size can exceed a narrow phone column (#567). Inherited. */
  overflow-wrap: break-word;
}

::selection { background: rgba(232, 112, 44, 0.28); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(120, 90, 60, 0.4); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

a { transition: color 0.18s ease-out; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Nav link */
.sa-navlink {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.sa-navlink:hover { color: var(--fg); }
.sa-navlink.is-active { color: var(--fg); border-bottom-color: var(--primary); }

/* Footer link */
.sa-footlink {
  color: var(--fg-muted);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 2;
}
.sa-footlink:hover { color: var(--fg); }

/* Buttons — the base look lives here (was previously copy-pasted inline on every
   button). Pages just add `class="sa-btn"` (+ a variant/size modifier). Colours are
   semantic tokens, so buttons follow the active theme (ember in Ember, forest in
   Canvas) instead of being frozen to a raw palette value. */
.sa-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  background: var(--primary);
  color: var(--fg-onPrimary);
  box-shadow: var(--glow-ember);
  transition: all 0.18s ease-out;
}
.sa-btn:hover { filter: brightness(1.07); }

/* Smaller size — nav CTA and inline "read more" links. */
.sa-btn-sm { font-size: 15px; padding: 11px 20px; }

/* Outline / ghost / secondary — must follow .sa-btn in source order so their
   background + border win over the primary base (equal specificity). */
.sa-btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.sa-btn-outline:hover { background: var(--primary-soft); filter: none; }

.sa-btn-ghost,
.sa-btn-ghostDark {   /* -ghostDark kept as an alias for one release */
  background: var(--surface-raised);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.sa-btn-ghost:hover,
.sa-btn-ghostDark:hover { background: var(--surface-sunken); filter: none; }

.sa-btn-secondary {
  background: transparent;
  color: var(--secondary);
  border: 1px solid var(--secondary);
  box-shadow: none;
}
.sa-btn-secondary:hover { background: var(--secondary-soft); filter: none; }

/* Layout grids */
.sa-grid2 { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.sa-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.sa-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

/* Product walkthrough — dark app frames against either website mood. */
.sa-product-showcase {
  padding: 88px 0;
  background: var(--bg-hero);
  overflow: hidden;
}
.sa-phone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.sa-phone-demo {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--surface-sunken);
  box-shadow: var(--shadow-lg);
}
.sa-phone-screen {
  min-height: 270px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-gradient);
  color: var(--fg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sa-phone-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  color: var(--fg-subtle);
}
.sa-phone-notch {
  width: 42px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--border-strong);
}
.sa-phone-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--primary-soft);
}
.sa-phone-visual {
  flex: 1;
  display: grid;
  place-items: center;
}
.sa-phone-fields { width: 100%; display: grid; gap: 10px; }
.sa-phone-field {
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-raised);
}
.sa-phone-field:nth-child(2) { width: 82%; }
.sa-phone-field:nth-child(3) { width: 66%; }
.sa-phone-lineage {
  position: relative;
  width: 100%;
  height: 150px;
}
.sa-phone-lineage::before {
  content: '';
  position: absolute;
  inset: 50% 12% auto;
  border-top: 1px dashed var(--border-strong);
}
.sa-phone-node {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--accent);
  box-shadow: var(--glow-ember);
  transform: translate(-50%, -50%);
}
.sa-phone-node:nth-child(1) { left: 14%; }
.sa-phone-node:nth-child(2) { left: 50%; width: 20px; height: 20px; }
.sa-phone-node:nth-child(3) { left: 86%; }
.sa-phone-globe {
  position: relative;
  width: 150px;
  height: 150px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 40% 35%, var(--primary-soft), transparent 62%);
}
.sa-phone-globe::before,
.sa-phone-globe::after {
  content: '';
  position: absolute;
  inset: 20%;
  border: 1px solid var(--border);
  border-radius: 50%;
}
.sa-phone-globe::after { inset: 46% 8%; }
.sa-phone-copy { padding: 20px 10px 10px; }
.sa-phone-copy h3 {
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.15;
  color: var(--fg);
  margin: 0 0 8px;
}
.sa-phone-copy p {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0;
}

/* Sourced archive feature replacing the former anonymous testimonial. */
.sa-archive-feature {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.sa-archive-ledger {
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--surface-sunken);
  transform: rotate(1deg);
}
.sa-archive-entry {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--fg-muted);
}
.sa-archive-entry:last-child { border-bottom: 0; }
.sa-archive-entry strong { color: var(--accent); }

/* Trading post — a contained storefront inside the editorial troops page.
   This module intentionally stays in Ember mood in both site themes: the shirt
   is washed black, and a dark product card gives it a stable, product-specific
   stage without turning the rest of the page into a shop template. */
.sa-merch-section {
  padding: clamp(var(--space-8), 8vw, var(--space-9)) 0;
  background: var(--surface-sunken);
}
.sa-merch-shell {
  position: relative;
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 0.88fr) minmax(0, 1.12fr);
  overflow: hidden;
  border: 1px solid rgba(244, 236, 225, 0.14);
  border-radius: var(--radius-xl);
  background: var(--ink-900);
  box-shadow: 0 30px 70px -30px rgba(18, 14, 11, 0.72);
}
.sa-merch-shell::before {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ember-700), var(--ember-400), var(--ember-700));
  content: "";
}
.sa-merch-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: clamp(var(--space-6), 5vw, var(--space-8));
  background:
    radial-gradient(circle at 0 0, rgba(232, 112, 44, 0.13), transparent 42%),
    var(--ink-900);
}
.sa-merch-gallery {
  position: relative;
  min-width: 0;
  min-height: 570px;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--ink-800);
}
.sa-merch-gallery::before {
  position: absolute;
  inset: -24px;
  background: url("/assets/images/carry-the-ash-tee.webp") center / cover;
  content: "";
  filter: blur(20px);
  opacity: 0.45;
}
.sa-merch-gallery::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(24, 19, 16, 0.32), transparent 24%),
    rgba(18, 14, 11, 0.2);
  content: "";
  pointer-events: none;
}
.sa-merch-hero {
  position: relative;
  z-index: 1;
  width: calc(100% - 56px);
  height: auto;
  max-height: calc(100% - 56px);
  display: block;
  object-fit: contain;
  object-position: center;
  border: 1px solid rgba(244, 236, 225, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px -20px rgba(18, 14, 11, 0.8);
}
.sa-merch-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--ember-300);
}
.sa-merch-meta strong {
  white-space: nowrap;
  color: var(--ash-100);
}
.sa-merch-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 3.6vw, 3.25rem);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ash-100);
}
.sa-merch-lede {
  margin: var(--space-5) 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--ash-300);
}
.sa-merch-details {
  margin: 0 0 var(--space-5);
  padding: var(--space-4) 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-5);
  border-top: 1px solid rgba(244, 236, 225, 0.14);
  border-bottom: 1px solid rgba(244, 236, 225, 0.14);
}
.sa-merch-details > div {
  min-width: 0;
}
.sa-merch-details dt {
  margin: 0 0 var(--space-1);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--ember-300);
}
.sa-merch-details dd {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--ash-100);
}
.sa-merch-form > label {
  display: block;
  margin-bottom: 9px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--ash-100);
}
.sa-merch-form > div {
  display: flex;
  gap: 10px;
}
.sa-merch-form input {
  min-width: 0;
  flex: 1;
  padding: 12px 14px;
  border: 1px solid rgba(244, 236, 225, 0.2);
  border-radius: var(--radius-md);
  outline: none;
  background: var(--ink-800);
  color: var(--ash-100);
  font: var(--text-base)/1.2 var(--font-body);
}
.sa-merch-form input::placeholder { color: var(--ash-500); }
.sa-merch-form input:focus {
  border-color: var(--ember-400);
  box-shadow: 0 0 0 3px rgba(232, 112, 44, 0.18);
}
.sa-merch-form .sa-btn {
  border-color: var(--ember-500);
  background: var(--ember-500);
  color: var(--ink-950);
}
.sa-merch-form button[aria-busy="true"] {
  opacity: 0.7;
  cursor: wait;
}
.sa-merch-form > p {
  margin: 9px 0 0;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--ash-400);
}
.sa-merch-form .sa-merch-error {
  color: var(--ember-300);
}
.sa-merch-sent {
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(92, 129, 100, 0.45);
  border-radius: var(--radius-md);
  background: rgba(92, 129, 100, 0.14);
  color: var(--ash-100);
  font-family: var(--font-body);
  line-height: var(--leading-normal);
}
.sa-merch-sent:not([hidden]) {
  display: flex;
}
.sa-merch-sent > span {
  flex: 0 0 auto;
  color: var(--success);
}

/* Trading-post catalogue — the dedicated storefront grid (shirts / badges). */
.sa-shop {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
}
.sa-shop-group + .sa-shop-group {
  margin-top: 56px;
}
.sa-shop-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.sa-shop-group-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: var(--tracking-tight);
  color: var(--fg);
}
.sa-shop-group-head span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--accent);
}
.sa-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.sa-shop-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.sa-shop-media {
  width: 100%;
  height: auto; /* beat any width/height HTML attrs so aspect-ratio governs the box */
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border);
}
.sa-shop-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  flex: 1;
}
.sa-shop-cardhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}
.sa-shop-cardhead h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-xl);
  color: var(--fg);
}
.sa-shop-price {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  color: var(--accent);
}
.sa-shop-desc {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--fg-muted);
}
.sa-shop-specs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.sa-shop-specs li {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--fg-subtle);
}
.sa-shop-body .sa-btn {
  margin-top: auto;
}
.sa-shop-picks {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sa-shop-picks legend {
  padding: 0;
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--fg);
}
.sa-shop-picks label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--fg-muted);
  cursor: pointer;
}
/* Reset the shared .sa-merch-form input styling (flex:1, padding, border, bg)
   so these checkboxes stay small, native and left-aligned beside their label. */
.sa-shop-picks input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  border-radius: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
/* Reserve card — the same fixed Ember stage as the troops storefront module.
   The sa-merch-* text and input styles inside it are the dark-mood ash/ink
   palette, so the card must supply its own dark background in BOTH site
   themes; without it the light theme paints that near-white copy straight
   onto the light section. */
.sa-shop-reserve-shell {
  position: relative;
  overflow: hidden;
  padding: clamp(var(--space-6), 5vw, var(--space-8));
  border: 1px solid rgba(244, 236, 225, 0.14);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 0 0, rgba(232, 112, 44, 0.13), transparent 42%),
    var(--ink-900);
  box-shadow: 0 30px 70px -30px rgba(18, 14, 11, 0.72);
}
.sa-shop-reserve-shell::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ember-700), var(--ember-400), var(--ember-700));
  content: "";
}
/* The picks fieldset is theme-semantic elsewhere; inside the fixed dark card
   it has to hold the Ember palette in both themes. */
.sa-shop-reserve-shell .sa-shop-picks legend { color: var(--ash-100); }
.sa-shop-reserve-shell .sa-shop-picks label { color: var(--ash-300); }
.sa-shop-reserve-shell .sa-shop-picks input[type="checkbox"] { accent-color: var(--ember-500); }

@media (max-width: 600px) {
  .sa-shop {
    width: min(calc(100% - 32px), 1180px);
  }
}

@media (max-width: 960px) {
  /* !important so a page's inline per-section desktop ratio (e.g. a hero's
     style="grid-template-columns: 0.85fr 1.15fr") can't defeat the mobile
     collapse — an inline style otherwise outranks this rule and leaves the grid
     two-column on phones, overflowing horizontally. */
  .sa-grid2 { grid-template-columns: 1fr !important; gap: 36px; }
  .sa-grid3 { grid-template-columns: 1fr !important; }
  .sa-grid4 { grid-template-columns: repeat(2, 1fr) !important; }
  .sa-merch-shell {
    grid-template-columns: 1fr;
  }
  .sa-merch-gallery {
    min-height: 0;
    aspect-ratio: 3 / 2;
  }
  .sa-merch-hero {
    width: calc(100% - 28px);
    max-height: calc(100% - 28px);
  }

  /* Inline multi-column grids that aren't .sa-gridN don't get the collapse above,
     so they stay full-width-column on phones and scroll sideways (#567). Force the
     two that overflow — the footer nav columns and the home stat band — to a
     phone-friendly column count. Attribute selectors target the inline ratio
     without touching every page's markup; !important beats the inline value. */
  footer [style*="grid-template-columns: 1.4fr 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; }
  [style*="grid-template-columns: repeat(6, 1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }

  /* A grid item defaults to min-width:auto, so wide content (a full-width hero
     image, a long unbroken word) balloons the collapsed single track past the
     viewport. Let grid children shrink to their track on phones. */
  .sa-grid2 > *, .sa-grid3 > *, .sa-grid4 > *,
  footer [style*="grid-template-columns: 1.4fr 1fr 1fr"] > *,
  [style*="grid-template-columns: repeat(6, 1fr)"] > * { min-width: 0; }

  /* Buttons are `white-space: nowrap`, so a long-labelled CTA (e.g. "Start your
     troop's chain — join the waitlist") can't shrink and overflows a narrow
     column. On phones let button text wrap and cap the button to its container. */
  .sa-btn { white-space: normal; max-width: 100%; }

  /* Button rows are inline `display: flex; gap: …` with no wrap, so two CTAs
     side-by-side (or one over-wide one) push past the viewport. Wrap any flex
     row that directly contains a button so they stack instead (#567). */
  [style*="display: flex"]:has(> .sa-btn) { flex-wrap: wrap; }

  .sa-phone-grid { grid-template-columns: 1fr; }
  .sa-phone-demo { max-width: 520px; width: 100%; box-sizing: border-box; margin: 0 auto; }
  .sa-archive-feature { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 600px) {
  .sa-merch-shell {
    width: min(calc(100% - 24px), 1120px);
    border-radius: var(--radius-lg);
  }
  .sa-merch-copy {
    padding: var(--space-6) var(--space-5);
  }
  .sa-merch-form > div {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  /* Inline desktop sizes otherwise leave punctuation stranded on its own line. */
  main h1 {
    font-size: clamp(2.5rem, 12vw, 3.1rem) !important;
    line-height: 1.04 !important;
  }
  main h2,
  footer h2 {
    font-size: clamp(2rem, 9vw, 2.6rem) !important;
    line-height: 1.08 !important;
  }
  .sa-product-showcase { padding: 68px 0; }
  .sa-phone-screen { min-height: 230px; }
  .sa-archive-feature { padding: 22px; }
  .sa-archive-ledger { padding: 18px; transform: none; }
  .sa-archive-entry { grid-template-columns: 54px 1fr; font-size: 11px; }
}

/* Entrance — content rises and fades, reduced-motion aware */
@media (prefers-reduced-motion: no-preference) {
  .sa-rise { animation: saRise 0.32s cubic-bezier(0.22, 1, 0.36, 1) both; }
  @keyframes saRise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  /* The signature ember pulse — live flame + primary CTA only */
  .sa-ember-pulse { animation: saEmber 2.6s ease-in-out infinite; }
  @keyframes saEmber {
    0%, 100% { box-shadow: 0 0 0 1px rgba(232,112,44,0.25), 0 8px 40px -8px rgba(232,112,44,0.45); }
    50% { box-shadow: 0 0 0 1px rgba(232,112,44,0.35), 0 8px 46px -6px rgba(232,112,44,0.7); }
  }
}

/* Inputs (contact / forms) */
.sa-input, .sa-textarea, .sa-select {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color 0.18s ease-out, box-shadow 0.18s ease-out;
}
.sa-input:focus, .sa-textarea:focus, .sa-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--ring);
}
.sa-textarea { resize: vertical; min-height: 120px; }
.sa-label {
  display: block;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}

/* Mobile navigation (shared/site-nav.js). Progressive enhancement: the script
   injects a menu button + a dropdown panel built from the real nav, and adds the
   `has-mobilenav` class so these collapse rules only apply when JS has run (no JS
   → the desktop bar stays exactly as before). The toggle is hidden on desktop. */
.sa-navtoggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: color 0.18s ease-out, border-color 0.18s ease-out;
}
.sa-navtoggle:hover { color: var(--fg); border-color: var(--primary); }
.sa-mobilemenu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 19;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg, var(--shadow-md));
  padding: 8px 32px 22px;
}
.sa-mobilemenu .sa-navlink {
  font-size: 16.5px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.sa-mobilemenu .sa-btn { margin-top: 18px; justify-content: center; }
@media (max-width: 900px) {
  .has-mobilenav .sa-navlinks,
  .has-mobilenav .sa-nav-contact,
  .has-mobilenav .sa-nav-cta { display: none !important; }
  /* The generic responsive button-row rule also sees the hidden nav CTA and
     would otherwise wrap these utility controls onto two clipped rows. */
  .has-mobilenav .sa-navactions { flex-wrap: nowrap !important; flex-shrink: 0; }
  .has-mobilenav .sa-navtoggle { display: inline-flex; }
  .has-mobilenav .sa-mobilemenu:not([hidden]) { display: flex; }
}

@media (max-width: 600px) {
  .has-mobilenav .sa-sitebar-inner { padding-inline: 16px !important; gap: 10px !important; }
  .has-mobilenav .sa-navactions { gap: 8px !important; }
  .has-mobilenav .sa-sitebar-inner > a { flex-shrink: 0; }
}

@media (max-width: 360px) {
  .has-mobilenav .sa-langtoggle { width: 38px; padding-inline: 0; justify-content: center; }
  .has-mobilenav .sa-langtoggle-code { display: none; }
}

/* Language picker (shared/site-lang.js) — mirrors the nav drawer styling. */
.sa-langtoggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: color 0.18s ease-out, border-color 0.18s ease-out;
}
.sa-langtoggle:hover { color: var(--fg); border-color: var(--primary); }
.sa-langmenu {
  display: none;
  position: absolute;
  top: 100%;
  inset-inline-end: 32px;
  z-index: 19;
  min-width: 230px;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg, var(--shadow-md));
  padding: 8px;
  margin-top: 8px;
}
.sa-langmenu:not([hidden]) { display: flex; }
.sa-langitem {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
}
.sa-langitem:hover { background: var(--surface-sunken, var(--primary-soft)); }
.sa-langitem.is-active { background: var(--primary-soft); }
.sa-langitem-native { font-family: var(--font-body); font-weight: 600; font-size: 15px; color: var(--fg); }
.sa-langitem-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--fg-subtle); text-transform: uppercase; }
.sa-lang-rtl {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 9px;
  letter-spacing: 0.08em;
}

/* FAQ accordion — native <details>/<summary> used on /faq. Tokens only so both the
   Ember (dark) and Canvas (light) moods flip correctly. */
.sa-faq { border-top: 1px solid var(--border); }
.sa-faq details { border-bottom: 1px solid var(--border); }
.sa-faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  color: var(--fg);
}
.sa-faq summary::-webkit-details-marker { display: none; }
.sa-faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1;
  color: var(--accent);
  flex-shrink: 0;
}
.sa-faq details[open] summary::after { content: "\2013"; }
.sa-faq summary:hover { color: var(--accent); }
.sa-faq .sa-faq-body {
  padding: 0 4px 24px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 720px;
}

/* Right-to-left (Urdu). The chrome uses a few physical inline styles that don't
   auto-flip; override the handful that matter. Body/section text mostly uses
   default (start) alignment and flips for free under dir="rtl". */
[dir="rtl"] .sa-navlinks { margin-left: 0 !important; margin-right: 12px; }
[dir="rtl"] nav + div { margin-left: 0 !important; margin-right: auto; }
[dir="rtl"] .sa-langmenu { inset-inline-end: auto; inset-inline-start: 32px; }
