/* =========================================================================
   Diwaan — shared design system (marketing site)
   Source of truth: "Diwaan — Visual System.md"
   Layout concept: 1240px container, 12-col, product-as-hero; white + mist
   surfaces, forest structure, lime for the single next action.
   The marketing site is deliberately light-only. The app has its own theme.
   Every value comes from tokens.css; the names below are this file's aliases.
   ========================================================================= */
@import url("tokens.css");

:root {
  color-scheme: light;

  /* Brand */
  --forest-950: var(--dw-forest-950);
  --forest-900: var(--dw-forest-900);
  --forest-700: var(--dw-forest-700);
  --sage-700: var(--dw-sage-700);
  --sage-500: var(--dw-sage-500);
  --sage-300: var(--dw-sage-300);
  --lime-400: var(--dw-lime-400);
  --lime-300: var(--dw-lime-300);
  --lime-100: var(--dw-lime-100);
  --olive-glow: var(--dw-olive-glow);

  /* Neutrals */
  --white: var(--dw-white);
  --mist-50: var(--dw-surface-mist);
  --grey-50: var(--dw-fill-50);
  --grey-100: var(--dw-surface-sunken);
  --grey-200: var(--dw-fill-200);
  --grey-300: var(--dw-line);
  --grey-400: var(--dw-line-strong);

  /* Text */
  --ink: var(--dw-ink);
  --ink-muted: var(--dw-ink-muted);
  --ink-faint: var(--dw-ink-faint);
  --ink-on-dark: var(--dw-ink-on-dark);
  --ink-on-dark-muted: var(--dw-ink-on-dark-muted);

  /* Semantic */
  --positive: var(--dw-positive);  --positive-bg: var(--dw-positive-bg);
  --negative: var(--dw-negative);  --negative-bg: var(--dw-negative-bg);
  --caution: var(--dw-caution);    --caution-bg: var(--dw-caution-bg);

  /* Type */
  --font-sans: var(--dw-font-sans);
  --font-mono: var(--dw-font-mono);

  /* Radius */
  --r-xs: var(--dw-radius-xs); --r-sm: var(--dw-radius-sm); --r-md: var(--dw-radius-md); --r-lg: var(--dw-radius-lg); --r-xl: var(--dw-radius-xl); --r-2xl: var(--dw-radius-2xl);

  /* Elevation */
  --border: 1px solid var(--grey-300);
  --shadow-sm: var(--dw-shadow-sm);
  --shadow-md: var(--dw-shadow-md);
  --shadow-lg: var(--dw-shadow-lg);

  /* Motion */
  --ease: var(--dw-ease);
  --t-fast: var(--dw-duration-fast); --t-base: var(--dw-duration-base); --t-slow: var(--dw-duration-slow);

  /* Layout */
  --container: var(--dw-container);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --section: 128px;

  --gradient-hero: var(--dw-gradient-hero);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--dw-text-15);
  line-height: 1.5;
  font-feature-settings: "cv11" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--dw-focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--lime-300); color: var(--forest-950); }
.ic { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--forest-950); color: #fff; padding: 8px 12px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { top: 12px; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { margin: 0; color: var(--ink); text-wrap: balance; font-weight: 500; }
p { margin: 0; text-wrap: pretty; }
.display-xl { font-size: clamp(44px, 6.2vw, 76px); line-height: 1.02; font-weight: 600; letter-spacing: -0.04em; }
.display-l  { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.08; letter-spacing: -0.032em; }
.display-m  { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; letter-spacing: -0.026em; }
.title      { font-size: var(--dw-text-20); line-height: 1.4; letter-spacing: -0.01em; font-weight: 500; }
.body-l     { font-size: var(--dw-text-18); line-height: 1.56; color: var(--ink-muted); }
.body       { font-size: var(--dw-text-15); line-height: 1.5; }
.body-s     { font-size: var(--dw-text-13); line-height: 1.4; }
.micro      { font-size: var(--dw-text-12); line-height: 1.3; font-weight: 500; letter-spacing: .01em; }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.mono { font-family: var(--font-mono); }
.num, .figure { font-variant-numeric: tabular-nums; }
.figure { letter-spacing: -0.02em; color: var(--ink); font-weight: 400; }
.figure .dec { color: var(--ink-faint); font-size: .8em; }
.unit { color: var(--ink-faint); font-size: .8em; margin-left: 4px; }
.measure { max-width: 62ch; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + 2 * 24px); margin-inline: auto;
  padding-left: max(16px, 24px, env(safe-area-inset-left, 0px)); padding-right: max(16px, 24px, env(safe-area-inset-right, 0px)); }
