/* GCDL Insights. Colors and type follow brain/topics/brand-and-marketing-standards.md. */
:root {
  --slate-900: #0c263e; --slate-800: #1e3a55; --slate-600: #5a6e83; --slate-100: #e6eef6; --slate-50: #f1f8ff;
  --blue-600: #2f6ea5; --blue-700: #1b5586; --blue-800: #063f6a; --scrub-300: #8cb4da; --silver-300: #b8c2cc;
  --success: #2f7d5b; --warning: #a8652a; --danger: #8a3a65; --white: #fff;
  --text: var(--slate-900); --heading: var(--slate-800); --muted: var(--slate-600); --line: var(--slate-100);
  --surface: var(--white); --page: var(--slate-50); --accent: var(--blue-600);
  --font: 'Inter', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text: #e6eef6; --heading: #f1f8ff; --muted: #a9b8c7; --line: #2a4560; --surface: #12304b; --page: #0c263e; --accent: #8cb4da;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.6 var(--font); color: var(--text); background: var(--page); }
h1, h2, h3 { color: var(--heading); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1rem; }
a { color: var(--accent); }
.muted { color: var(--muted); font-size: .875rem; }
.hidden { display: none !important; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: var(--slate-800); color: var(--white); }
.topbar img { height: 32px; width: auto; display: block; }
.topbar .who { display: flex; align-items: center; gap: 12px; font-size: .875rem; flex-wrap: wrap; justify-content: flex-end; }
.topbar a, .topbar button.link { color: var(--white); }
main { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs button { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 16px; font: inherit; font-size: .875rem; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--blue-600); color: var(--white); border-color: var(--blue-600); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.tile .label { font-size: .8125rem; color: var(--muted); }
.tile .value { font-size: 1.75rem; font-weight: 600; color: var(--heading); font-variant-numeric: tabular-nums; }
.tile .note { font-size: .8125rem; color: var(--muted); }
.good { color: var(--success); } .warn { color: var(--warning); } .bad { color: var(--danger); }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
label { display: block; font-size: .875rem; font-weight: 600; color: var(--heading); margin-bottom: 4px; }
input, select { font: inherit; padding: 9px 12px; border: 1px solid var(--silver-300); border-radius: 6px; background: var(--surface); color: var(--text); min-width: 0; }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid var(--scrub-300); outline-offset: 1px; }
.field { margin-bottom: 14px; } .field input { width: 100%; }
.btn { display: inline-block; font: inherit; font-weight: 600; font-size: .9375rem; padding: 10px 18px; border-radius: 6px; border: 1px solid var(--blue-600); background: var(--blue-600); color: var(--white); cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: var(--blue-700); border-color: var(--blue-700); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: .8125rem; }
.btn:disabled { opacity: .6; cursor: default; }
button.link { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; color: var(--accent); }
.error { color: var(--danger); font-size: .875rem; margin: 8px 0; }
.ok { color: var(--success); font-size: .875rem; margin: 8px 0; }

table { width: 100%; border-collapse: collapse; font-size: .875rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8125rem; }
td.num, th.num { text-align: right; }
.table-wrap { overflow-x: auto; }
.bar { height: 10px; border-radius: 0 4px 4px 0; background: var(--blue-600); min-width: 2px; }

/* Column chart: one series, thin bars, hover tooltip. */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .grid { stroke: var(--line); }
.chart .col { fill: var(--blue-600); }
.chart .col:hover, .chart .col.on { fill: var(--blue-800); }
.tip { position: absolute; pointer-events: none; background: var(--slate-900); color: var(--white); font-size: .8125rem; padding: 6px 10px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -110%); }

/* Sign-in pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: 100%; max-width: 420px; }
.auth .logo { display: block; height: 44px; width: auto; margin: 0 auto 16px; }
.auth h1 { text-align: center; font-size: 1.375rem; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8125rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.stack { display: grid; gap: 10px; }
.demo { border: 1px dashed var(--warning); border-radius: 8px; padding: 12px; margin-top: 18px; }
.demo p { margin: 0 0 8px; font-size: .8125rem; color: var(--warning); }

@media (max-width: 600px) {
  .topbar { padding: 10px 16px; }
  .tile .value { font-size: 1.375rem; }
}
label.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; color: var(--text); margin: 0; }
