/* apps.nexg.tech. Tokens follow the NexG umbrella brand
   (nexg-website/src/app/globals.css). Per-app accents are appended by build.mjs. */

@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --font-body: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-editorial: "Instrument Serif", Georgia, serif;
  --page: #f6f4f0;
  --surface: #fdfcf9;
  --surface-soft: #ece9e3;
  --ink: #171719;
  --ink-soft: #34343a;
  --muted: #615f66;
  --border: rgba(23, 23, 25, 0.12);
  --border-strong: rgba(23, 23, 25, 0.22);
  --orange: #ff684f;
  --orange-text: #b73b27;
  --night: #151518;
  --on-night: #fbfaf7;
  --on-night-muted: #c8c5c0;
  --orange-on-night: #ff9b88;
  --focus-ring: #b73b27;
  --header: rgba(246, 244, 240, 0.86);
  --shadow-sm: 0 10px 30px rgba(23, 23, 25, 0.07);
  --shadow-lg: 0 28px 80px rgba(23, 23, 25, 0.13);
  --icon-shadow: 0 1px 2px rgba(23, 23, 25, 0.12), 0 12px 28px rgba(23, 23, 25, 0.14);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 52px);
  /* App accent defaults (overridden by .app-<slug>). */
  --app-accent: var(--orange);
  --app-text: var(--orange-text);
  --app-tint: #f2e6df;
  --app-tint-strong: #ecd8cd;
  --app-on-accent: #171719;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #111114;
    --surface: #19191d;
    --surface-soft: #222227;
    --ink: #fbfaf7;
    --ink-soft: #e2dfda;
    --muted: #aaa7ad;
    --border: rgba(251, 250, 247, 0.12);
    --border-strong: rgba(251, 250, 247, 0.22);
    --orange: #ff715b;
    --orange-text: #ff9a87;
    --focus-ring: #ff9a87;
    --header: rgba(17, 17, 20, 0.86);
    --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.32);
    --icon-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 28px rgba(0, 0, 0, 0.45);
    --app-tint: #2a2120;
    --app-tint-strong: #33251f;
  }
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  overflow-x: clip;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, h3, ul, ol { margin-top: 0; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; }
::selection { background: var(--orange); color: #171719; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; border-radius: 4px; }

.container {
  width: auto; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--page); font-weight: 650; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.serif-accent {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--orange-text);
}

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 22px;
  color: var(--orange-text);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; line-height: 1.2;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem;
  min-height: 44px;
}
.brand__mark { width: 28px; height: 28px; color: var(--orange); flex: none; }
.brand__mark path { fill: currentColor; }
.brand__studio { color: var(--muted); font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: clamp(8px, 2vw, 26px); margin-right: -6px; } /* -6px cancels the links' own padding so text meets the gutter */
.site-nav a {
  position: relative;
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding-inline: 6px;
  color: var(--ink-soft); font-size: 0.94rem; font-weight: 600; text-decoration: none;
}
.site-nav a::after {
  content: ""; position: absolute; left: 6px; right: 6px; bottom: 8px; height: 2px;
  background: var(--orange); transform: scaleX(0); transform-origin: left;
  transition: transform 180ms ease;
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 650; font-size: 0.98rem; text-decoration: none; letter-spacing: -0.01em;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
.button--store { background: var(--ink); color: var(--page); box-shadow: var(--shadow-sm); }
.button--store:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.button--store svg { width: 18px; height: 18px; }
.store-badge { display: inline-block; padding: 12px; margin: -12px 0 -12px -12px; line-height: 0; border-radius: 12px; } /* 12px = 1/4 of the 48px badge: Apple's clear space */
.store-badge img { display: block; height: 48px; width: auto; min-height: 40px; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge { transition: transform 0.2s ease; }
@media (prefers-reduced-motion: reduce) { .store-badge { transition: none; } .store-badge:hover { transform: none; } }
.button--ghost { border: 1px solid var(--border-strong); color: var(--ink); background: transparent; }
.button--ghost:hover { background: var(--surface); }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--border-strong); color: var(--ink-soft); background: var(--surface);
}
.chip--live { border-color: transparent; background: var(--ink); color: var(--page); }
.chip--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #35d488; }
.chip--soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }

/* App icon: iOS-like squircle mask (approximation with border-radius). */
.app-icon { border-radius: 22.5%; box-shadow: var(--icon-shadow); background: var(--surface-soft); }

/* ---------- Home: hero ---------- */
.hero { position: relative; padding-block: clamp(56px, 9vw, 120px) clamp(48px, 7vw, 96px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 {
  margin-bottom: 28px;
  font-size: clamp(2.7rem, 6.4vw, 5.6rem);
  font-weight: 650; letter-spacing: -0.046em; line-height: 0.95;
}
.hero h1 .serif-accent { font-size: 1.04em; letter-spacing: -0.02em; padding-right: 0.04em; }
.hero__lede { max-width: 560px; margin: 0; color: var(--ink-soft); font-size: clamp(1.08rem, 1.5vw, 1.3rem); line-height: 1.6; }
.hero__meta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 0.92rem; }
.hero__meta strong { color: var(--ink); font-weight: 650; }

.icon-cloud {
  position: relative;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: clamp(12px, 1.6vw, 20px);
  max-width: 520px; margin-inline: auto; padding: 8px;
}
.icon-cloud a { grid-column: span 2; }
.icon-cloud a:nth-child(5) { grid-column: 2 / span 2; }
.icon-cloud a { display: block; border-radius: 22.5%; transition: transform 220ms ease; }
.icon-cloud a:hover { transform: translateY(-4px) rotate(-2deg); }
.icon-cloud img { width: 100%; aspect-ratio: 1; }
.hero__glow {
  position: absolute; inset: auto -10% -40% 40%; height: 70%;
  background: radial-gradient(closest-side, rgba(255, 104, 79, 0.16), transparent);
  pointer-events: none;
}

/* ---------- Home: stance ---------- */
.stance { border-block: 1px solid var(--border); background: var(--surface); }
.stance__inner { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr); gap: clamp(28px, 6vw, 80px); padding-block: clamp(48px, 7vw, 88px); }
.stance h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); letter-spacing: -0.04em; margin-bottom: 0; }
.stance__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.stance__list li { border-top: 2px solid var(--ink); padding-top: 18px; }
.stance__index { display: block; margin-bottom: 14px; font-family: var(--font-editorial); font-style: italic; font-size: 1.6rem; line-height: 1; color: var(--orange-text); }
.stance__list h3 { font-size: 1.2rem; letter-spacing: -0.025em; margin-bottom: 8px; }
.stance__list p { margin: 0; color: var(--muted); }

/* ---------- Home: catalogue ---------- */
.catalogue { padding-block: clamp(56px, 8vw, 110px); }
.group + .group { margin-top: clamp(56px, 7vw, 96px); }
.group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--border-strong); }
.group__head h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -0.04em; }
.group__count { color: var(--muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; }

.feature-card {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(20px, 3.4vw, 44px); align-items: center;
  padding: clamp(22px, 3.4vw, 40px); border-radius: var(--radius-lg);
  background: var(--app-tint); border: 1px solid var(--border);
}
.feature-card__icon { width: clamp(96px, 12vw, 148px); }
.feature-card h3 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); letter-spacing: -0.045em; margin: 0 0 6px; }
.feature-card h3 a { text-decoration: none; }
.feature-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.feature-card__sub { margin: 0 0 12px; font-family: var(--font-editorial); font-style: italic; font-size: 1.35rem; line-height: 1.2; color: var(--app-text); }
.feature-card__pitch { margin: 0; max-width: 560px; color: var(--ink-soft); }
.feature-card__actions { position: relative; z-index: 1; display: grid; gap: 10px; justify-items: end; text-align: right; }
.feature-card__note { margin: 0; color: var(--muted); font-size: 0.86rem; }
.feature-card:hover .feature-card__icon { transform: rotate(-3deg) scale(1.03); }
.feature-card__icon { transition: transform 260ms ease; }

.app-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.app-card {
  position: relative; height: 100%;
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.app-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, var(--app-tint) 0%, transparent 55%);
  opacity: 0.9;
}
.app-card > * { position: relative; }
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.app-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-card__icon { width: 64px; transition: transform 260ms ease; }
.app-card:hover .app-card__icon { transform: rotate(-4deg); }
.app-card h3 { margin: 0; font-size: 1.35rem; letter-spacing: -0.035em; }
.app-card h3 a { text-decoration: none; }
.app-card h3 a::after { content: ""; position: absolute; inset: -24px; z-index: 1; }
.app-card__sub { margin: -8px 0 0; font-family: var(--font-editorial); font-style: italic; font-size: 1.15rem; line-height: 1.25; color: var(--app-text); }
.app-card__pitch { margin: 0; color: var(--muted); font-size: 0.95rem; }
.app-card__more { margin-top: auto; padding-top: 6px; font-size: 0.9rem; font-weight: 650; color: var(--ink); }
.app-card__more span { display: inline-block; transition: transform 180ms ease; }
.app-card:hover .app-card__more span { transform: translateX(4px); }

/* ---------- App page ---------- */
.app-hero { position: relative; background: var(--app-tint); border-bottom: 1px solid var(--border); overflow: hidden; }
.app-hero::after {
  content: ""; position: absolute; width: 60vw; max-width: 760px; aspect-ratio: 1; right: -12vw; top: -30%;
  background: radial-gradient(closest-side, var(--app-tint-strong), transparent 70%);
  pointer-events: none;
}
.app-hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(32px, 6vw, 80px); align-items: center; padding-block: clamp(48px, 8vw, 104px); }
.breadcrumbs { display: flex; align-items: center; margin: 0 0 20px; font-size: 0.88rem; color: var(--muted); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.breadcrumbs a { color: var(--ink-soft); text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.breadcrumbs span[aria-hidden] { margin-inline: 4px 10px; }
.app-hero h1 { margin: 0 0 10px; font-size: clamp(3rem, 7.4vw, 6rem); letter-spacing: -0.052em; line-height: 0.92; }
.app-hero__sub { margin: 0 0 26px; font-family: var(--font-editorial); font-style: italic; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.1; color: var(--app-text); }
.app-hero__lede { max-width: 580px; margin: 0 0 32px; color: var(--ink-soft); font-size: clamp(1.05rem, 1.4vw, 1.22rem); line-height: 1.6; }
.app-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.app-hero__note { margin: 14px 0 0; font-size: 0.88rem; color: var(--muted); }
.app-hero__art { position: relative; justify-self: center; width: min(100%, 300px); }
.app-hero__art img { width: 100%; box-shadow: var(--shadow-lg), var(--icon-shadow); }
.app-hero__art::before {
  content: ""; position: absolute; inset: 14% -14% -14% 14%; border-radius: 22.5%;
  background: var(--app-accent); opacity: 0.18; filter: blur(30px);
}
.app-hero__art img { position: relative; }

.section { padding-block: clamp(56px, 8vw, 104px); }
.section + .section { padding-top: 0; }
.section__head { max-width: 720px; margin-bottom: clamp(30px, 4vw, 48px); }
.section__head h2 { margin: 0; font-size: clamp(2rem, 3.8vw, 3.2rem); letter-spacing: -0.045em; }
.section .eyebrow { color: var(--app-text); }

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 18px); }
.features li { grid-column: span 2; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: clamp(22px, 2.6vw, 32px); }
/* Classes set by the template so a short last row widens to fill it. */
.features li.w3 { grid-column: span 3; }
.features li.w6 { grid-column: span 6; }
.features__index { display: block; margin-bottom: 18px; font-family: var(--font-editorial); font-style: italic; font-size: 1.5rem; line-height: 1; color: var(--app-text); }
.features h3 { font-size: 1.22rem; letter-spacing: -0.03em; margin-bottom: 10px; }
.features p { margin: 0; color: var(--muted); }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.panel { border-radius: var(--radius-lg); padding: clamp(26px, 3.6vw, 48px); }
.panel h2 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); letter-spacing: -0.045em; margin-bottom: 18px; }
.panel--price { background: var(--surface); border: 1px solid var(--border); }
.panel--price ul { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 12px; }
.panel--price li { padding-left: 22px; position: relative; color: var(--ink-soft); }
.panel--price li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 2px; background: var(--app-accent); }
.panel__small { margin: 0; color: var(--muted); font-size: 0.88rem; }
.panel--privacy { background: var(--night); color: var(--on-night); position: relative; overflow: hidden; }
.panel--privacy::after {
  content: ""; position: absolute; width: 380px; aspect-ratio: 1; right: -140px; bottom: -180px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--app-accent-night), transparent); opacity: 0.35; pointer-events: none;
}
.panel--privacy .eyebrow { color: var(--app-text-night); }
.panel--privacy blockquote { margin: 0 0 22px; font-family: var(--font-editorial); font-style: italic; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.18; letter-spacing: -0.01em; }
.panel--privacy ul { margin: 0 0 26px; padding: 0; list-style: none; display: grid; gap: 12px; position: relative; z-index: 1; }
.panel--privacy li { padding-left: 28px; position: relative; color: var(--on-night-muted); }
.panel--privacy li::before {
  content: ""; position: absolute; left: 2px; top: 0.42em; width: 12px; height: 7px;
  border-left: 2px solid var(--app-text-night); border-bottom: 2px solid var(--app-text-night); transform: rotate(-45deg);
}
.panel--privacy a { display: inline-flex; align-items: center; min-height: 44px; position: relative; z-index: 1; color: var(--on-night); font-weight: 650; text-underline-offset: 4px; text-decoration-color: var(--app-text-night); }

.help { border-top: 1px solid var(--border); }
.help__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-block: clamp(36px, 5vw, 56px); }
.help h2 { margin: 0 0 4px; font-size: 1.5rem; letter-spacing: -0.035em; }
.help p { margin: 0; color: var(--muted); }
.help__links { display: flex; flex-wrap: wrap; gap: 12px; }

.more { padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--border); }
.more h2 { font-size: 1.1rem; letter-spacing: -0.02em; margin-bottom: 18px; color: var(--muted); font-weight: 600; }
.more ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; }
.more a { display: flex; min-width: 0; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 600; }
.more a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.more img { width: 36px; border-radius: 22.5%; box-shadow: var(--icon-shadow); }

/* ---------- Legal pages ---------- */
.app-band { background: var(--app-tint); border-bottom: 1px solid var(--border); }
.app-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding-block: 18px; }
.app-band__id { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; min-height: 44px; }
.app-band__id img { width: 48px; }
.app-band__name { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.03em; line-height: 1.1; display: block; }
.app-band__sub { display: block; font-family: var(--font-editorial); font-style: italic; color: var(--app-text); font-size: 1rem; line-height: 1.2; }
.app-band nav ul { list-style: none; margin: 0; padding: 4px; display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.app-band nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; text-decoration: none; font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); }
.app-band nav a:hover { background: var(--surface-soft); }
.app-band nav a[aria-current="page"] { background: var(--ink); color: var(--page); }

.legal {
  width: auto; max-width: calc(720px + 2 * var(--gutter)); margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) max(var(--gutter), env(safe-area-inset-right)) clamp(56px, 8vw, 96px) max(var(--gutter), env(safe-area-inset-left));
}
.legal h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); letter-spacing: -0.045em; line-height: 1.02; margin: 0 0 12px; }
.legal h2 { font-size: 1.32rem; letter-spacing: -0.025em; margin: 2.2em 0 0.6em; }
.legal h3 { font-size: 1.08rem; letter-spacing: -0.02em; margin: 1.6em 0 0.4em; }
.legal p, .legal li { color: var(--ink-soft); line-height: 1.68; }
.legal ul, .legal ol { padding-left: 1.25em; }
.legal li + li { margin-top: 0.4em; }
.legal a { color: var(--app-text); text-underline-offset: 3px; }
.legal code { font-size: 0.92em; background: var(--surface-soft); padding: 1px 5px; border-radius: 5px; }
.legal .tagline { color: var(--muted); font-size: 1.12rem; margin-top: 0; }
.legal .muted { color: var(--muted); font-size: 0.92rem; }
.legal .card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--app-accent); border-radius: var(--radius-sm); padding: 16px 20px; margin: 18px 0; }
.legal .card > :last-child { margin-bottom: 0; }
.legal .todo { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 1px 7px; border-radius: 5px; margin-left: 6px; background: var(--surface-soft); }
.legal > footer, .legal .legal-colophon { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.88rem; }
.legal > footer p { margin: 0; color: inherit; display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
.legal > footer a { display: inline-flex; align-items: center; min-height: 44px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 0.94rem; }
.legal th, .legal td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }

/* ---------- 404 ---------- */
.notfound { padding-block: clamp(80px, 14vw, 180px); }
.notfound h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -0.046em; margin-bottom: 18px; }
.notfound p { color: var(--ink-soft); font-size: 1.15rem; max-width: 520px; }

/* ---------- Footer (night surface in both themes) ---------- */
.site-footer { background: var(--night); color: var(--on-night); --focus-ring: #ff9f88; }
.site-footer__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(36px, 8vw, 120px); padding-block: clamp(48px, 7vw, 80px) clamp(36px, 5vw, 56px); }
.site-footer .brand__mark { color: var(--orange-on-night); }
.site-footer .brand__studio { color: var(--on-night-muted); }
.site-footer__brand p { max-width: 380px; margin: 22px 0; color: var(--on-night-muted); line-height: 1.7; }
.site-footer__email { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-night); font-weight: 650; font-size: 1.05rem; text-decoration-color: var(--orange-on-night); text-underline-offset: 5px; }
.site-footer__apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 20px; margin: 0; padding: 0; list-style: none; }
.site-footer__apps h2 { margin: 0; font-size: 0.98rem; letter-spacing: -0.01em; }
.site-footer__apps h2 a { text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.site-footer__apps h2 a:hover { color: var(--orange-on-night); }
.site-footer__apps p { margin: 0; display: flex; gap: 6px 18px; font-size: 0.86rem; }
.site-footer__apps p a { color: var(--on-night-muted); text-underline-offset: 3px; display: inline-flex; min-height: 44px; min-width: 44px; align-items: center; }
.site-footer__apps p a:hover { color: var(--on-night); }
.site-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 22px max(28px, calc(16px + env(safe-area-inset-bottom))); border-top: 1px solid rgba(255, 255, 255, 0.13); color: var(--on-night-muted); font-size: 0.84rem; }
.site-footer__base p { margin: 0; }

/* ---------- Motion (CSS only; content is visible without it) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
/* Headings only move (no opacity), so they count as the LCP element from the first frame. */
@keyframes rise-y { from { transform: translateY(14px); } to { transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .rise--2 { animation-delay: 80ms; }
  h1.rise { animation-name: rise-y; }
  .rise--3 { animation-delay: 160ms; }
  .rise--4 { animation-delay: 240ms; }
  .icon-cloud a img, .app-hero__art img { animation: pop 800ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .icon-cloud a:nth-child(1) img { animation-delay: 120ms; }
  .icon-cloud a:nth-child(2) img { animation-delay: 180ms; }
  .icon-cloud a:nth-child(3) img { animation-delay: 240ms; }
  .icon-cloud a:nth-child(4) img { animation-delay: 300ms; }
  .icon-cloud a:nth-child(5) img { animation-delay: 360ms; }
  .icon-cloud a:nth-child(6) img { animation-delay: 420ms; }
  .icon-cloud a:nth-child(7) img { animation-delay: 480ms; }
  .app-hero__art img { animation-delay: 120ms; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features li, .features li.w3, .features li.w6 { grid-column: span 1; }
  .features li.odd-last { grid-column: span 2; }
  .hero__grid, .app-hero__inner { grid-template-columns: 1fr; }
  .icon-cloud { max-width: 340px; margin-inline: 0; }
  /* Breadcrumb first, then the icon, then the title: lift the text column's children into the grid. */
  .app-hero__inner { row-gap: 0; }
  .app-hero__inner > div:first-child { display: contents; }
  .app-hero__inner .breadcrumbs { order: -2; margin-bottom: 8px; }
  .app-hero__art { order: -1; justify-self: start; width: 104px; margin-bottom: 24px; }
  .app-hero__art::before { filter: blur(20px); }
  .stance__inner { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-card { grid-template-columns: auto minmax(0, 1fr); }
  .feature-card__actions { grid-column: 1 / -1; justify-items: start; text-align: left; }
  .split { grid-template-columns: 1fr; }
  .site-footer__main { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero { padding-top: 40px; }
  .app-hero__inner { padding-block: 16px 44px; }
  .icon-cloud { grid-template-columns: repeat(7, 1fr); max-width: none; gap: 8px; padding: 0; }
  .icon-cloud a, .icon-cloud a:nth-child(5) { grid-column: auto; }
  .stance__list { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .features li.odd-last { grid-column: auto; }
  .app-grid { grid-template-columns: 1fr; }
  .feature-card { grid-template-columns: 1fr; }
  .feature-card__icon { width: 88px; }
  .site-nav .nav-optional { display: none; }
  .brand__studio { display: none; }
  .app-band nav { width: 100%; }
  .app-band nav ul { width: 100%; }
  .app-band nav li { flex: 1 1 0; min-width: 0; }
  .app-band nav a { width: 100%; justify-content: center; min-height: 44px; padding: 0 8px; }
  .app-band__inner { padding-block: 12px 14px; }
  .site-footer__apps { grid-template-columns: 1fr; gap: 0; }
  .site-footer__apps li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
  .site-footer__apps p { gap: 4px; }
  .site-footer__apps p a { padding-inline: 8px; }
  .help__inner { flex-direction: column; align-items: flex-start; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.panel--privacy { border: 1px solid rgba(255, 255, 255, 0.08); }
.site-footer { border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* Very narrow phones (360pt and below): seven 40px icons in one row miss the 44px tap target, so wrap 4 + 3. */
@media (max-width: 380px) {
  .icon-cloud { grid-template-columns: repeat(4, 1fr); max-width: 320px; gap: 12px; }
}

/* ---------- Per-app accents (generated by build.mjs) ---------- */
.app-docket { --app-accent: #0E7C4A; --app-text: #106a41; --app-tint: #dfe8df; --app-tint-strong: #c8dccf; --app-accent-night: #35D488; --app-text-night: #35d488; }
.app-murmur { --app-accent: #A35D0E; --app-text: #874f10; --app-tint: #eee5d9; --app-tint-strong: #e5d6c3; --app-accent-night: #F6B44A; --app-text-night: #f6b44a; }
.app-passport { --app-accent: #15233F; --app-text: #15233f; --app-tint: #e0dfde; --app-tint-strong: #c9cacd; --app-accent-night: #C9D6F2; --app-text-night: #c9d6f2; }
.app-ticktally { --app-accent: #C8381A; --app-text: #a5311a; --app-tint: #f1e1db; --app-tint-strong: #edcec5; --app-accent-night: #FF7F5C; --app-text-night: #ff7f5c; }
.app-dayhue { --app-accent: #5A3EA6; --app-text: #5a3ea6; --app-tint: #e6e2e9; --app-tint-strong: #d7d0e1; --app-accent-night: #B9A4F5; --app-text-night: #b9a4f5; }
.app-ballast { --app-accent: #7A5C12; --app-text: #745812; --app-tint: #eae5da; --app-tint-strong: #ddd6c4; --app-accent-night: #C9A24B; --app-text-night: #c9a24b; }
.app-matutine { --app-accent: #B4235A; --app-text: #a72255; --app-tint: #efdfe1; --app-tint-strong: #e9cad2; --app-accent-night: #FF8FB1; --app-text-night: #ff8fb1; }
@media (prefers-color-scheme: dark) {
  .app-docket { --app-accent: #35D488; --app-text: #35d488; --app-tint: #14231e; --app-tint-strong: #173429; }
  .app-murmur { --app-accent: #F6B44A; --app-text: #f6b44a; --app-tint: #262019; --app-tint-strong: #3a2e1e; }
  .app-passport { --app-accent: #C9D6F2; --app-text: #c9d6f2; --app-tint: #222328; --app-tint-strong: #32343c; }
  .app-ticktally { --app-accent: #FF7F5C; --app-text: #ff7f5c; --app-tint: #261b1a; --app-tint-strong: #3c2521; }
  .app-dayhue { --app-accent: #B9A4F5; --app-text: #b9a4f5; --app-tint: #201e28; --app-tint-strong: #2f2b3d; }
  .app-ballast { --app-accent: #C9A24B; --app-text: #c9a24b; --app-tint: #221e19; --app-tint-strong: #322b1e; }
  .app-matutine { --app-accent: #FF8FB1; --app-text: #ff8fb1; --app-tint: #261c22; --app-tint-strong: #3c2830; }
}
