/* Report-House AI — shared stylesheet
   Design tokens and components from the "Neuraline" design. */

:root {
  --bg: #06121A;
  --panel: #0A0F1A;
  --border: #1E2A3D;
  --accent: #2DD4BF;
  --accent-light: #8CEADD;
  --text: #F4F7FB;
  --muted: #9AA8BD;
  --dim: #56657C;
  --shell: 1120px;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Keep in-page anchors clear of the sticky header. */
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  color: var(--text);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 640px at 82% -8%, rgba(45, 212, 191, 0.26), transparent 64%),
    radial-gradient(1000px 560px at -12% 42%, rgba(86, 101, 124, 0.32), transparent 64%),
    radial-gradient(900px 520px at 70% 110%, rgba(45, 212, 191, 0.16), transparent 62%),
    repeating-linear-gradient(0deg, rgba(154, 168, 189, 0.10) 0, rgba(154, 168, 189, 0.10) 1px, transparent 1px, transparent 64px),
    repeating-linear-gradient(90deg, rgba(154, 168, 189, 0.10) 0, rgba(154, 168, 189, 0.10) 1px, transparent 1px, transparent 64px);
  background-attachment: fixed;
  -webkit-tap-highlight-color: rgba(45, 212, 191, 0.24);
}

a { color: var(--accent); }
a:hover { color: var(--accent-light); }

::selection { background: var(--accent); color: var(--bg); }

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Language switching (replaces <sc-if>) ------------------------------- */

[data-lang="de"] [data-l="en"],
[data-lang="en"] [data-l="de"] { display: none; }

/* --- Layout ------------------------------------------------------------- */

.page {
  min-height: 100vh;
  min-height: 100dvh; /* mobile browser chrome shrinks the visual viewport */
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 32px;
}

.section { border-top: 2px solid var(--border); }
.section > .shell { padding-top: 72px; padding-bottom: 72px; }
.section--tight > .shell { padding-top: 56px; padding-bottom: 56px; }

.eyebrow {
  font-size: 11.5px;
  letter-spacing: 3.5px;
  font-weight: 800;
  color: var(--accent);
}

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

.site-header {
  border-bottom: 2px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  width: 12px;
  height: 12px;
  background: var(--accent);
  display: inline-block;
}

.brand-name {
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}

.brand-name em { color: var(--accent); font-style: normal; }

.nav {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
}

.nav-link:hover { color: var(--text); }

.nav-link.is-active,
.nav-link.is-active:hover { color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-btn {
  background: none;
  border: 2px solid var(--border);
  color: var(--muted);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 6px 8px;
  cursor: pointer;
  font-family: inherit;
}

.lang-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* Mobile menu button — revealed by the responsive rules at the bottom. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 2px solid var(--border);
  color: var(--muted);
  cursor: pointer;
}

.nav-toggle:hover { color: var(--text); border-color: var(--accent); }

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform 0.18s ease, top 0.18s ease, background-color 0.18s ease;
}

.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { content: ''; position: absolute; top: -6px; }
.nav-toggle-bars::after { content: ''; position: absolute; top: 6px; }

.nav-toggle[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after { transition: none; }
}

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

.btn-row {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 1.5px;
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
  padding: 15px 24px;
}

.btn--primary:hover { background: var(--accent-light); color: var(--bg); }

.btn--ghost {
  border: 2px solid var(--border);
  color: var(--text);
  padding: 13px 24px;
}

.btn--ghost:hover { border-color: var(--accent); color: var(--text); }

.btn--sm { font-size: 13px; padding-left: 20px; padding-right: 20px; }

.btn--outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 13px;
  padding: 13px 22px;
}

.btn--outline:hover { background: var(--accent); color: var(--bg); }

.btn--invert {
  margin-top: 28px;
  background: var(--bg);
  color: var(--accent);
  padding: 15px 24px;
}

.btn--invert:hover { background: var(--panel); color: var(--accent-light); }

