
/* === RESET & BOX MODEL === */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, dl { margin: 0; padding: 0; }

/* === BASE === */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: #1a1a1a;
  background: #ffffff;
  line-height: 1.6;
  font-size: 16px;
}

/* === LAYOUT === */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px clamp(16px, 4vw, 40px) 80px;
}
p, li, td, th, dd { overflow-wrap: break-word; word-break: break-word; }
h1, h2, h3, h4 { text-wrap: balance; overflow-wrap: break-word; }
img, video, iframe, svg { max-width: 100%; height: auto; display: block; }
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
button, [role="button"] { user-select: none; cursor: pointer; }

/* === HEADER === */
header { background: #ffffff; border-bottom: 1px solid #e8e8e8; }
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { font-size: 1.1rem; font-weight: 700; color: #1a1a1a; text-decoration: none; letter-spacing: -0.01em; }
.logo span { color: #024ad8; }
nav a {
  color: #3d3d3d;
  text-decoration: none;
  margin-left: 24px;
  font-size: .9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  transition: color .15s;
}
nav a:hover { color: #024ad8; }

/* === BREADCRUMB === */
.breadcrumb { background: #f7f7f7; padding: 8px 0; font-size: .85rem; border-bottom: 1px solid #e8e8e8; }
.breadcrumb-inner { max-width: 960px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); color: #636363; }
.breadcrumb-inner a { color: #024ad8; text-decoration: none; }
.breadcrumb-inner a:hover { text-decoration: underline; }

/* === HERO === */
.hero { padding: 48px 0 32px; text-align: center; }
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.hero p { font-size: 1rem; color: #636363; }

/* === ANSWER BOX (LCP) === */
.answer-box {
  background: #f7f7f7;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
}
.answer-box .label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #636363;
  font-weight: 600;
  margin-bottom: 10px;
}
.answer-box .main-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.answer-box .main-value em { color: #024ad8; font-style: normal; }
.answer-box .sub { font-size: .95rem; color: #636363; margin-top: 10px; }

/* === STATS === */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(26,26,26,.08);
  border: 1px solid #e8e8e8;
}
.stat-card .num { font-size: 1.5rem; font-weight: 700; color: #1a1a1a; letter-spacing: -0.02em; }
.stat-card .desc { font-size: .8rem; color: #636363; margin-top: 4px; }

/* === CALCULATOR === */
.calculator {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 2px 8px rgba(26,26,26,.08);
  border: 1px solid #e8e8e8;
  margin-bottom: 24px;
}
.calculator h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; color: #1a1a1a; }
.calc-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.calc-group { display: flex; flex-direction: column; gap: 6px; }
.calc-group label { font-size: .75rem; color: #636363; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.calc-group input, .calc-group select {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  min-height: 48px;
  background: #ffffff;
  color: #1a1a1a;
}
.calc-group input:focus, .calc-group select:focus { border-color: #024ad8; }
.calc-btn {
  background: #024ad8;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 12px 28px;
  font-size: .8rem;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .15s;
  min-height: 48px;
  min-width: 48px;
}
.calc-btn:hover { background: #0e3191; }
.calc-result {
  display: none;
  background: #f7f7f7;
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 1.05rem;
  margin-top: 12px;
  color: #1a1a1a;
}
.calc-result strong { color: #024ad8; }

/* === CHART === */
.chart-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 2px 8px rgba(26,26,26,.08);
  border: 1px solid #e8e8e8;
  margin-bottom: 24px;
}
.chart-section h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; color: #1a1a1a; }
.chart-wrap { position: relative; min-height: 300px; }

/* === TABLE === */
.table-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 2px 8px rgba(26,26,26,.08);
  border: 1px solid #e8e8e8;
  margin-bottom: 24px;
}
.table-section h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; color: #1a1a1a; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 420px; }
.data-table th {
  background: #f7f7f7;
  color: #1a1a1a;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 2px solid #e8e8e8;
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid #f7f7f7; color: #1a1a1a; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f7f7f7; }
.data-table a { color: #024ad8; text-decoration: none; }
.data-table a:hover { text-decoration: underline; }

/* === PROSE === */
.prose {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 2px 8px rgba(26,26,26,.08);
  border: 1px solid #e8e8e8;
  margin-bottom: 24px;
  line-height: 1.75;
}
.prose h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 14px; color: #1a1a1a; }
.prose p { margin-bottom: 14px; color: #3d3d3d; }
.prose a { color: #024ad8; }
.prose strong { color: #1a1a1a; }

/* === YEAR NAV === */
.year-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 24px;
  box-shadow: 0 2px 8px rgba(26,26,26,.08);
  border: 1px solid #e8e8e8;
  margin-bottom: 24px;
}
.year-nav a {
  background: #024ad8;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: background .15s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.year-nav a:hover { background: #0e3191; }
.year-nav span { font-weight: 600; color: #1a1a1a; }

/* === RELATED / YEAR LINKS === */
.related {
  background: #f7f7f7;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
}
.related h2 { font-size: .75rem; font-weight: 700; margin-bottom: 16px; color: #636363; text-transform: uppercase; letter-spacing: .08em; }
.related-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.related-grid a {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 8px 16px;
  color: #1a1a1a;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  background: #ffffff;
  transition: all .15s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.related-grid a:hover { background: #024ad8; color: #ffffff; border-color: #024ad8; }

/* === FOOTER === */
footer { background: #1a1a1a; color: rgba(255,255,255,.5); padding: 48px 20px; font-size: .85rem; }
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand { color: #ffffff; font-weight: 600; font-size: 1rem; margin-bottom: 6px; }
.footer-desc { color: rgba(255,255,255,.4); font-size: .82rem; max-width: 320px; line-height: 1.5; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: rgba(255,255,255,.5); text-decoration: none; font-size: .85rem; transition: color .15s; }
.footer-links a:hover { color: #ffffff; }

/* === NOTE === */
.note {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  font-size: .875rem;
  color: #3d3d3d;
  margin-bottom: 20px;
}


/* === TOC === */
.toc { background:#f7f7f7; border-radius:16px; padding:16px 24px; margin-bottom:24px; }
.toc-label { font-size:.72rem; font-weight:700; color:#636363; text-transform:uppercase; letter-spacing:.08em; margin-bottom:10px; }
.toc-links { display:flex; flex-wrap:wrap; gap:8px; }
.toc-links a { font-size:.82rem; color:#1a1a1a; text-decoration:none; padding:5px 14px; border:1px solid #e8e8e8; border-radius:4px; background:#fff; transition:all .15s; min-height:36px; display:inline-flex; align-items:center; }
.toc-links a:hover { background:#024ad8; color:#fff; border-color:#024ad8; }

/* === FORMULA === */
.formula-box { background:#f7f7f7; border-radius:8px; padding:14px 20px; font-family:monospace; font-size:.88rem; margin:14px 0; text-align:center; color:#1a1a1a; border:1px solid #e8e8e8; overflow-x:auto; }

/* === CITATION === */
.citation-box { background:#f7f7f7; border-radius:16px; padding:24px 32px; margin-bottom:24px; }
.citation-box h2 { font-size:1.1rem; font-weight:600; margin-bottom:14px; color:#1a1a1a; }
.citation-box p { font-size:.9rem; color:#3d3d3d; margin-bottom:10px; line-height:1.75; }
.citation-box a { color:#024ad8; }
.citation-box .source-meta { font-size:.8rem; color:#636363; border-top:1px solid #e8e8e8; padding-top:12px; margin-top:4px; }

/* === EROSION TABLE === */
.two-col-table { width:100%; border-collapse:collapse; font-size:.9rem; }
.two-col-table th { background:#f7f7f7; color:#1a1a1a; padding:9px 14px; text-align:left; font-weight:700; font-size:.75rem; text-transform:uppercase; letter-spacing:.05em; border-bottom:2px solid #e8e8e8; }
.two-col-table td { padding:9px 14px; border-bottom:1px solid #f7f7f7; }
.two-col-table tr:last-child td { border-bottom:none; }
.two-col-table tr:hover td { background:#f7f7f7; }


/* === DOLLAR PAGE === */
.dollar-hero { padding: 48px 0 24px; }
.dollar-hero .label { font-size:.75rem; text-transform:uppercase; letter-spacing:.08em; color:#636363; font-weight:600; margin-bottom:10px; }
.dollar-hero .main-value { font-size:2.4rem; font-weight:700; color:#1a1a1a; letter-spacing:-0.03em; line-height:1.1; }
.dollar-hero .main-value em { color:#024ad8; font-style:normal; }
.dollar-hero .sub { font-size:.95rem; color:#636363; margin-top:10px; }
.dollar-badge { display:inline-block; background:#024ad8; color:#fff; border-radius:4px; padding:3px 10px; font-size:.75rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; margin-bottom:16px; }


/* === CATEGORY CHART === */
.cat-section { background:#ffffff; border-radius:16px; padding:28px 32px;
  box-shadow:0 2px 8px rgba(26,26,26,.08); border:1px solid #e8e8e8; margin-bottom:24px; }
.cat-section h2 { font-size:1.1rem; font-weight:600; margin-bottom:20px; color:#1a1a1a; }
.cat-chart-wrap { height:200px; position:relative; }
.cat-legend { display:flex; flex-wrap:wrap; gap:16px; margin-top:16px; }
.cat-legend-item { display:flex; align-items:center; gap:6px; font-size:.8rem; color:#3d3d3d; }
.cat-legend-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }


/* === REGION / CATEGORY PAGES === */
.region-hero { margin-bottom: 24px; }
.region-hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 10px; }
.region-hero .sub { font-size: .95rem; color: #636363; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin-bottom: 24px; }
.hub-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 16px;
  padding: 16px 20px; text-decoration: none; color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(26,26,26,.06); transition: all .15s; display: block; }
.hub-card:hover { border-color: #024ad8; box-shadow: 0 4px 16px rgba(2,74,216,.12); }
.hub-card .hc-num { font-size: 1.4rem; font-weight: 700; color: #024ad8;
  letter-spacing: -0.02em; }
.hub-card .hc-label { font-size: .8rem; color: #636363; margin-top: 3px; }
.compare-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem;
  font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.badge-above { background: #fff0f0; color: #d32f2f; }
.badge-below { background: #f0fff4; color: #2e7d32; }
.badge-eq    { background: #f7f7f7; color: #636363; }

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .answer-box .main-value { font-size: 1.5rem; }
  .calc-row { flex-direction: column; }
  .stats { grid-template-columns: 1fr 1fr; }
  .year-nav { flex-wrap: wrap; gap: 10px; }
  .footer-inner { flex-direction: column; }
  .hero { padding: 32px 0 20px; }
  .container { padding: 24px clamp(16px, 4vw, 32px) 60px; }
  .calculator, .chart-section, .table-section, .prose { padding: 20px; }
}
