/* ==========================================================================
   PearlFibers.com — design tokens
   The single source of truth for color, space, type, radius, motion.
   Components reference tokens ONLY — a raw color in any other stylesheet is
   a build failure (IMPLEMENTATION-PLAN §3).

   Accent is the brand blue #5093c9 (owner ruling 2026-07-20, supersedes the
   pearl-green derivation). The interactive accent is tuned per theme so every
   pairing below holds WCAG AA (validated 2026-07-20 with the qa contrast
   script):
     light: white on --blue 5.45 · --accent-strong link on --bg 6.03
     dark:  --accent-contrast on --blue 5.72 · --accent-strong on --bg 9.03
   ========================================================================== */

:root {
  /* ----- theme: light (default) ----- */
  color-scheme: light;

  --bg: #ffffff;
  --surface: #f5f7f9;          /* cards, wells, alternating sections */
  --surface-raised: #ffffff;   /* cards ON surface sections */
  --text: #10161c;
  --text-muted: #5a6672;
  --blue: #326e9d;             /* THE accent — brand #5093c9 darkened to AA */
  --accent-strong: #2c6795;    /* links, text-on-bg accent uses */
  --accent-contrast: #ffffff;  /* text on top of --blue fills */
  --accent-bright: #5093c9;    /* decorative only (exact brand) — never text */
  --accent-soft: #e6f0f8;      /* tints: badges, hovers, selected states */
  --border: #dee4ea;
  --border-strong: #b7c3cd;    /* form control borders (3:1 on --bg) */
  --shadow: 0 1px 2px rgba(10, 22, 35, 0.05), 0 4px 16px rgba(10, 22, 35, 0.06);
  --shadow-raised: 0 2px 4px rgba(10, 22, 35, 0.07), 0 12px 32px rgba(10, 22, 35, 0.10);
  --header-veil: rgba(255, 255, 255, 0.82);
  --logo-filter: none;         /* brand icon is black — inverted on dark */
  --ok: #177a4a;
  --ok-soft: #e7f5ec;
  --warn: #8a6100;
  --error: #b3382c;
  --error-soft: #fbeae8;

  /* ----- spacing scale (IMPLEMENTATION-PLAN §3) ----- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* ----- radius scale — visual identity is 0–3px, sharp-cornered
         (owner ruling 2026-07-20). --r-full is for TRUE CIRCLES only
         (chrome dots, spinner), never rounded rectangles. ----- */
  --r-1: 2px;    /* controls, chips, badges */
  --r-2: 3px;    /* buttons, inputs */
  --r-3: 3px;    /* cards */
  --r-4: 3px;    /* hero panels, large media */
  --r-full: 999px;

  /* ----- type: modular scale ~1.25 (14/16/20/25/31/39/49) ----- */
  --font-sans: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system,
               "Segoe UI", sans-serif;
  /* brand font: logo text + headings (Latin only — Arabic glyphs fall back
     per-character to Plex Arabic) */
  --font-brand: "Allerta Stencil", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --fs--1: 0.875rem;   /* 14 — meta, captions */
  --fs-0: 1rem;        /* 16 — body */
  --fs-1: 1.25rem;     /* 20 — lead, h5 */
  --fs-2: 1.5625rem;   /* 25 — h4 */
  --fs-3: 1.9375rem;   /* 31 — h3 */
  --fs-4: 2.4375rem;   /* 39 — h2 */
  --fs-5: 3.0625rem;   /* 49 — h1 / display */
  --lh-body: 1.6;
  --lh-heading: 1.15;

  /* ----- layout ----- */
  --container: 1200px;
  --gutter: var(--sp-4);

  /* ----- motion (≤200ms micro-transitions only, per §3) ----- */
  --t-fast: 120ms ease;
  --t-med: 200ms ease;

  /* ----- z ----- */
  --z-header: 100;
  --z-menu: 200;
  --z-toast: 300;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0c1116;
  --surface: #121821;
  --surface-raised: #171f29;
  --text: #edf2f7;
  --text-muted: #9dabb9;
  --blue: #5093c9;             /* the exact brand blue passes AA on dark */
  --accent-strong: #7db9ea;
  --accent-contrast: #06121d;
  --accent-bright: #5093c9;
  --accent-soft: #142536;
  --border: #26303c;
  --border-strong: #3e4c5b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-raised: 0 2px 4px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.45);
  --header-veil: rgba(12, 17, 22, 0.80);
  --logo-filter: invert(1);
  --ok: #3fcf8e;
  --ok-soft: #0f2a1d;
  --warn: #e3b341;
  --error: #f0857a;
  --error-soft: #2b1512;
}