.link-arrow {
  display: inline-block;
  margin-top: 24px;
  white-space: nowrap;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-decoration: none;
  color: var(--accent);
}

.link-arrow:hover { color: var(--accent-light); }

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

.hero { padding-top: 96px; padding-bottom: 80px; }

.hero h1 {
  font-weight: 800;
  font-size: 52px;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin: 20px 0 0;
  max-width: 880px;
}

.hero-lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin: 24px 0 0;
  max-width: 640px;
  text-wrap: pretty;
}

/* --- Stats -------------------------------------------------------------- */

.stats-shell { padding-bottom: 80px; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: var(--panel);
  border: 1px solid var(--border);
}

.stat {
  padding: 30px 28px;
  border-right: 1px solid var(--border);
}

.stat:last-child { border-right: 0; }

.stat-value {
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -1px;
}

.stat-value--accent { color: var(--accent); }

.stat-label {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 8px;
}

/* --- Section headings --------------------------------------------------- */

.section-title {
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -0.5px;
  margin: 14px 0 0;
}

.section-lead {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 14px 0 0;
  max-width: 620px;
}

/* --- Service cards ------------------------------------------------------ */

.cards-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--text);
  padding: 28px;
}

.card--accent { border-top-color: var(--accent); }

.card-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.card-title { font-weight: 800; font-size: 19px; }

.badge {
  font-size: 10.5px;
  letter-spacing: 2px;
  font-weight: 800;
  color: var(--muted);
  background: var(--border);
  padding: 3px 8px;
  white-space: nowrap;
}

.badge--accent { color: var(--bg); background: var(--accent); }

.tick-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.tick {
  border-left: 2px solid var(--border);
  padding-left: 12px;
  font-size: 14px;
  color: var(--muted);
}

.tick--accent { border-left-color: var(--accent); }

/* --- Approach steps ----------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.step {
  border-top: 2px solid var(--text);
  padding-top: 18px;
}

.step--accent { border-top-color: var(--accent); }

.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-num {
  font-weight: 800;
  font-size: 24px;
  color: var(--accent);
}

.step-title {
  font-weight: 800;
  font-size: 17px;
  margin-top: 10px;
}

.step-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 8px 0 0;
}

/* --- Promo banner ------------------------------------------------------- */

.promo {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 32px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.promo-body { flex: 1; min-width: 320px; }

.promo-title { font-weight: 800; font-size: 22px; margin-top: 8px; }

.promo-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 8px 0 0;
}

/* --- Closing call to action --------------------------------------------- */

.cta {
  background: var(--accent);
  padding: 56px 48px;
}

.cta h2 {
  font-weight: 800;
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -1px;
  color: var(--bg);
  margin: 0;
  max-width: 640px;
}

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

.site-footer { border-top: 2px solid var(--border); }

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: var(--dim);
}

.footer-spacer { flex: 1; }

.footer-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.footer-link:hover { color: var(--accent); }

/* --- Subpage headers ---------------------------------------------------- */

.page-head {
  padding-top: 80px;
  padding-bottom: 64px;
}

.page-head h1 {
  font-weight: 800;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -1px;
  margin: 16px 0 0;
}

.page-lead {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 20px 0 0;
  max-width: 640px;
  text-wrap: pretty;
}

.page-lead--narrow { max-width: 600px; }

.section--md > .shell {
  padding-top: 64px;
  padding-bottom: 64px;
}

/* --- Group and subsection headings -------------------------------------- */

.group-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.group-head--spaced { margin-top: 48px; }

.group-title {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.5px;
  margin: 0;
}

.subsection-title {
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.5px;
  margin: 0;
}

/* When an eyebrow introduces the heading it needs the usual gap below it. */
.eyebrow + .subsection-title { margin-top: 14px; }

/* --- Card grids --------------------------------------------------------- */

.cards-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}

.cards-3--spaced { margin-top: 40px; }

/* First element in a section — no heading above it to space away from. */
.cards-2--flush,
.cards-3--flush { margin-top: 0; }

.card-heading { font-weight: 800; font-size: 17px; }

