/* =====================================================================
   letmebefraink design system (Opus 5.5 redesign, approved 2026-09-23)
   Light editorial body, dark brand bars that match the logo artwork.
   ===================================================================== */

:root {
  /* brand — sampled from lmbfraink_bw.png */
  --brand-ink: #160f18;          /* logo background, header + footer */
  --brand-lime: #b7d67f;         /* the "A" in the wordmark — dark surfaces only */

  /* surfaces */
  --paper: #faf9f6;
  --surface: #ffffff;
  --surface-sunk: #f3f1ec;
  --line: #e4e0d8;
  --line-strong: #cfc9bd;

  /* text */
  --ink: #17131a;
  --ink-2: #3b3640;
  --muted: #5f5a64;              /* 6.4:1 on paper */

  /* accent — lime, darkened for AA text contrast on light surfaces */
  --accent: #4a7212;             /* 5.6:1 on white */
  --accent-strong: #3a5a0d;
  --accent-soft: #eef4e2;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  --wrap: 1120px;
  --prose: 680px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(23, 19, 26, .04), 0 4px 16px rgba(23, 19, 26, .05);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--brand-lime); outline-offset: 2px; border-radius: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
ul, ol { margin: 0; padding: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- layout primitives ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--prose { max-width: calc(var(--prose) + 2 * var(--gutter)); }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--tight { padding: clamp(40px, 6vw, 64px) 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section + .section:not(.section--alt):not(.cta-band) { border-top: 1px solid var(--line); }
.section--alt + .section { border-top: 0; }

.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head--split {
  max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
}
.section-head--split > div { max-width: 640px; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
.eyebrow--plain { text-transform: none; letter-spacing: 0.01em; font-size: 0.85rem; }

.h-display {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(2.35rem, 5.2vw, 3.6rem); line-height: 1.08; letter-spacing: -0.015em;
}
.h-page {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 2.9rem); line-height: 1.12; letter-spacing: -0.01em;
}
.h-section {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.15rem); line-height: 1.2; letter-spacing: -0.005em;
}
.h-card { font-size: 1.08rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.22rem); line-height: 1.6; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.section-head .lead, .section-head p { margin-top: 14px; }

.link-arrow { font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 20px; border-radius: var(--radius-sm);
  font: 600 0.95rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2c2531; color: #fff; }
.btn-outline, .btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover, .btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-lime { background: var(--brand-lime); color: var(--brand-ink); }
.btn-lime:hover { background: #c8e394; color: var(--brand-ink); }
.btn-ghost-dark { background: transparent; color: #f3eff5; border-color: rgba(255,255,255,.28); }
.btn-ghost-dark:hover { border-color: #fff; color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--brand-ink);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 40px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 26px; list-style: none; }
.nav-links a {
  color: #cfc8d4; text-decoration: none; font-size: 0.93rem; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: #fff; }
.nav-links a[aria-current="page"] { color: #fff; border-bottom-color: var(--brand-lime); }
.nav-cta {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px;
  background: var(--brand-lime); color: var(--brand-ink); border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem; text-decoration: none; white-space: nowrap;
}
.nav-cta:hover, .nav-cta.is-current { background: #c8e394; color: var(--brand-ink); }
.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius-sm);
  width: 44px; height: 40px; cursor: pointer; position: relative;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  position: absolute; left: 12px; width: 18px; height: 2px; background: #fff; content: ""; transition: transform .2s;
}
.nav-toggle-bars { top: 19px; }
.nav-toggle-bars::before { top: -6px; left: 0; }
.nav-toggle-bars::after { top: 6px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-logo img { height: 34px; }
  .nav-toggle { display: block; }
  .nav-menu {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--brand-ink); padding: 8px var(--gutter) 20px;
    border-bottom: 1px solid rgba(255,255,255,.08); box-shadow: 0 12px 24px rgba(0,0,0,.25);
  }
  .nav-menu.is-open { display: flex; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { display: block; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 1rem; }
  .nav-links a[aria-current="page"] { border-bottom-color: rgba(255,255,255,.08); box-shadow: inset 3px 0 0 var(--brand-lime); padding-left: 12px; }
  .nav-cta { margin-top: 16px; justify-content: center; min-height: 48px; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero .lead { margin-top: 22px; max-width: 600px; }
.hero-note { margin-top: 22px; font-size: 0.95rem; color: var(--muted); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 30px); box-shadow: var(--shadow);
}
.panel-title { font-size: 0.8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.numbered { list-style: none; counter-reset: n; display: grid; gap: 18px; }
.numbered li { counter-increment: n; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.numbered li::before {
  content: counter(n); width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong);
  font: 600 0.85rem/28px var(--font-sans); text-align: center;
}
.numbered strong { display: block; font-size: 0.98rem; line-height: 1.4; }
.numbered span { display: block; font-size: 0.92rem; color: var(--muted); line-height: 1.5; margin-top: 2px; }

/* page hero (interior pages) */
.page-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.page-hero .lead { margin-top: 18px; max-width: 700px; }
.page-hero--plain { border-bottom: 0; padding-bottom: 8px; }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 28px); display: flex; flex-direction: column;
}
.section--alt .card { background: var(--paper); }
.card p { color: var(--ink-2); font-size: 0.97rem; margin: 10px 0 0; }
.card .link-arrow { margin-top: auto; padding-top: 18px; font-size: 0.93rem; color: var(--accent); }
a.card { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.card-kicker { font-size: 0.8rem; font-weight: 600; color: var(--accent); margin-bottom: 8px; letter-spacing: .02em; }

/* problem cards: symptom → fix */
.problem { gap: 0; }
.problem .problem-now { font-weight: 600; font-size: 1.02rem; line-height: 1.4; color: var(--ink); margin: 0; }
.problem .problem-fix { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-strong); font-size: 0.95rem; color: var(--ink-2); }
.problem .problem-fix::before { content: "→ "; color: var(--accent); font-weight: 700; }

/* ---------- services page ---------- */
.services-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .services-grid { grid-template-columns: 1fr; } }
.service-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 3vw, 32px); position: relative;
}
.service-card::before {
  content: ""; position: absolute; left: -1px; top: 24px; bottom: 24px; width: 3px;
  background: var(--accent); border-radius: 0 3px 3px 0;
}
.service-card h3 { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; line-height: 1.25; }
.service-card p { margin: 12px 0 0; color: var(--ink-2); font-size: 0.98rem; }
.service-card .service-label { display: none; }

.fix-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.fix-group + .fix-group { border-top: 1px solid var(--line); }
.fix-group { display: grid; grid-template-columns: 220px 1fr; }
.fix-group h3 {
  font-size: 0.95rem; font-weight: 600; padding: 20px 24px; background: var(--surface-sunk);
  border-right: 1px solid var(--line);
}
.fix-rows { list-style: none; }
.fix-rows li { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 12px; padding: 16px 24px; align-items: start; font-size: 0.96rem; }
.fix-rows li + li { border-top: 1px solid var(--line); }
.fix-rows .from { color: var(--ink-2); }
.fix-rows .arrow { color: var(--accent); font-weight: 700; text-align: center; }
.fix-rows .to { color: var(--ink); font-weight: 500; }
.fix-head { display: grid; grid-template-columns: 220px 1fr; padding: 0 0 10px; font-size: 0.78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid transparent; }
.fix-head > span { padding: 0 24px; }
.fix-head > div { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 12px; padding: 0 24px; }
@media (max-width: 760px) {
  .fix-head { display: none; }
  .fix-group { grid-template-columns: 1fr; }
  .fix-group h3 { border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 20px; }
  .fix-rows li { grid-template-columns: 1fr; gap: 4px; padding: 14px 20px; }
  .fix-rows .arrow { display: none; }
  .fix-rows .to::before { content: "→ "; color: var(--accent); font-weight: 700; }
}

/* ---------- steps ---------- */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before { content: "0" counter(step); display: block; font: 500 0.82rem var(--font-mono); color: var(--accent); margin-bottom: 10px; }
.steps h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.35; }
.steps p { margin: 8px 0 0; font-size: 0.95rem; color: var(--ink-2); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- paths (consulting) ---------- */
.path-card { position: relative; }
.path-label { font: 500 0.78rem var(--font-mono); color: var(--accent); letter-spacing: .06em; margin-bottom: 12px; display: block; }
.path-card h3 { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 600; }
.path-card--feature { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

/* principles */
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.principle { padding: 24px 28px 26px 0; border-bottom: 1px solid var(--line); }
.principle:nth-child(odd) { border-right: 1px solid var(--line); }
.principle:nth-child(even) { padding-left: 28px; padding-right: 0; }
.principle h3 { font-size: 1.08rem; font-weight: 600; }
.principle p { margin: 8px 0 0; color: var(--ink-2); font-size: 0.97rem; }
@media (max-width: 700px) {
  .principles { grid-template-columns: 1fr; }
  .principle, .principle:nth-child(even) { padding: 20px 0; border-right: 0; }
  .principle:nth-child(odd) { border-right: 0; }
}

/* callouts */
.callout {
  background: var(--accent-soft); border: 1px solid #d5e4bd; border-radius: var(--radius);
  padding: clamp(22px, 3vw, 30px);
}
.callout h2, .callout h3 { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; margin-bottom: 8px; }
.callout p:last-child { margin-bottom: 0; }
.notice {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--ink);
  border-radius: var(--radius-sm); padding: 16px 20px; font-size: 0.95rem; color: var(--ink-2);
}
.notice strong { color: var(--ink); }

/* background bridge */
.bridge { display: grid; grid-template-columns: 200px 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.bridge p.eyebrow { font-family: var(--font-sans); font-size: 0.78rem; color: var(--accent); padding-top: 8px; }
.bridge p:not(.eyebrow) { font-family: var(--font-serif); font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.55; color: var(--ink); margin: 0; }
.bridge p a { font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600; white-space: nowrap; margin-left: 4px; text-decoration: none; }
.bridge p a:hover { text-decoration: underline; }
@media (max-width: 760px) { .bridge { grid-template-columns: 1fr; gap: 8px; } }

/* two-column label + content rows */
.rows > * + * { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 260px 1fr; gap: clamp(20px, 5vw, 56px); padding: clamp(28px, 4vw, 40px) 0; }
.row h2 { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 600; line-height: 1.3; }
.row-body > :first-child { margin-top: 0; }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; gap: 12px; } }

.ticks { list-style: none; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

/* independent work cards */
.work-card { display: flex; flex-direction: column; gap: 16px; }
.work-card > div { display: flex; flex-direction: column; flex: 1; }
.work-card .link-arrow { order: 99; } /* DOM-first for the ruled home band, shown last */
.work-card img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: var(--brand-ink); padding: 6px; }
.work-card .tag-line { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.work-card p { margin-top: 10px; }

.project { display: grid; grid-template-columns: 96px 1fr; gap: clamp(20px, 3vw, 32px); padding: clamp(28px, 4vw, 40px) 0; }
.project + .project { border-top: 1px solid var(--line); }
.project-mark { width: 96px; height: 96px; border-radius: 16px; background: var(--brand-ink); padding: 10px; object-fit: contain; }
.project h2 { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; }
.project .tagline { color: var(--muted); font-size: 0.95rem; margin-top: 2px; }
.project p { margin-top: 14px; color: var(--ink-2); }
.project-status { display: inline-block; margin-left: 10px; vertical-align: middle; font: 500 0.72rem var(--font-sans); text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 99px; background: var(--surface-sunk); color: var(--muted); border: 1px solid var(--line); }
.project-status--live { background: var(--accent-soft); color: var(--accent-strong); border-color: #d5e4bd; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tech-tag { font: 500 0.76rem var(--font-mono); color: var(--ink-2); background: var(--surface-sunk); border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; }
@media (max-width: 600px) {
  .project { grid-template-columns: 1fr; }
  .project-mark { width: 64px; height: 64px; }
}

/* frAInk page */
.arch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.arch > div { padding: 24px 26px; position: relative; }
.arch > div + div { border-left: 1px solid var(--line); }
.arch > div + div::before {
  content: "→"; position: absolute; left: -12px; top: 22px; width: 22px; height: 22px; line-height: 20px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 50%; font-size: 0.8rem; color: var(--accent);
}
.arch h3 { font: 500 0.85rem var(--font-mono); color: var(--accent); letter-spacing: .04em; }
.arch p { margin: 8px 0 0; font-size: 0.95rem; color: var(--ink-2); }
@media (max-width: 760px) {
  .arch { grid-template-columns: 1fr; }
  .arch > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .arch > div + div::before { content: "↓"; left: 24px; top: -12px; }
}
.historical { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-sunk); border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }

.timeline { list-style: none; position: relative; }
.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 0 0 26px; position: relative; }
.timeline li::after { content: ""; position: absolute; left: 146px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.timeline li::before { content: ""; position: absolute; left: 150px; top: 8px; bottom: -8px; width: 1px; background: var(--line-strong); }
.timeline li:last-child::before { display: none; }
.timeline time { font: 500 0.82rem var(--font-mono); color: var(--muted); padding-top: 2px; text-align: right; }
.timeline div { padding-left: 30px; }
.timeline strong { display: block; font-weight: 600; }
.timeline p { margin: 4px 0 0; color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 600px) {
  .timeline li { grid-template-columns: 1fr; gap: 2px; padding-left: 24px; }
  .timeline li::after { left: 0; }
  .timeline li::before { left: 4px; }
  .timeline time { text-align: left; }
  .timeline div { padding-left: 0; }
}

/* ---------- prose ---------- */
.legal-body h2 { font-family: var(--font-serif); font-size: 1.55rem; font-weight: 600; margin: 2em 0 0.6em; line-height: 1.25; }
.legal-body h3 { font-size: 1.1rem; font-weight: 600; margin: 1.6em 0 0.5em; }
.legal-body h2:first-child, .legal-body h3:first-child { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--ink-2); }
.legal-body ul, .legal-body ol { padding-left: 1.3em; margin: 0 0 1em; }
.legal-body li + li { margin-top: 0.4em; }
.legal-body blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); font-family: var(--font-serif); font-size: 1.25rem; color: var(--ink); }
.legal-body blockquote p { color: var(--ink); margin: 0; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: 0.93rem; display: block; overflow-x: auto; }
.legal-body th, .legal-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-body th { background: var(--surface-sunk); }
.legal-body strong { color: var(--ink); }
.legal-body code { font-family: var(--font-mono); font-size: 0.88em; background: var(--surface-sunk); padding: 1px 5px; border-radius: 4px; }
.prose, .legal-body { max-width: var(--prose); }
.prose h2 { font-family: var(--font-serif); font-size: 1.55rem; font-weight: 600; margin: 2em 0 0.6em; line-height: 1.25; }
.prose h3 { font-size: 1.1rem; font-weight: 600; margin: 1.6em 0 0.5em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); font-family: var(--font-serif); font-size: 1.25rem; color: var(--ink); }
.prose blockquote p { color: var(--ink); margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: 0.93rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-sunk); }
.prose strong { color: var(--ink); }
.prose code { font-family: var(--font-mono); font-size: 0.88em; background: var(--surface-sunk); padding: 1px 5px; border-radius: 4px; }

