@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ═══════════════════════════════════════════════════════════════
   DAVIDS ASSISTANT · "GREENLINE" DESIGN SYSTEM

   Idea: a clean operations board for a Discord community. Flat ink
   surfaces, hairline rules instead of boxes, one signal-green accent,
   monospaced labels, squared corners. No gradients, no glass.

   Dark ("night board") is the default. Light ("paper board") is
   switched on with <html data-theme="light"> (theme.js).
   Every colour used by a page comes from the tokens below.
═══════════════════════════════════════════════════════════════ */
:root {
    color-scheme: dark;

    /* type */
    --font-body:    'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-head:    'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: var(--font-head);
    --font-mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

    /* surfaces: warm near-black, each step only a few points lighter */
    --bg-base:      #0B0F0D;
    --bg-raised:    #101612;
    --bg-surface:   #151D18;
    --bg-overlay:   #1C2720;
    --bg-muted:     #2C3B32;
    --input-bg:     #080C0A;

    /* accent: signal amber (the colour of a departure board) */
    --accent:       #2FD07B;
    --accent-mid:   #4AE395;                 /* hover */
    --accent-light: #9BF2C4;
    --accent-text:  #58E39A;                 /* accent used as TEXT */
    --accent-2:     #2BB873;
    --accent-rgb:   47, 208, 123;
    --accent-glow:  rgba(47, 208, 123, 0.30);
    --accent-tint:  rgba(47, 208, 123, 0.12);
    --on-accent:    #07100B;                 /* text on a filled accent */

    /* text (all pass 4.5:1 on --bg-base) */
    --text-bright:  #EAF5ED;
    --text-main:    #C7D6CC;
    --text-muted:   #91A89A;
    --text-faint:   #768B7E;

    /* rules */
    --border:        rgba(234, 245, 237, 0.12);
    --border-soft:   rgba(234, 245, 237, 0.07);
    --border-strong: rgba(234, 245, 237, 0.24);
    --border-focus:  #58E39A;
    --ink-rgb:       234, 245, 237;
    --shade-rgb:     0, 0, 0;

    /* status: signal colours */
    --ok:           #7BE0A8;
    --warning:      #E8C45A;
    --danger:       #FF7B72;
    --ok-rgb:       123, 224, 168;
    --warning-rgb:  232, 196, 90;
    --danger-rgb:   255, 123, 114;
    --success:      var(--ok);
    --success-tint: rgba(var(--ok-rgb), 0.12);
    --warning-tint: rgba(var(--warning-rgb), 0.12);
    --danger-tint:  rgba(var(--danger-rgb), 0.12);
    --info:         var(--accent-text);
    --info-tint:    var(--accent-tint);
    --orange:       #2BB873;

    /* console / chat viewer: dark in both modes */
    --console-bg:     #080C0A;
    --console-text:   #DCEBE1;
    --console-sent:   #58E39A;
    --console-border: rgba(234, 245, 237, 0.14);
    /* inventory slots */
    --slot-bg:        #18211B;
    --slot-bg-has:    #223028;
    --slot-border:    rgba(234, 245, 237, 0.12);

    /* shape: near-square, like signage */
    --r-sm: 2px;
    --r-md: 3px;
    --r-lg: 4px;
    --r-xl: 6px;

    /* spacing scale (4px base) */
    --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
    --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;

    --sidebar-w: 220px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --transition: 0.16s var(--ease);
    --transition-slow: 0.28s var(--ease);
    --shadow-soft: none;
    --shadow-lift: 0 12px 32px rgba(0, 0, 0, 0.55);

    /* legacy alias support: older page styles reference these names */
    --bg-main:      var(--bg-base);
    --bg-card:      var(--bg-surface);
    --bg-sidebar:   var(--bg-raised);
    --accent-hover: var(--accent-mid);
    --green:        var(--success);
    --yellow:       var(--warning);
    --red:          var(--danger);
}

/* ── light: paper timetable ── */
:root[data-theme="light"] {
    color-scheme: light;

    --bg-base:      #EDF3EE;
    --bg-raised:    #F5FAF6;
    --bg-surface:   #FAFCFA;
    --bg-overlay:   #E2EBE4;
    --bg-muted:     #CFDBD2;
    --input-bg:     #FAFCFA;

    --accent:       #0F8A4F;
    --accent-mid:   #14A861;
    --accent-light: #7BDCA6;
    --accent-text:  #0A6B3C;
    --accent-2:     #167A4A;
    --accent-rgb:   15, 138, 79;
    --accent-glow:  rgba(15, 138, 79, 0.25);
    --accent-tint:  rgba(15, 138, 79, 0.11);
    --on-accent:    #F4FFF8;

    --text-bright:  #0D1811;
    --text-main:    #26342B;
    --text-muted:   #53685A;
    --text-faint:   #66796C;

    --border:        rgba(13, 24, 17, 0.16);
    --border-soft:   rgba(13, 24, 17, 0.09);
    --border-strong: rgba(13, 24, 17, 0.34);
    --border-focus:  #0A6B3C;
    --ink-rgb:       13, 24, 17;
    --shade-rgb:     13, 24, 17;

    --ok:           #11663A;
    --warning:      #735600;
    --danger:       #A82A22;
    --ok-rgb:       17, 102, 58;
    --warning-rgb:  115, 86, 0;
    --danger-rgb:   168, 42, 34;
    --orange:       #0A6B3C;

    --console-border: rgba(13, 24, 17, 0.4);
    --slot-bg:        #CFDBD2;
    --slot-bg-has:    #E2EBE4;
    --slot-border:    rgba(13, 24, 17, 0.2);

    --shadow-lift: 0 12px 28px rgba(21, 19, 15, 0.18);
}

/* ═══════════════ reset + base ═══════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-main);
    display: block;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    line-height: 1.55;
    font-feature-settings: "tnum" 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text-bright);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.01em;
}

a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--text-bright); }

code, kbd, samp, pre { font-family: var(--font-mono); font-size: .92em; }
code { background: rgba(var(--ink-rgb), .07); padding: 1px 5px; border-radius: var(--r-sm); }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-5) 0; }

img { max-width: 100%; }

.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* skip link, shown on keyboard focus */
.skip {
    position: absolute; left: var(--s-3); top: -60px; z-index: 100;
    background: var(--accent); color: var(--on-accent); padding: 10px 16px; font-weight: 600; text-decoration: none;
    transition: top .15s;
}
.skip:focus { top: var(--s-3); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}


/* ═══════════════ theme switch (button added by theme.js) ═══════════════ */
button.theme-toggle {
    flex: none; margin: 0; padding: 0; width: 36px; height: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center;
    background: transparent !important; color: var(--text-muted) !important; border: 1px solid var(--border) !important; border-radius: var(--r-sm) !important; cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
}
button.theme-toggle:hover { color: var(--text-bright) !important; border-color: var(--border-strong) !important; background: transparent !important; }
button.theme-toggle svg { width: 18px; height: 18px; display: block; }
button.theme-toggle.floating { position: fixed; right: 16px; bottom: 16px; z-index: 60; background: var(--bg-surface) !important; }