.card-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 8px 0 0;
}

/* --- Feature panels ----------------------------------------------------- */

.feature {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--text);
  padding: 32px;
}

.feature--accent { border-top-color: var(--accent); }

.feature-title { font-weight: 800; font-size: 22px; margin-top: 10px; }

.feature-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 10px 0 0;
}

/* --- Question / answer list --------------------------------------------- */

.qa-list { margin-top: 24px; max-width: 820px; }

.qa {
  border-top: 2px solid var(--border);
  padding: 20px 0;
}

.qa-q { font-weight: 800; font-size: 16.5px; }

.qa-a {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 8px 0 0;
}

/* --- Link cards (contact channels) -------------------------------------- */

.link-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--text);
  padding: 26px;
  text-decoration: none;
  display: block;
}

.link-card--accent { border-top-color: var(--accent); }
.link-card:hover { border-color: var(--accent); }

.link-card-label {
  font-size: 10.5px;
  letter-spacing: 2.5px;
  font-weight: 800;
  color: var(--accent);
}

.link-card-title {
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  margin-top: 10px;
  overflow-wrap: anywhere;
}

.link-card-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 6px;
}

/* --- Compact step list -------------------------------------------------- */

.steps--compact { margin-top: 24px; }
.steps--compact .step { padding-top: 16px; }
.steps--compact .step-num { font-size: 22px; }
.steps--compact .step-title { font-size: 16.5px; margin-top: 6px; }

/* --- Wide page header (Framework) --------------------------------------- */

.page-head--lg { padding-top: 88px; }

.page-head--lg h1 {
  font-size: 54px;
  line-height: 1.04;
  letter-spacing: -1.5px;
  margin-top: 18px;
  max-width: 860px;
}

.page-head--lg .page-lead {
  font-size: 18px;
  margin-top: 22px;
  max-width: 680px;
}

.page-head--lg .btn-row { margin-top: 34px; }

.section-title--lg {
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.5px;
  margin: 14px 0 0;
}

/* --- Proof-of-concept panel --------------------------------------------- */

.poc {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  padding: 28px;
  margin-top: 28px;
}

.poc-label {
  font-size: 11px;
  letter-spacing: 2.5px;
  font-weight: 800;
  color: var(--accent);
}

.poc-text {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
  margin: 12px 0 0;
  max-width: 860px;
}

.poc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  margin-top: 18px;
}

.poc-item {
  border-left: 2px solid var(--border);
  padding-left: 12px;
}

.poc-item--accent { border-left-color: var(--accent); }
.poc-item-title { font-weight: 800; font-size: 13.5px; }

.poc-item-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 3px;
}

/* --- Architecture diagram ----------------------------------------------- */

.arch {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  margin-top: 32px;
  align-items: stretch;
  background: var(--bg);
  padding: 24px;
  border: 1px solid var(--border);
}

.arch-flow { display: flex; flex-direction: column; }

.arch-layer {
  background: linear-gradient(90deg, #10453E, #0B241F 70%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.arch-layer--source { border-left-color: var(--text); }

.arch-num {
  font-weight: 800;
  font-size: 11.5px;
  color: var(--dim);
  letter-spacing: 1.5px;
}

.arch-name {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1px;
}

.arch-name em { color: var(--accent); font-style: normal; }

.arch-desc { font-size: 12.5px; line-height: 1.45; color: var(--muted); }

.arch-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3px 0;
}

.arch-arrow::before,
.arch-arrow::after {
  content: '';
  width: 2px;
  height: 9px;
  background: var(--border);
}

.arch-arrow span {
  color: var(--accent);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
}

/* Final connector — a stub into the semantic layer, no arrow head. */
.arch-arrow--stub { padding-bottom: 0; }
.arch-arrow--stub::after,
.arch-arrow--stub span { display: none; }

.arch-semantic {
  background: rgba(140, 234, 221, 0.10);
  border: 1px solid var(--accent);
  text-align: center;
  padding: 9px 12px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--accent-light);
  margin: 0 0 12px;
}

