/* FairGap — compliance/HR. Cream legal-pad surface, navy text, classical serifs,
   document feel with thin top rule and roman numerals. Personas 8 + 10. */
/* Design review: Annika Fjölnirsdóttir-Choi. Brief: trade Georgia for a real serif stack,
   oldstyle figures + small caps, fix the toc list rendering, refactor the !important. */

:root[data-site="fairgap"] {
    --fg-bg: #fcf8ee;
    --fg-surface: #ffffff;
    --fg-fg: #0f172a;
    --fg-muted: #475569;
    --fg-accent: #1e3a8a;
    --fg-accent-2: #b45309;
    --fg-rule: #d6cdb1;
    /* Annika: ui-serif first so modern browsers hand us their flagship serif (NY on Apple,
       Cambria on Windows). Charter/Iowan/Iowan-Old-Style cover the rest. */
    --fg-serif: ui-serif, "Charter", "Iowan Old Style", "Hoefler Text", "Baskerville", Georgia, "Times New Roman", serif;
    --fg-sans: "Inter", -apple-system, system-ui, sans-serif;
}
html[data-site="fairgap"], body { background: var(--fg-bg); color: var(--fg-fg); }
body {
    font-family: var(--fg-serif); line-height: 1.65; margin: 0;
    -webkit-font-smoothing: antialiased;
    /* Oldstyle figures + true small caps where the serif supports them. */
    font-feature-settings: "kern", "liga", "onum", "smcp";
    background-image: linear-gradient(transparent 30px, rgba(180,170,135,.18) 30px, rgba(180,170,135,.18) 31px, transparent 31px);
    background-size: 100% 32px;
}

.fg-container { max-width: 940px; margin: 0 auto; padding: 0 1.5rem; }

/* Annika: both rules 1.5 px so the double looks deliberate, not "one heavy one light". */
.fg-header {
    background: var(--fg-bg);
    border-top: 1.5px solid var(--fg-accent);
    border-bottom: 1.5px solid var(--fg-accent);
    box-shadow: inset 0 -4px 0 0 var(--fg-bg), inset 0 -5.5px 0 0 var(--fg-accent);
    padding: 1rem 0;
}
.fg-header .fg-container { display: flex; justify-content: space-between; align-items: baseline; }
.fg-brand {
    font-family: var(--fg-serif); font-size: 1.55rem;
    color: var(--fg-accent); text-decoration: none; letter-spacing: -.005em;
    font-weight: 600;
}
.fg-brand sup { color: var(--fg-accent-2); font-size: .55em; vertical-align: super; }

.fg-nav { font-family: var(--fg-sans); font-size: .85rem; }
.fg-nav a {
    color: var(--fg-muted); text-decoration: none; margin-left: 1.25rem;
    text-transform: uppercase; letter-spacing: .1em; font-weight: 500;
    padding: .35rem .15rem;
    transition: color .12s ease;
}
.fg-nav a:hover { color: var(--fg-accent); }
.fg-nav a:focus-visible { outline: 2px solid var(--fg-accent); outline-offset: 4px; }

/* Annika: refactor the !important. Specificity wins. */
.fg-nav a.fg-cta {
    background: var(--fg-accent); color: #fff;
    padding: .45rem 1rem; border-radius: 2px;
    text-transform: none; letter-spacing: 0;
}
.fg-nav a.fg-cta:hover { background: #1e2f6e; color: #fff; }

.fg-main { padding: 0; }
.fg-hero { padding: 4rem 0 2.5rem; max-width: 740px; margin: 0 auto; }
.fg-eyebrow {
    font-family: var(--fg-sans);
    text-transform: uppercase; letter-spacing: .16em;
    font-size: .72rem; font-weight: 600;
    color: var(--fg-accent-2);
    margin: 0 0 1rem;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; margin: 0 0 1rem; letter-spacing: -.01em; }
h1 em { color: var(--fg-accent); font-style: italic; }
h2 { font-family: var(--fg-serif); font-weight: 600; }

.fg-lede { color: var(--fg-muted); font-size: 1.15rem; max-width: 60ch; }
.fg-lede-numerals { font-variant-numeric: lining-nums; }

.fg-actions { display: flex; gap: .75rem; margin-top: 1.75rem; flex-wrap: wrap; font-family: var(--fg-sans); }
.fg-btn {
    display: inline-block; padding: .8rem 1.5rem;
    border-radius: 2px; text-decoration: none; font-weight: 600;
    border: 1.5px solid transparent;
    transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.fg-btn-primary { background: var(--fg-accent); color: #fff; border-color: var(--fg-accent); }
.fg-btn-primary:hover { background: #1e2f6e; border-color: #1e2f6e; }
.fg-btn-ghost { color: var(--fg-accent); border-color: var(--fg-accent); }
.fg-btn-ghost:hover { background: var(--fg-accent); color: #fff; }
.fg-btn:focus-visible { outline: 2px solid var(--fg-accent); outline-offset: 3px; }

.fg-doc { padding: 2rem 0 5rem; }
.fg-doc h2 {
    font-size: 1.5rem; margin: 2rem 0 1.25rem; color: var(--fg-accent);
    border-bottom: 1px solid var(--fg-rule);
    padding-bottom: .5rem;
    letter-spacing: -.005em;
}

/* TOC — Annika: lower-roman *outside* with explicit indentation so the text doesn't wrap under the numeral. */
.fg-toc {
    list-style: lower-roman outside;
    padding: 0 0 0 2.5rem;
    margin: 0;
}
.fg-toc li {
    padding: .85rem 0;
    border-bottom: 1px dashed var(--fg-rule);
    color: var(--fg-muted);
}
.fg-toc li strong { color: var(--fg-fg); }
.fg-toc li::marker {
    color: var(--fg-accent-2);
    font-variant-numeric: oldstyle-nums;
    font-weight: 600;
}

::selection { background: rgba(30,58,138,.22); color: var(--fg-fg); }

.fg-footer {
    padding: 2rem 0 3rem; color: var(--fg-muted);
    font-family: var(--fg-sans); font-size: .85rem;
    border-top: 1.5px solid var(--fg-rule);
    margin-top: 2rem;
}
.fg-footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.fg-footer a { color: var(--fg-muted); text-decoration: none; }
.fg-footer a:hover { color: var(--fg-accent); }

.skip-to-content {
    position: absolute; left: -9999px;
    background: var(--fg-accent); color: #fff;
    padding: .5rem 1rem; border-radius: 2px;
    font-family: var(--fg-sans); font-weight: 600; z-index: 1000;
}
.skip-to-content:focus { left: 1rem; top: 1rem; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
