/* ==========================================================================
   Brainservice — site styles
   Tokens first, then base, layout, components, pages.
   Uses logical properties (inline/block) so RTL legal pages lay out correctly.
   ========================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #efede6;
  --ink: #15171c;
  --ink-2: #464b56;
  --ink-3: #6a6f7b;
  --line: #e3e0d8;
  --line-strong: #d0ccc1;
  --accent: #2b50e8;
  --accent-strong: #1f3dc2;
  --accent-soft: #e5eaff;
  --on-accent: #ffffff;
  --highlight: #ffc93d;
  --inverse-bg: #15171c;
  --inverse-ink: #f6f5f1;
  --inverse-ink-2: #b9bcc5;

  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgb(21 23 28 / 0.06);
  --shadow: 0 1px 2px rgb(21 23 28 / 0.05), 0 10px 30px -12px rgb(21 23 28 / 0.18);
  --shadow-lg: 0 30px 70px -30px rgb(21 23 28 / 0.35);

  --header-h: 68px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f12;
    --surface: #16181d;
    --surface-2: #1e2128;
    --ink: #f2f1ed;
    --ink-2: #b6bac4;
    --ink-3: #8b909c;
    --line: #2a2d35;
    --line-strong: #3a3e48;
    --accent: #7d95ff;
    --accent-strong: #a3b4ff;
    --accent-soft: #1d2442;
    --on-accent: #0b0d18;
    --inverse-bg: #1b1e26;
    --inverse-ink: #f2f1ed;
    --inverse-ink-2: #a7abb6;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 30px -12px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 30px 70px -30px rgb(0 0 0 / 0.8);
    color-scheme: dark;
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

[hidden] { display: none !important; }
img, svg, picture { display: block; max-width: 100%; }
picture img { width: 100%; height: auto; }

a { color: inherit; }

h1, h2, h3 { line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-optical-sizing: auto;
}

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
}

.lede { font-size: clamp(17px, 2vw, 19px); color: var(--ink-2); line-height: 1.6; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }

.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-3); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--accent); text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .15s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Header & navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 21px; letter-spacing: -0.02em;
}
.brand-dot { color: var(--accent); }

.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px;
  border-radius: 999px; text-decoration: none;
  font-size: 15px; font-weight: 500; color: var(--ink-2);
  transition: background-color .15s, color .15s;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.site-nav a.nav-button { background: var(--ink); color: var(--bg); margin-inline-start: 6px; padding-inline: 18px; }
.site-nav a.nav-button:hover,
.site-nav a.nav-button[aria-current="page"] { background: var(--accent); color: var(--on-accent); }

.nav-toggle {
  display: none;
  position: relative; width: 44px; height: 44px; margin-inline-end: -8px;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer;
}
.nav-toggle-bar {
  position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform .2s ease, top .2s ease;
}
.nav-toggle-bar:nth-of-type(2) { top: 17px; }
.nav-toggle-bar:nth-of-type(3) { top: 25px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(2) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 820px) {
  .js .nav-toggle { display: block; }
  .js .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgb(0 0 0 / 0.25);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .js .site-nav.is-open { display: block; animation: nav-in .18s ease-out; }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .js .site-nav a { width: 100%; min-height: 52px; padding: 12px 14px; font-size: 18px; border-radius: 14px; }
  .js .site-nav a.nav-button { justify-content: center; margin: 10px 0 0; }

  /* Without JS the links simply wrap under the logo. */
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 10px; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; }
}

@keyframes nav-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding-block: clamp(64px, 9vw, 112px); }
.section + .section { padding-top: 0; }
.hero + .section { padding-top: clamp(16px, 3vw, 40px); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.section-head h2 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em;
  font-size: clamp(30px, 4.4vw, 46px); margin-top: 10px; max-width: 20ch;
}
.section-head p.lede { margin-top: 14px; max-width: 54ch; }

@media (max-width: 680px) {
  .section-head { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   Home: hero
   -------------------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 8vw, 104px) clamp(56px, 8vw, 96px); }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 120%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center; gap: clamp(32px, 5vw, 64px);
}

