/* =========================================================================
   almawqii — site.css
   One design system for the landing page, the content pages, the account
   pages and the projects dashboard. Black, white and gray only: no hue, no
   gradient (tools/check_palette.py). Buttons share one scale and invert on
   hover (tools/check_ui.py).
   ========================================================================= */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; src: url("../fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-serif-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-serif-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

/* ------------------------------------------------------------------ tokens */
:root {
  /* the neutral scale: paper-2 #f5f5f5, soft band #ededed, hairline #e0e0e0,
     card tint #fafafa, panel tint #f0f0f0 */
  --bg: #ffffff;
  --bg-card: #ffffff;
  --bg-tint: #fafafa;
  --bg-band: #f5f5f5;
  --bg-panel: #f0f0f0;
  --bg-soft: #ededed;
  --line: #e0e0e0;
  --line-2: #d9d9d9;
  --line-3: #b3b3b3;
  --ink: #000000;
  --ink-2: #1a1a1a;
  --ink-3: #333333;
  --muted: #666666;
  --faint: #808080;
  --inverse: #000000;
  --inverse-ink: #ffffff;
  --overlay: #00000066;
  --shadow-sm: 0 1px 2px #0000000f, 0 1px 1px #0000000a;
  --shadow-md: 0 12px 32px -14px #00000040, 0 2px 6px -2px #0000001a;
  --shadow-lg: 0 30px 70px -30px #00000059, 0 8px 20px -10px #00000026;

  --font-sans: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  /* Plex Sans Arabic right after the mono face: Arabic letters inside a mono
     label (zone names, readouts) find a glyph instead of a box. */
  --font-mono: "IBM Plex Mono", "IBM Plex Sans Arabic", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-xs: .78rem;
  --fs-sm: .88rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.35rem;
  --fs-2xl: clamp(1.55rem, 1.15rem + 1.5vw, 2.25rem);
  --fs-3xl: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem);
  --fs-hero: clamp(2.3rem, 1.2rem + 4vw, 4.1rem);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* one button scale for the whole public site */
  --btn-h: 44px;
  --btn-h-sm: 34px;
  --btn-h-lg: 52px;
  --btn-pad: 0 18px;
  --btn-pad-sm: 0 12px;
  --btn-pad-lg: 0 24px;
  --btn-font: .95rem;
  --btn-font-sm: .85rem;
  --btn-font-lg: 1rem;

  --nav-h: 64px;
  --nav-h-app: 56px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-card: #1a1a1a;
  --bg-tint: #ffffff08;
  --bg-band: #ffffff0a;
  --bg-panel: #1a1a1a;
  --bg-soft: #333333;
  --line: #333333;
  --line-2: #333333;
  --line-3: #666666;
  --ink: #ffffff;
  --ink-2: #f0f0f0;
  --ink-3: #d9d9d9;
  --muted: #b3b3b3;
  --faint: #808080;
  --inverse: #ffffff;
  --inverse-ink: #000000;
  --overlay: #000000a6;
  --shadow-sm: 0 1px 2px #00000080;
  --shadow-md: 0 12px 32px -14px #000000cc;
  --shadow-lg: 0 30px 70px -30px #000000e6;
  color-scheme: dark;
}

/* -------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
}
[dir="rtl"] body { font-family: "IBM Plex Sans Arabic", var(--font-sans); }
main { flex: 1 0 auto; }
main:focus { outline: none; }
img, svg, video { max-width: 100%; }
img { height: auto; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.35; }
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code, kbd, pre { font-family: var(--font-mono); font-size: .9em; }
kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--bg-tint); }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.sr-only { position: absolute !important; 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: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; transition: top .2s var(--ease); }
.skip-link:focus { top: 12px; }

.container, .site-container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-band { background: var(--bg-band); border-block: 1px solid var(--line); }
.section-space { padding-block: clamp(40px, 6vw, 72px); }
.lede { font-size: var(--fs-lg); color: var(--muted); max-width: 60ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
[dir="rtl"] .eyebrow { letter-spacing: 0; font-family: var(--font-sans); }
/* Arabic has no monospaced face here, and letter-spacing breaks its joins:
   every label set in mono switches to the sans in right-to-left pages. */
[dir="rtl"] :is(.mobile-nav-title, .hero-recent-label, .hero-visual figcaption, .app-kicker, .app-bridge-chip,
  .slot-demo-meta small, .legal-updated, .coverage-table th, .credits-table th, .project-preview-empty,
  .footer-col h2, .projbar-menu-label, .conv-legend, .conv-table thead th) { font-family: var(--font-sans); letter-spacing: 0; text-transform: none; }
.eyebrow .icon { width: 14px; height: 14px; }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px var(--bg-soft); }