/* System preference honored when no explicit choice is stored.
   The head snippet stamps data-theme before first paint; this block only
   covers the no-JS case. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;

    --bg: #0c1116;
    --surface: #121821;
    --surface-raised: #171f29;
    --text: #edf2f7;
    --text-muted: #9dabb9;
    --blue: #5093c9;
    --accent-strong: #7db9ea;
    --accent-contrast: #06121d;
    --accent-bright: #5093c9;
    --accent-soft: #142536;
    --border: #26303c;
    --border-strong: #3e4c5b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-raised: 0 2px 4px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.45);
    --header-veil: rgba(12, 17, 22, 0.80);
    --logo-filter: invert(1);
    --ok: #3fcf8e;
    --ok-soft: #0f2a1d;
    --warn: #e3b341;
    --error: #f0857a;
    --error-soft: #2b1512;
  }
}

/* Arabic pages: Plex Arabic leads, slightly tighter display sizes — Arabic
   headlines run ~20% longer (CONTENT-PLAN §4). */
:root[lang="ar"] {
  --font-sans: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;
  --fs-4: 2.25rem;
  --fs-5: 2.75rem;
}

/* ==========================================================================
   base.css — reset, fonts, element defaults, a11y primitives.
   Logical properties ONLY (RTL is automatic; a .rtl-fix is a build failure).
   ========================================================================== */

/* ----- fonts (self-hosted, swap) ----- */
@font-face {
  /* THE brand font (owner ruling 2026-07-20): logo text + headings.
     Single 400 weight by design — never synthesize bold on it. */
  font-family: "Allerta Stencil";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/allerta-stencil-400.ttf") format("truetype");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-0);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* ----- type defaults ----- */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-brand);
  line-height: var(--lh-heading);
  font-weight: 400; /* Allerta Stencil ships one weight — no faux bold */
  letter-spacing: 0; /* stencil gaps need their designed spacing */
  text-wrap: balance;
}

:root[lang="ar"] h1,
:root[lang="ar"] h2,
:root[lang="ar"] h3,
:root[lang="ar"] h4,
:root[lang="ar"] h5 {
  font-weight: 700; /* Arabic headings render in Plex Arabic — restore weight */
  line-height: 1.35; /* Arabic ascenders/descenders need more room */
}

h1 { font-size: var(--fs-5); }
h2 { font-size: var(--fs-4); }
h3 { font-size: var(--fs-3); }
h4 { font-size: var(--fs-2); }
h5 { font-size: var(--fs-1); }

@media (max-width: 767px) {
  h1 { font-size: var(--fs-4); }
  h2 { font-size: var(--fs-3); }
  h3 { font-size: var(--fs-2); }
}

p {
  max-width: 68ch;
}

a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--t-fast);
}

a:hover {
  text-decoration-thickness: 2px;
}

strong {
  font-weight: 650;
}

small {
  font-size: var(--fs--1);
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-1);
  padding: 0.1em 0.4em;
}

hr {
  border: 0;
  border-block-start: 1px solid var(--border);
  margin-block: var(--sp-6);
}

::selection {
  background: var(--blue);
  color: var(--accent-contrast);
}

/* ----- a11y primitives ----- */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--r-1);
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--sp-4);
  inset-block-start: -100px;
  z-index: calc(var(--z-toast) + 1);
  background: var(--blue);
  color: var(--accent-contrast);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-2);
  text-decoration: none;
  font-weight: 600;
  transition: inset-block-start var(--t-fast);
}

.skip-link:focus {
  inset-block-start: var(--sp-4);
}

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

@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;
  }
}

/* ==========================================================================
   utilities.css — layout primitives: container, 12-col grid, stack/cluster,
   section rhythm, text helpers. Spacing values come from the token scale
   only. All logical properties.
   ========================================================================== */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 768px) {
  .container {
    --gutter: var(--sp-6);
  }
}

/* ----- 12-col grid ----- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-4);
}

@media (min-width: 768px) {
  .grid {
    gap: var(--sp-5);
  }
}

/* Mobile-first spans: everything full-width until md */
[class*="col-"] {
  grid-column: span 12;
}

@media (min-width: 768px) {
  .col-md-3 { grid-column: span 3; }
  .col-md-4 { grid-column: span 4; }
  .col-md-5 { grid-column: span 5; }
  .col-md-6 { grid-column: span 6; }
  .col-md-7 { grid-column: span 7; }
  .col-md-8 { grid-column: span 8; }
  .col-md-12 { grid-column: span 12; }
}

@media (min-width: 1024px) {
  .col-lg-2 { grid-column: span 2; }
  .col-lg-3 { grid-column: span 3; }
  .col-lg-4 { grid-column: span 4; }
  .col-lg-5 { grid-column: span 5; }
  .col-lg-6 { grid-column: span 6; }
  .col-lg-7 { grid-column: span 7; }
  .col-lg-8 { grid-column: span 8; }
  .col-lg-9 { grid-column: span 9; }
}

/* ----- flow primitives ----- */
.stack > * + * {
  margin-block-start: var(--sp-4);
}

.stack-lg > * + * {
  margin-block-start: var(--sp-5);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

/* ----- section rhythm ----- */
.section {
  padding-block: var(--sp-8);
}

@media (min-width: 1024px) {
  .section {
    padding-block: var(--sp-9);
  }
}

.section-tight {
  padding-block: var(--sp-7);
}

.section-alt {
  background: var(--surface);
}

.section-head {
  max-width: 62ch;
  margin-block-end: var(--sp-7);
}

.section-head > p {
  margin-block-start: var(--sp-3);
  color: var(--text-muted);
  font-size: var(--fs-1);
}

/* ----- text ----- */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-start { text-align: start; }
.lead { font-size: var(--fs-1); color: var(--text-muted); }
.eyebrow {
  display: block;
  font-size: var(--fs--1);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-block-end: var(--sp-3);
}

:root[lang="ar"] .eyebrow {
  letter-spacing: 0; /* uppercase tracking is a Latin-only device */
}

/* ----- spacing helpers (token steps only) ----- */
.mt-0 { margin-block-start: 0; }
.mt-2 { margin-block-start: var(--sp-2); }
.mt-3 { margin-block-start: var(--sp-3); }
.mt-4 { margin-block-start: var(--sp-4); }
.mt-5 { margin-block-start: var(--sp-5); }
.mt-6 { margin-block-start: var(--sp-6); }
.mt-7 { margin-block-start: var(--sp-7); }
.mb-4 { margin-block-end: var(--sp-4); }
.mb-5 { margin-block-end: var(--sp-5); }
.mb-6 { margin-block-end: var(--sp-6); }

/* ----- misc ----- */
/* !important so it beats component display rules regardless of bundle order */
@media (max-width: 767px) {
  .hide-sm {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .only-sm-block {
    display: block;
  }
}

@media (min-width: 768px) {
  .only-sm-block {
    display: none;
  }
}

/* ==========================================================================
   components.css — every shared component, documented on /styleguide.
   Tokens only. Logical properties only.
   ========================================================================== */

/* =====================
   Buttons
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px; /* touch target */
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-2);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--fs-0);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast),
    color var(--t-fast), transform var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: translateY(1px);
}

.btn-accent {
  background: var(--blue);
  color: var(--accent-contrast);
  border-color: var(--blue);
}

.btn-accent:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  background: var(--surface);
}

.btn-link {
  background: none;
  border: none;
  min-height: auto;
  padding: 0;
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}

.btn-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.btn-link .arrow {
  transition: translate var(--t-fast);
}

.btn-link:hover .arrow {
  translate: 4px 0;
}

:root[dir="rtl"] .btn-link:hover .arrow,
[dir="rtl"] .btn-link:hover .arrow {
  translate: -4px 0;
}

.btn-lg {
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--fs-1);
}

.btn-sm {
  min-height: 36px;
  padding: var(--sp-1) var(--sp-4);
  font-size: var(--fs--1);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

/* loading state: spinner replaces the label */
.btn.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: var(--r-full);
  border: 2px solid var(--accent-contrast);
  border-inline-start-color: transparent;
  animation: btn-spin 0.7s linear infinite;
}

.btn-ghost.is-loading::after {
  border-color: var(--text);
  border-inline-start-color: transparent;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* directional arrow that flips with writing direction */
.arrow {
  display: inline-block;
}

:root[dir="rtl"] .arrow,
[dir="rtl"] .arrow {
  transform: scaleX(-1);
}

/* =====================
   Header + nav
   ===================== */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-header);
  background: var(--header-veil);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-brand);
  font-weight: 400; /* Allerta Stencil — single weight, no faux bold */
  font-size: var(--fs-1);
  letter-spacing: 0;
}

.brand img,
.brand svg {
  width: 30px;
  height: auto;
}

/* the icon SVG is filled black — invert on dark (token flips per theme) */
.brand img,
.logo-mark {
  filter: var(--logo-filter);
}

.site-nav {
  display: none;
}

.site-nav ul {
  display: flex;
  gap: var(--sp-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-2);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 550;
  font-size: var(--fs--1);
  transition: color var(--t-fast), background var(--t-fast);
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 650;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-inline-start: auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-2);
  border: 1px solid transparent;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast);
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* theme toggle shows the icon of the theme it switches TO */
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: none; }

@media (min-width: 1024px) {
  .site-nav {
    display: block;
  }

  .nav-toggle {
    display: none;
  }
}

/* mobile menu (disclosure panel under the header) */
.mobile-menu {
  display: none;
  border-block-start: 1px solid var(--border);
  background: var(--bg);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: var(--sp-3) 0;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-inline: var(--gutter);
  color: var(--text);
  text-decoration: none;
  font-weight: 550;
}

.mobile-menu a:hover {
  background: var(--surface);
}

