/* Dataroom - warm paper, oxblood red and letterpress type, adapted from the
   dataroom theme (~/theme/dataroom-theme.css) that themes every application
   on the author's machines. Loaded after app.css, only when the account
   selects it.

   A palette theme: tokens plus a handful of selectors that follow from the
   palette (condensed headings, letterpress body text, primary-button ink).
   It does not touch the layout.

   Token layering repeats app.css's four states, one specificity step higher so
   a theme's dark tokens beat the base theme's dark tokens regardless of file
   order.

   Two deliberate deviations from the source palette, both for the 4.5:1
   text/muted contrast bar every built-in theme is held to: the muted greys
   are darkened in light mode (#595546 for #6b6759) and lightened in dark
   mode (#bcb08f for #aa9d7e), because the source greys fall below 4.5:1 on
   the deeper surfaces. Everything else is the source values verbatim. */

/* ---------- Tokens: light (paper) ---------- */
:root[data-theme="dataroom"]{
    color-scheme:light;
    --font-body:'EB Garamond',Georgia,'Times New Roman',serif;
    --font-features:normal;
    --bg:#f2ece2;
    --bg-grad:none;
    --surface:#f2ece2;
    --surface-2:#e2d5bf;
    --surface-3:#d2cec0;
    --text:#12161c;
    --text-soft:#283241;
    --muted:#595546;
    --line:rgba(0,0,0,.2);
    --line-strong:#6b6759;
    --accent:#9f1113;
    --accent-strong:#b00002;
    --accent-soft:rgba(159,17,19,.1);
    --accent-grad:#9f1113;
    --accent-shadow:transparent;
    --like:#9f1113;
    --like-soft:rgba(159,17,19,.1);
    --boost:#117a11;
    --boost-soft:rgba(17,122,17,.12);
    --mention:#1a1a8a;
    --mention-soft:rgba(26,26,138,.12);
    --danger:#9f1113;
    --shadow:0.5px 0.5px 0 rgba(0,0,0,.4),-0.5px -0.5px 0 rgba(255,255,255,1);
    --shadow-md:0.5px 0.5px 0 rgba(0,0,0,.4),-0.5px -0.5px 0 rgba(255,255,255,1);
    --shadow-lg:inset 0.5px 0.5px 1px rgba(0,0,0,.2),inset -0.5px -0.5px 3px 1px rgba(255,255,255,.6);
    --radius:4px;
    --radius-sm:3px;
    --radius-lg:6px;
}

/* ---------- Tokens: dark ---------- */
@media(prefers-color-scheme:dark){
    :root[data-theme="dataroom"][data-appearance="auto"],:root[data-theme="dataroom"]:not([data-appearance]){
        color-scheme:dark;
        --bg:#1b1c25;
        --bg-grad:none;
        --surface:#1b1c25;
        --surface-2:#22242f;
        --surface-3:#3b3d51;
        --text:#e5c7a9;
        --text-soft:#ffe6bd;
        --muted:#bcb08f;
        --line:rgba(229,199,169,.35);
        --line-strong:#aa9d7e;
        --accent:#e5c7a9;
        --accent-strong:#ffe6bd;
        --accent-soft:rgba(229,199,169,.14);
        --accent-grad:#e5c7a9;
        --accent-shadow:transparent;
        --like:#e2d5c0;
        --like-soft:rgba(226,213,192,.14);
        --boost:#c9d9c9;
        --boost-soft:rgba(201,217,201,.14);
        --mention:#c9c9d9;
        --mention-soft:rgba(201,201,217,.14);
        --danger:#e2d5c0;
        --shadow:0.5px 0.5px 0 rgba(0,0,0,.6),-0.5px -0.5px 0 rgba(255,255,255,.12);
        --shadow-md:0.5px 0.5px 0 rgba(0,0,0,.6),-0.5px -0.5px 0 rgba(255,255,255,.12);
        --shadow-lg:inset 0.5px 0.5px 1px rgba(0,0,0,.5),inset -0.5px -0.5px 3px 1px rgba(255,255,255,.1);
    }
}
/* Explicit dark: the same tokens with no media query. Vanilla CSS cannot reuse
   an @media block from a plain selector and this project has no build step;
   keep the two copies in sync rather than adding one. */
