/* ═══════════════════════════════════════════════════════════════════════════
   IndoHalal.id — design system
   Palette derived from the mark: deep emerald crescent resolving into a
   turquoise check. Green carries the Islamic and growth reading described in
   filosofi_logo.txt; the turquoise edge carries the digital, forward one.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Brand */
  --brand-900: #063D28;
  --brand-800: #0A5C3D;
  --brand-700: #0E7A52;
  --brand-600: #12946A;
  --brand-500: #17A67A;
  --brand-400: #2BC194;
  --brand-300: #5AD8B4;
  --brand-200: #9CE9D3;
  --brand-100: #D3F7EC;
  --brand-50:  #EDFCF7;

  --teal-600: #0FA894;
  --teal-500: #17C4AC;
  --teal-400: #23D6AE;
  --teal-300: #4FE7D4;

  --gradient-brand: linear-gradient(135deg, var(--brand-800) 0%, var(--brand-600) 45%, var(--teal-400) 100%);
  --gradient-soft: linear-gradient(135deg, var(--brand-50) 0%, #F2FDFA 100%);
  --gradient-shine: linear-gradient(120deg, transparent 20%, rgba(79, 231, 212, .28) 50%, transparent 80%);

  /* Neutrals — cool, faintly green-biased so they sit with the brand */
  --ink-900: #0C1A16;
  --ink-800: #14241F;
  --ink-700: #1F332C;
  --ink-600: #33463F;
  --ink-500: #4E635B;
  --ink-400: #6E837B;
  --ink-300: #98A9A2;
  --ink-200: #C4D0CB;
  --ink-100: #E3EAE7;
  --ink-50:  #F2F6F4;

  --surface: #FFFFFF;
  --surface-2: #F7FAF9;
  --surface-3: #EFF4F2;
  --surface-inset: #FBFDFC;
  --border: #E2EAE7;
  --border-strong: #CBD9D4;

  /* Semantic */
  --success: #17A67A;
  --success-bg: #E7F8F1;
  --warning: #B7791F;
  --warning-bg: #FDF6E3;
  --danger: #C0392B;
  --danger-bg: #FDECEA;
  --info: #1B6E9C;
  --info-bg: #E8F3FA;

  /* Type */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-arabic: 'Noto Naskh Arabic', 'Amiri', var(--font-sans);
  --font-cjk: 'Noto Sans SC', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Space */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.25rem; --sp-6: 1.5rem;  --sp-8: 2rem;    --sp-10: 2.5rem;
  --sp-12: 3rem;   --sp-16: 4rem;   --sp-20: 5rem;   --sp-24: 6rem;

  /* Radius & shadow */
  --r-sm: 6px;  --r-md: 10px;  --r-lg: 14px;  --r-xl: 20px;  --r-2xl: 28px;  --r-full: 999px;

  --shadow-xs: 0 1px 2px rgba(12, 26, 22, .05);
  --shadow-sm: 0 1px 3px rgba(12, 26, 22, .08), 0 1px 2px rgba(12, 26, 22, .04);
  --shadow-md: 0 4px 12px rgba(12, 26, 22, .08), 0 2px 4px rgba(12, 26, 22, .04);
  --shadow-lg: 0 12px 32px rgba(12, 26, 22, .10), 0 4px 8px rgba(12, 26, 22, .04);
  --shadow-xl: 0 24px 56px rgba(12, 26, 22, .14), 0 8px 16px rgba(12, 26, 22, .06);
  --shadow-brand: 0 12px 32px rgba(14, 122, 82, .22);

  --header-h: 72px;
  --container: 1200px;
  --transition: 180ms cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
  --surface: #0E1A16;
  --surface-2: #13221D;
  --surface-3: #1A2C26;
  --surface-inset: #101C18;
  --border: #22352E;
  --border-strong: #2E463D;

  --ink-900: #ECF3F0;
  --ink-800: #DDE8E4;
  --ink-700: #C6D5CF;
  --ink-600: #A7BAB3;
  --ink-500: #8B9F98;
  --ink-400: #71857E;
  --ink-300: #566862;
  --ink-200: #3A4B45;
  --ink-100: #26372F;
  --ink-50:  #1A2A24;

  --brand-50: #0F241C;
  --brand-100: #123024;
  --success-bg: #0F2C22;
  --warning-bg: #2C2411;
  --danger-bg: #2C1613;
  --info-bg: #10242F;

  --gradient-soft: linear-gradient(135deg, #0F241C 0%, #10262B 100%);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  --shadow-xl: 0 24px 56px rgba(0, 0, 0, .55);
}

/* ── Reset ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html[lang="ar"] body { font-family: var(--font-arabic); line-height: 1.9; }
html[lang="zh"] body { font-family: var(--font-cjk); }

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  color: var(--ink-900);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, var(--text-5xl)); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.6vw, var(--text-4xl)); }
h3 { font-size: clamp(1.25rem, 1.1rem + .7vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

p { text-wrap: pretty; }

a { color: var(--brand-700); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-600); }

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }

ul, ol { padding-inline-start: 1.25rem; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-8) 0; }

::selection { background: var(--brand-200); color: var(--brand-900); }

/* ── Layout ────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.container-narrow { max-width: 820px; }
.container-wide { max-width: 1400px; }

.main { flex: 1 0 auto; }

.section { padding-block: clamp(3rem, 2rem + 5vw, var(--sp-24)); }
.section-sm { padding-block: clamp(2rem, 1.5rem + 3vw, var(--sp-16)); }
.section-tint { background: var(--surface-2); }
.section-soft { background: var(--gradient-soft); }

.stack { display: flex; flex-direction: column; }
.stack-1 { gap: var(--sp-1); } .stack-2 { gap: var(--sp-2); }
.stack-3 { gap: var(--sp-3); } .stack-4 { gap: var(--sp-4); }
.stack-5 { gap: var(--sp-5); } .stack-6 { gap: var(--sp-6); }
.stack-8 { gap: var(--sp-8); } .stack-10 { gap: var(--sp-10); }
.stack-12 { gap: var(--sp-12); }

.row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.row-tight { gap: var(--sp-2); }
.row-nowrap { flex-wrap: nowrap; }

.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 320px; }

@media (max-width: 960px) {
  .grid-sidebar { grid-template-columns: 1fr; }
}

.spacer { flex: 1; }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.hide { display: none !important; }

@media (max-width: 768px) { .hide-mobile { display: none !important; } }
@media (min-width: 769px) { .hide-desktop { display: none !important; } }

/* ── Type helpers ──────────────────────────────────────────────────────── */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--brand-600);
}