.mobile-menu .menu-cta {
  padding: var(--sp-3) var(--gutter) var(--sp-4);
  display: flex;
  gap: var(--sp-3);
}

.mobile-menu .menu-cta .btn {
  flex: 1;
}

@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }
}

body.menu-open {
  overflow: hidden;
}

/* =====================
   Cards
   ===================== */
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: border-color var(--t-med), box-shadow var(--t-med),
    transform var(--t-med);
}

.section-alt .card {
  background: var(--surface-raised);
}

a.card {
  text-decoration: none;
  color: inherit;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

a.card:hover {
  transform: translateY(-2px);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--sp-3);
  padding: var(--sp-5);
}

.card-body h3,
.card-body h4 {
  font-size: var(--fs-1);
}

.card-body p {
  color: var(--text-muted);
  font-size: var(--fs--1);
  flex: 1;
}

.card-media {
  background: var(--surface);
  border-block-end: 1px solid var(--border);
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* browser-frame inside a card media area fills it, screenshot crops from top */
.card-media .browser-frame {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-media .browser-frame img {
  flex: 1;
  min-height: 0;
}

.card-kicker {
  font-size: var(--fs--1);
  font-weight: 600;
  color: var(--accent-strong);
}

.card-meta {
  display: flex;
  gap: var(--sp-3);
  color: var(--text-muted);
  font-size: var(--fs--1);
}

/* =====================
   Price card + comparison table
   ===================== */
.price-card {
  position: relative;
}

.price-card .card-body {
  gap: var(--sp-4);
}

.price-card.is-featured {
  border-color: var(--blue);
  box-shadow: var(--shadow);
}

.price-tag {
  display: flex;
  align-items: baseline;
  gap: var(--sp-1);
}

.price-tag .amount {
  font-size: var(--fs-4);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.price-tag .period {
  color: var(--text-muted);
  font-size: var(--fs--1);
}

/* .check-list is the general-purpose variant of the same list (product pages,
   feature rows) — one ruleset, two names, zero drift */
.price-features,
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-2);
  font-size: var(--fs--1);
}

.price-features li,
.check-list li {
  display: flex;
  gap: var(--sp-2);
  align-items: start;
}

.price-features .tick,
.check-list .tick {
  color: var(--accent-strong);
  flex-shrink: 0;
  font-weight: 700;
}

/* the negative twin of .tick — used in comparison lists (e.g. vs-free-mail) */
.check-list .cross {
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 700;
}

@media (min-width: 768px) {
  .check-list.is-2col {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--sp-6);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px var(--sp-3);
  border-radius: var(--r-1);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: var(--fs--1);
  font-weight: 600;
}

.badge-featured {
  position: absolute;
  inset-block-start: calc(-1 * var(--sp-3));
  inset-inline-start: var(--sp-5);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--surface-raised);
}

/* narrow, centered variant for short tables (e.g. the TLD price list) */
.table-wrap.is-narrow {
  max-width: 760px;
  margin-inline: auto;
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs--1);
  min-width: 560px;
}

table.compare th,
table.compare td {
  text-align: start;
  padding: var(--sp-3) var(--sp-4);
  border-block-end: 1px solid var(--border);
}

table.compare thead th {
  font-weight: 650;
  color: var(--text-muted);
  background: var(--surface);
  white-space: nowrap;
}

table.compare tbody tr:last-child th,
table.compare tbody tr:last-child td {
  border-block-end: 0;
}

table.compare tbody tr:hover {
  background: var(--surface);
}

table.compare .num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* =====================
   Stat tile + logo strip
   ===================== */
.stat-tile {
  display: grid;
  gap: var(--sp-1);
  padding-inline-start: var(--sp-4);
  border-inline-start: 2px solid var(--blue);
}

.stat-tile .value {
  font-size: var(--fs-4);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-tile .label {
  color: var(--text-muted);
  font-size: var(--fs--1);
}

.logo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5) var(--sp-7);
}

.logo-strip img {
  height: 42px;
  width: auto;
  opacity: 0.65;
  filter: grayscale(1);
  transition: opacity var(--t-med), filter var(--t-med);
}

/* vertical lockups need more height to stay legible (e.g. GlobalTek) */
.logo-strip img.logo-lg {
  height: 66px;
}

:root[data-theme="dark"] .logo-strip img.logo-dark-invert {
  filter: grayscale(1) invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo-strip img.logo-dark-invert {
    filter: grayscale(1) invert(1);
  }
}

.logo-strip a:hover img,
.logo-strip img:hover {
  opacity: 1;
  filter: none;
}

/* =====================
   Forms
   ===================== */
.field {
  display: grid;
  gap: var(--sp-2);
}

.field > label {
  font-weight: 600;
  font-size: var(--fs--1);
}

.field .hint {
  color: var(--text-muted);
  font-size: var(--fs--1);
}

.input,
textarea.input,
select.input {
  width: 100%;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-2);
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

