/* Future Agility — shared UI tokens.
   Brand (Kenal Bakat) and chart colours are separate systems; Gallup domain
   colours live only in report.css and are never used for UI or status. */
:root {
  --brand: #1D6A45;          /* Kenal Bakat green */
  --brand-ink: #FFFFFF;
  --brand-soft: #E3F0E8;
  --accent: #D65B5B;         /* Kenal Bakat accent, used sparingly */
  --ink: #17201B;
  --ink-2: #4B5750;
  --ink-3: #7A857F;
  --line: #DCE3DE;
  --surface: #FFFFFF;
  --surface-2: #F5F7F5;
  --bg: #FAFBFA;
  --ok: #1E7A45;    --ok-bg: #E2F3E8;
  --warn: #8A5A06;  --warn-bg: #FBF0D9;
  --bad: #A12E2E;   --bad-bg: #FBE3E3;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .05), 0 6px 18px rgba(20, 30, 25, .06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, white); outline-offset: 2px; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar .in { max-width: 1080px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.mark { font-weight: 800; letter-spacing: .01em; color: var(--brand); }
.mark small { font-weight: 600; color: var(--ink-3); letter-spacing: 0; margin-left: 6px; }
.spacer { flex: 1; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; }
.narrow { max-width: 760px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.muted { color: var(--ink-2); }
.small { font-size: 13.5px; }
.tiny { font-size: 12.5px; color: var(--ink-3); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stack > * + * { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }

.btn { appearance: none; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer; min-height: 40px; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { min-height: 32px; padding: 5px 10px; font-size: 13.5px; }

label.f { display: block; }
label.f > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
input.i, select.i, textarea.i { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
textarea.i { min-height: 80px; resize: vertical; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.neutral { background: var(--surface-2); color: var(--ink-2); }

.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .25s; }

.notice { border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.notice.info { background: var(--brand-soft); color: #134A31; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
.tablewrap { overflow-x: auto; }

.saved { font-size: 12.5px; color: var(--ink-3); transition: opacity .3s; }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Future Agility additions */
.grid2 > .card + .card, .kpi > .card + .card { margin-top: 0; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; color: inherit; }
a.btn.primary { color: var(--brand-ink); }