.hero h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
}
.hero h1 .accent { color: var(--accent); }
.hero .lede { margin-top: 22px; max-width: 34em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.store-note {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px;
  margin-top: 28px; font-size: 14px; color: var(--ink-3);
}
.store-note span { display: inline-flex; align-items: center; gap: 7px; }
.store-note svg { width: 18px; height: 18px; }

/* Icon mosaic */
.mosaic {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 18px);
  transform: rotate(-6deg);
  padding: 4%;
}
.mosaic-tile {
  aspect-ratio: 1; border-radius: 23%; overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .3s ease;
}
.mosaic-tile:nth-child(odd) { transform: translateY(14%); }
.mosaic-tile picture, .mosaic-tile img { width: 100%; height: 100%; object-fit: cover; }
.mosaic-tile.is-contain img { object-fit: contain; padding: 10%; background: #fff; }
.mosaic-count {
  display: grid; place-content: center; text-align: center;
  background: var(--accent); color: var(--on-accent);
}
.mosaic-count strong { font-family: var(--font-display); font-size: clamp(28px, 3.6vw, 44px); line-height: 1; letter-spacing: -0.03em; }
.mosaic-count span { font-size: clamp(11px, 1.1vw, 13px); font-weight: 600; opacity: .85; margin-top: 4px; }

@media (prefers-reduced-motion: no-preference) {
  .mosaic-tile { animation: float 7s ease-in-out infinite; animation-delay: calc(var(--i) * -0.6s); }
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 560px; margin-inline: auto; width: 100%; }
}
@media (max-width: 560px) {
  .mosaic { grid-template-columns: repeat(5, minmax(0, 1fr)); transform: rotate(-4deg) scale(.94); gap: 8px; padding: 2% 0 6%; }
  .mosaic-count { display: none; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* --------------------------------------------------------------------------
   App tiles (home) and app cards (apps page)
   -------------------------------------------------------------------------- */

.app-icon {
  display: block; flex: none; overflow: hidden; border-radius: 23%;
  background: var(--surface-2);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.05), 0 4px 12px -4px rgb(0 0 0 / 0.2);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-icon.is-contain { background: #fff; }
.app-icon.is-contain img { object-fit: contain; padding: 10%; }

.platforms { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); }
.platforms svg { width: 16px; height: 16px; }

.tile-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}

.app-tile {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.app-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.app-tile .app-icon { width: 60px; height: 60px; }
.app-tile h3 { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
.app-tile p {
  font-size: 14px; color: var(--ink-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.app-tile .tile-foot {
  margin-top: auto; padding-top: 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-3);
}

@media (max-width: 560px) {
  .tile-grid { gap: 10px; }
  .app-tile {
    display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 14px; row-gap: 6px;
    padding: 14px 16px; border-radius: 16px;
  }
  .app-tile .app-icon { width: 56px; height: 56px; grid-row: span 2; }
  .app-tile h3 { font-size: 16px; }
  .app-tile p { font-size: 13.5px; margin-top: 2px; }
  .app-tile .tile-foot { grid-column: 2; padding-top: 0; }
  .app-tile.see-all { display: flex; padding: 18px; }
}

.app-tile.see-all {
  justify-content: center; align-items: flex-start;
  background: var(--accent-soft); border-color: transparent; color: var(--accent);
}
.app-tile.see-all strong { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
.app-tile.see-all span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.app-tile.see-all svg { width: 18px; height: 18px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tag-soon { background: color-mix(in srgb, var(--highlight) 30%, transparent); color: var(--ink); }

/* --------------------------------------------------------------------------
   Trust / values
   -------------------------------------------------------------------------- */

.value-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.value {
  padding: clamp(22px, 3vw, 30px); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.value-icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 18px;
}
.value-icon svg { width: 22px; height: 22px; }
.value h3 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.value p { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.value a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }

@media (max-width: 860px) { .value-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Support band
   -------------------------------------------------------------------------- */

.band {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.4fr) auto; align-items: center; gap: 28px;
  padding: clamp(28px, 5vw, 56px); border-radius: var(--radius-lg);
  background: var(--inverse-bg); color: var(--inverse-ink);
}
.band::after {
  content: ""; position: absolute; inset: auto -80px -120px auto; width: 320px; height: 320px;
  border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 55%, transparent), transparent);
  opacity: .6; pointer-events: none;
}
.band h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; font-size: clamp(28px, 3.8vw, 40px); }
.band p { margin-top: 12px; color: var(--inverse-ink-2); max-width: 46ch; }
.band .email { color: var(--inverse-ink); font-weight: 600; }
.band-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; }
.band .btn-ghost { color: var(--inverse-ink); border-color: rgb(255 255 255 / 0.25); }
.band .btn-ghost:hover { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.5); }
.band .btn-light { background: var(--inverse-ink); color: var(--inverse-bg); }
.band .btn-light:hover { background: var(--accent); color: var(--on-accent); }

@media (max-width: 760px) {
  .band { grid-template-columns: 1fr; }
  .band-actions .btn { flex: 1 1 auto; }
}

/* --------------------------------------------------------------------------
   Page hero (apps, contact, 404)
   -------------------------------------------------------------------------- */

.page-hero { padding-block: clamp(44px, 7vw, 88px) clamp(28px, 4vw, 48px); }
.page-hero h1 { margin-top: 12px; font-size: clamp(40px, 6.4vw, 68px); line-height: 1.02; }
.page-hero .lede { margin-top: 18px; max-width: 46ch; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none;
  transition: border-color .15s, color .15s, background-color .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip .count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  background: var(--surface-2); font-size: 12px; color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   Apps page
   -------------------------------------------------------------------------- */

.category { padding-block: clamp(28px, 4vw, 44px); scroll-margin-top: calc(var(--header-h) + 8px); }
.category-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.category-head h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; font-size: clamp(24px, 3vw, 32px); }
.category-head p { color: var(--ink-3); font-size: 15px; }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr; } }

