@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #000000;
  --primary-active: #1a1a1a;
  --text-link: #0d74ce;
  --ink: #171717;
  --body: #60646c;
  --body-strong: #171717;
  --muted: #999999;
  --muted-soft: #cccccc;
  --hairline: #f0f0f3;
  --hairline-soft: #f5f5f7;
  --hairline-strong: #dcdee0;
  --canvas: #ffffff;
  --canvas-soft: #fafafa;
  --surface-card: #ffffff;
  --surface-strong: #f0f0f3;
  --surface-dark: #171717;
  --on-primary: #ffffff;
  --on-dark: #ffffff;
  --on-dark-soft: #b0b4ba;
  --sky-light: #cfe7ff;
  --sky-mid: #a8c8e8;
  --semantic-success: #16a34a;
  --semantic-error: #eb8e90;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  background: var(--canvas);
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
code { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 13px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* TOP BAR */
.top-bar {
  height: 64px;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo:hover { text-decoration: none; }

.top-bar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.top-bar-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.top-bar-nav a:hover, .top-bar-nav a.active {
  background: var(--surface-strong);
  color: var(--ink);
  text-decoration: none;
}

.top-bar-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
  border-radius: 6px;
}

/* MOBILE DRAWER */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--canvas);
  z-index: 200;
  flex-direction: column;
  padding: 24px 32px;
}

.mobile-drawer.open { display: flex; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
}

.drawer-links {
  display: flex;
  flex-direction: column;
}

.drawer-links a {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline-soft);
  text-decoration: none;
}

/* LAYOUT */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  gap: 48px;
  align-items: flex-start;
  min-height: calc(100vh - 64px);
}

/* SIDEBAR */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  padding: 32px 0;
  align-self: flex-start;
}

.sidebar-section {
  margin-bottom: 28px;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px 6px;
  display: block;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav a {
  display: block;
  font-size: 14px;
  color: var(--body);
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav a:hover {
  background: var(--surface-strong);
  color: var(--ink);
  text-decoration: none;
}

.sidebar-nav a.active {
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 500;
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 32px 0 64px;
}

/* HERO */
.hero-band {
  background: var(--canvas);
  position: relative;
  overflow: hidden;
  padding: 96px 0;
  text-align: center;
}

.hero-band::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--sky-light) 0%, transparent 70%);
  pointer-events: none;
}

.hero-band-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

.hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  background: var(--surface-strong);
  color: var(--ink);
  border-radius: 9999px;
  padding: 4px 12px;
  margin-bottom: 24px;
}

.hero-band h1 {
  font-size: 56px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--ink);
  max-width: 680px;
  margin: 0 auto 20px;
}

.hero-band p {
  font-size: 18px;
  font-weight: 400;
  color: var(--body);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

/* BUTTONS */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  height: 40px;
}

.btn-primary:hover { background: var(--primary-active); text-decoration: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 17px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  cursor: pointer;
  text-decoration: none;
  height: 40px;
  transition: background 0.15s;
}

.btn-secondary:hover { background: var(--surface-strong); text-decoration: none; }

/* BREADCRUMB */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb .sep { color: var(--muted-soft); }
.breadcrumb .current { color: var(--body); }

/* PAGE TITLES */
.page-title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.84px;
  color: var(--ink);
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 16px;
  color: var(--body);
  line-height: 1.5;
  margin-bottom: 32px;
}

.byline {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hairline-soft);
}

/* TIMELINE */
.timeline {
  position: relative;
  padding-left: 32px;
  margin: 32px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--hairline);
}

.timeline-step {
  position: relative;
  padding-bottom: 40px;
}

.timeline-step:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -26px;
  top: 4px;
  width: 20px;
  height: 20px;
  background: var(--surface-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--on-dark);
  flex-shrink: 0;
}

.timeline-step h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.timeline-step p {
  font-size: 15px;
  color: var(--body);
  line-height: 1.6;
  margin-bottom: 0;
}

.timeline-step .step-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--surface-strong);
  color: var(--muted);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

/* FEATURE CARDS */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.feature-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  padding: 24px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--body);
  line-height: 1.5;
}

.feature-card-dark {
  background: var(--surface-dark);
  border-color: transparent;
}

