:root {
  --ink: #17282d;
  --muted: #5c6c70;
  --paper: #f8f6f0;
  --surface: #ffffff;
  --teal: #0b6e69;
  --teal-dark: #084c49;
  --navy: #173f58;
  --amber: #e7a93b;
  --line: #d9e0de;
  --danger: #a5493e;
  --radius: 18px;
  --shadow: 0 18px 55px rgba(23, 40, 45, .10);
  --shell: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.shell { width: var(--shell); margin-inline: auto; }
.skip-link {
  position: fixed; left: 12px; top: -80px; z-index: 100;
  padding: 10px 14px; background: var(--ink); color: white;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 246, 240, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(23, 40, 45, .09);
}
.nav-wrap { min-height: 72px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .04em; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; color: white; background: var(--teal);
  font-family: Georgia, serif; font-size: 1.25rem;
}
nav { display: flex; gap: 24px; margin-left: auto; }
nav a { color: var(--muted); text-decoration: none; font-size: .94rem; font-weight: 650; }
nav a:hover, nav a:focus-visible { color: var(--teal); }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 20px; border: 1px solid var(--teal);
  border-radius: 999px; color: white; background: var(--teal);
  text-decoration: none; font-weight: 750; line-height: 1.2;
  transition: transform .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); background: var(--teal-dark); }
.button-secondary { color: var(--teal); background: transparent; }
.button-secondary:hover { color: white; }
.button-small { min-height: 38px; padding: 9px 15px; font-size: .9rem; }
.button-ghost { color: var(--teal); background: transparent; }

