:root {
  --sidebar: 218px;
  --gutter: clamp(24px, 3.5vw, 56px);
  --content: 1560px;
  --control: #141b1d;
  --hover: #1a2527;
  --warning: #e9c389;
  --danger: #ffaba2;
  --heat-0: #202a2c;
  --heat-1: #26534f;
  --heat-2: #317d73;
  --heat-3: #48ad9d;
  --heat-4: #78e4d1;
  --success-bg: #132926;
  --success-rule: #2b524b;
  --warning-bg: #2a2318;
  --warning-rule: #5d4a2c;
  --danger-bg: #2b1e1e;
  --danger-rule: #63413f;
  --button-hover: var(--mint);
  --button-hover-ink: var(--primary-ink);
  font: 14px/1.5 var(--font-sans);
  background: var(--surface);
  color: var(--ink);
}

:root:not([data-theme="dark"]) {
  color-scheme: light;
  --surface: #f5f7f6;
  --panel: #fff;
  --ink: #141b1c;
  --muted: #4f6161;
  --rule: #cad5d4;
  --mint: #006e62;
  --primary: #112021;
  --primary-ink: #fff;
  --control: #eef3f2;
  --hover: #e4efed;
  --warning: #784a13;
  --danger: #992e2e;
  --heat-0: #dce7e5;
  --heat-1: #addbd3;
  --heat-2: #71bfb2;
  --heat-3: #308f81;
  --heat-4: #006e62;
  --success-bg: #e4f5f0;
  --success-rule: #aad0c9;
  --warning-bg: #fdf2df;
  --warning-rule: #e3c494;
  --danger-bg: #fff0ee;
  --danger-rule: #e7b9b5;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
input, select, textarea, .table-scroll { scroll-margin-top: 85px; }
code, pre, kbd { font-family: var(--font-mono); }
svg.icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; top: -70px; left: 16px; z-index: 100; background: var(--primary); color: var(--primary-ink); padding: 12px 16px; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.form-hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Workspace navigation */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0 14px;
  background: var(--surface);
  border-right: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; min-height: 70px; padding-inline: 10px; border-bottom: 1px solid var(--rule); }
.brand img { display: block; width: 140px; max-width: 100%; height: auto; mix-blend-mode: lighten; }
:root:not([data-theme="dark"]) .brand img { box-sizing: content-box; width: 128px; padding: 6px; background: #09090b; mix-blend-mode: normal; }
.nav-label { margin: 25px 11px 10px; }
.nav-label, .local-status, .eyebrow, .metric-label { font: 11px/1.5 var(--font-mono); text-transform: uppercase; letter-spacing: .075em; color: var(--muted); }
#navigation, .sidebar-bottom { display: grid; gap: 3px; }
.nav-link {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
}
.nav-link:hover { color: var(--ink); background: var(--control); }
.nav-link.active { border-color: var(--rule); border-left-color: var(--mint); background: var(--hover); color: var(--ink); }
.nav-link.active .icon { color: var(--mint); }
.nav-count, #guide-button span, .nav-indicator { margin-left: auto; }
.nav-count, .count-pill { font: 11px/1.4 var(--font-mono); background: var(--control); border: 1px solid var(--rule); padding: 2px 6px; color: var(--muted); }
.nav-indicator { width: 6px; height: 6px; background: var(--warning); }
.sidebar-bottom { margin-top: auto; padding-top: 32px; }
.local-status { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 16px 10px; border-top: 1px solid var(--rule); font-size: 10px; }
.local-status i, .eyebrow i { width: 7px; height: 7px; flex: 0 0 7px; background: var(--mint); }
.sidebar-scrim, .mobile-only { display: none; }
.app-shell { margin-left: var(--sidebar); min-width: 0; }

.topbar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--rule); background: var(--surface); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 70px; max-width: var(--content); padding-inline: var(--gutter); margin-inline: auto; }
.breadcrumb, .header-actions, .search-trigger { display: flex; align-items: center; gap: 12px; }
.breadcrumb { font: 12px/1.4 var(--font-mono); color: var(--muted); }
.breadcrumb strong { font-weight: 400; color: var(--ink); }
.search-trigger, .icon-button, .theme-toggle { color: var(--muted); }
.search-trigger { padding: 7px 9px; font-size: 13px; }
.search-trigger:hover, .icon-button:hover { color: var(--ink); background: var(--hover); }
.search-trigger > span:first-child { display: flex; }
.search-trigger kbd { color: var(--muted); border: 1px solid var(--rule); padding: 2px 5px; font-size: 10px; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; padding: 0; }
.icon-button.mobile-only { display: none; }
.theme-toggle { min-height: 36px; padding: 4px 9px; border: 1px solid var(--rule); font: 11px/1.3 var(--font-mono); }
.theme-toggle:hover, .theme-toggle[aria-pressed="true"] { color: var(--mint); background: var(--hover); }