textarea.input {
  min-height: 120px;
  resize: vertical;
}

.input::placeholder {
  color: var(--text-muted);
}

/* File input (careers CV, WP-12) — the picker button styled as a small
   ghost button; the filename inherits input typography */
.input[type="file"] {
  padding-block: var(--sp-2);
  cursor: pointer;
}

.input[type="file"]::file-selector-button {
  margin-inline-end: var(--sp-3);
  padding: 2px var(--sp-3);
  font: inherit;
  font-size: var(--fs--1);
  font-weight: 550;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-1);
  cursor: pointer;
  transition: border-color var(--t-fast);
}

.input[type="file"]::file-selector-button:hover {
  border-color: var(--blue);
}

.input:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent);
}

.field.has-error .input {
  border-color: var(--error);
}

.field .error {
  display: flex;
  gap: var(--sp-1);
  color: var(--error);
  font-size: var(--fs--1);
  font-weight: 550;
}

.form-success {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-5);
  border: 1px solid var(--ok);
  border-radius: var(--r-3);
  background: var(--ok-soft);
}

.form-success h4 {
  font-size: var(--fs-1);
  color: var(--ok);
}

.form-success p {
  font-size: var(--fs--1);
  margin: 0;
}

/* =====================
   FAQ accordion
   ===================== */
.faq {
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--surface-raised);
  overflow: hidden;
}

.faq details + details {
  border-block-start: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: background var(--t-fast);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  background: var(--surface);
}

.faq summary::after {
  content: "+";
  font-size: var(--fs-1);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: rotate var(--t-med);
}

.faq details[open] summary::after {
  rotate: 45deg;
}

.faq .faq-body {
  padding: 0 var(--sp-5) var(--sp-5);
  color: var(--text-muted);
}

/* =====================
   Breadcrumbs
   ===================== */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--fs--1);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.breadcrumbs li + li::before {
  content: "/";
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--text);
  text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
  color: var(--text);
  font-weight: 550;
}

/* =====================
   Footer
   ===================== */
.site-footer {
  border-block-start: 1px solid var(--border);
  background: var(--surface);
  padding-block: var(--sp-8) var(--sp-6);
  margin-block-start: var(--sp-8);
  font-size: var(--fs--1);
}

.site-footer .footer-title {
  font-size: var(--fs--1);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-block-end: var(--sp-4);
}

:root[lang="ar"] .site-footer .footer-title {
  letter-spacing: 0;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-2);
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  justify-content: space-between;
  align-items: center;
  border-block-start: 1px solid var(--border);
  margin-block-start: var(--sp-7);
  padding-block-start: var(--sp-5);
  color: var(--text-muted);
}

/* =====================
   Toast
   ===================== */
.toast {
  position: fixed;
  inset-block-end: var(--sp-5);
  inset-inline-start: 50%;
  translate: -50% 0;
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  max-width: min(92vw, 480px);
  padding: var(--sp-3) var(--sp-5);
  background: var(--text);
  color: var(--bg);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-raised);
  font-size: var(--fs--1);
  font-weight: 550;
}

:root[dir="rtl"] .toast,
[dir="rtl"] .toast {
  translate: 50% 0;
}

.toast.is-error {
  background: var(--error);
  color: var(--bg); /* dark text on the light dark-theme error red, white on light */
}

/* =====================
   Skeleton / empty states (for the JS islands)
   ===================== */
.skeleton {
  border-radius: var(--r-2);
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--border) 50%,
    var(--surface) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-sheen 1.4s ease-in-out infinite;
  color: transparent;
  user-select: none;
}

@keyframes skeleton-sheen {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background: var(--surface);
  }
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  text-align: center;
  padding: var(--sp-7) var(--sp-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-3);
  color: var(--text-muted);
}

.empty-state h4 {
  color: var(--text);
  font-size: var(--fs-1);
}

/* =====================
   Browser-chrome device frame (product screenshots)
   ===================== */
.browser-frame {
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--surface-raised);
  box-shadow: var(--shadow-raised);
  overflow: hidden;
}

.browser-frame .chrome {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-block-end: 1px solid var(--border);
  background: var(--surface);
}

.browser-frame .dot {
  width: 10px;
  height: 10px;
  border-radius: var(--r-full);
  background: var(--border-strong);
}

.browser-frame .chrome-url {
  margin-inline: auto;
  padding: 2px var(--sp-4);
  border-radius: var(--r-1);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  direction: ltr; /* URLs stay LTR in RTL context */
}

.browser-frame img {
  width: 100%;
}

/* Theme-paired screenshots (WP-11): one img per theme, CSS picks */
.theme-shot .shot-dark { display: none; }
:root[data-theme="dark"] .theme-shot .shot-light { display: none; }
:root[data-theme="dark"] .theme-shot .shot-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-shot .shot-light { display: none; }
  :root:not([data-theme]) .theme-shot .shot-dark { display: block; }
}