:root[data-theme="dataroom"][data-appearance="dark"],:root[data-theme="dataroom"][data-appearance="black"]{
    color-scheme:dark;
    --bg:#1b1c25;
    --bg-grad:none;
    --surface:#1b1c25;
    --surface-2:#22242f;
    --surface-3:#3b3d51;
    --text:#e5c7a9;
    --text-soft:#ffe6bd;
    --muted:#bcb08f;
    --line:rgba(229,199,169,.35);
    --line-strong:#aa9d7e;
    --accent:#e5c7a9;
    --accent-strong:#ffe6bd;
    --accent-soft:rgba(229,199,169,.14);
    --accent-grad:#e5c7a9;
    --accent-shadow:transparent;
    --like:#e2d5c0;
    --like-soft:rgba(226,213,192,.14);
    --boost:#c9d9c9;
    --boost-soft:rgba(201,217,201,.14);
    --mention:#c9c9d9;
    --mention-soft:rgba(201,201,217,.14);
    --danger:#e2d5c0;
    --shadow:0.5px 0.5px 0 rgba(0,0,0,.6),-0.5px -0.5px 0 rgba(255,255,255,.12);
    --shadow-md:0.5px 0.5px 0 rgba(0,0,0,.6),-0.5px -0.5px 0 rgba(255,255,255,.12);
    --shadow-lg:inset 0.5px 0.5px 1px rgba(0,0,0,.5),inset -0.5px -0.5px 3px 1px rgba(255,255,255,.1);
}

/* ---------- Tokens: true black ---------- */
:root[data-theme="dataroom"][data-appearance="black"]{
    --bg:#050608;
    --surface:#050608;
    --surface-2:#1b1c25;
    --surface-3:#22242f;
}

/* ---------- The handful of selectors the palette implies ---------- */
/* Condensed display type for headings and the wordmark: the dataroom
   --font-header stack, falling back to whatever condensed face the system
   has. Body text keeps the serif from --font-body. */
[data-theme="dataroom"] h1,[data-theme="dataroom"] h2,[data-theme="dataroom"] h3,
[data-theme="dataroom"] .logo-wordmark,[data-theme="dataroom"] .timeline-nav a{
    font-family:'Roboto Condensed','Arial Narrow',sans-serif;font-weight:400}
[data-theme="dataroom"] body{text-shadow:-0.5px -0.5px 0 rgba(0,0,0,.4),0.5px 0.5px 0 rgba(255,255,255,.7)}
[data-theme="dataroom"] .status-body a,[data-theme="dataroom"] .profile-bio a,[data-theme="dataroom"] .status-quote-body a{color:var(--accent-strong)}
[data-theme="dataroom"] .status-body a:hover,[data-theme="dataroom"] .profile-bio a:hover{text-decoration:underline}
[data-theme="dataroom"] .btn-primary{background:var(--accent);color:#fff;box-shadow:none}
[data-theme="dataroom"] .btn-primary:hover{background:var(--accent-strong);filter:none;box-shadow:none;transform:none}
/* The dark accent is pale paper, so the primary button needs the ground as
   its ink instead of the white app.css assumes. */
@media(prefers-color-scheme:dark){
    :root[data-theme="dataroom"][data-appearance="auto"] .btn-primary,
    :root[data-theme="dataroom"]:not([data-appearance]) .btn-primary{color:#1b1c25}
}
:root[data-theme="dataroom"][data-appearance="dark"] .btn-primary,
:root[data-theme="dataroom"][data-appearance="black"] .btn-primary{color:#1b1c25}
[data-theme="dataroom"] .composer textarea{font-family:var(--font-body);font-size:1rem;line-height:1.6}
