:root {
  color-scheme: light dark;
  --background: #f4f5f2;
  --surface: #ffffff;
  --text: #1b201d;
  --muted: #545b57;
  --subtle: #666e6a;
  --line: #d5d9d5;
  --accent: #236547;
  --accent-strong: #174932;
  --accent-soft: #e7f0eb;
  --header: rgba(244, 245, 242, 0.96);
  --content: 1040px;
  --reading: 680px;
  --gutter: clamp(20px, 5vw, 52px);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #111412;
    --surface: #171b18;
    --text: #f0f2ee;
    --muted: #b6bdb8;
    --subtle: #8f9892;
    --line: #303630;
    --accent: #8bbfa4;
    --accent-strong: #acd0bd;
    --accent-soft: #1b2a22;
    --header: rgba(17, 20, 18, 0.96);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

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

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

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

.header-rule {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header,
.legal-hero,
.legal-layout,
.site-footer {
  width: min(100%, var(--content));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
}

.site-nav a {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-decoration: none;
}

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

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

.legal-hero {
  padding-top: clamp(62px, 9vw, 94px);
  padding-bottom: clamp(46px, 7vw, 72px);
  border-bottom: 1px solid var(--line);
}

.document-label {
  margin: 0 0 18px;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p,
ul {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.effective-date {
  margin-bottom: 0;
  color: var(--subtle);
  font-size: 0.9rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, var(--reading));
  justify-content: space-between;
  gap: clamp(42px, 7vw, 76px);
  align-items: start;
  padding-top: clamp(48px, 7vw, 72px);
  padding-bottom: clamp(76px, 10vw, 112px);
}

.contents {
  position: sticky;
  top: 100px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.contents p {
  margin-bottom: 13px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
}

.contents a {
  display: block;
  padding: 4px 0;
  color: var(--subtle);
  font-size: 0.79rem;
  line-height: 1.4;
  text-decoration: none;
}

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

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

.summary-panel {
  margin-bottom: 52px;
  padding: 22px 24px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.summary-panel p {
  margin-bottom: 0;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.65;
}

.policy-section {
  scroll-margin-top: 96px;
}

.policy-section + .policy-section {
  margin-top: 44px;
}

.policy-section h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 13px;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.35;
}

.section-number {
  flex: 0 0 2.1rem;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
  text-align: right;
}

.policy-section p,
.policy-section li {
  color: var(--muted);
}

.policy-section p {
  margin-bottom: 16px;
}

.policy-section ul {
  padding-left: 1.25rem;
}

.policy-section p:last-child,
.policy-section ul:last-child {
  margin-bottom: 0;
}

.policy-section li + li {
  margin-top: 9px;
}

.policy-section strong {
  color: var(--text);
}

.site-footer {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.76rem;
}

.site-footer p {
  margin: 0;
}

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

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

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

@media (max-width: 760px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 0;
  }

  .brand {
    display: flex;
    min-height: 64px;
    align-items: center;
  }

  .site-nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10ch), 1fr));
    gap: 0;
    border-top: 1px solid var(--line);
    font-size: 0.68rem;
  }

  .site-nav a {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    font-size: inherit;
    line-height: 1.2;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .site-nav a:focus-visible {
    outline-offset: -3px;
  }

  .site-nav a:first-child {
    display: none;
  }

  .legal-hero {
    padding-top: 50px;
    padding-bottom: 42px;
  }

  h1 {
    font-size: clamp(2.35rem, 12vw, 3.25rem);
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 38px;
    padding-bottom: 72px;
  }

  .contents {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .contents p {
    grid-column: 1 / -1;
  }

  .contents a {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding-block: 6px;
    overflow-wrap: anywhere;
  }

  .summary-panel {
    margin-bottom: 46px;
    padding: 20px;
  }

  .policy-section + .policy-section {
    margin-top: 40px;
  }

  .site-footer {
    min-height: 136px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .footer-links {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10ch), 1fr));
    gap: 0;
    border-top: 1px solid var(--line);
  }

  .footer-links a {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    line-height: 1.2;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .footer-links a:focus-visible {
    outline-offset: -3px;
  }
}

@media (max-width: 420px) {
  .brand {
    font-size: 0.88rem;
  }

  .policy-section h2 {
    gap: 8px;
  }

  .section-number {
    flex-basis: 1.8rem;
    text-align: left;
  }
}

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