.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p:last-child { color: var(--muted); font-size: var(--fs-lg); margin: 0; }
.section-head-row { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head-row h2 { margin: 0; }

/* ----------------------------------------------------------------- buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--btn-h);
  padding: var(--btn-pad);
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  font-size: var(--btn-font);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.button:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.button:active { transform: translateY(1px); }
.button:disabled, .button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.button .icon { width: 18px; height: 18px; }
.button-dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.button-dark:hover { background: var(--bg); color: var(--ink); }
.button-ghost { background: transparent; color: var(--ink); border-color: var(--line-3); }
.button-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.button-light { background: #ffffff; color: #000000; border-color: #ffffff; }
.button-light:hover { background: transparent; color: #ffffff; }
.button-outline-light { background: transparent; color: #ffffff; border-color: #ffffff66; }
.button-outline-light:hover { background: #ffffff; color: #000000; border-color: #ffffff; }
.button-danger { background: transparent; color: var(--ink); border-color: var(--ink); border-style: dashed; }
.button-danger:hover { background: var(--ink); color: var(--bg); border-style: solid; }
.button-sm { min-height: var(--btn-h-sm); padding: var(--btn-pad-sm); font-size: var(--btn-font-sm); gap: 6px; }
.button-sm .icon { width: 16px; height: 16px; }
.button-lg { min-height: var(--btn-h-lg); padding: var(--btn-pad-lg); font-size: var(--btn-font-lg); }
.button-block { width: 100%; }

.icon-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; min-height: 40px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--btn-font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.icon-button:hover { background: var(--ink); color: var(--bg); }
.icon-button .icon { width: 19px; height: 19px; }
.icon-button-sm { min-width: 30px; min-height: 30px; padding: 0 6px; }
.icon-button-label { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .04em; }

.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: start; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line-3); padding-bottom: 2px; transition: border-color .15s var(--ease), gap .15s var(--ease); }
.text-link:hover { border-color: var(--ink); gap: 10px; }
.text-link .icon { width: 16px; height: 16px; }
.chip-link { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--bg-card); font-size: var(--fs-sm); text-decoration: none; transition: border-color .15s var(--ease); }
.chip-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-link:hover { border-color: var(--ink); }
.chip-link .icon { width: 15px; height: 15px; color: var(--muted); }
.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 20px; padding: 0 7px; border-radius: var(--radius-pill); background: var(--bg-soft); color: var(--ink-3); font-family: var(--font-mono); font-size: .72rem; font-weight: 600; }
.badge-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line-2); background: var(--bg-tint); font-family: var(--font-mono); font-size: .76rem; font-weight: 600; white-space: nowrap; }
.badge-chip.is-pro, .badge-chip.is-dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 18px; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; width: 34px; height: 34px; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark rect { fill: var(--ink); }
.brand-mark path { fill: none; stroke: var(--bg); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark circle { fill: var(--line-3); }
.brand-word { font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; display: inline-flex; align-items: baseline; gap: 6px; }
.brand-word small { font-weight: 600; font-size: .82rem; color: var(--muted); letter-spacing: 0; }

.topnav { display: flex; align-items: center; gap: 2px; min-width: 0; }
.topnav-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding-inline: 12px;
  border-radius: var(--radius-pill);
  color: var(--ink-3);
  font-size: .92rem; font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.topnav-link .icon { width: 17px; height: 17px; color: var(--muted); }
.topnav-link:hover { background: var(--bg-panel); color: var(--ink); text-decoration: none; }
.topnav-link.is-active { color: var(--ink); background: var(--bg-panel); font-weight: 600; }
.topnav-link.is-active .icon { color: var(--ink); }
.topnav-link-quiet { color: var(--muted); }
.topnav-sep { width: 1px; height: 20px; background: var(--line); margin-inline: 8px; }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.topbar-burger { display: none; }

.menu-wrap { position: relative; }
.menu-panel {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 80;
  min-width: 220px; padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: menu-in .16s var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink);
  font: inherit; font-size: .92rem; text-align: start; text-decoration: none; cursor: pointer;
}
.menu-item:hover { background: var(--bg-panel); text-decoration: none; }
.menu-item .icon { width: 17px; height: 17px; color: var(--muted); }
.menu-item.is-active { font-weight: 600; }
.menu-item .count-pill { margin-inline-start: auto; }
.menu-item > .icon:last-child:not(:first-child) { margin-inline-start: auto; color: var(--ink); }
.menu-head { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: grid; gap: 2px; }
.menu-head strong { font-size: .95rem; }
.menu-head small { color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; }
.menu-form { margin: 0; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-note { padding: 8px 10px; color: var(--muted); font-size: var(--fs-xs); line-height: 1.45; }

.avatar-button { border: 0; background: none; padding: 2px; border-radius: 50%; cursor: pointer; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .95rem; }
.avatar-button:hover .avatar, .avatar-button[aria-expanded="true"] .avatar { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }

.mobile-nav { border-top: 1px solid var(--line); background: var(--bg); max-height: calc(100vh - var(--nav-h)); overflow-y: auto; }
.mobile-nav-inner { padding: 12px var(--gutter) 24px; display: grid; gap: 6px; }
.mobile-nav-title { margin: 14px 0 4px; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mobile-nav-app { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--bg-card); }
.mobile-nav-app strong { display: block; }
.mobile-nav-app small { color: var(--muted); font-size: var(--fs-sm); }
.mobile-nav-ico { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--ink); color: var(--bg); flex: none; }
.mobile-nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.mobile-nav-links a { padding: 8px 0; text-decoration: none; color: var(--ink-3); }
.mobile-nav-account { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mobile-nav-prefs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mobile-nav-langs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-card); }
.mobile-nav-lang { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; text-decoration: none; color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; }
.mobile-nav-lang:hover { background: var(--bg-panel); color: var(--ink); }
.mobile-nav-lang.is-active { background: var(--ink); color: var(--bg); }
.mobile-nav-account .button { flex: 1; }

/* --------------------------------------------------------- flash & crumbs */
.flash {
  display: flex; align-items: center; gap: 10px;
  max-width: var(--container); margin: 16px auto 0; width: calc(100% - 2 * var(--gutter));
  padding: 10px 10px 10px 16px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--bg-card); box-shadow: var(--shadow-sm);
  font-size: var(--fs-sm);
}
.flash > .icon { width: 20px; height: 20px; }
.flash span { flex: 1; }
.flash-error { border-color: var(--ink); border-style: dashed; }
.flash-success > .icon { color: var(--ink); }
.flash-floating { position: fixed; z-index: 90; top: calc(var(--nav-h-app) + 10px); inset-inline: 0; max-width: 560px; box-shadow: var(--shadow-md); }
.crumbs { padding-top: 18px; font-size: var(--fs-sm); color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.crumbs li { display: inline-flex; align-items: center; gap: 4px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .icon { width: 14px; height: 14px; }
[dir="rtl"] .crumbs .icon { transform: scaleX(-1); }

/* ------------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(36px, 6vw, 84px) clamp(48px, 7vw, 96px); border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero-bg circle { fill: var(--line-2); }
.hero-bg .hero-topo path { fill: none; stroke: var(--line); stroke-width: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-title { font-size: var(--fs-hero); line-height: 1.02; letter-spacing: -.035em; margin-bottom: 22px; }
.hero-title em { display: block; font-family: var(--font-serif); font-style: normal; font-weight: 500; color: var(--muted); letter-spacing: -.02em; }
[dir="rtl"] .hero-title { line-height: 1.25; letter-spacing: 0; }
[dir="rtl"] .hero-title em { font-family: inherit; font-weight: 600; }
.hero-lede { font-size: clamp(1.05rem, .95rem + .4vw, 1.25rem); color: var(--ink-3); max-width: 34em; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-note { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.hero-note .icon { width: 16px; height: 16px; color: var(--ink); }
.hero-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--line-2); }
.hero-recent-label { font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.hero-recent-list { display: flex; flex-wrap: wrap; gap: 8px; }

.hero-visual { margin: 0; }
.hero-visual figcaption { margin-top: 12px; text-align: center; font-size: var(--fs-xs); color: var(--faint); font-family: var(--font-mono); }
.hv { width: 100%; height: auto; display: block; overflow: visible; }
.hv-window { filter: drop-shadow(0 22px 34px #00000029); }
.hv-window-front { filter: drop-shadow(0 26px 40px #00000059); }
.hv-frame { fill: var(--bg-card); stroke: var(--line); }
.hv-light { fill: var(--line-2); }
.hv-label { font: 600 12px var(--font-mono); fill: var(--muted); }
.hv-land { fill: #808080; }
.hv-field { opacity: .9; }
.hv-f1 { fill: #666666; }
.hv-f2 { fill: #b3b3b3; opacity: .55; }
.hv-f3 { fill: #666666; opacity: .7; }
.hv-dots { fill: #0000002e; }
.hv-texture { mix-blend-mode: multiply; }
.hv-contours path { fill: none; stroke: #ffffffa6; stroke-width: 1.2; }
.hv-road-casing { fill: none; stroke: #1a1a1a; stroke-width: 11; stroke-linecap: round; }
.hv-road { fill: none; stroke: #f5f5f5; stroke-width: 6; stroke-linecap: round; }
.hv-parcel { fill: #ffffff26; stroke: #ffffff; stroke-width: 2; stroke-dasharray: 7 5; }
.hv-network { fill: none; stroke: #000000; stroke-width: 3; stroke-dasharray: 12 5 2 5; stroke-linecap: round; }
.hv-points circle { fill: #ffffff; stroke: #000000; stroke-width: 2.4; }
.hv-live-halo { fill: #ffffff59; stroke: #ffffffb3; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: hv-pulse 2.4s var(--ease) infinite; }
.hv-live-dot { fill: #000000; stroke: #ffffff; stroke-width: 3.5; }
.hv-chip rect { fill: #000000d9; }
.hv-chip text { font: 600 11px var(--font-mono); fill: #ffffff; }
.hv-handoff { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 4 5; animation: hv-dash 1.2s linear infinite; }
.hv-frame-dark { fill: #1a1a1a; stroke: #333333; }
.hv-light-dark { fill: #333333; }
.hv-label-dark { font: 600 12px var(--font-mono); fill: #b3b3b3; }
.hv-cad { fill: #000000; }
.hv-grid-line { fill: none; stroke: #ffffff12; stroke-width: 1; }
.hv-cad-contours path { fill: none; stroke: #808080; stroke-width: 1; }
.hv-cad-road { fill: none; stroke: #ffffff26; stroke-width: 14; stroke-linecap: round; }
.hv-cad-axis { fill: none; stroke: #ffffff; stroke-width: 1.4; stroke-dasharray: 14 4 2 4; }
.hv-cad-parcel { fill: none; stroke: #ffffff; stroke-width: 1.4; }
.hv-cad-network { fill: none; stroke: #b3b3b3; stroke-width: 1.4; stroke-dasharray: 8 4; }
.hv-cad-points path { fill: none; stroke: #ffffff; stroke-width: 1.4; }
.hv-dim { stroke: #d9d9d9; stroke-width: 1; }
.hv-dim-text { font: 600 10px var(--font-mono); fill: #d9d9d9; }
.hv-coord { font: 400 10px var(--font-mono); fill: #b3b3b3; white-space: pre; }
@keyframes hv-pulse { 0% { transform: scale(.55); opacity: .95; } 80%, 100% { transform: scale(1.35); opacity: 0; } }
@keyframes hv-dash { to { stroke-dashoffset: -18; } }

/* --------------------------------------------------------------- app cards */
.app-cards { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 0; }
.app-card {
  display: flex; flex-direction: column; gap: 16px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.app-card .button { align-self: flex-start; margin-top: auto; }
.app-card-dark { background: #000000; color: #ffffff; border-color: #000000; }
.app-card-dark h3 { color: #ffffff; }
.app-card-dark .app-desc, .app-card-dark .app-kicker { color: #b3b3b3; }
.app-card-dark .check-list .icon { color: #ffffff; background: #ffffff1f; }
[data-theme="dark"] .app-card-dark { background: #ffffff; color: #000000; border-color: #ffffff; }
[data-theme="dark"] .app-card-dark h3 { color: #000000; }
[data-theme="dark"] .app-card-dark .app-desc, [data-theme="dark"] .app-card-dark .app-kicker { color: #666666; }
[data-theme="dark"] .app-card-dark .check-list .icon { color: #000000; background: #0000000f; }
[data-theme="dark"] .app-card-dark .button-light { background: #000000; color: #ffffff; border-color: #000000; }
[data-theme="dark"] .app-card-dark .button-light:hover { background: transparent; color: #000000; }
.app-card-head { display: flex; align-items: center; gap: 14px; }
.app-card-head h3 { font-size: 1.6rem; margin: 0; letter-spacing: -.03em; }
.app-tag { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; align-self: flex-start; padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid #ffffff4d; color: #ffffff; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.app-tag .icon { width: 12px; height: 12px; }
[data-theme="dark"] .app-tag { border-color: #0000004d; color: #000000; }
.cta-lock { width: 15px; height: 15px; opacity: .7; }
.app-kicker { margin: 0; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.app-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px; background: var(--ink); color: var(--bg); flex: none; }
.app-icon .icon { width: 26px; height: 26px; }
.app-card-dark .app-icon { background: #ffffff; color: #000000; }
[data-theme="dark"] .app-card-dark .app-icon { background: #000000; color: #ffffff; }
.app-desc { color: var(--muted); margin: 0; font-size: 1.02rem; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; }
.check-list .icon { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--bg-panel); color: var(--ink); flex: none; margin-top: 1px; }
.app-bridge { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding-inline: 14px; }
.app-bridge-line { width: 0; flex: 1; max-height: 90px; border-inline-start: 1.5px dashed var(--line-3); }
.app-bridge-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line-2); background: var(--bg); font-size: var(--fs-xs); font-weight: 600; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; writing-mode: horizontal-tb; }
.app-bridge-chip .icon { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: none; }
.step { position: relative; padding: 28px 24px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-card); }
.step-num { position: absolute; top: 18px; inset-inline-end: 20px; font-family: var(--font-mono); font-size: 2.6rem; font-weight: 600; line-height: 1; color: var(--line-2); }
.step-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); margin-bottom: 18px; background: var(--bg-tint); }
.step-icon .icon { width: 22px; height: 22px; }
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ------------------------------------------------------------------ split */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.split-reverse .split-copy { order: 2; }
.split-copy h2 { margin-bottom: 14px; }
.split-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.plan-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.plan-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
.plan-card h3 { font-size: 1rem; margin: 10px 0 4px; }
.plan-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.plan-card-strong { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.plan-icon { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 10px; background: var(--bg-panel); }
.plan-card-strong .plan-icon { background: var(--ink); color: var(--bg); }

.slots-demo { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-tint); }
.slot-demo { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); box-shadow: var(--shadow-sm); }
.slot-demo-art { width: 100%; height: auto; border-radius: 8px; background: var(--bg-panel); }
.slot-demo-meta { display: grid; gap: 2px; }
.slot-demo-meta small { color: var(--muted); font-family: var(--font-mono); font-size: .76rem; }
.slot-demo.is-free { grid-template-columns: 1fr; border-style: dashed; background: transparent; box-shadow: none; }
.slot-demo-free { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; color: var(--muted); font-weight: 500; }
.sd-contour { fill: none; stroke: var(--line-3); stroke-width: 1.2; }
.sd-shape { fill: var(--bg-soft); stroke: var(--ink); stroke-width: 1.6; }
.sd-pt { fill: var(--bg-card); stroke: var(--ink); stroke-width: 1.6; }
.sd-road { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.sd-net { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 8 4 2 4; }

.zone-chips { list-style: none; margin: 22px 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.zone-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--bg-card); font-size: var(--fs-sm); }
[dir="rtl"] .zone-chips li { padding: 6px 6px 6px 12px; }
.zone-chips b { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 24px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); font-family: var(--font-mono); font-size: .74rem; }
.zone-chips li:has(> a) { padding: 0; transition: border-color .15s var(--ease); }
[dir="rtl"] .zone-chips li:has(> a) { padding: 0; }
.zone-chips li:has(> a):hover { border-color: var(--ink); }
.zone-chips li > a { display: inline-flex; align-items: center; gap: 8px; padding-block: 6px; padding-inline: 6px 12px; color: inherit; text-decoration: none; border-radius: inherit; }
.hero-convert { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; }
.hero-convert .text-link { font-size: var(--fs-sm); }

.live-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--shadow-md); }
.live-card h3 { margin: 18px 4px 6px; }
.live-card p { margin: 0 4px 6px; color: var(--muted); }
.live-card-map { position: relative; border-radius: var(--radius); overflow: hidden; }
.live-card-map svg { display: block; width: 100%; height: auto; }
.lc-land { fill: #808080; }
.lc-road { fill: none; stroke: #f5f5f5; stroke-width: 9; stroke-linecap: round; }
.lc-contour { fill: none; stroke: #ffffff8c; stroke-width: 1.3; }
.lc-halo { fill: #ffffff4d; stroke: #ffffffb3; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: hv-pulse 2.4s var(--ease) infinite; }
.lc-dot { fill: #000000; stroke: #ffffff; stroke-width: 4; }
.live-card-pill { position: absolute; top: 12px; inset-inline-end: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius-pill); background: #000000; color: #ffffff; font-size: var(--fs-xs); font-weight: 600; box-shadow: var(--shadow-md); }
.live-card-pill .icon { width: 14px; height: 14px; }

.photo-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.photo { margin: 0; }
.photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); filter: grayscale(1) contrast(1.05); transition: filter .3s var(--ease); background: var(--bg-panel); }
.photo:hover img { filter: grayscale(.2); }
.photo figcaption { margin-top: 8px; font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }

.cta-panel { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: clamp(28px, 4vw, 52px); border-radius: var(--radius-lg); background: #000000; color: #ffffff; position: relative; overflow: hidden; }
.cta-topo { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.cta-topo path { fill: none; stroke: #ffffff17; stroke-width: 1.2; }
.cta-panel > :not(.cta-topo) { position: relative; z-index: 1; }
.cta-panel h2 { color: #ffffff; margin-bottom: 8px; }
.cta-panel p { margin: 0; color: #b3b3b3; max-width: 46ch; }
.cta-panel-actions { display: flex; flex-wrap: wrap; gap: 10px; }
[data-theme="dark"] .cta-panel { background: #1a1a1a; border: 1px solid #333333; }

/* ------------------------------------------------------------ page hero */
.page-hero { padding-block: clamp(36px, 6vw, 72px) clamp(20px, 3vw, 36px); }
.page-hero h1 { font-size: var(--fs-3xl); max-width: 22ch; }
.page-hero p { font-size: var(--fs-lg); color: var(--muted); max-width: 62ch; }
.page-hero .button { margin-top: 8px; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.section-heading { margin-bottom: 26px; max-width: 760px; }
.section-heading h1, .section-heading h2 { margin-bottom: 10px; }
.section-lead { font-size: var(--fs-lg); color: var(--muted); }

.feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: var(--bg); margin-bottom: 16px; }
.feature-icon .icon { width: 22px; height: 22px; }

.about-grid, .help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.about-card, .help-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-card); }
.about-card h2, .help-card h2 { font-size: 1.15rem; margin-bottom: 8px; letter-spacing: -.01em; }
.about-card p, .help-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.help-card:target { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-band); }
.cta-band h2 { margin-bottom: 6px; font-size: var(--fs-xl); }
.cta-band p { margin: 0; color: var(--muted); }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.help-steps { margin-bottom: 28px; padding: 26px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--bg-band); }
.help-steps h2 { font-size: var(--fs-xl); }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.steps-list li { display: flex; gap: 12px; align-items: flex-start; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--bg); font-family: var(--font-mono); font-weight: 600; font-size: .85rem; flex: none; }

.faq-list { display: grid; gap: 10px; max-width: 860px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); transition: border-color .15s var(--ease); }
.faq-item[open] { border-color: var(--line-3); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; cursor: pointer; list-style: none; font-weight: 600; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h2 { margin: 0; font-size: 1.02rem; letter-spacing: -.005em; }
.faq-item summary .icon { transition: transform .2s var(--ease); flex: none; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item > p, .faq-answer { padding: 0 20px 18px; color: var(--ink-3); margin: 0; }
.faq-answer p { margin: 0; }
.faq-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.faq-cta p { margin: 0; flex-basis: 100%; color: var(--muted); }
.faq-section { padding-top: 0; }

.legal-body { max-width: 760px; }
.legal-body h2 { font-size: var(--fs-xl); margin-top: 34px; }
.legal-body p, .legal-body li { color: var(--ink-3); }
.legal-updated { color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-xs); }

.coverage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.coverage-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
.coverage-card h3 { font-size: 1rem; margin-bottom: 6px; }
.coverage-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.coverage-card-zone { margin-top: 10px; }
.coverage-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 22px 0; }
.coverage-table-wrap, .credits-table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
/* position: relative keeps the screen-reader labels (.sr-only, absolute) of a
   wide table inside its scroll box: without it they escaped the clipping and
   stretched a phone's layout viewport to the table's width. */
.coverage-table, .credits-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.coverage-table th, .coverage-table td, .credits-table th, .credits-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.coverage-table th, .credits-table th { font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--bg-tint); }
.coverage-table tr:last-child td, .credits-table tr:last-child td { border-bottom: 0; }
.coverage-code { font-family: var(--font-mono); font-weight: 600; }
.coverage-note, .coverage-prose { color: var(--muted); max-width: 70ch; }
.coverage-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.credits-policy { color: var(--muted); max-width: 70ch; }
.credits-table img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; filter: grayscale(1); }

.contact-section { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.contact-form, .account-form { position: relative; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--shadow-sm); }
.contact-aside, .account-aside { padding: clamp(20px, 3vw, 28px); border-radius: var(--radius-lg); background: var(--bg-band); border: 1px solid var(--line); }
.contact-points, .account-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact-points li, .account-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-3); }
.contact-points .icon, .account-points .icon { width: 20px; height: 20px; flex: none; margin-top: 3px; }
.contact-email { font-family: var(--font-mono); font-weight: 600; }
.contact-actions, .account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }

.error-section { padding-block: clamp(56px, 10vw, 120px); }
.error-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.error-code { margin: 0 0 6px; font-family: var(--font-mono); font-weight: 600; font-size: clamp(4rem, 2rem + 10vw, 9rem); line-height: 1; color: var(--line-2); letter-spacing: -.04em; }
.error-inner h1 { font-size: var(--fs-2xl); }
.error-inner p { color: var(--muted); max-width: 52ch; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }

/* ------------------------------------------------------------------ forms */
label, .field-label { display: block; margin-bottom: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.form-control, .form-select, .account-textarea, input[type="text"].plain, textarea.plain {
  display: block; width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: .97rem;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea.form-control, .account-textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.form-select { appearance: none; padding-inline-end: 40px; background-image: none; }
.select-wrap { position: relative; }
.form-control:hover, .form-select:hover { border-color: var(--line-3); }
.form-control:focus, .form-select:focus, .account-textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--bg-soft); }
.form-control[readonly] { background: var(--bg-tint); color: var(--muted); }
.form-control.is-invalid, .is-invalid .form-control { border-color: var(--ink); border-style: dashed; }
.field-help { margin: 6px 0 0; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }
.field-help.ok { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.field-help .icon { width: 14px; height: 14px; }
.field-error { margin: 6px 0 0; font-size: var(--fs-xs); font-weight: 600; color: var(--ink); display: flex; gap: 6px; align-items: center; }
.field-error::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: .7rem; }
/* Bot defences (partials/bot-guard.php). The honeypot stays in the form for
   scripts but is clipped to nothing inside the (positioned) form: an absolute
   box pushed off-canvas would widen the page in Arabic, where overflow to the
   left scrolls. Google's floating v3 badge gives way to the attribution line
   under the fields, as reCAPTCHA's terms allow. */
.bot-trap { position: absolute; inset-inline-start: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.bot-guard { display: grid; gap: 8px; }
.bot-guard .g-recaptcha-response { display: none !important; }
.bot-captcha { min-height: 78px; }
.bot-notice { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }
.bot-notice .icon { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.bot-notice a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.bot-error { margin: 0; }
.grecaptcha-badge { visibility: hidden !important; }
.required-mark { color: var(--muted); font-weight: 400; }
.checkbox-line { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--ink-3); cursor: pointer; }
.checkbox-line input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); flex: none; }
.password-meter { height: 4px; margin-top: 8px; border-radius: 2px; background: var(--bg-soft); overflow: hidden; }
.password-meter span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .25s var(--ease); }
.occupation-other { margin-top: 12px; }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.row > * { grid-column: span 12; min-width: 0; }
.g-3 { gap: 16px; }
@media (min-width: 768px) {
  .row > .col-md-6 { grid-column: span 6; }
  .row > .col-md-4 { grid-column: span 4; }
  .row > .col-md-8 { grid-column: span 8; }
}

/* --------------------------------------------------------------- accounts */
.account-section .account-grid, .account-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.account-note { margin-top: 18px; font-size: var(--fs-sm); color: var(--muted); }
.account-note a { font-weight: 600; color: var(--ink); }
.account-steps { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; counter-reset: s; }
.account-steps li { display: flex; gap: 10px; align-items: flex-start; counter-increment: s; }
.account-steps li::before { content: counter(s); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); font-family: var(--font-mono); font-size: .76rem; font-weight: 600; flex: none; }
.resend-form { margin-top: 20px; }

/* sign-in: why the visitor was sent here, and "keep me logged in" */
.login-reason { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; padding: 14px 16px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--bg-tint); }
.login-reason-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; background: var(--ink); color: var(--bg); flex: none; }
.login-reason-icon .icon { width: 19px; height: 19px; }
.login-reason-copy { display: grid; gap: 2px; min-width: 0; }
.login-reason-copy strong { font-size: .95rem; color: var(--ink); }
.login-reason-copy span { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.label-row label { margin-bottom: 0; }
.label-link { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.label-link:hover { color: var(--ink); }
.remember-switch { position: relative; display: flex; align-items: center; gap: 14px; margin: 0; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg); font-weight: 400; cursor: pointer; user-select: none; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.remember-switch:hover { border-color: var(--line-3); }
.remember-switch input { position: absolute; inset-inline-start: 14px; top: 50%; width: 44px; height: 26px; margin: -13px 0 0; opacity: 0; cursor: pointer; }
.remember-track { position: relative; flex: none; width: 44px; height: 26px; border-radius: var(--radius-pill); background: var(--line-3); transition: background-color .2s var(--ease); }
.remember-knob { position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #ffffff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), background-color .2s var(--ease); }
.remember-copy { display: grid; gap: 2px; min-width: 0; }
.remember-copy strong { font-size: .95rem; font-weight: 600; color: var(--ink); }
.remember-copy small { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.remember-switch input:checked + .remember-track { background: var(--ink); }
.remember-switch input:checked + .remember-track .remember-knob { transform: translateX(18px); background: var(--bg); }
[dir="rtl"] .remember-switch input:checked + .remember-track .remember-knob { transform: translateX(-18px); }
.remember-switch:has(input:checked) { border-color: var(--ink); background: var(--bg-tint); }
.remember-switch input:focus-visible + .remember-track { outline: 2px solid var(--ink); outline-offset: 3px; }
.session-line { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.5; }
.session-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; border: 2px solid var(--line-3); flex: none; }
.session-dot.is-on { background: var(--ink); border-color: var(--ink); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-col { display: grid; gap: 20px; }
.panel { padding: clamp(20px, 2.6vw, 28px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-card); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.12rem; letter-spacing: -.01em; }
.panel-head h2 .icon { width: 20px; height: 20px; }
.panel p { color: var(--ink-3); }
.panel-strong { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.panel-strong h2, .panel-strong p { color: var(--bg); }
.panel-strong .field-help { color: var(--line-3); }
.quota-meter { display: grid; gap: 8px; }
.quota-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.quota-bar span { height: 8px; border-radius: 4px; background: var(--bg-soft); }
.quota-bar span.is-used { background: var(--ink); }
.panel-strong .quota-bar span { background: #ffffff33; }
.panel-strong .quota-bar span.is-used { background: var(--bg); }
/* my account: a main column of panels and a narrower side one */
.account-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.account-main, .account-side { display: grid; gap: 20px; min-width: 0; }
.account-panel { padding: clamp(20px, 2.6vw, 28px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-card); }
.account-panel > .field-help { margin: 0 0 12px; }
.account-panel .inline-actions { margin-top: 16px; }
.account-panel hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.account-panel .account-points { margin: 6px 0 4px; gap: 10px; }
.account-panel .account-points a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.account-plan-pro { border-color: var(--ink); }
.account-plan-request { display: grid; gap: 8px; margin: 12px 0 16px; }
.account-plan-request .button { justify-self: start; }
.account-plan-request-pending { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px dashed var(--line-3); border-radius: var(--radius-sm); font-size: var(--fs-sm); color: var(--ink-3); }
.account-plan-request-pending .icon { width: 16px; height: 16px; flex: none; }
.account-form-inline { margin-top: 4px; }
.account-side .account-panel form { margin-top: 12px; }
.danger-zone { margin-top: 6px; }
.danger-zone summary { cursor: pointer; font-weight: 600; font-size: var(--fs-sm); }
.danger-zone[open] summary { margin-bottom: 10px; }
.danger-zone form { display: grid; gap: 10px; }
.stack { display: grid; gap: 12px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* -------------------------------------------------------- projects dashboard */
.projects-hero { padding-block: clamp(30px, 5vw, 56px) 8px; }
.projects-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.projects-hero h1 { margin-bottom: 8px; }
.projects-hero p { color: var(--muted); margin: 0; max-width: 60ch; }
.projects-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.projects-quota { display: grid; gap: 6px; min-width: 180px; }
.projects-quota-label { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-sm); font-weight: 600; }
.projects-quota-label small { font-weight: 400; color: var(--muted); }
.mode-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line-2); font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); background: var(--bg-card); }
.mode-badge .icon { width: 14px; height: 14px; }
.nav-lock { display: inline-flex; align-items: center; margin-inline-start: 4px; color: var(--faint); }
a .nav-lock .icon, .nav-lock .icon { width: 11px; height: 11px; color: var(--faint); }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 26px; }
.project-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-card); overflow: hidden; transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease); }
.project-card:hover { border-color: var(--line-3); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.project-card.is-current { border-color: var(--ink); }
.project-preview { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--bg-panel); border-bottom: 1px solid var(--line); overflow: hidden; }
.project-preview svg { display: block; width: 100%; height: 100%; }
.project-preview .pv-grid { stroke: var(--line); stroke-width: 1; fill: none; }
.project-preview .pv-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.project-preview .pv-contour { fill: none; stroke: var(--faint); stroke-width: 1; vector-effect: non-scaling-stroke; }
.project-preview .pv-point { fill: var(--bg-card); stroke: var(--ink); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.project-preview-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; color: var(--faint); font-size: var(--fs-xs); font-family: var(--font-mono); text-align: center; line-height: 1.5; }
.project-preview-empty .icon { width: 28px; height: 28px; }
.project-badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 6px; }
.project-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: var(--radius-pill); background: var(--bg-card); border: 1px solid var(--line); font-size: .72rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.project-badge .icon { width: 12px; height: 12px; }
.project-body { display: grid; gap: 6px; padding: 16px 18px 6px; }
.project-name-row { display: flex; align-items: center; gap: 8px; }
.project-name { margin: 0; font-size: 1.08rem; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.project-name-input { flex: 1; min-height: 34px; padding: 4px 10px; border: 1px solid var(--ink); border-radius: 8px; font: inherit; font-weight: 600; background: var(--bg); color: var(--ink); }
.project-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--fs-xs); }
.project-meta li { display: inline-flex; align-items: center; gap: 5px; }
.project-meta .icon { width: 13px; height: 13px; }
.project-actions { display: flex; align-items: center; gap: 8px; padding: 12px 18px 16px; margin-top: auto; }
.project-actions .button { flex: 1; }
.project-menu { inset-inline-end: 0; top: auto; bottom: calc(100% + 6px); }
.project-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 260px; padding: 24px; border: 1.5px dashed var(--line-3); border-radius: var(--radius-lg); background: transparent; color: var(--muted); text-align: center; font: inherit; cursor: pointer; transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease); }
.project-slot:hover { border-color: var(--ink); color: var(--ink); background: var(--bg-tint); }
.project-slot strong { color: var(--ink); font-size: 1.02rem; }
.project-slot small { max-width: 26ch; }
.project-slot-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg-card); }
.project-slot-icon .icon { width: 22px; height: 22px; }
.project-slot.is-locked { cursor: default; border-style: solid; border-color: var(--line); }
.project-slot.is-locked:hover { background: transparent; color: var(--muted); }
.projects-state { margin-top: 26px; padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }

/* the dashboard a guest sees: what an account brings, and the doors to it */
.projects-gate { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: 26px; padding: clamp(22px, 4vw, 44px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--shadow-sm); }
.projects-gate-copy h2 { margin: 14px 0 10px; font-size: var(--fs-2xl); letter-spacing: -.02em; line-height: 1.15; }
.projects-gate-copy > p:not([class]) { color: var(--ink-3); max-width: 56ch; }
.gate-badge { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 5px 12px; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; }
.gate-badge .icon { width: 14px; height: 14px; }
.gate-perks { list-style: none; margin: 18px 0 24px; padding: 0; display: grid; gap: 12px; }
.gate-perks li { display: flex; align-items: flex-start; gap: 12px; color: var(--ink-2); }
.gate-perks .icon { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.gate-try { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.gate-try .icon { width: 16px; height: 16px; flex: none; }
.gate-try a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.slots-demo.is-locked { position: relative; }
.slots-demo.is-locked .slot-demo { filter: blur(1.5px) grayscale(1); opacity: .55; }
.slots-lock { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-md); }
.slots-lock .icon { width: 16px; height: 16px; }
.projects-aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 48px; }
.how-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.how-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-3); font-size: .95rem; }
.how-list .step-number { width: 26px; height: 26px; font-size: .78rem; }