/* =====================
   Domain search (homepage + /cloud/domains)
   ===================== */
.domain-search {
  display: flex;
  gap: var(--sp-3);
  max-width: 560px;
}

.domain-search .input {
  flex: 1;
  min-height: 52px;
  font-size: var(--fs-1);
}

.domain-search .btn {
  min-height: 52px;
  flex-shrink: 0;
}

@media (max-width: 479px) {
  .domain-search {
    flex-direction: column;
  }
}

/* Live availability result (WP-12) — tone bar on the inline-start edge,
   text stays var(--text) so contrast holds in both themes */
.domain-search-result {
  display: grid;
  gap: var(--sp-3);
  max-width: 560px;
  margin-block-start: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--text-muted);
  border-radius: var(--r-2);
}

.domain-search-result[hidden] {
  display: none;
}

.domain-search-result.is-ok       { border-inline-start-color: var(--ok); }
.domain-search-result.is-bad      { border-inline-start-color: var(--error); }
.domain-search-result.is-warn     { border-inline-start-color: var(--warn); }
.domain-search-result.is-info     { border-inline-start-color: var(--blue); }
.domain-search-result.is-checking { border-inline-start-color: var(--border); }

.domain-search-result .result-head {
  margin: 0;
  font-weight: 550;
}

.domain-search-result.is-checking .result-head {
  color: var(--text-muted);
  font-weight: 400;
}

.domain-search-result .result-price {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs--1);
}

/* =====================
   Trusted-by names strip (wordmark treatment — uniform, theme-aware)
   ===================== */
.trusted-names span {
  font-size: var(--fs-1);
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text-muted); /* AA on both themes — never add opacity here */
  white-space: nowrap;
  transition: color var(--t-med);
}

.trusted-names span:hover {
  color: var(--text);
}

/* =====================
   Hero (the ONE signature animation zone)
   ===================== */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-8) var(--sp-7);
}

@media (min-width: 1024px) {
  .hero {
    padding-block: var(--sp-9);
  }
}

.hero .grid {
  align-items: center;
}

.hero h1 {
  margin-block-end: var(--sp-4);
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: clamp(var(--fs-5), 3.9vw, 3.5rem);
  }
}

/* soft brand glow behind the constellation — decorative, both themes */
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(
    ellipse 60% 50% at 55% 45%,
    color-mix(in srgb, var(--accent-bright) 14%, transparent),
    transparent 70%
  );
  pointer-events: none;
}

.hero .lead {
  font-size: var(--fs-1);
  margin-block-end: var(--sp-6);
}

.hero-visual {
  position: relative;
}

#hero-constellation {
  width: 100%;
  aspect-ratio: 810 / 575;
  max-height: 440px;
  position: relative;
}

#hero-constellation img {
  width: 70%;
  margin: auto;
}

/* =====================
   Product pages (hub + shared template) — documented on /styleguide
   ===================== */
.product-hero {
  padding-block: var(--sp-7);
}

@media (min-width: 1024px) {
  .product-hero {
    padding-block: var(--sp-8);
  }
}

.product-hero .grid {
  align-items: center;
}

.product-kicker {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-block-end: var(--sp-4);
}

.product-hero h1 {
  margin-block-end: var(--sp-4);
}

.product-hero .lead {
  font-size: var(--fs-1);
  margin-block-end: var(--sp-6);
}

.product-hero .hero-meta {
  margin-block-start: var(--sp-4);
  color: var(--text-muted);
  font-size: var(--fs--1);
}

/* screenshot column breathes on mobile where the grid stacks */
.product-hero .browser-frame {
  margin-block-start: var(--sp-5);
}

@media (min-width: 1024px) {
  .product-hero .browser-frame {
    margin-block-start: 0;
  }
}

/* feature rows — copy | aside, aside side alternates via .is-flipped */
.feature-row {
  align-items: center;
}

.feature-row + .feature-row {
  margin-block-start: var(--sp-7);
}

@media (min-width: 1024px) {
  .feature-row + .feature-row {
    margin-block-start: var(--sp-9);
  }

  .feature-row.is-flipped .feature-copy {
    order: 2;
  }
}

.feature-row h3 {
  font-size: var(--fs-2);
  margin-block-end: var(--sp-3);
}

.feature-copy > p {
  color: var(--text-muted);
}

.feature-copy .check-list {
  margin-block-start: var(--sp-4);
}

/* aside check-lists read as content, not as a boxed form */
.feature-aside .check-list {
  font-size: var(--fs-0);
  gap: var(--sp-3);
}

/* pricing summary card (single, centered) */
.pricing-summary {
  max-width: 640px;
  margin-inline: auto;
}

.pricing-summary .card-body {
  gap: var(--sp-4);
  padding: var(--sp-6);
}

.pricing-summary .card-body p:first-child {
  color: var(--text);
  font-size: var(--fs-0);
}