.lead { font-size: clamp(1.0625rem, 1rem + .35vw, var(--text-xl)); color: var(--ink-500); line-height: 1.6; }
.muted { color: var(--ink-400); }
.small { font-size: var(--text-sm); }
.tiny { font-size: var(--text-xs); }
.strong { font-weight: 700; color: var(--ink-900); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.nums { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head { max-width: 720px; margin-bottom: var(--sp-10); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-block: var(--sp-3) var(--sp-3); }

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: .7rem 1.35rem;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn:active { transform: translateY(0) scale(.985); }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 16px 36px rgba(14, 122, 82, .3); }
.btn-primary:active { transform: translateY(0); }

.btn-solid { background: var(--brand-700); color: #fff; }
.btn-solid:hover { background: var(--brand-800); color: #fff; }

.btn-outline { border-color: var(--border-strong); color: var(--ink-700); background: var(--surface); }
.btn-outline:hover { border-color: var(--brand-500); color: var(--brand-700); background: var(--brand-50); }

.btn-ghost { color: var(--ink-600); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink-900); }

.btn-light { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .3); backdrop-filter: blur(8px); }
.btn-light:hover { background: rgba(255, 255, 255, .26); color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #A93226; color: #fff; }

.btn-sm { padding: .45rem .9rem; font-size: var(--text-xs); }
.btn-lg { padding: .95rem 1.9rem; font-size: var(--text-base); }
.btn-block { width: 100%; }
.btn-icon { padding: .55rem; width: 2.4rem; height: 2.4rem; border-radius: var(--r-full); }

/* ── Cards ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
}

.card-flat { border-radius: var(--r-lg); background: var(--surface-2); padding: var(--sp-6); }

.card-hover { transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-200); }

.card-media { padding: 0; overflow: hidden; }
.card-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-media .card-body { padding: var(--sp-5); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.panel-head {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap;
}
.panel-head h3, .panel-head h2 { font-size: var(--text-base); margin: 0; }
.panel-body { padding: var(--sp-5); }
.panel-foot { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border); background: var(--surface-2); }

/* ── Badges & chips ────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .22em .7em;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.5;
  background: var(--surface-3);
  color: var(--ink-600);
  white-space: nowrap;
}
.badge-brand { background: var(--brand-100); color: var(--brand-800); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); }
.badge-dot::before { content: ''; width: .45em; height: .45em; border-radius: 50%; background: currentColor; }

.chip {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: .4rem .85rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-600);
  background: var(--surface);
  transition: all var(--transition);
}
.chip:hover { border-color: var(--brand-400); color: var(--brand-700); }
.chip.is-active { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

/* A chip wrapping a radio/checkbox — e.g. topic pickers, rating pills.
   The whole pill highlights when selected instead of relying on a bare
   native control to carry the state. */
.chip input[type="checkbox"], .chip input[type="radio"] { width: 1rem; height: 1rem; }
.chip:has(input:checked) { background: var(--brand-50); border-color: var(--brand-600); color: var(--brand-800); }
.chip:has(input:disabled) { opacity: .5; cursor: not-allowed; }

/* A full-width row wrapping a radio/checkbox — e.g. payment method picker. */
.option-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--transition);
}
.option-row:hover { border-color: var(--brand-400); }
.option-row:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); }
.option-row:has(input:disabled) { opacity: .45; cursor: not-allowed; }

/* ── Forms ─────────────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: var(--sp-2); }

.label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-700);
  display: flex; align-items: center; gap: var(--sp-2);
}
.label .req { color: var(--danger); }
.label .opt { color: var(--ink-400); font-weight: 500; font-size: var(--text-xs); }

.input, .select, .textarea {
  width: 100%;
  padding: .7rem .9rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink-800);
  font-size: var(--text-sm);
  box-shadow: 0 1px 2px rgba(12, 26, 22, .04);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-300); }

.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-300); }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.input:disabled, .select:disabled, .textarea:disabled {
  background: var(--surface-3);
  border-color: var(--border);
  color: var(--ink-400);
  box-shadow: none;
  cursor: not-allowed;
}

.textarea { resize: vertical; min-height: 7rem; line-height: 1.6; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E837B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  padding-inline-end: 2.4rem;
}
[dir="rtl"] .select { background-position: left .8rem center; padding-inline-end: .9rem; padding-inline-start: 2.4rem; }

.hint { font-size: var(--text-xs); color: var(--ink-400); }
.error-text { font-size: var(--text-xs); color: var(--danger); font-weight: 600; }

/* Custom checkbox/radio — consistent look across browsers, everywhere in the
   app (not just inside .check), since accent-color alone renders too
   differently between Chrome/Firefox/Safari to read as "one design". */
