/* GoblinGame design tokens (spec section 6). The only place colours, fonts and sizes are defined.
   Dark theme only in v1. Contrast of the text/background pairs is checked in docs/contrast.md. */
:root {
    /* Surfaces */
    --bg: #15110d;            /* page background, dark oak */
    --panel: #211a13;         /* cards and panels */
    --panel-raised: #2b2219;  /* sheets, dialogs, hover */
    --border: #5e4a2c;        /* bronze borders, 1 px (decorative) */
    --border-strong: #866b44; /* input and control outlines; 3:1 against every surface */

    /* Text */
    --text: #eadfc6;          /* parchment body text */
    --text-muted: #a8997a;    /* labels, secondary text */

    /* Accents and money */
    --gold: #d9a93f;
    --silver: #b9c0c7;
    --copper: #b87245;
    --up: #63b35c;
    --down: #da6a50;          /* spec had #cf5a41, lightened to pass AA on panels */
    --focus: #7fc8d8;
    --on-gold: #1a1208;       /* text on gold buttons */

    /* Materials (bold pass): oak, iron, struck gold, parchment and sealing wax. Ornament and chrome only;
       data surfaces stay on --bg / --panel / --panel-raised. Text pairs are in docs/contrast.md. */
    --oak-deep: #0e0b08;      /* deepest oak: footer band, recessed wells */
    --iron: #2e2a26;          /* iron straps, bottom bar plate */
    --iron-dark: #1b1815;     /* iron shadow side */
    --iron-hi: #57514a;       /* iron edge highlight */
    --rivet: #8a7656;         /* rivet heads (decorative) */
    --gold-hi: #f2cf7a;       /* struck-gold highlight, engraved title glint */
    --gold-deep: #8a6a24;     /* gold shadow side, coin rims */
    --gold-mid: #b8892c;      /* lower half of a gold button */
    --bronze-hi: #b08a52;     /* bronze highlight on frames */
    --wax: #8f2b22;           /* sealing wax red: ornament, numerals on parchment */
    --oak-hi: #2a1f14;        /* lit oak: signboard, plinth tops */
    --oak-mid: #1a130c;       /* oak in shadow */
    --oak-edge: #3d2f1c;      /* cut edge of an oak block */
    --oak-plinth: #3b2c1b;    /* podium plinth face */
    --oak-floor: #090705;     /* footer floor, darkest */
    --iron-lit: #3a342d;      /* iron under the hover lamp */
    --iron-band: #2a2520;     /* top of the header band */
    --iron-black: #131110;    /* bottom of the iron bands */
    --gold-hover: #e6bb5c;    /* gold button hover */
    --gold-glint: #f8dc95;    /* gold button hover highlight */
    --gold-press: #c4952f;    /* gold button pressed */
    --down-hi: #ee9a83;       /* sell button lit face */
    --down-lo: #cc674c;       /* sell button lower face (on-gold text 4.95:1) */
    --down-edge: #8a3a28;
    --down-ring: #6b2a1c;
    --up-ring: #2f5a2b;
    --wax-hi: #b8453a;
    --wax-deep: #5e1a14;
    --parchment: #e8dab8;     /* parchment sheet (landing ledger page) */
    --ink: #2b1e10;           /* text on parchment */

    /* Coin faces: a lit upper-left face over the base metal, a darker rim. Plain discs, no game icons. */
    --coin-gold: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 55%, var(--gold-deep) 100%);
    --coin-silver: radial-gradient(circle at 35% 30%, #eef1f4, var(--silver) 55%, #6f777f 100%);
    --coin-copper: radial-gradient(circle at 35% 30%, #e0a07a, var(--copper) 55%, #6e3f22 100%);

    /* Depth: offset, soft-blur shadows plus a thin top highlight for metal and wood edges. */
    --edge-hi: inset 0 1px 0 rgba(242, 207, 122, 0.07);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.45), 0 6px 16px -6px rgba(0, 0, 0, 0.6);
    --shadow-2: 0 4px 10px rgba(0, 0, 0, 0.45), 0 18px 40px -12px rgba(0, 0, 0, 0.75);
    --well: inset 0 2px 5px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.25);

    /* Textures: CSS gradients and one tiny inline SVG noise tile, no image files. */
    --tex-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
    --tex-grain:
        repeating-linear-gradient(90deg, rgba(255, 236, 200, 0.018) 0 1px, transparent 1px 5px, rgba(0, 0, 0, 0.05) 5px 6px, transparent 6px 11px),
        repeating-linear-gradient(90deg, transparent 0 277px, rgba(0, 0, 0, 0.4) 277px 279px, rgba(255, 230, 180, 0.035) 279px 280px);
    /* Engraved flourish: a lozenge with a short tail, the left cap of every ornamental rule. */
    --orn-lozenge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='14' viewBox='0 0 34 14'%3E%3Cpath d='M7 1 13 7 7 13 1 7Z' fill='%23d9a93f'/%3E%3Cpath d='M7 4.2 9.8 7 7 9.8 4.2 7Z' fill='%2315110d'/%3E%3Cpath d='M14 7h20' stroke='%23d9a93f' stroke-width='1.4'/%3E%3Ccircle cx='18' cy='7' r='1.6' fill='%23d9a93f'/%3E%3C/svg%3E");
    /* Centred flourish for the footer and empty states: two lozenges and a coin. */
    --orn-centre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16' viewBox='0 0 120 16'%3E%3Cpath d='M0 8h44M76 8h44' stroke='%235e4a2c' stroke-width='1'/%3E%3Cpath d='M46 8 50 4 54 8 50 12Z M66 8 70 4 74 8 70 12Z' fill='%23866b44'/%3E%3Ccircle cx='60' cy='8' r='5' fill='%23d9a93f' stroke='%238a6a24' stroke-width='1.2'/%3E%3Ccircle cx='60' cy='8' r='2.6' fill='none' stroke='%238a6a24' stroke-width='0.8'/%3E%3C/svg%3E");
    /* An open ledger with no entries yet, for empty states. */
    --orn-ledger: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='52' viewBox='0 0 72 52' fill='none' stroke-linejoin='round'%3E%3Cpath d='M4 10 34 6v40L4 50Z' fill='%23211a13' stroke='%23866b44' stroke-width='2'/%3E%3Cpath d='M38 6l30 4v40l-30-4Z' fill='%23211a13' stroke='%23866b44' stroke-width='2'/%3E%3Cpath d='M10 18l18-2.4M10 25l18-2.4M10 32l12-1.6M44 15.6l18 2.4M44 22.6l18 2.4' stroke='%235e4a2c' stroke-width='1.4' stroke-linecap='round'/%3E%3Ccircle cx='54' cy='37' r='6' fill='%238f2b22'/%3E%3Ccircle cx='54' cy='37' r='3.4' fill='none' stroke='%23e8dab8' stroke-opacity='0.35' stroke-width='0.9'/%3E%3C/svg%3E");

    /* Categorical series (net worth race): fixed order, never cycled. Validated on --panel (dataviz validator:
       lightness band, chroma, adjacent CVD ΔE ≥ 8.4, normal-vision ΔE ≥ 19.3, all ≥ 3:1). Lines cross, so every
       series also gets a dash style and a legend label; colour is never the only signal. See docs/contrast.md. */
    --series-1: #3987e5;      /* blue */
    --series-2: #d95926;      /* orange */
    --series-3: #199e70;      /* aqua */
    --series-4: #c98500;      /* yellow */
    --series-5: #d55181;      /* magenta */
    --series-6: #9085e9;      /* violet */
    --series-7: #e66767;      /* red */
    --series-8: #008300;      /* green */
    --series-other: #7d7059;  /* players beyond eight: thin, muted */

    /* Type */
    --font-heading: "Cinzel", "Trajan Pro", Georgia, serif;
    --font-body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
    --fs-xs: 0.8125rem;
    --fs-sm: 0.9375rem;
    --fs-md: 1.0625rem;
    --fs-lg: 1.25rem;
    --fs-xl: 1.75rem;
    --fs-xxl: 2.5rem;

    /* Space, shape, layout */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2.5rem;
    --radius: 4px;
    --touch: 44px;            /* minimum touch target */
    --content-max: 1200px;
    --header-h: 56px;
    --bottom-nav-h: 60px;
    --nav-breakpoint: 900px;  /* documentation only; media queries repeat the value */
}