.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--ink); animation: spin .7s linear infinite; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* site-wide modal (dashboard dialogs) */
.site-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-card); color: var(--ink); box-shadow: var(--shadow-lg); }
.site-dialog::backdrop { background: var(--overlay); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.site-dialog form { margin: 0; }
.site-dialog-body { padding: 22px 22px 8px; }
.site-dialog-body h2 { font-size: 1.15rem; margin-bottom: 10px; }
.site-dialog-body p { color: var(--ink-3); }
.site-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; }
.toast-site { position: fixed; z-index: 120; bottom: 22px; inset-inline-start: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); font-size: var(--fs-sm); font-weight: 500; box-shadow: var(--shadow-lg); animation: toast-in .25s var(--ease); }
[dir="rtl"] .toast-site { transform: translateX(50%); }
@keyframes toast-in { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }

/* ------------------------------------------------------------------ footer */
.footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--bg-band); padding-block: clamp(40px, 6vw, 64px) 26px; font-size: var(--fs-sm); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 28px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-tagline { font-weight: 600; font-size: 1.02rem; color: var(--ink); margin-bottom: 8px; }
.footer-note { color: var(--muted); max-width: 44ch; }
.footer-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer-col h2 { margin: 0 0 6px; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.footer-col a, .footer-col .link-button { color: var(--ink-3); text-decoration: none; }
.footer-col a:hover, .footer-col .link-button:hover { color: var(--ink); text-decoration: underline; }
.footer-col .link-button { text-decoration: none; }
.footer-fine { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 8px; color: var(--muted); font-size: var(--fs-xs); }
.footer-fine p { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.footer-fine .icon { width: 14px; height: 14px; margin-top: 2px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 22px; color: var(--muted); font-size: var(--fs-xs); }
.footer-status { display: inline-flex; align-items: center; gap: 6px; }
.footer-status .icon { width: 14px; height: 14px; }
.back-top { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--ink); }
.back-top:hover { background: var(--ink); color: var(--bg); }

/* ----------------------------------------------------------------- consent */
.consent {
  position: fixed; z-index: 110; inset-inline: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 16px;
  max-width: 760px; margin-inline: auto; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg-card); box-shadow: var(--shadow-lg);
  animation: toast-in .3s var(--ease);
}
.consent-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--bg-panel); flex: none; }
.consent-copy { flex: 1; min-width: 0; }
.consent-copy strong { display: block; font-size: .95rem; }
.consent-copy p { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.consent-actions { display: flex; gap: 8px; flex: none; }
.is-app .consent { bottom: 64px; }

/* ------------------------------------------------------------------ reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------- responsive */
/* The quiet links leave one by one as the bar narrows: the converter last. */
@media (max-width: 1280px) { .topnav-rank-2 { display: none; } }
@media (max-width: 1200px) { .topnav-rank-1 { display: none; } }
@media (max-width: 1100px) {
  .topnav-link-quiet, .topnav-sep { display: none; }
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 640px; margin-inline: auto; width: 100%; }
  .app-cards { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .app-bridge { flex-direction: row; padding: 12px 0; }
  .app-bridge-line { width: auto; height: 0; max-height: none; max-width: 90px; flex: 1; border-inline-start: 0; border-top: 1.5px dashed var(--line-3); }
  .split, .contact-section, .account-grid, .account-section .account-grid, .dash-grid, .projects-gate, .account-columns { grid-template-columns: 1fr; }
  .split-reverse .split-copy { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .photo-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .photo-strip .photo:nth-child(n+4) { display: none; }
}
@media (max-width: 860px) {
  .topnav, .topbar-register { display: none; }
  .topbar-burger { display: inline-flex; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  :root { --nav-h: 58px; }
  /* the language and the theme move to the menu: the bar keeps its room */
  .topbar-lang, .topbar-theme { display: none; }
  .topbar-login span { display: none; }
  .topbar-login { min-width: var(--btn-h-sm); padding-inline: 0; }
  .icon-button-label { display: none; }
  .hero-actions .button { flex: 1 1 100%; }
  .plan-pair { grid-template-columns: 1fr; }
  .slot-demo { grid-template-columns: 110px 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .consent { flex-direction: column; align-items: stretch; }
  .consent-icon { display: none; }
  .consent-actions .button { flex: 1; }
  .project-grid { grid-template-columns: 1fr; }
  .photo-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-strip .photo:nth-child(n+3) { display: none; }
}
.projects-main { padding-bottom: clamp(56px, 8vw, 96px); }

/* ------------------------------------------------- converter and guides */
/* /convertisseur and the four country guides: a hero that answers, the
   converter card, then reference tables. Same tokens as everything else. */
.select-wrap > .icon { position: absolute; inset-inline-end: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

.guide-hero { padding-bottom: clamp(18px, 2.5vw, 28px); }
.guide-hero h1 { max-width: 24ch; }
.guide-hero .lede { max-width: 72ch; }
.guide-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; }
.guide-chips li { padding: 3px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-pill); background: var(--bg-tint); font-family: var(--font-mono); font-size: .76rem; font-weight: 600; white-space: nowrap; }
.guide-trust { list-style: none; display: grid; gap: 6px; margin: 16px 0 0; padding: 0; max-width: 72ch; }
.guide-trust li { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.guide-trust .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--ink); }

.guide-converter { padding-bottom: clamp(32px, 5vw, 56px); }
.conv { padding: clamp(18px, 2.6vw, 30px); border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--shadow-md); }
.conv-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 18px; }
.conv-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: var(--fs-xl); }
.conv-title .icon { width: 22px; height: 22px; }
.conv-both { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.conv-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 18px; align-items: start; }
.conv-side { min-width: 0; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-tint); }
.conv-legend { float: inline-start; width: 100%; margin: 0 0 14px; padding: 0; font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.conv-legend + * { clear: both; }
.conv-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.conv-field { min-width: 0; }
.conv-field-wide { margin-bottom: 12px; }
.conv-input { font-family: var(--font-mono); font-size: 1.02rem; letter-spacing: -.01em; }
.conv-input::placeholder { color: var(--line-3); }
.conv-readout { min-height: 1.5em; margin: 8px 0 0; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--ink-2); }
.conv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.conv-actions .button[disabled] { opacity: .45; pointer-events: none; }
.conv-swap { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-top: 64px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--bg-card); color: var(--ink); }
.conv-swap .icon { width: 20px; height: 20px; }
.conv-status { display: grid; gap: 10px; margin-top: 16px; }
.conv-status:has(> [hidden]:only-child), .conv-status:empty { margin-top: 0; }
.conv-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.conv-suggest[hidden] { display: none; }
.conv-suggest-label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.conv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.conv-chip { min-height: 32px; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-pill); background: var(--bg-card); color: var(--ink); font: inherit; font-size: .84rem; font-weight: 500; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease); }
.conv-chip:hover, .conv-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.conv-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.conv-message { margin: 0; padding: 10px 14px; border: 1px dashed var(--line-3); border-radius: var(--radius-sm); background: var(--bg-tint); font-size: var(--fs-sm); color: var(--ink-3); }
.conv-message[hidden] { display: none; }
.conv-message-warn { border-style: solid; border-color: var(--ink); color: var(--ink); }
.conv-batch { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
.conv-batch[open] { border-color: var(--line-3); }
.conv-batch-summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; list-style: none; font-weight: 600; }
.conv-batch-summary::-webkit-details-marker { display: none; }
.conv-batch-summary > span { flex: 1; }
.conv-batch-summary .icon:last-child { transition: transform .2s var(--ease); }
.conv-batch[open] .conv-batch-summary .icon:last-child { transform: rotate(180deg); }
.conv-batch-body { display: grid; gap: 12px; padding: 0 18px 18px; }
.conv-batch-body > .field-help { margin: 0; }
.conv-batch-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.conv-batch-controls .conv-field { flex: 1 1 260px; }
.conv-textarea { min-height: 150px; font-family: var(--font-mono); font-size: .9rem; }
.conv-batch-out { display: grid; gap: 4px; }
.conv-batch-out[hidden] { display: none; }
.conv-table-wrap { position: relative; max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.conv-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: .8rem; }
.conv-table th, .conv-table td { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: end; white-space: nowrap; }
.conv-table thead th { position: sticky; top: 0; background: var(--bg-panel); font-size: .72rem; letter-spacing: .04em; color: var(--muted); }
.conv-table th:first-child { text-align: start; }
.conv-table tbody th { font-weight: 600; }
.conv-private { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.conv-private .icon { width: 15px; height: 15px; margin-top: 1px; }
.conv noscript .conv-message { margin-top: 12px; }

.guide-prose { max-width: 780px; }
.guide-prose h2 + p { color: var(--ink-3); font-size: 1.04rem; }
.guide-prose + .guide-prose, .guide-cards + .guide-prose { margin-top: clamp(32px, 5vw, 56px); }
.guide-subtitle { margin: clamp(32px, 5vw, 52px) 0 12px; font-size: var(--fs-xl); }
.guide-text { max-width: 780px; color: var(--ink-3); }
.guide-table { font-size: .88rem; }
.guide-table tbody th { font-family: var(--font-sans); font-size: .9rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); background: transparent; min-width: 180px; }
.guide-table tbody th small, .guide-table td small { display: block; margin-top: 3px; font-size: var(--fs-xs); font-weight: 400; color: var(--muted); }
.guide-table td small + small { margin-top: 1px; }
.guide-table tbody tr:hover > * { background: var(--bg-tint); }
.guide-table tbody tr:last-child > * { border-bottom: 0; }
.guide-num { font-family: var(--font-mono); font-size: .84rem; white-space: nowrap; }
.guide-cities td.guide-num > span { display: block; }
.guide-cities td.guide-num > .coverage-code { display: inline-block; margin-bottom: 2px; padding: 0 6px; border-radius: var(--radius-xs); background: var(--ink); color: var(--bg); font-size: .72rem; }
.guide-muted { color: var(--muted); font-family: var(--font-sans); white-space: normal; }
.guide-map-link { display: inline-flex; align-items: center; gap: 6px; padding-bottom: 2px; border-bottom: 1px solid var(--line-3); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; white-space: nowrap; }
.guide-map-link:hover { border-color: var(--ink); }
.guide-map-link .icon { width: 15px; height: 15px; }
.guide-faq h2 { margin-bottom: 18px; }
.guide-cta .button { flex: none; }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.guide-card { position: relative; display: grid; align-content: start; gap: 6px; padding: 20px 20px 46px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); color: var(--ink); text-decoration: none; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.guide-card:hover { border-color: var(--ink); box-shadow: var(--shadow-md); }
.guide-card strong { font-size: 1.05rem; }
.guide-card > span:not([class]) { font-size: var(--fs-sm); color: var(--muted); }
.guide-card-code { justify-self: start; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); font-family: var(--font-mono); font-size: .72rem; font-weight: 600; }
.guide-card-go { position: absolute; inset-inline-end: 18px; bottom: 16px; display: inline-flex; color: var(--ink); }
.guide-card-go .icon { width: 18px; height: 18px; }
[dir="rtl"] .guide-card-go .icon, [dir="rtl"] .conv-swap .icon { transform: scaleX(-1); }
.guide-cards-compact { margin-top: 6px; }

