/* PullOwl — dark, flat, no gradients. Depth comes from layered surfaces and hairlines;
   dark green is the only accent; data is drawn as pixels. */
:root {
  --bg: #080a09;
  --side: #0a0c0b;
  --panel: #0e1110;
  --panel-2: #131714;
  --hover: rgba(255, 255, 255, .035);
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .11);
  --text: #edf2ee;
  --text-2: #c9d1cb;
  --muted: #8a938d;
  --faint: #5d6660;

  --green: #15803d;        /* brand: primary actions, switches, focus */
  --green-hi: #16a34a;
  --green-ink: #53c556;    /* positive deltas and "good" text */
  --green-wash: rgba(21, 128, 61, .14);

  /* pixel chart: empty cell + one-hue sequential ramp (validated on #0e1110) */
  --px-0: #171c19;
  --px-1: #14532d; --px-2: #1a7a3e; --px-3: #22a04f; --px-4: #3fc56a;
  /* categorical (validated dark, green first) */
  --c1: #22a04f; --c2: #338ced; --c3: #e76624; --c4: #9887ef;
  /* status (severity) */
  --crit: #dc3c3d; --major: #f18a59; --minor: #fbb315;
  --red: #eb6263; --blue: #338ced; --violet: #9887ef; --orange: #f18a59; --yellow: #fbb315;

  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.55 var(--font); letter-spacing: -.003em;
  font-feature-settings: "cv01", "ss03", "cv11"; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a.link { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a.link:hover { color: var(--text); text-decoration-color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: 12px; }
code { color: var(--text-2); }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.012em; }
::selection { background: rgba(34, 160, 79, .35); }
:focus-visible { outline: 2px solid var(--green-hi); outline-offset: 2px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 14px 10px;
  background: var(--side); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px; font-weight: 600; font-size: 14px; color: var(--text); letter-spacing: -.02em; }
.brand img, .brand .owl { width: 26px; height: 26px; display: block; }
.workspace { display: flex; align-items: center; gap: 8px; margin: 8px 0 14px; padding: 7px 8px; border-radius: 8px; color: var(--text-2);
  font-size: 12.5px; background: var(--panel); border: 1px solid var(--line); }
.workspace .dot { width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; font-size: 10px; font-weight: 700;
  background: var(--green); color: #fff; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-label { margin: 16px 8px 4px; font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.nav a { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 8px; border-radius: 6px; color: var(--muted); font-weight: 500; position: relative; }
.nav a svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; flex: none; }
.nav a:hover { background: var(--hover); color: var(--text-2); }
.nav a.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.nav a.on::before { content: ""; position: absolute; left: -10px; top: calc(50% - 1.5px); width: 3px; height: 3px; background: var(--green-hi);
  box-shadow: 0 -5px 0 var(--px-2), 0 5px 0 var(--px-2); }
.nav .count { margin-left: auto; font-size: 11px; color: var(--red); font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 8px; border-top: 1px solid var(--line); }
.side-foot img { border-radius: 50%; }
.side-foot .who { font-size: 12.5px; color: var(--text-2); }
.side-foot form { margin-left: auto; }
.icon-btn { border: 0; background: none; padding: 5px; border-radius: 5px; color: var(--faint); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--text-2); }
.icon-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; display: block; }

.main { min-width: 0; }
.page { max-width: 1200px; margin: 0 auto; padding: 0 36px 72px; }
.head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 0 -36px 24px; padding: 14px 36px; background: var(--bg); border-bottom: 1px solid var(--line); }
.head h1 { font-size: 20px; font-weight: 650; line-height: 1.3; display: flex; align-items: center; gap: 10px; letter-spacing: -.025em; }
.head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; max-width: 680px; }
.head .actions { display: flex; gap: 6px; align-items: center; }
.crumbs { font-size: 12.5px; color: var(--faint); margin: 18px 0 -8px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--text); }

