:root {
  --brand-primary: #2b6cb0;
  --brand-secondary: #00897b;
  --background: #f5f7fa;
  --surface: #ffffff;
  --surface-subtle: #f0f4f8;
  --border: #d0d7e2;
  --text: #1a2b4a;
  --text-muted: #5a7fa0;
  --danger: #d32f2f;
  --max-width: 1080px;
  --content-max-width: 720px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--text);
  font-family: Aptos, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

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

.header-inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 16px 24px;
}

.brand-link {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.nav-list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  border-radius: 6px;
  color: var(--text);
  display: inline-flex;
  font-size: 14px;
  line-height: 1.2;
  min-height: 48px;
  padding: 15px 12px;
}

.nav-link:hover,
.nav-link:focus,
.nav-link[aria-current="page"] {
  background: var(--surface-subtle);
  text-decoration: none;
}

.page {
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 32px 24px 56px;
  width: 100%;
}

.intro {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  margin-bottom: 32px;
}

.intro-copy {
  align-self: center;
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: 32px;
  max-width: 720px;
}

h2 {
  font-size: 24px;
  margin-top: 32px;
}

h3 {
  font-size: 20px;
  margin-top: 24px;
}

p {
  color: var(--text);
  line-height: 1.45;
  margin: 16px 0 0;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--text-muted);
}

.intro-image {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.intro-image img {
  aspect-ratio: 4 / 3;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.section {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.link-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.link-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: block;
  min-height: 128px;
  padding: 16px;
}

.link-card strong {
  color: var(--text);
  display: block;
  font-size: 16px;
}

.link-card span {
  color: var(--text-muted);
  display: block;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 8px;
}

.content-page {
  max-width: var(--content-max-width);
  width: 100%;
}

.content-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 24px;
  max-width: 100%;
  min-width: 0;
  padding: 24px;
  width: 100%;
}

.meta {
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
}

.legal-content {
  line-height: 1.45;
  max-width: var(--content-max-width);
}

.policy-greeting {
  border-bottom: 1px solid var(--border);
  margin-top: 0;
  padding-bottom: 24px;
}

.legal-accordion {
  display: grid;
  gap: 12px;
}

.legal-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: clip;
}

.legal-section summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.35;
  min-height: 48px;
  padding: 16px 18px;
}

.legal-section summary:hover,
.legal-section summary:focus {
  background: var(--surface-subtle);
}

.legal-section summary:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: -2px;
}

.legal-section-body {
  border-top: 1px solid var(--border);
  padding: 2px 18px 18px;
}

.legal-section-body > :first-child {
  margin-top: 16px;
}

.legal-content h1,
.legal-content h2,
.legal-content h3 {
  margin-top: 24px;
}

.legal-content ul,
.legal-content ol,
.plain-list {
  line-height: 1.45;
  margin: 16px 0 0;
  padding-left: 22px;
}

.legal-content table {
  border-collapse: collapse;
  margin-top: 16px;
  min-width: 720px;
  width: 100%;
}

.legal-content th,
.legal-content td {
  border: 1px solid var(--border);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.legal-content th {
  background: var(--surface-subtle);
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.legal-content blockquote {
  border-left: 3px solid var(--border);
  color: var(--text-muted);
  margin: 16px 0 0;
  padding-left: 16px;
}

.status-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 24px;
  padding: 20px;
}

.status-box.error {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  align-items: center;
  background: var(--brand-primary);
  border: 1px solid var(--brand-primary);
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  justify-content: center;
  min-height: 48px;
  padding: 14px 20px;
}

.button.secondary {
  background: var(--surface);
  color: var(--text);
}

.button:hover,
.button:focus {
  text-decoration: none;
}

.info-table {
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 20px;
  max-width: 100%;
  width: 100%;
}

.info-table th,
.info-table td {
  border: 1px solid var(--border);
  overflow-wrap: anywhere;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.info-table th {
  background: var(--surface-subtle);
  width: 34%;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 24px;
}

@media (max-width: 780px) {
  .page {
    max-width: 100vw;
    padding: 32px 16px 48px;
  }

  .content-page {
    max-width: 100vw;
  }

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

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: flex-start;
    width: 100%;
  }

  .nav-link {
    line-height: 1.25;
    min-height: 48px;
    width: 100%;
  }

  .intro {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 32px;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }

  .content-panel {
    max-width: calc(100vw - 32px);
    padding: 18px;
  }

  .legal-section summary {
    padding: 14px 16px;
  }

  .legal-section-body {
    padding: 0 16px 16px;
  }

  .info-table,
  .info-table tbody,
  .info-table tr,
  .info-table th,
  .info-table td {
    display: block;
    max-width: 100%;
    min-width: 0;
    word-break: break-word;
    width: 100%;
  }

  .info-table tr + tr {
    border-top: 1px solid var(--border);
  }

  .info-table th,
  .info-table td {
    border-bottom: 0;
  }
}
