:root {
  --blue: #1030a0;
  --blue-soft: #e6ecfb;
  --navy: #081645;
  --text: #1a2233;
  --muted: #4a5568;
  --border: #d7dfeb;
  --surface: #ffffff;
  --background: #f7f9fc;
  --notice: #eef4ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

a {
  color: var(--blue);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #5b7ee5;
  outline-offset: 3px;
}

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

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-inner,
.legal-layout,
.site-footer-inner {
  width: min(100% - 32px, 1100px);
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

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

.brand-name span {
  color: var(--blue);
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.header-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 650;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 38px;
  align-items: start;
  padding-block: 42px 64px;
}

.legal-document {
  min-width: 0;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.legal-document h1,
.legal-document h2,
.legal-document h3 {
  color: var(--navy);
  line-height: 1.25;
}

.legal-document h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 2.65rem);
  letter-spacing: -0.025em;
}

.legal-document h2 {
  margin: 2.25rem 0 0.65rem;
  padding-top: 0.25rem;
  font-size: 1.35rem;
}

.legal-document h3 {
  margin: 1.5rem 0 0.45rem;
  font-size: 1.05rem;
}

.legal-document p,
.legal-document ul,
.legal-document ol,
.legal-document address,
.legal-document table {
  margin-block: 0.7rem;
}

.legal-document ul,
.legal-document ol {
  padding-left: 1.35rem;
}

.legal-document li + li {
  margin-top: 0.35rem;
}

.legal-document address {
  font-style: normal;
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.notice {
  margin-block: 1.4rem;
  padding: 16px 18px;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--notice);
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

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

th {
  background: #f1f5f9;
  color: var(--navy);
}

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

.toc {
  position: sticky;
  top: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.toc h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
}

.toc li + li {
  margin-top: 0.35rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

.site-footer-inner {
  padding-block: 28px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 8px;
}

.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 820px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    grid-row: 1;
  }
}

@media (max-width: 600px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 16px;
  }

  .header-nav {
    justify-content: flex-start;
  }

  .legal-layout {
    width: min(100% - 20px, 1100px);
    gap: 18px;
    padding-block: 20px 40px;
  }

  .legal-document {
    padding: 22px 18px;
  }
}

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

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .skip-link,
  .site-header,
  .toc,
  .site-footer {
    display: none;
  }

  .legal-layout {
    display: block;
    width: 100%;
    padding: 0;
  }

  .legal-document {
    padding: 0;
    border: 0;
  }

  a {
    color: #000;
  }
}
