:root {
  --bg: #F5F7FB;
  --surface: #E5EAF3;
  --ink: #12203A;
  --accent: #2C56C6;
  --muted: #7C86A0;
  --line: rgba(124, 134, 160, .32);
  --white: #FFFFFF;
  --accent-hover: #1E3F9E;
  --quiet-hover: #D7DEEC;
  --shadow: 0 1px 0 rgba(18, 32, 58, .04), 0 14px 30px -26px rgba(18, 32, 58, .5);
  --radius: 14px;
  --font-head: "Syne", sans-serif;
  --font-body: "Work Sans", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.62;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

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

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

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 100;
  background: var(--accent);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
  color: var(--white);
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0 0 14px;
  color: var(--ink);
}

h1 { font-size: clamp(32px, 4vw, 46px); line-height: 1.08; font-weight: 800; }
h2 { font-size: clamp(24px, 2.6vw, 32px); margin-top: 0; }
h3 { font-size: 20px; line-height: 1.18; font-weight: 700; }
h4 { font-size: 17px; font-weight: 700; }

p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 14px; padding-left: 1.2em; }
li { margin: 0 0 8px; }
li:last-child { margin-bottom: 0; }

.frame {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.railnav {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  background: var(--surface);
  border-right: 1px solid var(--line);
  z-index: 30;
}

.railnav__panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px 16px 20px;
}

.rail-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  background: var(--surface);
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.015em;
  cursor: pointer;
}

.railnav__brand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 22px;
  padding: 4px 6px 10px;
}

.railnav__brand:hover { color: var(--ink); }

.railnav__brand img {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}