@media (max-width: 480px) { .container { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); } }
.section { padding-block: var(--section); }
.section-sm { padding-block: 80px; }
.section-head { display: grid; gap: 20px; max-width: 760px; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.stack { display: grid; gap: var(--gap, 16px); align-content: start; }
.row { display: flex; gap: var(--gap, 12px); align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap, 24px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap, 24px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap, 24px); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 1fr) minmax(0, 6fr); align-items: center; }
.split > :first-child { grid-column: 1; }
.split > :last-child { grid-column: 3; }
.split.flip > :first-child { grid-column: 3; grid-row: 1; }
.split.flip > :last-child { grid-column: 1; grid-row: 1; }
.bg-mist { background: var(--mist-50); }
.bg-grey { background: var(--grey-100); }
.dots { background-image: radial-gradient(var(--grey-400) 1px, transparent 1.2px); background-size: 24px 24px; }
@media (max-width: 960px) {
  :root { --section: 88px; }
  .split, .split.flip { grid-template-columns: 1fr; gap: 40px; }
  .split > :first-child, .split > :last-child, .split.flip > :first-child, .split.flip > :last-child { grid-column: 1; grid-row: auto; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --section: 72px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Eyebrow ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  padding: 5px 8px 5px 10px; border-radius: var(--r-xs); background: var(--grey-200);
  font: 500 var(--dw-text-12)/16px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.eyebrow::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.eyebrow .tile { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; background: var(--lime-300); margin-right: -3px; }
.eyebrow.on-dark { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 12px; height: 46px; padding: 0 5px 0 18px;
  border-radius: var(--r-md); border: 0; font-size: var(--dw-text-15); font-weight: 500; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.btn .arrow { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); transition: transform var(--t-fast) var(--ease); }
.btn:hover .arrow { transform: translate(1px, -1px); }
.btn-primary { background: var(--forest-950); color: #fff; }
.btn-primary .arrow { background: var(--lime-300); color: var(--forest-950); }
.btn-primary:hover { background: #001A09; }
.btn-lime { background: var(--lime-300); color: var(--forest-950); }
.btn-lime .arrow { background: var(--forest-950); color: var(--lime-300); }
.btn-lime:hover { background: #E2EC55; }
.btn-secondary { background: var(--grey-200); color: var(--ink); padding: 0 18px 0 5px; }
.btn-secondary .lead { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); background: #fff; }
.btn-secondary:hover { background: #E3E5E3; }
.btn-plain { padding: 0 18px; }
.btn-outline { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--grey-300); padding: 0 18px; }
.btn-outline:hover { background: var(--grey-50); }
.btn-ghost-dark { background: rgba(255,255,255,.1); color: #fff; padding: 0 18px; }
.btn-sm { height: 36px; padding: 0 4px 0 14px; font-size: var(--dw-text-14); border-radius: var(--r-sm); gap: 10px; }
.btn-sm .arrow { width: 28px; height: 28px; border-radius: 6px; }
.btn-sm.btn-plain, .btn-sm.btn-outline { padding: 0 14px; }
.btn-block { width: 100%; justify-content: center; }
.btn:focus-visible { outline: 2px solid var(--dw-focus); outline-offset: 2px; }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink); }
.link .ic { transition: transform var(--t-fast) var(--ease); }
.link:hover .ic { transform: translateX(3px); }
.link-u { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--grey-400); }
.link-u:hover { text-decoration-color: var(--ink); }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--r-xs);
  background: var(--grey-200); color: var(--ink); font-size: var(--dw-text-13); font-weight: 450; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.dark { background: var(--forest-950); color: #fff; }
.chip.lime { background: var(--lime-300); color: var(--forest-950); }
.chip.pos { background: var(--positive-bg); color: var(--positive); }
.chip.neg { background: var(--negative-bg); color: var(--negative); }
.chip.warn { background: var(--caution-bg); color: var(--caution); }
.chip.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--grey-300); color: var(--ink-muted); }
.chip.lg { height: 28px; padding: 0 10px; font-size: var(--dw-text-13); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--grey-200); font-size: var(--dw-text-12); font-weight: 600; }

