:root {
  color-scheme: light;
  --bg: #fbfaf8;
  --panel: #ffffff;
  --panel-soft: #f5f3ef;
  --text: #141b26;
  --muted: #69717d;
  --line: #dedfe3;
  --accent: #3558c8;
  --accent-soft: #e8f2ff;
  --ok: #2f7d4c;
  --warn: #8a4a12;
  --danger: #8d2f2b;
  --shadow: 0 12px 28px rgba(31, 39, 52, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

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

a:hover {
  color: #213c99;
}

.shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 248, 0.94);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.mark {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: #f0efeb;
  color: var(--accent);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.nav-links a {
  color: #2f3744;
  text-decoration: none;
  font-weight: 700;
}

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

.hero {
  padding: 72px 0 44px;
}

.eyebrow {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: 0;
  margin: 0;
}

h1 {
  font-size: clamp(44px, 8vw, 74px);
  max-width: 920px;
  margin-top: 18px;
}

h2 {
  font-size: 34px;
  margin-top: 56px;
}

h3 {
  font-size: 22px;
  margin-top: 28px;
}

p {
  margin: 14px 0 0;
}

.lede {
  color: #3d4653;
  max-width: 820px;
  font-size: 24px;
  line-height: 1.45;
  margin-top: 24px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 5px 18px rgba(22, 28, 40, 0.08);
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.button:hover {
  border-color: #b8c0ce;
  color: var(--text);
}

.button.primary:hover {
  background: #2845a5;
  color: #ffffff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.card,
.notice,
.legal-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card {
  padding: 24px;
  display: block;
  color: var(--text);
  text-decoration: none;
}

.card h3 {
  margin-top: 0;
}

.card p {
  color: var(--muted);
}

.card:hover {
  border-color: #b8c0ce;
  color: var(--text);
}

.notice {
  padding: 18px 22px;
  margin-top: 28px;
  box-shadow: none;
  background: var(--panel-soft);
}

.notice strong {
  color: var(--warn);
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 34px;
  align-items: start;
  padding: 52px 0 72px;
}

.legal-main {
  min-width: 0;
}

.legal-main h1 {
  font-size: clamp(38px, 6vw, 58px);
}

.meta {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  margin-top: 14px;
}

.legal-card {
  padding: 28px;
  margin-top: 24px;
}

.legal-card h2:first-child,
.legal-card h3:first-child {
  margin-top: 0;
}

.legal-card ul,
.legal-card ol {
  padding-left: 24px;
  margin: 14px 0 0;
}

.legal-card li + li {
  margin-top: 8px;
}

.toc {
  position: sticky;
  top: 102px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.toc-title {
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.toc a {
  display: block;
  color: #394250;
  text-decoration: none;
  font-weight: 700;
  margin-top: 12px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  font-size: 15px;
}

th,
td {
  border: 1px solid var(--line);
  padding: 12px;
  vertical-align: top;
  text-align: left;
}

th {
  background: var(--panel-soft);
  color: #4b5360;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: #f0efeb;
  border-radius: 6px;
  padding: 0.12em 0.32em;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  color: var(--muted);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer a {
  color: #3d4653;
  text-decoration: none;
  font-weight: 700;
  margin-left: 16px;
}

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

@media (max-width: 860px) {
  .shell {
    width: min(100% - 32px, 1120px);
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .nav-links {
    gap: 12px 16px;
  }

  .hero {
    padding: 48px 0 28px;
  }

  .lede {
    font-size: 21px;
  }

  .grid,
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: normal;
  }
}