.railnav__name {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.railnav__tag {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
}

.railnav__group { margin-bottom: 18px; }

.railnav__grouptitle {
  margin: 0 8px 8px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.railnav__link {
  display: block;
  padding: 8px 12px 8px 13px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1.35;
  border-left: 3px solid transparent;
}

.railnav__link:hover {
  background: rgba(44, 86, 198, .06);
  color: var(--ink);
}

.railnav__link--on {
  color: var(--accent);
  background: rgba(44, 86, 198, .08);
  border-left-color: var(--accent);
  font-weight: 600;
}

.railnav__link--on:hover { color: var(--accent); }

.railnav__meta {
  margin-top: auto;
  padding: 16px 10px 4px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.railnav__meta a { color: var(--accent); }
.railnav__meta p { margin: 0 0 6px; }

.stage { min-width: 0; }

.board {
  max-width: 1180px;
  padding: 40px 44px 0;
}

.headline { margin-bottom: 8px; }

.kicker {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
}

.panel--flat {
  background: var(--surface);
  box-shadow: none;
}

.panel--accent {
  background: var(--ink);
  color: #F5F7FB;
  box-shadow: none;
}

.panel--accent h1,
.panel--accent h2,
.panel--accent h3,
.panel--accent .panel__title {
  color: var(--white);
}

.panel--accent p,
.panel--accent li { color: #E5EAF3; }

.panel--accent a { color: #9DB4F5; }
.panel--accent a:hover { color: #F5F7FB; }

.panel--accent .kicker { color: #9DB4F5; }

.panel--accent .stat__num { color: var(--white); }
.panel--accent .stat__label { color: var(--white); }
.panel--accent .stat__hint { color: rgba(245, 247, 251, .72); }

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.panel--accent .panel__head { border-bottom-color: rgba(245, 247, 251, .12); }

.panel__title {
  margin: 0;
  font-size: 20px;
}

.panel__body { padding: 20px 22px 22px; }
.panel__foot {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 14px;
}

.statstrip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

.stat__num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(36px, 4vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.stat__label {
  margin: 8px 0 4px;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.35;
}

.stat__hint {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.duo {
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  gap: 30px;
  align-items: start;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(262px, 1fr));
  gap: 18px;
}

.tile {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 20px 18px;
}

.tile__tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.tile__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.015em;
  line-height: 1.18;
  margin: 0 0 10px;
}

.tile__text { font-size: 15.5px; }
.tile__text p { margin: 0 0 10px; }
.tile a { font-weight: 600; }

.ledger { overflow-x: auto; }

table.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.matrix th {
  background: var(--surface);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
}

.matrix td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.matrix tr:last-child td { border-bottom: 0; }

.matrix__head { }
.matrix__note {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 12px;
}

.steps { display: grid; gap: 16px; }

.step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.step__idx {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.step__body h3 { margin-bottom: 8px; }

.note {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  padding: 16px 18px;
  font-size: 15.5px;
}

.note--warn {
  background: #F7F1E8;
  border-color: rgba(160, 124, 80, .35);
}

.note--source {
  background: var(--surface);
}

.qa { display: grid; gap: 12px; }

.qa__item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px 18px;
}

.qa__q {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.015em;
  line-height: 1.22;
  margin: 0 0 10px;
  color: var(--ink);
}

.qa__a { font-size: 16px; }

.chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--line);
}

.chip:hover {
  background: var(--quiet-hover);
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.btn--solid {
  background: #2C56C6;
  color: #FFFFFF;
}

.btn--solid:hover,
.btn--solid:focus {
  background: #1E3F9E;
  color: #FFFFFF;
}

.btn--quiet {
  background: #E5EAF3;
  color: #12203A;
  border: 1px solid var(--line);
}

.btn--quiet:hover,
.btn--quiet:focus {
  background: #D7DEEC;
  color: #12203A;
}

.btnrow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.glossary { display: grid; gap: 12px; }

.glossary__item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px 18px;
}

.glossary__term {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

.glossary__def { font-size: 16px; }

.updatelog { display: grid; gap: 12px; }

.logitem {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.logitem__date {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.logitem__body { font-size: 15.5px; }

.figure { margin: 0; }

.figure__img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.figure__cap {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.block { margin: 0 0 36px; }
.block:last-child { margin-bottom: 8px; }

.scope-list { margin: 0; padding: 0; list-style: none; }
.scope-list li { margin: 0 0 12px; padding: 0; }
.scope-list strong { display: block; margin-bottom: 2px; }

.hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.footzone {
  margin-top: 48px;
  background: #12203A;
  color: #F5F7FB;
  padding: 42px 44px 28px;
}

.footzone a { color: #9DB4F5; }
.footzone a:hover { color: #F5F7FB; }
.footzone h2, .footzone h3 { color: var(--white); }

.footzone .board { padding: 0; max-width: 1180px; margin: 0 auto; }

.footgrid {
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  gap: 30px;
  align-items: start;
}

.footform label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.footform input[type="email"],
.footform input[type="text"],
.footform input[type="tel"],
.footform select,
.footform textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(245, 247, 251, .22);
  background: rgba(255, 255, 255, .06);
  color: var(--white);
  margin-bottom: 12px;
}

.deskform input[type="email"],
.deskform input[type="text"],
.deskform input[type="tel"],
.deskform select,
.deskform textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  margin-bottom: 12px;
}

.deskform label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.footform textarea,
.deskform textarea { min-height: 140px; resize: vertical; }

.footform__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 14px;
  font-size: 14px;
}

.footform__row input[type="checkbox"] {
  margin-top: 4px;
  flex-shrink: 0;
}

.footform__ok,
.footform__err {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14.5px;
  margin-bottom: 12px;
}

.footform__ok {
  background: rgba(80, 160, 110, .2);
  color: #D5F0DE;
}

.footform__err {
  background: rgba(180, 70, 70, .22);
  color: #F7D4D4;
}

.deskform .footform__ok {
  background: #E7F4EA;
  color: #1A4A2A;
  border: 1px solid rgba(26, 74, 42, .15);
}

.deskform .footform__err {
  background: #F8E8E8;
  color: #6A1F1F;
  border: 1px solid rgba(106, 31, 31, .15);
}

.footnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.footnav__col h3 {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 600;
  color: #9DB4F5;
  margin-bottom: 10px;
}

.footnav__col ul { list-style: none; margin: 0; padding: 0; }
.footnav__col li { margin: 0 0 7px; }
.footnav__col p { margin: 0 0 8px; font-size: 14.5px; color: #E5EAF3; }

.legalline {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(245, 247, 251, .12);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245, 247, 251, .72);
}

.cookiebar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--ink);
  color: #F5F7FB;
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 18px 40px -20px rgba(18, 32, 58, .7);
  border: 1px solid rgba(245, 247, 251, .12);
}

.cookiebar.is-on { display: flex; }

.cookiebar__text { font-size: 14.5px; margin: 0; max-width: 70ch; }
.cookiebar__text a { color: #9DB4F5; }

.cookiebar__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.lift-in {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease, transform .5s ease;
}

html.js .lift-in {
  opacity: 0;
  transform: translateY(12px);
}

html.js .lift-in.seen {
  opacity: 1;
  transform: none;
}

.no-js .lift-in {
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lift-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 1080px) {
  .frame {
    grid-template-columns: 1fr;
  }

  .railnav {
    position: sticky;
    top: 0;
    height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-toggle { display: flex; }

  .railnav__panel {
    display: none;
    min-height: 0;
    padding-top: 8px;
  }

  .railnav.is-open .railnav__panel { display: flex; }

  .duo,
  .footgrid {
    grid-template-columns: 1fr;
  }

  .board { padding: 24px 18px 0; }

  .footzone { padding: 32px 18px 24px; }

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

  .logitem { grid-template-columns: 1fr; gap: 6px; }

  .cookiebar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .statstrip { grid-template-columns: 1fr; }
  .footnav { grid-template-columns: 1fr; }
  .panel__head { flex-direction: column; align-items: flex-start; }
  .figure__img { height: 200px; }
  .step { grid-template-columns: 1fr; gap: 8px; }
}