/* ---------- Announcement + nav ---------- */
.announce { background: var(--forest-950); color: rgba(255,255,255,.85); font-size: var(--dw-text-14); }
.announce .container { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 40px; padding-block: 8px; flex-wrap: wrap; text-align: center; }
.announce .pill { background: var(--lime-400); color: var(--forest-950); font-size: var(--dw-text-12); font-weight: 600; padding: 2px 8px; border-radius: var(--r-xs); }
.announce a { color: var(--lime-300); display: inline-flex; align-items: center; gap: 2px; font-weight: 500; }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; padding-top: 16px; pointer-events: none; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--white); }
.nav { pointer-events: auto; display: flex; align-items: center; gap: 24px; height: 60px; padding: 0 8px 0 20px;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-radius: var(--r-md); box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(0,45,16,.06); }
.nav .brand { display: flex; align-items: center; gap: 10px; flex: none; }
.nav .brand img { height: 28px; width: auto; }
.nav-links { display: flex; gap: 4px; margin-inline: auto; }
.nav-links > a, .nav-links > .dd > button { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; border-radius: var(--r-sm); font-size: var(--dw-text-15); color: var(--ink); background: none; border: 0; }
.nav-links > a:hover, .nav-links > .dd > button:hover, .nav-links > a[aria-current="page"] { background: var(--grey-100); }
.nav-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.nav-actions .signin { padding: 0 12px; height: 36px; display: inline-flex; align-items: center; border-radius: var(--r-sm); }
.nav-actions .signin:hover { background: var(--grey-100); }
.dd { position: relative; }
.dd-panel { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: 640px; padding: 12px;
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(0,45,16,.06);
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; opacity: 0; visibility: hidden; transition: opacity var(--t-fast) var(--ease); }
.dd:hover .dd-panel, .dd.open .dd-panel { opacity: 1; visibility: visible; }
.dd > button[aria-expanded="true"] .ic { transform: rotate(180deg); }
.dd-panel a { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 10px; border-radius: var(--r-md); align-items: start; }
.dd-panel a:hover { background: var(--grey-100); }
.dd-panel .tile { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--grey-100); display: grid; place-items: center; }
.dd-panel a:hover .tile { background: var(--lime-300); }
.dd-panel strong { display: block; font-weight: 500; font-size: var(--dw-text-15); }
.dd-panel span { color: var(--ink-muted); font-size: var(--dw-text-13); line-height: 1.35; }
.menu-btn { display: none; width: 40px; height: 40px; border: 0; border-radius: var(--r-sm); background: var(--grey-100); place-items: center; }
.mobile-nav { display: none; }
@media (max-width: 1020px) {
  .nav-links, .nav-actions .signin, .nav-actions .btn { display: none; }
  .menu-btn { display: grid; }
  .nav-actions { margin-left: auto; }
  .mobile-nav.open { display: grid; pointer-events: auto; margin-top: 8px; padding: 12px; gap: 2px; background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-lg); max-height: calc(100vh - 120px); overflow: auto; }
  .mobile-nav a { padding: 12px; border-radius: var(--r-sm); font-size: var(--dw-text-16); }
  .mobile-nav a:hover { background: var(--grey-100); }
  .mobile-nav .sep { height: 1px; background: var(--grey-300); margin: 8px 0; }
  .mobile-nav .label { font: 500 var(--dw-text-12)/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); padding: 12px 12px 4px; }
}

/* ---------- Cards & surfaces ---------- */
.card { background: #fff; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--grey-300); }
.card-pad { padding: 24px; }
.panel { background: var(--grey-100); border-radius: var(--r-xl); padding: 48px; }
.panel.mist { background: var(--mist-50); }
@media (max-width: 640px) { .panel { padding: 20px; } }
.icon-tile { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--grey-100); display: grid; place-items: center; color: var(--ink); flex: none; }
.icon-tile.lime { background: var(--lime-300); }
.icon-tile.dark { background: var(--forest-950); color: var(--lime-300); }
.icon-tile.lg { width: 44px; height: 44px; border-radius: 10px; }
.hr { height: 1px; background: var(--grey-300); border: 0; margin: 0; }

/* ---------- Product UI fragments (used in marketing mocks) ---------- */
.ui { font-size: var(--dw-text-14); color: var(--ink); }
.ui-card { background: #fff; border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(0,45,16,.05); }
.ui-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: var(--border); margin-bottom: 12px; }
.ui-head .t { font-weight: 500; font-size: var(--dw-text-15); }
.ui-head .chip { margin-left: auto; }
.toast { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(0,45,16,.05); }
.toast .icon-tile { width: 40px; height: 40px; background: var(--lime-300); border-radius: 10px; }
.toast .t { font-weight: 500; font-size: var(--dw-text-14); line-height: 1.3; }
.toast .m { color: var(--ink-muted); font-size: var(--dw-text-13); line-height: 1.35; }
.toast .time { margin-left: auto; align-self: flex-start; color: var(--ink-faint); font-size: var(--dw-text-12); white-space: nowrap; }
.toast.glass { background: rgba(255,255,255,.14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); color: #fff; }
.toast.glass .m, .toast.glass .time { color: rgba(255,255,255,.75); }
.toast.dark { background: var(--forest-950); color: #fff; }
.toast.dark .m, .toast.dark .time { color: rgba(255,255,255,.72); }
.opt { border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--grey-300); padding: 10px 12px; display: grid; gap: 8px; }
.opt .top { display: flex; align-items: center; gap: 6px; padding-bottom: 8px; border-bottom: var(--border); }
.opt .top .sel { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font-size: var(--dw-text-13); }
.radio { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--grey-400); display: inline-block; }
.opt.on { box-shadow: inset 0 0 0 1.5px var(--forest-950); }
.opt.on .radio { box-shadow: inset 0 0 0 1.5px var(--forest-950), inset 0 0 0 4px #fff; background: var(--forest-950); }
.opt .bot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.opt .amt { font-size: var(--dw-text-18); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.opt .meta { color: var(--ink-muted); font-size: var(--dw-text-13); }
.flow { display: grid; justify-items: center; }
.flow > * { width: 100%; }
.connector { width: 12px !important; height: 28px; position: relative; justify-self: center; }
.connector::before { content: ""; position: absolute; left: 50%; top: 0; width: 9px; height: 9px; transform: translateX(-50%); border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px var(--grey-400); }
.connector::after { content: ""; position: absolute; left: 50%; top: 9px; bottom: 0; width: 1.5px; transform: translateX(-50%); background: linear-gradient(var(--grey-400), var(--grey-400)) top/100% calc(100% - 5px) no-repeat; }
.connector i { position: absolute; left: 50%; bottom: 0; width: 7px; height: 7px; transform: translateX(-50%) rotate(45deg); border-right: 1.5px solid var(--grey-400); border-bottom: 1.5px solid var(--grey-400); }
.on-gradient .connector::before { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.85); }
.on-gradient .connector::after { background: linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,.85)) top/100% calc(100% - 5px) no-repeat; }
.on-gradient .connector i { border-color: rgba(255,255,255,.85); }
.step { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: var(--r-md); padding: 10px 12px; box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(0,45,16,.05); }
.step .icon-tile { width: 32px; height: 32px; }
.step .t { font-weight: 500; font-size: var(--dw-text-15); min-width: 0; }
/* Chips never shrink below their words; the step text wraps instead. */
.step .chip { margin-left: auto; flex: none; white-space: nowrap; }
.chip { flex-shrink: 0; white-space: nowrap; }
.step.dark { background: var(--forest-950); color: #fff; }
.step.dark .chip { background: #fff; color: var(--forest-950); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: var(--dw-text-13); }
.kv + .kv { border-top: var(--border); }
.kv .k { color: var(--ink-muted); }
.kv .v { font-variant-numeric: tabular-nums; font-weight: 500; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: 72px; padding-bottom: 96px; background: var(--mist-50); margin-top: -76px; padding-top: calc(76px + 72px); }
.hero.dots { background-color: var(--mist-50); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-copy { display: grid; gap: 24px; align-content: start; }
.hero-copy .body-l { max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.hero-card { position: relative; border-radius: var(--r-2xl); background: var(--gradient-hero); padding: 40px; min-height: 560px; overflow: hidden; display: grid; align-content: center; }
.hero-card::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px); background-size: 24px 24px; pointer-events: none; }
.hero-card > * { position: relative; z-index: 1; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .hero-card { min-height: 0; padding: 24px; } }
@media (max-width: 480px) { .hero-card { padding: 16px; border-radius: var(--r-xl); } }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 48px; margin-top: 40px; }
.facts .v { font-size: var(--dw-text-40); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.facts .l { color: var(--ink-muted); margin-top: 10px; font-size: var(--dw-text-15); }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr 1fr; gap: 28px; } .facts .v { font-size: 32px; } }