/* Page headers and actions */
main { max-width: var(--content); min-height: calc(100dvh - 71px); margin: auto; padding: clamp(32px, 5vw, 68px) var(--gutter) 56px; outline: none; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; margin-bottom: 34px; }
.page-heading > div:first-child { min-width: 0; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 13px; }
h1 { margin: 0; font-size: clamp(42px, 5.1vw, 76px); font-weight: 560; line-height: .99; letter-spacing: -.075em; overflow-wrap: anywhere; }
h1 em { color: var(--mint); font-style: normal; }
.page-description { max-width: 58ch; margin: 13px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.heading-actions, .job-actions, .detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 43px; padding: 8px 14px; border: 1px solid var(--rule); font-size: 13px; font-weight: 580; line-height: 1.25; text-align: center; }
.button:hover { border-color: var(--ink); background: var(--hover); }
.button .icon { width: 15px; height: 15px; }
.button.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.button.primary:hover { background: var(--button-hover); border-color: var(--button-hover); color: var(--button-hover-ink); }
.button.small { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.button.danger { color: var(--danger); border-color: var(--danger-rule); }
.button.ghost { border-color: transparent; color: var(--muted); }

.hero {
  --ink: #f4f5f3;
  --muted: #bdcac9;
  --mint: #78e4d1;
  --primary: #f1f3ef;
  --primary-ink: #111414;
  --button-hover: var(--mint);
  --button-hover-ink: var(--primary-ink);
  --hover: #1a2527;
  color: var(--ink);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 290px;
  padding: clamp(25px, 4vw, 51px);
  margin-bottom: 22px;
  border: 1px solid var(--rule);
  background: var(--panel);
}
.hero::before, .hero::after { content: ''; position: absolute; pointer-events: none; }
.hero::before { inset: 0; z-index: -1; background: linear-gradient(90deg, #080b0cef, #080c0d38 88%), linear-gradient(0deg, #080b0cce, transparent 78%); }
.hero::after { top: 12px; right: 12px; width: 20px; height: 20px; border-top: 1px solid var(--muted); border-right: 1px solid var(--muted); }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 51%; z-index: -2; }
.hero .page-heading { width: 100%; margin-bottom: 0; }
.hero .button:not(.primary) { background: #0b0d0ecc; border-color: #697577; }
.hero .button:not(.primary):hover { border-color: var(--ink); }

/* Dashboard cards and data */
.metrics, .analytics-grid, .two-column, .quick-actions, .provider-grid { display: grid; gap: 16px; }
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 22px; }
.analytics-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); margin-bottom: 26px; }
.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reports-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.quick-actions, .provider-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card, .metric, .quick-action { min-width: 0; border: 1px solid var(--rule); background: var(--panel); }
.metric { padding: 18px; }
.metric:hover, .quick-action:hover { border-color: var(--mint); }
.metric-label { display: flex; align-items: center; gap: 7px; }
.metric-label .icon { width: 14px; height: 14px; color: var(--mint); }
.metric-arrow { margin-left: auto; color: var(--muted); font-size: 15px; }
.metric-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 8px; margin: 10px 0 8px; font-size: clamp(28px, 3vw, 41px); font-weight: 550; letter-spacing: -.07em; line-height: 1; }
.metric-value small { color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 0; }
.metric-foot { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); font-size: 11px; }
.positive { color: var(--mint); }
.segment-meter { display: flex; gap: 2px; height: 4px; margin: 11px 0 8px; }
.segment-meter span { flex: 1; background: var(--heat-0); }
.segment-meter .on { background: var(--mint); }
.segment-meter .warn { background: var(--warning); }

