:root {
  /* Warm Southwest editorial palette — dark mode */
  --sand: #f5f0e6;
  --tan: #e8dfd1;
  --terracotta: #c75b39;
  --terracotta-dark: #a84a2e;
  --sage: #7a8b6f;
  --brown: #3d3029;
  --brown-light: #5c4a3f;
  --bone: #faf4e8;
  --adobe: #d97048;
  --clay: #8c3a1f;
  --dusk: #4a382c;
  --shadow: #251c17;
  --dust: #c7b9a4;
  --panel: #2e211a;

  --bg: var(--shadow);
  --bg-elevated: var(--panel);
  --ink: var(--bone);
  --ink-muted: var(--dust);
  --accent: var(--adobe);
  --accent-hover: #f0a570;
  --rule: var(--dusk);

  --display: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Header */
header {
  background: linear-gradient(180deg, var(--clay) 0%, var(--terracotta) 100%);
  padding: 0;
}
.header-inner { max-width: 1100px; margin: 0 auto; padding: 32px 24px 24px; text-align: center; }
.site-title {
  color: var(--bone);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.1rem;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 3px rgba(37, 28, 23, 0.25);
}

/* Nav — continues the header's gradient down into the dark page background */
nav {
  background: linear-gradient(180deg, var(--terracotta) 0%, var(--shadow) 100%);
}
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; padding: 0 24px; }
.nav-item { position: relative; }
.nav-link {
  display: block;
  color: var(--bone);
  text-decoration: none;
  padding: 14px 16px;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-bottom: 2px solid transparent;
  text-shadow: 0 1px 2px rgba(37, 28, 23, 0.3);
  transition: border-color 160ms ease, color 160ms ease;
}
.nav-link:hover { color: var(--accent-hover); border-bottom-color: var(--accent-hover); background: none; }
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-elevated);
  min-width: 220px;
  z-index: 100;
  border: 1px solid var(--rule);
  box-shadow: 0 6px 16px rgba(37, 28, 23, 0.12);
}
.nav-item:hover .dropdown { display: block; }
.nav-item:last-child .dropdown { left: auto; right: 0; }
.dropdown a {
  display: block;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 10px 16px;
  font-size: 0.88rem;
  border-top: 1px solid var(--rule);
}
.dropdown a:first-child { border-top: none; }
.dropdown a:hover { background: var(--rule); color: var(--accent-hover); }

/* Main content */
.container { max-width: 900px; margin: 0 auto; padding: 44px 24px; }
h1 { font-family: var(--display); font-size: 2.3rem; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; margin-bottom: 20px; }
h2 { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--accent); margin-top: 36px; margin-bottom: 14px; }
h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); margin-top: 26px; margin-bottom: 8px; }
p { margin-bottom: 16px; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
ul, ol { margin: 0 0 16px 24px; }
li { margin-bottom: 4px; }

/* Code */
code { background: var(--panel); padding: 2px 6px; border-radius: 3px; font-family: 'Courier New', monospace; font-size: 0.88em; color: var(--accent-hover); }
pre { background: var(--bg-elevated); padding: 20px; border-radius: 4px; overflow-x: auto; margin: 16px 0; border-left: 3px solid var(--accent); }
pre code { background: none; padding: 0; color: var(--ink); font-size: 0.86em; line-height: 1.5; }
.highlight pre code { color: inherit; }

/* Tables */
table { border-collapse: collapse; width: 100%; margin: 16px 0; font-family: var(--serif); }
th { background: var(--bg-elevated); color: var(--accent); font-weight: 700; padding: 10px 14px; text-align: left; border-bottom: 2px solid var(--accent); }
td { padding: 9px 14px; border-bottom: 1px solid var(--rule); }
tr:hover td { background: var(--bg-elevated); }

/* Home two-column layout */
.home-layout {
  display: flex;
  gap: 64px;
  align-items: flex-start;
}
.home-content {
  flex: 1 1 0;
  min-width: 0;
  font-size: 1.1rem;
}

/* Sidebar stack (callout + highlights) */
.sidebar-stack {
  flex: 0 0 280px;
  width: 280px;
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Vibe-coding callout — pops against the neutral highlights panel */
.callout-panel {
  background: linear-gradient(160deg, var(--terracotta) 0%, var(--clay) 100%);
  border: 1px solid var(--terracotta-dark);
  border-radius: 4px;
  padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.callout-panel-title {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--bone);
  margin-bottom: 8px;
}
.callout-panel-body {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--sand);
  margin-bottom: 12px;
}
.callout-panel-cta {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--bone) !important;
  text-decoration: none;
  border-bottom: 1px solid var(--bone);
}
.callout-panel-cta:hover { color: var(--sand) !important; }

/* Highlights sidebar */
.highlights-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.highlights-panel-title {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
}
.highlights-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.highlights-list li {
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
}
.highlights-list li:last-child { border-bottom: none; }
.highlights-list li a {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 3px;
}
.highlights-list li a:hover { color: var(--accent); }
.highlights-meta {
  display: block;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--ink-muted);
}

/* Page list */
.page-list { list-style: none; margin: 0; padding: 0; }
.page-list li { border-bottom: 1px solid var(--rule); }
.page-list li a { display: block; padding: 10px 0; color: var(--accent); text-decoration: none; font-weight: 600; }
.page-list li a:hover { color: var(--accent-hover); }

/* Footer — continues the dark body down to a deeper close */
footer {
  background: linear-gradient(180deg, var(--bg) 0%, #170f0a 100%);
  border-top: 1px solid var(--rule);
  color: var(--dust);
  padding: 40px 24px 28px;
  text-align: center;
  margin-top: 48px;
}
.footer-inner { font-family: var(--serif); }
footer a { color: var(--adobe); text-decoration: none; }
footer a:hover { color: var(--bone); }
footer p { margin: 4px 0; font-size: 0.9rem; }

/* Visitor ticker */
.ticker-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--shadow);
  color: var(--dust);
  overflow: hidden;
  white-space: nowrap;
  z-index: 9999;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  padding: 5px 0;
  border-top: 1px solid var(--terracotta-dark);
}
.ticker-inner {
  display: inline-block;
  animation: ticker-scroll 40s linear infinite;
}
.ticker-text { display: inline; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* push page content above fixed ticker */
body { padding-bottom: 32px; }

/* Responsive */
@media (max-width: 768px) {
  .nav-inner { flex-direction: column; }
  .dropdown { position: static; box-shadow: none; }
  .home-layout { flex-direction: column; }
  .sidebar-stack { flex: none; width: 100%; position: static; }
}
