:root {
  --header-bg: rgba(9, 11, 13, .94);
  --header-solid: #111519;
  --accent-text: var(--accent);
}
html { scroll-padding-top: 110px; }
body { overflow-x: clip; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: auto;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.nav { position: relative; min-height: 84px; gap: 28px; }
.nav-actions { display: flex; align-items: center; gap: 22px; }
.nav-links { gap: 28px; font-size: .92rem; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; }
.nav-cta { padding: 11px 17px; }
.theme-toggle, .menu-toggle {
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--accent-text); }
.theme-toggle:focus-visible, .menu-toggle:focus-visible {
  outline: 3px solid rgba(112,231,255,.55);
  outline-offset: 3px;
}
.theme-icon { font-size: 1.35rem; line-height: 1; }
.menu-toggle { display: none; }
.menu-icon { font-size: 1.4rem; line-height: 1; }
.brand { min-width: 0; line-height: 0; }
.brand .brand-logo { display: block; width: 201px; height: 39px; flex: none; }
.brand .brand-logo-light { display: none; }
[data-theme="light"] .brand .brand-logo-dark { display: none; }
[data-theme="light"] .brand .brand-logo-light { display: block; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px 22px; }
.brand-text { white-space: nowrap; }
.hero h1, h1 {
  line-height: 1.07;
  letter-spacing: -.025em;
  overflow-wrap: break-word;
}
.section-title, h2 {
  line-height: 1.11;
  letter-spacing: -.025em;
  overflow-wrap: break-word;
}
.hero h1, .section-title, h1, h2 { text-wrap: balance; }
h3, .visual-card strong, .hero-aside strong, .stat strong {
  line-height: 1.26;
  letter-spacing: -.015em;
  overflow-wrap: break-word;
}
.principle h3, .step h3, .situation h3, .case-card h3 {
  line-height: 1.26;
  letter-spacing: -.015em;
  overflow-wrap: break-word;
}
.hero-visual { min-height: 0; }
.side-index { top: 112px; }
section[id], .article-section[id], #top { scroll-margin-top: 110px; }

