:root {
  --paper: #f4f1e8;
  --paper-deep: #e8e2d5;
  --surface: #fffdf8;
  --surface-solid: #fffefa;
  --ink: #172019;
  --ink-2: #435047;
  --ink-3: #758078;
  --line: rgba(23, 32, 25, .12);
  --line-strong: rgba(23, 32, 25, .24);
  --coral: #ed6045;
  --coral-soft: #ffe0d7;
  --lime: #b9ed63;
  --lime-soft: #e9f7ce;
  --green: #247552;
  --green-soft: #dcefe3;
  --blue: #355eaf;
  --blue-soft: #dfe8fa;
  --amber: #9c6018;
  --amber-soft: #f7e7c6;
  --red: #b43d35;
  --red-soft: #f7dcd8;
  --shadow-soft: 0 9px 28px rgba(25, 33, 27, .065);
  --shadow: 0 22px 60px rgba(25, 33, 27, .13);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 27px;
  --sidebar: 250px;
  --content: 1240px;
  color-scheme: light;
  font-family: "Avenir Next", "Century Gothic", Futura, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 98% -4%, rgba(185, 237, 99, .28), transparent 27rem),
    radial-gradient(circle at -8% 88%, rgba(237, 96, 69, .11), transparent 31rem),
    linear-gradient(115deg, rgba(255,255,255,.16), transparent 44%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(53, 94, 175, .28);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
.mono, code, pre { font-family: "IBM Plex Mono", "Cascadia Code", "SFMono-Regular", monospace; }
.muted { color: var(--ink-3); }
.small { font-size: .76rem; }
.danger-text { color: var(--red); }
.nowrap { white-space: nowrap; }
.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--ink-2); font-size: .82rem; font-weight: 700; }
.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; }

.icon { width: 1.12rem; height: 1.12rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: .92rem; height: .92rem; }
.icon-lg { width: 1.42rem; height: 1.42rem; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: var(--ink); background: var(--lime); font-size: .82rem; font-weight: 900; letter-spacing: -.05em; }

/* Login */
.login-shell { min-height: 100svh; padding: 12px; }
.login-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  min-height: calc(100svh - 24px);
  padding: clamp(25px, 7vw, 72px);
  border-radius: 29px;
  color: #faf7ee;
  background: var(--ink);
}
.login-panel::before { content: ""; position: absolute; z-index: -1; right: -155px; top: -165px; width: 390px; height: 390px; border-radius: 43% 57% 63% 37%; background: var(--lime); transform: rotate(21deg); }
.login-panel::after { content: ""; position: absolute; z-index: -1; left: -110px; bottom: 8%; width: 230px; height: 230px; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; box-shadow: 0 0 0 40px rgba(255,255,255,.035), 0 0 0 78px rgba(255,255,255,.02); }
.login-brand { display: flex; align-items: center; gap: 11px; font-weight: 850; letter-spacing: -.04em; }
.login-copy { max-width: 620px; margin: 50px 0 38px; }
.login-kicker, .eyebrow { color: var(--ink-3); font: 600 .65rem "IBM Plex Mono", "Cascadia Code", monospace; text-transform: uppercase; letter-spacing: .13em; }
.login-kicker { color: var(--lime); }
.login-copy h1 { max-width: 600px; margin: 14px 0 18px; font-size: clamp(2.55rem, 10vw, 5.5rem); line-height: .92; letter-spacing: -.075em; }
.login-copy p { max-width: 480px; margin: 0; color: rgba(250,247,238,.67); font-size: .88rem; line-height: 1.65; }
.login-form { width: min(100%, 420px); padding: 22px; border-radius: 22px; color: var(--ink); background: rgba(255,253,248,.985); box-shadow: 0 32px 75px rgba(0,0,0,.28); }
.login-form h2 { margin: 0 0 5px; font-size: 1.2rem; letter-spacing: -.04em; }
.login-form p { margin: 0 0 18px; color: var(--ink-3); font-size: .76rem; line-height: 1.5; }
.form-error { margin-top: 11px; padding: 10px 12px; border-radius: 11px; color: var(--red); background: var(--red-soft); font-size: .72rem; }