/* ---------- panels: depth without gradients ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; padding: 16px 18px 18px; min-width: 0; }
.grid > .card { margin-bottom: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 12px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.card-h h2 { font-size: 13px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 9px; }
.card-h .sub { color: var(--faint); font-size: 12px; }
.card-b { padding: 14px 0 0; }
.card-b.flush { padding: 0; }
.card > .scroll, .card > .table { margin-top: 4px; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.g-2-1 { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.g-1-1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.eyebrow { font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }


/* stat tiles */
.g-kpi, .g-4, .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; min-width: 0; }
.kpi-label { color: var(--muted); font-size: 12px; }
.kpi-value { font-size: 24px; font-weight: 600; letter-spacing: -.03em; margin-top: 6px; line-height: 1.1; color: var(--text); }
.kpi-foot { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 11.5px; color: var(--faint); flex-wrap: wrap; }
.kpi-trend { margin-top: 10px; }
.delta { font-weight: 500; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--green-ink); } .delta.down { color: var(--red); }

/* ---------- pixel charts ---------- */
.px-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; }
.px-y { display: flex; flex-direction: column; justify-content: space-between; text-align: right; font-size: 10.5px; color: var(--faint);
  font-variant-numeric: tabular-nums; padding: 0 0 2px; min-width: 22px; }
.px-x { grid-column: 2; display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); margin-top: 6px; }
.px { display: block; width: 100%; height: auto; shape-rendering: crispEdges; }
.px rect { rx: 1; }
.px .e { fill: var(--px-0); }
.px .p1 { fill: var(--px-1); } .px .p2 { fill: var(--px-2); } .px .p3 { fill: var(--px-3); } .px .p4 { fill: var(--px-4); }
.px .s1 { fill: var(--c1); } .px .s2 { fill: var(--c2); } .px .s3 { fill: var(--c3); } .px .s4 { fill: var(--c4); }
.px .crit { fill: var(--crit); } .px .major { fill: var(--major); } .px .minor { fill: var(--minor); }
.px .warn { fill: var(--minor); } .px .hot { fill: var(--crit); }
.px .hit { fill: transparent; cursor: default; }
.px g[data-tip]:hover rect:not(.hit), .px g[data-tip]:focus rect:not(.hit) { filter: brightness(1.35); }
.px g[data-tip]:focus { outline: none; }
.px-spark { width: 96px; }
.px-meter { margin-top: 8px; }
.px-legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--faint); }
.px-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.px-legend .l0 { background: var(--px-0); } .px-legend .l1 { background: var(--px-1); } .px-legend .l2 { background: var(--px-2); }
.px-legend .l3 { background: var(--px-3); } .px-legend .l4 { background: var(--px-4); }
.heat-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 11px; color: var(--faint); }
.heat-months { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); margin-bottom: 6px; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.legend .c1, .sw.c1 { background: var(--c1); } .legend .c2, .sw.c2 { background: var(--c2); }
.legend .c3, .sw.c3 { background: var(--c3); } .legend .c4, .sw.c4 { background: var(--c4); }
.legend .s1 { background: var(--c1); } .legend .s2 { background: var(--c2); } .legend .s3 { background: var(--c3); } .legend .s4 { background: var(--c4); }
.waffle-wrap { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; align-items: center; }
.legend-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 12.5px; color: var(--text-2); }
.legend-list li { display: flex; align-items: center; gap: 9px; }
.legend-list b { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text); }
.legend-list .total { padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); }
.sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: none; }
.sw.crit { background: var(--crit); } .sw.major { background: var(--major); } .sw.minor { background: var(--minor); }

