:root {
  --brand: #0B2A45;
  --cta: #B42318;
  --bg: #FFFFFF;
  --paper: #F5F0E8;
  --ink: #111111;
  --muted: #6B6B6B;
  --rule: #D9D2C6;
  --sidebar-width: clamp(240px, 18vw, 280px);
  --font-display: Palatino, "Book Antiqua", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-meta: Consolas, "Courier New", monospace;
}

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

html, body { overflow-x: hidden; margin: 0; padding: 0; }

img, video, iframe, svg, canvas { max-width: 100%; height: auto; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #FFFFFF;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

.article-main {
  margin-left: var(--sidebar-width);
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  min-width: 0;
}

.article-main, .article-main * { transition: none; }

.hero {
  position: relative;
  padding: 96px clamp(72px, 10vw, 144px) 72px;
  background-color: var(--brand);
  color: #FFFFFF;
  border-top: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
}

.hero-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.55);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
}

.meta {
  font-family: var(--font-meta);
  font-size: 13px;
  font-weight: 400;
  color: var(--paper);
  margin: 0 0 24px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 84px);
  color: #FFFFFF;
  margin: 0 auto 24px;
  max-width: 24ch;
  overflow-wrap: break-word;
}

.hero-chapo {
  font-size: 22px;
  font-weight: 400;
  color: var(--paper);
  max-width: 62ch;
  margin: 0 auto 32px;
  overflow-wrap: break-word;
}

.btn-cta {
  display: inline-block;
  background-color: var(--cta);
  color: #FFFFFF;
  border: 1px solid var(--cta);
  border-radius: 0;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}
button.btn-cta { cursor: pointer; }
.btn-cta:focus { outline: none; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--brand); }

.wrap {
  padding-left: clamp(72px, 10vw, 144px);
  padding-right: clamp(32px, 5vw, 72px);
  max-width: 1440px;
}

.prose {
  max-width: 720px;
  padding-top: 64px;
  padding-bottom: 64px;
}

.prose p {
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 24px;
  overflow-wrap: break-word;
}

.prose h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.5vw, 56px);
  color: var(--ink);
  margin: 48px 0 24px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.prose h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--ink);
  margin: 36px 0 16px;
}

.prose ul, .prose ol { margin: 0 0 28px; padding-left: 22px; }

.prose li {
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 14px;
  overflow-wrap: break-word;
}

.prose strong { font-weight: 700; }

.prose a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.prose a:hover { text-decoration-thickness: 2px; }
.prose a:focus { outline: none; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--brand); }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 32px 0;
  border-top: 2px solid var(--brand);
  border-bottom: 1px solid var(--rule);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
}

.data-table caption {
  font-family: var(--font-meta);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-align: left;
  padding: 12px 0;
}

.data-table th {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  color: var(--paper);
  background-color: var(--brand);
  padding: 14px 16px;
}

.data-table td {
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.data-table tbody tr:nth-child(even) { background-color: var(--paper); }

.band-brand {
  background-color: var(--brand);
  color: var(--paper);
  padding: 64px clamp(72px, 10vw, 144px);
  border-top: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
}

.band-brand h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  color: #FFFFFF;
  margin: 0 0 24px;
  max-width: 30ch;
}

.band-brand p, .band-brand li {
  color: var(--paper);
  font-size: 18px;
  font-weight: 400;
}

.band-brand ul { margin: 0; padding-left: 22px; max-width: 720px; }
.band-brand li { margin: 0 0 14px; }

.calc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 32px 0 0;
  padding: 24px;
  background-color: var(--paper);
  border-top: 2px solid var(--brand);
}

.calc-field { display: flex; flex-direction: column; min-width: 0; }

.calc-field label {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.calc-field input {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  background-color: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 12px;
  width: 100%;
  max-width: 100%;
}

.calc-field input:focus { outline: none; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--brand); }

.calc .btn-cta { grid-column: 1 / -1; justify-self: start; }

.calc-result {
  margin: 0 0 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.calc-result p { font-size: 16px; color: var(--ink); margin: 0 0 12px; }

.calc-list { list-style: none; margin: 0 0 16px; padding: 0; }

.calc-list li {
  font-family: var(--font-meta);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}

.calc-note {
  font-family: var(--font-meta);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin: 0;
}

.disclaimer {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  margin: 48px 0 0;
}

.cta-band {
  background-color: var(--paper);
  color: var(--ink);
  padding: 64px clamp(72px, 10vw, 144px);
  border-top: 2px solid var(--brand);
}

.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  color: var(--ink);
  margin: 0 0 16px;
  max-width: 30ch;
}

.cta-band p {
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 28px;
  max-width: 60ch;
}

@media (max-width: 1024px) {
  .article-main { margin-left: 240px; }
}

@media (max-width: 900px) {
  .article-main { margin-left: 0; }
}

@media (max-width: 768px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .hero { padding: 64px 24px 48px; }
  .hero-chapo { font-size: 19px; }
  .band-brand, .cta-band { padding: 48px 24px; }
  .prose { padding-top: 40px; padding-bottom: 40px; }
  .prose h2 { margin: 36px 0 18px; padding-top: 24px; }
  .prose h3 { margin: 28px 0 14px; }
  .calc { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { padding: 48px 20px 40px; }
  .hero h1 { font-size: clamp(30px, 9vw, 44px); }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .band-brand, .cta-band { padding: 40px 20px; }
  .prose p, .prose li { font-size: 17px; }
}

/* ===== TYPOGRAPHY SPACING FIX (APS_ARTICLE_TYPO_REQUIRED_v2) ===== */
/* Defensive guard against universal * { margin: 0 } reset in global.css. */
/* body-scoped via :where() so specificity stays at 0,0,0,1 — beats * but
   loses to any component rule like .tip-box p / .faq-item p. */
body :where(p)              { margin-bottom: 1.1rem; }
body :where(h2)             { margin-top: 2.5rem; margin-bottom: 1rem; }
body :where(h3)             { margin-top: 1.75rem; margin-bottom: 0.75rem; }
body :where(h4)             { margin-top: 1.25rem; margin-bottom: 0.5rem; }
body :where(ul, ol)         { margin-bottom: 1.1rem; padding-left: 1.5rem; }
body :where(li)             { margin-bottom: 0.4rem; }
body :where(blockquote)     { margin: 1.5rem 0; }
