/* ==========================================================================
   Good Deal: site styles
   Light and corporate by default: white and light navy grounds, black
   text, deep navy for structure and actions; an optional dark navy theme.
   Source Serif 4 for headings, IBM Plex Sans for reading. Motion is quiet:
   lifts, a pointer glow, drawn strokes. No decorative strokes next to text.
   ========================================================================== */

/* ---------- Fonts (self hosted, SIL Open Font License) ---------- */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Design tokens ---------- */
/* Semantic tokens: every colour below is a role, so the dark theme only
   swaps values. Light is the default; html[data-theme="dark"] switches. */

:root {
  color-scheme: light;

  /* Grounds and text */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-alt: #F3F6FB;
  --surface-sunk: #E6EDF7;
  --text: #0B1220;
  --text-2: #374355;
  --text-3: #5F6B80;
  --line: #DCE3EE;
  --line-strong: #C3CFDF;

  /* Navy: actions, icons and emphasis */
  --accent: #13294B;
  --accent-hover: #1E3B6A;
  --on-accent: #FFFFFF;
  --accent-text: #13294B;
  --accent-text-2: #1E3B6A;
  --accent-soft: #4C6A9A;

  /* Navy bands and the decision card */
  --band: #13294B;
  --band-card: #13294B;
  --on-band: #FFFFFF;
  --on-band-2: rgba(255, 255, 255, 0.82);

  /* Details */
  --header-bg: rgba(255, 255, 255, 0.88);
  --disabled-bg: #C3CFDF;
  --disabled-text: #FFFFFF;
  --todo-bg: #FFF3C4;
  --todo-text: #6B5200;
  --chart-grid: #E7ECF3;
  --chart-fill: #13294B;
  --spot: rgba(30, 59, 106, 0.08);
  --sheen: rgba(255, 255, 255, 0.24);
  --mark-opacity: 0.075;

  --shadow-card: 0 1px 2px rgba(11, 18, 32, 0.04), 0 12px 32px rgba(19, 41, 75, 0.07);
  --shadow-lift: 0 2px 4px rgba(11, 18, 32, 0.05), 0 24px 52px rgba(19, 41, 75, 0.15);
  --shadow-gate: 0 30px 70px rgba(19, 41, 75, 0.18);

  /* Type */
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-h1: clamp(2.7rem, 5.6vw, 4.9rem);
  --fs-h2: clamp(2rem, 3.6vw, 3.05rem);
  --fs-h3: 1.28rem;
  --fs-lead: clamp(1.08rem, 1.3vw, 1.2rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;
  --fs-label: 0.76rem;

  /* Shape */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --header-h: 74px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0A111E;
  --surface: #111B2E;
  --surface-alt: #0E1728;
  --surface-sunk: #1B2944;
  --text: #EAF0F8;
  --text-2: #B9C4D6;
  --text-3: #8C99B0;
  --line: #213050;
  --line-strong: #2F4166;

  --accent: #DCE6F7;
  --accent-hover: #FFFFFF;
  --on-accent: #0E1B33;
  --accent-text: #AFC6EE;
  --accent-text-2: #AFC6EE;
  --accent-soft: #7590BD;

  --band: #13294B;
  --band-card: #1A3360;

  --header-bg: rgba(10, 17, 30, 0.86);
  --disabled-bg: #24324F;
  --disabled-text: #7F8CA3;
  --todo-bg: #3D3410;
  --todo-text: #FFE28A;
  --chart-grid: #1B2740;
  --chart-fill: #AFC6EE;
  --spot: rgba(175, 198, 238, 0.1);
  --sheen: rgba(19, 41, 75, 0.14);
  --mark-opacity: 0.1;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.28);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.4), 0 26px 56px rgba(0, 0, 0, 0.5);
  --shadow-gate: 0 30px 70px rgba(0, 0, 0, 0.55);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  /* Long German words wrap without the browser ever adding a hyphen. */
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: opacity 0.2s ease;
}
html.i18n-pending body { opacity: 0; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p, h1, h2, h3, dl, dd, ol, ul { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--surface-sunk); color: var(--text); }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent-text-2); outline-offset: 3px; border-radius: 4px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.25s var(--ease-out);
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Theme switch: a circle grows from the toggle (where supported). */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Keyframes ---------- */