.app-card {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px;
  padding: clamp(20px, 2.6vw, 28px); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 16px);
  transition: box-shadow .2s, border-color .2s;
}
.app-card:target { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.app-card .app-icon { width: 88px; height: 88px; }
.app-card h3 { font-size: 20px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; padding-inline-end: 36px; }
.app-card .desc { margin-top: 8px; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.app-card .stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.share-btn {
  position: absolute; top: 14px; inset-inline-end: 14px;
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink-3); cursor: pointer;
}
.share-btn:hover { background: var(--surface-2); color: var(--ink); }
.share-btn svg { width: 18px; height: 18px; }
html:not(.js) .share-btn { display: none; }

.store-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px;
  padding: 8px 16px 8px 12px; border-radius: 12px;
  background: #0b0b0c; color: #fff; text-decoration: none;
  transition: transform .15s, background-color .15s;
}
.store-btn:hover { background: #26272b; }
.store-btn svg { width: 22px; height: 22px; flex: none; }
.store-btn span { display: grid; line-height: 1.1; }
.store-btn small { font-size: 10px; font-weight: 500; opacity: .8; letter-spacing: .02em; }
.store-btn strong { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
@media (prefers-color-scheme: dark) {
  .store-btn { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18); }
}

@media (max-width: 520px) {
  .app-card { grid-template-columns: 1fr; gap: 14px; }
  .app-card .app-icon { width: 72px; height: 72px; }
  .app-card .stores .store-btn { flex: 1 1 140px; justify-content: center; }
}

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; padding-bottom: clamp(64px, 9vw, 112px); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.panel {
  padding: clamp(24px, 3.5vw, 40px); border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line);
}
.panel h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -0.02em; }
.panel > p { margin-top: 10px; color: var(--ink-2); }

.email-box {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px;
  margin-top: 24px; padding: 16px 16px 16px 20px; border-radius: 16px;
  background: var(--surface-2);
}
.email-box .email { font-size: clamp(18px, 2.4vw, 22px); font-weight: 650; letter-spacing: -0.01em; word-break: break-word; }
.email-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.email-actions .btn { min-height: 42px; padding: 10px 16px; font-size: 14px; }

.checklist { list-style: none; margin-top: 24px; display: grid; gap: 12px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; color: var(--ink-2); }
.checklist svg { width: 24px; height: 24px; color: var(--accent); }

.link-list { list-style: none; margin-top: 18px; display: grid; gap: 8px; }
.link-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line);
  text-decoration: none; font-weight: 600;
  transition: border-color .15s, background-color .15s;
}
.link-list a:hover { border-color: var(--accent); background: var(--accent-soft); }
.link-list a span { display: grid; }
.link-list small { font-weight: 400; color: var(--ink-3); font-size: 14px; }
.link-list svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); }
[dir="rtl"] .link-list svg { transform: scaleX(-1); }

.company-meta { margin-top: 24px; font-size: 14px; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   Legal / document pages
   -------------------------------------------------------------------------- */

.doc-hero {
  padding-block: clamp(28px, 5vw, 56px) clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}
.doc-hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.08; margin-top: 18px; letter-spacing: -0.02em; font-weight: 700; }
.doc-hero h1.display { letter-spacing: -0.03em; }
.doc-updated { margin-top: 12px; color: var(--ink-3); font-size: 15px; }
.doc-updated strong { font-weight: 600; color: var(--ink-2); }