input[type="checkbox"], input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 1.15rem; height: 1.15rem; flex-shrink: 0; margin: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background-color: var(--surface);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 62%;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
input[type="radio"] { border-radius: var(--r-full); }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--brand-500); }
input[type="checkbox"]:checked, input[type="radio"]:checked {
  border-color: var(--brand-700);
  background-color: var(--brand-700);
}
input[type="checkbox"]:checked:hover, input[type="radio"]:checked:hover { background-color: var(--brand-800); border-color: var(--brand-800); }
input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.3l3 3 6-6.6'/%3E%3C/svg%3E");
}
input[type="radio"]:checked { background-image: radial-gradient(circle, #fff 32%, transparent 34%); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .5; cursor: not-allowed; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

.check {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  font-size: var(--text-sm); cursor: pointer; line-height: 1.5;
}
.check input[type="checkbox"], .check input[type="radio"] { margin-top: .18rem; }

.switch { display: inline-flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 2.6rem; height: 1.45rem; border-radius: var(--r-full);
  background: var(--ink-200); position: relative; transition: background var(--transition); flex-shrink: 0;
}
.switch-track::after {
  content: ''; position: absolute; inset-inline-start: 3px; top: 3px;
  width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #fff;
  transition: transform var(--transition); box-shadow: var(--shadow-xs);
}
.switch input:checked + .switch-track { background: var(--brand-600); }
.switch input:checked + .switch-track::after { transform: translateX(1.15rem); }
[dir="rtl"] .switch input:checked + .switch-track::after { transform: translateX(-1.15rem); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--brand-500); outline-offset: 2px; }

.input-group { display: flex; }
.input-group .input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group .btn { border-start-start-radius: 0; border-end-start-radius: 0; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-5); }

/* ── Tables ────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }

.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th, .table td { padding: .8rem 1rem; text-align: start; vertical-align: middle; }
.table thead th {
  background: var(--surface-2);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-500);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table tbody tr { border-bottom: 1px solid var(--border); }
.table tbody tr:last-child { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table td.nums, .table th.nums { text-align: end; font-variant-numeric: tabular-nums; }

/* ── Alerts ────────────────────────────────────────────────────────────── */