.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bar-list li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 12.5px; color: var(--text-2); }
.bar-list li .num { color: var(--muted); }
.bar-list li .px { grid-column: 1 / -1; }
.quota { padding: 12px 0; border-bottom: 1px solid var(--line); }
.quota:last-child { border-bottom: 0; padding-bottom: 0; } .quota:first-child { padding-top: 0; }
.quota-top { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.quota-top code { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

details.tableview { margin-top: 12px; }
details.tableview summary { cursor: pointer; font-size: 11.5px; color: var(--faint); list-style: none; display: inline-flex; gap: 6px; align-items: center; }
details.tableview summary::-webkit-details-marker { display: none; }
details.tableview summary::before { content: "+"; font-family: var(--mono); }
details.tableview[open] summary::before { content: "−"; }
details.tableview summary:hover { color: var(--text-2); }
details.tableview .table { margin-top: 8px; font-size: 12px; }
details.tableview .table td, details.tableview .table th { padding: 5px 10px; }

.tip { position: fixed; z-index: 50; pointer-events: none; background: #1a1f1c; border: 1px solid var(--line-2); border-radius: 6px;
  padding: 6px 9px; font-size: 12px; color: var(--text-2); white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.tip b { color: var(--text); font-weight: 600; margin-right: 6px; font-variant-numeric: tabular-nums; }
.tip[hidden] { display: none; }

/* ---------- lists / tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; font-size: 11.5px; color: var(--faint); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--hover); }
.table .r, .table .num { text-align: right; }
.table .title { font-weight: 500; color: var(--text); }
a.title:hover { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.table .meta, .meta { color: var(--faint); font-size: 12px; }
.table td .meta { margin-top: 2px; }
.scroll { overflow-x: auto; }
.empty { padding: 24px 8px; color: var(--muted); }
.empty h3 { color: var(--text-2); font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.empty p { margin: 0; max-width: 440px; font-size: 12.5px; }
.empty code { background: var(--panel-2); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); }

/* ---------- status: square dot + text ---------- */
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; text-transform: capitalize; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--faint); flex: none; }
.badge.plain::before { display: none; }
.b-critical::before, .b-high::before, .b-failed::before, .b-p0::before, .b-error::before, .b-bug::before { background: var(--crit); }
.b-major::before, .b-medium::before, .b-p1::before { background: var(--major); }
.b-minor::before, .b-p2::before, .b-queued::before, .b-running::before { background: var(--minor); }
.b-low::before, .b-completed::before, .b-passed::before, .b-fixed::before { background: var(--green-hi); }
.b-feature::before { background: var(--violet); }
.b-question::before, .b-docs::before, .b-chore::before { background: var(--blue); }
.b-review { color: var(--text-2); } .b-investigator { color: var(--violet); } .b-linter { color: var(--orange); }
.b-p3::before, .b-skipped::before, .b-dismissed::before, .b-open::before { background: var(--faint); }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; color: var(--muted); border: 1px solid var(--line-2); font-weight: 500; }
.tag.on { color: var(--green-ink); border-color: rgba(83, 197, 86, .35); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 7px; font: inherit; font-size: 12.5px;
  font-weight: 500; cursor: pointer; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text-2); white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: #1a1f1c; color: var(--text); border-color: rgba(255,255,255,.16); }
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-hi); border-color: var(--green-hi); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--hover); }
.btn.danger { color: var(--red); }
.btn.sm { height: 25px; padding: 0 9px; font-size: 12px; }
.btn.lg { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 8px; }

