:root {
  color-scheme: light;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --foreground: #182723;
  --secondary: #465650;
  --muted: #66736d;
  --background: #f5f7f4;
  --surface: #ffffff;
  --surface-alt: #eef3ef;
  --border: #dbe4dd;
  --border-soft: #e7ece8;
  --border-strong: #bfcac2;
  --accent: #176448;
  --accent-soft: #e0eee5;
  --danger: #a83f36;
  --success: #24704f;
  --warning: #8a6112;
  --warning-surface: #fff8e7;
  --shadow-color: #18272324;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --foreground: #e7eee9;
  --secondary: #b5c2bb;
  --muted: #91a098;
  --background: #111815;
  --surface: #18211d;
  --surface-alt: #202c27;
  --border: #33423b;
  --border-soft: #29362f;
  --border-strong: #53645b;
  --accent: #72c99f;
  --accent-soft: #183c2d;
  --danger: #ef8d84;
  --success: #72c99f;
  --warning: #e2b75d;
  --warning-surface: #382d17;
  --shadow-color: #00000055;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    color-scheme: dark;
    --foreground: #e7eee9; --secondary: #b5c2bb; --muted: #91a098; --background: #111815;
    --surface: #18211d; --surface-alt: #202c27; --border: #33423b; --border-soft: #29362f;
    --border-strong: #53645b; --accent: #72c99f; --accent-soft: #183c2d; --danger: #ef8d84;
    --success: #72c99f; --warning: #e2b75d; --warning-surface: #382d17; --shadow-color: #00000055;
  }
}
html[data-accent="blue"] { --accent: #285f9f; --accent-soft: #e1ebf7; --success: #285f9f; }
html[data-accent="purple"] { --accent: #6b4ca0; --accent-soft: #ece6f5; --success: #6b4ca0; }
html[data-accent="amber"] { --accent: #8a5a08; --accent-soft: #f7ecd5; --success: #8a5a08; }
html[data-theme="dark"][data-accent="blue"] { --accent: #7db7f4; --accent-soft: #18314d; --success: #7db7f4; }
html[data-theme="dark"][data-accent="purple"] { --accent: #c2a3f3; --accent-soft: #312348; --success: #c2a3f3; }
html[data-theme="dark"][data-accent="amber"] { --accent: #efbd63; --accent-soft: #3c2d14; --success: #efbd63; }
@media (prefers-color-scheme: dark) {
  html[data-theme="system"][data-accent="blue"] { --accent: #7db7f4; --accent-soft: #18314d; --success: #7db7f4; }
  html[data-theme="system"][data-accent="purple"] { --accent: #c2a3f3; --accent-soft: #312348; --success: #c2a3f3; }
  html[data-theme="system"][data-accent="amber"] { --accent: #efbd63; --accent-soft: #3c2d14; --success: #efbd63; }
}
html[data-text-size="compact"] { --body-size: 13px; }
html[data-text-size="standard"] { --body-size: 14px; }
html[data-text-size="large"] { --body-size: 16px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--foreground); background: var(--background); font-size: var(--body-size, 14px); line-height: 1.5; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns 160ms ease; }
.navigation-collapsed .app-shell { grid-template-columns: 0 minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; gap: 28px; border-right: 1px solid var(--border); background: var(--surface); padding: 25px 15px 20px; }
.navigation-collapsed .sidebar { visibility: hidden; overflow: hidden; padding-inline: 0; }
.rail-heading { display: flex; align-items: center; padding: 5px 12px; }
.brand { color: var(--foreground); font-size: 19px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; }
.brand span { color: var(--accent); }
.rail-label, .eyebrow { margin: 0; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .055em; line-height: 1.35; }
.rail-label { padding: 0 12px; }
.sidebar nav { display: grid; gap: 4px; margin-top: -18px; }
.nav-item { display: block; min-height: 40px; border-radius: 5px; padding: 9px 12px; color: var(--secondary); font-weight: 600; text-decoration: none; }
.nav-item:hover, .nav-item:focus-visible { background: var(--surface-alt); }
.nav-item.active { color: var(--accent); background: var(--accent-soft); }
.rail-bottom { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); color: var(--secondary); font-size: 12px; }
.rail-bottom small { color: var(--muted); }
.local-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--accent); }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 64px; padding: 0 36px; border-bottom: 1px solid var(--border); background: var(--surface); }
.menu-button { display: inline-flex; width: 58px; height: 38px; align-items: center; justify-content: center; gap: 2px; padding: 0; border: 0; border-radius: 5px; color: var(--secondary); background: transparent; cursor: pointer; }
.menu-button:hover, .menu-button:focus-visible { color: var(--accent); background: var(--accent-soft); }
.menu-button svg, .mobile-nav summary svg, .settings-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-button .collapse-chevron { width: 15px; transition: transform 160ms ease; }
.navigation-collapsed .menu-button .collapse-chevron { transform: rotate(180deg); }
.profile-link { display: inline-flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 5px; color: var(--foreground); text-decoration: none; }
.profile-link:hover, .profile-link:focus-visible { background: var(--accent-soft); }
.profile-avatar { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; color: var(--surface); background: var(--accent); font-size: 12px; font-weight: 700; }
.profile-copy { display: grid; line-height: 1.2; }
.profile-copy strong { font-size: 12px; font-weight: 650; }
.profile-copy small { color: var(--muted); font-size: 10px; }
.settings-button { display: inline-flex; width: 38px; height: 38px; margin-left: auto; align-items: center; justify-content: center; border-radius: 5px; color: var(--secondary); }
.settings-button:hover, .settings-button:focus-visible, .settings-button.active { color: var(--accent); background: var(--accent-soft); }
.theme-picker { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.theme-picker select { width: auto; min-height: 32px; padding: 4px 26px 4px 8px; font-size: 12px; }
.mobile-nav { display: none; }
main { width: min(1180px, 100%); margin: 0 auto; padding: 36px 36px 80px; }
.page-heading h1 { margin: 6px 0 6px; font-size: 30px; font-weight: 650; letter-spacing: -.025em; line-height: 1.15; }
.page-heading > p:last-child { margin: 0; color: var(--secondary); }
.connection-endpoint { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 28px 0 30px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.connection-endpoint strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font-family: Consolas, monospace; font-size: 15px; }
.access-key-section { margin: 0 0 34px; padding: 22px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.access-key-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 28px; align-items: end; }
.access-key-heading h2 { margin: 4px 0 6px; font-size: 20px; }
.access-key-heading p:last-child { margin: 0; color: var(--secondary); }
.new-key-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.new-key-form .form-message { grid-column: 1 / -1; }
.one-time-key { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-top: 20px; padding: 14px; border: 1px solid var(--warning); border-radius: 5px; background: var(--warning-surface); }
.one-time-key[hidden] { display: none; }
.one-time-key div { display: grid; }
.one-time-key small { color: var(--muted); }
.one-time-key code { overflow: auto; padding: 8px; background: var(--surface); white-space: nowrap; }
.access-key-list { margin-top: 20px; border-top: 1px solid var(--border); }
.access-key-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.access-key-row > div { display: grid; gap: 2px; }
.access-key-row small { color: var(--muted); }
.access-key-row button { min-height: 32px; padding: 4px 9px; font-size: 11px; }
.key-status { color: var(--secondary); font-size: 12px; font-weight: 600; }
.auth-warning { margin: 0 0 34px; padding: 16px 18px; border: 1px solid var(--warning); border-radius: 6px; background: var(--warning-surface); }
.settings-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 260px); align-items: center; gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.settings-section h2 { margin: 0 0 5px; font-size: 20px; }
.settings-section p { margin: 0; color: var(--secondary); }
.settings-value { display: grid; gap: 3px; }
.settings-value small { color: var(--muted); }
.appearance-controls { display: grid; gap: 10px; }
.environment-section, .tag-sets-section { margin: 28px 0; padding: 22px 0; border-block: 1px solid var(--border); }
.environment-section .section-title p, .tag-sets-section .section-title p { margin: 4px 0 0; color: var(--secondary); }
.environment-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 28px; margin-top: 18px; align-items: start; }
.environment-list { display: grid; gap: 0; }
.environment-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.environment-row > div { display: grid; grid-template-columns: minmax(110px, auto) minmax(60px, auto) 1fr; gap: 12px; align-items: baseline; min-width: 0; }
.environment-row code { color: var(--accent); font-weight: 700; }
.environment-row strong, .environment-row small { overflow-wrap: anywhere; }
.environment-row small { color: var(--muted); }
.environment-row form { display: flex; align-items: center; }
.environment-form { padding: 16px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.environment-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, .7fr); gap: 10px; }
.compact-empty { padding: 18px; }
.tag-set-list { display: grid; }
.tag-set-row { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.tag-set-row > div { display: grid; gap: 7px; min-width: 0; }
.tag-set-values { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-set-values code { padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; color: var(--accent); background: var(--surface-alt); font-size: 11px; }
.test-pattern-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 28px 0 20px; }
.pattern-panel { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.pattern-panel h2 { margin: 6px 0 8px; font-size: 20px; }
.swatch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.swatch { min-height: 70px; padding: 10px; border: 1px solid var(--border); border-radius: 4px; }
.swatch-accent { background: var(--accent); color: var(--background); }
.swatch-surface { background: var(--surface-alt); }
.swatch-success { background: var(--success); color: var(--background); }
.swatch-danger { background: var(--danger); color: var(--surface); }
.pattern-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 12px; }
.pattern-controls label { min-width: 140px; flex: 1; }
.pattern-message { margin-top: 12px; color: var(--success); }
.pattern-states { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.status-sample { padding: 4px 8px; border: 1px solid currentColor; border-radius: 4px; font-size: 12px; font-weight: 600; }
.status-success { color: var(--success); }.status-warning { color: var(--warning); }.status-danger { color: var(--danger); }
.auth-warning p { margin: 5px 0 0; color: var(--secondary); }
.connection-layout { display: grid; grid-template-columns: 195px minmax(0, 1fr); gap: 32px; }
.connection-index { display: grid; align-content: start; gap: 2px; position: sticky; top: 18px; height: max-content; }
.connection-index a { padding: 7px 9px; border-left: 2px solid var(--border); color: var(--secondary); font-size: 12px; font-weight: 700; text-decoration: none; }
.connection-index a:hover, .connection-index a:focus-visible { border-color: var(--accent); color: var(--accent); }
.connection-guides { min-width: 0; }
.connection-guide { padding: 0 0 26px; margin-bottom: 26px; border-bottom: 1px solid var(--border); scroll-margin-top: 20px; }
.connection-guide h2 { margin: 0 0 7px; font-size: 19px; }
.connection-guide p { margin: 0 0 12px; color: var(--secondary); }
.connection-guide a { font-size: 12px; font-weight: 700; }
.setup-snippet { position: relative; margin: 12px 0; }
.setup-snippet pre { overflow: auto; margin: 0; padding: 16px 75px 16px 16px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--foreground); font-size: 12px; line-height: 1.5; }
.setup-snippet button { position: absolute; top: 8px; right: 8px; min-height: 30px; padding: 4px 9px; font-size: 11px; }
.routes-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.routes-heading p:last-child { margin: 0; color: var(--secondary); }
.routes-heading button { flex: none; }
.route-detail-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.route-detail-heading > div { min-width: 0; }
.action-menu { position: relative; flex: none; margin-top: 17px; }
.action-menu-trigger { display: grid; width: 42px; min-width: 42px; height: 42px; min-height: 42px; place-items: center; padding: 0; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: #fff; line-height: 0; }
.action-menu-icon { display: block; width: 20px; height: 20px; overflow: visible; }
.action-menu-icon path { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.action-menu-trigger:hover, .action-menu-trigger[aria-expanded="true"] { background: #104e38; }
.action-menu-popover[hidden] { display: none; }
.action-menu-popover { position: absolute; z-index: 4; top: 50px; right: 0; width: 280px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); box-shadow: 0 12px 30px #18272320; }
.action-menu-popover > button, .action-menu-popover > a { display: grid; width: 100%; min-height: 0; gap: 2px; padding: 12px 14px; border: 0; border-radius: 4px; background: transparent; color: var(--foreground); font-weight: 400; line-height: 1.4; text-align: left; text-decoration: none; }
.action-menu-popover > button:hover, .action-menu-popover > a:hover, .action-menu-popover > button:focus-visible, .action-menu-popover > a:focus-visible { background: var(--surface-alt); }
.action-menu-popover strong { font-size: 14px; font-weight: 600; }
.action-menu-popover small { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
.route-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 32px 0 14px; }
.route-toolbar h2 { margin: 4px 0 0; font-size: 20px; font-weight: 650; letter-spacing: -.015em; line-height: 1.25; }
.view-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.view-switch button { min-height: 34px; border: 0; border-radius: 4px; padding: 5px 12px; background: transparent; color: var(--secondary); font-size: 12px; }
.view-switch button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.route-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.route-list > .empty { grid-column: 1 / -1; }
.route-list[data-view="rows"] { grid-template-columns: 1fr; gap: 0; }
.route-order-help { margin: -14px 0 18px; color: var(--muted); font-size: 12px; }
.route-order-help [role="status"] { color: var(--accent); }
.route-card { position: relative; min-width: 0; min-height: 172px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.route-card:hover, .route-card:focus-within { border-color: var(--accent); }
.route-card.is-dragging { opacity: .52; border-color: var(--accent); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.route-card-link { display: grid; align-content: start; gap: 10px; min-height: 172px; padding: 52px 17px 17px; color: var(--foreground); text-decoration: none; }
.route-card-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.route-order-actions { position: absolute; z-index: 2; top: 11px; right: 11px; display: flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.route-drag-handle { display: grid; width: 26px; height: 26px; place-items: center; color: var(--muted); cursor: grab; }
.route-drag-handle svg, .route-move-button svg { width: 16px; height: 16px; fill: currentColor; }
.route-move-button { display: grid; width: 26px; height: 26px; min-height: 0; padding: 0; place-items: center; border: 0; border-radius: 3px; background: transparent; color: var(--secondary); }
.route-move-button svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
.route-move-button:hover:not(:disabled), .route-move-button:focus-visible { background: var(--accent-soft); color: var(--accent); }
.route-move-button:disabled { opacity: .28; cursor: default; }
.route-card-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.route-card-heading strong { overflow-wrap: anywhere; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.route-card-heading span { color: var(--accent); font-size: 17px; }
.route-card p { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin: 0; color: var(--secondary); }
.route-types { display: flex; flex-wrap: wrap; gap: 5px; }
.route-type { padding: 2px 7px; border: 1px solid var(--border); border-radius: 4px; color: var(--secondary); font-size: 11px; }
.route-type strong { color: var(--foreground); }
.route-card small { align-self: end; color: var(--muted); font-size: 11px; }
.route-list[data-view="rows"] .route-card { display: grid; min-height: 0; grid-template-columns: auto 1fr; align-items: center; gap: 12px; border-radius: 0; border-width: 0 0 1px; background: transparent; }
.route-list[data-view="rows"] .route-card:first-child { border-top-width: 1px; }
.route-list[data-view="rows"] .route-order-actions { position: static; border: 0; background: transparent; }
.route-list[data-view="rows"] .route-card-link { min-height: 0; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr) minmax(90px, 1fr) minmax(135px, auto); align-items: center; gap: 12px; padding: 15px 0; }
.route-list[data-view="rows"] .route-card-heading { display: grid; justify-content: start; gap: 2px; padding-right: 0; }
.route-list[data-view="rows"] .route-card p { -webkit-line-clamp: 1; }
.route-list[data-view="rows"] .route-card small { align-self: center; white-space: nowrap; }
.back-link { display: inline-block; margin-bottom: 22px; font-weight: 700; text-decoration: none; }
.route-detail-heading h1 { overflow-wrap: anywhere; }
.route-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; }
.route-item-content { min-width: 0; flex: 1; }
.route-item .row-heading { justify-content: start; }
.route-item-actions { display: flex; flex: none; align-items: center; gap: 6px; margin-left: auto; }
.route-item-actions form { flex: none; }
.route-item > .edit-panel { flex: 1 1 100%; }
.route-item p a { overflow-wrap: anywhere; }
.action-icon-button { display: inline-flex; align-items: center; gap: 5px; }
.row-action-icon { display: block; width: 14px; height: 14px; flex: none; }
.row-action-icon path { fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.text-button { min-height: 32px; border: 0; padding: 4px 7px; background: transparent; color: var(--accent); font-size: 12px; }
.text-button:hover { background: var(--accent-soft); }
dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100% - 32px); border: 1px solid var(--border); border-radius: 6px; padding: 24px; background: var(--surface); color: var(--foreground); box-shadow: 0 18px 50px #18272324; }
dialog::backdrop { background: #18272366; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-heading h2 { margin: 0; font-size: 20px; }
dialog form > button[type="submit"] { justify-self: start; }
.filter-bar { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(2, minmax(130px, 1fr)) auto; align-items: end; gap: 10px; margin: 26px 0 32px; }
.filter-bar button { min-width: 76px; }
.page-results { margin-top: 30px; }
.result-count { margin-left: 4px; color: var(--muted); font-size: 13px; font-weight: 400; }
.overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 26px 0 34px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.overview > * { display: grid; gap: 1px; min-height: 74px; padding: 13px 20px; color: var(--secondary); text-decoration: none; }
.overview > * + * { border-left: 1px solid var(--border); }
.overview strong { color: var(--foreground); font-size: 21px; line-height: 1.1; }
.overview span { font-size: 12px; }
.section-grid, .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.list-section { min-width: 0; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title h2 { margin: 4px 0 0; font-size: 20px; font-weight: 650; letter-spacing: -.015em; line-height: 1.25; }
.section-title a { white-space: nowrap; font-size: 12px; font-weight: 700; text-decoration: none; }
.artifact-row { min-width: 0; padding: 16px 0; border-top: 1px solid var(--border-soft); }
.row-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.row-heading strong { overflow-wrap: anywhere; font-size: 14px; font-weight: 600; }
.type-label { flex: none; color: var(--accent); font-size: 12px; font-weight: 600; }
.artifact-row p { overflow: hidden; margin: 4px 0; color: var(--secondary); text-overflow: ellipsis; white-space: nowrap; }
.artifact-row small { color: var(--muted); font-size: 11px; }
.empty { min-height: 110px; margin: 0; padding: 25px 0; border-top: 1px solid var(--border); color: var(--muted); }
.create-section { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border-soft); }
.capture-heading { margin-bottom: 18px; }
.capture-heading h2 { margin: 4px 0 5px; font-size: 20px; font-weight: 650; letter-spacing: -.015em; line-height: 1.25; }
.capture-heading > p:last-child { margin: 0; color: var(--secondary); }
.capture-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 34px; align-items: start; }
.capture-composer { min-width: 0; padding: 22px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.capture-fields-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; }
.capture-body { min-height: 190px; }
.advanced-fields { padding-top: 4px; border-top: 1px solid var(--border); }
.advanced-fields summary { padding: 10px 0 6px; color: var(--accent); font-size: 12px; font-weight: 700; cursor: pointer; }
.advanced-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 8px; }
.capture-submit { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.capture-submit span { color: var(--muted); font-size: 12px; }
.capture-support { padding-left: 28px; border-left: 1px solid var(--border); }
.capture-support h3 { margin: 1px 0 5px; font-size: 16px; font-weight: 650; }
.capture-support > p { margin: 0 0 12px; color: var(--secondary); font-size: 12px; }
.source-action { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 12px 2px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; color: var(--foreground); text-align: left; }
.source-action:hover { background: var(--surface-alt); }
.source-action span { display: grid; gap: 2px; }
.source-action strong { font-size: 14px; font-weight: 600; }
.source-action small { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.45; }
.source-action b { color: var(--accent); font-size: 16px; }
.capture-support .capture-privacy { margin-top: 16px; color: var(--muted); }
.form-grid { align-items: start; gap: 18px; }
.form-panel { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.attach-existing { max-width: 680px; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.attach-existing summary { color: var(--accent); font-weight: 700; cursor: pointer; }
.attach-existing form { margin-top: 16px; }
.attach-existing form button { justify-self: start; }
.editor-form { max-width: 680px; }
.editor-form button { justify-self: start; }
.form-stack { display: grid; gap: 12px; }
h3 { margin: 0 0 2px; font-size: 16px; font-weight: 650; }
label { display: grid; gap: 5px; color: var(--secondary); font-size: 12px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 38px; border: 1px solid #bfcac2; border-radius: 4px; padding: 8px 10px; background: var(--surface); color: var(--foreground); font-size: 14px; font-weight: 400; }
textarea { min-height: 110px; resize: vertical; }
select[multiple] { min-height: 116px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
button { min-height: 38px; border: 1px solid var(--accent); border-radius: 4px; padding: 8px 14px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
button:hover { background: #104e38; }
.heading-actions, .artifact-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.secondary-button { border-color: var(--border-strong); background: var(--surface); color: var(--accent); }
.secondary-button:hover { background: var(--surface-alt); }
.edit-button { min-height: 32px; border: 0; padding: 4px 7px; background: transparent; color: var(--accent); font-size: 12px; }
.edit-panel { flex: 1 1 100%; min-width: 0; }
.button-link { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 4px; font-size: 13px; font-weight: 700; text-decoration: none; }
.artifact-index-row { display: grid; gap: 5px; }
.artifact-routes { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.meta-label { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .055em; }
.route-chip { display: inline-flex; padding: 3px 7px; border: 1px solid var(--border); border-radius: 12px; color: var(--accent); font-size: 11px; font-weight: 700; text-decoration: none; }
.quick-edit { flex: 1 1 100%; margin-top: 8px; }
.quick-edit summary { display: inline-block; color: var(--accent); font-size: 12px; font-weight: 700; cursor: pointer; }
.quick-edit-form { display: grid; gap: 10px; max-width: 680px; margin-top: 12px; padding: 14px; border: 1px solid var(--border); background: var(--surface-alt); }
.quick-edit-form textarea { min-height: 80px; }
.route-attach-form { display: flex; align-items: center; gap: 8px; }
.route-attach-form select { width: auto; min-width: 150px; min-height: 32px; padding: 5px 8px; font-size: 12px; }
.route-attach-form .form-message { max-width: 180px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button:disabled { opacity: .6; cursor: wait; }
.muted { margin: 0; color: var(--muted); font-size: 12px; font-weight: 400; }
.form-message { margin: 0; color: var(--danger); font-size: 12px; }
.form-message:empty { display: none; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 172px minmax(0, 1fr); }
  .topbar { padding: 0 22px; }
  main { padding: 28px 22px 64px; }
  .section-grid, .form-grid { gap: 18px; }
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-list[data-view="rows"] .route-card-link { grid-template-columns: minmax(130px, 1fr) minmax(130px, 2fr) auto; }
  .route-list[data-view="rows"] .route-card small { display: none; }
}
@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .navigation-collapsed .app-shell, .app-shell { display: block; }
  .topbar { justify-content: flex-start; min-height: 56px; padding: 0 16px; }
  .desktop-menu-button { display: none; }
  .mobile-nav { display: block; position: relative; }
  .mobile-nav summary { display: inline-flex; align-items: center; gap: 7px; padding: 8px 4px; color: var(--accent); font-weight: 700; cursor: pointer; list-style: none; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav nav { position: absolute; z-index: 2; top: 38px; left: 0; display: grid; min-width: 150px; padding: 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); box-shadow: 0 6px 16px #18272314; }
  .mobile-nav nav a { padding: 9px; text-decoration: none; }
  main { padding: 24px 16px 56px; }
  .page-heading h1 { font-size: 25px; }
  .overview { margin: 20px 0 28px; }
  .overview > * { padding: 12px; }
  .overview strong { font-size: 17px; }
  .section-grid, .form-grid { grid-template-columns: 1fr; gap: 26px; }
  .filter-bar { grid-template-columns: 1fr 1fr; gap: 10px; }
  .filter-bar label:first-child { grid-column: 1 / -1; }
  .filter-bar button { grid-column: 1 / -1; }
  .create-section { margin-top: 30px; }
  .capture-layout { grid-template-columns: 1fr; gap: 24px; }
  .capture-fields-row, .advanced-fields-grid { grid-template-columns: 1fr; }
  .capture-support { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .capture-submit { align-items: start; flex-direction: column; }
  .routes-heading { align-items: start; }
  .routes-heading > .action-menu, .route-detail-heading > .action-menu { margin-top: 17px; }
  .route-detail-heading { align-items: start; }
  .heading-actions { margin-top: 22px; }
  .route-list { grid-template-columns: 1fr; }
  .environment-fields { grid-template-columns: 1fr; }
  .route-list[data-view="rows"] .route-card { grid-template-columns: auto 1fr; }
  .route-list[data-view="rows"] .route-card-link { grid-template-columns: 1fr auto; gap: 5px 10px; }
  .route-list[data-view="rows"] .route-card p { grid-column: 1 / -1; }
  .route-list[data-view="rows"] .route-card .route-types { grid-column: 1 / -1; }
  .route-toolbar { margin-top: 26px; }
  .connection-layout { grid-template-columns: 1fr; gap: 20px; }
  .test-pattern-grid, .settings-section, .environment-layout { grid-template-columns: 1fr; }
  .environment-row > div { grid-template-columns: 1fr; gap: 2px; }
  .access-key-heading { grid-template-columns: 1fr; }
  .one-time-key { grid-template-columns: 1fr auto; }
  .one-time-key div { grid-column: 1 / -1; }
  .connection-index { position: static; display: flex; flex-wrap: wrap; gap: 2px 8px; }
  .connection-index a { border-left: 0; border-bottom: 2px solid var(--border); }
}
@media (max-width: 380px) {
  .routes-heading { display: grid; }
  .routes-heading button { justify-self: start; margin-top: 0; }
}
