:root {
  --ink: #171116;
  --muted: #665b64;
  --paper: #fffdf8;
  --panel: #ffffff;
  --line: #eadfe6;
  --red: #f2212a;
  --purple: #9a1b61;
  --cyan: #00a9b7;
  --soft: #f6eef3;
  --shadow: 0 18px 48px rgba(23, 17, 22, 0.09);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
a { color: var(--purple); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--red); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(14px);
}
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; min-width: 178px; }
.brand img { width: 176px; display: block; }
.nav-links { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 18px; font-size: 0.95rem; }
.nav-links a { color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--red); font-weight: 700; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(23, 17, 22, 0.18); color: #fff; background: var(--red); border-color: var(--red); }
.button.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.button.secondary:hover { color: var(--red); background: #fff; border-color: var(--red); }
.hero { padding: 78px 0 54px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr); gap: 56px; align-items: center; }
.eyebrow { margin: 0 0 18px; color: var(--purple); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { max-width: 850px; margin: 0; font-size: clamp(2.65rem, 7vw, 5.9rem); line-height: 0.94; letter-spacing: 0; }
.hero-copy { max-width: 720px; margin: 34px 0 0; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.35rem); }
.hero-actions, .action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.mark-panel { position: relative; min-height: 420px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.mark-panel img { position: absolute; right: 30px; bottom: 26px; z-index: 0; width: 112px; }
.mark-panel::before, .mark-panel::after { content: ""; position: absolute; border-style: solid; }
.mark-panel::before { left: 0; bottom: 0; width: 30%; height: 30%; border-width: 0 0 36px 36px; border-color: transparent transparent var(--purple) var(--purple); }
.mark-panel::after { right: 0; top: 0; border-width: 0 84px 84px 0; border-color: transparent var(--purple) transparent transparent; }
.panel-text { position: relative; z-index: 1; max-width: 285px; padding: 34px; }
.panel-text strong { display: block; font-size: 1.45rem; line-height: 1.1; }
.panel-text span { display: block; margin-top: 12px; color: var(--muted); }
.band { padding: 58px 0; }
.band.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(260px, 0.5fr); gap: 36px; align-items: end; margin-bottom: 28px; }
.section-head h2, .page-head h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.65rem); line-height: 1; }
.section-head p, .page-head p { margin: 18px 0 0; color: var(--muted); font-size: 1.06rem; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { min-height: 100%; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.card h3 { margin: 0 0 10px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); }
.kicker { display: inline-flex; align-items: center; min-height: 28px; margin-bottom: 18px; padding: 0 10px; border-radius: 999px; background: var(--soft); color: var(--purple); font-size: 0.78rem; font-weight: 800; }
.model { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.model span { display: flex; align-items: center; justify-content: center; min-height: 68px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 800; text-align: center; }
.code-slab { margin: 0; padding: 24px; border-radius: 8px; background: #171116; color: #fffdf8; overflow-x: auto; font-size: 0.92rem; }
.code-slab code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.page-head { padding: 58px 0 34px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(280px, 0.28fr); gap: 28px; align-items: start; }
.stack { display: grid; gap: 16px; }
.side-note { position: sticky; top: 100px; padding: 22px; border-left: 4px solid var(--red); background: #fff; box-shadow: var(--shadow); }
.side-note p { margin: 0; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--soft); color: var(--ink); }
tr:last-child td { border-bottom: 0; }
.notice { margin-top: 22px; padding: 18px 20px; border: 1px solid rgba(0, 169, 183, 0.34); border-radius: 8px; background: rgba(0, 169, 183, 0.08); color: #124a50; }
.site-footer { padding: 34px 0; border-top: 1px solid var(--line); background: #171116; color: #fffdf8; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: #fffdf8; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 880px) {
  .nav, .hero-grid, .section-head, .content-layout { display: grid; grid-template-columns: 1fr; }
  .nav { align-items: flex-start; padding: 16px 0; }
  .nav-links { justify-content: flex-start; }
  .hero { padding-top: 48px; }
  .mark-panel { min-height: 280px; }
  .grid, .grid.two, .model { grid-template-columns: 1fr; }
  .side-note { position: static; }
}
@media (max-width: 560px) {
  .wrap { width: min(100% - 24px, 1120px); }
  .brand img { width: 154px; }
  h1 { font-size: clamp(2.4rem, 15vw, 4.2rem); }
  .button { width: 100%; }
}
