/* =========================================================================
   Kubuno — site stylesheet
   Design tokens derived from the core themes (Google Workspace palette),
   typography DM Sans, layout inspired by modern product sites (Adobe-like).
   ========================================================================= */

:root {
  /* Brand / Google Workspace palette */
  --color-primary:        #1a73e8;
  --color-primary-hover:  #1557b0;
  --color-primary-light:  #d3e3fd;
  --color-primary-tint:   #eaf1fb;

  --ink:                  #202124;
  --ink-2:                #3c4043;
  --muted:                #5f6368;
  --muted-2:              #80868b;

  --surface-0:            #ffffff;
  --surface-1:            #f8f9fa;
  --surface-2:            #f1f3f4;
  --surface-3:            #e8eaed;
  --body-bg:              #ffffff;

  --border:               #e3e6ea;
  --border-strong:        #d3d7dc;

  --danger:               #d93025;
  --success:              #1e8e3e;
  --warning:              #f9ab00;

  --dark-bg:              #0e1525;
  --dark-bg-2:            #161f33;

  /* Typography */
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Shape & depth */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(60,64,67,.10), 0 1px 3px rgba(60,64,67,.06);
  --shadow-md: 0 4px 16px rgba(32,33,36,.08), 0 2px 6px rgba(32,33,36,.05);
  --shadow-lg: 0 18px 50px rgba(32,33,36,.14), 0 6px 18px rgba(32,33,36,.08);
  --shadow-primary: 0 10px 28px rgba(26,115,232,.35);
  /* Core @kubuno/ui MenuDropdown light-palette shadow (verbatim) */
  --menu-shadow: 0 2px 6px 2px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.3);

  --container: 1200px;
  --header-h: 70px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ----------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--body-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.02em; font-weight: 700; color: var(--ink); }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
code { font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.icon { flex: none; }

::selection { background: var(--color-primary-light); color: var(--color-primary-hover); }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--color-primary); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 16px; }

/* ------------------------------------------------------------- Layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--color-primary); margin-bottom: 16px;
}
.eyebrow--light { color: #8ab4f8; }

.section-head { max-width: 760px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin-bottom: 16px; }
.section-head p { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); }
.section-head--light h2 { color: #fff; }
.section-head--light p { color: #c3cad6; }

.section-cta { text-align: center; margin-top: clamp(36px, 5vw, 56px); }

.grad-text {
  background: linear-gradient(100deg, #1a73e8 0%, #7c4dff 50%, #d01884 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ------------------------------------------------------------- Buttons */
/* Faithful to core @kubuno/ui Button: rounded-md (6px, never overridable),
   flat, font-medium, text-sm at every size, heights 32/36/44, transition-colors
   only (no transform), focus-visible ring 2px primary + 1px offset. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: 6px; border: 1px solid transparent;
  font-weight: 500; font-size: .875rem; line-height: 1.25rem; white-space: nowrap;
  user-select: none; -webkit-user-select: none;
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--color-primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--sm { height: 32px; padding: 0 12px; gap: 6px; }
.btn--lg { height: 44px; padding: 0 20px; }
.btn--block { width: 100%; }

/* primary */
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-hover); }
/* secondary (core) — also the alias used by our --soft buttons */
.btn--soft, .btn--secondary { background: var(--surface-0); border-color: var(--border); color: var(--ink); }
.btn--soft:hover, .btn--secondary:hover { background: var(--surface-1); }
/* ghost (core) */
.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--surface-2); }
/* light / outline — same shape, for dark bands */
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--surface-1); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 600;
  color: var(--color-primary); transition: gap .2s var(--ease), color .2s;
}
.link-arrow .icon { transition: transform .2s var(--ease); }
.link-arrow:hover { color: var(--color-primary-hover); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ------------------------------------------------------------- Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.site-header__inner { height: 100%; display: flex; align-items: center; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand__mark { color: var(--color-primary); }
.brand__name { font-size: 1.28rem; letter-spacing: -.02em; }

.site-nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem;
  color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--surface-1); color: var(--ink); }
.nav-link .icon { color: var(--muted-2); transition: transform .2s var(--ease); }
.nav-link.is-active { color: var(--color-primary); }
.nav-link.is-active .icon { color: var(--color-primary); }

/* Dropdown panel — reproduces core MenuDropdown (light palette) */
.nav-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 120;
  min-width: 240px; background: #fff; border-radius: 4px; padding: 6px;
  box-shadow: var(--menu-shadow);
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .16s var(--ease), transform .16s var(--ease);
}
.nav-menu--wide { min-width: 720px; padding: 0; overflow: hidden; }

/* Apps mega-menu — illustrated promo + airy launcher grid */
.apps-menu { display: grid; grid-template-columns: 220px 1fr; }
.apps-menu__promo { display: flex; flex-direction: column; padding: 22px; background: linear-gradient(165deg, #eaf1fb, #f3eefe); }
.apps-menu__art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 64px; margin-bottom: 16px; }
.apps-menu__art span { aspect-ratio: 1; border-radius: 7px; }
.apps-menu__promo h4 { font-size: 1.08rem; margin-bottom: 6px; }
.apps-menu__promo p { flex: 1; font-size: .85rem; color: var(--muted); line-height: 1.5; margin-bottom: 16px; }
.apps-menu__cta { display: flex; flex-direction: column; gap: 8px; }
.apps-menu__main { padding: 14px; }
.apps-menu__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.apps-tile { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; padding: 13px 6px; border-radius: 10px; transition: background .12s; }
.apps-tile:hover { background: rgba(0,0,0,.05); }
.apps-tile .nm-ic--app { width: 42px; height: 42px; border-radius: 12px; }
.apps-tile .nm-ic--app img { width: 24px; height: 24px; }
.apps-tile .nm-ic--app span { font-size: 16px; }
.apps-tile__name { font-size: 12px; font-weight: 500; color: var(--ink); line-height: 1.2; }
/* invisible hover bridge across the 8px gap to the panel */
.nav-item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.nav-item:hover > .nav-menu,
.nav-item:focus-within > .nav-menu { opacity: 1; transform: none; pointer-events: auto; }
.nav-item:hover > .nav-link .icon,
.nav-item:focus-within > .nav-link .icon { transform: rotate(180deg); }

/* Menu items (core MenuDropdown metrics) */
.nm-cols { display: grid; gap: 2px 8px; }
.nm-cols--2 { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
.nm-cols--3 { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
.nm-label { margin: 6px 12px 2px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.nm-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 6px;
  font-size: 13px; line-height: 20px; color: var(--ink); transition: background .12s;
}
.nm-item:hover { background: rgba(0,0,0,.06); }
.nm-ic { width: 22px; height: 22px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--color-primary); }
.nm-ic--app { border-radius: 6px; background: color-mix(in srgb, var(--app) 12%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app) 22%, transparent); }
.nm-ic--app span { font-weight: 700; font-size: 12px; color: var(--app); }
.nm-ic--tint { width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, var(--app) 14%, #fff); color: var(--app); }
.nm-tx { flex: 1; min-width: 0; }
.nm-tx strong { display: block; font-weight: 600; font-size: 13px; }
.nm-tx small { display: block; font-size: 11px; color: var(--muted); }
.nm-item--more { color: var(--color-primary); font-weight: 600; }
.nm-item--more .icon { margin-left: 2px; }
.nm-sep { height: 1px; background: #e0e0e0; margin: 6px 4px; }
.site-header__cta { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border: none; border-radius: 10px;
  background: var(--surface-1); color: var(--ink); align-items: center; justify-content: center;
}

.mobile-nav { display: none; }

/* ------------------------------------------------------------- Hero */
.hero { position: relative; padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 7vw, 88px); overflow: hidden; }
.hero__bg {
  position: absolute; inset: -20% -10% auto -10%; height: 130%; z-index: -1;
  background:
    radial-gradient(60% 55% at 18% 12%, rgba(26,115,232,.16), transparent 60%),
    radial-gradient(50% 50% at 88% 8%, rgba(124,77,255,.14), transparent 60%),
    radial-gradient(55% 60% at 75% 95%, rgba(208,24,132,.10), transparent 60%),
    linear-gradient(180deg, var(--surface-1), #fff 70%);
}
.hero__inner {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero__title { font-size: clamp(2.5rem, 6vw, 4.2rem); letter-spacing: -.035em; }
.hero__lead { margin-top: 22px; font-size: clamp(1.1rem, 1.7vw, 1.32rem); color: var(--muted); max-width: 36ch; }
.hero__lead strong { color: var(--ink); font-weight: 600; }
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero__badges {
  list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px;
}
.hero__badges li { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; font-size: .96rem; }
.hero__badges .icon { color: var(--success); }
.hero__media { position: relative; }
.hero__media img { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(32,33,36,.18)); border-radius: var(--r-lg); }

/* ------------------------------------------------------------- Trust bar */
.trustbar { border-block: 1px solid var(--border); background: var(--surface-1); }
.trustbar__inner { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 40px; padding: 26px 24px; }
.trustbar__label { font-weight: 600; color: var(--muted); font-size: .92rem; }
.trustbar__stats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-left: auto; }
.trustbar__stats div { display: flex; align-items: baseline; gap: 8px; }
.trustbar__stats strong { font-size: 1.35rem; color: var(--ink); letter-spacing: -.02em; }
.trustbar__stats span { color: var(--muted); font-size: .95rem; }

/* ------------------------------------------------------------- Pillars */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pillar {
  background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 26px 24px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.pillar__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: 12px; background: var(--color-primary-tint); color: var(--color-primary); margin-bottom: 16px;
}
.pillar h3 { font-size: 1.12rem; margin-bottom: 8px; }
.pillar p { color: var(--muted); font-size: .96rem; }

/* ------------------------------------------------------------- Apps */
.section--apps { background: var(--surface-1); }
.app-group { margin-bottom: clamp(32px, 4vw, 48px); }
.app-group__title {
  font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.app-group__title--lg { font-size: 1.4rem; letter-spacing: -.01em; text-transform: none; color: var(--ink); border: 0; padding-bottom: 0; margin-bottom: 22px; }

.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.app-grid--detailed { grid-template-columns: repeat(3, 1fr); gap: 18px; }

.app-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 20px; transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--app) 40%, var(--border)); }
.app-card--link { cursor: pointer; }
.app-card__body h3, .app-card__body h4 { font-size: 1.08rem; margin-bottom: 5px; }
.app-card__body p { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.app-card__repo { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: .82rem; color: var(--muted-2); font-weight: 500; }

.app-icon {
  flex: none; width: 52px; height: 52px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--app) 12%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app) 22%, transparent);
}
.app-icon img { width: 30px; height: 30px; }
.app-icon--mono { background: var(--app); }
.app-icon--mono span { color: #fff; font-weight: 700; font-size: 1.4rem; }

/* ------------------------------------------------------------- Spotlights */
.spotlights { padding: clamp(40px, 6vw, 72px) 0; }
.spotlight {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 72px); align-items: center;
  padding: clamp(40px, 6vw, 80px) 0;
}
.spotlight + .spotlight { border-top: 1px solid var(--border); }
.spotlight--rev .spotlight__copy { order: 2; }
.spotlight__copy .eyebrow { color: var(--app); }
.spotlight__copy h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); margin-bottom: 16px; }
.spotlight__copy p { color: var(--muted); font-size: 1.1rem; margin-bottom: 22px; }
.spotlight__copy .link-arrow { color: var(--app); }
.spotlight__media img, .spotlight__media svg {
  width: 100%; height: auto; border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

/* ------------------------------------------------------------- Dark security */
.section--dark { background: var(--dark-bg); position: relative; overflow: hidden; }
.section--dark::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(50% 50% at 12% 0%, rgba(26,115,232,.22), transparent 60%),
    radial-gradient(40% 45% at 90% 100%, rgba(124,77,255,.18), transparent 60%);
}
.section--dark .container { position: relative; z-index: 1; }
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sec-card {
  display: flex; gap: 14px; padding: 24px; border-radius: var(--r-md);
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
  transition: transform .22s var(--ease), background .22s;
}
.sec-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.07); }
.sec-card__check {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(138,180,248,.16); color: #8ab4f8;
}
.sec-card h3 { color: #fff; font-size: 1.08rem; margin-bottom: 6px; }
.sec-card p { color: #aeb6c4; font-size: .94rem; }

/* ------------------------------------------------------------- Architecture */
.section--arch { background: var(--surface-1); }
.arch { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 0; }
.arch__layer {
  width: 100%; text-align: center; border-radius: var(--r-md); padding: 22px 26px;
  background: var(--surface-0); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.arch__layer--core { background: linear-gradient(120deg, #1a73e8, #4d38db); border: 0; color: #fff; box-shadow: var(--shadow-primary); }
.arch__layer--core .arch__tag { color: #fff; }
.arch__layer--core p { color: rgba(255,255,255,.85); }
.arch__tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.arch__layer p { color: var(--muted); font-size: .94rem; }
.arch__layer code { background: rgba(0,0,0,.05); padding: 1px 6px; border-radius: 5px; }
.arch__layer--core code { background: rgba(255,255,255,.18); }
.arch__pipe { width: 2px; height: 26px; background: linear-gradient(var(--border-strong), var(--border-strong)); }
.arch__apps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 6px 0; }
.arch__chip {
  font-weight: 600; font-size: .86rem; padding: 7px 13px; border-radius: 999px;
  background: color-mix(in srgb, var(--app) 12%, #fff); color: color-mix(in srgb, var(--app) 80%, #000);
  border: 1px solid color-mix(in srgb, var(--app) 28%, transparent);
}
.arch__chip--more { --app: #5f6368; }

/* ------------------------------------------------------------- CTA band */
.cta-band {
  background: linear-gradient(120deg, #1557b0 0%, #1a73e8 45%, #4d38db 100%);
  color: #fff; position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40% 80% at 85% 20%, rgba(255,255,255,.16), transparent 60%);
}
.cta-band__inner { position: relative; z-index: 1; text-align: center; padding: clamp(60px, 8vw, 104px) 0; }
.cta-band__inner h2 { color: #fff; font-size: clamp(2rem, 4vw, 3.1rem); margin-bottom: 14px; }
.cta-band__inner p { color: rgba(255,255,255,.9); font-size: 1.15rem; max-width: 56ch; margin: 0 auto 32px; }
.cta-band__inner code { background: rgba(255,255,255,.18); padding: 1px 7px; border-radius: 5px; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ------------------------------------------------------------- Page hero */
.page-hero { padding: clamp(56px, 8vw, 104px) 0 clamp(36px, 5vw, 56px); background: linear-gradient(180deg, var(--surface-1), #fff); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -.03em; max-width: 16ch; }
.page-hero__lead { margin-top: 20px; font-size: clamp(1.08rem, 1.7vw, 1.28rem); color: var(--muted); max-width: 60ch; }
.page-hero--dark { background: var(--dark-bg); }
.page-hero--dark h1 { color: #fff; }
.page-hero--dark .page-hero__lead { color: #aeb6c4; }
.error-page { text-align: center; }
.error-page h1, .error-page .page-hero__lead { margin-inline: auto; }
.error-page .hero__actions { justify-content: center; }

/* ------------------------------------------------------------- Security page */
.sec-grid--page { grid-template-columns: repeat(2, 1fr); gap: 20px; }
.sec-card--page { background: var(--surface-1); border-color: var(--border); }
.sec-card--page:hover { background: var(--surface-0); box-shadow: var(--shadow-md); }
.sec-card--page .sec-card__check { background: var(--color-primary-tint); color: var(--color-primary); }
.sec-card--page h2 { color: var(--ink); font-size: 1.18rem; margin-bottom: 6px; }
.sec-card--page p { color: var(--muted); }

.principles { max-width: 820px; margin: 0 auto; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(28px, 4vw, 44px); }
.principles h2 { font-size: 1.6rem; margin-bottom: 22px; }
.principles__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.principles__list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.principles__list .icon { color: var(--success); margin-top: 3px; flex: none; }
.principles__list code { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }

/* ------------------------------------------------------------- Install page */
.install-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.step { display: flex; gap: 18px; }
.step__num {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
  background: var(--color-primary); color: #fff; box-shadow: var(--shadow-primary);
}
.step__body { flex: 1; min-width: 0; }
.step__body h2 { font-size: 1.25rem; margin-bottom: 10px; }
.step__body > p { color: var(--muted); margin-bottom: 14px; }

.code-block { position: relative; background: #0e1525; border-radius: var(--r-md); padding: 18px 20px; overflow: hidden; box-shadow: var(--shadow-md); }
.code-block pre { margin: 0; overflow-x: auto; }
.code-block code { color: #c9d1d9; font-size: .9rem; line-height: 1.7; white-space: pre; }
/* highlight.js: keep our dark container background, use theme token colors */
.code-block .hljs, .code-tabs .hljs { background: transparent; padding: 0; color: #c9d1d9; }
.code-block__copy {
  position: absolute; top: 12px; right: 12px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08); color: #cfd8e8; font-size: .78rem; font-weight: 600;
  padding: 5px 11px; border-radius: 7px; transition: background .18s, color .18s;
}
.code-block__copy:hover { background: rgba(255,255,255,.16); color: #fff; }
.code-block__copy.is-copied { background: var(--success); color: #fff; border-color: transparent; }

.install-aside { display: grid; gap: 18px; position: sticky; top: calc(var(--header-h) + 20px); }
.install-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; }
.install-card h3 { font-size: 1.1rem; margin-bottom: 14px; }
.install-link { display: flex; align-items: center; gap: 10px; padding: 9px 0; color: var(--ink-2); font-weight: 500; border-bottom: 1px solid var(--border); transition: color .18s; }
.install-link:last-child { border-bottom: 0; }
.install-link:hover { color: var(--color-primary); }
.install-link .icon { color: var(--color-primary); }
.install-card--accent { background: var(--color-primary-tint); border-color: var(--color-primary-light); }
.install-card--accent p { color: var(--ink-2); margin-bottom: 16px; }

/* ------------------------------------------------------------- Footer */
.site-footer { background: var(--dark-bg); color: #aeb6c4; padding: clamp(48px, 6vw, 76px) 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 36px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.10); }
.brand--footer .brand__mark { color: #fff; }
.brand--footer .brand__name { color: #fff; }
.footer-brand__tag { margin-top: 16px; max-width: 30ch; color: #aeb6c4; }
.footer-brand__lic { margin-top: 12px; font-size: .86rem; color: var(--muted-2); }
.footer-col h3 { color: #fff; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col a { display: block; padding: 6px 0; color: #aeb6c4; font-size: .96rem; transition: color .18s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 24px; font-size: .88rem; color: var(--muted-2); }
.footer-bottom a { color: #aeb6c4; font-weight: 500; transition: color .18s; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom__made a { color: var(--muted-2); font-weight: 600; transition: color .18s; }
.footer-bottom__made a:hover { color: #fff; }

/* ------------------------------------------------------------- CTA variants */
.section-cta--row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cta-band--alt { background: linear-gradient(120deg, #6a1b9a 0%, #9334e6 45%, #d01884 100%); }

/* ------------------------------------------------------------- Clients (home band) */
.section--clients { background: var(--surface-1); }
.clients-band {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center;
  background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: clamp(28px, 4vw, 52px); box-shadow: var(--shadow-md);
}
.clients-band__media img { width: 100%; height: auto; border-radius: var(--r-lg); }

/* ---- Royalty-free photos (self-hosted, object-fit framed) ---- */
.photo-frame { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); position: relative; line-height: 0; aspect-ratio: 4 / 3; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-frame--tall { aspect-ratio: 3 / 4; }
.photo-frame--wide { aspect-ratio: 16 / 9; }
.clients-band__media .photo-frame { aspect-ratio: 4 / 3; }

/* Full-bleed photo band with dark gradient overlay + light text */
.photo-band { position: relative; isolation: isolate; padding: clamp(72px, 11vw, 132px) 0; color: #fff; overflow: hidden; }
.photo-band__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.photo-band::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(10,15,28,.95) 0%, rgba(10,15,28,.88) 34%, rgba(10,15,28,.64) 58%, rgba(10,15,28,.34) 100%),
    linear-gradient(180deg, rgba(10,15,28,.18), transparent 32%, rgba(10,15,28,.28)); }
.photo-band__inner { max-width: 600px; }
.photo-band h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -.02em; margin-bottom: 14px; }
.photo-band p { color: #d7dde7; font-size: 1.1rem; line-height: 1.6; margin-bottom: 24px; }

/* Contained rounded photo feature card (premium, integrates with the card UI) */
.photo-feature { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl);
  min-height: clamp(380px, 42vw, 520px); display: flex; align-items: center; box-shadow: var(--shadow-md); }
.photo-feature__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.photo-feature::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(95deg, rgba(12,17,30,.93) 0%, rgba(12,17,30,.80) 32%, rgba(12,17,30,.46) 60%, rgba(12,17,30,.12) 100%); }
.photo-feature__content { padding: clamp(30px, 5vw, 68px); max-width: 560px; color: #fff; }
.photo-feature__content .eyebrow { color: #8ab4f8; }
.photo-feature__content h2 { color: #fff; font-size: clamp(1.8rem, 3.2vw, 2.5rem); letter-spacing: -.02em; margin-bottom: 14px; }
.photo-feature__content p { color: #d9deea; font-size: 1.1rem; line-height: 1.6; margin-bottom: 26px; }
@media (max-width: 720px) {
  .photo-feature::after { background: linear-gradient(180deg, rgba(12,17,30,.62) 0%, rgba(12,17,30,.86) 100%); }
  .photo-feature__content { max-width: none; }
}

/* Photo as a darkened background layer inside an existing dark section/hero */
.has-photo-bg { position: relative; isolation: isolate; }
.has-photo-bg .photo-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .22; }
.has-photo-bg .photo-bg + * { position: relative; }
.clients-band__copy h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 14px; }
.clients-band__copy p { color: var(--muted); font-size: 1.06rem; margin-bottom: 20px; }
.clients-band__copy code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }
.clients-band__list { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 11px; }
.clients-band__list li { display: flex; align-items: center; gap: 11px; font-weight: 500; color: var(--ink-2); }
.clients-band__list .icon { color: var(--color-primary); }

/* ------------------------------------------------------------- Clients page */
.clients-hero { padding-bottom: clamp(40px, 6vw, 72px); }
.about-hero { padding-bottom: clamp(40px, 6vw, 72px); }
.about-hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-hero__inner h1 { max-width: none; }
@media (max-width: 880px) { .about-hero__inner { grid-template-columns: 1fr; } }
.clients-hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.clients-hero__inner img { width: 100%; height: auto; filter: drop-shadow(0 24px 50px rgba(32,33,36,.16)); }

.clients-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.client-card {
  background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 30px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.client-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--app) 40%, var(--border)); }
.client-card__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
  border-radius: 15px; margin-bottom: 18px;
  background: color-mix(in srgb, var(--app) 14%, #fff); color: var(--app);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app) 24%, transparent);
}
.client-card h2 { font-size: 1.3rem; margin-bottom: 12px; }
.client-card p { color: var(--muted); margin: 14px 0 18px; }
.client-card__platforms { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-chip {
  font-size: .8rem; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--app) 12%, #fff); color: color-mix(in srgb, var(--app) 78%, #000);
}
.client-card .link-arrow { color: var(--app); }

/* ------------------------------------------------------------- Marketplace */
.market-hero { background: linear-gradient(180deg, #f3eefe, #fff); }
.market-stats { display: flex; flex-wrap: wrap; gap: 16px 36px; margin-top: 28px; }
.market-stats div { display: flex; align-items: baseline; gap: 8px; }
.market-stats strong { font-size: 1.5rem; color: var(--ink); letter-spacing: -.02em; }
.market-stats span { color: var(--muted); }

/* ---- Store front (App Store / Play inspired) ---- */
.store-hero {
  display: grid; grid-template-columns: 320px 1fr; overflow: hidden; margin-bottom: 12px;
  background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-md); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.store-hero:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.store-hero__art {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 240px;
  background: linear-gradient(150deg, var(--app), color-mix(in srgb, var(--app) 52%, #000));
}
.store-hero__dots { position: absolute; top: 22px; left: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 54px; opacity: .55; }
.store-hero__dots i { aspect-ratio: 1; border-radius: 6px; background: rgba(255,255,255,.55); }
.store-hero__icon .app-icon { width: 100px; height: 100px; border-radius: 24px; box-shadow: var(--shadow-lg); background: #fff; }
.store-hero__icon .app-icon img { width: 58px; height: 58px; }
.store-hero__icon .app-icon--mono span { font-size: 2.6rem; }
.store-hero__body { padding: clamp(24px, 3vw, 42px); display: flex; flex-direction: column; justify-content: center; }
.store-hero__eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--app); margin-bottom: 10px; }
.store-hero__body h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 10px; }
.store-hero__body > p { color: var(--muted); margin-bottom: 16px; max-width: 54ch; }
.store-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 22px; font-size: .88rem; color: var(--muted-2); font-weight: 500; }
.store-hero__meta .btn, .store-hero__body .btn { align-self: flex-start; }

/* Shelf (horizontal carousel) */
.shelf { margin-top: clamp(38px, 5vw, 58px); }
.shelf__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.shelf__head h2 { font-size: 1.42rem; display: flex; align-items: center; gap: 11px; }
.shelf__ic { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--color-primary-tint); color: var(--color-primary); flex: none; }
.shelf__sub { color: var(--muted); margin: 5px 0 16px 45px; font-size: .95rem; }
.shelf__more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--color-primary); white-space: nowrap; }
.shelf__more .icon { transition: transform .2s var(--ease); }
.shelf__more:hover .icon { transform: translateX(3px); }
.shelf__track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity;
  padding: 6px 2px 16px; margin: 0 -2px; scrollbar-width: thin;
}
.shelf__track > * { scroll-snap-align: start; flex: 0 0 auto; }
.shelf__track::-webkit-scrollbar { height: 8px; }
.shelf__track::-webkit-scrollbar-thumb { background: #dadce0; border-radius: 4px; }
.shelf__track::-webkit-scrollbar-track { background: transparent; }

/* Feature card */
.store-feature {
  width: 282px; display: flex; flex-direction: column; background: var(--surface-0);
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.store-feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--app) 40%, var(--border)); }
.store-feature__head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.store-feature h3 { font-size: 1.12rem; margin-bottom: 3px; }
.store-feature__by { font-size: .82rem; color: var(--muted-2); margin-bottom: 10px; }
.store-feature__text { color: var(--muted); font-size: .9rem; line-height: 1.5; flex: 1; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.store-feature__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Compact cell */
.shelf__track--cells .store-cell { width: 330px; }
.store-cell {
  display: flex; align-items: center; gap: 14px; background: var(--surface-0);
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px;
  transition: box-shadow .18s var(--ease), border-color .18s, transform .18s var(--ease);
}
.store-cell:hover { box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--app) 40%, var(--border)); transform: translateY(-2px); }
.store-cell__body { flex: 1; min-width: 0; }
.store-cell__body h4 { font-size: 1rem; margin-bottom: 2px; }
.store-cell__sub { font-size: .82rem; color: var(--muted-2); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-cell__cta { flex: none; }

/* Top charts (ranked) */
.store-chart { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 32px; }
.chart-row { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--border); transition: background .15s; border-radius: 8px; }
.chart-row:hover { background: var(--surface-1); }
.chart-row__rank { width: 28px; flex: none; text-align: center; font-size: 1.35rem; font-weight: 700; color: color-mix(in srgb, var(--app) 70%, var(--muted-2)); }
.chart-row__body { flex: 1; min-width: 0; }
.chart-row__body h4 { font-size: 1rem; }
.chart-row__body p { font-size: .82rem; color: var(--muted-2); display: inline-flex; align-items: center; gap: 8px; }
.chart-row .btn { flex: none; }

/* Catalog */
.store-catalog { margin-top: clamp(46px, 6vw, 70px); scroll-margin-top: calc(var(--header-h) + 16px); }
.store-catalog__title { font-size: 1.5rem; display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }

/* Featured banner */
.mk-featured {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--app) 10%, #fff), var(--surface-0));
  border: 1px solid color-mix(in srgb, var(--app) 28%, var(--border)); border-radius: var(--r-lg);
  padding: 26px 28px; margin-bottom: 26px;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.mk-featured:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.mk-featured__tag {
  position: absolute; top: 16px; right: 18px; display: inline-flex; align-items: center; gap: 5px;
  font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--app) 16%, #fff); color: color-mix(in srgb, var(--app) 80%, #000);
}
.mk-featured__icon .app-icon { width: 72px; height: 72px; border-radius: 18px; }
.mk-featured__icon .app-icon img { width: 42px; height: 42px; }
.mk-featured__body h2 { font-size: 1.5rem; margin-bottom: 6px; }
.mk-featured__body p { color: var(--muted); max-width: 60ch; margin-bottom: 12px; }
.mk-featured__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: .88rem; color: var(--muted-2); font-weight: 500; }
.mk-featured__meta .icon { vertical-align: -2px; }
.mk-featured__cta { flex: none; }

/* Toolbar: search + sort */
.market-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.market-search {
  flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px;
  background: var(--surface-0); border: 1.5px solid var(--border); border-radius: 999px; padding: 0 18px; height: 46px;
  transition: border-color .18s, box-shadow .18s;
}
.market-search:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint); }
.market-search .icon { color: var(--muted-2); flex: none; }
.market-search input { flex: 1; border: none; outline: none; background: none; font: inherit; font-size: .98rem; color: var(--ink); }
.market-sort { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); font-weight: 500; }
.market-sort select {
  font: inherit; font-weight: 600; color: var(--ink); background: var(--surface-0);
  border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer;
}
.market-sort select:focus-visible { outline: none; border-color: var(--color-primary); }

/* Category chips */
.market-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 26px; }
.chip {
  font-family: inherit; font-weight: 600; font-size: .9rem; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: 999px; background: var(--surface-1);
  border: 1.5px solid var(--border); transition: all .16s var(--ease);
}
.chip:hover { border-color: var(--border-strong); background: var(--surface-2); }
.chip.is-active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.chip.is-active .icon { color: #fff; }
.chip--toggle .icon { color: var(--muted-2); }
.market-chips__sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }

/* Stars */
.stars { display: inline-flex; align-items: center; gap: 1px; color: #f9ab00; }
.stars__val { margin-left: 5px; font-size: .82rem; font-weight: 600; color: var(--ink-2); }

/* Grid + cards */
.market-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mk-card {
  display: flex; flex-direction: column; background: var(--surface-0);
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.mk-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--app) 40%, var(--border)); }
.mk-card.is-hidden { display: none; }
.mk-card__top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 13px; }
.mk-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; }
.mk-badge--official { background: var(--color-primary-tint); color: var(--color-primary-hover); }
.mk-badge--community { background: #fde8f2; color: #b3186b; }
.mk-card__name { font-size: 1.12rem; margin-bottom: 7px; }
.mk-card__name a { color: inherit; }
.mk-card__name a:hover { color: var(--color-primary); }

/* ---- Module detail (fiche) ---- */
.mp-detail { padding: clamp(28px, 5vw, 56px) 0 clamp(48px, 7vw, 80px); background: linear-gradient(180deg, var(--surface-1), #fff 320px); }
.mp-detail__back { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--muted); margin-bottom: 26px; }
.mp-detail__back .icon { transform: rotate(180deg); }
.mp-detail__back:hover { color: var(--color-primary); }
.mp-detail__head { display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center; padding-bottom: 30px; border-bottom: 1px solid var(--border); }
.mp-detail__icon .app-icon { width: 92px; height: 92px; border-radius: 22px; box-shadow: var(--shadow-md); }
.mp-detail__icon .app-icon img { width: 52px; height: 52px; }
.mp-detail__icon .app-icon--mono span { font-size: 2.4rem; }
.mp-detail__intro h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 8px 0 4px; }
.mp-detail__by { color: var(--muted); margin-bottom: 12px; }
.mp-detail__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: .9rem; color: var(--muted-2); font-weight: 500; }
.mp-detail__meta .icon { vertical-align: -2px; }
.mp-detail__actions { display: flex; flex-direction: column; gap: 10px; }
.mp-detail__grid { display: grid; grid-template-columns: 1fr 320px; gap: clamp(28px, 4vw, 56px); margin-top: 34px; align-items: start; }
.mp-detail__main h2 { font-size: 1.4rem; margin-bottom: 14px; }
.mp-detail__lead { font-size: 1.12rem; color: var(--ink-2); line-height: 1.6; margin-bottom: 18px; }
.mp-detail__desc { color: var(--muted); line-height: 1.75; }
.mp-detail__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.mp-info { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0 0 16px; }
.mp-info dt { color: var(--muted-2); font-size: .88rem; }
.mp-info dd { margin: 0; font-weight: 600; font-size: .9rem; text-align: right; }
.mk-author { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--muted); font-weight: 500; margin-bottom: 11px; }
.mk-author__av { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; }
.mk-author__av--brand { display: inline-flex; align-items: center; justify-content: center; background: var(--color-primary-tint); color: var(--color-primary); }
.mk-author__av--mono { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: color-mix(in srgb, var(--app) 14%, #fff); color: color-mix(in srgb, var(--app) 80%, #000); }
.mk-card__text { color: var(--muted); font-size: .92rem; line-height: 1.5; flex: 1; margin-bottom: 14px; }
.mk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.mk-tag { font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.mk-tag--cat { background: color-mix(in srgb, var(--app) 12%, #fff); color: color-mix(in srgb, var(--app) 80%, #000); }
.mk-card__stats { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mk-card__dl { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; color: var(--muted-2); font-weight: 600; }
.mk-card__dl .icon { color: var(--muted-2); }
.mk-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 13px; border-top: 1px solid var(--border); }
.mk-meta { font-size: .8rem; color: var(--muted-2); font-weight: 500; }
.mk-install {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .85rem;
  color: var(--color-primary); padding: 7px 13px; border-radius: 999px; background: var(--color-primary-tint);
  transition: background .18s;
}
.mk-install:hover { background: var(--color-primary-light); }
.market-empty { text-align: center; color: var(--muted); padding: 48px 0; font-size: 1.05rem; }
.market-note { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 28px; color: var(--muted-2); font-size: .9rem; }
.market-note .icon { color: var(--muted-2); }

/* ------------------------------------------------------------- Avatar stack */
.avatar-stack { display: flex; align-items: center; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.avatar-stack img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface-0); margin-left: -14px; box-shadow: var(--shadow-sm); }
.avatar-stack img:first-child { margin-left: 0; }
.avatar-stack__label { color: var(--muted); font-weight: 500; font-size: .95rem; }

/* ------------------------------------------------------------- Testimonials */
.section--testimonials { background: var(--surface-1); }
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote-card {
  display: flex; flex-direction: column; gap: 20px; height: 100%;
  background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 28px; transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.quote-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.quote-card blockquote { margin: 0; font-size: 1.05rem; line-height: 1.6; color: var(--ink-2); flex: 1; }
.quote-author { display: flex; align-items: center; gap: 13px; }
.quote-author img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.quote-author__id strong { display: block; font-size: .98rem; color: var(--ink); }
.quote-author__id > span { color: var(--muted); font-size: .86rem; }

/* ------------------------------------------------------------- Docs hub */
.docs-hub-hero { background: linear-gradient(180deg, var(--surface-1), #fff); }
.docs-hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.docs-hub-card {
  display: block; background: var(--surface-0); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 34px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.docs-hub-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--color-primary-light); }
.docs-hub-card__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px;
  border-radius: 15px; background: var(--color-primary-tint); color: var(--color-primary); margin-bottom: 20px;
}
.docs-hub-card h2 { font-size: 1.5rem; margin-bottom: 6px; }
.docs-hub-card__lead { color: var(--muted); margin-bottom: 18px; }
.docs-hub-card__toc { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 9px; }
.docs-hub-card__toc li { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-weight: 500; font-size: .96rem; }
.docs-hub-card__toc .icon { color: var(--success); flex: none; }

/* Doc search */
.doc-search-form { display: flex; align-items: center; gap: 8px; background: var(--surface-1); border: 1px solid var(--border); border-radius: 999px; padding: 0 8px 0 14px; height: 42px; transition: border-color .15s, box-shadow .15s, background .15s; }
.doc-search-form:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint); background: var(--surface-0); }
.doc-search-form .icon { color: var(--muted-2); flex: none; }
.doc-search-form input { flex: 1; min-width: 0; border: none; outline: none; background: none; font: inherit; color: var(--ink); }
.doc-search-form--hero { max-width: 540px; margin-top: 22px; height: 52px; }
.doc-search-form--side { margin-bottom: 16px; height: 40px; padding-right: 14px; }
.doc-search-form--side input { font-size: .92rem; }

.doc-results { display: grid; gap: 12px; }
.doc-result { display: block; background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px 20px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.doc-result:hover { border-color: var(--color-primary-light); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.doc-result__crumb { display: block; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--color-primary); margin-bottom: 5px; }
.doc-result strong { display: block; font-size: 1.1rem; margin-bottom: 5px; }
.doc-result__snip { color: var(--muted); font-size: .92rem; line-height: 1.5; }

/* Full contents (Nextcloud-manual style) */
.docs-contents { margin-top: clamp(40px, 5vw, 64px); display: grid; gap: 30px; }
.docs-contents__doc { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(22px, 3vw, 34px); }
.docs-contents__title { display: flex; align-items: center; gap: 11px; font-size: 1.4rem; margin-bottom: 20px; }
.docs-contents__ic { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--color-primary-tint); color: var(--color-primary); flex: none; }
.docs-contents__cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px 28px; }
.docs-contents__sec h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); margin-bottom: 10px; }
.docs-contents__sec ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.docs-contents__sec a { color: var(--ink-2); font-size: .95rem; }
.docs-contents__sec a:hover { color: var(--color-primary); }
.doc-switch--3 a { font-size: .82rem; padding: 9px 6px; gap: 5px; }

@media (max-width: 980px) { .docs-hub-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- Docs layout */
.doc-shell { background: var(--surface-0); }
.doc-shell__inner { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; padding-top: 32px; padding-bottom: 64px; }

.doc-sidebar { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; padding-right: 6px; }
/* Documentation switcher (dropdown — replaces the cramped horizontal tabs) */
.doc-switcher { position: relative; margin-bottom: 20px; }
.doc-switcher__btn { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-0); font-weight: 600; font-size: .92rem; transition: border-color .15s, box-shadow .15s; }
.doc-switcher__btn::-webkit-details-marker { display: none; }
.doc-switcher__btn:hover { border-color: var(--border-strong); }
.doc-switcher[open] .doc-switcher__btn { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint); }
.doc-switcher__cur { display: inline-flex; align-items: center; gap: 8px; color: var(--color-primary); min-width: 0; }
.doc-switcher__cur .icon { color: var(--color-primary); flex: none; }
.doc-switcher__chev { width: 7px; height: 7px; flex: none; border-right: 2px solid var(--muted-2); border-bottom: 2px solid var(--muted-2); transform: rotate(45deg); margin-top: -2px; transition: transform .2s var(--ease); }
.doc-switcher[open] .doc-switcher__chev { transform: rotate(225deg); margin-top: 2px; }
.doc-switcher__menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--menu-shadow); padding: 6px; display: grid; gap: 2px; }
.doc-switcher__menu a { display: flex; align-items: flex-start; gap: 11px; padding: 9px 11px; border-radius: 8px; color: var(--ink-2); }
.doc-switcher__menu a:hover { background: var(--surface-1); }
.doc-switcher__menu a.is-active { background: var(--color-primary-tint); }
.doc-switcher__menu .icon { color: var(--color-primary); flex: none; margin-top: 1px; }
.doc-switcher__menu strong { display: block; font-size: .92rem; color: var(--ink); line-height: 1.25; }
.doc-switcher__menu small { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.doc-switcher__menu a.is-active strong { color: var(--color-primary-hover); }

.doc-nav__group { margin-bottom: 4px; border-radius: 8px; }
.doc-nav__title {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: 8px;
  font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2);
  transition: background .15s, color .15s;
}
.doc-nav__title::-webkit-details-marker { display: none; }
.doc-nav__title:hover { background: var(--surface-1); color: var(--ink-2); }
.doc-nav__title::after { content: ''; width: 7px; height: 7px; flex: none; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -2px; opacity: .55; transition: transform .2s var(--ease); }
.doc-nav__group[open] > .doc-nav__title { color: var(--ink); }
.doc-nav__group[open] > .doc-nav__title::after { transform: rotate(225deg); margin-top: 2px; }
.doc-nav__items { padding: 2px 0 8px; }
.doc-nav__link { display: block; padding: 7px 12px; border-radius: 8px; font-size: .94rem; color: var(--ink-2); border-left: 2px solid transparent; transition: background .15s, color .15s; }
.doc-nav__link:hover { background: var(--surface-1); color: var(--ink); }
.doc-nav__link.is-active { background: var(--color-primary-tint); color: var(--color-primary-hover); font-weight: 600; border-left-color: var(--color-primary); }

/* ------------------------------------------------------------- Docs article */
.doc-article { min-width: 0; max-width: 820px; }
.doc-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .86rem; color: var(--muted-2); margin-bottom: 18px; }
.doc-breadcrumb a { color: var(--muted); }
.doc-breadcrumb a:hover { color: var(--color-primary); }
.doc-breadcrumb__here { color: var(--ink-2); }
.doc-article__eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--color-primary); margin-bottom: 10px; }
.doc-article__title { font-size: clamp(2rem, 4vw, 2.7rem); letter-spacing: -.025em; margin-bottom: 24px; }

.doc-body { color: var(--ink-2); font-size: 1.02rem; line-height: 1.75; }
.doc-lead { font-size: 1.18rem; color: var(--muted); line-height: 1.65; margin-bottom: 28px; }
.doc-lead strong { color: var(--ink); font-weight: 600; }
.doc-body h2 { font-size: 1.5rem; margin: 40px 0 14px; padding-top: 8px; }
.doc-body h3 { font-size: 1.18rem; margin: 28px 0 10px; }
.doc-body p { margin-bottom: 16px; }
.doc-body ul, .doc-body ol { margin: 0 0 18px; padding-left: 22px; }
.doc-body li { margin-bottom: 8px; }
.doc-body a { color: var(--color-primary); font-weight: 500; }
.doc-body a:hover { text-decoration: underline; }
.doc-body code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px; font-size: .9em; color: #b3186b; }
.doc-body .code-block { margin: 18px 0 22px; }
.doc-body .code-block code { background: none; color: #c9d1d9; padding: 0; }
.doc-body .code-block .hljs { color: #c9d1d9; background: transparent; }

/* Tabbed multi-language code blocks */
.code-tabs { margin: 20px 0 24px; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-md); }
.code-tabs__bar { display: flex; flex-wrap: wrap; gap: 2px; background: #0b1120; padding: 8px 8px 0; }
.code-tab { background: transparent; color: #9aa6bd; border: none; padding: 8px 16px; border-radius: 8px 8px 0 0; font-size: .85rem; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.code-tab:hover { color: #fff; }
.code-tab.is-active { background: #0e1525; color: #fff; }
.code-tabs__panels .code-block { margin: 0; border-radius: 0; box-shadow: none; }
.code-tab-panel { display: none; }
.code-tab-panel.is-active { display: block; }

.doc-table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: .95rem; }
.doc-table th, .doc-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.doc-table th { background: var(--surface-1); font-weight: 600; color: var(--ink); }
.doc-table code { background: var(--surface-2); }

.doc-callout { display: grid; gap: 4px; margin: 22px 0; padding: 16px 20px; border-radius: var(--r-sm); border-left: 4px solid; background: var(--surface-1); }
.doc-callout strong { font-size: .82rem; letter-spacing: .03em; text-transform: uppercase; }
.doc-callout p { margin: 0; color: var(--ink-2); }
.doc-callout--note { border-left-color: var(--color-primary); background: var(--color-primary-tint); }
.doc-callout--note strong { color: var(--color-primary-hover); }
.doc-callout--tip { border-left-color: var(--success); background: var(--color-success, #e6f4ea); }
.doc-callout--tip strong { color: var(--success); }
.doc-callout--warn { border-left-color: var(--warning); background: #fef7e0; }
.doc-callout--warn strong { color: #b06000; }

.doc-pager { display: flex; gap: 16px; justify-content: space-between; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }
.doc-pager__link { display: grid; gap: 4px; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--r-md); transition: border-color .2s, transform .2s, box-shadow .2s; max-width: 48%; }
.doc-pager__link:hover { border-color: var(--color-primary-light); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.doc-pager__link--next { text-align: right; margin-left: auto; }
.doc-pager__dir { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); font-weight: 600; }
.doc-pager__link--next .doc-pager__dir { justify-content: flex-end; }
.doc-pager__link--prev .doc-pager__dir .icon { transform: rotate(180deg); }
.doc-pager__name { font-weight: 600; color: var(--color-primary); }

/* On-this-page TOC (3-column doc layout) */
.doc-shell__inner--toc { grid-template-columns: 240px minmax(0, 1fr) 210px; }
.doc-body h2 { scroll-margin-top: calc(var(--header-h) + 16px); }
.doc-toc { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; }
.doc-toc__title { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); margin: 0 0 10px; padding-left: 12px; }
.doc-toc nav { display: grid; gap: 2px; }
.doc-toc a { display: block; font-size: .86rem; color: var(--muted); padding: 4px 0 4px 12px; border-left: 2px solid var(--border); line-height: 1.45; transition: color .15s, border-color .15s; }
.doc-toc a:hover { color: var(--color-primary); }
.doc-toc a.is-active { color: var(--color-primary); border-left-color: var(--color-primary); font-weight: 600; }

@media (max-width: 1100px) {
  .doc-shell__inner--toc { grid-template-columns: 240px minmax(0, 1fr); }
  .doc-toc { display: none; }
}

/* Clickable heading anchors (GitHub/Nextcloud style) */
.doc-body h2 { position: relative; }
.doc-anchor { position: relative; text-decoration: none; color: var(--color-primary); font-weight: 700; margin-left: 6px; opacity: 0; transition: opacity .12s; }
.doc-body h2:hover .doc-anchor { opacity: .55; }
.doc-anchor:hover, .doc-anchor:focus { opacity: 1; }
.doc-anchor.is-copied::after { content: 'Lien copié ✓'; position: absolute; left: 50%; top: -32px; transform: translateX(-50%); background: #0e1525; color: #fff; font-size: .72rem; font-weight: 600; padding: 4px 9px; border-radius: 6px; white-space: nowrap; }

/* Figures / schémas */
.doc-fig { margin: 22px 0 28px; }
.doc-fig img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: #fff; }
.doc-fig figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 8px; }

/* ------------------------------------------------------------- Legal pages */
.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); align-items: start; }
.legal-toc { position: sticky; top: calc(var(--header-h) + 20px); }
.legal-toc__title { font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 10px; padding-left: 12px; }
.legal-toc a { display: block; padding: 6px 0 6px 12px; font-size: .9rem; color: var(--muted); border-left: 2px solid transparent; transition: color .15s, border-color .15s; }
.legal-toc a:hover { color: var(--color-primary); border-left-color: var(--color-primary); }
.legal__updated { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; font-size: .88rem; color: var(--muted-2); }
.legal__updated .icon { color: var(--muted-2); }
.legal { max-width: 760px; }
.legal h2 { scroll-margin-top: calc(var(--header-h) + 16px); }

/* API reference page */
.api-hero__badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.api-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--surface-1); border: 1px solid var(--border); color: var(--ink-2); }
.api-pill .icon { color: var(--success); }
.api-pill code { background: var(--surface-2); padding: 0 5px; border-radius: 4px; }
.api-doc { max-width: none; }
.api-ep { background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-md); padding: 22px; margin: 18px 0 26px; scroll-margin-top: calc(var(--header-h) + 16px); }
.api-ep__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.api-method { font-size: .72rem; font-weight: 800; letter-spacing: .05em; padding: 4px 10px; border-radius: 6px; color: #fff; }
.api-method--get { background: var(--success); }
.api-path { font-size: 1rem; font-weight: 600; color: var(--ink); background: var(--surface-1); padding: 4px 10px; border-radius: 6px; }
.api-ep__desc { color: var(--muted); margin-bottom: 14px; }
.api-params { margin: 0 0 16px; }
.api-ex { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.api-ex__label { display: block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); margin-bottom: 6px; }
.api-ex .code-block { margin: 0; }
@media (max-width: 760px) { .api-ex { grid-template-columns: 1fr; } }

/* Swagger UI reference page — aligned within the site container */
.swagger-head { margin-bottom: 6px; }
.swagger-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 6px; }
#swagger-ui { margin-top: 6px; }
.swagger-ui .topbar { display: none; }
/* Neutralise Swagger's own max-width/padding so it lines up with the container */
.swagger-ui .wrapper { max-width: none; padding: 0; margin: 0; }
.swagger-ui .info { margin: 18px 0 26px; }
.swagger-ui .scheme-container { box-shadow: none; border: 1px solid var(--border); border-radius: var(--r-md); margin: 0 0 24px; padding: 16px; }
.legal h2 { font-size: 1.5rem; margin: 38px 0 14px; }
.legal h2:first-child { margin-top: 0; }
.legal p { color: var(--ink-2); margin-bottom: 14px; line-height: 1.7; }
.legal a { color: var(--color-primary); font-weight: 500; }
.legal a:hover { text-decoration: underline; }
.legal code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px; font-size: .9em; color: #b3186b; }
.legal .principles__list { margin: 0 0 10px; }
.legal .doc-table { margin: 8px 0 18px; }

/* ------------------------------------------------------------- Forum */
.f-av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--c); color: #fff; font-weight: 700; flex: none; }

.forum-bar { position: sticky; top: var(--header-h); z-index: 90; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border); }
.forum-bar__inner { display: flex; align-items: center; gap: 16px; height: 58px; }
.forum-bar__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.forum-bar__brand .icon { color: var(--color-primary); }
.forum-bar__nav { display: flex; gap: 4px; }
.forum-bar__nav a { padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.forum-bar__nav a.on, .forum-bar__nav a:hover { background: var(--surface-1); color: var(--ink); }
.forum-bar__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.forum-me { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.forum-bar__out { color: var(--muted-2); display: inline-flex; }
.forum-bar__out:hover { color: var(--danger); }

.forum-head { margin-bottom: 26px; }
.forum-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.forum-head p { color: var(--muted); margin-top: 6px; }
.forum-head--cat { display: flex; align-items: center; gap: 16px; }
.forum-head--cat .btn { margin-left: auto; flex: none; }
.forum-h { font-size: 1.1rem; display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.forum-h .icon { color: var(--color-primary); }
.forum-h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 14px 0 18px; }
.forum-grid { display: grid; grid-template-columns: 1fr 1.45fr; gap: clamp(24px, 4vw, 44px); align-items: start; }
.forum-narrow { max-width: 760px; }
.muted-note { color: var(--muted); }
.forum-back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.forum-back .icon { transform: rotate(180deg); }
.forum-back:hover { color: var(--color-primary); }

.cat-list { display: grid; gap: 10px; }
.cat-row { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-md); transition: border-color .15s, box-shadow .15s, transform .15s; }
.cat-row:hover { box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--c) 40%, var(--border)); transform: translateY(-2px); }
.cat-dot { width: 14px; height: 14px; border-radius: 4px; background: var(--c); flex: none; }
.cat-dot--lg { width: 24px; height: 24px; border-radius: 7px; }
.cat-main { flex: 1; min-width: 0; }
.cat-main strong { display: block; }
.cat-main small { color: var(--muted); font-size: .86rem; }
.cat-stats { color: var(--muted-2); font-size: .82rem; font-weight: 600; white-space: nowrap; }

.t-list { display: grid; gap: 8px; }
.t-list--boxed { gap: 0; background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.t-row { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 14px; padding: 13px 16px; background: var(--surface-0); transition: background .12s; }
.t-list:not(.t-list--boxed) .t-row { border: 1px solid var(--border); border-radius: var(--r-md); }
.t-list--boxed .t-row { border-bottom: 1px solid var(--border); }
.t-list--boxed .t-row:last-child { border-bottom: 0; }
.t-row:hover { background: var(--surface-1); }
.t-main { min-width: 0; }
.t-title { display: block; font-weight: 600; color: var(--ink); }
.t-meta { font-size: .8rem; color: var(--muted-2); margin-top: 2px; }
.t-cat { font-weight: 700; color: color-mix(in srgb, var(--c) 78%, #000); }
.t-num { text-align: center; min-width: 46px; }
.t-num b { display: block; font-size: .98rem; }
.t-num small { font-size: .68rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: .04em; }
.t-when { color: var(--muted-2); font-size: .82rem; white-space: nowrap; min-width: 56px; text-align: right; }

.forum-topic { max-width: 860px; }
.topic-title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 8px; }
.topic-sub { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
.posts { display: grid; gap: 16px; }
.post { display: grid; grid-template-columns: auto 1fr; gap: 16px; background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px 20px; }
.post__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post__time { color: var(--muted-2); font-size: .82rem; }
.badge-team { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--color-primary-tint); color: var(--color-primary-hover); }
.post__content { color: var(--ink-2); line-height: 1.7; word-wrap: break-word; }
.post__content a { color: var(--color-primary); }
.reply-box { margin-top: 26px; background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px; }
.reply-box h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin-bottom: 12px; }
.reply-box textarea { width: 100%; font: inherit; border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px; min-height: 120px; resize: vertical; }
.reply-box textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint); }
.reply-box__foot { margin-top: 12px; }
.reply-login { margin-top: 26px; text-align: center; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-md); padding: 26px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.reply-login p { width: 100%; color: var(--muted); margin-bottom: 4px; }

.forum-auth { max-width: 440px; }
.auth-card { background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 32px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.auth-alt { text-align: center; margin-top: 16px; color: var(--muted); font-size: .92rem; }
.auth-alt a { color: var(--color-primary); font-weight: 600; }
.auth-resend { margin: -8px 0 20px; }
.auth-resend .btn { gap: 8px; }

/* Forum flash banner (verification notices, etc.) */
.forum-flash { display: flex; align-items: center; gap: 12px; margin: 16px 0 -8px; padding: 13px 18px; border-radius: var(--r-md); border: 1px solid; font-size: .94rem; font-weight: 500; }
.forum-flash .icon { flex: none; }
.forum-flash--ok  { background: #e6f4ea; border-color: #abdcb8; color: #0f5d27; }
.forum-flash--err { background: #fce8e6; border-color: #f3b9b3; color: #b3261e; }

.forum-search { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 330px; background: var(--surface-1); border: 1px solid var(--border); border-radius: 999px; padding: 0 14px; height: 38px; transition: border-color .15s, box-shadow .15s; }
.forum-search:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint); background: var(--surface-0); }
.forum-search .icon { color: var(--muted-2); flex: none; }
.forum-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font: inherit; font-size: .92rem; color: var(--ink); }
.forum-search--page { max-width: none; height: 50px; margin-bottom: 18px; }
.forum-search--page .btn { flex: none; }

.post__foot { margin-top: 12px; }
.post__author { color: var(--ink); font-weight: 700; }
.post__author:hover { color: var(--color-primary); }
.like-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; font-size: .85rem; color: var(--muted); background: var(--surface-1); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: all .15s; }
.like-btn:hover { border-color: #f3b4ad; color: var(--danger); }
.like-btn.is-on { background: #fce8e6; border-color: #f3b4ad; color: var(--danger); }
.like-btn.is-on .icon { fill: currentColor; }
.like-btn--static { cursor: default; }
.like-btn--static:hover { border-color: var(--border); color: var(--muted); }

.profile-head { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.profile-head h1 { font-size: 1.6rem; }
.profile-bio { margin-top: 8px; color: var(--ink-2); }

/* Reactions */
.post__reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.react-form { display: inline; }
.react-chip { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: .9rem; background: var(--surface-1); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; cursor: pointer; transition: all .14s; }
.react-chip span { font-size: .8rem; font-weight: 700; color: var(--muted); }
.react-chip:hover { border-color: var(--border-strong); }
.react-chip.is-mine { background: var(--color-primary-tint); border-color: var(--color-primary-light); }
.react-chip.is-mine span { color: var(--color-primary-hover); }
.react-chip--static { cursor: default; }
.react-add { position: relative; }
.react-add__btn { display: inline-flex; align-items: center; gap: 3px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--muted); background: none; border: 1px dashed var(--border-strong); border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.react-add__btn:hover { color: var(--color-primary); border-color: var(--color-primary); }
.react-add__menu { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 20; display: flex; gap: 2px; padding: 5px; background: #fff; border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--menu-shadow); opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .15s, transform .15s; }
.react-add:hover .react-add__menu, .react-add:focus-within .react-add__menu { opacity: 1; transform: none; pointer-events: auto; }
.react-pick { font-size: 1.2rem; line-height: 1; background: none; border: none; border-radius: 50%; width: 34px; height: 34px; cursor: pointer; transition: background .12s, transform .12s; }
.react-pick:hover { background: var(--surface-1); transform: scale(1.15); }

/* Pagination */
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 24px; }
.pager__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-0); font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.pager__btn:hover { background: var(--surface-1); border-color: var(--border-strong); }
.pager__btn.is-on { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pager__gap { display: inline-flex; align-items: flex-end; padding: 0 4px; color: var(--muted-2); }

/* Profile editor */
.color-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.color-pick__opt { cursor: pointer; }
.color-pick__opt input { position: absolute; opacity: 0; }
.color-pick__opt span { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid transparent; box-shadow: 0 0 0 1px var(--border); transition: border-color .12s; }
.color-pick__opt input:checked + span { border-color: #fff; box-shadow: 0 0 0 2px var(--c); }
.settings-preview { display: flex; align-items: center; gap: 12px; margin: 10px 0 18px; font-size: 1.05rem; }

/* ---- Forum: visual polish ---- */
.forum-head { padding-bottom: 22px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.forum-h { padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.forum-grid { grid-template-columns: 0.85fr 1.3fr; }

/* Categories: colored left accent + soft hover tint */
.cat-row { position: relative; overflow: hidden; padding-left: 20px; }
.cat-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.cat-row:hover { background: color-mix(in srgb, var(--c) 5%, var(--surface-0)); }
.cat-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 14%, transparent); }

/* Topic rows: left accent on hover */
.t-list--boxed .t-row { position: relative; padding-left: 18px; }
.t-list--boxed .t-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; transition: background .15s; }
.t-list--boxed .t-row:hover::before { background: var(--color-primary); }

/* Posts + original-post highlight */
.post { transition: border-color .15s, box-shadow .15s; }
.post:hover { border-color: var(--border-strong); }
.post__author { font-size: 1rem; }
.post--op { border-color: color-mix(in srgb, var(--color-primary) 35%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 18%, transparent); }
.badge-op { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; background: var(--color-primary-tint); color: var(--color-primary-hover); }

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

@media (max-width: 860px) {
  .forum-grid { grid-template-columns: 1fr; }
  .forum-bar__nav { display: none; }
}
@media (max-width: 560px) {
  .t-row { grid-template-columns: auto 1fr auto; }
  .t-num--v { display: none; }
  .forum-head--cat { flex-wrap: wrap; }
  .forum-head--cat .btn { margin-left: 0; }
}

/* ------------------------------------------------------------- Contact form */
.contact-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.contact-aside { display: grid; gap: 18px; position: sticky; top: calc(var(--header-h) + 20px); }

.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form__row { margin-bottom: 18px; }
.form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; color: var(--ink-2); }
.form__req { color: var(--danger); }
.form input, .form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface-0);
  border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint); }
.form input::placeholder, .form textarea::placeholder { color: var(--muted-2); }
.form textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.form__error { color: var(--danger); font-size: .84rem; margin-top: 6px; }
.form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 4px; }
.form__note { font-size: .85rem; color: var(--muted); }
.form__note a { color: var(--color-primary); font-weight: 600; }

.form-alert { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-md); margin-bottom: 24px; border: 1px solid; }
.form-alert p { margin: 2px 0 0; font-size: .92rem; }
.form-alert .icon { flex: none; margin-top: 1px; }
.form-alert--ok { background: #e6f4ea; border-color: #abdcb8; color: #136c2e; }
.form-alert--ok strong { color: #0f5d27; }
.form-alert--ok .icon { color: var(--success); }
.form-alert--err { background: #fce8e6; border-color: #f3b4ad; color: #a52318; }
.form-alert--err strong { color: #8c1d12; }
.form-alert--err .icon { color: var(--danger); }

/* ------------------------------------------------------------- Cookie banner */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  opacity: 0; transform: translateY(140%);
  transition: opacity .3s var(--ease), transform .35s var(--ease);
}
.cookie-banner.is-visible { opacity: 1; transform: none; }
.cookie-banner__inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
  background: var(--dark-bg); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-md);
  box-shadow: 0 20px 55px rgba(0,0,0,.4); padding: 16px 20px; color: #c3cad6;
}
.cookie-banner__icon {
  flex: none; width: 42px; height: 42px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(138,180,248,.18); color: #8ab4f8;
}
.cookie-banner__text { flex: 1; min-width: 0; font-size: .92rem; color: #c3cad6; line-height: 1.5; }
.cookie-banner__text strong { color: #fff; font-weight: 600; }
.cookie-banner__text a { color: #8ab4f8; font-weight: 600; white-space: nowrap; }
.cookie-banner__text a:hover { text-decoration: underline; }
.cookie-banner__actions { flex: none; display: flex; gap: 10px; }

@media (max-width: 640px) {
  .cookie-banner { left: 10px; right: 10px; bottom: 10px; }
  .cookie-banner__inner { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .cookie-banner__text { flex-basis: 100%; order: 1; }
  .cookie-banner__icon { order: 0; }
  .cookie-banner__actions { order: 2; margin-left: auto; }
}

/* ------------------------------------------------------------- Reveal anim */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   DESIGN HARMONIZATION — one consistent visual language site-wide.
   (Loaded last so it normalizes components built across iterations.)
   ============================================================ */

/* 1 — Cards share the same radius (tiles), border & hover lift. */
.pillar, .app-card, .mk-card, .store-feature, .store-cell, .client-card,
.docs-hub-card, .quote-card, .cat-row, .doc-result, .install-card, .auth-card {
  border-radius: var(--r-md);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.pillar:hover, .app-card:hover, .mk-card:hover, .store-feature:hover, .store-cell:hover,
.client-card:hover, .docs-hub-card:hover, .quote-card:hover, .doc-result:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* 2 — All search fields look identical (pill, same border & focus ring). */
.market-search, .forum-search, .doc-search-form {
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface-1);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.market-search:focus-within, .forum-search:focus-within, .doc-search-form:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-tint);
  background: var(--surface-0);
}

/* 3 — Consistent page intro rhythm across every top-level page. */
.page-hero { padding: clamp(48px, 7vw, 92px) 0 clamp(28px, 4vw, 48px); }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); letter-spacing: -.03em; }
.page-hero__lead { max-width: 62ch; font-size: clamp(1.06rem, 1.6vw, 1.25rem); }

/* 4 — Consistent left-aligned section headings (icon badge + title). */
.shelf__head h2, .forum-h, .store-catalog__title, .docs-contents__title {
  font-size: 1.4rem; display: flex; align-items: center; gap: 11px;
}
.shelf__ic, .docs-contents__ic {
  width: 34px; height: 34px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-primary-tint); color: var(--color-primary); flex: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------- Responsive */
@media (max-width: 1024px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .app-grid--detailed { grid-template-columns: repeat(2, 1fr); }
  .sec-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 1024px) {
  .market-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials { grid-template-columns: 1fr; }
  .store-chart { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .mk-featured { grid-template-columns: 1fr; }
  .mk-featured__tag { position: static; align-self: flex-start; margin-bottom: 4px; }
  .mk-featured__cta { justify-self: start; }
  .store-hero { grid-template-columns: 1fr; }
  .store-hero__art { min-height: 180px; }
  .mp-detail__head { grid-template-columns: auto 1fr; }
  .mp-detail__actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .mp-detail__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .store-chart { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { display: none; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-aside { position: static; }
}

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

@media (max-width: 960px) {
  .clients-band { grid-template-columns: 1fr; }
  .clients-band__media { order: 2; max-width: 480px; margin-inline: auto; }
  .clients-hero__inner { grid-template-columns: 1fr; }
  .docs-hub-grid { grid-template-columns: 1fr; }
  .doc-shell__inner { grid-template-columns: 1fr; }
  .doc-sidebar {
    position: static; max-height: none; overflow: visible; width: 100%;
    padding: 18px; margin-bottom: 8px; background: var(--surface-1);
    border: 1px solid var(--border); border-radius: var(--r-md);
  }
  .doc-nav { display: block; }
  .doc-article { max-width: none; }
}

@media (max-width: 860px) {
  .site-nav, .site-header__cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .clients-grid { grid-template-columns: 1fr; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__copy { order: 2; }
  .hero__media { order: 1; max-width: 560px; margin-inline: auto; }
  .hero__lead, .hero__badges { margin-inline: auto; }
  .hero__lead { max-width: 48ch; }
  .hero__actions, .hero__badges { justify-content: center; }
  .trustbar__stats { margin-left: 0; }
  .spotlight, .spotlight--rev .spotlight__copy { grid-template-columns: 1fr; order: 0; }
  .spotlight__copy { order: 2; }
  .spotlight__media { order: 1; }
  .install-layout { grid-template-columns: 1fr; }
  .install-aside { position: static; }

  /* Mobile nav panel */
  .mobile-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
    display: block; background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); padding: 16px 24px 24px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .25s var(--ease), opacity .25s var(--ease);
  }
  .mobile-nav[hidden] { display: block; }
  .mobile-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .mobile-nav nav { display: grid; gap: 2px; margin-bottom: 14px; }
  .m-link, .m-acc > summary { padding: 13px 12px; border-radius: 10px; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
  .m-link:hover, .m-acc > summary:hover { background: var(--surface-1); }
  .m-acc > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
  .m-acc > summary::-webkit-details-marker { display: none; }
  .m-acc > summary .icon { color: var(--muted); transition: transform .2s; }
  .m-acc[open] > summary { color: var(--color-primary); }
  .m-acc[open] > summary .icon { transform: rotate(180deg); color: var(--color-primary); }
  .m-acc__body { padding: 2px 4px 10px; }
  .m-acc__overview { display: block; font-size: .95rem; font-weight: 600; color: var(--color-primary); padding: 9px 12px; }
  /* Inside the mobile sheet the dropdown content lays out flat (no float) */
  .nav-menu--mobile .nm-cols { grid-template-columns: repeat(2, 1fr); gap: 0 8px; }
  .nav-menu--mobile .nm-item { font-size: .98rem; padding: 9px 12px; }
  .nav-menu--mobile .nm-tx strong { font-size: .98rem; }
  .nav-menu--mobile .apps-menu { grid-template-columns: 1fr; }
  .nav-menu--mobile .apps-menu__promo { border-radius: 10px; margin-bottom: 10px; }
  .nav-menu--mobile .apps-menu__cta { flex-direction: row; }
  .nav-menu--mobile .apps-menu__grid { grid-template-columns: repeat(3, 1fr); }
  .nav-menu--mobile .apps-menu__main { padding: 0; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 560px) {
  .container { padding-inline: 18px; }
  .pillars, .app-grid, .app-grid--detailed, .sec-grid, .sec-grid--page, .market-grid, .testimonials { grid-template-columns: 1fr; }
  .doc-nav { grid-template-columns: 1fr; }
  .code-tabs__bar { gap: 0; }
  .doc-pager { flex-direction: column; }
  .doc-pager__link { max-width: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn--lg { width: 100%; }
  .hero__actions, .cta-band__actions { flex-direction: column; }
  .trustbar__stats { gap: 12px 24px; }
}

/* ===================== App detail page (/apps/<id>) ===================== */
.app-hero { position: relative; overflow: hidden; padding: clamp(44px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--app) 9%, var(--surface-1)) 0%, var(--surface-0) 100%); }
.app-hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(48% 64% at 86% -4%, color-mix(in srgb, var(--app) 28%, transparent), transparent 70%); }
.app-hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.app-hero__back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 600; font-size: .9rem; margin-bottom: 22px; }
.app-hero__back:hover { color: var(--app); }
.app-hero__back .icon { transform: rotate(180deg); }
.app-hero__brand { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.app-hero__brand h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); letter-spacing: -.03em; line-height: 1.02; }
.app-hero__brand .eyebrow { color: var(--app); }
.app-hero__lead { font-size: clamp(1.1rem, 1.8vw, 1.32rem); color: var(--ink-2); max-width: 46ch; line-height: 1.5; }
.app-hero__art { display: flex; justify-content: center; }
.app-hero__art img, .app-hero__art svg { width: 100%; max-width: 540px; height: auto; filter: drop-shadow(0 30px 60px rgba(32,33,36,.18)); }
.app-hero__glyph { display: grid; place-items: center; width: clamp(200px, 32vw, 300px); aspect-ratio: 1; border-radius: var(--r-xl);
  background: linear-gradient(150deg, color-mix(in srgb, var(--app) 22%, #fff), #fff); box-shadow: var(--shadow-md);
  border: 1px solid color-mix(in srgb, var(--app) 18%, var(--border)); }
.app-hero__glyph .app-icon { transform: scale(1.15); }

.app-overview { max-width: 62ch; margin: 0 auto; text-align: center; font-size: clamp(1.14rem, 2vw, 1.4rem);
  line-height: 1.6; color: var(--ink-2); font-weight: 500; }

.app-modules { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.app-module { padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  color: color-mix(in srgb, var(--app) 70%, var(--ink)); background: color-mix(in srgb, var(--app) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--app) 22%, var(--border)); }

.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feat-card { background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px 24px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.feat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--app) 35%, var(--border)); }
.feat-card__icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; margin-bottom: 16px;
  color: var(--app); background: color-mix(in srgb, var(--app) 12%, #fff); }
.feat-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.feat-card p { color: var(--muted); font-size: .96rem; line-height: 1.55; }

.app-specs { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.app-spec { flex: 1 1 200px; max-width: 300px; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px 22px; text-align: center; }
.app-spec dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.app-spec dd { font-weight: 600; color: var(--ink); }

@media (max-width: 880px) {
  .app-hero__inner { grid-template-columns: 1fr; }
  .app-hero__art { order: -1; max-width: 460px; margin-inline: auto; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) { .feat-grid { grid-template-columns: 1fr; } }

/* ===================== Architecture page ===================== */
.arch-figure { margin: 0; border: 1px solid var(--border); border-radius: var(--r-xl); padding: clamp(14px, 2.5vw, 30px);
  background: var(--surface-0); box-shadow: var(--shadow-md); }
.arch-figure img, .arch-figure svg { display: block; width: 100%; height: auto; }

.arch-steps { list-style: none; margin: 0; padding: 0; max-width: 820px; margin-inline: auto; display: grid; gap: 14px; counter-reset: none; }
.arch-steps li { display: flex; gap: 20px; align-items: flex-start; background: var(--surface-0); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.arch-steps__n { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(150deg, #1a73e8, #4d38db); color: #fff; font-weight: 800; font-size: 1.05rem; }
.arch-steps h3 { font-size: 1.1rem; margin-bottom: 4px; }
.arch-steps p { color: var(--muted); line-height: 1.55; }
.arch-steps code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
.arch-figure--home { max-width: 900px; margin-inline: auto; }

/* ---- App detail: rich sections (stats, sub-modules, use-cases) ---- */
.app-overview p + p { margin-top: 1.1em; }
.app-hero__replaces { margin-top: 14px; color: var(--muted); font-size: .98rem; }
.app-hero__replaces strong { color: var(--ink); font-weight: 600; }

.app-stats { background: color-mix(in srgb, var(--app) 7%, var(--surface-1)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.app-stats__row { display: flex; flex-wrap: wrap; gap: clamp(22px, 5vw, 64px); justify-content: center; padding: 28px 0; }
.app-stat { text-align: center; }
.app-stat b { display: block; font-size: clamp(1.4rem, 2.4vw, 1.95rem); font-weight: 800; letter-spacing: -.02em; color: var(--app); line-height: 1.1; }
.app-stat span { color: var(--muted); font-size: .92rem; }

.submod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.submod-card { background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px 26px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease); }
.submod-card:hover { border-color: color-mix(in srgb, var(--app) 38%, var(--border)); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.submod-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 13px; }
.submod-card__icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  color: var(--app); background: color-mix(in srgb, var(--app) 13%, #fff); }
.submod-card__head h3 { font-size: 1.16rem; line-height: 1.15; }
.submod-card__kicker { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--app); }
.submod-card > p { color: var(--muted); line-height: 1.55; margin-bottom: 14px; }
.submod-card__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.submod-card__points li { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; color: var(--ink-2); }
.submod-card__points .icon { flex: none; color: var(--app); margin-top: 2px; }

.usecase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 18px; }
.usecase-card { background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px 24px; }
.usecase-card__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px;
  color: var(--app); background: color-mix(in srgb, var(--app) 13%, #fff); }
.usecase-card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.usecase-card p { color: var(--muted); font-size: .94rem; line-height: 1.55; }

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

/* ===================== Partners page ===================== */
.partner-services { margin-top: 42px; text-align: center; }
.partner-services__label { display: block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 16px; }
.partner-services__chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
.tier-card { position: relative; display: flex; flex-direction: column; background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px 26px; }
.tier-card--on { border-color: var(--color-primary); box-shadow: 0 18px 44px rgba(26,115,232,.18); }
.tier-card__badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--color-primary); color: #fff; font-size: .73rem; font-weight: 700; padding: 5px 14px; border-radius: 999px; letter-spacing: .03em; white-space: nowrap; }
.tier-card__name { font-size: 1.4rem; letter-spacing: -.02em; }
.tier-card__tag { color: var(--muted); font-size: .9rem; margin: 2px 0 20px; }
.tier-card__feats { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 11px; flex: 1; }
.tier-card__feats li { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; color: var(--ink-2); }
.tier-card__feats .icon { flex: none; color: var(--color-primary); margin-top: 2px; }

.partner-directory { text-align: center; max-width: 680px; margin-inline: auto; background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-xl); padding: clamp(34px, 5vw, 58px); box-shadow: var(--shadow-md); }
.partner-directory__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; margin-bottom: 18px; color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 12%, #fff); }
.partner-directory h3 { font-size: clamp(1.3rem, 2.4vw, 1.72rem); margin-bottom: 12px; }
.partner-directory p { color: var(--muted); font-size: 1.05rem; line-height: 1.6; margin-bottom: 26px; }

@media (max-width: 920px) { .tier-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tier-grid { grid-template-columns: 1fr; } }

/* Partner directory cards (DB-driven, admin-fed) */
.partner-dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.pdir-card { display: flex; flex-direction: column; background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px 26px; transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease); }
.pdir-card:hover { border-color: color-mix(in srgb, var(--app) 38%, var(--border)); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.pdir-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pdir-card__logo { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; font-weight: 800; font-size: 1.2rem; color: #fff; background: var(--app); }
.pdir-card__tier { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--app); background: color-mix(in srgb, var(--app) 14%, #fff); padding: 4px 11px; border-radius: 999px; }
.pdir-card h3 { font-size: 1.18rem; margin-bottom: 2px; }
.pdir-card__meta { color: var(--muted); font-size: .88rem; margin-bottom: 12px; }
.pdir-card__desc { color: var(--ink-2); font-size: .94rem; line-height: 1.55; margin-bottom: 14px; flex: 1; }
.pdir-card__svcs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.pdir-card__svcs span { font-size: .76rem; color: var(--muted); background: var(--surface-2); padding: 3px 9px; border-radius: 6px; }
.pdir-card__link { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--app); font-size: .92rem; margin-top: auto; }
.pdir-card__link:hover { gap: 10px; }