.alert {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  border-inline-start: 3px solid;
  line-height: 1.55;
}
.alert-success { background: var(--success-bg); border-color: var(--success); color: #0B5A40; }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); color: #7A5410; }
.alert-danger { background: var(--danger-bg); border-color: var(--danger); color: #8E2B20; }
.alert-info { background: var(--info-bg); border-color: var(--info); color: #14536F; }

[data-theme="dark"] .alert-success { color: var(--brand-300); }
[data-theme="dark"] .alert-warning { color: #E5C67C; }
[data-theme="dark"] .alert-danger { color: #E89A90; }
[data-theme="dark"] .alert-info { color: #8FC5E0; }

.flash-stack {
  position: fixed;
  top: calc(var(--header-h) + var(--sp-4));
  inset-inline-end: var(--sp-4);
  z-index: 200;
  display: flex; flex-direction: column; gap: var(--sp-3);
  max-width: min(420px, calc(100vw - 2rem));
}
.flash-stack .alert { box-shadow: var(--shadow-lg); background-color: var(--surface); }

/* ── Header ────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); border-bottom-color: transparent; }
[data-theme="dark"] .site-header { background: rgba(14, 26, 22, .88); }

.site-header .container { height: 100%; display: flex; align-items: center; gap: var(--sp-6); }

.brand { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }
.brand img { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.075rem; color: var(--ink-900); letter-spacing: -.02em; }
.brand-tag { font-size: .65rem; color: var(--ink-400); font-weight: 600; letter-spacing: .04em; }

/* Logo chip — the transparent mark sits on a light tile so it stays legible
   on dark or gradient surfaces (sidebar, footer, auth aside, dark mode). */
.logo-chip {
  display: inline-grid; place-items: center; flex-shrink: 0;
  background: #fff;
  padding: 4px;
  border-radius: var(--r-md);
  box-shadow: 0 0 0 1px rgba(12, 26, 22, .07), var(--shadow-xs);
}
.logo-chip > img { display: block; }
.logo-chip-lg { padding: 10px; border-radius: var(--r-lg); }
.logo-chip-xl { padding: var(--sp-4); border-radius: var(--r-2xl); }

.nav { display: flex; align-items: center; gap: var(--sp-1); }
.nav a {
  padding: .5rem .8rem;
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-600);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav a:hover { background: var(--surface-3); color: var(--ink-900); }
.nav a.is-active { color: var(--brand-700); background: var(--brand-50); }

/* ── Consultant feature card (a lone consultant on the home page) ───────── */
.consultant-feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: center;
  text-decoration: none;
}
@media (max-width: 640px) {
  /* Side by side leaves the text a sliver on a phone — stack instead. */
  .consultant-feature { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .consultant-feature .row { justify-content: center; }
}

/* ── Header nav dropdown (submenu) ──────────────────────────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .5rem .8rem;
  border: 0; background: none; cursor: pointer;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-600);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-dropdown-btn svg { transition: transform var(--transition); }
.nav-dropdown-btn:hover { background: var(--surface-3); color: var(--ink-900); }
.nav-dropdown-btn.is-active { color: var(--brand-700); background: var(--brand-50); }
.nav-dropdown-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0;
  min-width: 210px; padding: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  display: none; z-index: 120;
}
.nav-dropdown-menu.is-open { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: .55rem .7rem; border-radius: var(--r-sm);
  font-size: var(--text-sm); font-weight: 600; color: var(--ink-700);
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--surface-3); }
.nav-dropdown-menu a.is-active { background: var(--brand-50); color: var(--brand-700); }

.mobile-nav-group {
  display: block; margin-top: var(--sp-3);
  padding: var(--sp-2) var(--sp-2) 0;
  font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-400);
}
.mobile-nav a.mobile-nav-sub {
  padding-inline-start: var(--sp-5);
  font-size: var(--text-base); font-weight: 500;
}

.header-actions { display: flex; align-items: center; gap: var(--sp-2); margin-inline-start: auto; }

.nav-toggle { display: none; }

/* The full nav has to fit brand + links + actions, two 24px flex gaps and the
   container's own padding. In English — the longest labels of the four
   locales — that is ~1240px, so collapsing only at 1080px left a whole band of
   laptop and tablet-landscape widths where the header pushed past the
   container and the page grew a horizontal scrollbar. Collapse while it still
   fits, and tighten the link padding below the roomiest widths so one extra
   menu item does not bring the overflow straight back. */
@media (max-width: 1400px) {
  .nav a, .nav-dropdown-btn { padding-inline: .58rem; }
  .nav { gap: 0; }
}
@media (max-width: 1260px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
}

.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
  background: var(--surface);
  padding: var(--sp-6) var(--sp-5) var(--sp-12);
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
.mobile-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-nav a {
  display: block; padding: var(--sp-4) var(--sp-2);
  border-bottom: 1px solid var(--border);
  font-weight: 600; color: var(--ink-700); font-size: var(--text-lg);
}
.mobile-nav a:hover { color: var(--brand-700); }

/* ── Language switcher ─────────────────────────────────────────────────── */

.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: .45rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: var(--text-sm); font-weight: 600; color: var(--ink-600);
  background: var(--surface);
  transition: all var(--transition);
}
.lang-btn:hover { border-color: var(--brand-400); color: var(--brand-700); }

.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  min-width: 190px; padding: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  display: none; z-index: 120;
}
.lang-menu.is-open { display: block; }
.lang-menu a {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: .55rem .7rem; border-radius: var(--r-sm);
  font-size: var(--text-sm); font-weight: 600; color: var(--ink-700);
}
.lang-menu a:hover { background: var(--surface-3); }
.lang-menu a.is-active { background: var(--brand-50); color: var(--brand-700); }
.lang-menu .flag { font-size: 1.05rem; }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-block: clamp(3rem, 2rem + 6vw, 6.5rem);
  background: var(--gradient-soft);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset-inline-end: -12%; top: -30%;
  width: 60vw; height: 60vw; max-width: 780px; max-height: 780px;
  background: radial-gradient(circle, rgba(35, 214, 174, .18) 0%, transparent 65%);
  pointer-events: none;
}
.hero .container { position: relative; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: var(--sp-12); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: var(--sp-8); } }

.hero h1 { margin-block: var(--sp-4) var(--sp-5); }
.hero .lead { margin-bottom: var(--sp-8); max-width: 56ch; }

.hero-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: var(--sp-5); font-size: var(--text-sm); color: var(--ink-400); display: flex; align-items: center; gap: var(--sp-2); }

.hero-visual { position: relative; display: grid; place-items: center; }
.hero-visual .logo-chip {
  width: min(100%, 412px);
  padding: var(--sp-4);
  border-radius: var(--r-2xl);
  filter: drop-shadow(0 24px 48px rgba(14, 122, 82, .22));
}
.hero-visual img { width: 100%; height: auto; }

/* ── Countdown ─────────────────────────────────────────────────────────── */

.countdown {
  display: inline-flex; gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--brand-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.countdown-unit { text-align: center; min-width: 54px; }
.countdown-value {
  font-size: var(--text-2xl); font-weight: 800; color: var(--brand-700);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.countdown-label { font-size: var(--text-xs); color: var(--ink-400); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* ── Stats ─────────────────────────────────────────────────────────────── */

.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-6);
  padding: var(--sp-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}
.stat { text-align: center; }
.stat-value {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, var(--text-4xl));
  font-weight: 800; line-height: 1.1;
  background: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: var(--text-sm); color: var(--ink-400); font-weight: 600; margin-top: var(--sp-1); }

/* ── Feature / service cards ───────────────────────────────────────────── */

.feature-card {
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: all var(--transition);
  height: 100%;
}
.feature-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.feature-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-700);
  flex-shrink: 0;
}
.feature-card h3 { font-size: var(--text-lg); }
.feature-card p { color: var(--ink-500); font-size: var(--text-sm); flex: 1; }

.feature-link { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 700; font-size: var(--text-sm); }
.feature-link svg { transition: transform var(--transition); }
.feature-card:hover .feature-link svg { transform: translateX(3px); }
[dir="rtl"] .feature-card:hover .feature-link svg { transform: translateX(-3px) scaleX(-1); }
[dir="rtl"] .feature-link svg { transform: scaleX(-1); }

/* ── Process steps ─────────────────────────────────────────────────────── */

.steps { counter-reset: step; display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { position: relative; padding-top: var(--sp-8); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; inset-inline-start: 0;
  font-size: var(--text-sm); font-weight: 800;
  color: var(--brand-500); font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}
.step::after {
  content: ''; position: absolute; top: 10px; inset-inline-start: 34px; inset-inline-end: 0;
  height: 1px; background: linear-gradient(90deg, var(--brand-200), transparent);
}
.step:last-child::after { display: none; }
.step h3 { font-size: var(--text-base); margin-bottom: var(--sp-2); }
.step p { font-size: var(--text-sm); color: var(--ink-500); }

/* ── Article cards ─────────────────────────────────────────────────────── */

.article-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--transition);
  height: 100%;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-200); }

.article-thumb {
  aspect-ratio: 16 / 9;
  background: var(--gradient-brand);
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
}
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-thumb .placeholder { opacity: .25; }

.article-body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.article-body h3 { font-size: var(--text-lg); line-height: 1.35; }
.article-body h3 a { color: var(--ink-900); }
.article-body h3 a:hover { color: var(--brand-700); }
.article-meta { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--text-xs); color: var(--ink-400); margin-top: auto; }

/* ── Prose ─────────────────────────────────────────────────────────────── */

.prose { font-size: 1.0625rem; line-height: 1.8; color: var(--ink-600); max-width: 72ch; }
.prose > * + * { margin-top: var(--sp-5); }
.prose h2 { font-size: var(--text-2xl); margin-top: var(--sp-10); color: var(--ink-900); }
.prose h3 { font-size: var(--text-xl); margin-top: var(--sp-8); color: var(--ink-900); }
.prose h4 { font-size: var(--text-lg); margin-top: var(--sp-6); }
.prose ul, .prose ol { padding-inline-start: 1.4rem; }
.prose li + li { margin-top: var(--sp-2); }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose strong { color: var(--ink-900); font-weight: 700; }
.prose blockquote {
  border-inline-start: 3px solid var(--brand-400);
  padding-inline-start: var(--sp-5);
  color: var(--ink-500); font-style: italic;
}
.prose code {
  font-family: var(--font-mono); font-size: .875em;
  background: var(--surface-3); padding: .15em .4em; border-radius: var(--r-sm);
}
.prose pre { background: var(--ink-900); color: var(--ink-50); padding: var(--sp-5); border-radius: var(--r-md); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose img { border-radius: var(--r-md); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.prose th, .prose td { padding: .65rem .8rem; border: 1px solid var(--border); text-align: start; }
.prose thead th { background: var(--surface-2); font-weight: 700; color: var(--ink-800); }
.prose hr { margin-block: var(--sp-8); }

.prose-wrap { overflow-x: auto; }

/* ── Accordion ─────────────────────────────────────────────────────────── */

.accordion { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.accordion details { border-bottom: 1px solid var(--border); }
.accordion details:last-child { border-bottom: 0; }
.accordion summary {
  padding: var(--sp-5);
  font-weight: 700; color: var(--ink-900); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  list-style: none; transition: background var(--transition);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { background: var(--surface-2); }
.accordion summary::after {
  content: ''; width: 10px; height: 10px; flex-shrink: 0;
  border-inline-end: 2px solid var(--ink-400); border-block-end: 2px solid var(--ink-400);
  transform: rotate(45deg); transition: transform var(--transition); margin-top: -4px;
}
.accordion details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.accordion .accordion-body { padding: 0 var(--sp-5) var(--sp-5); color: var(--ink-500); font-size: var(--text-sm); line-height: 1.75; }

/* ── Pagination ────────────────────────────────────────────────────────── */

.pagination { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-10); }
.pagination a, .pagination span {
  min-width: 2.4rem; height: 2.4rem;
  display: inline-flex; align-items: center; justify-content: center;
  padding-inline: .6rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--text-sm); font-weight: 600; color: var(--ink-600);
  font-variant-numeric: tabular-nums;
}
.pagination a:hover { border-color: var(--brand-400); color: var(--brand-700); background: var(--brand-50); }
.pagination .is-active { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* ── Empty state ───────────────────────────────────────────────────────── */

.empty { text-align: center; padding: var(--sp-16) var(--sp-5); color: var(--ink-400); }
.empty svg { margin: 0 auto var(--sp-4); opacity: .35; }
.empty h3 { color: var(--ink-600); font-size: var(--text-lg); margin-bottom: var(--sp-2); }

/* ── Breadcrumb ────────────────────────────────────────────────────────── */

.crumbs { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--text-xs); color: var(--ink-400); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.crumbs a { color: var(--ink-500); font-weight: 600; }
.crumbs a:hover { color: var(--brand-700); }
.crumbs .sep { opacity: .5; }

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer { background: var(--ink-900); color: var(--ink-200); padding-block: var(--sp-16) var(--sp-6); margin-top: auto; }
[data-theme="dark"] .site-footer { background: #08120F; border-top: 1px solid var(--border); }

.footer-grid { display: grid; grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(140px, 1fr)); gap: var(--sp-8); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h4 { color: #fff; font-size: var(--text-sm); text-transform: uppercase; letter-spacing: .07em; margin-bottom: var(--sp-4); }
.site-footer a { color: var(--ink-300); font-size: var(--text-sm); }
.site-footer a:hover { color: var(--brand-300); }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: var(--ink-400); }

.footer-bottom {
  margin-top: var(--sp-12); padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
  font-size: var(--text-xs); color: var(--ink-400);
}

.social-row { display: flex; gap: var(--sp-3); }
.social-row a {
  width: 36px; height: 36px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .07);
  color: var(--ink-200);
  transition: all var(--transition);
}
.social-row a:hover { background: var(--brand-600); color: #fff; }

/* ── Chat widget ───────────────────────────────────────────────────────── */

.chat-fab {
  position: fixed; inset-block-end: var(--sp-6); inset-inline-end: var(--sp-6); z-index: 90;
  width: 56px; height: 56px; border-radius: var(--r-full);
  background: var(--gradient-brand); color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow-brand);
  transition: transform var(--transition);
}
.chat-fab:hover { transform: scale(1.06); color: #fff; }
.chat-fab .dot {
  position: absolute; top: 2px; inset-inline-end: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--teal-300); border: 2px solid var(--surface);
}

.chat-panel {
  position: fixed; inset-block-end: calc(var(--sp-6) + 68px); inset-inline-end: var(--sp-6); z-index: 91;
  width: min(380px, calc(100vw - 2rem));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: none;
}
.chat-panel.is-open { display: block; }
.chat-panel-head { padding: var(--sp-5); background: var(--gradient-brand); color: #fff; }
.chat-panel-head h4 { color: #fff; font-size: var(--text-base); }
.chat-panel-head p { font-size: var(--text-xs); opacity: .88; margin-top: 2px; }
.chat-panel-body { padding: var(--sp-5); max-height: 60vh; overflow-y: auto; }

/* ── Chat thread ───────────────────────────────────────────────────────── */

.thread { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-5); }

.msg { display: flex; gap: var(--sp-3); max-width: 78%; }
.msg-avatar {
  width: 34px; height: 34px; border-radius: var(--r-full); flex-shrink: 0;
  background: var(--brand-100); color: var(--brand-700);
  display: grid; place-items: center; font-weight: 700; font-size: var(--text-xs);
  overflow: hidden;
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-bubble {
  padding: .7rem 1rem;
  border-radius: var(--r-lg);
  background: var(--surface-3);
  font-size: var(--text-sm);
  line-height: 1.6;
  word-break: break-word;
}
.msg-time { font-size: var(--text-xs); color: var(--ink-400); margin-top: var(--sp-1); }

.msg.is-mine { margin-inline-start: auto; flex-direction: row-reverse; }
.msg.is-mine .msg-bubble { background: var(--brand-700); color: #fff; }
.msg.is-mine .msg-time { text-align: end; }
.msg.is-system { max-width: 100%; justify-content: center; }
.msg.is-system .msg-bubble {
  background: var(--warning-bg); color: var(--warning);
  font-size: var(--text-xs); text-align: center; border-radius: var(--r-full);
}
.msg.is-internal .msg-bubble { background: var(--warning-bg); border: 1px dashed var(--warning); color: var(--ink-700); }

.msg-attachment {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-2); padding: var(--sp-2) var(--sp-3);
  background: rgba(0, 0, 0, .06); border-radius: var(--r-md);
  font-size: var(--text-xs); font-weight: 600;
}
.msg-attachment img { border-radius: var(--r-sm); max-height: 200px; }

.composer {
  display: flex; gap: var(--sp-3); align-items: flex-end;
  padding: var(--sp-4);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.composer .textarea { min-height: 2.7rem; max-height: 9rem; resize: none; }

.typing { font-size: var(--text-xs); color: var(--brand-600); font-style: italic; padding-inline: var(--sp-5); height: 1.2rem; }

/* ── Price cards ───────────────────────────────────────────────────────── */

.price-card {
  display: flex; flex-direction: column; gap: var(--sp-5);
  padding: var(--sp-6);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  position: relative;
  height: 100%;
}
.price-card.is-popular { border-color: var(--brand-500); box-shadow: var(--shadow-lg); }
.price-card .ribbon {
  position: absolute; top: -11px; inset-inline-start: var(--sp-6);
  padding: .2rem .7rem; border-radius: var(--r-full);
  background: var(--gradient-brand); color: #fff;
  font-size: var(--text-xs); font-weight: 700;
}
.price-value { font-size: var(--text-3xl); font-weight: 800; color: var(--ink-900); font-variant-numeric: tabular-nums; line-height: 1.1; }
.price-unit { font-size: var(--text-sm); color: var(--ink-400); font-weight: 600; }
.price-features { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; font-size: var(--text-sm); }
.price-features li { display: flex; gap: var(--sp-3); align-items: flex-start; color: var(--ink-600); }
.price-features svg { color: var(--brand-600); flex-shrink: 0; margin-top: 3px; }

/* ── Mobile app download ───────────────────────────────────────────────── */

.app-download { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--sp-10); align-items: center; }
.app-download-badges { display: flex; flex-wrap: wrap; gap: var(--sp-4); }

/* The badges are supplied artwork whose proportions are fixed by Google's
   and Apple's brand rules — height is pinned and width follows, so the two
   always line up regardless of the source files' pixel dimensions. */
.store-badge { display: inline-block; border-radius: 10px; transition: transform var(--transition), box-shadow var(--transition); }
.store-badge img { display: block; height: 52px; width: auto; border-radius: 10px; }
.store-badge:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

@media (max-width: 860px) {
  .app-download { grid-template-columns: 1fr; gap: var(--sp-8); }
}
@media (max-width: 420px) {
  .store-badge img { height: 46px; }
}

/* ── Map ───────────────────────────────────────────────────────────────── */

.map { height: 380px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface-3); }
.map-sm { height: 220px; }
.map-lg { height: 520px; }
.leaflet-container { font-family: var(--font-sans); }

/* ── Utility ───────────────────────────────────────────────────────────── */

.divider { height: 1px; background: var(--border); }
.avatar {
  width: 40px; height: 40px; border-radius: var(--r-full);
  background: var(--brand-100); color: var(--brand-700);
  display: grid; place-items: center; font-weight: 700; font-size: var(--text-sm);
  overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: var(--text-lg); }
.avatar-sm { width: 30px; height: 30px; font-size: var(--text-xs); }

.dot-online { width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: inline-block; }
.dot-offline { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-300); display: inline-block; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-md);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: var(--sp-2); z-index: 999;
  padding: var(--sp-3) var(--sp-5); background: var(--brand-700); color: #fff;
  border-radius: var(--r-md); font-weight: 700;
}
.skip-link:focus { inset-inline-start: var(--sp-4); color: #fff; }

/* ── Phone refinements ─────────────────────────────────────────────────────
   Everything above already reflows to one column on a narrow screen, which is
   correct but not finished: short cards ended up one-per-row, so the home page
   ran to roughly twenty phone-screens of scrolling, and the header controls
   were 38px in a 44px world. These rules are opt-in and narrow on purpose —
   they must not touch cards whose text needs the full width.
   ------------------------------------------------------------------------ */

/* Touch targets. 44px is the smallest size that is reliably hittable with a
   thumb (iOS HIG, and WCAG 2.5.8 at AAA). The header controls are the ones
   used on every page, so they get the real size rather than a nudge. */
@media (pointer: coarse) {
  .btn { min-height: 2.75rem; }
  .btn-icon { width: 2.75rem; height: 2.75rem; }
  .lang-btn { min-height: 2.75rem; }
  .feature-link { min-height: 2.75rem; }
  /* Category filters are how you navigate a listing on a phone. */
  .chip { min-height: 2.75rem; }
  /* Category chips stay visually small — making them 44px tall would wreck the
     card rhythm — but gain enough padding to clear the 24px WCAG 2.5.8 (AA)
     floor comfortably. They are secondary links next to a full-width title. */
  .badge[href] { padding-block: .5em; }

  /* The label is the tap target for a checkbox, so the row needs the height —
     an 18px box on a 21px line is a miss waiting to happen, and the simulator
     is a form people fill in on a phone. */
  .check { min-height: 2.75rem; padding-block: var(--sp-2); }
  .check input[type="checkbox"],
  .check input[type="radio"] { width: 1.2rem; height: 1.2rem; margin-top: .1rem; }
}

@media (max-width: 640px) {
  /* Four stats, one per row, was ~400px of scrolling for four numbers. */
  .stat-strip {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-5);
    padding: var(--sp-6) var(--sp-4);
  }

  /* Opt-in: two columns for grids whose cards are genuinely short (a label
     and a line of text). Applied in the templates, never globally. */
  .grid-phone-2 {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3);
  }
  .grid-phone-2 > .card { padding: var(--sp-4); }

  /* The three footer link columns are short lists; stacking all of them made
     the footer taller than the content above it. Keep them two-up and let the
     brand block span the full width. */
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }

  /* 10.4px is too small to read comfortably at arm's length on a phone. */
  .brand-tag { font-size: .75rem; }

  /* The hero mark is decorative and repeats the logo already in the header
     40px above it. At 412px it was costing most of a screen of scrolling for
     no information; keep it as a visual anchor at a quarter of the area. */
  .hero-visual .logo-chip { width: min(100%, 180px); padding: var(--sp-2); }
}