.card-head, .section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.card-head { padding: 17px 19px; border-bottom: 1px solid var(--rule); }
.card h2, .section-head h2 { margin: 0; font-size: 16px; line-height: 1.25; font-weight: 570; letter-spacing: -.035em; }
.section-head { min-height: 24px; margin-bottom: 12px; }
.section-head p, .card-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.card-head .card-subtitle, .section-head > .card-subtitle { margin-top: 0; }
.card-head h2 + .card-subtitle { margin-top: 3px; }
.section-head a, .card-footer a { font-size: 12px; color: var(--mint); }
.section-head a:hover, .card-footer a:hover, .notice a:not(.button):hover { text-decoration: underline; }
.count-pill { display: inline-block; margin-left: 5px; vertical-align: 2px; letter-spacing: 0; }
.card-content { padding: 18px 19px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--rule); padding: 12px 19px; color: var(--muted); font-size: 11px; }
.spaced, .repo-panel, .page-card { margin-bottom: 24px; }

.segmented, .form-tabs { border: 1px solid var(--rule); background: var(--surface); padding: 3px; }
.segmented { display: flex; gap: 3px; }
.segmented button { padding: 5px 8px; font: 11px/1.4 var(--font-mono); color: var(--muted); }
.segmented button:hover, .form-tabs button:hover { color: var(--ink); }
.segmented .active, .form-tabs .active { color: var(--mint); background: var(--hover); }
.activity-summary { color: var(--muted); font-size: 12px; margin-bottom: 15px; }
.activity-summary strong { color: var(--ink); font: 16px/1.4 var(--font-mono); }
.info-icon { color: var(--muted); display: inline-grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%; width: 15px; height: 15px; font-size: 10px; }
.heatmap-wrap { display: flex; gap: 9px; }
.heatmap-days { display: flex; flex-direction: column; justify-content: space-around; flex-shrink: 0; font: 9px/1 var(--font-mono); color: var(--muted); }
.heatmap-months, .heatmap-bottom { display: flex; justify-content: space-between; gap: 5px; color: var(--muted); font: 10px/1.4 var(--font-mono); }
.heatmap-months { padding: 0 0 8px 25px; }
.heatmap-bottom { flex-wrap: wrap; align-items: center; margin-top: 12px; }
.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, clamp(8px, 1.05vw, 13px)); grid-auto-columns: minmax(0, 1fr); gap: clamp(1px, .25vw, 3px); width: 100%; }
.heatmap-cell, .heatmap-legend i { background: var(--heat-0); }
.heatmap-cell:hover { outline: 1px solid var(--mint); }
.heatmap-cell[data-level="1"], .heatmap-legend i:nth-of-type(2) { background: var(--heat-1); }
.heatmap-cell[data-level="2"], .heatmap-legend i:nth-of-type(3) { background: var(--heat-2); }
.heatmap-cell[data-level="3"], .heatmap-legend i:nth-of-type(4) { background: var(--heat-3); }
.heatmap-cell[data-level="4"], .heatmap-legend i:nth-of-type(5) { background: var(--heat-4); }
.heatmap-cell.future { opacity: .45; }
.heatmap-legend { display: flex; gap: 4px; align-items: center; }
.heatmap-legend i { width: 8px; height: 8px; }
.language-content { display: flex; align-items: center; gap: clamp(13px, 2vw, 25px); padding: 21px 19px; }
.donut { position: relative; width: clamp(92px, 9vw, 132px); aspect-ratio: 1; flex-shrink: 0; }
.donut svg { display: block; width: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 12; }
.donut-track { stroke: var(--heat-0); }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 24px; line-height: 1.2; }
.donut-center span { font-size: 10px; color: var(--muted); }
.language-legend { display: grid; gap: 7px; width: 100%; min-width: 0; }
.language-item { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.language-item strong { font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.language-item span { margin-left: auto; color: var(--muted); font: 10px/1.4 var(--font-mono); }
.language-item i, .language-pill i { width: 7px; height: 7px; flex-shrink: 0; }
.bar-chart { height: 142px; display: flex; gap: 8px; padding: 0 5px; border-bottom: 1px solid var(--rule); }
.chart-bar { flex: 1; display: flex; align-items: center; flex-direction: column; justify-content: flex-end; min-width: 0; position: relative; }
.chart-bar .bar { min-height: 2px; width: 100%; max-width: 44px; background: var(--heat-3); }
.chart-bar span { position: absolute; bottom: -20px; color: var(--muted); font: 10px/1.4 var(--font-mono); }
.chart-label { margin: 31px 0 2px; color: var(--muted); font-size: 12px; }

/* Repository table and workspace panels */
.repo-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--rule); }
.input-search { flex: 1 1 220px; max-width: 340px; position: relative; }
.input-search .icon { position: absolute; top: 11px; left: 11px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.input-search input { width: 100%; padding: 8px 10px 8px 34px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { max-width: 180px; padding: 8px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--rule); }
th { background: var(--surface); color: var(--muted); font: 11px/1.4 var(--font-mono); }
td { font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--control); }
th button { display: flex; align-items: center; gap: 6px; padding: 0; }
th button:hover { color: var(--ink); }
.repo-name-cell, .repo-subtitle, .language-pill, .status-pill, .rating-inline { display: inline-flex; align-items: center; gap: 7px; }
.repo-symbol, .quick-icon, .commit-node { width: 33px; height: 33px; flex: 0 0 33px; display: grid; place-items: center; border: 1px solid var(--rule); background: var(--surface); color: var(--mint); }
.repo-title { display: block; font-weight: 570; }
.repo-open { padding: 0; text-align: left; overflow-wrap: anywhere; }
.repo-open:hover { color: var(--mint); text-decoration: underline; }
.repo-subtitle { color: var(--muted); font-size: 11px; }
.repo-subtitle .icon { width: 12px; height: 12px; }
.status-pill { flex-shrink: 0; padding: 4px 7px; background: var(--surface); border: 1px solid var(--rule); color: var(--muted); font: 10px/1.3 var(--font-mono); }
.status-pill i { width: 5px; height: 5px; flex: 0 0 5px; background: currentColor; }
.status-pill.green { background: var(--success-bg); border-color: var(--success-rule); color: var(--mint); }
.status-pill.amber { background: var(--warning-bg); border-color: var(--warning-rule); color: var(--warning); }
.status-pill.red { background: var(--danger-bg); border-color: var(--danger-rule); color: var(--danger); }
.rating-track { display: flex; gap: 2px; }
.rating-track i { width: 3px; height: 9px; background: var(--heat-0); }
.rating-track .filled { background: var(--heat-3); }
.table-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; padding: 11px 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 11px; }
.pagination { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); }
.pagination button { min-width: 28px; min-height: 28px; border: 1px solid var(--rule); font-size: 15px; }
.pagination button:hover:not(:disabled) { color: var(--mint); }
.quick-action { display: flex; align-items: center; gap: 10px; padding: 14px; text-align: left; font-size: 13px; }
.quick-action strong { display: block; font-weight: 550; }
.quick-action small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.quick-action > span:last-child { margin-left: auto; color: var(--mint); }
.empty-state { padding: 42px 20px; text-align: center; color: var(--muted); white-space: normal; font-size: 13px; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); font-weight: 550; }
.empty-state .button { margin-top: 12px; }
.loading-state { display: grid; min-height: 340px; place-content: center; justify-items: center; color: var(--muted); }
.spinner { display: inline-block; flex-shrink: 0; width: 20px; height: 20px; border: 2px solid var(--rule); border-top-color: var(--mint); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.panel-intro, .settings-list, .timeline { padding: 12px 19px; }
.panel-intro { color: var(--muted); font-size: 13px; }
.settings-row, .timeline-row, .check-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.settings-row:last-child, .timeline-row:last-child, .check-list li:last-child { border-bottom: 0; }
.settings-row > div, .timeline-row > div, .check-list li > span { min-width: 0; overflow-wrap: anywhere; }
.settings-row strong, .check-list strong { font-size: 13px; font-weight: 550; }
.settings-row small, .check-list small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.settings-value { max-width: 56%; text-align: right; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.connection-card, .project-card { padding: 17px 19px; }
.project-card { margin-bottom: 14px; }
.connection-card h3, .project-heading h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 550; overflow-wrap: anywhere; }
.connection-card p { color: var(--muted); font-size: 12px; }
.project-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 14px 19px; }
.policy-rule { min-width: 0; padding: 12px; border: 1px solid var(--rule); overflow-wrap: anywhere; }
.policy-rule strong { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 500; }
.policy-rule span { font: 16px/1.4 var(--font-mono); }
.check-list, .workflow-steps { list-style: none; padding: 0; margin: 0; }
.check-list li { justify-content: flex-start; }
.check-list .status-pill, .timeline-row time { margin-left: auto; }
.check-mark { color: var(--mint); }
.check-mark.fail { color: var(--danger); }
.check-mark.unknown { color: var(--warning); }
.timeline-message { overflow-wrap: anywhere; }
.timeline-meta { display: flex; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 12px; }
.timeline-row time { white-space: nowrap; color: var(--muted); font: 10px/1.5 var(--font-mono); }

