/* How the Agents Run the Company — living guide stylesheet.
   One file, shared by every page. Clean, readable, print-friendly. */
:root {
  --ink: #1c1a17;
  --muted: #6b6259;
  --paper: #ffffff;
  --wash: #faf8f5;
  --line: #e8e2d9;
  --accent: #9a3f16;
  --accent-soft: #f7ece4;
  --code-bg: #f4f1ec;
  --maxw: 44rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.075rem; line-height: 1.7;
}
.site-header {
  border-bottom: 1px solid var(--line); background: var(--wash);
  padding: 0.9rem 1.25rem;
}
.site-header .crumbs {
  max-width: var(--maxw); margin: 0 auto;
  font-family: -apple-system, 'Segoe UI', sans-serif; font-size: 0.85rem; color: var(--muted);
}
.site-header .crumbs a { color: var(--accent); text-decoration: none; }
.site-header .crumbs a:hover { text-decoration: underline; }
main { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
h1, h2, h3 { font-family: -apple-system, 'Segoe UI', sans-serif; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 2rem; margin: 0 0 0.4rem; }
.dek { color: var(--muted); font-size: 1.15rem; line-height: 1.55; margin: 0 0 2rem; font-style: italic; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 2rem; }
h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }
p { margin: 0 0 1.1rem; }
a { color: var(--accent); }
a:hover { color: #7c3212; }
ul, ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
li { margin-bottom: 0.45rem; }
li::marker { color: var(--accent); }
table { width: 100%; border-collapse: collapse; margin: 1.25rem 0 1.5rem; font-size: 0.95rem; font-family: -apple-system, 'Segoe UI', sans-serif; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border: 1px solid var(--line); vertical-align: top; }
th { background: var(--wash); font-weight: 600; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 0.88em; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 3px; }
pre { background: var(--code-bg); padding: 1rem 1.2rem; border-radius: 6px; overflow-x: auto; font-size: 0.85rem; line-height: 1.55; }
pre code { background: none; padding: 0; }
blockquote {
  margin: 1.25rem 0; padding: 0.75rem 1.25rem;
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  font-style: italic;
}
blockquote p { margin: 0.5rem 0; }
.callout {
  margin: 1.5rem 0; padding: 1rem 1.25rem; border: 1px solid var(--line);
  border-left: 3px solid var(--accent); background: var(--wash); border-radius: 0 6px 6px 0;
  font-family: -apple-system, 'Segoe UI', sans-serif; font-size: 0.95rem;
}
.callout strong { display: block; margin-bottom: 0.25rem; }
.page-nav {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  font-family: -apple-system, 'Segoe UI', sans-serif; font-size: 0.92rem;
}
.page-nav a { text-decoration: none; }
.page-nav a:hover { text-decoration: underline; }
.page-nav .next { text-align: right; }
.site-footer {
  border-top: 1px solid var(--line); background: var(--wash);
  padding: 1.5rem 1.25rem 2.5rem;
  font-family: -apple-system, 'Segoe UI', sans-serif; font-size: 0.82rem; color: var(--muted);
}
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; }
.site-footer p { margin: 0 0 0.6rem; }
.toc { list-style: none; padding: 0; }
.toc li { margin-bottom: 0.9rem; }
.toc .toc-title { font-family: -apple-system, 'Segoe UI', sans-serif; font-weight: 600; font-size: 1.02rem; }
.toc .toc-desc { color: var(--muted); font-size: 0.92rem; }
.part-label {
  font-family: -apple-system, 'Segoe UI', sans-serif; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 600;
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  h1 { font-size: 1.6rem; }
  .page-nav { flex-direction: column; }
  .page-nav .next { text-align: left; }
}
@media print {
  .site-header, .page-nav, .site-footer { display: none; }
  main { max-width: none; }
}


/* Accessibility and narrow-screen overflow fixes for the public candidate. */
main { overflow-wrap: anywhere; }
.table-scroll { overflow-x:auto; max-width:100%; margin:1.25rem 0 1.5rem; }
.table-scroll table { margin:0; min-width:32rem; }
pre { max-width:100%; white-space:pre-wrap; overflow-wrap:anywhere; }
.skip-link { position:absolute; left:-9999px; }
.skip-link:focus { position:static; display:block; padding:1rem; }
:focus-visible { outline:3px solid #9a3f16; outline-offset:3px; }
.release-state { font:0.8rem -apple-system, sans-serif; color:var(--muted); margin-bottom:1rem; }
@media print { .table-scroll { overflow:visible; } .table-scroll table { min-width:0; } }
