/* styles.css */

:root{
  --bg: #fbfaf7;
  --paper: #ffffff;
  --ink: #1f2430;
  --muted: #5a6472;
  --soft: #8b96a6;

  --line: #e7e1d7;
  --line2:#efe9df;

  --a: #2d6cdf;     /* calm blue */
  --b: #2aa889;     /* calm green */
  --c: #e2a03b;     /* warm amber */
  --d: #b47ae6;     /* lavender */

  --shadow: 0 14px 40px rgba(17, 24, 39, .08);
  --shadow2: 0 10px 22px rgba(17, 24, 39, .06);

  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  --s-1: 8px;
  --s-2: 12px;
  --s-3: 16px;
  --s-4: 22px;
  --s-5: 28px;
  --s-6: 36px;
  --s-7: 48px;

  --max: 1080px;
}

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

html, body{ height: 100%; }

body{
  margin: 0;
  background:
    radial-gradient(1100px 700px at 12% 8%, rgba(45,108,223,.08), transparent 62%),
    radial-gradient(900px 600px at 86% 12%, rgba(42,168,137,.08), transparent 60%),
    radial-gradient(1000px 700px at 30% 95%, rgba(226,160,59,.08), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a{
  color: var(--a);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover{ text-decoration-thickness: 3px; }

.wrap{
  width: min(var(--max), calc(100% - 2*var(--s-4)));
  margin: 0 auto;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 10px 12px;
  background: var(--paper);
  border: 2px solid var(--a);
  border-radius: 12px;
  z-index: 999;
}

.skip-link:focus{
  left: 12px;
}

.page-header{
  padding: clamp(26px, 3.5vw, 46px) 0 clamp(22px, 3vw, 40px);
}

.kicker{
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 12px;
}

h1{
  margin: 0 0 10px;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.dek{
  margin: 0 0 var(--s-5);
  color: var(--muted);
  max-width: 72ch;
  font-size: clamp(15.5px, 1.5vw, 18px);
}

.thesis-panel{
  padding: var(--s-4);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.thesis-grid{
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
  align-items: start;
}

.hero-figure{
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line2);
}

.hero-figure img{
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.caption{
  margin: 0;
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.thesis-cards{
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
}

.card{
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow2);
  padding: var(--s-4);
}

.approach{
  position: relative;
  overflow: hidden;
}

.approach::before{
  content:"";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .65;
  background:
    radial-gradient(380px 240px at 18% 20%, rgba(45,108,223,.14), transparent 62%),
    radial-gradient(320px 240px at 78% 36%, rgba(42,168,137,.12), transparent 62%);
}

.approach > *{ position: relative; }

.h2{
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.h3{
  margin: 0 0 12px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.bullets{
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--muted);
}

.bullets li{ margin: 6px 0; }

.thesis-line{
  margin: var(--s-4) 0 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: rgba(45,108,223,.08);
  border: 1px solid rgba(45,108,223,.18);
  border-radius: 999px;
}

.badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #1c3b7a;
  background: rgba(45,108,223,.14);
  border: 1px solid rgba(45,108,223,.20);
  border-radius: 999px;
}

.module{
  margin: var(--s-6) 0;
}

.module-head{
  margin: 0 0 var(--s-3);
}

.module h2{
  margin: 0 0 8px;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.subhead{
  margin: 0;
  color: var(--muted);
  max-width: 80ch;
  font-size: 15.5px;
}

.table-card{ padding: 0; overflow: hidden; }

.compare-table{
  width: 100%;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td{
  padding: 14px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--line2);
}

.compare-table thead th{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  background: rgba(251,250,247,.65);
}

.compare-table tbody th{
  width: 34%;
  color: var(--ink);
  font-weight: 700;
}

.compare-table td{
  color: var(--muted);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td{ border-bottom: 0; }

.quote-block{
  margin: var(--s-4) 0 0;
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.80));
  border: 1px solid var(--line);
  box-shadow: var(--shadow2);
  position: relative;
  overflow: hidden;
}

.quote-block::before{
  content:"";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 220px;
  background:
    radial-gradient(240px 180px at 18% 60%, rgba(226,160,59,.20), transparent 60%),
    radial-gradient(260px 200px at 55% 40%, rgba(180,122,230,.15), transparent 60%);
  opacity: .9;
  pointer-events: none;
}

.quote-block p{
  position: relative;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(20px, 2.7vw, 34px);
  line-height: 1.12;
}

.grid-2{
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
  align-items: start;
}

.grid-3{
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
  margin-top: var(--s-4);
}

.grid-3.tight{ gap: var(--s-3); }

.diagram{ margin: 0; }

.diagram svg{
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(251,250,247,.55), rgba(255,255,255,.65));
  border: 1px solid var(--line2);
  padding: 12px;
}

.loop-path{
  fill: rgba(45,108,223,.06);
  stroke: rgba(45,108,223,.55);
  stroke-width: 3;
}

.loop-path--soft{
  fill: rgba(42,168,137,.06);
  stroke: rgba(42,168,137,.55);
}

.loop-nodes circle{
  fill: #ffffff;
  stroke: rgba(45,108,223,.45);
  stroke-width: 2;
}

.loop-nodes--soft circle{
  stroke: rgba(42,168,137,.45);
}

.loop-nodes text{
  font-weight: 800;
  font-size: 14px;
  fill: rgba(31,36,48,.85);
  text-anchor: middle;
}

.loop-arrows path{
  fill: none;
  stroke: rgba(45,108,223,.45);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 2 6;
}

.loop-arrows--soft path{
  stroke: rgba(42,168,137,.45);
}

.loop-arrows marker path,
.loop-arrows--soft marker path{
  fill: rgba(45,108,223,.55);
}

.steps{
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.steps li{ margin: 8px 0; }

.stat-card{
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow2);
  padding: var(--s-3) var(--s-4);
}

.stat-kicker{
  margin: 0 0 8px;
  color: var(--muted);
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.stat-number{
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.stat-detail{
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.35;
}

.axis path{
  fill: none;
  stroke: rgba(90,100,114,.55);
  stroke-width: 2;
  stroke-linecap: round;
}

.ticks path{
  stroke: rgba(90,100,114,.35);
  stroke-width: 2;
  stroke-linecap: round;
}

.curve{
  fill: none;
  stroke: rgba(226,160,59,.95);
  stroke-width: 4;
  stroke-linecap: round;
}

.threshold-line{
  stroke: rgba(180,122,230,.60);
  stroke-width: 2.5;
  stroke-dasharray: 6 8;
}

.threshold-tag{
  fill: rgba(180,122,230,.12);
  stroke: rgba(180,122,230,.28);
  stroke-width: 1.5;
}

.threshold-text{
  fill: rgba(90,100,114,.95);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.labels text{
  fill: rgba(90,100,114,.9);
  font-size: 14px;
  font-weight: 650;
}

.emphasis{
  margin-top: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r-lg);
  border: 1px solid rgba(226,160,59,.22);
  background:
    radial-gradient(520px 240px at 10% 20%, rgba(226,160,59,.12), transparent 62%),
    radial-gradient(560px 260px at 85% 30%, rgba(45,108,223,.10), transparent 62%),
    rgba(255,255,255,.86);
}

.emphasis-title{
  margin: 0 0 8px;
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 18px;
}

.emphasis-line{
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 15px;
}

.emphasis-note{
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.image-card{
  padding: 0;
  overflow: hidden;
}

.image-card img{
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.micro-compare{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  margin: 14px 0 12px;
}

.micro{
  padding: 14px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line2);
  background:
    radial-gradient(280px 160px at 12% 20%, rgba(45,108,223,.10), transparent 62%),
    rgba(251,250,247,.55);
}

.micro:nth-child(2){
  background:
    radial-gradient(280px 160px at 12% 20%, rgba(42,168,137,.10), transparent 62%),
    rgba(251,250,247,.55);
}

.micro-title{
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.micro-number{
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 18px;
}

.micro-note{
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.small{
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.checklist{
  padding: var(--s-4);
}

.checklist-list{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.checklist-list li{
  padding-left: 34px;
  position: relative;
  color: var(--muted);
  font-size: 15px;
}

.checklist-list li::before{
  content:"";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid rgba(42,168,137,.45);
  background: rgba(42,168,137,.10);
}

.checklist-list li::after{
  content:"";
  position: absolute;
  left: 7px;
  top: 9px;
  width: 10px;
  height: 6px;
  border-left: 3px solid rgba(42,168,137,.75);
  border-bottom: 3px solid rgba(42,168,137,.75);
  transform: rotate(-45deg);
}

.result{
  margin-top: var(--s-4);
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: rgba(45,108,223,.08);
  border: 1px solid rgba(45,108,223,.18);
}

.result-lead{
  margin: 0 0 4px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.result-sub{
  margin: 0;
  color: var(--muted);
}

.closing{
  padding: var(--s-5);
  border-radius: var(--r-lg);
  border: 1px solid rgba(31,36,48,.10);
  background:
    radial-gradient(520px 260px at 10% 10%, rgba(45,108,223,.10), transparent 62%),
    radial-gradient(520px 260px at 88% 40%, rgba(42,168,137,.10), transparent 62%),
    rgba(255,255,255,.88);
  text-align: left;
}

.closing-title{
  margin: 0 0 10px;
  font-size: clamp(22px, 2.6vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.closing-line{
  margin: 0;
  color: var(--muted);
  max-width: 82ch;
}

.sources{
  margin: var(--s-7) 0 var(--s-6);
  padding: var(--s-4);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.84);
}

.sources-title{
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.sources-list{
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.sources-list li{ margin: 10px 0; }

@media (min-width: 860px){
  .thesis-grid{
    grid-template-columns: 1.2fr .8fr;
    align-items: stretch;
  }

  .thesis-cards{
    grid-template-columns: 1fr;
    align-content: start;
  }

  .grid-2{
    grid-template-columns: 1fr 1fr;
  }

  .grid-3{
    grid-template-columns: 1fr 1fr 1fr;
  }

  .micro-compare{
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce){
  *{
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}