/* centered narrow FAQ used on product pages */
.faq-narrow {
  max-width: 680px;
  margin-inline: auto;
}

/* hub product cards — screenshots keep their aspect, links live in the body */
.product-grid {
  row-gap: var(--sp-6);
}

.product-card .card-body h2 {
  font-size: var(--fs-2);
}

.product-card .card-body p {
  flex: initial;
}

.product-card .check-list {
  margin-block-end: var(--sp-2);
}

a.card-media {
  display: block;
}

/* =====================
   Door cards (the homepage router)
   ===================== */
.door {
  position: relative;
}

.door .card-body {
  padding: var(--sp-6);
  gap: var(--sp-3);
}

.door h3 {
  font-size: var(--fs-2);
}

.door .door-go {
  margin-block-start: auto;
  font-weight: 600;
  color: var(--accent-strong);
}

/* =====================
   Photo frame — non-browser imagery (hardware renders, device photos)
   ===================== */
.photo-frame {
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--surface-raised);
  box-shadow: var(--shadow-raised);
  overflow: hidden;
}

.photo-frame img {
  display: block;
  width: 100%;
}

/* service hero aside without a screenshot: the check-list IS the visual */
.hero-points {
  font-size: var(--fs-0);
  gap: var(--sp-3);
  margin-block-start: var(--sp-5);
}

@media (min-width: 1024px) {
  .hero-points {
    margin-block-start: 0;
    padding-inline-start: var(--sp-7);
  }
}

/* =====================
   Legal prose (privacy / terms)
   ===================== */
.legal {
  max-width: 720px;
}

.legal h2 {
  font-size: var(--fs-2);
  margin-block-start: var(--sp-7);
  margin-block-end: var(--sp-3);
}

.legal p,
.legal li {
  color: var(--text-muted);
}

.legal ul {
  padding-inline-start: var(--sp-5);
  display: grid;
  gap: var(--sp-2);
}

/* components that set display would otherwise defeat the hidden attribute
   (author display beats the UA [hidden] rule) — restore its meaning */
[hidden] {
  display: none !important;
}

/* =====================
   Case studies (/work)
   ===================== */

/* meta strip: label/value pairs under the case hero */
.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5) var(--sp-7);
  padding-block: var(--sp-5);
  border-block: 1px solid var(--border);
}

.case-meta div {
  display: grid;
  gap: var(--sp-1);
}

.case-meta dt {
  font-size: var(--fs--1);
  color: var(--text-muted);
}

.case-meta dd {
  margin: 0;
  font-weight: 600;
}

.case-meta a {
  color: var(--accent-strong);
  text-decoration: none;
}

.case-meta a:hover {
  text-decoration: underline;
}

/* gallery figures: framed shot + muted caption */
.shot figcaption {
  margin-block-start: var(--sp-3);
  font-size: var(--fs--1);
  color: var(--text-muted);
}

/* portrait phone shots sit centered on the surface, not stretched */
.shot .is-portrait {
  background: var(--surface);
  display: flex;
  justify-content: center;
}

.shot .is-portrait img {
  width: auto;
  max-width: min(320px, 100%);
}

/* sector filter (/work) — chips; without JS all cards simply stay visible */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.filter-bar button {
  min-height: 40px;
  padding: var(--sp-1) var(--sp-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-2);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--fs--1);
  font-weight: 550;
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast),
    border-color var(--t-fast);
}

.filter-bar button:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.filter-bar button[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--accent-contrast);
}

/* architecture diagram (inline SVG, token-themed) */
.arch {
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--surface-raised);
  padding: var(--sp-5);
}

.arch svg {
  display: block;
  width: 100%;
  height: auto;
}

.arch .box {
  fill: var(--surface);
  stroke: var(--border-strong);
}

.arch .box-accent {
  fill: var(--accent-soft, var(--surface));
  stroke: var(--blue);
}

.arch text {
  fill: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
}

.arch .lbl {
  fill: var(--text-muted);
  font-size: 11.5px;
}

.arch .wire {
  stroke: var(--text-muted);
  stroke-width: 1.5;
  fill: none;
}

/* =====================
   Blog (/blog + articles)
   ===================== */

/* article prose — readable measure, calm rhythm */
.article {
  max-width: 720px;
}

.article > * + * {
  margin-block-start: var(--sp-4);
}

.article h2 {
  font-size: var(--fs-2);
  margin-block-start: var(--sp-7);
}

.article h3 {
  font-size: var(--fs-1);
  margin-block-start: var(--sp-6);
}

.article p,
.article li {
  color: var(--text-muted);
  line-height: 1.7;
}

.article strong {
  color: var(--text);
}

.article a {
  color: var(--accent-strong);
}

.article ul,
.article ol {
  padding-inline-start: var(--sp-5);
  display: grid;
  gap: var(--sp-2);
}