/* page hero (inner pages) */
.page-hero { background: var(--mist-50); margin-top: -76px; padding-top: calc(76px + 80px); padding-bottom: 80px; }
.page-hero .section-head { gap: 20px; }

/* ---------- Segmented tabs ---------- */
.seg { display: flex; gap: 2px; padding: 4px; background: var(--grey-50); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--grey-200); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button, .seg a { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border: 0; background: none; border-radius: 9px; color: var(--ink-muted); font-size: var(--dw-text-15); white-space: nowrap; position: relative; }
.seg > * + *::before { content: ""; position: absolute; left: -1px; top: 30%; height: 40%; width: 1px; background: var(--grey-300); }
.seg [aria-selected="true"], .seg .on { background: var(--grey-200); color: var(--ink); font-weight: 500; }
.seg [aria-selected="true"]::before, .seg [aria-selected="true"] + *::before { display: none; }
.seg button:hover { color: var(--ink); }

/* ---------- Feature columns ---------- */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature { display: grid; gap: 12px; align-content: start; padding: 4px 32px 4px 20px; border-left: var(--border); }
.feature p { color: var(--ink-muted); }
.feature .link { margin-top: 8px; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Logo / segment strip ---------- */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.strip > * { display: flex; align-items: center; justify-content: center; gap: 10px; height: 64px; padding: 0 12px; border-radius: var(--r-md); background: var(--grey-50); color: var(--sage-700); font-weight: 500; font-size: var(--dw-text-15); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--forest-950); color: #fff; border-radius: var(--r-xl); padding: 40px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1.2px); background-size: 20px 20px; pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.02em; font-weight: 400; }
.cta-band p { color: var(--ink-on-dark-muted); margin-top: 6px; }
@media (max-width: 640px) { .cta-band { padding: 28px 20px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); border-top: var(--border); padding-top: 72px; padding-bottom: 40px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-grid h3 { font: 500 var(--dw-text-12)/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid li a { color: var(--ink-muted); font-size: var(--dw-text-15); }
.footer-grid li a:hover { color: var(--ink); }
.footer-brand { display: grid; gap: 16px; align-content: start; }
.footer-brand img { height: 30px; width: auto; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: var(--border); color: var(--ink-faint); font-size: var(--dw-text-14); }
.footer-bottom .row { gap: 20px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #2E9B4A; box-shadow: 0 0 0 3px #D9F0DC; display: inline-block; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: var(--dw-text-14); font-weight: 500; }
.field .hint { font-size: var(--dw-text-13); color: var(--ink-faint); }
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: #fff; box-shadow: inset 0 0 0 1px var(--grey-300); font-size: var(--dw-text-15); transition: box-shadow var(--t-fast) var(--ease); }
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
.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='%234D5C53' stroke-width='1.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.input:hover, .select:hover, .textarea:hover { box-shadow: inset 0 0 0 1px var(--grey-400); }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--dw-focus); outline-offset: 2px; box-shadow: inset 0 0 0 1.5px var(--forest-950); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--negative); }
.error { color: var(--negative); font-size: var(--dw-text-13); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--dw-text-14); color: var(--ink-muted); }
.check input { width: 18px; height: 18px; accent-color: var(--forest-950); margin-top: 1px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--grey-300); background: #fff; }
table.t { width: 100%; border-collapse: collapse; font-size: var(--dw-text-15); font-variant-numeric: tabular-nums; }
table.t th { text-align: left; font-weight: 500; color: var(--ink-muted); font-size: var(--dw-text-13); padding: 14px 18px; border-bottom: var(--border); background: var(--grey-50); }
table.t td { padding: 14px 18px; border-bottom: var(--border); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t .r { text-align: right; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 8px; }
.faq details { background: #fff; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--grey-300); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 20px; font-weight: 500; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform var(--t-fast) var(--ease); }
.faq details[open] summary .ic { transform: rotate(45deg); }
.faq details > div { padding: 0 20px 20px; color: var(--ink-muted); max-width: 70ch; }

/* ---------- Prose (legal, help, changelog) ---------- */
.prose { max-width: 720px; color: var(--ink-muted); font-size: var(--dw-text-16); line-height: 1.7; }
.prose h2 { color: var(--ink); font-size: var(--dw-text-24); letter-spacing: -0.02em; margin: 48px 0 12px; }
.prose h3 { color: var(--ink); font-size: var(--dw-text-18); margin: 32px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--grey-100); padding: 2px 6px; border-radius: 4px; color: var(--ink); }

/* ---------- Code ---------- */
.code { background: var(--forest-950); color: #E7EFE9; border-radius: var(--r-lg); padding: 20px 22px; font: var(--dw-text-14)/1.65 var(--font-mono); overflow-x: auto; }
.code .k { color: var(--lime-300); } .code .s { color: #B9D9A6; } .code .c { color: #7F9A88; } .code .n { color: #F3D58A; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise var(--t-slow) var(--ease) both; }
  .rise.d1 { animation-delay: 120ms; } .rise.d2 { animation-delay: 240ms; } .rise.d3 { animation-delay: 360ms; } .rise.d4 { animation-delay: 480ms; } .rise.d5 { animation-delay: 600ms; }
}
@keyframes rise { from { opacity: .35; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Robustness fixes (shared) ---------- */
[hidden] { display: none !important; }
.stack > *, .split > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .hero-grid > *, .row > * { min-width: 0; }
.table-wrap { position: relative; }
@media (max-width: 960px) {
  .hero-grid, .split, .split.flip { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Proof: sample marker, avatars, logos, quotes, figures ---------- */
/* Content states (decision review §1, version 3), tightened in wave 14: a quiet 12px marker in sentence case
   (no mono, no uppercase, so it holds in Amharic), with one legend band per page (.disclosure). A dashed ring
   means invented; a solid ring means not built yet. Both show only in preview builds; a production build refuses
   to run while any would ship (tools/publish-gate). */
.sample, .planned, .dmark { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none;
  font: 500 var(--dw-text-12)/1.2 var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--ink-faint);
  white-space: nowrap; vertical-align: baseline; cursor: help; }
.sample::before, .planned::before, .dmark::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; box-sizing: border-box; }
.sample::before, .dmark.is-sample::before { border: 1.5px dashed currentColor; }
.planned::before, .dmark.is-planned::before { border: 1.5px solid var(--sage-500); }
.sample.on-dark, .planned.on-dark { color: var(--ink-on-dark-muted); }
.planned.on-dark::before { border-color: var(--lime-300); }
.disclosure { background: var(--mist-50); border-top: 1px solid var(--grey-300); color: var(--ink-muted); font-size: var(--dw-text-12); }
.disclosure .container { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; min-height: 32px; padding-block: 6px; }
.disclosure .container > span:first-child { font-weight: 500; color: var(--ink); }
.disclosure .dmark { margin-right: 4px; color: var(--ink); cursor: default; }
.sample, .planned { margin-left: 6px; }
.state-tags { display: inline-flex; gap: 6px; flex-wrap: wrap; vertical-align: middle; margin-left: 4px; }
.state-tags .sample, .state-tags .planned, .logo-tile .sample, .fig-tag .sample, .qc-top .sample, .qf-top .sample, .sc-top .sample { margin-left: 0; }
td > .planned, th > .planned, td > .sample, th > .sample { margin-left: 6px; }
.avatar { --s: 40px; flex: none; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--grey-200); color: var(--ink); font: 600 calc(var(--s) * .36)/1 var(--font-sans); letter-spacing: .02em; }
.avatar.dark { background: var(--lime-300); color: var(--forest-950); }
.logo-wall-wrap { display: grid; gap: 20px; }
.logo-label { text-align: center; color: var(--ink-muted); font-size: var(--dw-text-18); display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.logo-wall { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.logo-tile { position: relative; display: grid; place-items: center; height: 76px; padding: 0 14px; border-radius: var(--r-md); background: var(--grey-50); }
.logo-tile img { max-width: 100%; opacity: .92; }
/* The row's label carries the marker for the whole logo wall; each tile keeps its marker for screen readers only. */
.logo-tile .sample { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 960px) { .logo-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .logo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } .logo-tile { height: 64px; } }
.quote-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .quote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .quote-grid { grid-template-columns: minmax(0, 1fr); } }
.quote-card { margin: 0; display: flex; flex-direction: column; gap: 18px; padding: 24px; background: #fff; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--grey-300); min-width: 0; }
.quote-card .qc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.quote-card blockquote { margin: 0; font-size: var(--dw-text-16); line-height: 1.55; color: var(--ink); letter-spacing: -0.005em; }
.quote-card figcaption { margin-top: auto; display: flex; gap: 12px; align-items: center; font-size: var(--dw-text-14); }
.quote-card figcaption div { display: grid; gap: 1px; min-width: 0; }
.quote-card figcaption strong { font-weight: 500; font-size: var(--dw-text-15); }
.quote-card figcaption span { color: var(--ink-muted); }
.quote-card figcaption span.faint { color: var(--ink-faint); }
.quote-feature { margin: 0; position: relative; overflow: hidden; display: grid; gap: 24px; padding: 48px; border-radius: var(--r-xl); background: var(--forest-950); color: #fff; }
.quote-feature::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 120% at 100% 100%, rgba(197,216,90,.28), transparent 60%); pointer-events: none; }
.quote-feature > * { position: relative; }
.quote-feature .qf-top { display: flex; justify-content: space-between; align-items: flex-start; }
.quote-feature .qf-mark { font-size: 72px; line-height: .6; color: var(--lime-300); font-weight: 600; height: 34px; }
.quote-feature blockquote { margin: 0; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.3; letter-spacing: -0.02em; max-width: 30ch; text-wrap: balance; }
.quote-feature figcaption { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.quote-feature figcaption div { display: grid; gap: 2px; }
.quote-feature figcaption strong { font-weight: 500; }
.quote-feature figcaption span { color: var(--ink-on-dark-muted); font-size: var(--dw-text-14); }
@media (max-width: 640px) { .quote-feature { padding: 28px 20px; } .quote-feature figcaption .chip { margin-left: 0 !important; } }
.figures { position: relative; display: grid; gap: 20px; border-radius: var(--r-xl); padding: 40px; background: var(--mist-50); box-shadow: inset 0 0 0 1px var(--grey-300); }
.figures.dark { background: var(--forest-950); color: #fff; box-shadow: none; overflow: hidden; }
.figures.dark::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px); background-size: 20px 20px; pointer-events: none; }
.figures > * { position: relative; }
.fig-tag { display: flex; justify-content: flex-end; }
.fig-row { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.mod-card > img { align-self: flex-start; }
.fig { display: grid; gap: 10px; align-content: start; padding: 4px 24px; border-left: 1px solid var(--grey-300); }
.figures.dark .fig { border-left-color: rgba(255,255,255,.14); }
.fig:first-child { border-left: 0; padding-left: 0; }
.fig .v { font-size: clamp(32px, 3.6vw, 44px); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.figures.dark .fig .v { color: var(--lime-300); }
.fig .l { color: var(--ink-muted); font-size: var(--dw-text-15); max-width: 22ch; }
.figures.dark .fig .l { color: var(--ink-on-dark-muted); }
@media (max-width: 960px) { .fig-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; } .fig:nth-child(3) { border-left: 0; padding-left: 0; } }
@media (max-width: 640px) { .figures { padding: 28px 20px; } .fig { padding: 0 0 0 16px; } .fig:nth-child(odd) { padding-left: 0; } }
@media (max-width: 400px) { .fig-row { grid-template-columns: minmax(0, 1fr); } .fig { border-left: 0; padding-left: 0; } }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--dw-text-14); color: var(--ink-faint); }
.crumbs a { color: var(--ink-muted); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--ink); }

/* --gap is set per element and must not leak into nested stacks and grids */
@property --gap { syntax: "<length>"; inherits: false; initial-value: 16px; }
.row:not([style*="--gap"]) { gap: 12px; }
.grid-2:not([style*="--gap"]), .grid-3:not([style*="--gap"]), .grid-4:not([style*="--gap"]) { gap: 24px; }
.bg-mist .logo-tile { background: #fff; box-shadow: inset 0 0 0 1px var(--grey-200); }
.quote-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .quote-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .quote-grid.four { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Accessibility (wave 9) ---------- */
main:focus { outline: none; }
/* Focus rings stay visible on dark surfaces. */
.announce :focus-visible, .cta-band :focus-visible, .hero-card :focus-visible, .toast.dark :focus-visible, .step.dark :focus-visible { outline-color: var(--lime-300); }
/* Scrollable regions made focusable by a11y.js get a visible ring. */
[data-a11y-scroll]:focus-visible { outline: 2px solid var(--dw-focus); outline-offset: 2px; }
/* Text-only sample marker for screen readers when the visual tag is decorative. */
.sample-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tables written straight into running text scroll inside their own box on small screens. */
.prose table { display: block; max-width: 100%; overflow-x: auto; }
.prose > *, .doc > *, article > * { min-width: 0; }
.prose p, .prose li, .prose td, .prose th, .note, .callout { overflow-wrap: anywhere; }
/* Grid and flex children shrink below their longest word at large text sizes. */
.card, .cap, .feature, .kpi, .tile-item, .ui-card { min-width: 0; }
.card p, .cap p, .feature p, .faq details > div { overflow-wrap: break-word; }
/* At large text sizes, long words break and button labels wrap rather than push the page sideways. */
p, li, dd, dt, td, th, h1, h2, h3, h4, figcaption, blockquote { overflow-wrap: break-word; }
.btn { white-space: normal; height: auto; min-height: 46px; padding-block: 5px; line-height: 1.25; }
.btn-sm { min-height: 36px; padding-block: 4px; }
/* Flex and grid items that hold text may shrink; links wrap their label next to the arrow. */
.link { max-width: 100%; flex-wrap: wrap; }
.mod > *, .mod-card > *, .facts-list > div > *, .step > *, .toast > * { min-width: 0; }
.facts-list > div { grid-template-columns: minmax(0, 1fr); }
/* Keep the focused element clear of the sticky header when tabbing or following an anchor. */
html { scroll-padding-top: 104px; }

/* Headings that take focus on navigation: the ring hugs the words. */
h1[tabindex="-1"] { width: fit-content; max-width: 100%; }

/* The public build's word for a feature or service not there yet (src/content_state.py, tag). */
.chip.coming { margin-left: 6px; vertical-align: middle; font-size: 12px; padding: 2px 8px; background: var(--dw-surface-sunken, #eef0ea); color: var(--dw-ink-muted, #555); }
