:root {
  --ink: #111111;
  --muted: #66645f;
  --paper: #f5f3ee;
  --white: #ffffff;
  --line: rgba(17, 17, 17, 0.12);
  --accent: #deded9;
  --apple-blue: #007aff;
  --info: #4567d6;
  --info-soft: #e9edff;
  --content: 1240px;
  --reading: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

.reading-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 100;
  width: 0;
  height: 3px;
  background: var(--accent);
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 64px), var(--content));
  height: 108px;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  display: block;
  width: 132px;
  height: auto;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.header-link__short {
  display: none;
}

.header-link__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
}

.header-link__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.header-link:hover .header-link__icon {
  background: var(--white);
  border-color: var(--white);
  color: var(--ink);
  transform: translate(2px, -2px);
}

.legal-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: #0d0d0d;
  color: var(--white);
}

.legal-hero::before {
  content: "";
  position: absolute;
  right: -11vw;
  bottom: -32vw;
  width: 62vw;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 9vw rgba(255, 255, 255, 0.025), 0 0 0 18vw rgba(255, 255, 255, 0.018);
}

.legal-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 17%;
  width: 1px;
  height: 100%;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: rotate(24deg);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  width: min(calc(100% - 64px), var(--content));
  min-height: 520px;
  margin-inline: auto;
  padding: 164px 0 70px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--apple-blue);
}

.legal-hero h1 {
  max-width: 950px;
  margin: 0;
  font-size: clamp(52px, 9vw, 116px);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.88;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 38px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
}

.hero-meta strong {
  color: var(--white);
  font-weight: 600;
}

.legal-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, var(--reading));
  gap: clamp(56px, 8vw, 112px);
  justify-content: center;
  width: min(calc(100% - 64px), var(--content));
  margin-inline: auto;
  padding: 88px 0 120px;
}

.toc {
  align-self: start;
  position: sticky;
  top: 40px;
}

.toc-label {
  display: block;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  position: relative;
  padding: 9px 12px 9px 22px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.toc a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.32;
  transform: translateY(-50%);
}

.toc a:hover,
.toc a[aria-current="true"] {
  background: var(--accent);
  color: var(--ink);
}

.toc a[aria-current="true"] {
  background: var(--accent);
  color: var(--ink);
}

.toc a[aria-current="true"]::before {
  background: var(--ink);
  opacity: 1;
}

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

.intro {
  margin: 0 0 76px;
  font-size: clamp(21px, 2.4vw, 29px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.48;
}

.notice {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
  margin: -36px 0 72px;
  padding: 22px;
  border: 1px solid rgba(69, 103, 214, 0.2);
  border-radius: 16px;
  background: var(--info-soft);
}

.notice-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--info);
  color: var(--white);
  font-size: 19px;
  font-weight: 700;
}

.notice p {
  margin: 0;
  color: #3f3e3a;
  font-size: 14px;
  line-height: 1.55;
}

