:root {
  --bg: #0d1117; --panel: #161b22; --border: #21262d; --text: #e6edf3; --muted: #8b949e; --accent: #58a6ff;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--panel); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.muted { color: var(--muted); }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--panel);
}
.topbar .controls { display: flex; align-items: center; gap: 10px; }
.brand { font-size: 18px; font-weight: 700; letter-spacing: -.2px; }
.brand .paw { margin: 0 4px; }
.brand .sub { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 6px; }
.brand .back { margin-right: 10px; font-size: 20px; }
.brand a, .brand .paw-link, .brand .brand-text { color: inherit; text-decoration: none; }
.brand .paw-link { font-size: 22px; margin-right: 4px; }
.brand a:hover { opacity: .8; }

/* Ghost-loading: skeleton placeholders for slow / network-dependent panels (e.g. account-detail repo list). */
@keyframes wd-shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }
.skel { background: linear-gradient(90deg, var(--border) 0px, #2b333d 80px, var(--border) 160px); background-size: 400px 100%; animation: wd-shimmer 1.2s linear infinite; border-radius: 6px; display: inline-block; }
.skel-line { height: 14px; width: 100%; margin: 6px 0; }
.skel-line.short { width: 40%; }
.skel-box { height: 60px; width: 100%; margin: 8px 0; border-radius: 8px; }
.controls select, .btn {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 10px; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }

main { max-width: 1100px; margin: 0 auto; padding: 24px; }

/* Breadcrumb — sits right under the topbar, replaces ad-hoc per-page back-links. */
.crumbs { max-width: 1100px; margin: 0 auto; padding: 14px 24px 0; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); text-decoration: none; }
.crumbs .sep { margin: 0 8px; opacity: .5; }
.crumbs .here { color: var(--text); font-weight: 600; }
h1 { font-size: 22px; margin: 8px 0 20px; }
h2 { font-size: 16px; margin: 32px 0 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }

/* ── Get Started wizard ─────────────────────────────────────────────────────────────────────────────────────── */
.hero { max-width: 880px; margin: 8vh auto 0; text-align: center; }
.hero h1 { font-size: 48px; line-height: 1.05; margin-bottom: 18px; letter-spacing: -0.5px; }
.hero .hero-em { color: var(--accent); }
.hero .lede { font-size: 17px; color: #c9d1d9; margin-bottom: 28px; max-width: 680px; margin-left: auto; margin-right: auto; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }

/* ── Landing-page sections (only shown on the not-signed-in landing) ────────────────────────────────────────── */
.vp { max-width: 1080px; margin: 80px auto 0; padding: 0 16px; }
.vp h2 { font-size: 28px; text-align: center; border: 0; margin-bottom: 28px; }
.vp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .vp-cols { grid-template-columns: 1fr; } }
.vp-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.vp-card.highlight { border-color: var(--accent); background: linear-gradient(180deg, #0d1f33 0%, var(--panel) 100%); }
.vp-card h3 { font-size: 17px; margin: 0 0 12px; color: var(--text); }
.vp-card ul { margin: 0 0 12px; padding-left: 20px; color: #c9d1d9; font-size: 14px; line-height: 1.7; }

.how { max-width: 1080px; margin: 80px auto 0; padding: 0 16px; }
.how h2 { font-size: 28px; text-align: center; border: 0; margin-bottom: 28px; }
.how-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.how-step { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 18px; font-size: 14px; }
.how-step .n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #0d1117; font-weight: 800; margin-right: 8px; }

.pricing-teaser { max-width: 1080px; margin: 80px auto 0; padding: 0 16px; text-align: center; }
.pricing-teaser h2 { font-size: 28px; border: 0; margin-bottom: 8px; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 24px 0 12px; }
.tier { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 20px 16px; position: relative; }
.tier.featured { border-color: var(--accent); transform: scale(1.03); }
.tier .t-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #0d1117; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 20px; }
.tier .t-name { font-weight: 700; color: var(--text); font-size: 14px; }
.tier .t-price { font-size: 26px; font-weight: 800; margin: 8px 0 12px; }
.tier .t-price .per { font-size: 13px; font-weight: 500; color: var(--muted); }
.tier .t-bullets { font-size: 13px; color: #c9d1d9; line-height: 1.7; }

.cta-final { max-width: 720px; margin: 80px auto 80px; text-align: center; padding: 0 16px; }
.cta-final h2 { font-size: 26px; border: 0; margin-bottom: 18px; }

/* Admin tier-CRUD forms (one row per tier). */
.admin-tiers { display: flex; flex-direction: column; gap: 14px; margin: 16px 0 32px; }
.admin-tier-form { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.admin-tier-form label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.admin-tier-form label.wide { grid-column: 1 / -1; }
.admin-tier-form textarea { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font: inherit; font-size: 13px; min-height: 60px; resize: vertical; }
.admin-tier-form input[type="text"], .admin-tier-form input[type="number"], .admin-tier-form input:not([type]) { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font: inherit; }
.admin-tier-form label.chk { flex-direction: row; align-items: center; gap: 6px; }
.admin-tier-form .tier-key { grid-column: 1 / -1; font-size: 13px; }
.admin-tier-form .tier-actions { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; }
.admin-tier-form .tier-actions .link { background: none; border: 0; color: #ff7b72; cursor: pointer; font-size: 13px; }
.admin-tier-form .save-status { grid-column: 1 / -1; height: 18px; }

/* Tier select buttons on pricing.html: highlighted "Your tier" + per-tier select CTAs */
.tier .tier-cta { display: inline-block; margin-top: 14px; font-size: 13px; padding: 8px 14px; cursor: pointer; }
.tier .tier-cta.current { background: var(--panel); color: var(--muted); cursor: default; border-color: var(--border); }
.tier.is-current { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.25); }
.cta.primary { background: #238636; }
.cta.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.cta.ghost:hover { background: var(--panel); }
.cta.lg { font-size: 18px; padding: 14px 28px; }
.cta {
  display: inline-block; background: #238636; color: #fff; font-weight: 700; font-size: 16px;
  padding: 12px 22px; border-radius: 8px; border: 1px solid #2ea043;
}
.cta:hover { background: #2ea043; text-decoration: none; }
.cta:disabled, button.cta[disabled] { background: #30363d; border-color: #30363d; color: #8b949e; cursor: not-allowed; }
.small { font-size: 12px; margin-top: 14px; }

.wizard { max-width: 720px; margin: 32px auto; }
.steps { display: flex; gap: 8px; margin-bottom: 22px; }
.step { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.step .n { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--border); color: var(--text); font-weight: 700; font-size: 12px; }
.step.active { border-color: var(--accent); color: var(--text); }
.step.active .n { background: var(--accent); color: #0d1117; }
.step.done .n { background: #2ea043; color: #0d1117; }
.role { margin-bottom: 16px; }
.role label { font-size: 13px; color: var(--muted); display: inline-flex; flex-direction: column; gap: 4px; }
.role select { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 24px; }
.panel h2 { font-size: 20px; margin: 0 0 12px; }
.panel p { color: #c9d1d9; }
.warn-panel { border-color: #5a3c12; }
.panel .cta { margin: 14px 0 4px; }
.panel label { display: block; margin: 14px 0 8px; font-size: 13px; color: var(--muted); }
.panel select { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; min-width: 280px; }
.panel input, .panel textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font: inherit; }
.panel textarea { font-family: ui-monospace, monospace; font-size: 12px; resize: vertical; }
.panel + .panel { margin-top: 16px; }
.wizard .panel { margin-bottom: 16px; }
pre.copy { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font-size: 12px; overflow-x: auto; user-select: all; }
.ok { color: #7ee787; font-size: 12px; font-weight: 600; }
.todo { color: #ffd591; font-size: 12px; font-weight: 600; }
#su-save { margin-top: 8px; }

.repolist { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin: 8px 0 16px; }
.repo-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 14px; color: var(--text); border-radius: 6px; }
.repo-opt:hover { background: var(--bg); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card {
  display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; color: var(--text);
}
.card:hover { border-color: var(--accent); text-decoration: none; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card .repo { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .repo strong { color: var(--text); }
.band { font-size: 11px; font-weight: 700; color: #0d1117; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.score { font-size: 40px; font-weight: 800; margin: 6px 0 2px; }
.score-big { font-size: 64px; font-weight: 800; line-height: 1; margin: 14px 0 12px; text-align: center; letter-spacing: -1px; }
.score-big .pct { font-size: 28px; font-weight: 700; margin-left: 4px; opacity: .85; }
.band-big { color: #0d1117; font-weight: 800; font-size: 18px; text-align: center; padding: 10px 12px; border-radius: 8px; text-transform: none; letter-spacing: .2px; }
.runstate { margin-top: 8px; min-height: 20px; display: flex; align-items: center; font-size: 13px; }
.runstate.tall { min-height: 64px; font-size: 15px; margin-top: 0; }
.analyzing { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.analyzing .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: wd-pulse 1.1s ease-in-out infinite; }
.failed { color: #ffb4b4; font-weight: 600; }
@keyframes wd-pulse { 0%,100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.lead { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.lead-val { color: var(--text); font-weight: 600; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; }
.flag { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--border); color: var(--text); }
.flag.crit { background: #5d1a1a; color: #ffb4b4; }
.flag.warn { background: #5a3c12; color: #ffd591; }

/* Locked repo cards — Free tier viewing a private repo. Dashed border, dimmed, padlock + upgrade CTA. */
.card.locked { opacity: .9; border-style: dashed; border-color: #5a3c12; }
.card.locked:hover { border-color: #ffd591; }
.card.locked .t-big, .card.locked .band-big { color: #ffd591; }
.repo-toggle.locked { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border: 1px dashed #5a3c12; border-radius: 8px; color: var(--text); text-decoration: none; background: var(--panel); }
.repo-toggle.locked:hover { border-color: #ffd591; }
.repo-toggle.locked .lock-icon { font-size: 18px; color: #ffd591; }

/* Per-card LoC (the tier meter unit) + paused state — for repos that bumped the user over plan cap. */
.card .card-loc { font-size: 12px; text-align: center; margin-top: 8px; }
.card.paused { opacity: .82; border-style: dashed; }
.card-paused { font-size: 12px; color: #ffd591; text-align: center; margin-top: 6px; font-weight: 600; }

/* Published column in the runs table. Free tier shows a locked pill; paid tiers show an inline toggle on the latest run. */
.published-pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 20px; background: #1f3a5f; color: #c8e1ff; font-weight: 600; }
.published-pill.locked { background: #1f3a5f; }
.publish-toggle.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.publish-toggle.inline input { accent-color: var(--accent); }

/* Sign-in pill — replaces the user-menu on public pages when not signed in (top-right of every topbar). */
.user-menu.signed-out { display: inline-flex; align-items: center; }
.signin-pill { display: inline-block; background: #238636; color: #fff; font-weight: 700; font-size: 14px;
  padding: 8px 16px; border-radius: 6px; border: 1px solid #2ea043; }
.signin-pill:hover { background: #2ea043; text-decoration: none; }

/* Beta banner — honest disclosure that pricing is aspirational while we're in private beta. */
.beta-banner { background: #2d2410; border: 1px solid #5a3c12; border-radius: 10px; padding: 14px 18px;
  margin: 0 auto 24px; max-width: 760px; font-size: 14px; line-height: 1.5; text-align: left; color: #ffd591; }
.beta-banner strong { color: #fff; }
.beta-banner a { color: var(--accent); }

/* Couldn't-load card on the repo page — REPLACES the four shimmering skeletons when overview API fails. */
.t-card.load-fail { grid-column: 1 / -1; text-align: center; }

/* Pause banner on the repo page — surfaces NeedsUpgrade / Manual pause with a clear next action. */
.pause-banner { background: #2d2410; border: 1px solid #5a3c12; border-radius: 10px; padding: 14px 16px;
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pause-banner .pause-icon { font-size: 28px; }
.pause-banner .pause-body { flex: 1; }
.pause-banner .pause-title { font-weight: 700; color: #ffd591; }
.pause-banner .pause-msg { font-size: 13px; }

/* Members table on the repo page — owners see transfer + remove controls. */
.members-tbl { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.members-tbl th, .members-tbl td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.members-tbl tr:last-child td { border-bottom: 0; }
.members-tbl .mem-actions { text-align: right; }
.members-tbl button.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0 6px; font-size: 13px; }
.members-tbl button.link:hover { text-decoration: underline; }
.role { font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.role-owner { background: #1f3a5f; color: #c8e1ff; }
.role-member { background: var(--border); color: var(--text); }

/* LoC meter on the dashboard header: tier name, used/cap LoC, percentage bar. */
.loc-meter { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin: 0 0 16px; }
.loc-meter:empty { display: none; }
.loc-meter .meter-row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.loc-meter .meter-tier { font-weight: 700; color: var(--text); }
.loc-meter .meter-row .muted { flex: 1; }
.loc-meter .meter-cta { color: #ffd591; font-weight: 600; }
.loc-meter .meter-bar { height: 6px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.loc-meter .meter-fill { height: 100%; border-radius: 4px; transition: width .3s; }

/* Repo page top row: 4 cards with the SAME skeleton — label (top), big content (centered, grows), bottom action/pill. */
.top-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.t-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; min-height: 240px; }
.t-card .t-label { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; }
.t-card .t-label.red { color: #ffb4b4; }
.t-card .t-label.green { color: #7ee787; }
/* Big middle content — score, percentile, or icon. Same size + centering on every card. */
.t-big { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -1px; margin: 6px 0; white-space: nowrap; }
/* "Top 33%" carries a leading word + a number + a small %, so it overflows at 64px on narrow cards. Drop to 48px. */
.t-big.top-pct { font-size: 48px; }
.t-big.muted { color: var(--muted); font-weight: 600; }
.t-big.red { color: #f85149; }
.t-big.green { color: #3fb950; }
.t-big .pct { font-size: 26px; font-weight: 700; margin-left: 4px; opacity: .85; }
.band-big.alert { background: #5d1a1a; color: #ffb4b4; }
.small-link { display: block; text-align: center; font-size: 12px; color: var(--muted); }
.small-link:hover { color: var(--accent); }
/* Icon + small-link grouped (centered, flex-grows) — used by the Latest-report card so the PDF link sits under the icon. */
.t-stack { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; margin: 6px 0; }
.t-stack .t-big { flex: 0; margin: 0; }
/* In a top-card, the CTA replaces the band pill — same shape/size, same dark text on a coloured background. */
.t-card .cta.block { background: var(--accent); color: #0d1117; font-weight: 800; font-size: 18px; padding: 10px 12px; border-radius: 8px; text-align: center; border: none; cursor: pointer; margin-top: 0; letter-spacing: .2px; }
.t-card .cta.block:hover { background: #79c0ff; }
/* Benchmark detail: an absolute-positioned tooltip on hover (doesn't grow the card). */
.t-benchmark { position: relative; overflow: visible; }
.bench-detail { display: none; position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); min-width: 280px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; box-shadow: 0 8px 30px rgba(0,0,0,.5); z-index: 30; }
.t-benchmark:hover .bench-detail, .t-benchmark:focus-within .bench-detail { display: block; }
.bench-detail .bench-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; font-size: 12px; margin: 4px 0; }
.band-chip { color: #0d1117; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.cta.block { display: block; text-align: center; margin-top: 6px; padding: 10px; }
.cta.secondary { background: var(--panel); color: var(--text); border-color: var(--border); }
.cta.secondary:hover { background: var(--bg); border-color: var(--accent); }

/* Compact stats strip (replaces Branch/Visibility row) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 24px; }

/* Make sure the HTML `hidden` attribute always wins — author CSS for .modal/.popover otherwise overrides it. */
[hidden] { display: none !important; }

/* In-page report viewer */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100; display: flex; flex-direction: column; padding: 24px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; background: var(--panel); border: 1px solid var(--border); border-bottom: none; border-radius: 8px 8px 0 0; padding: 10px 16px; }
.modal-title { font-weight: 700; }
.modal-frame { flex: 1; background: white; border: 1px solid var(--border); border-radius: 0 0 8px 8px; }
.popover-x { background: none; border: none; color: var(--text); font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 4px; }
.popover-x:hover { background: var(--border); }

/* Schedule popover (header button) */
.popover { position: fixed; top: 60px; right: 24px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.4); z-index: 50; display: flex; flex-direction: column; gap: 10px; min-width: 280px; }
.popover-head { display: flex; align-items: center; justify-content: space-between; }
.popover-head h3 { margin: 0; font-size: 14px; }
.popover label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.popover label.chk { flex-direction: row; align-items: center; gap: 6px; }
.popover select, .popover input[type=time] { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; }

/* User menu (dropdown on the user's display name) */
.user-menu { position: relative; }
.user-btn { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; cursor: pointer; font: inherit; }
.user-btn:hover { border-color: var(--accent); }
.user-btn .chev { color: var(--muted); margin-left: 4px; font-size: 11px; }
.user-pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--border); border-radius: 8px; min-width: 180px; padding: 6px; box-shadow: 0 8px 30px rgba(0,0,0,.4); z-index: 50; display: flex; flex-direction: column; }
.user-pop a, .user-pop button { display: block; padding: 8px 12px; color: var(--text); text-decoration: none; background: none; border: none; text-align: left; cursor: pointer; font: inherit; border-radius: 6px; }
.user-pop a:hover, .user-pop button:hover { background: var(--bg); }
.user-pop hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* Accounts list + Add-new card */
.account-card { display: flex; flex-direction: column; gap: 6px; }
.acc-provider { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; }
.acc-login { font-size: 20px; font-weight: 700; }
.acc-count { color: var(--muted); font-size: 13px; }
.account-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border-style: dashed; color: var(--muted); }
.account-add .acc-add { font-size: 36px; font-weight: 800; color: var(--accent); }
.account-add:hover { color: var(--text); }

/* Repo track/untrack toggle list */
.repo-toggle-list { display: flex; flex-direction: column; gap: 8px; max-width: 800px; }
.repo-toggle { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; cursor: pointer; }
.repo-toggle:hover { border-color: var(--accent); }
.repo-toggle-name { font-size: 14px; }
.switch { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { width: 38px; height: 22px; background: var(--border); border-radius: 22px; position: relative; transition: background .15s; }
.switch-knob { width: 16px; height: 16px; background: #fff; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: transform .15s; }
.switch:checked + .switch-track { background: #2ea043; }
.switch:checked + .switch-track .switch-knob { transform: translateX(16px); }
.switch:disabled + .switch-track { opacity: .5; cursor: wait; }

/* Profile page narrow layout */
main.narrow { max-width: 520px; }
main.narrow .panel label { display: block; margin: 12px 0; }

/* Anchor-styled link button (for inline HTML link in runs table) */
button.link { background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; font: inherit; }
button.link:hover { text-decoration: underline; }

.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.stat-k { font-size: 12px; color: var(--muted); }
.stat-v { font-size: 18px; font-weight: 700; margin-top: 4px; }

.badge-preview { display: block; margin: 8px 0; height: 20px; }

.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.insight { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.insight.wide { grid-column: 1 / -1; }
.insight h3 { font-size: 13px; margin: 0 0 10px; }
.insight .stat-v { font-size: 22px; font-weight: 800; }
.insight .risk, .risk-text { color: #ffb4b4; }
.insight .risk { margin-top: 8px; font-weight: 600; }
.bench-row { display: grid; grid-template-columns: 180px 1fr 70px; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.bench-row .bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.bench-row .bar-fill { height: 100%; background: var(--accent); }
.bench-row .pct { text-align: right; color: var(--muted); }

.schedule { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.schedule label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.schedule label.chk { flex-direction: row; align-items: center; gap: 6px; }
.schedule select, .schedule input[type=time] { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; }

.graphs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.graph { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
.u-title { color: var(--text); font-size: 13px; font-weight: 600; }

table.runs { width: 100%; border-collapse: collapse; font-size: 13px; }
table.runs th, table.runs td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.runs th { color: var(--muted); font-weight: 600; }
.status { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--border); }
.status.succeeded { background: #1a3a1a; color: #7ee787; }
.status.failed { background: #5d1a1a; color: #ffb4b4; }
.status.running, .status.queued { background: #1a2f4a; color: #79c0ff; }
button.del { background: transparent; border: 1px solid var(--border); color: #ffb4b4; cursor: pointer; font-size: 12px; padding: 3px 9px; border-radius: 4px; }
button.del:hover { background: #5d1a1a; border-color: #f85149; color: #fff; }
button.del:disabled { opacity: .4; cursor: default; }