/* ── Confirm modal ─────────────────────────────────────────────────────────
   Replaces window.confirm() for every form[data-confirm] site-wide (see
   initConfirmModal in app.js) — one native browser dialog, styled once,
   used everywhere: logout, delete, cancel subscription, mark paid, and
   every other destructive action already wired to data-confirm. ────────── */

.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(12, 26, 22, .5);
  backdrop-filter: blur(2px);
  display: grid; place-items: center;
  padding: var(--sp-5);
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }

.modal-card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--sp-6);
  transform: translateY(8px) scale(.98);
  transition: transform var(--transition);
}
.modal-overlay.is-open .modal-card { transform: none; }

.modal-icon {
  width: 44px; height: 44px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--danger-bg); color: var(--danger);
  margin-bottom: var(--sp-4);
}
.modal-icon.is-neutral { background: var(--brand-50); color: var(--brand-700); }

.modal-card h3 { font-size: var(--text-lg); margin-bottom: var(--sp-2); }
.modal-card p { font-size: var(--text-sm); color: var(--ink-600); line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--sp-3); margin-top: var(--sp-6); }

/* ═══════════════════════════════════════════════════════════════════════════
   MOTION LAYER
   Everything below is decoration. Two rules keep it from becoming a
   liability: it only ever animates `transform`/`opacity`/`filter` (the
   properties the compositor can handle without relayout), and every piece
   degrades to a plain static page — see the `prefers-reduced-motion` and
   no-JS notes on each block.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Animated hero backdrop ────────────────────────────────────────────── */