/* Navigation */
.app-shell, .main-shell { min-height: 100svh; }
.sidebar { display: none; }
.mobile-topbar { position: sticky; z-index: 35; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: max(10px, env(safe-area-inset-top)) 15px 8px; border-bottom: 1px solid rgba(23,32,25,.06); background: rgba(244,241,232,.88); backdrop-filter: blur(18px); }
.mobile-brand { display: flex; align-items: center; gap: 9px; font-size: .93rem; font-weight: 850; letter-spacing: -.04em; }
.mobile-brand .brand-mark { width: 30px; height: 30px; border-radius: 10px; }
.top-actions { display: flex; gap: 7px; }
.content { width: min(100%, var(--content)); margin: 0 auto; padding: 18px 14px 108px; }
.bottom-nav { position: fixed; z-index: 50; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); min-height: 66px; padding: 5px; border: 1px solid rgba(255,255,255,.12); border-radius: 21px; background: rgba(23,32,25,.965); box-shadow: 0 18px 46px rgba(23,32,25,.29); backdrop-filter: blur(18px); }
.bottom-nav button { display: grid; place-items: center; align-content: center; gap: 3px; min-width: 0; border: 0; border-radius: 15px; color: rgba(255,255,255,.58); background: transparent; font-size: .6rem; font-weight: 750; cursor: pointer; }
.bottom-nav button.active { color: var(--ink); background: var(--lime); }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 2px 10px 23px; font-weight: 850; letter-spacing: -.045em; }
.nav-group-label { margin: 18px 12px 8px; color: rgba(255,255,255,.36); font: 600 .61rem "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .13em; }
.nav-list { display: grid; gap: 3px; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 0 12px; border: 0; border-radius: 12px; color: rgba(255,255,255,.62); background: transparent; font-size: .8rem; font-weight: 700; text-align: left; cursor: pointer; }
.nav-link:hover { color: white; background: rgba(255,255,255,.06); }
.nav-link.active { color: var(--ink); background: var(--lime); }
.nav-link .nav-count { margin-left: auto; min-width: 21px; padding: 2px 6px; border-radius: 9px; background: rgba(255,255,255,.09); font: 600 .6rem "IBM Plex Mono", monospace; text-align: center; }
.nav-link.active .nav-count { background: rgba(23,32,25,.12); }
.sidebar-bottom { margin-top: auto; }
.profile-button { display: flex; align-items: center; width: 100%; gap: 10px; padding: 10px; border: 0; border-radius: 13px; color: white; background: transparent; text-align: left; cursor: pointer; }
.profile-button:hover { background: rgba(255,255,255,.06); }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; color: var(--ink); background: var(--coral-soft); font-size: .7rem; font-weight: 850; }
.profile-meta { min-width: 0; }
.profile-meta strong, .profile-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-meta strong { font-size: .72rem; }
.profile-meta span { margin-top: 2px; color: rgba(255,255,255,.45); font-size: .59rem; }

/* Primitives */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 8px 0 20px; }
.page-head-copy { min-width: 0; }
.eyebrow { margin-bottom: 8px; }
.page-title { margin: 0; font-size: clamp(1.82rem, 7vw, 3.45rem); line-height: 1; letter-spacing: -.062em; }
.run-id-title { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(1.28rem, 4vw, 2.45rem); letter-spacing: -.035em; line-height: 1.12; }
.page-subtitle { max-width: 700px; margin: 9px 0 0; color: var(--ink-2); font-size: .8rem; line-height: 1.55; }
.head-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.desktop-only { display: none !important; }
.mobile-only { display: initial; }
.section { margin-top: 27px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 11px; }
.section-head h2 { margin: 0; font-size: .98rem; letter-spacing: -.038em; }
.section-head p { margin: 3px 0 0; color: var(--ink-3); font-size: .69rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,253,248,.91); box-shadow: var(--shadow-soft); }
.card-pad, .form-section { padding: 17px; }
.form-section h2 { margin: 0 0 5px; font-size: 1rem; letter-spacing: -.035em; }
.form-section > p { margin: 0 0 17px; color: var(--ink-3); font-size: .7rem; line-height: 1.5; }
.inset { padding: 13px; border-radius: 13px; background: var(--paper); }
.divider { height: 1px; margin: 16px 0; background: var(--line); }
.stack { display: grid; gap: 11px; }
.cluster { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.split { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.empty { display: grid; place-items: center; min-height: 210px; padding: 30px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--ink-3); text-align: center; }
.empty .icon { width: 2rem; height: 2rem; margin-bottom: 10px; }
.empty h3 { margin: 0; color: var(--ink); font-size: .95rem; }
.empty p { max-width: 390px; margin: 7px 0 16px; font-size: .72rem; line-height: 1.5; }
.loading-grid { display: grid; gap: 10px; }
.skeleton { min-height: 84px; border-radius: var(--radius); background: linear-gradient(100deg, rgba(255,255,255,.28) 30%, rgba(255,255,255,.78) 48%, rgba(255,255,255,.28) 67%); background-size: 220% 100%; animation: shimmer 1.25s infinite; }
@keyframes shimmer { to { background-position-x: -220%; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 15px; border: 1px solid transparent; border-radius: 13px; color: white; background: var(--ink); font-size: .74rem; font-weight: 780; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(23,32,25,.13); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .46; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { color: white; background: var(--ink); }
.btn-lime { color: var(--ink); background: var(--lime); }
.btn-signal { color: white; background: var(--coral); }
.btn-secondary { border-color: var(--line-strong); color: var(--ink); background: rgba(255,253,248,.76); box-shadow: none; }
.btn-ghost { color: var(--ink-2); background: transparent; box-shadow: none; }
.btn-danger { color: var(--red); background: var(--red-soft); }
.btn-sm { min-height: 36px; padding: 0 11px; border-radius: 11px; font-size: .67rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,253,248,.8); cursor: pointer; }
.text-link { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0; border: 0; color: var(--ink-2); background: transparent; font-size: .69rem; font-weight: 750; cursor: pointer; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: -4px 0 4px; padding: 0; border: 0; color: var(--ink-2); background: transparent; font-size: .69rem; font-weight: 750; cursor: pointer; }

.status { display: inline-flex; align-items: center; gap: 6px; width: fit-content; min-height: 25px; padding: 2px 8px; border-radius: 999px; font: 600 .61rem "IBM Plex Mono", monospace; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-running, .status-succeeded, .status-connected, .status-passed, .status-ready { color: var(--green); background: var(--green-soft); }
.status-queued, .status-starting, .status-awaiting_user { color: var(--blue); background: var(--blue-soft); }
.status-warning, .status-cancel_requested, .status-reauth_required { color: var(--amber); background: var(--amber-soft); }
.status-failed, .status-error, .status-cancelled { color: var(--red); background: var(--red-soft); }
.status-draft, .status-not_required, .status-auth_required, .status-disconnected, .status-waiting { color: var(--ink-2); background: var(--paper-deep); }
.status-running::before { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(36,117,82,.25); } 70% { box-shadow: 0 0 0 6px rgba(36,117,82,0); } 100% { box-shadow: 0 0 0 0 rgba(36,117,82,0); } }

/* Forms */
.field-grid { display: grid; gap: 13px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { color: var(--ink-2); font-size: .65rem; font-weight: 780; }
.field-hint { color: var(--ink-3); font-size: .61rem; line-height: 1.45; }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); background: rgba(255,255,255,.74); font-size: .76rem; }
.textarea { min-height: 110px; padding: 11px 12px; line-height: 1.55; resize: vertical; }
.textarea.code { min-height: 210px; tab-size: 2; }
.input::placeholder, .textarea::placeholder { color: #9ca49e; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.4); cursor: pointer; }
.checkbox-row input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); }
.checkbox-row strong, .checkbox-row span { display: block; }
.checkbox-row strong { font-size: .72rem; }
.checkbox-row span { margin-top: 3px; color: var(--ink-3); font-size: .62rem; line-height: 1.4; }
.form-actions, .card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.sticky-save { position: sticky; z-index: 20; bottom: 82px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin: 18px -2px 0; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,248,.91); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.form-stack { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 12px; }
.inline-editor { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }

/* Lists, cards and tabs */
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.metric-card { position: relative; overflow: hidden; min-height: 108px; padding: 14px; }
.metric-card::after { content: ""; position: absolute; right: -24px; bottom: -27px; width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 50%; }
.metric-value { font-size: 1.62rem; font-weight: 850; letter-spacing: -.06em; }
.metric-label { margin-top: 8px; color: var(--ink-3); font-size: .64rem; font-weight: 700; }
.hero-run { position: relative; isolation: isolate; overflow: hidden; padding: 19px; color: white; background: var(--ink); border-color: transparent; }
.hero-run::after { content: ""; position: absolute; z-index: -1; right: -70px; top: -95px; width: 220px; height: 220px; border-radius: 42% 58% 63% 37%; background: rgba(185,237,99,.13); transform: rotate(24deg); }
.hero-run h2 { margin: 11px 0 6px; font-size: 1.22rem; letter-spacing: -.045em; }
.hero-run p { margin: 0; color: rgba(255,255,255,.6); font-size: .69rem; line-height: 1.5; }
.hero-run-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.progress-wrap { margin-top: 20px; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 7px; color: rgba(255,255,255,.61); font: 600 .61rem "IBM Plex Mono", monospace; }
.progress-bar { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.1); }
.progress-bar span { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.run-progress { display: block; width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 99px; background: rgba(255,255,255,.1); appearance: none; }
.run-progress::-webkit-progress-bar { border-radius: 99px; background: rgba(255,255,255,.1); }
.run-progress::-webkit-progress-value { border-radius: 99px; background: var(--lime); }
.run-progress::-moz-progress-bar { border-radius: 99px; background: var(--lime); }
.list { display: grid; gap: 8px; }
.list-row { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: rgba(255,253,248,.76); text-align: left; transition: border-color .15s, transform .15s, background .15s; }
button.list-row, .list-row[data-route], .list-row[data-action] { cursor: pointer; }
button.list-row:hover, .list-row[data-route]:hover, .list-row[data-action]:hover { border-color: var(--line-strong); background: white; transform: translateY(-1px); }
.row-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; background: var(--paper-deep); }
.row-icon.running, .row-icon.succeeded { color: var(--green); background: var(--green-soft); }
.row-icon.failed { color: var(--red); background: var(--red-soft); }
.row-icon.queued { color: var(--blue); background: var(--blue-soft); }
.row-main { min-width: 0; flex: 1; }
.row-title { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: .76rem; font-weight: 780; }
.row-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { display: flex; align-items: center; gap: 7px; min-width: 0; margin-top: 4px; color: var(--ink-3); font-size: .63rem; }
.row-sub span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { flex: 0 0 auto; text-align: right; }
.row-end strong { display: block; font: 600 .66rem "IBM Plex Mono", monospace; }
.row-end span { display: block; margin-top: 4px; color: var(--ink-3); font-size: .59rem; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 -14px 18px; padding: 0 14px 5px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; min-height: 39px; padding: 0 11px; border: 0; border-radius: 11px; color: var(--ink-3); background: transparent; font-size: .68rem; font-weight: 780; cursor: pointer; }
.tab.active { color: var(--ink); background: rgba(255,253,248,.84); box-shadow: inset 0 0 0 1px var(--line); }
.pill { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); background: rgba(255,255,255,.42); font: 600 .59rem "IBM Plex Mono", monospace; }
.job-grid, .connection-grid { display: grid; gap: 11px; }
.job-card, .connection-card { width: 100%; padding: 17px; color: var(--ink); text-align: left; cursor: pointer; transition: transform .16s, box-shadow .16s, border-color .16s; }
.job-card:hover, .connection-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.job-card h3, .connection-card h3 { margin: 12px 0 6px; font-size: .98rem; letter-spacing: -.04em; }
.job-card p, .connection-card p { margin: 0; color: var(--ink-3); font-size: .66rem; line-height: 1.48; }
.job-card-top, .connection-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.job-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 16px; }
.job-meta-item { min-width: 0; padding: 9px; border-radius: 10px; background: var(--paper); }
.job-meta-item span, .job-meta-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-meta-item span { color: var(--ink-3); font-size: .53rem; text-transform: uppercase; letter-spacing: .07em; }
.job-meta-item strong { margin-top: 4px; font: 600 .62rem "IBM Plex Mono", monospace; }