@keyframes rise {
  from { opacity: 0; translate: 0 22px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes word-up {
  from { translate: 0 108%; }
  to { translate: 0 0; }
}
@keyframes draw {
  from { stroke-dasharray: 1; stroke-dashoffset: 1; }
  to { stroke-dasharray: 1; stroke-dashoffset: 0; }
}
@keyframes redraw {
  from { stroke-dasharray: 1; stroke-dashoffset: 1; }
  to { stroke-dasharray: 1; stroke-dashoffset: 0; }
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 var(--pulse, rgba(30, 59, 106, 0.45)); }
  70% { box-shadow: 0 0 0 9px rgba(30, 59, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(30, 59, 106, 0); }
}
@keyframes chip-pop {
  0% { scale: 0.85; opacity: 0.4; }
  60% { scale: 1.06; opacity: 1; }
  100% { scale: 1; opacity: 1; }
}
@keyframes spin-once { to { rotate: 360deg; } }
@keyframes drift {
  0% { translate: 0 0; }
  50% { translate: 6% 4%; }
  100% { translate: 0 0; }
}

/* ---------- Type ---------- */

.hero-title,
.h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--text);
  text-wrap: balance;
}
.hero-title { font-size: var(--fs-h1); line-height: 1.04; }
.h2 { font-size: var(--fs-h2); line-height: 1.1; }

.eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text-2);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 40rem;
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */

.btn {
  --btn-h: 2.9rem;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: var(--btn-h);
  padding: 0 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.25s ease, translate 0.25s var(--ease-out), scale 0.15s ease;
}
.btn .icon { transition: transform 0.3s var(--ease-out); }
.btn:hover .icon { transform: translateX(4px); }
.btn:active { scale: 0.97; }
.btn-sm { --btn-h: 2.5rem; padding: 0 1rem; font-size: 0.92rem; }
.btn-lg { --btn-h: 3.3rem; padding: 0 1.6rem; font-size: 1.02rem; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, var(--sheen) 50%, transparent 70%);
  translate: -120% 0;
  transition: translate 0.75s var(--ease-out);
  pointer-events: none;
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 10px 24px rgba(19, 41, 75, 0.22); translate: 0 -1px; }
.btn-primary:hover::after { translate: 120% 0; }
.btn-primary:disabled { background: var(--disabled-bg); color: var(--disabled-text); cursor: not-allowed; box-shadow: none; translate: none; }
.btn-primary:disabled::after { display: none; }
.btn-primary:disabled .icon { transform: none; }

.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--accent-text); }
.btn-secondary:hover { border-color: var(--accent-text); background: var(--surface-alt); translate: 0 -1px; }
.btn.is-copied { border-color: var(--accent-text); background: var(--surface-alt); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px rgba(19, 41, 75, 0.06); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  height: var(--header-h);
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
  transition: height 0.35s var(--ease-out);
}
.site-header.is-scrolled .header-inner { height: calc(var(--header-h) - 10px); }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; flex: none; }
.brand-mark { width: 32px; height: 32px; color: var(--accent-text); transition: rotate 0.5s var(--ease-out); }
html.js .site-header .brand-mark { animation: draw 1.6s var(--ease-out) 0.15s backwards; }
html .brand:hover .brand-mark,
html.js .site-header .brand:hover .brand-mark { animation: redraw 1.1s var(--ease-out); rotate: -8deg; }
.brand-word { font-family: var(--serif); font-size: 1.38rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1; }

.primary-nav { position: relative; margin-left: auto; }
.primary-nav ul { position: relative; z-index: 1; display: flex; gap: 0.2rem; }
.primary-nav a {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.primary-nav a:hover { color: var(--accent-text); background: var(--surface-alt); }
.primary-nav a.is-current { color: var(--accent-text); background: var(--surface-sunk); }
/* With JS a single pill glides between the links instead. */
html.js .primary-nav a:hover,
html.js .primary-nav a.is-current { background: transparent; }
.nav-pill {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-sunk);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease-out), width 0.4s var(--ease-out), height 0.4s var(--ease-out), opacity 0.25s ease;
}

.header-actions { display: flex; align-items: center; gap: 0.7rem; }
.brand + .header-actions { margin-left: auto; }

/* Language switch: equal cells with a sliding navy marker */
.lang-switch {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.lang-switch button {
  position: relative;
  z-index: 1;
  min-width: 2.4rem;
  padding: 0.28rem 0.6rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-3);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.25s ease;
}
.lang-switch button:hover { color: var(--accent-text); }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
html.js .lang-switch button[aria-pressed="true"] { background: transparent; }
html.js .lang-switch::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / var(--n, 3));
  border-radius: 6px;
  background: var(--accent);
  transform: translateX(calc(100% * var(--i, 0)));
  transition: transform 0.4s var(--ease-out);
}
.lang-switch-lg button { padding: 0.55rem 1rem; font-size: 0.95rem; letter-spacing: 0; }