/* Three slow-drifting colour fields. They sit behind the hero's own content
   (z-index/isolation on .hero .container) and never intercept pointer
   events. `filter: blur()` on a large element is expensive to repaint, so
   the blobs are given their own compositor layer and only ever transformed
   — never resized — after the initial paint. */
.hero-aurora {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero-aurora span {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
  will-change: transform;
}
.hero-aurora span:nth-child(1) {
  width: 46vw; height: 46vw; max-width: 560px; max-height: 560px;
  top: -14%; inset-inline-start: -8%;
  background: radial-gradient(circle, rgba(35, 214, 174, .55) 0%, rgba(35, 214, 174, 0) 70%);
  animation: aurora-a 22s ease-in-out infinite;
}
.hero-aurora span:nth-child(2) {
  width: 40vw; height: 40vw; max-width: 480px; max-height: 480px;
  bottom: -20%; inset-inline-end: -6%;
  background: radial-gradient(circle, rgba(18, 148, 106, .45) 0%, rgba(18, 148, 106, 0) 70%);
  animation: aurora-b 26s ease-in-out infinite;
}
.hero-aurora span:nth-child(3) {
  width: 34vw; height: 34vw; max-width: 420px; max-height: 420px;
  top: 24%; inset-inline-end: 22%;
  background: radial-gradient(circle, rgba(79, 231, 212, .40) 0%, rgba(79, 231, 212, 0) 70%);
  animation: aurora-c 19s ease-in-out infinite;
}
[data-theme="dark"] .hero-aurora span { opacity: .34; }

@keyframes aurora-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(8%, 12%, 0) scale(1.12); }
  66%      { transform: translate3d(-6%, 6%, 0) scale(.94); }
}
@keyframes aurora-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  40%      { transform: translate3d(-10%, -14%, 0) scale(1.15); }
  75%      { transform: translate3d(5%, -5%, 0) scale(.92); }
}
@keyframes aurora-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-12%, 10%, 0) scale(1.18); }
}

/* Faint grid, masked so it fades out before it reaches the text. */
.hero-grid-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(14, 122, 82, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 122, 82, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 75%);
  animation: grid-drift 40s linear infinite;
}
[data-theme="dark"] .hero-grid-overlay {
  background-image:
    linear-gradient(rgba(90, 216, 180, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 216, 180, .05) 1px, transparent 1px);
}
@keyframes grid-drift {
  to { background-position: 56px 56px, 56px 56px; }
}

/* The hero's own children have to sit above both layers. */
.hero .container { z-index: 1; }

/* ── Scroll reveal ─────────────────────────────────────────────────────── */

