/* slo.css — shared styles for the SLO teaching pages (index.html, methods.html).
   Canvas code can't read these custom properties; the same colors are in the C object in slo.js. */
:root {
  --bg: #0f1420;
  --panel: #171e2e;
  --panel2: #1e2740;
  --text: #dbe2f1;
  --muted: #8b96ad;
  --accent: #5b9dff;
  --good: #2fbf71;
  --good2: #9fd45e;
  --bad: #ef5350;
  --warn: #f2c14e;
  --border: #2a3550;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px 80px; }
nav { padding: 14px 0 0; font-size: 13px; color: var(--muted); }
nav a { color: var(--muted); text-decoration: none; margin-right: 14px; }
nav a:hover, nav a.here { color: var(--accent); }
header { padding: 26px 0 8px; }
header h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.2; }
header p { margin: 0; color: var(--muted); max-width: 720px; font-size: 16px; }
header a, section > p a { color: var(--accent); }

/* sticky settings strip */
#strip {
  position: sticky; top: 0; z-index: 20;
  background: rgba(15,20,32,0.92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  margin: 16px -20px 0; padding: 8px 20px;
  font-size: 13px; color: var(--muted);
  display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: baseline;
}
#strip b { color: var(--text); font-weight: 600; }
#strip .budget, #strip .budget b { color: var(--warn); }

section { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--border); }
section h2 { margin: 0 0 8px; font-size: 22px; }
section h2 .num {
  display: inline-block; width: 30px; height: 30px; line-height: 30px; text-align: center;
  border-radius: 50%; background: var(--accent); color: #0b1020; font-size: 15px; font-weight: 700;
  margin-right: 10px; vertical-align: 3px;
}
section > p { margin: 0 0 16px; max-width: 760px; color: var(--text); }
.lede { color: var(--muted) !important; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-top: 12px; }
.card h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.controls { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.ctl label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.ctl .val { color: var(--text); font-weight: 600; }
select, input[type="number"], input[type="text"], input[type="time"] {
  background: var(--panel2); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 8px; font-size: 14px; font-family: inherit;
}
input[type="range"] { width: 240px; accent-color: var(--accent); }
button {
  background: var(--panel2); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; font-family: inherit;
}
button:hover { border-color: var(--accent); }
button.small { padding: 3px 8px; font-size: 12px; }
.takeaway {
  margin-top: 14px; padding: 10px 14px;
  border-left: 3px solid var(--warn); background: rgba(242,193,78,0.06);
  border-radius: 0 8px 8px 0; font-size: 14px;
}
.takeaway b { color: var(--warn); }
.formula {
  background: var(--panel2); border-radius: 6px; padding: 8px 12px; margin: 8px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.7;
  overflow-x: auto; white-space: nowrap;
}
.formula .hl { color: var(--accent); font-weight: 700; }
.formula .w { color: var(--warn); font-weight: 700; }
.note { color: var(--muted); font-size: 13px; margin-top: 8px; }
.gridwrap, .editor { overflow-x: auto; }
canvas { display: block; }
canvas.grid { width: 100%; min-width: 640px; cursor: crosshair; }
canvas.wide { width: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 12px; }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 12px; }
.stat .k { color: var(--muted); font-size: 12px; }
.stat .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .s { color: var(--muted); font-size: 12px; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; vertical-align: 3px; margin-left: 6px; }
.badge.pass { background: rgba(47,191,113,.18); color: var(--good); }
.badge.fail { background: rgba(239,83,80,.18); color: var(--bad); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two > * { min-width: 0; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }

/* incident editor */
table.inc { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
table.inc th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 4px 6px; border-bottom: 1px solid var(--border); }
table.inc td { padding: 4px 6px; border-bottom: 1px solid rgba(42,53,80,.5); vertical-align: middle; }
table.inc input[type="number"] { width: 70px; padding: 4px 6px; }
table.inc input[type="time"] { padding: 4px 6px; }
table.inc select { padding: 4px 6px; max-width: 150px; }
table.inc td.cost { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.inc td.cost.zero { color: var(--muted); }
table.inc td.cost.spent { color: var(--bad); font-weight: 600; }
table.inc tfoot td { border-bottom: none; font-weight: 600; padding-top: 8px; }
table.inc .del { color: var(--muted); border: none; background: none; font-size: 15px; padding: 0 6px; }
table.inc .del:hover { color: var(--bad); }

#tooltip {
  position: fixed; pointer-events: none; z-index: 30; display: none;
  background: #0b1020; border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 9px; font-size: 12px; max-width: 280px; line-height: 1.45;
}