.notice { padding: 12px 14px; margin-bottom: 15px; border: 1px solid var(--rule); border-left: 2px solid var(--mint); background: var(--control); color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.notice code, .notice a:not(.button) { color: var(--mint); }
.job-card { padding: 18px; margin-bottom: 12px; }
.job-heading, .job-title { display: flex; gap: 8px; }
.job-heading { justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.job-title { align-items: center; font-size: 15px; font-weight: 560; overflow-wrap: anywhere; min-width: 0; }
.job-title .icon { color: var(--mint); }
.job-meta { margin: 7px 0 9px; color: var(--muted); font-size: 12px; }
.job-stage { color: var(--ink); font: 11px/1.6 var(--font-mono); overflow-wrap: anywhere; }
.job-actions { margin-top: 12px; }
.logs-label { margin-top: 14px; color: var(--mint); font-size: 12px; cursor: pointer; }
.job-log { color-scheme: dark; max-height: 360px; overflow: auto; margin: 10px 0 0; padding: 13px; border: 1px solid #363d3e; background: #0b0d0e; color: #cbd7d4; font: 11px/1.7 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Analysis, repository details, and guide */
dialog { max-width: calc(100% - 28px); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid var(--rule); background: var(--panel); color: var(--ink); box-shadow: 0 24px 90px #0009; }
dialog::backdrop { background: #050809b5; backdrop-filter: blur(4px); }
.analysis-dialog { width: 660px; }
.detail-dialog { width: 780px; }
.guide-dialog { width: 550px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 24px; border-bottom: 1px solid var(--rule); }
.dialog-head h2 { margin: 0; font-size: clamp(28px, 4vw, 44px); font-weight: 550; letter-spacing: -.065em; line-height: 1.05; overflow-wrap: anywhere; }
.dialog-head p { color: var(--muted); margin: 7px 0 0; font-size: 13px; }
.dialog-body { padding: 20px 24px 24px; }
.form-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; margin-bottom: 17px; }
.form-tabs button { min-height: 40px; padding: 6px; color: var(--muted); font-size: 12px; }
.field { margin-bottom: 17px; min-width: 0; font-size: 13px; }
.field label { display: block; margin-bottom: 6px; font-weight: 550; }
.input-search input, .filter, .field input, .field select, .field textarea { border: 1px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: 0; font-size: 13px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
.field input, .field select, .field textarea { display: block; width: 100%; padding: 10px 11px; }
.field input[type="file"]::file-selector-button { margin-right: 9px; padding: 6px 9px; border: 1px solid var(--rule); background: var(--control); color: var(--ink); cursor: pointer; }
.field textarea { min-height: 120px; resize: vertical; font-family: var(--font-mono); }
.field small, .key-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.form-row, .portfolio-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-error { color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger-rule); padding: 10px 12px; margin-bottom: 12px; font-size: 13px; overflow-wrap: anywhere; }
.dialog-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 16px; border-top: 1px solid var(--rule); }
.analysis-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.analysis-toolbar > :first-child { margin-right: auto; }
.analysis-feedback:empty { display: none; }
.analysis-dialog[aria-busy="true"] .form-tabs { opacity: .65; }
.portfolio-row { padding: 13px; margin-bottom: 12px; border: 1px solid var(--rule); }
.portfolio-row .field { display: block; margin-bottom: 10px; }
.upload-progress { display: block; width: 100%; margin-top: 8px; accent-color: var(--mint); }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 17px; }
.detail-stat { padding: 12px; border: 1px solid var(--rule); background: var(--surface); color: var(--mint); font: 20px/1.3 var(--font-mono); }
.detail-stat small { display: block; margin-bottom: 6px; color: var(--muted); font: 11px/1.4 var(--font-sans); }
.detail-section { margin-top: 19px; }
.detail-section h3 { margin: 0 0 9px; font-size: 14px; font-weight: 550; }
.detail-meta, .tag-list { display: flex; flex-wrap: wrap; gap: 7px 11px; color: var(--muted); font-size: 12px; }
.detail-meta { margin-top: 8px; }
.tag, .detail-source { border: 1px solid var(--rule); background: var(--surface); padding: 6px 8px; }
.detail-language { display: grid; grid-template-columns: minmax(70px, 100px) 1fr auto; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; overflow-wrap: anywhere; }
.progress-track { height: 5px; background: var(--heat-0); overflow: hidden; }
.progress-track i { display: block; height: 100%; }
.detail-source { color: var(--muted); font: 11px/1.65 var(--font-mono); overflow-wrap: anywhere; }
.detail-actions { margin-top: 17px; justify-content: space-between; }
.workflow-steps li { padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.workflow-steps li:last-child { border-bottom: 0; }
.workflow-steps strong { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 550; }
.toasts { position: fixed; z-index: 100; right: 16px; bottom: 16px; left: 16px; display: grid; justify-items: end; gap: 8px; pointer-events: none; }
.toast { max-width: 390px; padding: 12px 15px; border: 1px solid var(--rule); border-left: 2px solid var(--mint); background: var(--control); color: var(--ink); overflow-wrap: anywhere; }
.toast.error { border-left-color: var(--danger); }

@media (max-width: 1200px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-grid { grid-template-columns: 1fr; }
}
@media (max-width: 950px) {
  :root { --sidebar: 184px; }
  .two-column, .quick-actions, .provider-grid { grid-template-columns: 1fr; }
  .search-trigger kbd { display: none; }
}
@media (max-width: 740px) {
  :root { --sidebar: min(254px, 85vw); --gutter: 18px; }
  .sidebar { transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility .2s; }
  .sidebar.open { transform: translateX(0); visibility: visible; }
  .sidebar.open + .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 25; background: #050809b5; }
  .app-shell { margin-left: 0; }
  .icon-button.mobile-only { display: inline-grid; }
  .topbar-inner { min-height: 59px; }
  .breadcrumb, .header-actions { gap: 5px; }
  .search-trigger span:nth-child(2) { display: none; }
  main { padding-top: 28px; }
  .page-heading { gap: 17px; margin-bottom: 23px; }
  .hero { min-height: 245px; }
  .metric { padding: 12px; }
  .metrics { gap: 9px; }
  .repo-toolbar { align-items: stretch; }
  .input-search { max-width: none; }
  .job-log { max-height: 270px; }
}
@media (max-width: 480px) {
  .breadcrumb > span { display: none; }
  .metric-label { font-size: 10px; letter-spacing: 0; }
  .hero { padding: 23px 16px; }
  .hero h1 { font-size: clamp(37px, 12vw, 46px); }
  .hero .button { min-height: 40px; padding-inline: 10px; }
  .heatmap-months { font-size: 8px; }
  .form-tabs, .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row, .portfolio-fields, .policy-grid { grid-template-columns: 1fr; gap: 8px; }
  .dialog-head, .dialog-body { padding: 16px; }
  .timeline-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