/* The hidden state is deliberately gated behind `.js-motion` on <html>,
   which app.js sets synchronously before first paint. Without JS (or if the
   script fails) the class never lands, the rule never applies, and every
   revealed element just renders normally — content is never trapped behind
   an animation that will not run. */
/* A `left`/`right` reveal rests translated sideways until it is scrolled to,
   and an element parked off the right edge widens the document — the page
   picks up a horizontal scrollbar for as long as that reveal is pending.
   `clip` contains it; `hidden` would too, but `hidden` also turns this into
   a scroll container, which silently breaks `position: sticky` descendants
   (the service-detail sidebar is one). `clip` creates no scrollport, and
   pairs with a visible vertical axis — which matters here, because the
   stats strip is deliberately pulled up past the hero's bottom edge. */
.js-motion main { overflow-x: clip; }

.js-motion [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
  will-change: opacity, transform;
}
.js-motion [data-reveal="left"]  { transform: translate3d(-28px, 0, 0); }
.js-motion [data-reveal="right"] { transform: translate3d(28px, 0, 0); }
.js-motion [data-reveal="zoom"]  { transform: scale(.94); }
.js-motion [data-reveal="fade"]  { transform: none; }

.js-motion [data-reveal].is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: auto;
}

/* ── Micro-interactions ────────────────────────────────────────────────── */

/* Light sweep across primary buttons on hover. */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
.btn-primary:hover::after { transform: translateX(120%); }

/* Cards lift a little further and pick up a brand-tinted glow. */
.feature-card, .article-card, .price-card {
  transition: transform .35s cubic-bezier(.16, 1, .3, 1),
              box-shadow .35s cubic-bezier(.16, 1, .3, 1),
              border-color var(--transition);
}
.feature-card:hover, .article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(14, 122, 82, .14), 0 4px 10px rgba(12, 26, 22, .05);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* The icon tile reacts too, so the whole card feels like one object. */
.feature-icon { transition: transform .35s cubic-bezier(.16, 1, .3, 1), background var(--transition), color var(--transition); }
.feature-card:hover .feature-icon {
  transform: translateY(-2px) rotate(-4deg) scale(1.06);
  background: var(--gradient-brand);
  color: #fff;
}

/* Article thumbnails breathe on hover. */
.article-thumb img { transition: transform .55s cubic-bezier(.16, 1, .3, 1); }
.article-card:hover .article-thumb img { transform: scale(1.06); }

/* Stat figures get a living gradient rather than a flat fill. */
.stat-value {
  background-size: 220% 100%;
  animation: stat-sheen 6s ease-in-out infinite;
}
@keyframes stat-sheen {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Counting numbers must not reflow the layout as digits change width — the
   figure already uses tabular-nums, this just pins the baseline while the
   value animates. */
.stat-value[data-count] { display: inline-block; min-width: 2ch; }

/* Header condenses into a stronger glass once the page scrolls. */
.site-header {
  transition: background var(--transition), box-shadow var(--transition),
              backdrop-filter var(--transition), border-color var(--transition);
}
.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(12, 26, 22, .07);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}

/* Section headings draw their underline in as they arrive. */
.section-head.center h2 { position: relative; display: inline-block; }
.section-head.center h2::after {
  content: '';
  position: absolute; bottom: -10px; inset-inline-start: 50%;
  width: 0; height: 3px; border-radius: 999px;
  background: var(--gradient-brand);
  transform: translateX(-50%);
  transition: width .8s cubic-bezier(.16, 1, .3, 1) .2s;
}
[dir="rtl"] .section-head.center h2::after { transform: translateX(50%); }
.section-head.center.is-revealed h2::after,
.js-motion .section-head.center[data-reveal].is-revealed h2::after { width: 64px; }

/* Floating chat button gets a slow attention pulse (halted on hover so it
   does not fight the press interaction). */
.chat-fab::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(23, 166, 122, .45);
  animation: fab-pulse 2.8s cubic-bezier(.4, 0, .6, 1) infinite;
  pointer-events: none;
}
.chat-fab:hover::before { animation-play-state: paused; }
@keyframes fab-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(23, 166, 122, .45); }
  70%  { box-shadow: 0 0 0 16px rgba(23, 166, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(23, 166, 122, 0); }
}

/* Closing CTA panel: a slow light sweep across the gradient, plus the
   panel's own content lifted above it. */
.cta-panel > *:not(.cta-shine) { position: relative; z-index: 1; }
.cta-shine {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, .16) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: cta-sweep 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes cta-sweep {
  0%, 55% { transform: translateX(-100%); }
  85%     { transform: translateX(100%); }
  100%    { transform: translateX(100%); }
}

/* Hero logo drifts gently rather than sitting dead centre. */
.hero-visual .logo-chip { animation: hero-float 7s ease-in-out infinite; }
@keyframes hero-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(1.2deg); }
}

/* ── Reduced motion ────────────────────────────────────────────────────── */

/* The global block near the top of this file already clamps every animation
   and transition to ~0s. What it cannot do is un-hide an element whose
   resting state is `opacity: 0` — a reveal would simply never appear. These
   rules put those elements back into their final state outright. */
@media (prefers-reduced-motion: reduce) {
  .js-motion [data-reveal],
  .js-motion [data-reveal].is-revealed {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-aurora span,
  .hero-grid-overlay,
  .stat-value,
  .hero-visual .logo-chip,
  .cta-shine,
  .chat-fab::before { animation: none !important; }
  .cta-shine { display: none; }
  .section-head.center h2::after { width: 64px; transition: none; }
}

/* Print */
@media print {
  .site-header, .site-footer, .chat-fab, .chat-panel, .btn, .flash-stack { display: none !important; }
  body { background: #fff; color: #000; }
  .container { max-width: 100%; }
  .hero-aurora, .hero-grid-overlay { display: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