/* The contour-lines page (pages/contours.php). The figure is a plan sheet:
   paper white, and in the dark theme the same greyscale SVG inverted — white
   lines on black — rather than a second file. */
.cnp-figure { margin: 0; padding: clamp(10px, 2vw, 18px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: #ffffff; }
.cnp-figure img { display: block; width: 100%; height: auto; }
.cnp-figure figcaption { margin-top: 10px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
[data-theme="dark"] .cnp-figure { background: #000000; }
[data-theme="dark"] .cnp-figure img { filter: invert(1); }
/* Five steps read as a procedure: one row each — number, title, text — and
   the text under the title on narrow screens. */
.cnp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 980px; }
.cnp-steps li { display: grid; grid-template-columns: auto minmax(0, 15rem) minmax(0, 1fr); align-items: start; gap: 4px 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-card); scroll-margin-top: calc(var(--nav-h) + 16px); }
.cnp-steps li > div { display: contents; }
.cnp-steps h3 { margin: 3px 0 0; font-size: var(--fs-lg); }
.cnp-steps p { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; }
@media (max-width: 760px) {
  .cnp-steps li { grid-template-columns: auto minmax(0, 1fr); }
  .cnp-steps p { grid-column: 2; }
}
.cnp-page .help-card h3 { margin-bottom: 8px; font-size: var(--fs-lg); letter-spacing: -.01em; }
.cnp-page .guide-cta .cta-band-actions .button { flex: none; }

@media (max-width: 900px) {
  .conv-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .conv-swap { margin: 0 auto; transform: rotate(90deg); }
  [dir="rtl"] .conv-swap .icon { transform: none; }
}
@media (max-width: 560px) {
  .conv { padding: 14px; border-radius: var(--radius); }
  .conv-side { padding: 14px; }
  .conv-fields { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .conv-actions .button { flex: 1 1 auto; }
  .guide-cta .button { width: 100%; }
}

/* ------------------------------------------------------------ EPSG catalogue */
.epsg-page .eyebrow a { color: inherit; text-decoration: none; }
.epsg-search { margin: 0 0 18px; max-width: 760px; }
.epsg-search-label { display: block; font-weight: 600; margin-bottom: 6px; }
.epsg-search-row { display: flex; gap: 8px; }
.epsg-search-row .form-control { flex: 1 1 auto; min-width: 0; }
.epsg-search-hint { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.epsg-results { margin-bottom: 26px; }
.epsg-results:empty { display: none; }
.epsg-empty { color: var(--muted); }
.epsg-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 12px; }
.epsg-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 6px; }
.epsg-list a { display: flex; gap: 10px; align-items: baseline; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); color: var(--ink); text-decoration: none; }
.epsg-list a:hover { background: var(--ink); color: var(--bg-card); border-color: var(--ink); }
.epsg-code { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
.epsg-name { min-width: 0; overflow-wrap: anywhere; }
.epsg-block { margin-top: 38px; }
.epsg-block > h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.epsg-count { padding: 2px 8px; border: 1px solid var(--line-2); border-radius: var(--radius-pill); font-family: var(--font-mono); font-size: .8rem; font-weight: 600; color: var(--muted); }
.epsg-feature-grid, .epsg-countries { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.epsg-feature-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.epsg-countries { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.epsg-countries a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); color: var(--ink); text-decoration: none; }
.epsg-countries a:hover { background: var(--ink); color: var(--bg-card); border-color: var(--ink); }
.epsg-countries a:hover .epsg-cc, .epsg-countries a:hover .epsg-num { color: inherit; }
.epsg-cc { font-family: var(--font-mono); font-size: .72rem; font-weight: 700; color: var(--muted); }
.epsg-num { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.epsg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.epsg-filter { display: grid; gap: 6px; max-width: 420px; margin: 0 0 8px; }
.epsg-filter label { font-weight: 600; font-size: var(--fs-sm); }
.epsg-caption { caption-side: top; padding: 10px 14px; text-align: start; font-size: var(--fs-sm); color: var(--muted); }
.epsg-table th[scope="row"] { white-space: nowrap; }
.epsg-muted { color: var(--muted); }
.epsg-mono { font-family: var(--font-mono); }
.epsg-notice { display: flex; align-items: flex-start; gap: 10px; max-width: 760px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-tint); }
.epsg-notice .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.epsg-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; max-width: 760px; margin: 12px 0 22px; padding: 0; list-style: none; }
.epsg-zones a { display: flex; align-items: center; justify-content: center; min-height: 40px; border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--ink); font-size: .85rem; text-decoration: none; }
.epsg-zones a:hover { background: var(--ink); color: var(--bg); }
.epsg-facts th[scope="row"], .epsg-params th[scope="row"] { width: 30%; font-family: inherit; font-size: .86rem; text-transform: none; letter-spacing: 0; }
.epsg-code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.epsg-pre { max-height: 340px; margin: 10px 0 0; padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-tint); font-size: .82rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.epsg-faq details { padding: 12px 0; border-bottom: 1px solid var(--line); }
.epsg-faq summary { cursor: pointer; font-weight: 600; }
.epsg-faq p { margin: 8px 0 0; color: var(--muted); }
.epsg-source { margin-top: 30px; }
@media (max-width: 600px) {
  .epsg-search-row { flex-direction: column; }
  .epsg-facts th[scope="row"], .epsg-params th[scope="row"] { width: auto; white-space: normal; }
}
