@font-face {
  font-family: Lato;
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/lato-300.woff2") format("woff2");
}
@font-face {
  font-family: Lato;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/lato-400.woff2") format("woff2");
}
@font-face {
  font-family: Lato;
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/lato-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: Lato;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/lato-700.woff2") format("woff2");
}
@font-face {
  font-family: Lato;
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/lato-700-italic.woff2") format("woff2");
}
@font-face {
  font-family: Lato;
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("fonts/lato-900.woff2") format("woff2");
}

:root,
[data-theme="dark"] {
  --bg: #1f2024;
  --card: #2a2b31;
  --line: #3a3b42;
  --text: #ffffff;
  --muted: #a3a5ad;
  --sage: #9db5a0;
  --on-sage: #1f2024;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f3f0e8;
  --card: #fbf9f4;
  --line: #d9d4c7;
  --text: #1f2024;
  --muted: #5c5e66;
  --sage: #3e5c4a;
  --on-sage: #f3f0e8;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Lato, "Segoe UI", sans-serif;
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--sage); }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-160%);
  background: var(--sage);
  color: var(--on-sage);
  padding: 8px 12px;
  z-index: 80;
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus { transform: none; }

.wrap {
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 55%, transparent);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.wordmark { display: inline-flex; align-items: center; }
.wordmark img { height: 48px; width: auto; }
#footer-logo { height: 36px; width: auto; }

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

.theme-toggle,
.nav-toggle,
.text-button {
  min-height: 44px;
  padding: 0 12px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 400 0.92rem/1 Lato, sans-serif;
  cursor: pointer;
}

.nav-toggle { display: none; }

.nav-panel { display: flex; align-items: center; gap: 22px; }
.nav-panel a {
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
}
.nav-panel a:hover,
.nav-panel a[aria-current="true"] { color: var(--sage); }

.hero { padding: 48px 0 72px; }

.motif {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
}
.motif img { height: 40px; width: auto; flex: none; }
.motif .rule { flex: 1; margin-left: 8px; }

.rule,
.section { border-color: color-mix(in srgb, var(--muted) 55%, transparent); }
.rule {
  display: block;
  height: 1px;
  background: color-mix(in srgb, var(--muted) 55%, transparent);
}

.hero h1 { font-size: clamp(3rem, 8vw, 5.4rem); }

.subhead {
  margin-top: 18px;
  max-width: 38rem;
  font-style: italic;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.45;
}

.support {
  max-width: 38rem;
  color: var(--muted);
  font-weight: 300;
}

.proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 36px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--muted) 55%, transparent);
}
.proof div { min-width: 0; }
.proof dt {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.proof dd { margin: 0; font-weight: 700; font-size: 1.15rem; }
.numeral {
  font-weight: 300;
  font-size: clamp(2.6rem, 5vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: 700 1rem/1 Lato, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { background: var(--sage); color: var(--on-sage); }
.button-primary:hover { filter: brightness(1.08); }
.button-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.button-secondary:hover { border-color: var(--text); }
.button:disabled { opacity: 0.6; cursor: wait; }

.section {
  padding: 72px 0;
  border-top: 1px solid color-mix(in srgb, var(--muted) 55%, transparent);
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin-bottom: 18px;
  font-size: clamp(1.65rem, 4.6vw, 3.2rem);
}

.section-icon {
  height: 0.85em;
  width: 0.85em;
  flex: none;
}

.section-icon-light { display: none; }

[data-theme="light"] .section-icon-dark { display: none; }
[data-theme="light"] .section-icon-light { display: block; }

.section-index,
.section-kicker h2 {
  margin: 0;
  font-size: 1em;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.section-index { font-weight: 300; }

.thesis-grid,
.scope-grid,
.advise-grid,
.chooser,
.portfolio-grid {
  display: grid;
  gap: 14px;
}

.thesis-grid,
.advise-grid { grid-template-columns: 1fr 1fr; }
.scope-grid,
.portfolio-grid,
.chooser { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  color: var(--text);
  text-align: left;
}

.card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.card p, .card li { color: var(--muted); font-weight: 300; }
.card ol, .card ul { margin: 0; padding-left: 1.1rem; }
.card li + li { margin-top: 8px; }

.choice {
  font: 700 1.2rem/1.3 Lato, sans-serif;
  cursor: pointer;
  width: 100%;
}
.choice:hover { border-color: var(--text); }

.backs {
  margin-top: 16px;
  padding: 18px 20px;
  border-top: 1px solid color-mix(in srgb, var(--muted) 55%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 55%, transparent);
}
.backs-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}
.backs p { max-width: 40rem; }

.coming-soon { margin-top: 28px; }
.coming-soon h3 { font-size: 1.5rem; margin-bottom: 8px; }

.portfolio-group { margin-top: 28px; }
.portfolio-group h3 { margin-bottom: 12px; }
.company-card img {
  height: 42px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  margin-bottom: 14px;
}
.company-card h4 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; text-transform: none; }

.form-card { margin-top: 8px; }
.form-card > h3 { font-size: 2rem; margin: 8px 0 16px; }
.form-card .backs { margin: 0 0 18px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-weight: 400; }
.optional, .form-note, .form-help, .field-hint, .turnstile-note { color: var(--muted); font-size: 0.92rem; }
.field-hint { margin: 6px 0 0; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.4 Lato, sans-serif;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: calc(100% - 18px) 22px, calc(100% - 12px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #c46a6a; }
.field-error { color: #e0a0a0; font-size: 0.9rem; margin-top: 6px; }
[data-theme="light"] .field-error { color: #8d2e2e; }

.form-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
}
.form-actions .button { width: 100%; margin-top: 6px; }
.form-help { margin-top: 12px; }
.turnstile-slot { min-height: 0; margin: 8px 0; }
.noscript-note, .login-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.site-footer {
  padding: 48px 0 36px;
  border-top: 1px solid color-mix(in srgb, var(--muted) 55%, transparent);
}
.about-line { max-width: 40rem; margin-top: 22px; font-weight: 300; }
.pitch-mark { color: var(--muted); font-style: italic; }
.footer-links { display: flex; gap: 18px; margin: 18px 0; font-weight: 700; }
.copyright { color: var(--muted); font-size: 0.9rem; }

.missing, .admin {
  width: min(880px, calc(100% - 40px));
  margin: 48px auto 72px;
}
.missing h1, .admin h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 16px 0; }
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.admin-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.admin-list details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.admin-list summary { cursor: pointer; font-weight: 700; }
.admin-meta { color: var(--muted); font-weight: 300; font-size: 0.9rem; }
.login-form { max-width: 420px; }

@media (max-width: 860px) {
  .proof, .scope-grid, .thesis-grid, .advise-grid, .chooser, .admin-columns { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .wordmark img { height: 32px; }
  .header-bar { flex-wrap: wrap; }
  .nav-panel {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-bottom: 12px;
  }
  .nav-panel.is-open { display: flex; }
  .nav-panel a { padding: 12px 0; width: 100%; }
  .field-row { grid-template-columns: 1fr; }
  .hero { padding-top: 28px; }
  .section { padding: 52px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .actions, .form-card, .chooser { display: none !important; }
}