/* Theme toggle: moon in light mode, sun in dark mode */
.theme-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--accent-text);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, translate 0.25s var(--ease-out);
}
.theme-toggle:hover { border-color: var(--accent-text); background: var(--surface-alt); translate: 0 -1px; }
/* Phones: one small button with the current language opens the picker */
.lang-trigger {
  display: none;
  place-items: center;
  flex: none;
  min-width: 36px;
  height: 36px;
  padding: 0 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, translate 0.25s var(--ease-out);
}
.lang-trigger:hover { border-color: var(--accent-text); background: var(--surface-alt); translate: 0 -1px; }

.theme-toggle .icon {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  transition: opacity 0.35s ease, rotate 0.5s var(--ease-out), scale 0.5s var(--ease-out);
}
.theme-toggle .i-sun { opacity: 0; rotate: -90deg; scale: 0.5; }
html[data-theme="dark"] .theme-toggle .i-moon { opacity: 0; rotate: 90deg; scale: 0.5; }
html[data-theme="dark"] .theme-toggle .i-sun { opacity: 1; rotate: 0deg; scale: 1; }

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}
.menu-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent-text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), top 0.3s var(--ease-out);
}
.menu-toggle span:first-child { top: 16px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 20.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 20.5px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 1.5rem) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transition: opacity 0.25s ease; }
.mobile-menu-nav { display: grid; }
.mobile-menu-nav a {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s ease, translate 0.3s var(--ease-out);
}
.mobile-menu-nav a:hover { color: var(--accent-text-2); translate: 6px 0; }
.mobile-menu.is-open .mobile-menu-nav a { animation: rise 0.55s var(--ease-out) backwards; }
.mobile-menu.is-open .mobile-menu-nav a:nth-child(2) { animation-delay: 0.04s; }
.mobile-menu.is-open .mobile-menu-nav a:nth-child(3) { animation-delay: 0.08s; }
.mobile-menu.is-open .mobile-menu-nav a:nth-child(4) { animation-delay: 0.12s; }
.mobile-menu.is-open .mobile-menu-nav a:nth-child(5) { animation-delay: 0.16s; }
.mobile-menu.is-open .mobile-menu-nav a:nth-child(6) { animation-delay: 0.2s; }
.mobile-menu-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  background: linear-gradient(90deg, var(--bg) 0%, var(--bg) 58%, var(--surface-alt) 58%, var(--surface-alt) 100%);
  border-bottom: 1px solid var(--line);
}
.hero > .container { position: relative; z-index: 1; }

/* The G mark, drawn large behind the summary card */
.hero-mark {
  position: absolute;
  z-index: 0;
  top: 52%;
  right: -7%;
  width: min(60vw, 820px);
  height: auto;
  max-width: none;
  overflow: visible;
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: var(--mark-opacity);
  translate: var(--px, 0px) calc(-50% + var(--py, 0px));
  transition: translate 0.9s var(--ease-out);
  pointer-events: none;
}
html.js .hero-mark path { animation: draw 2.6s var(--ease-out) 0.35s backwards; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.hero-copy { display: grid; gap: 1.5rem; min-width: 0; }
.hero-lead { font-size: var(--fs-lead); color: var(--text-2); max-width: 36rem; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.4rem; }

html.js .hero-copy > .eyebrow { animation: rise 0.8s var(--ease-out) 0.05s backwards; }
html.js .hero-copy > .hero-lead { animation: rise 0.9s var(--ease-out) 0.45s backwards; }
html.js .hero-copy > .hero-actions { animation: rise 0.9s var(--ease-out) 0.6s backwards; }

/* Headline words slide up out of their own line */
.hero-title .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.hero-title .word-inner {
  display: inline-block;
  animation: word-up 1s var(--ease-out) backwards;
  animation-delay: calc(0.12s + var(--wi, 0) * 0.09s);
}

.glance {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.5s var(--ease-out), box-shadow 0.35s ease, border-color 0.35s ease;
}
.glance:hover { box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
html.js .glance { animation: rise 1s var(--ease-out) 0.35s backwards; }
html.js .glance-list > div { animation: rise 0.7s var(--ease-out) backwards; }
html.js .glance-list > div:nth-child(1) { animation-delay: 0.55s; }
html.js .glance-list > div:nth-child(2) { animation-delay: 0.63s; }
html.js .glance-list > div:nth-child(3) { animation-delay: 0.71s; }
html.js .glance-list > div:nth-child(4) { animation-delay: 0.79s; }
.glance-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.1rem; }
.glance-mark { width: 26px; height: 26px; color: var(--accent-text); }
html.js .glance-mark { animation: draw 1.4s var(--ease-out) 0.7s backwards; }
.glance-head h2 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.glance-list > div { display: grid; gap: 0.15rem; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.glance-list dt { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.glance-list dd { font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.glance-note { margin-top: 0.4rem; padding-top: 0.9rem; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--text-3); }

/* A live dot next to "in formation" (prelaunch) */
html[data-mode="prelaunch"] .glance-list > div:first-child dd { display: inline-flex; align-items: center; gap: 0.55rem; }
html[data-mode="prelaunch"] .glance-list > div:first-child dd::before,
.step.is-next .step-status::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-soft);
  --pulse: rgba(76, 106, 154, 0.55);
  animation: pulse-ring 2s ease-out infinite;
}

/* ---------- Intro band ---------- */

.intro { position: relative; overflow: hidden; background: var(--band); color: var(--on-band); }
.intro::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(40% 50% at 20% 30%, rgba(76, 106, 154, 0.38), transparent 70%),
    radial-gradient(35% 45% at 80% 70%, rgba(30, 59, 106, 0.55), transparent 70%);
  animation: drift 18s ease-in-out infinite;
  pointer-events: none;
}
.intro .container { position: relative; padding-block: clamp(3rem, 6vw, 4.5rem); }
.intro-text {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.3vw, 1.9rem);
  line-height: 1.4;
  max-width: 60rem;
  text-wrap: pretty;
}
/* Words light up as the band scrolls through the screen */
.intro-text .w { opacity: 0.3; transition: opacity 0.45s ease; }
.intro-text .w.is-lit { opacity: 1; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.section-head { display: grid; gap: 1rem; max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.results, .steps-section { background: var(--surface-alt); border-block: 1px solid var(--line); }
.terms-section, .faq { background: var(--bg); }
.contact { background: var(--surface-alt); border-top: 1px solid var(--line); }

/* ---------- Cards: lift, glow that follows the pointer ---------- */

.spot { position: relative; isolation: isolate; }
.spot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.spot:hover::after { opacity: 1; }

.flow-step,
.step,
.contact-card,
.pillar,
.results-stats > div {
  transition: translate 0.4s var(--ease-out), box-shadow 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}

/* ---------- A day at Good Deal ---------- */

.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.25fr);
  align-items: stretch;
  gap: 0.6rem;
}
.flow-step {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-width: 0;
  padding: 1.5rem 1.4rem 1.6rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.flow-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 0.4rem;
  border-radius: 10px;
  background: var(--surface-sunk);
  color: var(--accent-text);
  transition: background-color 0.35s ease, color 0.35s ease, scale 0.45s var(--ease-spring), rotate 0.45s var(--ease-spring);
}
.flow-icon .icon { width: 22px; height: 22px; }
.flow-time { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.12em; color: var(--accent-text-2); }
.flow-step h3 { font-family: var(--serif); font-size: var(--fs-h3); font-weight: 600; line-height: 1.25; }
.flow-step p:not(.flow-time) { color: var(--text-2); font-size: 0.98rem; }
.flow-arrow { display: grid; place-items: center; color: var(--line-strong); transition: color 0.4s ease, translate 0.4s var(--ease-out); }
.flow-arrow .icon { width: 22px; height: 22px; }
.flow-arrow.is-lit { color: var(--accent-soft); translate: 3px 0; }

.flow-step:hover,
.flow-step.is-active {
  translate: 0 -6px;
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-lift);
}
.flow-step:hover .flow-icon,
.flow-step.is-active .flow-icon { background: var(--accent); color: var(--on-accent); scale: 1.08; rotate: -6deg; }

.flow-step-decision { background: var(--band-card); border-color: var(--band-card); color: var(--on-band); --spot: rgba(255, 255, 255, 0.12); }
.flow-step-decision h3 { color: var(--on-band); }
.flow-step-decision p:not(.flow-time) { color: var(--on-band-2); }
.flow-step-decision .flow-icon { background: rgba(255, 255, 255, 0.12); color: var(--on-band); }
.flow-step-decision:hover,
.flow-step-decision.is-active { border-color: var(--band-card); box-shadow: var(--shadow-lift), 0 0 0 4px rgba(76, 106, 154, 0.3); }
.flow-step-decision:hover .flow-icon,
.flow-step-decision.is-active .flow-icon { background: var(--on-band); color: var(--band-card); }
.outcomes { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.outcome {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--on-band);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.outcome-main { background: var(--on-band); border-color: var(--on-band); color: var(--band-card); }
.flow-step-decision.is-active .outcome { animation: chip-pop 0.55s var(--ease-out) backwards; }
.flow-step-decision.is-active .outcome:nth-child(2) { animation-delay: 0.14s; }
.flow-step-decision.is-active .outcome:nth-child(3) { animation-delay: 0.28s; }

.flow-repeat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.4rem;
  color: var(--text-3);
  font-size: var(--fs-small);
}
.flow-repeat .icon { color: var(--accent-soft); }
.flow-repeat.is-spinning .icon { animation: spin-once 0.9s var(--ease-out); }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: clamp(3.5rem, 7vw, 5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}
.pillar {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  min-width: 0;
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
}
.pillar .icon { width: 28px; height: 28px; color: var(--accent-text); margin-bottom: 0.3rem; transition: scale 0.45s var(--ease-spring), rotate 0.45s var(--ease-spring); }
.pillar h3 { font-family: var(--serif); font-size: var(--fs-h3); font-weight: 600; }
.pillar p { color: var(--text-2); }
.pillar:hover { translate: 0 -4px; border-color: var(--line); background: var(--surface); box-shadow: var(--shadow-card); }
.pillar:hover .icon { scale: 1.15; rotate: -8deg; }