/* Workflow and run detail */
.workflow { display: grid; gap: 9px; }
.workflow-step { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; min-height: 70px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,253,248,.82); }
.workflow-step:not(:last-child)::after { content: ""; position: absolute; z-index: -1; left: 29px; top: calc(100% - 1px); width: 1px; height: 11px; background: var(--line-strong); }
.step-number { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--paper-deep); font: 600 .64rem "IBM Plex Mono", monospace; }
.step-copy { min-width: 0; }
.step-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .74rem; }
.step-copy span { display: block; margin-top: 4px; color: var(--ink-3); font-size: .61rem; }
.step-editor { padding: 15px; }
.step-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.step-editor-head strong { font-size: .76rem; }
.run-header-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.definition-badge { border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 9px; color: var(--ink-2); background: rgba(255,255,255,.45); font: 600 .61rem "IBM Plex Mono", monospace; cursor: pointer; }
.step-list { display: grid; gap: 8px; }
.step-card { padding: 14px; }
.step-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.step-card h3 { margin: 0; font-size: .78rem; }
.step-card p { margin: 4px 0 0; color: var(--ink-3); font-size: .61rem; }
.usage-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 13px; }
.usage-cell { min-width: 0; padding: 9px; border-radius: 10px; background: var(--paper); }
.usage-cell span, .usage-cell strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-cell span { color: var(--ink-3); font-size: .53rem; text-transform: uppercase; letter-spacing: .05em; }
.usage-cell strong { margin-top: 4px; font: 600 .65rem "IBM Plex Mono", monospace; }
.event-stream { display: grid; gap: 2px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #111813; }
.event-row { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.055); color: #dfe8e1; font: 500 .65rem "IBM Plex Mono", monospace; }
.event-row:last-child { border-bottom: 0; }
.event-type { color: var(--lime); overflow: hidden; text-overflow: ellipsis; }
.event-body { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.event-body .dim { color: #849187; }
.terminal { max-height: 620px; overflow: auto; margin: 0; padding: 14px; border-radius: 15px; color: #dfe8e1; background: #111813; font-size: .65rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.manifest-grid { display: grid; gap: 10px; }
.fact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.fact { min-width: 0; padding: 11px; border-radius: 12px; background: var(--paper); }
.fact span, .fact strong { display: block; }
.fact span { color: var(--ink-3); font-size: .57rem; text-transform: uppercase; letter-spacing: .06em; }
.fact strong { margin-top: 5px; overflow-wrap: anywhere; font-size: .69rem; }
.json-view { max-height: 520px; overflow: auto; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink-2); background: rgba(255,255,255,.5); font-size: .62rem; line-height: 1.5; white-space: pre-wrap; }

/* Modal, toast */
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; align-items: end; padding: 10px; background: rgba(12,17,13,.49); backdrop-filter: blur(5px); animation: fade .15s ease-out; }
.modal-sheet { width: min(100%, 650px); max-height: min(92svh, 900px); overflow: auto; margin: 0 auto; padding: 19px; border: 1px solid rgba(255,255,255,.3); border-radius: 25px; background: var(--surface-solid); box-shadow: 0 30px 90px rgba(0,0,0,.3); animation: rise .18s ease-out; }
.modal-sheet.wide { width: min(100%, 980px); }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.sheet-head h2 { margin: 0; font-size: 1.12rem; letter-spacing: -.045em; }
.sheet-head p { margin: 5px 0 0; color: var(--ink-3); font-size: .69rem; line-height: 1.45; }
.sheet-close { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; }
.sheet-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.more-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.more-grid button { display: grid; place-items: center; gap: 8px; min-height: 94px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: var(--paper); font-size: .67rem; font-weight: 760; cursor: pointer; }
.fixed-note { padding: 11px 12px; border-radius: 12px; color: var(--ink-2); background: var(--paper); font-size: .66rem; line-height: 1.5; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #111813; color: #e3ece5; }
.code-box code { min-width: 0; overflow-wrap: anywhere; font-size: .66rem; }
.compare-grid { display: grid; gap: 9px; }
.compare-pane { min-width: 0; }
.compare-pane h3 { margin: 0 0 7px; font-size: .72rem; }
.toast-root { position: fixed; z-index: 150; left: 12px; right: 12px; bottom: 91px; display: grid; justify-items: center; pointer-events: none; }
.toast { max-width: 460px; padding: 11px 14px; border-radius: 12px; color: white; background: var(--ink); box-shadow: var(--shadow); font-size: .7rem; font-weight: 700; animation: rise .18s ease-out; }
.toast.error { background: var(--red); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

@media (min-width: 620px) {
  .content { padding-left: 22px; padding-right: 22px; }
  .field-grid.two, .fact-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .job-grid, .connection-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .compare-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .modal-backdrop { align-items: center; padding: 22px; }
  .sticky-save { bottom: 20px; }
}

@media (min-width: 980px) {
  .app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); }
  .sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100svh; padding: 20px 14px 15px; color: white; background: var(--ink); }
  .mobile-topbar, .bottom-nav { display: none; }
  .content { padding: 32px 36px 72px; }
  .desktop-only { display: flex !important; }
  .mobile-only { display: none !important; }
  .page-head { margin-top: 0; }
  .tabs { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .job-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .connection-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .detail-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.75fr); gap: 14px; align-items: start; }
  .modal-sheet { padding: 23px; }
  .toast-root { bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
