/* selfhostedvoice.com: independent guide site. Palette is a cousin of SILOD's
   navy/gold/cream (deep blue-slate + cream headings + gold details), with its
   own teal accent so it doesn't read as a SILOD sales page. */
:root {
  color-scheme: dark;
  --bg: #0c1820;         /* page background */
  --surface: #12232e;    /* cards */
  --surface-2: #173040;  /* card header hover, table head */
  --line: #2a4554;       /* borders, dividers */
  --text: #e8ede9;       /* body text */
  --heading: #f3ead7;    /* headings (SILOD cream) */
  --muted: #a9b7bc;      /* meta, captions, sources */
  --accent: #6fd3c1;     /* links, focus, chevrons */
  --gold: #e2b657;       /* disclosure edge, TOC numbers (SILOD gold) */
  --gold-tint: #1d2a24;  /* disclosure background */
  --code-bg: #0a141b;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: radial-gradient(ellipse 70% 38% at 88% -6%, rgba(111, 211, 193, 0.08), transparent 60%), var(--bg);
  color: var(--text);
  font: 1.0625rem/1.62 var(--sans);
}
.wrap { width: min(820px, calc(100% - 2rem)); margin: 0 auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--heading); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: .5rem; z-index: 9; background: var(--surface); padding: .4rem .8rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(12, 24, 32, 0.93); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--heading); text-decoration: none; font-family: var(--serif); font-size: 1.12rem; letter-spacing: .04em; }
.mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--accent) 0 50%, var(--gold) 50% 100%); box-shadow: inset 0 0 0 3px var(--bg); border: 1px solid var(--line); }
.site-header nav { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.site-header nav a { color: var(--text); text-decoration: none; font-size: .92rem; }
.site-header nav a:hover { color: var(--accent); }

/* disclosure: always visible at the top */
.disclosure { margin: 1.5rem 0 0; padding: .8rem 1rem; background: var(--gold-tint); border: 1px solid #4a4530; border-left: 3px solid var(--gold); border-radius: 10px; font-size: .92rem; color: var(--text); }
.disclosure p { margin: .2rem 0; }
.disclosure strong { color: var(--heading); }

/* intro */
.intro h1 { margin: 2rem 0 .8rem; font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -0.015em; color: var(--heading); max-width: 22ch; }
.intro .meta { color: var(--muted); font-size: .9rem; margin: 0 0 1.2rem; padding-left: .8rem; border-left: 2px solid var(--line); }
.intro p { max-width: 66ch; }
.intro strong { color: var(--heading); }

/* table of contents */
.toc { margin: 1.6rem 0 1rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc-label { margin: 0 0 .5rem; color: var(--gold); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; columns: 2; column-gap: 1.5rem; }
.toc li { counter-increment: toc; break-inside: avoid; padding: .18rem 0; font-size: .95rem; }
.toc li::before { content: counter(toc, decimal-leading-zero); color: var(--gold); font-family: var(--serif); font-size: .85rem; margin-right: .55rem; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

.expand-all { display: flex; justify-content: flex-end; gap: .5rem; margin: .6rem 0 .6rem; }
.expand-all button, a.btn-secondary { appearance: none; font: inherit; font-size: .85rem; color: var(--accent); background: transparent; border: 1px solid var(--accent); border-radius: 999px; padding: .32rem .85rem; cursor: pointer; text-decoration: none; display: inline-block; }
.expand-all button:hover, a.btn-secondary:hover { background: rgba(111, 211, 193, 0.12); color: var(--heading); }

/* section cards */
.card { margin: .75rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
section.card { padding: .4rem 1.25rem 1rem; }
details.card > .card-body { padding: 0 1.25rem 1.1rem; border-top: 1px solid var(--line); }
details.card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.25rem; border-radius: var(--radius); }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary:hover { background: var(--surface-2); }
details.card[open] > summary { border-radius: var(--radius) var(--radius) 0 0; }
.card h2 { margin: .5rem 0; font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 2.6vw, 1.6rem); line-height: 1.25; color: var(--heading); }
summary h2 { margin: 0; }
.chev { flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border: 1px solid var(--line); border-radius: 50%; position: relative; }
.chev::before { content: ""; position: absolute; left: 50%; top: 45%; width: .5rem; height: .5rem; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: translate(-50%, -50%) rotate(45deg); transition: transform .15s; }
details[open] > summary .chev::before { transform: translate(-50%, -20%) rotate(-135deg); }
.card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; color: var(--heading); margin: 1.3rem 0 .4rem; }
.card strong { color: var(--heading); }
.card ul, .card ol { padding-left: 1.3rem; }
.card li { margin: .3rem 0; }
.card li::marker { color: var(--gold); }

/* tables */
table { border-collapse: collapse; width: 100%; font-size: .9rem; margin: .8rem 0 .4rem; display: block; overflow-x: auto; }
th, td { border-bottom: 1px solid var(--line); padding: .55rem .65rem; text-align: left; vertical-align: top; }
th { background: var(--surface-2); color: var(--heading); font-weight: 600; }
tr > td:first-child { color: var(--heading); font-weight: 600; }

code { font-family: var(--mono); font-size: .86em; background: var(--code-bg); border: 1px solid var(--line); border-radius: 5px; padding: .05rem .3rem; }
pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: .85rem 1rem; overflow-x: auto; line-height: 1.45; }
pre code { background: none; border: 0; padding: 0; }

/* sources */
.sources { margin: 2rem 0 0; padding: 1rem 1.25rem; border: 1px dashed var(--line); border-radius: var(--radius); font-size: .86rem; color: var(--muted); }
.sources h3 { margin: 0 0 .5rem; color: var(--gold); font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.sources ul { margin: 0; padding-left: 1.1rem; }
.sources li { margin-bottom: .3rem; word-break: break-word; }

/* index */
.plain section.card { background: transparent; border: 0; padding: 0; }
.guide-cards { list-style: none; padding: 0 !important; display: grid; gap: .8rem; }
.guide-cards li { margin: 0; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); color: var(--muted); }
.guide-cards li a { font-family: var(--serif); font-size: 1.2rem; color: var(--heading); text-decoration: none; }
.guide-cards li a:hover { color: var(--accent); text-decoration: underline; }
.index-about { margin-top: 1.4rem; }

.site-footer { margin-top: 3rem; border-top: 1px solid var(--line); padding: 1.6rem 0 2.4rem; color: var(--muted); font-size: .88rem; }

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .site-header { position: static; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: .35rem; padding: .65rem 0 .75rem; }
  .toc ol { columns: 1; }
  details.card > summary { padding: .75rem 1rem; }
  details.card > .card-body, section.card { padding-left: 1rem; padding-right: 1rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .chev::before { transition: none; } }

/* "Made by us" callout: distinct but quiet; gold label, teal edge */
.callout { margin: 1.4rem 0 1rem; padding: 1rem 1.25rem 1.05rem; border-radius: var(--radius); border: 1px solid #3b5a5a; border-left: 3px solid var(--accent); background: linear-gradient(115deg, rgba(111, 211, 193, 0.10), transparent 55%), var(--surface); max-width: none; }
.callout p { margin: .25rem 0; max-width: 70ch; }
.callout-label { color: var(--gold); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.callout-title { font-family: var(--serif); font-size: 1.3rem; line-height: 1.3; color: var(--heading); }
.callout a { font-weight: 600; }
.callout a::after { content: " \2192"; }