.legal-section {
  padding: 0 0 68px;
  border-top: 1px solid var(--line);
}

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

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 43px;
  height: 28px;
  margin-top: -1px;
  border-radius: 0 0 8px 8px;
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.legal-section h2 {
  margin: 30px 0 24px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.legal-section h3 {
  margin: 34px 0 12px;
  font-size: 18px;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.legal-section p {
  margin: 0 0 18px;
  color: #45443f;
}

.legal-section ul {
  display: grid;
  gap: 11px;
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
}

.legal-section li {
  position: relative;
  padding-left: 25px;
  color: #45443f;
}

.legal-section li::before {
  content: "";
  position: absolute;
  top: 0.7em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

.legal-section strong {
  color: var(--ink);
}

.legal-section a {
  text-decoration-color: rgba(17, 17, 17, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.legal-section a:hover {
  text-decoration-color: var(--ink);
}

.contact-card {
  margin-top: 22px;
  padding: clamp(24px, 4vw, 38px);
  border-radius: 20px;
  background: var(--ink);
  color: var(--white);
}

.contact-card p,
.contact-card li,
.contact-card strong,
.contact-card a {
  color: var(--white);
}

.contact-card li::before {
  background: var(--accent);
}

.site-footer {
  background: var(--ink);
  color: var(--white);
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  width: min(calc(100% - 64px), var(--content));
  margin-inline: auto;
  padding: 70px 0;
}

.footer-mark {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.footer-copy {
  max-width: 420px;
  text-align: right;
}

.footer-copy p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 24px;
}

.footer-links a {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

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

.back-to-top {
  display: none;
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 86px;
  }

  .site-header,
  .hero-inner,
  .legal-shell,
  .footer-inner {
    width: min(calc(100% - 40px), var(--content));
  }

  .site-header {
    height: 88px;
  }

  .brand img {
    width: 112px;
  }

  .legal-hero,
  .hero-inner {
    min-height: 455px;
  }

  .hero-inner {
    padding: 132px 0 52px;
  }

  .legal-shell {
    display: block;
    padding-top: 0;
  }

  .toc {
    position: sticky;
    z-index: 20;
    top: 0;
    width: calc(100% + 40px);
    margin: 0 -20px 56px;
    padding: 12px 20px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: rgba(245, 243, 238, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .toc-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .toc ol {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .toc ol::-webkit-scrollbar {
    display: none;
  }

  .toc li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .toc a {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
  }

  .toc a::before {
    display: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
    line-height: 1.65;
  }

  .site-header,
  .hero-inner,
  .legal-shell,
  .footer-inner {
    width: calc(100% - 32px);
  }

  .site-header {
    height: 76px;
  }

  .brand img {
    width: 100px;
  }

  .header-link {
    gap: 10px;
    font-size: 11px;
  }

  .header-link__wide {
    display: none;
  }

  .header-link__short {
    display: inline;
  }

  .header-link__icon {
    width: 40px;
    height: 40px;
  }

  .header-link__icon svg {
    width: 17px;
    height: 17px;
  }

  .legal-hero,
  .hero-inner {
    min-height: 410px;
  }

  .hero-inner {
    padding: 116px 0 42px;
  }

  .legal-hero h1 {
    font-size: clamp(46px, 17vw, 72px);
    line-height: 0.9;
  }

  .hero-meta {
    display: grid;
    gap: 4px;
    margin-top: 30px;
  }

  .legal-shell {
    padding-bottom: 84px;
  }

  .toc {
    width: calc(100% + 32px);
    margin-inline: -16px;
    margin-bottom: 44px;
    padding-inline: 16px;
  }

  .intro {
    margin-bottom: 58px;
    font-size: 21px;
  }

  .notice {
    grid-template-columns: 36px 1fr;
    gap: 14px;
    margin: -28px 0 56px;
    padding: 17px;
  }

  .notice-icon {
    width: 36px;
    height: 36px;
  }

  .legal-section {
    padding-bottom: 52px;
  }

  .legal-section h2 {
    margin-top: 25px;
    font-size: 31px;
  }

  .legal-section h3 {
    margin-top: 28px;
  }

  .legal-section li {
    padding-left: 22px;
  }

  .footer-inner {
    display: block;
    padding: 52px 0 100px;
  }

  .footer-copy {
    margin-top: 30px;
    text-align: left;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .back-to-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 30;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(17, 17, 17, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font: inherit;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .back-to-top svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
  }

  .back-to-top:hover {
    background: var(--accent);
    transform: translateY(-2px);
  }

  .back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .reading-progress,
  .site-header,
  .toc,
  .site-footer,
  .back-to-top {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .legal-hero,
  .hero-inner {
    min-height: auto;
    background: #fff;
    color: #000;
  }

  .hero-inner {
    width: 100%;
    padding: 0 0 32px;
  }

  .eyebrow,
  .hero-meta,
  .hero-meta strong {
    color: #000;
  }

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

  .legal-section {
    break-inside: avoid;
  }
}
