:root {
  color-scheme: light dark;
  --background: #f7f5f1;
  --surface: #fbfaf8;
  --surface-strong: #fbfaf8;
  --text: #1d1d1f;
  --text-secondary: #5f5954;
  --line: #d8d4ce;
  --accent: #735c48;
  --accent-strong: #5c4432;
  --accent-soft: #eee5da;
  --primary-action: #735c48;
  --warning: #8a4b16;
  --warning-surface: #fff3df;
  --radius-large: 28px;
  --radius-medium: 18px;
  --page-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid #b17835;
  outline-offset: 4px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--background);
  transform: translateY(-160%);
}

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

.site-header {
  width: min(calc(100% - 40px), 1040px);
  margin: 0 auto;
  padding: 28px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 11px;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.site-nav a,
.language-nav a {
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.language-nav a:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.page {
  width: min(calc(100% - 40px), var(--page-width));
  margin: 46px auto 80px;
}

.page-wide {
  width: min(calc(100% - 40px), 1040px);
}

.hero {
  padding: 70px 0 56px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(40px, 7vw, 60px);
  letter-spacing: -0.045em;
}

.legal-page h1,
.support-page h1 {
  font-size: clamp(38px, 6vw, 52px);
}

h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0.5em 0 1.3em;
  padding-left: 1.35em;
}

li + li {
  margin-top: 0.45em;
}

.lead {
  max-width: 690px;
  margin-bottom: 30px;
  color: var(--text-secondary);
  font-size: clamp(20px, 3vw, 25px);
  line-height: 1.55;
  letter-spacing: -0.015em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--primary-action);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
}

.card p:last-child,
.notice p:last-child,
.legal-section p:last-child {
  margin-bottom: 0;
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  border-color: var(--accent);
}

.card-link span {
  color: var(--accent-strong);
  font-weight: 700;
}

.language-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 30px;
}

.language-nav a {
  border: 1px solid var(--line);
  background: var(--surface);
}

.meta {
  margin-bottom: 26px;
  color: var(--text-secondary);
  font-size: 14px;
}

.notice {
  margin: 26px 0;
  padding: 20px 22px;
  border: 1px solid rgba(138, 75, 22, 0.24);
  border-radius: var(--radius-medium);
  background: var(--warning-surface);
  color: #653813;
}

.notice strong {
  color: #4f290b;
}

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

.legal-section:first-of-type,
.support-section:first-of-type {
  border-top: 0;
}

.language-block {
  scroll-margin-top: 24px;
}

.language-divider {
  height: 1px;
  margin: 64px 0;
  border: 0;
  background: var(--line);
}

.faq {
  display: grid;
  gap: 14px;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--surface);
}

summary {
  padding: 19px 22px;
  cursor: pointer;
  font-weight: 700;
}

details > div {
  padding: 0 22px 20px;
  color: var(--text-secondary);
}

.contact-card {
  margin: 26px 0;
  padding: 28px;
  border-radius: var(--radius-large);
  background: var(--accent-strong);
  color: #fff;
}

.contact-card h2,
.contact-card h3,
.contact-card a {
  color: #fff;
}

.contact-card .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.contact-card a {
  font-weight: 700;
}

.contact-card .button {
  margin-top: 4px;
  background: #fff;
  color: #4f3d2e;
}

.site-footer {
  width: min(calc(100% - 40px), 1040px);
  margin: 0 auto;
  padding: 24px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 14px;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
}

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

.footer-links a {
  color: inherit;
}

.error-layout {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  text-align: center;
}

.error-layout .card {
  width: min(100%, 620px);
  border: 0;
  background: transparent;
  text-align: center;
}

.error-layout h1 {
  font-size: clamp(32px, 9vw, 48px);
  word-break: keep-all;
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .site-header {
    align-items: flex-start;
    padding-top: 20px;
  }

  .site-nav {
    max-width: 55%;
  }

  .page {
    margin-top: 30px;
  }

  .hero {
    padding: 40px 0 34px;
  }

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

  .card,
  .contact-card {
    padding: 23px;
    border-radius: 22px;
  }

  .legal-section,
  .support-section {
    padding: 28px 0;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #121211;
    --surface: #1c1b19;
    --surface-strong: #1c1b19;
    --text: #f5f5f7;
    --text-secondary: #afafb8;
    --line: #3a3835;
    --accent: #eee5da;
    --accent-strong: #fff8f0;
    --accent-soft: #3a332c;
    --primary-action: #735c48;
    --warning: #e0a164;
    --warning-surface: #34271c;
  }

  a {
    color: #e5cba7;
  }

  .button {
    background: var(--primary-action);
    color: #fff;
  }

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

  .notice {
    color: #f0c99d;
  }

  .notice strong {
    color: #ffe0b9;
  }

  .contact-card {
    background: #44392d;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .site-header,
  .site-footer,
  .language-nav,
  .actions,
  .notice {
    display: none;
  }

  .page {
    width: 100%;
    margin: 0;
  }

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