/* The site keeps its original dark palette until a visitor selects light mode. */
[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-2: #eaf0f3;
  --ink: #111b21;
  --muted: #4d5d67;
  --line: rgba(16,36,45,.18);
  --accent-text: #6a5100;
  --header-bg: rgba(248,250,251,.96);
  --header-solid: #ffffff;
}
[data-theme="light"] body {
  background: radial-gradient(circle at 82% 3%, rgba(27,133,158,.06), transparent 26rem), var(--bg);
}
[data-theme="light"] .nav-links, [data-theme="light"] .back-link { color: #34444e; }
[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a:focus-visible,
[data-theme="light"] .back-link:hover,
[data-theme="light"] .side-index a:hover,
[data-theme="light"] .footer-contact:hover { color: var(--accent-text); }
[data-theme="light"] .nav-cta { color: var(--accent-text); border-color: rgba(106,81,0,.55); }
[data-theme="light"] .response-promise strong { color: var(--accent-text); }
[data-theme="light"] .eyebrow,
[data-theme="light"] .section-number,
[data-theme="light"] .principle-index,
[data-theme="light"] .step-number,
[data-theme="light"] .situation-number,
[data-theme="light"] .case-category,
[data-theme="light"] .case-card .case-category,
[data-theme="light"] .case-result strong,
[data-theme="light"] .fit-label,
[data-theme="light"] .brief-item::before,
[data-theme="light"] .aside-label,
[data-theme="light"] .stat-label,
[data-theme="light"] .stat strong,
[data-theme="light"] .detail-list .number,
[data-theme="light"] .more-list span,
[data-theme="light"] .highlight,
[data-theme="light"] .accent { color: var(--accent-text); }
[data-theme="light"] .hero-copy,
[data-theme="light"] .hero-lead,
[data-theme="light"] .hero-aside p:last-child,
[data-theme="light"] .stat span,
[data-theme="light"] .article-section > p:not(.section-number),
[data-theme="light"] .article-section li,
[data-theme="light"] .closing p,
[data-theme="light"] .proof-head p,
[data-theme="light"] .source-line,
[data-theme="light"] .case-card p,
[data-theme="light"] .step p,
[data-theme="light"] .situation p,
[data-theme="light"] .case-result,
[data-theme="light"] .section-lead { color: var(--muted); }
[data-theme="light"] .button-secondary { background: #fff; }
[data-theme="light"] .situation { background: #fff; }
[data-theme="light"] .situation:hover { background: #fff9da; border-color: rgba(106,81,0,.45); }
[data-theme="light"] .step { background: #fff; }
[data-theme="light"] .case-card,
[data-theme="light"] .fit-card,
[data-theme="light"] .stat,
[data-theme="light"] .hero-aside,
[data-theme="light"] .letter,
[data-theme="light"] .more-list a { background: #fff; }
[data-theme="light"] .stat { background: linear-gradient(145deg, #fff8d7, #fff); }
[data-theme="light"] .fit-card.good { background: linear-gradient(145deg, #fff8d7, #fff); }
[data-theme="light"] .check-list li,
[data-theme="light"] .brief-item { color: #2b3b44; }
[data-theme="light"] .check-list li::before { color: var(--accent-text); }
[data-theme="light"] .fit-card.neutral .fit-label { color: #4d5d67; }
[data-theme="light"] .callout,
[data-theme="light"] .report-note { color: #2b3b44; background: #fff8d7; }
[data-theme="light"] .callout strong { color: var(--ink); }
[data-theme="light"] .letter figcaption { color: #3e4d56; }
[data-theme="light"] footer { color: #4d5d67; }
[data-theme="light"] .case-note { color: #4d5d67; }
[data-theme="light"] .case-source { color: var(--ink); }
[data-theme="light"] .case-card:hover .case-source,
[data-theme="light"] .case-card:focus-visible .case-source,
[data-theme="light"] .hero-contact a:hover,
[data-theme="light"] .contact-options a:hover,
[data-theme="light"] .text-link:hover,
[data-theme="light"] .more-list a:hover { color: var(--accent-text); }
[data-theme="light"] .copy-status { color: #116076; }
[data-theme="light"] .metric { border-bottom-color: rgba(255,255,255,.12); }
[data-theme="light"] .report-card { background: #151d22; border-color: rgba(16,36,45,.25); }
[data-theme="light"] .report-card .report-head { border-bottom-color: rgba(255,255,255,.15); }
[data-theme="light"] .report-card strong { color: #f5f7f8; }
[data-theme="light"] .report-card .yellow { color: #ffe33d; }
[data-theme="light"] .report-card .report-period { color: #b4bec5; }
[data-theme="light"] .report-card .report-note { background: rgba(255,214,0,.12); color: #e4e8ea; }
[data-theme="light"] .hero-visual { border-color: rgba(16,36,45,.25); }
[data-theme="light"] .hero-visual .visual-card { background: rgba(8,11,13,.82); }
[data-theme="light"] .hero-visual .tag { border-color: rgba(255,255,255,.24); }
[data-theme="light"] .hero-visual .tag:hover,
[data-theme="light"] .hero-visual .tag[aria-pressed="true"] { border-color: var(--accent); }
[data-theme="light"] .hero-visual .visual-card strong { color: #fff; }
[data-theme="light"] .closing { background: radial-gradient(circle at 96% 100%, rgba(255,214,0,.13), transparent 32rem); }

@media (max-width: 980px) {
  .nav-actions { gap: 8px; }
  .menu-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    color: var(--ink);
    background: var(--header-solid);
    border: 1px solid var(--line);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 20px 45px rgba(0,0,0,.18);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a:not(.nav-cta) { display: flex; }
  .nav-links a { width: 100%; padding: 10px 14px; }
  .nav-links .nav-cta { justify-content: center; margin-top: 8px; }
  .side-index { display: none; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 90px; }
  .nav { min-height: 72px; gap: 8px; }
  .nav-cta { padding: 9px 13px; font-size: .78rem; }
  .brand .brand-logo { width: clamp(145px, 43vw, 170px); height: auto; }
  .footer-links { justify-content: flex-start; }
  .brand-suffix { display: none; }
  .hero-visual { min-height: 0; }
  .visual-top, .report-head { flex-wrap: wrap; }
  .metric { grid-template-columns: 1fr; gap: 4px; }
  section[id], .article-section[id], #top { scroll-margin-top: 90px; }
}