.feature-card-dark h3, .feature-card-dark p { color: var(--on-dark); }
.feature-card-dark p { color: var(--on-dark-soft); }

.step-icon {
  width: 32px;
  height: 32px;
  background: var(--surface-strong);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--ink);
  flex-shrink: 0;
}

.step-icon.dark {
  background: rgba(255,255,255,0.1);
  color: var(--on-dark);
}

/* CONTENT PROSE */
.prose h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin: 40px 0 14px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.prose h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 10px;
}

.prose p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: 16px;
}

.prose ul, .prose ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  margin-bottom: 6px;
}

.prose strong { color: var(--ink); font-weight: 600; }

.info-note {
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--body);
  line-height: 1.5;
  margin: 24px 0;
}

/* TOC */
.page-toc {
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 32px;
}

.page-toc-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.page-toc ol {
  list-style: decimal;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.page-toc ol li a {
  font-size: 14px;
  color: var(--body);
  text-decoration: none;
}

.page-toc ol li a:hover { color: var(--ink); text-decoration: underline; }

/* IMAGES */
.img-figure {
  margin: 32px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hairline-soft);
}

.img-figure img {
  width: 100%;
  object-fit: cover;
}

.img-figure figcaption {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--muted);
  background: var(--canvas-soft);
}

/* RELATED CONTENT */
.related-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}

.related-section h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.related-card {
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 18px;
}

.related-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.related-card p {
  font-size: 13px;
  color: var(--body);
  line-height: 1.4;
  margin-bottom: 10px;
}

.related-card a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-link);
  text-decoration: none;
}

.related-card a:hover { text-decoration: underline; }

/* CONTACT FORM */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  height: 44px;
  transition: border-color 0.15s, border-width 0.15s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--ink);
  border-width: 2px;
}

.form-error {
  font-size: 13px;
  color: #c0392b;
  margin-top: 4px;
}

.form-status {
  margin-top: 12px;
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 8px;
}

.form-status.success {
  background: #f0fdf4;
  color: var(--semantic-success);
  border: 1px solid #bbf7d0;
}

.form-status.loading {
  background: var(--canvas-soft);
  color: var(--muted);
}

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 600px;
  background: var(--surface-dark);
  color: var(--on-dark);
  border-radius: 12px;
  padding: 20px 24px;
  z-index: 300;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-banner p {
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
  min-width: 200px;
  color: var(--on-dark-soft);
}

.cookie-banner p a { color: var(--sky-light); text-decoration: underline; }

.cookie-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-accept {
  background: var(--on-primary);
  color: var(--primary);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  height: 36px;
}

.cookie-reject {
  background: transparent;
  color: var(--on-dark-soft);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  height: 36px;
}

.cookie-banner.hidden { display: none; }

/* FOOTER */
.site-footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: 64px 48px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p.tagline {
  font-size: 14px;
  color: var(--body);
  line-height: 1.5;
  margin: 10px 0;
}

.footer-brand p.email {
  font-size: 13px;
  color: var(--muted);
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col ul li a {
  font-size: 14px;
  color: var(--body);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col ul li a:hover { color: var(--ink); text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid var(--hairline-soft);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-disclaimer {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 820px;
}

.footer-copyright {
  font-size: 12px;
  color: var(--muted-soft);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .page-wrapper { padding: 0 32px; gap: 32px; }
  .sidebar { width: 200px; }
  .top-bar-inner { padding: 0 32px; }
  .hero-band-inner { padding: 0 32px; }
  .site-footer { padding: 48px 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .top-bar-nav { display: none; }
  .top-bar-burger { display: flex; align-items: center; justify-content: center; }
  .top-bar-inner { padding: 0 20px; }
  .page-wrapper { flex-direction: column; padding: 0 20px; }
  .sidebar { display: none; }
  .hero-band { padding: 64px 0; }
  .hero-band-inner { padding: 0 20px; }
  .hero-band h1 { font-size: 36px; }
  .hero-band p { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .site-footer { padding: 40px 20px; }
  .cookie-banner { bottom: 12px; left: 12px; right: 12px; transform: none; width: auto; }
}

@media (max-width: 480px) {
  .hero-band h1 { font-size: 28px; }
  .page-title { font-size: 24px; }
}
