:root {
  --primary: #533afd;
  --primary-deep: #4434d4;
  --primary-press: #2e2b8c;
  --ink: #0d253d;
  --ink-secondary: #273951;
  --ink-mute: #64748d;
  --on-primary: #ffffff;
  --canvas: #ffffff;
  --canvas-soft: #f6f9fc;
  --hairline: #e3e8ee;
  --hairline-input: #a8c3de;
  --ruby: #ea2261;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif;
  background: var(--canvas);
  color: var(--ink-secondary);
  line-height: 1.5;
  font-weight: 400;
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.4rem; line-height: 1.15; font-weight: 300; letter-spacing: -0.03em; }
h2 { font-size: 1.6rem; margin-top: 2.2rem; font-weight: 400; }
h3 { font-size: 1.2rem; margin-top: 1.5rem; font-weight: 600; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.top-nav {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.top-nav .logo {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.top-nav .logo span { color: var(--primary); }
.top-nav nav { display: flex; align-items: center; gap: 26px; }
.top-nav nav a {
  color: var(--ink-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}
.top-nav nav a:hover { color: var(--primary); text-decoration: none; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
}

.page-wrap { max-width: 900px; margin: 0 auto; padding: 40px 24px 64px; }
.page-wrap-wide { max-width: 1180px; margin: 0 auto; padding: 40px 24px 64px; }

.hero-gradient {
  background: linear-gradient(135deg, #f6f9fc 0%, #eef0ff 60%, #ffffff 100%);
  padding: 56px 0 40px;
  margin-bottom: 8px;
}
.hero-gradient .inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hero-gradient p.lead { color: var(--ink-mute); font-size: 1.1rem; max-width: 65ch; }

.breadcrumb-nav {
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin-bottom: 20px;
}
.breadcrumb-nav a { color: var(--ink-mute); }
.breadcrumb-nav a:hover { color: var(--primary); }

.toc-box {
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 24px 0 32px;
}
.toc-box h4 {
  margin-top: 0;
  color: var(--primary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.toc-box ol { margin: 0; padding-left: 20px; }
.toc-box li { margin-bottom: 6px; }

.alpha-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.alpha-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.alpha-card .letter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.alpha-card h3 { margin-top: 0; font-size: 1.1rem; }
.alpha-card p { color: var(--ink-mute); font-size: 0.92rem; }
.alpha-card a.read-link { color: var(--primary); font-weight: 600; font-size: 0.88rem; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 28px 0;
}
.stat-item {
  background: var(--canvas-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--hairline);
}
.stat-item .stat-num {
  color: var(--primary);
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: -1px;
  display: block;
}
.stat-item p { color: var(--ink-mute); font-size: 0.85rem; margin: 6px 0 0; }

figure.article-image { margin: 24px 0; }
figure.article-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  display: block;
  border: 1px solid var(--hairline);
}
figure.article-image figcaption {
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin-top: 8px;
}

.disclaimer-block {
  background: var(--canvas-soft);
  border-left: 3px solid var(--primary);
  padding: 14px 18px;
  font-size: 0.86rem;
  color: var(--ink-mute);
  border-radius: var(--radius-sm);
  margin: 24px 0;
}

.related-content {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}
.related-content h3 { margin-top: 0; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.related-item {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.related-item a { font-weight: 700; color: var(--ink); }
.related-item p { color: var(--ink-mute); font-size: 0.88rem; }

details.faq-item {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 12px;
}
details.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::before { content: '+ '; color: var(--primary); font-weight: 700; }
details.faq-item[open] summary::before { content: '– '; }

.pill-btn {
  display: inline-block;
  background: var(--primary);
  color: var(--on-primary);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}
.pill-btn:hover { background: var(--primary-deep); color: var(--on-primary); text-decoration: none; }

.contact-form { max-width: 480px; }
.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--ink);
  margin: 14px 0 6px;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-input);
  font-family: inherit;
  font-size: 0.95rem;
}
.contact-form .error-msg {
  color: var(--ruby);
  font-size: 0.82rem;
  margin-top: 4px;
  display: none;
}
.contact-form .success-msg {
  display: none;
  background: var(--canvas-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 16px;
  color: #0a8a5f;
  font-weight: 600;
}

.read-more-block { max-height: 90px; overflow: hidden; }
.read-more-block.expanded { max-height: none; }

.read-more-toggle {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px 0;
}

.timeline {
  margin: 28px 0;
  padding-left: 0;
  list-style: none;
  border-left: 2px solid var(--hairline);
}
.timeline li {
  position: relative;
  padding: 4px 0 22px 26px;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--canvas);
}
.timeline .tl-year {
  display: block;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}
.timeline p { margin: 4px 0 0; color: var(--ink-mute); font-size: 0.92rem; }

.site-footer {
  background: var(--ink);
  color: #b9c3d4;
  padding: 56px 24px 24px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}
.footer-inner h5 {
  color: #ffffff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.footer-inner ul { list-style: none; padding: 0; margin: 0; }
.footer-inner li { margin-bottom: 8px; }
.footer-inner a { color: #b9c3d4; font-size: 0.9rem; }
.footer-inner a:hover { color: #ffffff; }
.footer-bottom {
  max-width: 1180px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid #273951;
  font-size: 0.82rem;
  color: #8291a6;
}
.footer-disclaimer { max-width: 900px; margin-bottom: 6px; }

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  color: #ffffff;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}
.cookie-banner p { margin: 0; font-size: 0.88rem; max-width: 640px; }
.cookie-banner .cookie-actions { display: flex; gap: 10px; }
.cookie-banner button {
  border-radius: var(--radius-pill);
  padding: 8px 20px;
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
}
.cookie-accept { background: var(--primary); color: var(--on-primary); }
.cookie-reject { background: transparent; color: #ffffff; border: 1px solid #ffffff !important; }

@media (max-width: 900px) {
  .top-nav nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    gap: 14px;
  }
  .top-nav nav.open { display: flex; }
  .menu-toggle { display: block; }
  h1 { font-size: 2rem; }
  .page-wrap, .page-wrap-wide { padding: 24px 18px 40px; }
}
