/* Public landing — dark, minimal, server-rendered.
 * Shares a small dark palette with the dashboard (static/app.css)
 * so / and /dashboard read as the same product. No frameworks, no
 * external assets, no Google Fonts. ~120 lines.
 * Gate ND-AL §ui-refactor-dark — Hanov: simple + auditable. */

:root {
  --bg:      #11191f; /* matches Pico's dark theme bg so landing & dashboard share a body color */
  --surface: #1a2433; /* slightly lighter for cards, code blocks, header band */
  --text:    #e7ecf3;
  --muted:   #8b94a8;
  --accent:  #4f80e6; /* readable blue on dark; lighter than the dashboard's #1e4fb8 navy */
  --border:  #2d3a52;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

/* Header band ------------------------------------------------- */
header.band            { background: var(--surface); border-bottom: 1px solid var(--border); }
header.band .band-row  { max-width: 960px; margin: 0 auto; padding: 0.9rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
header.band a.brand    { color: var(--text); text-decoration: none; }
header.band h1,
header.band .brand-name { margin: 0; font-size: 22px; font-weight: 700; display: block; }

.btn-github            { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.9rem; background: var(--accent); color: #fff; border-radius: 4px; text-decoration: none; font-size: 14px; font-weight: 600; }
.btn-github:hover      { background: #6e9bf2; }

/* Layout ------------------------------------------------------ */
.layout { max-width: 960px; margin: 2rem auto; padding: 0 1rem; display: grid; grid-template-columns: 180px 1fr; gap: 2rem; align-items: start; }

.sidebar { position: sticky; top: 1.5rem; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin: 0 0 0.4rem; }
.sidebar a {
  display: block;
  padding: 0.5rem 0.75rem;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sidebar a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }

main.container { max-width: 720px; min-width: 0; }

/* Typography -------------------------------------------------- */
section   { margin-bottom: 2rem; }
section p { margin: 0 0 0.6rem; }

.lede           { font-size: 1.1rem; color: var(--text); margin: 0 0 1.2rem; line-height: 1.5; }
.definition-lede   { border-left: 3px solid var(--accent); padding: 0.1rem 0 0.1rem 0.9rem; margin: 0 0 1.5rem; }
.definition-lede p { margin: 0; font-size: 1.05rem; line-height: 1.55; }
.concept-summary { color: var(--muted); margin-left: 0.4rem; }

.section-head {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
  margin-bottom: 0.6rem;
}

/* Code -------------------------------------------------------- */
code    { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
p code  { background: var(--surface); padding: 0.05rem 0.3rem; border-radius: 3px; }
pre     { background: var(--surface); border: 1px solid var(--border); padding: 0.8rem; border-radius: 4px; overflow-x: auto; margin: 0.4rem 0 0; }
pre code { background: transparent; padding: 0; }

/* Table ------------------------------------------------------- */
table   { width: 100%; border-collapse: collapse; margin-top: 0.4rem; }
th, td  { padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
th      { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }

/* Lists ------------------------------------------------------- */
dl.glossary       { margin: 0; padding: 0; }
dl.glossary dt    { font-weight: 700; color: var(--accent); margin-top: 0.7rem; font-size: 14px; }
dl.glossary dt:first-child { margin-top: 0; }
dl.glossary dd    { margin: 0.15rem 0 0; font-size: 14px; }

ul.refs           { margin: 0.4rem 0 0; padding-left: 1.2rem; font-size: 14px; }
ul.refs li        { margin-bottom: 0.55rem; }
ul.refs li:last-child { margin-bottom: 0; }

/* Concept directory list — flat link list on /glossary and /research
 * pointing at the per-concept deep pages. Hanov-shaped: bare bullets,
 * link in accent, summary in muted, slight vertical breathing room.
 * Gate ND-AQ §directory-page-refactor. */
ul.concept-index           { margin: 0.4rem 0 0; padding-left: 1.2rem; font-size: 14px; }
ul.concept-index li        { margin-bottom: 0.55rem; }
ul.concept-index li a      { color: var(--accent); font-weight: 600; }
ul.concept-index .concept-summary { color: var(--muted); margin-left: 0.5rem; }

footer { margin: 3rem 0 2rem; text-align: center; color: var(--muted); font-size: 13px; }

/* Mobile: stack the layout, sidebar becomes a chip row -------- */
@media (max-width: 720px) {
  .layout      { grid-template-columns: 1fr; gap: 1rem; }
  .sidebar     { position: static; }
  .sidebar ul  { display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .sidebar li  { margin: 0; }
  .sidebar a   { padding: 0.3rem 0.55rem; font-size: 11px; }
  main.container { max-width: 100%; }
}
