/* Amana Finanz, amanafinanz.com
   Plain CSS, no build step. Mobile first: base styles target phones,
   min-width queries add the wider layouts. */

:root {
  --teal-950: #3D001F;
  --teal-900: #4D0027;
  --teal-700: #660033;   /* brand primary */
  --teal-500: #91215B;
  --teal-100: #F5DCE7;
  --white: #FFFFFF;      /* brand secondary */

  --paper: #F8F4F2;
  --paper-dim: #F0E6E2;
  --surface: #FFFFFF;
  --ink: #2B1219;
  --ink-soft: #5C4048;
  --line: rgba(43, 18, 25, 0.14);
  --line-strong: rgba(43, 18, 25, 0.28);

  --accent: #660033;      /* text/link accent, swapped in dark mode */
  --gold: #B8863E;        /* decorative only */
  --gold-text: #86591A;   /* gold that passes contrast as text */
  --danger: #B42318;
  --danger-bg: #FDECEA;
  --success: #1E7B4F;
  --focus: #91215B;

  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-s: 3px;
  --radius-m: 6px;
  --header-h: 68px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1A0E12;
    --paper-dim: #241318;
    --surface: #2B171D;
    --ink: #F3E6E9;
    --ink-soft: #C6A9B2;
    --line: rgba(243, 230, 233, 0.14);
    --line-strong: rgba(243, 230, 233, 0.3);
    --accent: #E88CB4;
    --gold-text: #D9B071;
    --danger: #FF8A80;
    --danger-bg: rgba(255, 138, 128, 0.12);
    --success: #6FD3A2;
    --focus: #E88CB4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1A0E12;
  --paper-dim: #241318;
  --surface: #2B171D;
  --ink: #F3E6E9;
  --ink-soft: #C6A9B2;
  --line: rgba(243, 230, 233, 0.14);
  --line-strong: rgba(243, 230, 233, 0.3);
  --accent: #E88CB4;
  --gold-text: #D9B071;
  --danger: #FF8A80;
  --danger-bg: rgba(255, 138, 128, 0.12);
  --success: #6FD3A2;
  --focus: #E88CB4;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

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

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--teal-700); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-s);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
@media (min-width: 640px) {
  .wrap { padding-left: 28px; padding-right: 28px; }
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--teal-700); color: #fff; }
.btn-primary:hover { background: var(--teal-900); }
.btn-primary:active { background: var(--teal-950); }
.btn-light { background: #fff; color: var(--teal-900); }
.btn-light:hover { background: var(--teal-100); }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .7; cursor: progress; }

.btn-text {
  background: none; border: 0; padding: 10px 4px;
  font-weight: 600; font-size: 15px; color: var(--ink);
  min-height: 44px;
}
.btn-text:hover { color: var(--accent); }

.link-arrow {
  font-weight: 600; font-size: 15px;
  color: var(--accent);
  text-decoration: none;
  padding: 10px 0;
  display: inline-flex; align-items: center; gap: 8px;
}
.link-arrow::after { content: "\2192"; transition: transform .15s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- Wordmark ---------- */
/* Echoes the sister brand: lowercase "amana" set heavier, followed by the
   division name in a lighter treatment. */

.wordmark {
  display: inline-flex; align-items: baseline; gap: 6px;
  text-decoration: none; color: var(--ink);
  line-height: 1;
  padding: 6px 0;
}
.wm-amana {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 25px;
  letter-spacing: -0.03em;
  color: var(--teal-700);
}
.wm-finanz {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
:root[data-theme="dark"] .wm-amana { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wm-amana { color: var(--accent); }
}

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: var(--header-h);
}
.nav-links { display: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-actions .btn { padding: 10px 14px; font-size: 14px; }
.nav-login { display: none; }
.nav-row .wordmark { flex: none; }
@media (max-width: 379px) {
  .nav-row .wm-amana { font-size: 22px; }
  .nav-row .wm-finanz { font-size: 17px; }
  .nav-actions { gap: 4px; }
  .nav-actions .btn { padding: 10px 14px; }
  .hide-xs { display: none; }
}

.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: 0; padding: 0;
}
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 22px; height: 2px; background: var(--ink);
  border-radius: 1px; position: relative;
  transition: transform .2s ease, background-color .2s ease;
}
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 8px 0 16px;
}
.mobile-menu a, .mobile-menu .btn-text {
  display: block; width: 100%; text-align: left;
  padding: 14px 0;
  font-size: 17px; font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mobile-menu .btn-text { border-bottom: 0; color: var(--accent); }

@media (min-width: 480px) {
  .nav-login { display: inline-flex; }
  .nav-actions { gap: 14px; }
}
@media (min-width: 880px) {
  :root { --header-h: 76px; }
  .nav-links { display: flex; gap: 32px; font-size: 15px; font-weight: 500; }
  .nav-links a { text-decoration: none; color: var(--ink-soft); padding: 8px 0; }
  .nav-links a:hover { color: var(--ink); }
  .menu-toggle, .mobile-menu { display: none !important; }
  .nav-actions .btn { padding: 12px 20px; font-size: 15px; }
  .nav-actions { gap: 20px; }
}

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

.hero {
  display: grid;
  gap: 36px;
  padding-top: 40px;
  padding-bottom: 56px;
}
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
  font-size: 14px; font-weight: 500;
  color: var(--ink-soft);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.hero h1 {
  font-size: clamp(36px, 9.4vw, 64px);
  max-width: 17ch;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  margin-top: 20px;
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 48ch;
}
.hero-note {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  margin-top: 18px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.35;
  color: var(--ink);
}
.hero-note::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); flex: none;
}
.hero-actions {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
}
.hero-facts {
  margin-top: 36px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.hero-facts > div { border-left: 2px solid var(--gold); padding-left: 12px; }
.hero-facts dt {
  font-family: var(--font-display);
  font-size: 24px; line-height: 1.1;
  color: var(--ink);
}
.hero-facts dd { font-size: 13px; line-height: 1.4; color: var(--ink-soft); margin-top: 4px; }

@media (min-width: 1000px) {
  .hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 64px; align-items: center;
    padding-top: 72px; padding-bottom: 88px;
  }
}

/* ---------- Forms (shared) ---------- */

.quick-apply {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 0 20px 24px;
  overflow: hidden;
}
@media (min-width: 640px) { .quick-apply { padding: 0 32px 32px; } }

/* Portal-style service tabs across the top of the hero card */
.portal-tabs { margin: 0 -20px 22px; }
@media (min-width: 640px) { .portal-tabs { margin: 0 -32px 26px; } }
.portal-tab-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--paper-dim);
}
.portal-tab { position: relative; display: flex; }
.portal-tab input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.portal-tab span {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 76px;
  padding: 12px 6px 10px;
  border-bottom: 3px solid transparent;
  font-size: 13px; font-weight: 600; line-height: 1.2; text-align: center;
  color: var(--ink-soft);
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.portal-tab + .portal-tab span { border-left: 1px solid var(--line); }
.portal-tab input:hover + span { color: var(--ink); }
.portal-tab input:checked + span {
  background: var(--surface);
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.portal-tab input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }
.tab-icon {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.portal-tab input:checked + span .tab-icon { color: var(--accent); }
@media (min-width: 640px) { .portal-tab span { font-size: 14px; min-height: 84px; } }
.quick-apply h2 { font-size: 27px; }
.quick-sub { font-size: 14.5px; color: var(--ink-soft); margin: 6px 0 20px; }

.choice-group { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.choice-group legend {
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  margin-bottom: 8px; padding: 0;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input {
  position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer;
}
.chip span {
  display: inline-flex; align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  font-size: 14px; font-weight: 500;
  color: var(--ink);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chip input:hover + span { border-color: var(--teal-700); }
.chip input:checked + span {
  background: var(--teal-700); border-color: var(--teal-700); color: #fff;
}
.chip input:checked + span::before {
  content: ""; width: 6px; height: 10px; margin: -3px 8px 0 0;
  border: solid currentColor; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.field { margin-bottom: 16px; }
.field > label {
  display: block;
  font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input, .field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px; /* 16px stops iOS zooming on focus */
}
.field input::placeholder { color: var(--ink-soft); opacity: .7; }
.field input:focus, .field select:focus {
  outline: 3px solid var(--focus); outline-offset: 0; border-color: transparent;
}
.field input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-bg); }

.phone-row { display: flex; gap: 8px; }
.phone-row .cc-select { flex: 0 0 auto; width: 118px; padding-right: 6px; }
.phone-row input { flex: 1 1 auto; min-width: 0; }

.field-error {
  display: flex; gap: 6px; align-items: flex-start;
  margin-top: 6px;
  font-size: 13.5px; font-weight: 600; line-height: 1.4;
  color: var(--danger);
}
.field-error::before { content: "!"; flex: none; width: 16px; height: 16px; margin-top: 1px;
  border-radius: 50%; background: var(--danger); color: var(--surface);
  font-size: 11px; line-height: 16px; text-align: center; }
.field-hint { margin-top: 6px; font-size: 13px; color: var(--ink-soft); line-height: 1.4; }

.form-alert {
  margin: 4px 0 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--danger);
  background: var(--danger-bg);
  color: var(--ink);
  font-size: 14px; line-height: 1.5;
}

.fine { margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.switch-line { text-align: center; }
.inline-link {
  background: none; border: 0; padding: 4px 2px;
  font-weight: 700; color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px;
}

/* Spam trap, kept out of view and out of the accessibility tree */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

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

.section { padding-top: 64px; padding-bottom: 64px; }
@media (min-width: 900px) { .section { padding-top: 96px; padding-bottom: 96px; } }
.section-head { max-width: 40rem; margin-bottom: 36px; }
@media (min-width: 900px) { .section-head { margin-bottom: 52px; } }
.kicker {
  font-size: 14px; font-weight: 600;
  color: var(--gold-text);
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(30px, 6.4vw, 46px); }

/* ---------- Services ---------- */

.services { display: grid; gap: 16px; }
.svc {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: var(--radius-m);
  padding: 28px 22px;
}
.svc h3 { font-size: clamp(27px, 6vw, 34px); margin-bottom: 12px; }
.svc-label {
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 700;
  color: #fff;
}
.svc p { font-size: 15.5px; max-width: 44ch; }

.svc-feature { background: var(--teal-700); color: #fff; overflow: hidden; }
.svc-feature p { color: #F3DCE6; }
.svc-feature::after {
  /* quiet brand texture: concentric arcs, purely decorative */
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 340px; height: 340px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 0 0 40px rgba(255,255,255,.03), 0 0 0 80px rgba(255,255,255,.025);
  pointer-events: none;
}
.svc-card { background: var(--surface); border: 1px solid var(--line); }
.svc-plain { background: transparent; border-top: 2px solid var(--ink); border-radius: 0; padding-left: 0; padding-right: 0; }
.svc-card p, .svc-plain p { color: var(--ink-soft); }

.svc-tags {
  display: flex; flex-wrap: wrap; gap: 6px 0;
  margin-top: 20px;
  font-size: 14px; font-weight: 500;
}
.svc-tags li { display: inline-flex; align-items: center; }
.svc-tags li + li::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; opacity: .45; margin: 0 10px;
}
.svc-feature .svc-tags { color: #fff; }
.svc-card .svc-tags, .svc-plain .svc-tags { color: var(--ink); }

.svc-cta {
  align-self: flex-start;
  margin-top: 26px;
  min-height: 44px;
  padding: 10px 0;
  background: none; border: 0;
  font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 2px solid currentColor;
  padding-bottom: 4px;
}
.svc-cta::after { content: "\2192"; transition: transform .15s ease; }
.svc-cta:hover::after { transform: translateX(3px); }
.svc-feature .svc-cta { color: #fff; }
.svc-feature :focus-visible { outline-color: #fff; }
.svc-card .svc-cta, .svc-plain .svc-cta { color: var(--accent); }

@media (min-width: 900px) {
  .services {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 20px 40px;
  }
  .svc-feature { grid-row: 1 / span 2; padding: 48px 44px; justify-content: flex-end; min-height: 520px; }
  .svc-card { padding: 36px; }
  .svc-plain { padding-top: 32px; }
}

/* ---------- Process ---------- */

.process-band {
  background: var(--paper-dim);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.steps { display: grid; gap: 0; counter-reset: none; }
.step { padding: 24px 0; border-top: 1px solid var(--line-strong); }
.step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 40px; line-height: 1;
  color: var(--gold-text);
  margin-bottom: 14px;
}
.step h3 {
  font-family: var(--font-body);
  font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: 0;
  margin-bottom: 8px;
}
.step p { font-size: 15px; color: var(--ink-soft); max-width: 36ch; }

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
}
@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; }
  .step { padding-top: 28px; }
}

/* ---------- Platform disclosure ---------- */

.platform { padding-bottom: 0; }
.platform-grid {
  display: grid; gap: 20px;
  padding-top: 32px;
  border-top: 1px solid var(--line-strong);
}
.platform-grid h2 { font-size: clamp(30px, 6.4vw, 44px); max-width: 16ch; }
.platform-copy { display: grid; gap: 14px; max-width: 62ch; }
.platform-copy p { font-size: 16.5px; color: var(--ink-soft); }
.platform-copy p:first-child { color: var(--ink); }
@media (min-width: 900px) {
  .platform-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; }
}

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

.stats-section { padding-bottom: 48px; }
.stats { display: grid; gap: 28px; }
.stat dt {
  font-family: var(--font-display);
  font-size: clamp(46px, 11vw, 64px);
  line-height: 1;
  color: var(--accent);
}
.stat dd { margin-top: 10px; font-size: 15px; color: var(--ink-soft); max-width: 28ch; }
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
  .stat + .stat { border-left: 1px solid var(--line); padding-left: 32px; }
}

/* ---------- CTA band ---------- */

.cta-wrap { padding-bottom: 64px; }
@media (min-width: 900px) { .cta-wrap { padding-bottom: 96px; } }
.cta-band {
  background: var(--teal-900);
  color: #fff;
  border-radius: var(--radius-m);
  padding: 36px 22px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 24px;
}
.cta-band h2 { font-size: clamp(30px, 6vw, 44px); max-width: 20ch; }
.cta-band p { margin-top: 10px; color: #C9DDE3; font-size: 16px; max-width: 46ch; }
.cta-band :focus-visible { outline-color: #fff; }
@media (min-width: 800px) {
  .cta-band { flex-direction: row; align-items: center; justify-content: space-between; padding: 56px; }
}

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

.site-footer { border-top: 1px solid var(--line); padding: 48px 0 calc(32px + env(safe-area-inset-bottom)); }
.foot-grid { display: grid; gap: 36px; }
.foot-brand p { margin-top: 12px; font-size: 14.5px; color: var(--ink-soft); max-width: 36ch; }
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
.foot-col h2 {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 700; letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 10px;
}
.foot-col li { font-size: 14.5px; color: var(--ink-soft); }
.foot-col a, .foot-link {
  display: inline-block;
  padding: 6px 0;
  color: var(--ink-soft);
  text-decoration: none;
  background: none; border: 0; font-size: 14.5px; text-align: left;
}
.foot-col a:hover, .foot-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.foot-col li:not(:has(a, button)) { padding: 6px 0; }
.foot-legal {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid; gap: 10px;
  font-size: 13px; line-height: 1.55; color: var(--ink-soft);
}
.foot-legal p:first-child { max-width: 90ch; }

@media (min-width: 640px) {
  .foot-cols { grid-template-columns: repeat(3, minmax(0, auto)); gap: 56px; }
}
@media (min-width: 960px) {
  .foot-grid { grid-template-columns: 1fr auto; gap: 64px; }
}

/* ---------- Apply / Log in dialog ---------- */

.account-dialog {
  width: min(100% - 24px, 460px);
  max-height: min(100dvh - 24px, 760px);
  margin: auto;
  padding: 28px 20px 24px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45);
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (min-width: 640px) { .account-dialog { padding: 36px 34px 30px; } }
.account-dialog::backdrop {
  background: rgba(7, 20, 24, .6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.account-dialog[open] { animation: dialog-in .2s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.dialog-close {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 50%;
  font-size: 28px; line-height: 1; color: var(--ink-soft);
}
.dialog-close:hover { background: var(--paper-dim); color: var(--ink); }

.tabs {
  display: flex; gap: 4px;
  margin: 0 44px 24px 0;
  padding: 4px;
  background: var(--paper-dim);
  border-radius: 999px;
}
.tab {
  flex: 1;
  min-height: 40px;
  padding: 8px 12px;
  border: 0; border-radius: 999px;
  background: none;
  font-size: 14.5px; font-weight: 600;
  color: var(--ink-soft);
}
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tab:hover:not([aria-selected="true"]) { color: var(--ink); }

.account-dialog h2 { font-size: 28px; }
.dialog-sub { margin: 8px 0 22px; font-size: 15px; color: var(--ink-soft); }
.account-dialog .btn-block { margin-top: 6px; }

.panel-success { text-align: left; }
.panel-success:focus { outline: none; }
.success-mark {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--teal-700);
  margin-bottom: 18px;
  position: relative;
}
.success-mark::after {
  content: ""; position: absolute; left: 17px; top: 11px;
  width: 12px; height: 22px;
  border: solid #fff; border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.ref-line {
  margin: -8px 0 8px;
  padding: 12px 14px;
  background: var(--paper-dim);
  border-radius: var(--radius-s);
  font-size: 15px;
}
.ref-line strong { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .04em; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Scroll reveal (only when JS is running) ---------- */

.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 404 ---------- */

.notfound { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; padding-top: 64px; padding-bottom: 64px; }
.notfound h1 { font-size: clamp(40px, 9vw, 72px); max-width: 16ch; }
.notfound p { margin-top: 18px; font-size: 17px; color: var(--ink-soft); max-width: 46ch; }
.notfound .hero-actions { margin-top: 28px; }

.noscript { margin: 0; padding: 16px; text-align: center; background: var(--paper-dim); font-size: 15px; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .spinner { animation: none; border-top-color: rgba(255,255,255,.35); }
}
