/* Styles for the generated guide pages (tools/build_guides.mjs).
   Separate from style.css on purpose: these pages load none of the app, and
   the whole point is that they are readable HTML the moment they arrive. */

:root {
    --g-bg: #f6f2e9;
    --g-surface: #fffdf8;
    --g-ink: #23201a;
    --g-muted: #6b6355;
    --g-line: #ded5c4;
    --g-accent: #8a6a1f;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --g-bg: #16130e;
        --g-surface: #1f1b14;
        --g-ink: #ece5d7;
        --g-muted: #a29885;
        --g-line: #362f24;
        --g-accent: #c8a951;
    }
}
:root[data-theme="dark"] {
    --g-bg: #16130e;
    --g-surface: #1f1b14;
    --g-ink: #ece5d7;
    --g-muted: #a29885;
    --g-line: #362f24;
    --g-accent: #c8a951;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    padding: 1.6rem 1.25rem 3.5rem;
    background: var(--g-bg);
    color: var(--g-ink);
    font: 15px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
main, .g-head, .g-foot { max-width: 54rem; margin-inline: auto; }

.g-back {
    display: inline-block;
    margin-bottom: 1.2rem;
    color: var(--g-accent);
    font: 0.88rem/1 system-ui, sans-serif;
    text-decoration: none;
}
.g-back:hover { text-decoration: underline; }

h1 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.25;
}
.g-lede { margin: 0 0 1.4rem; color: var(--g-muted); font-size: 0.95rem; max-width: 46rem; }
.g-count { margin: 0 0 0.8rem; color: var(--g-muted); font-size: 0.87rem; }

/* Wide content scrolls inside its own box so the page body never does. */
.g-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--g-surface);
    font: 0.95rem/1.45 system-ui, sans-serif;
    display: block;
    overflow-x: auto;
}
.g-table thead th {
    position: sticky; top: 0;
    background: var(--g-surface);
    border-bottom: 2px solid var(--g-line);
    color: var(--g-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    padding: 0.6rem 0.75rem;
}
.g-table td, .g-table tbody th {
    border-bottom: 1px solid var(--g-line);
    padding: 0.55rem 0.75rem;
    text-align: left;
    font-weight: 400;
}
.g-table tbody th { font-weight: 600; }
.g-num { font-variant-numeric: tabular-nums; color: var(--g-muted); }
.g-gate, .g-nopin { color: var(--g-muted); font-size: 0.85em; }
.g-miss {
    display: inline-block;
    margin-left: 0.3rem;
    padding: 0.05rem 0.4rem;
    border-radius: 2px;
    background: #a3261d;
    color: #fff;
    font-size: 0.75rem;
}
.g-table a { color: var(--g-accent); }

.g-list { list-style: none; margin: 0 0 1.6rem; padding: 0;
          display: grid; gap: 0.4rem;
          grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.g-list li { display: flex; justify-content: space-between; gap: 0.5rem;
             padding: 0.5rem 0.7rem; border: 1px solid var(--g-line);
             background: var(--g-surface); }
.g-list a { color: var(--g-accent); font-weight: 600; text-decoration: none;
            font-family: system-ui, sans-serif; font-size: 0.95rem; }
.g-list a:hover { text-decoration: underline; }
.g-n { color: var(--g-muted); font: 0.85rem system-ui, sans-serif;
       font-variant-numeric: tabular-nums; }

h2 { margin: 1.7rem 0 0.6rem; font-size: 1rem; font-weight: 600;
     color: var(--g-muted); }

.g-foot { margin-top: 2.5rem; padding-top: 1.2rem;
          border-top: 1px solid var(--g-line);
          color: var(--g-muted); font: 0.88rem/1.6 system-ui, sans-serif; }
.g-foot a { color: var(--g-accent); }
.g-disclaimer { font-size: 0.8rem; }

a:focus-visible, .g-back:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }
