:root {
  color-scheme: light dark;
  --background: #f7f7fa;
  --surface: #ffffff;
  --surface-soft: #f0f1f7;
  --text: #171722;
  --muted: #5e6070;
  --border: #d9dae5;
  --accent: #4f46e5;
  --accent-strong: #3730a3;
  --accent-soft: #e9e8ff;
  --button-background: #c4c0ff;
  --button-background-hover: #e9e8ff;
  --button-text: #3730a3;
  --shadow: 0 18px 48px rgba(28, 28, 46, 0.09);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #111118;
    --surface: #1a1a24;
    --surface-soft: #222231;
    --text: #f5f5fa;
    --muted: #b7b8c6;
    --border: #343445;
    --accent: #9b95ff;
    --accent-strong: #c4c0ff;
    --accent-soft: #29274d;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  }
}

* { box-sizing: border-box; }

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--background);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

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

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

.shell {
  width: min(100%, 1272px);
  margin-inline: auto;
  padding-inline: 36px;
}

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

.skip-link:hover,
.skip-link:focus {
  color: var(--button-text);
  background: var(--button-background);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: var(--background);
  background: color-mix(in srgb, var(--background) 88%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 72px;
  gap: 28px;
}

.wordmark {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 760;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.primary-nav,
.footer-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.primary-nav a,
.footer-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 610;
  text-decoration: none;
}

.primary-nav a:hover,
.footer-nav a:hover { color: var(--text); }

.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.locale-switch span:first-child {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: -0.16em;
}

.page {
  min-height: calc(100vh - 270px);
  padding-top: 72px;
  padding-bottom: 96px;
}

.hero {
  display: grid;
  place-items: center;
  min-height: 44vh;
  padding: 72px 0 84px;
  text-align: center;
}

.hero-inner { max-width: 850px; }

.hero-line { display: inline; }

.no-break { white-space: nowrap; }

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

h1, h2, h3 {
  line-height: 1.22;
  letter-spacing: -0.035em;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.7rem);
}

.page-product h1,
.page-article h1 { font-size: clamp(2.35rem, 5vw, 4.5rem); }

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

h3 {
  margin: 0 0 10px;
  font-size: 1.14rem;
}

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

.hero-lede {
  max-width: 720px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 12px;
  padding: 9px 18px;
  border-radius: 12px;
  color: var(--button-text);
  background: var(--button-background);
  font-weight: 700;
  text-decoration: none;
}

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

.button:focus-visible {
  color: var(--button-text);
  background: var(--button-background);
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.product-card,
.card,
.article-section,
.edition,
.product-visual {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
  padding: clamp(28px, 5vw, 56px);
}

.product-card p { max-width: 690px; color: var(--muted); }

.product-mark {
  display: grid;
  place-items: center;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(145deg, #7069ff, #3730a3);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.08em;
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.28);
}

.section-block { padding: 72px 0 0; }

.section-intro { max-width: 760px; margin-bottom: 32px; color: var(--muted); }

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

.card,
.edition {
  padding: 30px;
  box-shadow: none;
}

.card p,
.edition p,
.article-section p,
.article-section li { color: var(--muted); }

.product-visual {
  margin: 0;
  overflow: hidden;
}

.product-visual img {
  display: block;
  width: 100%;
  height: auto;
}

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

.article-header { max-width: 820px; padding: 24px 0 54px; }

.page-product .article-header { max-width: 1060px; }

.article-header p { margin-top: 22px; color: var(--muted); font-size: 1.12rem; }

.article-stack { display: grid; gap: 22px; }

.article-section {
  padding: clamp(24px, 4vw, 42px);
  box-shadow: none;
}

.article-section > :last-child { margin-bottom: 0; }

.article-section ul,
.article-section ol { padding-left: 1.3em; }

.article-section li + li { margin-top: 8px; }

.notice {
  padding: 20px 22px;
  border-left: 4px solid var(--accent);
  border-radius: 4px 14px 14px 4px;
  background: var(--accent-soft);
}

.notice p:last-child { margin-bottom: 0; }

.legal-notice { overflow-wrap: anywhere; white-space: pre-line; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface-soft); }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 126px;
}

.footer-brand { margin: 0; font-size: 0.92rem; font-weight: 700; }

@media (max-width: 760px) {
  .shell { padding-inline: 22px; }

  .desktop-line-break { display: none; }

  .hero h1 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-line {
    display: block;
    white-space: nowrap;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    min-height: 66px;
    gap: 14px;
  }

  .primary-nav {
    grid-column: 1 / -1;
    order: 3;
    gap: 18px;
    padding-bottom: 12px;
    overflow-x: auto;
  }

  .page { padding-top: 46px; padding-bottom: 70px; }
  .hero { min-height: 38vh; padding: 48px 0 62px; }

  .product-card,
  .feature-grid,
  .edition-grid { grid-template-columns: 1fr; }

  .product-mark {
    grid-row: 1;
    width: 86px;
    border-radius: 22px;
    font-size: 1.5rem;
  }

  .section-block { padding-top: 52px; }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 30px;
    padding-bottom: 34px;
  }

  .footer-nav { align-items: flex-start; flex-wrap: wrap; gap: 12px 20px; }
}

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