:root {
  --ink: #344149;
  --ink-deep: #202b31;
  --paper: #f7f5f0;
  --surface: #fff;
  --line: #ddd8cf;
  --text: #1d1d1b;
  --muted: #696863;
  --brand: #cf493c;
  --brand-soft: #f7e8e3;
  --green-soft: #eaf0e9;
  --shadow: 0 18px 48px rgba(37, 43, 46, 0.1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 2%, rgba(207, 73, 60, 0.07), transparent 28rem),
    var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-underline-offset: 0.18em;
}

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

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink-deep);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(221, 216, 207, 0.88);
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(18px) saturate(1.2);
}

.nav {
  width: min(980px, calc(100% - 40px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-size: 17px;
  font-weight: 760;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 6px 18px rgba(117, 42, 33, 0.18);
}

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.nav-links a[aria-current="page"] {
  color: var(--text);
}

.legal-shell {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.legal-hero {
  max-width: 780px;
  margin-bottom: 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(36px, 7vw, 58px);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.legal-lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.updated {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.summary-grid {
  margin: 0 0 52px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.summary-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 30px rgba(37, 43, 46, 0.05);
}

.summary-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-deep);
  font-size: 15px;
}

.summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 56px;
}

.toc {
  position: sticky;
  top: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.toc h2 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li + li {
  margin-top: 5px;
}

.toc a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.45;
}

.legal-content {
  min-width: 0;
  padding: 12px 34px 38px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legal-content section {
  scroll-margin-top: 92px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.legal-content section:last-child {
  border-bottom: 0;
}

.legal-content h2 {
  margin: 0 0 14px;
  color: var(--ink-deep);
  font-size: 21px;
  line-height: 1.45;
}

.legal-content h3 {
  margin: 24px 0 8px;
  color: var(--ink);
  font-size: 16px;
}

.legal-content p {
  margin: 0;
}

.legal-content p + p,
.legal-content ul + p,
.legal-content ol + p {
  margin-top: 14px;
}

.legal-content ul,
.legal-content ol {
  margin: 12px 0 0;
  padding-left: 1.4em;
}

.legal-content li + li {
  margin-top: 7px;
}

.callout {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 4px solid var(--brand);
  border-radius: 8px 14px 14px 8px;
  background: var(--brand-soft);
}

.callout.green {
  border-left-color: #607961;
  background: var(--green-soft);
}

.callout p {
  color: var(--ink-deep);
  font-size: 14px;
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

th {
  color: var(--ink-deep);
  background: #f2efe9;
  font-size: 13px;
}

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

.support-card {
  margin: 18px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #faf9f6;
}

.support-card p:first-child {
  margin-top: 0;
}

.button {
  min-height: 48px;
  padding: 12px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  font-size: 15px;
  font-weight: 720;
  text-decoration: none;
}

.button:hover {
  color: #fff;
  background: var(--ink-deep);
}

dl {
  margin: 0;
}

dt {
  margin-top: 22px;
  color: var(--ink-deep);
  font-weight: 720;
}

dt:first-child {
  margin-top: 0;
}

dd {
  margin: 5px 0 0;
  color: var(--muted);
}

.revision-list {
  color: var(--muted);
  font-size: 14px;
}

footer {
  border-top: 1px solid var(--line);
  background: #efebe3;
}

.footer-inner {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

@media (max-width: 780px) {
  .nav-links a:not([aria-current="page"]) {
    display: none;
  }

  .legal-shell {
    padding-top: 52px;
  }

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

  .toc {
    position: static;
  }

  .toc ol {
    columns: 2;
    column-gap: 22px;
  }
}

@media (max-width: 540px) {
  .nav,
  .legal-shell,
  .footer-inner {
    width: min(100% - 28px, 980px);
  }

  .nav {
    min-height: 62px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .nav-links {
    gap: 0;
  }

  .nav-links a[aria-current="page"] {
    max-width: 9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .legal-shell {
    padding: 42px 0 72px;
  }

  .legal-lead {
    font-size: 16px;
  }

  .summary-grid {
    margin-bottom: 36px;
  }

  .legal-layout {
    gap: 24px;
  }

  .toc ol {
    columns: 1;
  }

  .legal-content {
    padding: 4px 20px 26px;
    border-radius: 20px;
  }

  .legal-content section {
    padding: 26px 0;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