.shell .btn:where(:not(.ghost)) {
  background: #1f2421;
  border-color: transparent;
}
.shell .btn:where(:not(.ghost)):hover:not(:disabled) { background: #2a312d; }
.shell .btn:where(:not(.ghost)):active:not(:disabled) { background: #171c19; }
.shell .btn.primary {
  height: 34px;
  padding-inline: 13px;
  border-radius: 6px;
  background: #22633d;
  color: #fff;
  font-weight: 600;
}
.shell .btn.primary.sm { height: 28px; padding-inline: 10px; }
.shell .btn.primary:hover:not(:disabled) { background: #2a7549; }
.shell .btn.primary:active:not(:disabled) { background: #1a5031; }
.shell .btn.primary:focus-visible { outline-color: #88c49b; }
.shell .btn:disabled {
  background: var(--panel-2);
  color: var(--muted);
  cursor: not-allowed;
}
.inline { display: inline; margin: 0; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
select, input[type=text], input[type=number], input[type=url], input:not([type]), textarea {
  font: inherit; font-size: 12.5px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 7px; padding: 4px 9px; height: 30px; }
select { padding-right: 28px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a938d' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
textarea { height: auto; padding: 8px 10px; resize: vertical; width: 100%; line-height: 1.55; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--green-hi); box-shadow: 0 0 0 3px var(--green-wash); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.seg-ctl { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.seg-ctl a { height: 25px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.seg-ctl a:hover { color: var(--text-2); }
.seg-ctl a.on { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg-ctl a .n { color: var(--faint); margin-left: 6px; font-variant-numeric: tabular-nums; }

.form { display: grid; gap: 22px; }
.field label, .field .lbl { display: block; font-weight: 500; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; }
.field .help { color: var(--faint); font-size: 12px; margin-top: 6px; }
.field select, .field input { width: 100%; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.switch { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch:first-child { padding-top: 0; }
.switch input { appearance: none; width: 30px; height: 17px; border-radius: 4px; background: var(--px-0); border: 1px solid var(--line-2); position: relative; flex: none; margin: 2px 0 0; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 2px; background: var(--muted); transition: transform .15s; }
.switch input:checked { background: var(--green); border-color: var(--green); }
.switch input:checked::after { transform: translateX(13px); background: #fff; }
.switch b { display: block; font-weight: 500; font-size: 13px; color: var(--text); }
.switch span { color: var(--faint); font-size: 12px; }
.chips-in { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-check { display: inline-flex; align-items: center; gap: 7px; height: 27px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; background: var(--panel-2); }
.chip-check:has(input:checked) { border-color: rgba(34, 160, 79, .55); background: var(--green-wash); color: var(--text); }
.chip-check input { accent-color: var(--green); margin: 0; }
.field label.chip-check { display: inline-flex; margin: 0; font-weight: 500; }
.formbar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 6px; padding: 14px 18px; background: var(--panel); border-top: 1px solid var(--line); }
.card:has(> .formbar) { padding: 0; overflow: hidden; }

.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { padding: 0 0 10px; color: var(--muted); font-weight: 500; font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text-2); }
.tabs a.on { color: var(--text); border-color: var(--green-hi); }
.tabs .n { color: var(--faint); margin-left: 6px; }

.note { padding: 10px 12px; border-radius: 8px; margin-bottom: 16px; font-size: 12.5px; border: 1px solid var(--line-2); color: var(--text-2); background: var(--panel); display: flex; gap: 9px; align-items: center; }
.note::before { content: ""; width: 7px; height: 7px; border-radius: 2px; flex: none; background: var(--blue); }
.note.ok::before { background: var(--green-hi); } .note.warn::before { background: var(--orange); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; padding-bottom: 0; }
.feed .ic { color: var(--faint); display: grid; place-items: center; }
.feed .ic svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.feed li > div { min-width: 0; }
.feed .t { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .t a:hover { color: var(--text); }
.feed .w { font-size: 11.5px; color: var(--faint); }

.rule-row textarea { min-height: 30px; font-size: 12.5px; background: transparent; border-color: transparent; padding: 4px 6px; }
.rule-row textarea:hover { border-color: var(--line-2); }
.rule-row textarea:focus { background: var(--panel-2); }
.rule-actions { display: flex; gap: 4px; justify-content: flex-end; opacity: 0; transition: opacity .12s; }
tr:hover .rule-actions, .rule-actions:focus-within { opacity: 1; }
.kv-list { list-style: none; padding: 0; margin: 0; }
.kv-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.kv-list li:last-child { border-bottom: 0; }

.add-rule input { flex: 1 1 240px; min-width: 0; }
.rules-grid { border-top: 1px solid var(--line); }
.rules-grid .rg-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, .25fr) minmax(100px, .4fr) minmax(100px, .4fr) auto; gap: 16px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line); }
.rules-grid .rg-head { font-size: 11.5px; color: var(--faint); padding: 8px 0; }
.rules-grid .rg-row:not(.rg-head):hover { background: var(--hover); }
.rules-grid textarea { field-sizing: content; resize: none; min-height: 30px; font-size: 13px; color: var(--text);
  background: transparent; border-color: transparent; padding: 4px 6px; margin-left: -6px; }
.rules-grid textarea:hover { border-color: var(--line-2); }
.rules-grid textarea:focus { background: var(--panel-2); }
.rules-grid .rule-actions { opacity: 1; }

.snippet { font-family: var(--mono); font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; color: var(--text); white-space: pre-wrap; word-break: break-all; margin: 6px 0 14px; }
.token-once { border: 1px solid rgba(34, 160, 79, .45); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; background: var(--panel); }
.token-once b { display: block; margin-bottom: 6px; font-weight: 500; }
.token-once .snippet { margin-bottom: 4px; user-select: all; }
.steps { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 12.5px; line-height: 1.7; }
.steps li { margin-bottom: 8px; }
.token-form { display: flex; gap: 10px; align-items: flex-end; }
.token-form .field { flex: 1; max-width: 420px; margin: 0; }

/* ---------- signed-out setup page ---------- */
.landing { min-height: 100vh; display: grid; place-items: center; padding: 40px 24px; }
.setup { max-width: 560px; }
.setup h1 { font-size: 20px; letter-spacing: -.02em; }
.setup-steps { margin: 20px 0 0; padding-left: 18px; color: var(--text-2); }
.setup-steps li { margin-bottom: 10px; }
.gh { width: 16px; height: 16px; fill: currentColor; }

@media (max-width: 1080px) { .g-2-1, .g-1-1, .g-3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
  .nav-label, .workspace, .side-foot .who { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a.on::before { display: none; }
  .side-foot { border-top: 0; margin-top: 0; }
  .page { padding: 0 16px 48px; } .head { margin: 0 -16px 16px; padding: 12px 16px; }
  .row2, .waffle-wrap { grid-template-columns: 1fr; }
  .rules-grid .rg-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px 0; }
  .rules-grid .rg-head { display: none; }
  .rules-grid textarea { grid-column: 1 / -1; width: 100%; margin-left: 0; }
}

/* ---------- motion (dashboard): stepped and short; off for reduced-motion users ---------- */
.owl { display: block; overflow: visible; }
.owl-eyes { transform-box: fill-box; transform-origin: center; animation: owl-blink 6s steps(1) infinite; }
@keyframes owl-blink { 0%, 93%, 100% { transform: scaleY(1); } 94%, 96% { transform: scaleY(.15); } }
.px g[data-tip] { transition: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Keep review status and recent work above the optional charts. */
.overview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  padding: 0;
  overflow: hidden;
  background: var(--line);
}
.overview-stats .kpi { border: 0; border-radius: 0; background: var(--panel); }
.overview-stats .kpi-trend { display: none; }
.overview-calendar .card-b { max-width: 440px; }
.overview-breakdown > summary {
  cursor: pointer;
  color: var(--text-2);
  padding: 12px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.security-group + .security-group { border-top: 1px solid var(--line); }
.security-group > summary {
  display: grid;
  grid-template-columns: 12px auto minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px 0;
}
.security-group > summary::marker { content: ""; }
.security-group > summary::before { content: "›"; color: var(--muted); }
.security-group[open] > summary::before { content: "⌄"; }
.security-group > summary strong { overflow-wrap: anywhere; font-weight: 550; }
.security-location-count { color: var(--muted); white-space: nowrap; }
.security-explanation { margin: 0 0 10px 24px; }
.security-group .table th:first-child, .security-group .table td:first-child { padding-left: 24px; }
@media (max-width: 760px) {
  .security-group > summary { grid-template-columns: 10px auto minmax(0, 1fr) auto; gap: 6px; }
  .security-group > summary .meta { grid-column: 3 / -1; grid-row: 2; }
  .security-location-count { grid-column: 4; grid-row: 1; font-size: 11px; }
}
