/* InspectAI — Demo Report stylesheet (v2 editorial)
   Replaces the inherited dark-theme stylesheet with the v2 paper system.
   The report template references variables and classes that are defined here,
   so changing them propagates to every rendered finding, card, and section. */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Paper palette */
    --bg-primary: #FAF7F1;
    --bg-secondary: #FDFBF6;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FDFBF6;
    --border: #E8E2D6;
    --border-light: #F1ECE2;

    /* Ink */
    --text-primary: #1A1A1A;
    --text-secondary: #5C544A;
    --text-muted: #9C928A;

    /* Accent — amber (carried through the brand) */
    --accent: #D97706;
    --accent-light: #F59E0B;
    --accent-glow: rgba(217, 119, 6, 0.18);

    /* Severity */
    --severity-critical: #B91C1C;
    --severity-major: #C2410C;
    --severity-minor: #A16207;
    --severity-info: #1D4ED8;

    /* Type */
    --serif: 'Fraunces', 'Tiempos Headline', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'Menlo', monospace;

    /* Spacing */
    --gutter: clamp(1.25rem, 4vw, 2rem);
    --shadow-card: 0 1px 2px rgba(31,27,22,0.04), 0 8px 24px rgba(31,27,22,0.05);
    --shadow-elevated: 0 2px 6px rgba(31,27,22,0.06), 0 16px 40px rgba(31,27,22,0.08);
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    font-size: 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.012em;
    line-height: 1.2;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 400; font-variation-settings: "opsz" 144, "SOFT" 30; letter-spacing: -0.022em; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); }
h4 { font-size: 17px; }

/* ── Top nav ─────────────────────────────────────────────── */
.topnav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(250, 247, 241, 0.92);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 16px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.topnav .nav-left { flex: 1; min-width: 0; }
.topnav .nav-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topnav .logo {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 19px;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ── Container ───────────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ── Card ────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.card:hover {
    border-color: var(--text-muted);
    box-shadow: var(--shadow-elevated);
}

/* ── Grid utilities ──────────────────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (max-width: 800px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* ── Stats bar (editorial treatment) ─────────────────────── */
.stats-bar {
    display: flex;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    flex-wrap: wrap;
    padding: 28px 32px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
}
.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.stat-value {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1;
    font-variation-settings: "opsz" 144, "SOFT" 30;
}
.stat-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Buttons + form bases ────────────────────────────────── */
button { font-family: var(--sans); cursor: pointer; }
input, select, textarea { font-family: var(--sans); }

/* ── Print mode (severity backgrounds preserved inline by template) ── */
@media print {
    body { background: #fff !important; color: #1A1A1A !important; }
    a[href]:after { content: none; }
}