.longer-story { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.longer-story summary {
  cursor: pointer; list-style: none; padding: 20px 24px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.longer-story summary::-webkit-details-marker { display: none; }
.longer-story summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--accent); line-height: 1; }
.longer-story[open] summary::after { content: "–"; }
.longer-story summary span { font-weight: 400; color: var(--muted); font-size: 0.93rem; display: block; }
.longer-story .prose { padding: 4px 24px 24px; }

.values-list { list-style: none !important; padding: 0 !important; display: grid; gap: 8px; }
.values-list li { padding-left: 20px; position: relative; }
.values-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 2px; background: var(--accent); }

.aside-card { display: grid; grid-template-columns: 56px 1fr; gap: 16px; background: var(--surface-sunk); border-radius: var(--radius); padding: 20px 22px; margin: 1.5em 0; }
.aside-card .emoji { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 1.6rem; }
.aside-card h3 { margin: 0 0 4px !important; }
.aside-card p { margin: 0; font-size: 0.95rem; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-details { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.contact-details > div { padding: 16px 22px; display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: baseline; }
.contact-details > div + div { border-top: 1px solid var(--line); }
.contact-details dt { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.contact-details dd { margin: 0; font-weight: 500; word-break: break-word; }
@media (max-width: 480px) { .contact-details > div { grid-template-columns: 1fr; gap: 2px; } }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field .hint { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select {
  font: 400 1rem/1.5 var(--font-sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 11px 13px; width: 100%;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.form-foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.form-foot p { margin: 0; font-size: 0.85rem; color: var(--muted); max-width: 360px; }
.form-status { font-size: 0.92rem; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-strong); display: none; }
.form-status.is-shown { display: block; }
.form-status.is-error { background: #fbeaea; color: #8a1f1f; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--brand-ink); color: #e9e4ec; padding: clamp(56px, 8vw, 88px) 0; }
.cta-band h2 { color: #fff; font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.2; max-width: 720px; }
.cta-band p { color: #c9c1ce; max-width: 640px; margin-top: 14px; font-size: 1.05rem; }
.cta-band a:not(.btn) { color: var(--brand-lime); }
.cta-band .fine { font-size: 0.92rem; color: #a69dab; margin-top: 18px; }

/* ---------- footer ---------- */
footer { background: #0f0a11; color: #b4acb9; font-size: 0.92rem; }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 48px var(--gutter) 56px;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 40px;
}
.footer-name { color: #fff; font-weight: 600; margin: 0 0 6px; }
.footer-line { margin: 0 0 6px; }
.footer-nap { margin: 10px 0 6px; display: flex; flex-wrap: wrap; gap: 6px 10px; }
footer a { color: #dcd5e0; text-decoration: none; }
footer a:hover { color: var(--brand-lime); text-decoration: underline; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-head { color: #fff; font-weight: 600; font-size: 0.8rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 4px; }
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- legal ---------- */
.legal-meta { font-size: 0.9rem; color: var(--muted); margin-top: 14px; }
.legal-body { max-width: 760px; }
.legal-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }

/* ---------- utility ---------- */
.mt-0 { margin-top: 0 !important; }
.mt-lg { margin-top: clamp(32px, 5vw, 48px); }
.center-narrow { max-width: 440px; margin: 0 auto; text-align: center; }
