/* Hamilton Gazetteer — static export  */

:root {
    --text:      #1a1a1a;
    --bg:        #fafaf8;
    --accent:    #1d4ed8;
    --border:    #e2e2de;
    --muted:     #6b7280;
    --code-bg:   #f3f4f6;
    --th-bg:     #1e293b;
    --th-fg:     #f1f5f9;
    --stripe:    #f4f4f1;
    --header-bg: #1e293b;
    --header-fg: #cbd5e1;
    --max-w:     860px;
    --radius:    5px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 17px;
    line-height: 1.68;
    color: var(--text);
    background: var(--bg);
    margin: 0;
}

/* ── Header / breadcrumb ── */
.site-header {
    background: var(--header-bg);
    color: var(--header-fg);
    padding: 0.55rem 1.5rem;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.site-header a          { color: #93c5fd; text-decoration: none; }
.site-header a:hover    { text-decoration: underline; }
.site-header .sep       { color: #475569; }
.site-header .current   { color: #e2e8f0; font-weight: 600; }

/* ── Main content ── */
main {
    max-width: var(--max-w);
    margin: 2rem auto 5rem;
    padding: 0 1.5rem;
}

/* ── Typography ── */
h1, h2, h3, h4, h5 {
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: #0f172a;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}
h1 {
    font-size: 1.85rem;
    margin-top: 0.25rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.45rem;
}
h2 { font-size: 1.3rem;  border-bottom: 1px solid var(--border); padding-bottom: 0.2rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }

p  { margin: 0.75rem 0; }
li { margin: 0.25rem 0; }

a               { color: var(--accent); }
a:hover         { text-decoration: underline; }
a:visited       { color: #6d28d9; }

strong          { font-weight: 700; }
hr              { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── Tables ── */
table {
    width: 100%;
    border-collapse: collapse;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.88rem;
    margin: 1.25rem 0;
    overflow-x: auto;
    display: block;
}
thead th {
    background: var(--th-bg);
    color: var(--th-fg);
    text-align: left;
    padding: 0.5rem 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}
tbody td {
    padding: 0.42rem 0.8rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
tbody tr:nth-child(even) td { background: var(--stripe); }
tbody tr:hover td           { background: #eef2ff; }

/* ── Code ── */
code {
    font-family: 'SF Mono', 'Fira Code', Consolas, 'Liberation Mono', monospace;
    font-size: 0.84em;
    background: var(--code-bg);
    padding: 0.12em 0.35em;
    border-radius: 3px;
    color: #b91c1c;
}
pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.84rem;
    line-height: 1.55;
    margin: 1.25rem 0;
}
pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
    border-radius: 0;
}

/* ── Blockquotes (used for callout boxes) ── */
blockquote {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
    margin: 1.25rem 0;
    padding: 0.6rem 1rem 0.6rem 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #1e3a5f;
    font-style: normal;
}
blockquote p       { margin: 0.3rem 0; }
blockquote strong  { color: #1e40af; }

/* ── Entity type badge ── */
.entity-badge {
    display: inline-block;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.18em 0.55em;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 0.4rem;
}
.entity-person       { background: #dcfce7; color: #166534; }
.entity-organization { background: #dbeafe; color: #1e40af; }
.entity-place        { background: #fef9c3; color: #713f12; }

/* ── TOC (generated by toc extension) ── */
.toc {
    background: #f8f8f6;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.875rem;
}
.toc ul   { margin: 0.2rem 0; padding-left: 1.25rem; }
.toc li   { margin: 0.15rem 0; }
.toc a    { color: var(--accent); }

/* ── Disclaimer ── */
.disclaimer {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.78rem;
    color: var(--muted);
    background: #f8f8f6;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.45rem 0.75rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.disclaimer a { color: var(--muted); text-decoration: underline; }

/* ── Footer ── */
.site-footer {
    margin-top: 4rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
}

/* ── Print ── */
@media print {
    .site-header, .site-footer { display: none; }
    body { font-size: 11pt; background: white; }
    main { max-width: none; margin: 0; padding: 0; }
    a    { color: inherit; text-decoration: underline; }
    pre  { background: #f0f0f0; color: black; border: 1px solid #ccc; }
    pre code { color: black; }
}