.hero {
  position: relative; overflow: hidden;
  padding: 108px 0 92px;
  background:
    radial-gradient(circle at 90% 20%, rgba(11, 110, 105, .16), transparent 30%),
    linear-gradient(135deg, #f8f6f0 0%, #eef4f1 100%);
}
.hero::after {
  content: ""; position: absolute; right: -120px; bottom: -160px;
  width: 420px; height: 420px; border: 1px solid rgba(11, 110, 105, .18);
  border-radius: 50%;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.35fr .65fr; gap: 72px; align-items: center; }
.eyebrow { margin: 0 0 14px; color: var(--teal); font-size: .78rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.12; }
h1 { max-width: 790px; margin-bottom: 24px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 6.2vw, 5.8rem); font-weight: 500; letter-spacing: -.045em; }
h2 { margin-bottom: 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 4.5vw, 4rem); font-weight: 500; letter-spacing: -.035em; }
h3 { margin-bottom: 10px; font-size: 1.08rem; }
.lede { max-width: 740px; margin: 0 0 32px; color: #40555a; font-size: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.authors { margin: 24px 0 0; color: var(--muted); font-size: .94rem; }
.hero-panel { padding: 28px; border: 1px solid rgba(11, 110, 105, .17); border-radius: var(--radius); background: rgba(255,255,255,.82); box-shadow: var(--shadow); }
.panel-label { margin: 0 0 18px; color: var(--muted); font-size: .8rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.metric-grid div { min-height: 116px; padding: 18px; border-radius: 13px; background: #f0f5f3; }
.metric-grid strong { display: block; color: var(--navy); font-family: Georgia, serif; font-size: 2.4rem; line-height: 1; }
.metric-grid span { display: block; margin-top: 9px; color: var(--muted); font-size: .82rem; }
.status { display: flex; align-items: center; gap: 9px; margin-top: 18px; color: var(--teal-dark); font-size: .88rem; font-weight: 700; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #46a978; box-shadow: 0 0 0 5px rgba(70,169,120,.14); }

.notice { color: #fff8e9; background: #5d481d; }
.notice-inner { display: flex; align-items: center; gap: 20px; padding-block: 18px; }
.notice-inner p { margin: 0; }
.notice-tag { flex: 0 0 auto; padding: 5px 10px; border-radius: 999px; color: #4c3607; background: var(--amber); font-size: .75rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }

.section { padding: 104px 0; }
.section-tint { background: #edf2ef; }
.section-dark { color: #edf7f4; background: #112d34; }
.section-heading { max-width: 800px; margin-bottom: 48px; }
.section-heading > p:last-child { color: var(--muted); font-size: 1.1rem; }
.rule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rule-grid article { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rule-grid article > span { color: var(--teal); font-size: .76rem; font-weight: 850; letter-spacing: .12em; }
.rule-grid h3 { margin-top: 25px; }
.rule-grid p { margin-bottom: 0; color: var(--muted); font-size: .92rem; }

.method-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding: 0; overflow: hidden; border: 1px solid #cedad6; border-radius: var(--radius); list-style: none; background: #cedad6; }
.method-flow li { min-height: 270px; padding: 28px; background: #f8fbf9; }
.method-flow li > span { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 38px; border-radius: 50%; color: white; background: var(--navy); font-family: Georgia, serif; font-size: 1.2rem; }
.method-flow p { color: var(--muted); font-size: .92rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 10px 35px rgba(23,40,45,.06); }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 17px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: #f4f7f5; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 780; }

.figure-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 48px; }
figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 10px 35px rgba(23,40,45,.06); }
figure img { width: 100%; aspect-ratio: 16/10; object-fit: contain; padding: 16px; background: #fbfcfb; }
figcaption { padding: 18px 22px 22px; color: var(--muted); font-size: .9rem; }
figcaption strong { color: var(--ink); }
.figure-wide { grid-column: 1 / -1; }
.figure-wide img { aspect-ratio: 16/7; }

.reproduce-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: center; }
.section-dark h2 { color: white; }
.section-dark p { color: #b8cbc8; }
.check-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 30px; color: #d9ece7; font-size: .9rem; }
.code-card { overflow: hidden; border: 1px solid #3d5960; border-radius: var(--radius); background: #0c2026; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; color: #aac2bd; border-bottom: 1px solid #29464d; font-size: .8rem; }
.code-head button { padding: 5px 10px; color: #d8f0eb; border: 1px solid #41646b; border-radius: 8px; background: transparent; cursor: pointer; }
pre { margin: 0; padding: 22px; overflow-x: auto; }
code { color: #dff6ef; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .84rem; line-height: 1.75; }

.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.review-card { min-height: 240px; padding: 28px; border-radius: var(--radius); border-top: 5px solid; background: white; box-shadow: 0 10px 35px rgba(23,40,45,.07); }
.review-card p:last-child { color: var(--muted); }
.review-card.support { border-color: var(--teal); }
.review-card.caution { border-color: var(--amber); }
.review-card.reject { border-color: var(--danger); }
.card-kicker { font-size: .76rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.support .card-kicker { color: var(--teal); }
.caution .card-kicker { color: #9b6b0e; }
.reject .card-kicker { color: var(--danger); }
.download-panel { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 48px; padding: 34px; border-radius: var(--radius); color: white; background: var(--navy); }
.download-panel p { margin-bottom: 0; color: #c2d5df; }
.download-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.download-panel .button-secondary { color: white; border-color: #90b7ca; }

footer { padding: 54px 0; color: #b8cbc8; background: #0b2025; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr .5fr; gap: 42px; }
.footer-brand { color: white; }
.footer-grid p { margin-bottom: 0; font-size: .9rem; }
.footer-label { color: white; font-weight: 780; }
.footer-grid > div:last-child { display: flex; flex-direction: column; gap: 5px; }
.footer-grid a { text-decoration-color: rgba(255,255,255,.35); }

@media (max-width: 900px) {
  nav { display: none; }
  .nav-wrap .button { margin-left: auto; }
  .hero-grid, .reproduce-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 74px; }
  .hero-panel { max-width: 620px; }
  .rule-grid, .review-grid { grid-template-columns: repeat(2, 1fr); }
  .method-flow { grid-template-columns: repeat(2, 1fr); }
  .download-panel { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  :root { --shell: min(100% - 28px, 1180px); }
  .site-header .button-small { display: none; }
  h1 { font-size: 3rem; }
  .section { padding: 74px 0; }
  .rule-grid, .review-grid, .figure-grid, .method-flow, .footer-grid { grid-template-columns: 1fr; }
  .figure-wide { grid-column: auto; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .notice-inner { align-items: flex-start; flex-direction: column; gap: 8px; }
  .check-list { grid-template-columns: 1fr; }
}

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