/* ---------- Steps (road to launch / for investors) ---------- */

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.step {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  min-width: 0;
  padding: 1.5rem 1.4rem 1.6rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}
.step:hover { translate: 0 -5px; border-color: var(--accent-soft); box-shadow: var(--shadow-lift); }
.step-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-self: start;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--surface-sunk);
  color: var(--accent-text);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.step:hover .step-status { background: var(--accent); color: var(--on-accent); }
.step-status .icon { width: 14px; height: 14px; }
.step.is-done { border-color: var(--accent); }
.step.is-done .step-status { background: var(--accent); color: var(--on-accent); }
.step h3 { font-family: var(--serif); font-size: var(--fs-h3); font-weight: 600; line-height: 1.25; margin-top: 0.3rem; }
.step > p:last-child { color: var(--text-2); font-size: 0.98rem; }

/* ---------- Terms ---------- */

.terms-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 3rem;
  border-top: 1px solid var(--line);
}
.terms-list > div {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  gap: 1rem;
  padding: 0.95rem 0.75rem;
  border-bottom: 1px solid var(--line);
  min-width: 0;
  transition: background-color 0.25s ease;
}
.terms-list > div:hover { background: var(--surface-alt); }
.terms-list dt { color: var(--text-3); font-size: 0.95rem; transition: color 0.25s ease; }
.terms-list > div:hover dt { color: var(--accent-text); }
.terms-list dd { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.terms-note { margin-top: 1.2rem; font-size: var(--fs-small); color: var(--text-3); }

.todo {
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  background: var(--todo-bg);
  color: var(--todo-text);
  font-size: 0.9em;
  font-weight: 600;
}

/* ---------- FAQ ---------- */

.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.faq-grid .section-head { margin-bottom: 0; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.3rem 0;
  cursor: pointer;
  list-style: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s ease, padding 0.35s var(--ease-out);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon {
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 50%;
  background: var(--surface-sunk);
  color: var(--accent-text);
  transition: transform 0.4s var(--ease-out), background-color 0.25s ease, color 0.25s ease;
}
.faq-item[open] summary .icon { transform: rotate(45deg); }
html.js .faq-item[open] summary .icon { transform: none; }
html.js .faq-item.is-open summary .icon { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent-text-2); padding-left: 0.4rem; }
.faq-item summary:hover .icon,
.faq-item.is-open summary .icon { background: var(--accent); color: var(--on-accent); }
.faq-item p { padding: 0 2.5rem 1.4rem 0; color: var(--text-2); max-width: 40rem; }
.faq-item a, .legal a { color: var(--accent-text-2); text-underline-offset: 3px; }
a.law {
  color: var(--accent-text-2);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
a.law:hover { color: var(--accent-text); text-decoration-thickness: 2px; }
.faq-item a:hover, .legal a:hover { color: var(--accent-text); }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact-grid .section-head { margin-bottom: 0; }
.contact-cards { display: grid; gap: 1rem; }
.contact-card {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.contact-card:hover { translate: 0 -4px; border-color: var(--accent-soft); box-shadow: var(--shadow-lift); }
.contact-label { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.contact-label .icon { color: var(--accent-text); transition: scale 0.45s var(--ease-spring), rotate 0.45s var(--ease-spring); }
.contact-card:hover .contact-label .icon { scale: 1.25; rotate: -12deg; }
.contact-value { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; overflow-wrap: anywhere; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- Footer ---------- */

.site-footer { padding-block: clamp(3.5rem, 7vw, 5rem) calc(env(safe-area-inset-bottom, 0px) + 1.5rem); background: var(--bg); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-brand { display: grid; gap: 0.9rem; align-content: start; }
.footer-brand p { color: var(--text-2); font-family: var(--serif); font-size: 1.1rem; }
.footer-head { margin-bottom: 0.9rem; font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.footer-col ul { display: grid; gap: 0.5rem; }
.footer-col a { display: inline-block; color: var(--text-2); text-decoration: none; font-size: 0.97rem; overflow-wrap: anywhere; transition: color 0.2s ease, translate 0.3s var(--ease-out); }
.footer-col a:hover { color: var(--accent-text); translate: 4px 0; }
.footer-status { margin-top: 2.5rem; max-width: 46rem; font-size: var(--fs-small); color: var(--text-3); }
.footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--text-3);
}
.footer-switches { display: inline-flex; align-items: center; gap: 0.6rem; }
.to-top { justify-self: end; display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-2); text-decoration: none; }
.to-top .icon { transition: translate 0.35s var(--ease-out); }
.to-top:hover { color: var(--accent-text); }
.to-top:hover .icon { translate: 0 -4px; }

/* ---------- Reveal on scroll ---------- */

html.js [data-reveal] {
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), translate 0.4s var(--ease-out), box-shadow 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
  transition-delay: calc(var(--d, 0) * 90ms), calc(var(--d, 0) * 90ms), 0s, 0s, 0s, 0s;
}
html.js [data-reveal].is-pending { opacity: 0; transform: translateY(26px); }

/* ---------- Model results (fund build only) ---------- */

.results-wrap { position: relative; }
.results-gate {
  position: absolute;
  z-index: 3;
  inset: 0;
  margin: auto;
  width: min(34rem, calc(100% - 2rem));
  height: max-content;
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding: clamp(1.6rem, 4vw, 2.3rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-gate);
}
.gate-mark { width: 34px; height: 34px; color: var(--accent-text); }
.results-gate:hover .gate-mark { animation: redraw 1.1s var(--ease-out); }
.results-gate h3 { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; }
.results-gate p { color: var(--text-2); }
.check { display: flex; gap: 0.8rem; align-items: flex-start; cursor: pointer; font-size: 0.97rem; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 5px;
  border: 1.5px solid var(--accent-soft);
  color: transparent;
  background: var(--surface);
  transition: background-color 0.2s ease, border-color 0.2s ease, scale 0.35s var(--ease-spring);
}
.check-box .icon { width: 16px; height: 16px; }
.check:hover .check-box { border-color: var(--accent-text); }
.check input:checked + .check-box { background: var(--accent); border-color: var(--accent); color: var(--on-accent); scale: 1.1; }
.check input:focus-visible + .check-box { outline: 2px solid var(--accent-text-2); outline-offset: 2px; }

.results-body { display: grid; gap: 1.5rem; transition: filter 0.6s ease, opacity 0.6s ease; }
.results-wrap:not(.is-open) .results-body { filter: blur(12px); opacity: 0.5; pointer-events: none; user-select: none; }
.results-wrap.is-open .results-gate { display: none; }

.results-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.chart-title { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.segmented { position: relative; display: inline-flex; padding: 3px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); }
.segmented button {
  padding: 0.45rem 0.95rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.segmented button:hover { color: var(--accent-text); }
.segmented button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); }

.chart { position: relative; padding: 1.3rem 1.3rem 0.9rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-card); }
.chart-unit { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 0.4rem; }
.chart-svg { width: 100%; height: clamp(260px, 36vw, 400px); overflow: visible; }
.chart-grid line { stroke: var(--chart-grid); stroke-width: 1; }
.chart-grid line.base { stroke: var(--line-strong); }
.chart-axis text { fill: var(--text-3); font-family: var(--sans); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart-stop-top { stop-color: var(--chart-fill); stop-opacity: 0.16; }
.chart-stop-bottom { stop-color: var(--chart-fill); stop-opacity: 0; }
.chart-area { fill: url(#chart-area-grad); }
.chart-line { fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-end { fill: var(--accent-text); stroke: var(--surface); stroke-width: 3; }
.chart-end-label { fill: var(--text); font-family: var(--sans); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-cross { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 2 4; }
.chart-hover-dot { fill: var(--accent-text); stroke: var(--surface); stroke-width: 3; }
.chart-tip {
  position: absolute;
  z-index: 2;
  min-width: 9rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  font-size: 0.85rem;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  white-space: nowrap;
}
.chart-tip strong { display: block; font-size: 1.02rem; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-tip span { color: var(--text-3); font-size: 0.8rem; }

.results-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.results-stats > div { padding: 1.2rem 1.2rem 0.4rem 0; min-width: 0; border-radius: 0 0 var(--radius-md) var(--radius-md); }
.results-stats > div + div { padding-left: 1.2rem; border-left: 1px solid var(--line); }
.results-stats > div:hover { background: var(--surface); }
.results-stats dt { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.results-stats dd { display: grid; gap: 0.2rem; margin-top: 0.45rem; }
.rs-value { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; line-height: 1; color: var(--accent-text); font-variant-numeric: tabular-nums lining-nums; }
.rs-value-sm { font-size: 1.15rem; line-height: 1.3; color: var(--text); }
.rs-note { color: var(--text-2); font-size: 0.92rem; }
.results-disclaimer { font-size: var(--fs-small); color: var(--text-3); max-width: 62rem; }
.results-table summary { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; list-style: none; color: var(--accent-text); font-weight: 600; }
.results-table summary::-webkit-details-marker { display: none; }
.results-table summary .icon { transition: transform 0.4s var(--ease-out); }
.results-table[open] summary .icon { transform: rotate(45deg); }
html.js .results-table[open] summary .icon { transform: none; }
html.js .results-table.is-open summary .icon { transform: rotate(45deg); }
.table-wrap { overflow-x: auto; margin-top: 1rem; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.table-wrap caption { text-align: left; padding: 0.8rem 1rem; color: var(--text-3); font-size: 0.85rem; }
.table-wrap th, .table-wrap td { padding: 0.55rem 1rem; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; }
.table-wrap th:first-child, .table-wrap td:first-child { text-align: left; }
.table-wrap thead th { color: var(--text-3); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.table-wrap tbody tr { transition: background-color 0.2s ease; }
.table-wrap tbody tr:hover { background: var(--surface-alt); }

/* ---------- Language picker (first visit) ---------- */

@keyframes dialog-in {
  from { opacity: 0; translate: 0 18px; scale: 0.97; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes dialog-out {
  from { opacity: 1; translate: 0 0; scale: 1; }
  to { opacity: 0; translate: 0 10px; scale: 0.98; }
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.lang-dialog {
  width: min(26rem, calc(100% - 2rem));
  max-width: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-gate);
  overflow: hidden;
}
.lang-dialog[open] { animation: dialog-in 0.55s var(--ease-out); }
.lang-dialog.is-closing { animation: dialog-out 0.28s ease forwards; }
.lang-dialog::backdrop {
  background: rgba(10, 17, 30, 0.42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: backdrop-in 0.4s ease;
}
.lang-dialog.is-closing::backdrop { opacity: 0; transition: opacity 0.28s ease; }
.lang-dialog-inner { display: grid; gap: 1.4rem; padding: clamp(1.6rem, 5vw, 2.2rem); }
.lang-dialog-mark { width: 40px; height: 40px; color: var(--accent-text); }
.lang-dialog[open] .lang-dialog-mark { animation: redraw 1.3s var(--ease-out) 0.15s backwards; }
.lang-dialog-title { display: grid; gap: 0.15rem; font-family: var(--serif); font-weight: 600; line-height: 1.2; }
.lang-dialog-title span:first-child { font-size: 1.65rem; color: var(--text); }
.lang-dialog-title span:not(:first-child) { font-size: 1.05rem; color: var(--text-3); font-weight: 500; }
.lang-options { display: grid; gap: 0.6rem; }
.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, translate 0.3s var(--ease-out), box-shadow 0.3s ease;
}
.lang-dialog[open] .lang-option { animation: rise 0.6s var(--ease-out) backwards; }
.lang-dialog[open] .lang-option:nth-child(1) { animation-delay: 0.12s; }
.lang-dialog[open] .lang-option:nth-child(2) { animation-delay: 0.2s; }
.lang-dialog[open] .lang-option:nth-child(3) { animation-delay: 0.28s; }
.lang-option:hover { border-color: var(--accent-soft); background: var(--surface-alt); translate: 0 -2px; box-shadow: var(--shadow-card); }
.lang-code {
  display: inline-grid;
  place-items: center;
  min-width: 2.4rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--surface-sunk);
  color: var(--accent-text);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.lang-option.is-suggested { border-color: var(--accent); }
.lang-option.is-suggested .lang-code,
.lang-option:hover .lang-code { background: var(--accent); color: var(--on-accent); }

/* ---------- Legal page ---------- */

.legal-hero {
  padding-block: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(2.5rem, 6vw, 4rem)) clamp(2.2rem, 4vw, 3rem);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}
.legal-hero .h2 { max-width: 48rem; margin-top: 1rem; font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
html.js .legal-hero .container > * { animation: rise 0.8s var(--ease-out) backwards; }
html.js .legal-hero .container > :nth-child(2) { animation-delay: 0.08s; }
html.js .legal-hero .container > :nth-child(3) { animation-delay: 0.16s; }
.legal-updated { margin-top: 1rem; color: var(--text-3); font-size: var(--fs-small); }
.legal-layout { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); padding-block: clamp(3rem, 6vw, 4.5rem); }
.legal-toc { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; }
.legal-toc ol { display: grid; gap: 0.35rem; margin-top: 0.9rem; }
.legal-toc a { display: inline-block; color: var(--text-2); text-decoration: none; font-size: 0.94rem; transition: color 0.2s ease, translate 0.3s var(--ease-out); }
.legal-toc a:hover { color: var(--accent-text); translate: 4px 0; }
.legal { max-width: 46rem; display: grid; gap: 2.6rem; }
.legal section { display: grid; gap: 0.85rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.legal h2 { font-family: var(--serif); font-size: clamp(1.45rem, 2.3vw, 1.8rem); font-weight: 600; line-height: 1.2; }
.legal p, .legal li { color: var(--text-2); }
.legal ul { display: grid; gap: 0.55rem; }
.legal ul li { position: relative; padding-left: 1.2rem; }
.legal ul li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); }
.legal dl { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); border-top: 1px solid var(--line); }
.legal dt, .legal dd { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.legal dt { color: var(--text-3); font-size: 0.95rem; padding-right: 1rem; }
.legal dd { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.legal-back { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text-2); text-decoration: none; font-size: 0.95rem; }
.legal-back .icon { transform: rotate(180deg); transition: translate 0.35s var(--ease-out); }
.legal-back:hover { color: var(--accent-text); }
.legal-back:hover .icon { translate: -4px 0; }
html:not([lang="sl"]) [data-lang-block="sl"],
html:not([lang="en"]) [data-lang-block="en"],
html:not([lang="de"]) [data-lang-block="de"] { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .primary-nav { display: none; }
  .menu-toggle { display: block; }
  .header-actions { margin-left: auto; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .flow-arrow { display: none; }
}

@media (max-width: 900px) {
  .hero { background: var(--bg); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-mark { top: 0; right: -45%; width: 115vw; opacity: calc(var(--mark-opacity) * 0.55); translate: var(--px, 0px) var(--py, 0px); }
  .glance { background: var(--surface-alt); box-shadow: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .results-stats > div:nth-child(n + 3) { margin-top: 1.2rem; border-top: 1px solid var(--line); }
  .terms-list { grid-template-columns: minmax(0, 1fr); }
  .faq-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .legal-layout { grid-template-columns: minmax(0, 1fr); }
  .legal-toc { position: static; }
}

@media (max-width: 680px) {
  :root { --header-h: 64px; }
  /* Contact stays in the header on phones, next to the theme button */
  .header-inner { gap: 0.6rem; }
  .header-actions { gap: 0.45rem; }
  .brand { gap: 0.5rem; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-word { font-size: 1.2rem; }
  .header-cta { --btn-h: 2.3rem; padding: 0 0.8rem; font-size: 0.87rem; }
  .header-actions .lang-switch { display: none; }
  .header-actions { gap: 0.35rem; }
  .lang-trigger { display: inline-grid; min-width: 34px; height: 34px; }
  .theme-toggle { width: 34px; height: 34px; }
  .menu-toggle { width: 38px; height: 38px; }
  .menu-toggle span { left: 10px; right: 10px; }
  .menu-toggle span:first-child { top: 13px; }
  .menu-toggle span:last-child { top: 22px; }
  .menu-toggle[aria-expanded="true"] span:first-child,
  .menu-toggle[aria-expanded="true"] span:last-child { top: 17.5px; }
  .flow { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .flow-arrow { display: grid; transform: rotate(90deg); }
  .flow-arrow.is-lit { translate: 0 0; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .pillar { padding: 1rem 0; }
  .pillar:hover { translate: none; border-color: transparent; background: transparent; box-shadow: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .terms-list > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .to-top { justify-self: start; }
  .legal dl { grid-template-columns: minmax(0, 1fr); }
  .legal dt { border-bottom: 0; padding-bottom: 0; }
  .faq-item p { padding-right: 0; }
  .hero-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 400px) {
  .brand-word { font-size: 1.1rem; }
  .brand { gap: 0.4rem; }
  .header-cta { padding: 0 0.65rem; font-size: 0.85rem; }
}
/* The smallest phones keep the G mark and drop the name, so nothing overlaps */
@media (max-width: 359px) {
  .header-inner:has(.header-cta) .brand-word { display: none; }
}

/* Touch screens: no hover lift that sticks after a tap */
@media (hover: none) {
  .spot::after { display: none; }
  .step:hover, .contact-card:hover, .pillar:hover { translate: none; }
}

@media print {
  html.js [data-reveal].is-pending { opacity: 1; transform: none; }
  .intro-text .w { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.001ms !important; }
  html.js [data-reveal].is-pending { opacity: 1; transform: none; }
  .intro-text .w { opacity: 1; }
  .glance { transform: none; }
}
