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

:root {
  --canvas: #f7f7f4;
  --canvas-soft: #fafaf7;
  --surface-card: #ffffff;
  --surface-strong: #e6e5e0;
  --primary: #f54e00;
  --primary-active: #d04200;
  --ink: #26251e;
  --body: #5a5852;
  --body-strong: #26251e;
  --muted: #807d72;
  --muted-soft: #a09c92;
  --on-primary: #ffffff;
  --hairline: #e6e5e0;
  --hairline-soft: #efeee8;
  --hairline-strong: #cfcdc4;
  --semantic-success: #1f8a65;
  --semantic-error: #cf2d56;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--canvas);
  color: var(--body);
  font-size: 16px;
  line-height: 1.5;
}

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

h1 { font-size: 36px; font-weight: 400; line-height: 1.2; letter-spacing: -0.72px; color: var(--ink); }
h2 { font-size: 26px; font-weight: 400; line-height: 1.25; letter-spacing: -0.325px; color: var(--ink); }
h3 { font-size: 22px; font-weight: 400; line-height: 1.3; letter-spacing: -0.11px; color: var(--ink); }
h4 { font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--ink); }
h5 { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); }

p { color: var(--body); line-height: 1.5; margin-bottom: 16px; }

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  height: 40px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.btn-primary:hover { background: var(--primary-active); text-decoration: none; }

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

.site-header {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.site-logo span { color: var(--primary); }

.nav-menu { display: flex; gap: 8px; list-style: none; }
.nav-menu a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  line-height: 1.4;
}
.nav-menu a:hover, .nav-menu a.active { background: var(--surface-strong); text-decoration: none; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

.layout-hybrid { display: grid; grid-template-columns: 240px 1fr; gap: 48px; padding: 48px 0 80px; }

.sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li { margin-bottom: 4px; }
.sidebar-nav a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: var(--surface-card);
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 12px 8px;
}

.hero-band {
  background: var(--canvas);
  padding: 80px 0;
  border-bottom: 1px solid var(--hairline);
}
.hero-band h1 { margin-bottom: 20px; }
.hero-band p { font-size: 16px; color: var(--body); max-width: 600px; margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 24px;
}
.card h3 { margin-bottom: 12px; }
.card p { margin-bottom: 0; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 40px 0; }
.card-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin: 40px 0; }

.section { padding: 80px 0; }
.section-title { margin-bottom: 40px; }
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  display: block;
}

.timeline { list-style: none; position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--hairline);
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--canvas);
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-item h4 { margin-bottom: 8px; }
.timeline-item p { margin-bottom: 0; }

.timeline-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  border-radius: 9999px;
  padding: 4px 10px;
  color: var(--ink);
  margin-bottom: 8px;
}
.pill-thinking { background: #dfa88f; }
.pill-grep { background: #9fc9a2; }
.pill-read { background: #9fbbe0; }
.pill-edit { background: #c0a8dd; }
.pill-done { background: #c08532; color: #fff; }

.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: 24px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { color: var(--hairline-strong); }

.toc {
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 40px;
}
.toc h5 { margin-bottom: 12px; }
.toc ol { padding-left: 20px; }
.toc li { margin-bottom: 6px; }
.toc a { font-size: 14px; color: var(--body); }
.toc a:hover { color: var(--ink); }

.related-content {
  border-top: 1px solid var(--hairline);
  margin-top: 60px;
  padding-top: 40px;
}
.related-content h4 { margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.related-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 20px;
}
.related-card h5 { margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.related-card p { font-size: 13px; color: var(--muted); margin-bottom: 0; }

details { border: 1px solid var(--hairline); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-card);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 20px; color: var(--muted); }
details[open] summary::after { content: '−'; }
details[open] summary { border-bottom: 1px solid var(--hairline); }
.details-body { padding: 16px 20px; background: var(--canvas-soft); }

.checklist { list-style: none; }
.checklist li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 15px;
  color: var(--body);
}
.checklist li::before {
  content: '☐';
  color: var(--primary);
  font-size: 18px;
  flex-shrink: 0;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%;
  background: var(--surface-card);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 12px 16px;
  height: 44px;
  font-size: 16px;
  font-family: inherit;
}
.form-group textarea { height: auto; min-height: 120px; }
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.form-message { display: none; padding: 12px 16px; border-radius: 8px; font-weight: 500; margin-top: 16px; }
.form-message.success { background: #d1fae5; color: var(--semantic-success); }

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  color: var(--on-primary);
  padding: 20px 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-banner p { color: var(--on-primary); margin: 0; font-size: 14px; }
.cookie-banner a { color: #e6e5e0; }
.cookie-buttons { display: flex; gap: 12px; }
.cookie-btn-accept {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.cookie-btn-reject {
  background: transparent;
  color: var(--on-primary);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.site-footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: 64px 0 48px;
}
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-bottom: 48px; }
.footer-col h5 { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { font-size: 14px; color: var(--body); text-decoration: none; }
.footer-col ul a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-disclaimer { font-size: 12px; color: var(--muted); max-width: 700px; line-height: 1.5; }
.footer-copy { font-size: 14px; color: var(--muted); white-space: nowrap; }
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.footer-legal a { font-size: 12px; color: var(--muted); text-decoration: none; }
.footer-legal a:hover { color: var(--ink); }

.img-wrap { border-radius: 12px; overflow: hidden; margin: 24px 0; }
.img-wrap img { width: 100%; height: 280px; object-fit: cover; display: block; }

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

.loading-spinner { display: none; width: 20px; height: 20px; border: 2px solid var(--hairline); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1024px) {
  .layout-hybrid { grid-template-columns: 200px 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .layout-hybrid { grid-template-columns: 1fr; }
  .sidebar { position: static; display: none; }
  .sidebar.open { display: block; }
  .card-grid, .card-grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; }
  .nav-menu { display: none; }
  .hamburger { display: block; }
  .hero-band { padding: 48px 0; }
  .section { padding: 48px 0; }
  .related-grid { grid-template-columns: 1fr; }
}
