:root {
  --bg: #F5F3EF;
  --surface: #FFFFFF;
  --sidebar: #EFEDE8;
  --border: #E0DDD6;
  --textpri: #1A1917;
  --textsec: #6B6860;
  --accent: #C4522A;
  --accenth: #A8431F;
  --accentbg: #FAF0EB;
}
.dark {
  --bg: #1A1917;
  --surface: #242320;
  --sidebar: #1F1E1C;
  --border: #2E2D2A;
  --textpri: #E8E5DF;
  --textsec: #9A9790;
  --accent: #D4613A;
  --accenth: #C4522A;
  --accentbg: #2A1E18;
}
body {
  background: var(--bg);
  color: var(--textpri);
  font-family: 'Inter', system-ui, sans-serif;
}
.font-display { font-family: 'DM Serif Display', Georgia, serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
  .cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--accent);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ticker-track { will-change: transform; }
}

.accent-rule {
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  border: none;
}

.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
}

.feat-card.featured {
  border-color: var(--accent)!important;
}

@media (prefers-reduced-motion: no-preference) {
  .feat-card { transition: border-color .2s, box-shadow .2s, transform .2s; }
}

.feat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  transform: translateY(-2px);
}

.provider-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--textsec);
  transition: background .15s, color .15s, border-color .15s;
}
.provider-pill:hover, .provider-pill.active {
  background: var(--accentbg);
  color: var(--accent);
  border-color: var(--accent);
}

.screen-glow {
  box-shadow:
    0 0 0 1px var(--border),
    0 8px 40px rgba(196,82,42,.10),
    0 2px 8px rgba(0,0,0,.08);
}

.section-eyebrow {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  transition: background .15s, transform .1s;
}
.btn-primary:hover {
  background: var(--accenth);
  transform: translateY(-1px);
}
.btn-ghost {
  border: 1.5px solid var(--border);
  color: var(--textpri);
  background: transparent;
  transition: border-color .15s, background .15s;
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accentbg);
}

/* ─────────────── PROSE (Typography) ─────────────── */
.prose {
  color: var(--textpri);
  line-height: 1.75;
}
.prose p {
  margin-bottom: 1.25em;
  color: var(--textsec);
}
.prose h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  font-display: swap;
  margin-top: 2em;
  margin-bottom: 0.6em;
  color: var(--textpri);
  line-height: 1.3;
}
.prose h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.75em;
  margin-bottom: 0.5em;
  color: var(--textpri);
  line-height: 1.35;
}
.prose ul,
.prose ol {
  padding-left: 1.25em;
  margin-bottom: 1.25em;
  color: var(--textsec);
}
.prose li {
  margin-bottom: 0.4em;
}
.prose li > ul,
.prose li > ol {
  margin-top: 0.4em;
  margin-bottom: 0;
}
.prose ul > li { list-style-type: disc; }
.prose ol > li { list-style-type: decimal; }
.prose strong {
  font-weight: 600;
  color: var(--textpri);
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
  transition: opacity .15s;
}
.prose a:hover { opacity: .8; }
.prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  padding: 0.125em 0.375em;
  border-radius: 0.25rem;
  background: var(--sidebar);
  border: 1px solid var(--border);
}
.prose pre {
  background: var(--sidebar);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1em 1.25em;
  overflow-x: auto;
  font-size: 0.875rem;
  margin-bottom: 1.25em;
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}
.prose blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1em;
  font-style: italic;
  color: var(--textsec);
  margin: 1.5em 0;
}
.prose img {
  border-radius: 0.75rem;
  max-width: 100%;
  height: auto;
}
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25em;
}
.prose th {
  text-align: left;
  font-weight: 600;
  padding: 0.75em;
  border-bottom: 2px solid var(--border);
  color: var(--textpri);
}
.prose td {
  padding: 0.75em;
  border-bottom: 1px solid var(--border);
  color: var(--textsec);
}

.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(34,197,94,.25);
}

.cmp-check { color: #22c55e; }
.cmp-x { color: var(--textsec); }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

.nav-scrolled {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 12px rgba(0,0,0,.06);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }

.modal-card {
  background: var(--surface);
  border-radius: 1rem;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: none;
  background: var(--sidebar);
  color: var(--textsec);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.modal-close:hover {
  background: var(--accentbg);
  color: var(--accent);
}

.modal-field {
  width: 100%;
  padding: .75rem 1rem;
  border-radius: .75rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--textpri);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .875rem;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
.modal-field:focus {
  border-color: var(--accent);
}
.modal-field::placeholder {
  color: var(--textsec);
}
textarea.modal-field {
  resize: vertical;
  min-height: 100px;
}

/* Scroll to top button */
.scroll-top-btn {
  position: fixed;
  bottom: 7rem;
  right: 1.8rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
  z-index: 90;
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  background: var(--accenth);
  transform: translateY(-2px);
}