.arch-outputs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.arch-out {
  background: linear-gradient(180deg, #10453E, #0B241F);
  border: 1px solid var(--border);
  border-top: 2px solid var(--text);
  padding: 16px 18px;
}

.arch-out--accent {
  background: linear-gradient(180deg, #12564C, #0B241F);
  border-color: var(--accent);
}

.arch-out-title { font-weight: 800; font-size: 13px; letter-spacing: 1px; }
.arch-out--accent .arch-out-title { color: var(--accent); }

.arch-out-text {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 4px;
}

.arch-out-list {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.arch-out-list strong { color: var(--text); font-weight: 700; }

.arch-cross {
  background: linear-gradient(180deg, #10453E, #0B241F 40%);
  border: 1px solid var(--border);
  border-top: 2px solid var(--text);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: space-between;
}

.arch-cross-head { display: flex; gap: 8px; align-items: center; }

.arch-cross-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  display: inline-block;
  flex: none;
}

.arch-cross-label {
  font-size: 11px;
  letter-spacing: 2.5px;
  font-weight: 800;
  color: var(--muted);
}

.arch-item {
  border-left: 2px solid var(--border);
  padding-left: 12px;
}

.arch-item--accent { border-left-color: var(--accent); }
.arch-item-title { font-weight: 800; font-size: 13.5px; }

.arch-item-text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 3px;
}

/* --- About page --------------------------------------------------------- */

.about-shell { padding-top: 80px; padding-bottom: 80px; }

.about {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  align-items: start;
}

.portrait {
  width: 360px;
  height: 440px;
  filter: grayscale(1);
  border: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portrait-placeholder {
  font-size: 11.5px;
  letter-spacing: 2px;
  font-weight: 800;
  line-height: 1.6;
  color: var(--dim);
  text-align: center;
  padding: 20px;
}

.about h1 {
  font-weight: 800;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -1px;
  margin: 16px 0 0;
}

.about-text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  margin: 22px 0 0;
  text-wrap: pretty;
}

.about-text + .about-text { margin-top: 14px; }

.about-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.about-list .tick { font-size: 14.5px; padding-left: 14px; }

/* --- Variants ----------------------------------------------------------- */

.stats--sm .stat-value { font-size: 36px; }

.card--sm { padding: 22px; }
.card--sm .card-heading { font-size: 15.5px; }
.card--sm .card-text { font-size: 13px; margin-top: 6px; }

.promo--accent { border-color: var(--accent); }
.promo-lead { max-width: 640px; }

.cta--wide h2 { max-width: 680px; }

.step-title:first-child { margin-top: 0; }

/* --- Legal pages (slim chrome) ------------------------------------------ */

.legal-header { border-bottom: 2px solid var(--border); }

.back-link {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
}

.back-link:hover { color: var(--text); }

.legal-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 32px;
}

.legal-shell h1 {
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -1px;
  margin: 0;
}

.callout {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  padding: 16px 20px;
  margin-top: 24px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.legal-blocks {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.legal-label {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 2px;
  line-height: 1.4;
  color: var(--text);
  margin: 0;
}

.legal-blocks p { margin: 10px 0 0; }

/* --- Client portal ------------------------------------------------------ */

.page--flex { display: flex; flex-direction: column; }
.page--flex .site-footer { margin-top: auto; }

.portal-login {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 32px;
}

.portal-login-inner { width: 440px; max-width: 100%; }

.portal-login h1,
.portal-title {
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -1px;
  margin: 14px 0 0;
}

.portal-login-lead {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 12px 0 0;
}

.form-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  padding: 28px;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-label {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}

.field-input {
  width: 100%;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: inherit;
}

.field-input::placeholder { color: var(--dim); }
.field-input:focus { border-color: var(--accent); }

.form-error {
  border-left: 2px solid #E85C4A;
  padding-left: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #E85C4A;
}

.btn--submit {
  background: var(--accent);
  color: var(--bg);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 1.5px;
  padding: 14px 20px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  white-space: nowrap;
}

.btn--submit:hover { background: var(--accent-light); }

.form-hint {
  font-size: 12px;
  line-height: 1.5;
  color: var(--dim);
}

.form-hint strong { color: var(--muted); font-weight: 700; }

.form-hint a { text-decoration: none; font-weight: 700; }

.portal-head {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 56px;
  padding-bottom: 32px;
}

.portal-head-main { flex: 1; min-width: 280px; }

.portal-account {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-user { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }

.btn-quiet {
  background: none;
  border: 2px solid var(--border);
  color: var(--muted);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.btn-quiet:hover { color: var(--text); border-color: var(--accent); }

.btn-quiet--danger { color: #E0857A; border-color: #5A2A2A; }
.btn-quiet--danger:hover { color: #F4B4AC; border-color: #E85C4A; }

/* --- Account deletion (confirmation) ------------------------------------ */

.form-notice {
  background: rgba(45, 212, 191, 0.10);
  border-left: 2px solid var(--accent);
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 20px;
}

.confirm-panel {
  max-width: 620px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid #E85C4A;
  padding: 30px 28px;
}

.confirm-title {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.3px;
}

.confirm-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 12px 0 0;
}

.confirm-text strong { color: var(--text); font-weight: 700; overflow-wrap: anywhere; }

.confirm-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.btn--danger {
  background: #C0392B;
  color: #F4F7FB;
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 1.5px;
  padding: 14px 22px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.btn--danger:hover { background: #D0463A; }

.doc-group-label {
  border-top: 2px solid var(--border);
  padding-top: 20px;
  font-size: 11.5px;
  letter-spacing: 3px;
  font-weight: 800;
  color: var(--muted);
}

.doc-group-label--spaced { margin-top: 36px; }

.portal-docs { padding-bottom: 72px; }

.docs-2,
.docs-3 {
  display: grid;
  gap: 20px;
  margin-top: 16px;
}

.docs-2 { grid-template-columns: 1fr 1fr; }
.docs-3 { grid-template-columns: 1fr 1fr 1fr; }

.doc {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--text);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc--accent { border-top-color: var(--accent); }

.doc-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.doc-type {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 800;
  color: var(--muted);
  background: var(--border);
  padding: 3px 8px;
  white-space: nowrap;
}

.doc--accent .doc-type { color: var(--bg); background: var(--accent); }

.doc-size { font-size: 11px; color: var(--dim); }

.doc-title { font-weight: 800; font-size: 15.5px; }
.doc--accent .doc-title { font-size: 16.5px; }

.doc-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

.doc-spacer { flex: 1; }

.doc-btn {
  align-self: flex-start;
  background: none;
  border: 2px solid var(--border);
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1.5px;
  padding: 10px 16px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.doc-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Download/Abmelden are anchors styled as buttons (server-driven, no JS). */
a.doc-btn,
a.btn-quiet { text-decoration: none; }

a.doc-btn { display: inline-block; }

a.btn-quiet {
  display: inline-flex;
  align-items: center;
}

.doc--accent .doc-btn { border-color: var(--accent); color: var(--accent); }
.doc--accent .doc-btn:hover { background: var(--accent); color: var(--bg); }

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.4;
  padding: 14px 22px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  max-width: calc(100vw - 40px);
}

.toast[hidden] { display: none; }

/* --- Prose (legal pages) ------------------------------------------------ */

.prose { max-width: 760px; }

.prose h2 {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.3px;
  margin: 40px 0 0;
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
  font-weight: 800;
  font-size: 16px;
  margin: 24px 0 0;
}

.prose p,
.prose li {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
}

.prose p { margin: 10px 0 0; }

.prose ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.prose li { margin-top: 6px; }

.prose strong { color: var(--text); font-weight: 700; }

.prose a { overflow-wrap: anywhere; }

.note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--dim);
  margin: 36px 0 0;
}

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

@media (max-width: 900px) {
  /* Single-column stacks. */
  .cards-2,
  .cards-3,
  .steps,
  .stats { grid-template-columns: 1fr; }

  .page-head h1 { font-size: 38px; }
  .page-head--lg h1 { font-size: 40px; letter-spacing: -1px; }
  .subsection-title { font-size: 28px; }
  .section-title--lg { font-size: 28px; }

  /* The architecture diagram becomes a single column: flow first, then the
     cross-cutting panel it governs. */
  .arch { grid-template-columns: 1fr; }
  .arch-outputs { grid-template-columns: 1fr; }
  .poc-grid { grid-template-columns: 1fr; }

  /* Portrait above the text instead of beside it. */
  .about { grid-template-columns: 1fr; gap: 32px; }
  .about h1 { font-size: 36px; }

  .portrait {
    width: 100%;
    max-width: 360px;
    height: auto;
    aspect-ratio: 360 / 440;
  }

  .about-shell { padding-top: 48px; padding-bottom: 48px; }

  .docs-2,
  .docs-3 { grid-template-columns: 1fr; }

  .legal-shell h1 { font-size: 32px; }
  .portal-login h1,
  .portal-title { font-size: 32px; }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .stat:last-child { border-bottom: 0; }

  .hero h1 { font-size: 40px; letter-spacing: -1px; }
  .section-title { font-size: 30px; }
  .cta { padding: 40px 32px; }
  .cta h2 { font-size: 32px; }

  /* A fixed background attachment forces a full repaint on every scroll frame
     and is ignored outright by iOS Safari — drop it on small screens. */
  body { background-attachment: scroll; }

  /* --- Mobile navigation ---
     Collapses the six wrapping rows into a menu behind a toggle. Only applied
     when JS is available (html.js); otherwise the links stay visible. */
  .js .nav-toggle { display: inline-flex; }

  /* .nav leaves the flex flow once it becomes a panel, so the actions need to
     take over pushing themselves to the right edge. */
  .js .header-actions { margin-left: auto; }

  .js .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 4px 28px calc(12px + env(safe-area-inset-bottom));
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    max-height: calc(100dvh - 100%);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .js[data-nav-open="true"] .nav { display: block; }

  .js .nav-link {
    display: block;
    font-size: 13px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
  }

  .js .nav-link:first-child { border-top: 0; }

  /* --- Touch targets ---
     Every tappable element reaches the 44px minimum. */
  .brand,
  .footer-link,
  .link-arrow,
  .back-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* The back link is too long to sit beside the wordmark on a phone — let the
     header wrap instead of pushing the page sideways. */
  .legal-header .header-inner { flex-wrap: wrap; }
  .back-link { white-space: normal; }

  .link-arrow { margin-top: 16px; }

  .lang-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 6px 10px;
  }
}

@media (min-width: 901px) {
  /* Desktop always shows the full bar, whatever state the toggle was left in. */
  .nav { display: flex !important; }
}

@media (max-width: 640px) {
  .shell { padding: 0 20px; }

  .header-inner {
    padding: 12px max(20px, env(safe-area-inset-left)) 12px max(20px, env(safe-area-inset-right));
    gap: 10px;
  }

  .js .nav { padding-left: 20px; padding-right: 20px; }

  .footer-inner { padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }

  .hero { padding-top: 48px; padding-bottom: 44px; }
  .hero h1 { font-size: 31px; letter-spacing: -0.6px; }
  .hero-lead { font-size: 16px; margin-top: 20px; }
  .eyebrow { font-size: 10.5px; letter-spacing: 2.6px; }

  .section > .shell { padding-top: 44px; padding-bottom: 44px; }
  .section--tight > .shell { padding-top: 36px; padding-bottom: 36px; }
  .stats-shell { padding-bottom: 44px; }

  .section-title { font-size: 26px; letter-spacing: -0.3px; }
  .section-lead { font-size: 15px; }

  .stat { padding: 24px 22px; }
  .stat-value { font-size: 34px; }

  .card { padding: 22px 20px; }

  /* The badge no longer fits beside a long title on one line. */
  .card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .promo { padding: 22px 20px; }
  .promo-body { min-width: 0; }
  .promo-title { font-size: 19px; }

  .cta { padding: 30px 22px; }
  .cta h2 { font-size: 25px; letter-spacing: -0.4px; }

  /* Full-width buttons are far easier to hit one-handed. */
  .btn-row { gap: 10px; margin-top: 28px; }

  .btn-row .btn,
  .promo .btn,
  .cta .btn {
    display: block;
    width: 100%;
    text-align: center;
    white-space: normal;
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .btn--ghost { padding-top: 13px; padding-bottom: 13px; }

  .footer-inner { gap: 4px 18px; font-size: 12px; }
  .footer-spacer { display: none; }

  /* Subpages */
  .page-head { padding-top: 44px; padding-bottom: 36px; }
  .page-head h1 { font-size: 29px; letter-spacing: -0.5px; }
  .page-lead { font-size: 15.5px; margin-top: 16px; }

  .section--md > .shell { padding-top: 40px; padding-bottom: 40px; }

  .group-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .group-head--spaced { margin-top: 36px; }
  .group-title { font-size: 23px; }
  .subsection-title { font-size: 24px; }

  .cards-3--spaced { margin-top: 28px; }

  .feature { padding: 22px 20px; }
  .feature-title { font-size: 19px; }

  .link-card { padding: 20px; }
  .link-card-title { font-size: 16px; }

  .qa { padding: 16px 0; }
  .qa-q { font-size: 15.5px; }

  .prose h2 { font-size: 18px; margin-top: 32px; }
  .prose p, .prose li { font-size: 14px; }

  .note { margin-top: 28px; }

  /* Framework */
  .page-head--lg { padding-top: 44px; }
  .page-head--lg h1 { font-size: 30px; }
  .page-head--lg .page-lead { font-size: 15.5px; }
  .section-title--lg { font-size: 24px; }

  .poc { padding: 20px; margin-top: 20px; }
  .poc-text { font-size: 14px; }

  .arch { padding: 14px; margin-top: 24px; gap: 14px; }
  .arch-layer { padding: 14px 16px; gap: 4px 10px; }
  .arch-cross { padding: 20px 16px; }
  .arch-out { padding: 14px 16px; }
  .stats--sm .stat-value { font-size: 28px; }

  /* About */
  .about-shell { padding-top: 40px; padding-bottom: 40px; }
  .about { gap: 24px; }
  .about h1 { font-size: 28px; letter-spacing: -0.5px; }
  .about-text { font-size: 15px; margin-top: 18px; }
  .about-list .tick { font-size: 14px; }

  /* Legal */
  .legal-shell { padding: 40px 20px; }
  .legal-shell h1 { font-size: 26px; letter-spacing: -0.5px; }
  .legal-blocks { font-size: 14.5px; gap: 24px; margin-top: 28px; }
  .legal-label { font-size: 12px; letter-spacing: 1.5px; }

  /* Portal */
  .portal-login { padding: 40px 20px; }
  .portal-login h1,
  .portal-title { font-size: 27px; letter-spacing: -0.5px; }

  .form-panel { padding: 20px; }

  /* 16px keeps iOS from zooming the viewport when a field gains focus. */
  .field-input { font-size: 16px; }

  .btn--submit { text-align: center; white-space: normal; }

  .portal-head { padding-top: 36px; padding-bottom: 24px; }

  .portal-account {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px 12px;
  }

  .portal-account .portal-user { width: 100%; }

  .confirm-actions .btn--danger,
  .confirm-actions .btn-quiet { width: 100%; text-align: center; justify-content: center; }

  .doc { padding: 20px; }
  .doc-group-label--spaced { margin-top: 28px; }

  .toast {
    left: 20px;
    right: 20px;
    transform: none;
    max-width: none;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .brand-name { font-size: 12.5px; letter-spacing: 1.4px; }
  .hero h1 { font-size: 28px; }
  .stat-value { font-size: 30px; }
}