.doc-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.doc-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px;
  border-radius: 999px; background: var(--surface-2);
}
.doc-tabs a {
  padding: 8px 16px; border-radius: 999px; text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.doc-tabs a:hover { color: var(--ink); }
.doc-tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.lang-menu { position: relative; }
.lang-menu summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; list-style: none;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { border-color: var(--line-strong); color: var(--ink); }
.lang-menu .chev { transition: transform .15s; }
.lang-menu[open] .chev { transform: rotate(180deg); }
.lang-list {
  position: absolute; z-index: 40; top: calc(100% + 8px); inset-inline-end: 0;
  width: min(560px, calc(100vw - 2 * var(--gutter)));
  max-height: min(60vh, 460px); overflow: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px;
  padding: 8px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lg);
}
.lang-list a {
  display: block; padding: 9px 12px; border-radius: 10px;
  text-decoration: none; font-size: 14.5px; color: var(--ink-2);
}
.lang-list a:hover { background: var(--surface-2); color: var(--ink); }
.lang-list a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.doc-layout {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(28px, 5vw, 56px) clamp(64px, 9vw, 112px);
}
.doc-layout:not(:has(.doc-toc)) { grid-template-columns: minmax(0, 1fr); }

.toc-desktop { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; padding-bottom: 16px; }
.toc-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.doc-toc ol { list-style: none; display: grid; gap: 2px; }
.doc-toc a {
  display: block; padding: 6px 12px; border-radius: 8px;
  border-inline-start: 2px solid transparent;
  text-decoration: none; font-size: 14px; line-height: 1.4; color: var(--ink-3);
}
.doc-toc a:hover { color: var(--ink); background: var(--surface-2); }
.doc-toc a.is-active { color: var(--accent); border-inline-start-color: var(--accent); border-radius: 0 8px 8px 0; background: var(--accent-soft); }
[dir="rtl"] .doc-toc a.is-active { border-radius: 8px 0 0 8px; }

.toc-mobile { display: none; }

@media (max-width: 960px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .toc-desktop { display: none; }
  .toc-mobile {
    display: block; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  }
  .toc-mobile summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px; cursor: pointer; list-style: none; font-weight: 600;
  }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary::after {
    content: ""; width: 9px; height: 9px; margin-inline-start: auto;
    border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
    transform: rotate(45deg) translateY(-3px); transition: transform .15s;
  }
  .toc-mobile[open] summary::after { transform: rotate(225deg) translateY(-3px); }
  .toc-count { font-size: 12px; font-weight: 600; color: var(--ink-3); background: var(--surface-2); padding: 2px 8px; border-radius: 999px; }
  .toc-mobile ol { padding: 0 8px 12px; max-height: 50vh; overflow: auto; }
}

/* Long-form text */
.prose { max-width: 72ch; font-size: 16.5px; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1em; }
.prose h2 {
  margin-top: 2.4em; padding-top: 1.4em; border-top: 1px solid var(--line);
  font-size: clamp(20px, 2.2vw, 23px); line-height: 1.3; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin-top: 1.8em; font-size: 17.5px; font-weight: 650; color: var(--ink); line-height: 1.4; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose ul > li::marker { color: var(--accent); }
.prose ol > li::marker { color: var(--accent); font-weight: 700; }
.prose li > ul { margin-top: .4em; }

.prose .box {
  margin-block: 1.4em; padding: clamp(18px, 3vw, 26px) clamp(18px, 3vw, 28px);
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--accent);
}
.prose .box ol { padding-inline-start: 1.3em; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px;
  padding-block: 56px 40px;
}
.footer-brand p { margin-top: 14px; color: var(--ink-3); max-width: 36ch; font-size: 15px; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.footer-links h2 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.footer-links ul { list-style: none; margin-top: 14px; display: grid; gap: 4px; }
.footer-links a { display: inline-block; padding-block: 5px; text-decoration: none; color: var(--ink-2); font-size: 15px; }
.footer-links a:hover { color: var(--accent); }
.footer-base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  padding-block: 20px 28px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-3);
}

@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; gap: 32px; padding-block: 44px 28px; }
}

/* --------------------------------------------------------------------------
   Toast (share / copy feedback)
   -------------------------------------------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 90;
  transform: translateX(-50%);
  padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
}
.toast[hidden] { display: none; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.not-found { padding-block: clamp(80px, 14vw, 160px); text-align: center; }
.not-found .code { font-family: var(--font-display); font-size: clamp(80px, 16vw, 160px); font-weight: 800; letter-spacing: -0.05em; line-height: 1; color: var(--accent); }
.not-found h1 { margin-top: 12px; font-size: clamp(28px, 4vw, 40px); }
.not-found p { margin: 14px auto 0; max-width: 40ch; color: var(--ink-2); }
.not-found .hero-actions { justify-content: center; }