.article blockquote {
  margin: 0;
  border-inline-start: 3px solid var(--blue);
  padding-inline-start: var(--sp-5);
  font-size: var(--fs-1);
  color: var(--text);
}

.article .photo-frame,
.article .browser-frame,
.article .arch {
  margin-block: var(--sp-6);
}

/* meta line above/below article titles and on post cards */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  color: var(--text-muted);
  font-size: var(--fs--1);
}

.post-meta .dot-sep::before {
  content: "·";
  margin-inline-end: var(--sp-2);
}

/* =====================
   Section identity art (per-section head illustrations)
   ===================== */
.section-art {
  display: none;
}

@media (min-width: 768px) {
  .section-art {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .section-art svg {
    width: min(380px, 100%);
    height: auto;
  }
}

/* abstract geometry — safe to mirror so flow follows reading direction */
[dir="rtl"] .section-art svg {
  transform: scaleX(-1);
}

.section-art .sa-line {
  stroke: var(--text-muted);
  stroke-width: 1.5;
  fill: none;
}

.section-art .sa-line-soft {
  stroke: var(--border-strong);
  stroke-width: 1.5;
  fill: none;
}

.section-art .sa-node {
  fill: var(--surface-raised);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}

.section-art .sa-soft {
  fill: var(--accent-soft);
  stroke: var(--blue);
  stroke-width: 1.5;
}

.section-art .sa-dot {
  fill: var(--text-muted);
}

.section-art .sa-accent {
  stroke: var(--blue);
  stroke-width: 1.5;
  fill: none;
}

.section-art .sa-accent-fill {
  fill: var(--blue);
}

.section-art .sa-tick {
  stroke: var(--accent-contrast);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =====================
   Nav panels (desktop disclosure menus) + grouped mobile menu
   ===================== */
.site-nav .has-panel {
  position: relative;
}

.nav-panel-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: 44px;
  padding: 0 var(--sp-3);
  border: 0;
  border-radius: var(--r-2);
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-weight: 550;
  font-size: var(--fs--1);
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast);
}

.nav-panel-btn:hover,
.nav-panel-btn[aria-expanded="true"] {
  color: var(--text);
  background: var(--surface);
}

.nav-panel-btn.is-section {
  color: var(--text);
  font-weight: 650;
}

.nav-panel-btn .chev {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--t-fast);
}

.nav-panel-btn[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

.nav-panel {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-start: 0;
  min-width: 300px;
  padding: var(--sp-4);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-raised);
  display: grid;
  gap: var(--sp-4);
}

.nav-panel-overview {
  display: grid;
  gap: 2px;
  padding: var(--sp-3);
  border-radius: var(--r-2);
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
}

.nav-panel-groups {
  display: flex;
  gap: var(--sp-5);
}

.nav-panel-group {
  display: grid;
  gap: 2px;
  align-content: start;
  min-width: 190px;
}

.nav-panel-group .pn-title {
  margin: 0 0 var(--sp-1);
  padding-inline: var(--sp-3);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.nav-panel-group a {
  display: grid;
  gap: 2px;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-2);
  text-decoration: none;
}

.nav-panel-group a:hover,
.nav-panel-overview:hover {
  background: var(--surface);
}

.nav-panel .pn-label {
  color: var(--text);
  font-weight: 600;
  font-size: var(--fs--1);
  white-space: nowrap;
}

.nav-panel .pn-desc {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

/* mobile menu groups — native <details>, zero-JS */
.mobile-menu .menu-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding-inline: var(--gutter);
  color: var(--text);
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}

.mobile-menu .menu-group summary::-webkit-details-marker {
  display: none;
}

.mobile-menu .menu-group summary .chev {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--t-fast);
}

.mobile-menu .menu-group[open] summary .chev {
  transform: rotate(180deg);
}

.mobile-menu .menu-group ul {
  padding: 0 0 var(--sp-2);
}

.mobile-menu .menu-group a {
  min-height: 42px;
  padding-inline-start: calc(var(--gutter) + var(--sp-5));
  color: var(--text-muted);
  font-weight: 500;
}

/* =====================
   Loop app suite (grid on the product page, chips on cards)
   ===================== */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-4);
}

.app-tile {
  display: grid;
  gap: var(--sp-2);
  justify-items: start;
  padding: var(--sp-5);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
}

.app-tile .app-icon {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-tile h3 {
  font-size: var(--fs-0);
  font-family: var(--font-sans);
  font-weight: 650;
}

.app-tile p {
  color: var(--text-muted);
  font-size: var(--fs--1);
  margin: 0;
}

.app-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-2);
  color: var(--text-muted);
  font-size: var(--fs--1);
}

.app-chips span::after {
  content: "·";
  margin-inline-start: var(--sp-2);
  color: var(--border-strong);
}

.app-chips span:last-child::after {
  content: "";
}

