:root {
  color-scheme: light dark;
  --background: #ffffff;
  --surface: #f5f5f7;
  --text-primary: #1c1c1e;
  --text-secondary: #4a4a4f;
  --text-muted: #6e6e73;
  --border: #e2e5ea;
  --accent: #0066cc;
  --focus: #007aff;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  border-radius: 4px;
  outline: 3px solid color-mix(in srgb, var(--focus) 70%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--text-primary);
  color: var(--background);
  font-weight: 600;
  transform: translateY(-160%);
}

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

.site-header {
  width: min(100% - 32px, 1120px);
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.brand,
.home-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  display: block;
  border-radius: 8px;
}

.home-link {
  font-size: 0.9rem;
  font-weight: 600;
}

.policy {
  width: min(100% - 32px, 720px);
  margin: 0 auto;
  padding: 72px 0 80px;
}

.policy-intro {
  margin-bottom: 48px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.4rem, 8vw, 4rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.updated {
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.lead {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
}

.contents {
  margin-bottom: 24px;
  padding: 24px;
  border-radius: 16px;
  background: var(--surface);
}

.contents h2 {
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.3;
}

.contents ol {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  padding-left: 24px;
}

.contents a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.policy > section {
  padding: 48px 0 8px;
  border-top: 1px solid var(--border);
}

h2 {
  margin-bottom: 24px;
  font-size: clamp(1.45rem, 4vw, 1.8rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

h3 {
  margin: 32px 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

p,
li {
  color: var(--text-secondary);
}

p {
  margin-bottom: 16px;
}

ul {
  margin-bottom: 20px;
  padding-left: 24px;
}

li + li {
  margin-top: 8px;
}

q {
  color: var(--text-primary);
}

.site-footer {
  width: min(100% - 32px, 1120px);
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

@media (max-width: 560px) {
  .site-header {
    min-height: 64px;
  }

  .brand span {
    display: none;
  }

  .policy {
    padding: 48px 0 64px;
  }

  .policy-intro {
    margin-bottom: 40px;
  }

  .contents {
    padding: 20px;
  }

  .policy > section {
    padding-top: 40px;
  }

  .site-footer {
    min-height: 104px;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 20px 0;
  }

  .site-footer span {
    flex-basis: 100%;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1c1c1e;
    --surface: #2c2c2e;
    --text-primary: #f5f5f7;
    --text-secondary: #c7c7cc;
    --text-muted: #98989d;
    --border: #3a3a3f;
    --accent: #409cff;
    --focus: #0a84ff;
  }
}

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

  .skip-link {
    transition: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .contents,
  .skip-link {
    display: none;
  }

  .policy {
    width: 100%;
    padding: 0;
  }

  .policy > section {
    break-inside: avoid;
  }
}
