:root {
  color-scheme: dark;
  --canvas: #12161d;
  --rail: #10141a;
  --surface: #191e27;
  --field: #141820;
  --popover: #202630;
  --line: #2b3240;
  --line-subtle: #242b36;
  --text: #eef0f4;
  --secondary: #acb5c6;
  --muted: #929db0;
  --gold: #e8bd71;
  --gold-bright: #f6d795;
  --green: #8bc5ac;
  --danger: #f3a39f;
  --rail-width: 232px;
  --font: Inter, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--text); font: 400 1rem/1.5 var(--font); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
::selection { background: #5a4630; color: #fff1d6; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.18; }
h2 { font-size: 1.13rem; letter-spacing: -.025em; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
small { font-size: .84rem; }
code, pre, kbd { font-family: var(--mono); }
.skip-link { position: fixed; z-index: 20; top: 10px; left: 10px; padding: .55rem 1rem; border-radius: 7px; transform: translateY(-160%); background: var(--gold); color: #17120a; }
.skip-link:focus { transform: translateY(0); }

.icon { display: inline-block; flex: 0 0 auto; width: 18px; height: 18px; mask: var(--icon) center / contain no-repeat; background: currentColor; }
[data-icon=brand] { --icon: url("/icons/brand.png"); }
[data-icon=run] { --icon: url("/icons/run.png"); }
[data-icon=search] { --icon: url("/icons/search.png"); }
[data-icon=dataset] { --icon: url("/icons/dataset.png"); }
[data-icon=activity] { --icon: url("/icons/activity.png"); }
[data-icon=chart] { --icon: url("/icons/chart.png"); }
[data-icon=plug] { --icon: url("/icons/plug.png"); }
[data-icon=shield] { --icon: url("/icons/shield.png"); }
[data-icon=chevron] { --icon: url("/icons/chevron.png"); }
[data-icon=bolt] { --icon: url("/icons/bolt.png"); }
[data-icon=link] { --icon: url("/icons/link.png"); }
[data-icon=check] { --icon: url("/icons/check.png"); }
[data-icon=clock] { --icon: url("/icons/clock.png"); }
[data-icon=copy] { --icon: url("/icons/copy.png"); }
[data-icon=plus] { --icon: url("/icons/plus.png"); }
[data-icon=close] { --icon: url("/icons/close.png"); }
[data-icon=menu] { --icon: url("/icons/menu.png"); }
[data-icon=globe] { --icon: url("/icons/globe.png"); }
[data-icon=scroll] { --icon: url("/icons/scroll.png"); }
[data-icon=code] { --icon: url("/icons/code.png"); }
[data-icon=box] { --icon: url("/icons/box.png"); }
[data-icon=info] { --icon: url("/icons/info.png"); }
[data-icon=refresh] { --icon: url("/icons/refresh.png"); }
[data-icon=download] { --icon: url("/icons/download.png"); }
[data-icon=trash] { --icon: url("/icons/trash.png"); }
[data-icon=pause] { --icon: url("/icons/pause.png"); }
[data-icon=play] { --icon: url("/icons/play.png"); }

.shell { display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100dvh;
  position: sticky;
  top: 0;
  background: var(--rail);
  border-right: 1px solid var(--line-subtle);
  padding: 22px 16px 18px;
  z-index: 5;
  overflow-y: auto;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; width: max-content; margin: 0 0 25px 8px; font-size: 1.54rem; font-weight: 720; letter-spacing: -.065em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #241b11; background: var(--gold); box-shadow: 0 2px 14px #bd8b3330; }
.brand-mark > .icon { width: 25px; height: 25px; }
.brand-period { color: var(--gold); }
.workspace-label { display: flex; align-items: center; gap: 9px; padding: 9px 8px; border: 1px solid var(--line-subtle); border-radius: 8px; margin-bottom: 26px; }
.workspace-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid #41414b; border-radius: 6px; background: #282c35; font-family: var(--mono); color: #eee2cd; font-size: .91rem; }
.workspace-label strong, .rail-footer strong { display: block; font-size: .86rem; font-weight: 600; white-space: nowrap; }
.workspace-label small, .rail-footer small { display: block; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.navigation .nav-caption { margin: 0 0 8px 10px; color: var(--muted); font-size: .72rem; font-weight: 620; letter-spacing: .085em; text-transform: uppercase; }
.navigation .nav-caption-spaced { margin-top: 26px; }
.navigation a { display: flex; gap: 10px; align-items: center; min-height: 41px; padding: 7px 10px; margin-bottom: 3px; border: 1px solid transparent; border-radius: 7px; text-decoration: none; color: var(--secondary); font-size: .91rem; font-weight: 540; transition: background .16s, color .16s; }
.navigation a:hover { background: #1b212b; color: var(--text); }
.navigation a[aria-current=page] { background: #27251f; border-color: #463a28; color: #f0d29b; }
.navigation a .icon { width: 17px; height: 17px; }
.rail-footer { display: flex; gap: 9px; align-items: center; margin-top: auto; padding: 11px 8px 2px; border-top: 1px solid var(--line-subtle); color: var(--secondary); }
.rail-footer > .icon { width: 19px; height: 19px; color: var(--green); }

.workspace { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 63px; padding: 0 clamp(18px, 3.5vw, 47px); gap: 12px; border-bottom: 1px solid var(--line-subtle); }
.top-context, .top-actions { display: flex; align-items: center; gap: 11px; }
.top-context { color: var(--muted); font-size: .88rem; }
.top-context strong { color: var(--text); font-weight: 550; }
.breadcrumb-divider { color: #657083; }
.connection { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--secondary); font-size: .86rem; }
.connection > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: #8290a1; }
.connection[data-state=online] > span:first-child { background: #8bc5aa; box-shadow: 0 0 0 4px #8bc5aa14; }
.connection[data-state=offline] > span:first-child { background: #f29c98; }
.topbar .menu-button { display: none; }

.main { max-width: 1520px; margin: 0 auto; padding: 29px clamp(18px, 3.5vw, 47px) 0; outline: none; }
.hero {
  display: flex;
  min-height: 234px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid #333545;
  border-radius: 13px;
  background: radial-gradient(ellipse at 81% 17%, #353036 0%, #222631 42%, #1c222e 75%), #1c222e;
}
.hero-copy { position: relative; z-index: 1; align-self: center; padding: 25px clamp(19px, 3.2vw, 42px); }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--gold); font-family: var(--mono); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .085em; }
.eyebrow .icon { width: 15px; height: 15px; }
h1 { font-size: clamp(2.15rem, 4.2vw, 3.85rem); letter-spacing: -.062em; font-weight: 690; }
.hero h1 { margin: 12px 0 12px; }
.hero p { max-width: 36ch; color: #bcc4d0; font-size: 1.01rem; }
.hero-art { position: absolute; inset: 0 0 0 37%; pointer-events: none; }
.art-grid {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, #b29f7a66 .8px, transparent 1.1px) 0 0 / 17px 17px,
    repeating-linear-gradient(0deg, transparent 0 53px, #f4d8a50a 54px, transparent 55px),
    repeating-linear-gradient(90deg, transparent 0 53px, #f4d8a50a 54px, transparent 55px);
  mask-image: linear-gradient(to right, transparent, #000 44%, #000);
}
.art-plane { position: absolute; width: 470px; height: 225px; top: 50%; right: 7%; transform: translateY(-50%); }
.orbit { position: absolute; inset: 50% auto auto 55%; border: 1px solid #e8bd7167; border-radius: 50%; transform: translate(-50%, -50%) rotate(-17deg); }
.orbit-outer { width: 432px; height: 132px; border-color: #e8bd7138; }
.orbit-middle { width: 352px; height: 105px; border-color: #e8bd7159; }
.orbit-inner { width: 267px; height: 77px; border-color: #e8bd7178; }
.orbit-track { width: 398px; height: 118px; border-style: dashed; border-color: #e8bd7134; }
.orbit-center {
  display: grid;
  place-items: center;
  position: absolute;
  top: 50%;
  left: 55%;
  width: 80px;
  height: 80px;
  color: var(--gold-bright);
  border: 1px solid #efc7808c;
  border-radius: 50%;
  background: radial-gradient(circle at 43% 35%, #6b5038, #302927 72%);
  box-shadow: 0 0 0 12px #edc0710e, 0 0 0 24px #edc07108, 0 0 47px #f8b55f2c, inset 0 0 21px #f7cf8a29;
  transform: translate(-50%, -50%);
}
.orbit-center .icon { width: 43px; height: 43px; }
.point { position: absolute; display: block; width: 7px; height: 7px; border-radius: 50%; background: #f6d59a; box-shadow: 0 0 13px #f6bd67b5; }
.point-one { top: 36%; left: 86%; }
.point-two { top: 71%; left: 27%; width: 5px; height: 5px; }
.point-three { top: 27%; left: 58%; width: 4px; height: 4px; opacity: .6; }
.point-four { top: 72%; left: 72%; width: 4px; height: 4px; opacity: .6; }
.art-coordinate { position: absolute; color: #e6c08c74; font: .82rem var(--mono); }
.art-coordinate-a { top: 26px; right: 8px; }
.art-coordinate-b { bottom: 25px; left: 75px; }

.workbench-grid { display: grid; grid-template-columns: minmax(0, 1.83fr) minmax(245px, 1fr); gap: 18px; align-items: start; }
.workbench-aside { display: grid; gap: 15px; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.composer, .subform { padding: clamp(17px, 2vw, 24px); }
.card-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 19px; }
.card-heading p, .section-heading p, .meter-heading p { margin-top: 4px; color: var(--muted); font-size: .89rem; }
.panel-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border: 1px solid #493c2c; border-radius: 8px; color: var(--gold); background: #30291f; }
.panel-icon.green { color: #9bd5b4; background: #252f2c; border-color: #395042; }
.form-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.modes { margin-bottom: 17px; }
.modes label { position: relative; }
.modes input { position: absolute; width: 1px; height: 1px; clip-path: inset(100%); }
.modes label > span { display: inline-flex; align-items: center; gap: 5px; min-height: 35px; padding: 4px 10px; color: var(--secondary); border: 1px solid var(--line); border-radius: 7px; cursor: pointer; line-height: 1.3; font-size: .88rem; font-weight: 560; }
.modes label > span .icon { width: 15px; height: 15px; }
.modes input:checked + span { background: #31291e; border-color: #665034; color: #f0d097; }
.modes input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.modes label:hover > span { color: var(--text); }
.field { display: grid; gap: 6px; margin-bottom: 13px; }
.field label, .field legend { color: var(--text); font-size: .88rem; font-weight: 570; }
.field-optional { margin-left: 5px; color: var(--muted); font-size: .77rem; font-weight: 420; }
.field small { color: var(--muted); }
.field input, .field textarea, .field select { display: block; width: 100%; border: 1px solid #343c49; border-radius: 7px; background: var(--field); color: var(--text); padding: 9px 11px; font-size: .93rem; min-height: 41px; }
.field input::placeholder, .field textarea::placeholder { color: #8792a5; }
.field textarea { min-height: 81px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #a98152; outline: 1px solid #a98152; outline-offset: 0; }
.input-with-icon { display: grid; align-items: center; position: relative; }
.input-with-icon > .icon { position: absolute; width: 17px; height: 17px; left: 11px; color: var(--muted); pointer-events: none; }
.input-with-icon input { padding-left: 36px; }
.small-field { max-width: 190px; }
.field select { appearance: none; padding-right: 35px; background: url("/icons/chevron.png") right 10px center / 17px no-repeat var(--field); }
.examples { gap: 7px; }
.examples-label { color: var(--muted); margin-right: 1px; font-size: .81rem; }
.chip { padding: 3px 8px; min-height: 28px; color: var(--secondary); border: 1px solid var(--line); border-radius: 5px; background: #1d222c; font-size: .81rem; }
.chip:hover { background: #272e3b; color: var(--text); border-color: #465163; }
.form-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 9px; padding-top: 15px; margin-top: 15px; border-top: 1px solid var(--line-subtle); }
.form-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.shortcut { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .78rem; }
kbd { display: inline-flex; align-items: center; border: 1px solid #3a4354; border-radius: 4px; padding: 0 4px; color: var(--secondary); background: #1f2530; font-size: .71rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px; padding: 6px 11px; border: 1px solid #384153; border-radius: 7px; color: var(--text); background: #202631; font-size: .88rem; font-weight: 565; line-height: 1.3; text-decoration: none; transition: color .14s, background .14s, border-color .14s; }
.button:hover:not(:disabled) { background: #293244; border-color: #4d5a72; }
.button .icon { width: 16px; height: 16px; }
.button-primary { background: var(--gold); border-color: #efc887; color: #20180f; min-height: 39px; min-width: 105px; }
.button-primary:hover:not(:disabled) { background: #f4d292; border-color: #f5d496; }
.button-small { min-height: 32px; padding: 4px 8px; font-size: .81rem; }
.icon-button { width: 37px; min-height: 37px; padding: 0; flex-shrink: 0; }
.text-link { font-size: .87rem; color: #efc988; text-decoration: none; text-underline-offset: 3px; }
.text-link:hover { text-decoration: underline; }
.form-feedback, .page-feedback { margin-top: 11px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--secondary); background: var(--field); font-size: .89rem; }
.form-feedback[data-state=error], .page-feedback[data-state=error], .notice-error { background: #321f25; border-color: #613d44; color: var(--danger); }
.form-feedback[data-state=success], .page-feedback[data-state=success] { color: var(--green); }
.form-feedback strong { display: block; margin-bottom: 4px; }
.form-feedback ul { margin: 5px 0 0; padding-left: 20px; }
.notice { display: flex; gap: 9px; justify-content: space-between; align-items: center; padding: 10px 13px; margin-bottom: 16px; border: 1px solid #613d44; border-radius: 8px; font-size: .9rem; }
.notice p { flex: 1; }

.guard-card, .meter-card { padding: 16px; }
.guard-top, .meter-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.guard-top { flex-direction: row-reverse; justify-content: space-between; }
.guard-top h2, .meter-heading h2 { font-size: 1.02rem; }
.guard-list { margin: 11px 0 13px; padding: 0; list-style: none; color: var(--secondary); font-size: .86rem; }
.guard-list li { display: flex; align-items: center; gap: 7px; margin-top: 5px; }
.guard-list .icon { width: 15px; height: 15px; color: var(--green); }
.domain-details { padding-top: 9px; border-top: 1px solid var(--line-subtle); font-size: .86rem; }
.domain-details summary { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--gold); cursor: pointer; list-style: none; }
.domain-details summary::-webkit-details-marker { display: none; }
.domain-details[open] summary .icon { transform: rotate(180deg); }
.domain-details p { padding-top: 7px; color: var(--muted); overflow-wrap: anywhere; }
.meter-heading > .icon { color: var(--gold); }
.meter { overflow: hidden; width: 100%; height: 7px; margin: 11px 0 8px; border-radius: 7px; background: #343d4e; }
.meter progress { display: block; width: 100%; height: 7px; appearance: none; border: 0; border-radius: 7px; background: #343d4e; color: var(--gold); }
.meter progress::-webkit-progress-bar { background: #343d4e; border-radius: 7px; }
.meter progress::-webkit-progress-value { background: var(--gold); border-radius: 7px; }
.meter progress::-moz-progress-bar { background: var(--gold); border-radius: 7px; }

.history-section { margin-top: 21px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 11px; }
.records { overflow: hidden; }
.empty-state { display: grid; justify-items: center; align-items: center; gap: 6px; padding: 21px 16px; text-align: center; color: var(--muted); }
.empty-state.compact { display: flex; align-items: center; gap: 13px; justify-content: center; }
.empty-state strong { color: var(--secondary); }
.empty-state p { min-width: 0; font-size: .89rem; }
.empty-state p span { display: block; }
.empty-state .panel-icon { width: 33px; height: 33px; color: var(--muted); border-color: #394355; background: #242c39; }
.record-list { list-style: none; margin: 0; padding: 0; }
.record { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.record + .record { border-top: 1px solid var(--line-subtle); }
.record-copy { min-width: 0; }
.record-title { display: block; color: var(--text); font-size: .95rem; font-weight: 590; overflow-wrap: anywhere; }
.record-meta { display: flex; flex-wrap: wrap; gap: .3em .7em; align-items: center; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.record-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; justify-content: flex-end; flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 4px; background: #2c3442; border: 1px solid #3a4558; color: #c2cddd; font-size: .74rem; font-weight: 560; text-transform: capitalize; }
.badge[data-status=completed], .badge[data-status=active], .badge[data-status=ready], .badge[data-status=success], .badge[data-status=unchanged] { color: #a8d7be; background: #26352f; border-color: #3b594b; }
.badge[data-status=failed], .badge[data-status=error], .badge[data-status=interrupted] { color: var(--danger); background: #3c292d; border-color: #644149; }
.badge[data-status=paused], .badge[data-status=partial], .badge[data-status=queued], .badge[data-status=changed] { color: #f0d097; background: #3d3324; border-color: #615036; }
.badge[data-status=running] { color: #abc9ef; background: #29394d; border-color: #3b5270; }

.page-heading { margin: 9px 0 23px; }
.page-heading .panel-icon { margin-bottom: 12px; }
.page-heading p { max-width: 57ch; margin-top: 9px; color: var(--secondary); }
.subform { max-width: 820px; }
.subform-footer { display: flex; align-items: center; justify-content: flex-end; margin-top: 14px; }
.fields-set { min-width: 0; padding: 0; border: 0; }
.fields-set legend { margin: 0 0 6px; }
.fields-set > .button { justify-self: start; }
.dataset-field-row { display: grid; grid-template-columns: minmax(70px, .8fr) minmax(90px, 1.4fr) 37px; align-items: center; gap: 6px; margin-bottom: 6px; }
.dataset-field-row .button { align-self: center; }
.research-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); gap: 12px; margin-bottom: 16px; }
.metric-card { padding: clamp(12px, 2vw, 18px); }
.metric-card h2 { margin-top: 10px; color: var(--secondary); font-size: .9rem; }
.metric-card p { color: var(--text); font-family: var(--mono); font-size: clamp(1.08rem, 2vw, 1.55rem); overflow-wrap: anywhere; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 12px; align-items: start; }
.pricing-notes { display: flex; align-items: flex-start; gap: 8px; color: var(--secondary); font-size: .88rem; margin: 0 0 16px; }
.pricing-notes > .icon { color: var(--gold); margin-top: 1px; }
.pricing .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin-bottom: 5px; }
.price strong { color: var(--gold); font-size: 2.25rem; letter-spacing: -.055em; }
.price span, .pricing > p, .agent-section p { color: var(--secondary); font-size: .93rem; }
.plus-pricing { border-color: #705635; }
.plus-pricing .card-heading { flex-wrap: wrap; }
.plus-pricing .card-heading > div { flex: 1; min-width: 120px; }
.plus-pricing .badge { align-self: flex-start; }
.plus-pricing .price strong { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
.plus-pricing .price { flex-direction: column; align-items: flex-start; }
#billing-form { margin-top: 14px; }
.billing-signin { margin-top: 12px; }
.billing-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.pricing .billing-test { margin-top: 5px; color: var(--gold); }
.billing-help { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line-subtle); }
.billing-help summary { color: var(--gold); font-size: .88rem; cursor: pointer; }
.billing-help p { margin-top: 7px; color: var(--secondary); font-size: .88rem; }
.agent-grid { display: grid; gap: 13px; }
.agent-section h3 { margin-bottom: 5px; }
.agent-section p code { color: var(--gold-bright); }
.agent-native-steps { margin: 0; padding-left: 21px; color: var(--secondary); font-size: .93rem; }
.agent-native-steps li + li { margin-top: 5px; }
.agent-native-steps strong { color: var(--text); }
.agent-native-steps code { color: var(--gold-bright); }
.agent-native-actions { margin: 12px 0 15px; }
.agent-section .agent-directory-note { margin-top: 12px; color: var(--muted); font-size: .86rem; }
.account-panel { max-width: 550px; margin-bottom: 18px; scroll-margin-top: 14px; }
.account-panel h1 { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.035em; }
.account-create { display: grid; justify-items: start; gap: 8px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--secondary); font-size: .93rem; }
.account-continue { margin-top: 12px; }
.account-action-feedback { max-width: 550px; margin: 0 0 13px; }
.agent-step { padding-top: 15px; margin-top: 15px; border-top: 1px solid var(--line-subtle); }
.agent-step .detail-actions { margin-top: 11px; }
.client-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.client-tabs > button { background: var(--field); border: 1px solid var(--line); border-radius: 6px; color: var(--secondary); font-size: .88rem; font-weight: 590; padding: 6px 10px; min-height: 36px; }
.client-tabs > button:hover { color: var(--text); background: var(--popover); }
.client-tabs > button[aria-selected=true] { border-color: #715637; background: #31291e; color: var(--gold-bright); }
.client-install { margin-top: 9px; }
.agent-endpoint { margin-top: 14px; border-top: 1px solid var(--line-subtle); padding-top: 10px; }
.agent-endpoint summary { cursor: pointer; color: var(--gold); font-size: .89rem; font-weight: 550; }
.agent-endpoint p, .agent-endpoint h3 { margin-top: 9px; }
.agent-prompt .code-block { align-items: center; margin-top: 7px; }
.agent-prompt .code-block > p { min-width: 0; overflow-wrap: anywhere; color: var(--text); }
.agent-workflow, .agent-call-grid { display: grid; gap: 8px; }
.agent-workflow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); margin: 12px 0; }
.agent-workflow > div { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 7px; }
.agent-workflow dt { color: var(--gold-bright); font-size: .83rem; font-weight: 620; overflow-wrap: anywhere; }
.agent-workflow dd { margin: 4px 0 0; color: var(--secondary); font-size: .88rem; }
.agent-workflow dd > code { color: var(--gold-bright); overflow-wrap: anywhere; }
.agent-call-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); margin-top: 4px; }
.agent-call-grid > div { min-width: 0; }
.agent-call-grid .code-block { margin-top: 6px; }
.agent-local > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.agent-local > summary::-webkit-details-marker { display: none; }
.agent-local > summary > span:nth-child(2) { display: grid; flex: 1; }
.agent-local summary small { color: var(--muted); font-weight: 400; }
.agent-local[open] > summary > .icon { transform: rotate(180deg); }
.agent-local h3 { margin-top: 14px; }
.copy-feedback { position: fixed; z-index: 6; right: clamp(12px, 4vw, 48px); bottom: 16px; max-width: calc(100vw - 24px); box-shadow: 0 4px 29px #0007; }
.code-block { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; margin-top: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--field); }
.code-block code { color: #e8c78e; font-size: .86rem; line-height: 1.48; overflow-wrap: anywhere; }
.code-block > code { align-self: center; }
.code-block pre { min-width: 0; margin: 0; padding: 4px 0; white-space: pre-wrap; }
.main-footer { display: flex; justify-content: space-between; align-items: center; gap: 9px; margin-top: 25px; padding: 11px 0 16px; border-top: 1px solid var(--line-subtle); color: var(--muted); font-size: .79rem; }
.main-footer > span:first-child { color: var(--secondary); font-weight: 650; }
.main-footer a { text-decoration: none; }
.main-footer a:hover { text-decoration: underline; }

.dialog { width: min(92vw, 790px); max-height: min(90dvh, 760px); padding: 0; border: 1px solid #485265; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 20px 85px #0009; }
.dialog::backdrop { background: #090d14be; backdrop-filter: blur(3px); }
.dialog-heading { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 17px 19px; background: var(--surface); border-bottom: 1px solid var(--line); }
.dialog-heading h2 { margin-top: 3px; overflow-wrap: anywhere; }
.dialog-content { padding: 16px 19px 19px; color: var(--secondary); overflow-wrap: anywhere; }
.dialog-content > * + * { margin-top: 14px; }
.dialog-content h3 { margin: 8px 0 6px; color: var(--text); }
.dialog-content ul { padding-left: 19px; margin: 0; }
.dialog-content li + li { margin-top: 5px; }
.dialog-content details { border: 1px solid var(--line); padding: 8px 10px; border-radius: 7px; font-size: .88rem; }
.dialog-content details + details { margin-top: 6px; }
.dialog-content summary { cursor: pointer; color: var(--gold); }
.dialog-content .claims { display: grid; gap: 7px; padding: 0; list-style: none; }
.dialog-content .claim { margin: 0; padding: 11px; background: var(--field); border: 1px solid var(--line); border-radius: 7px; font-size: .93rem; }
.claim-sources { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; }
.claim-sources .text-link { text-decoration: underline; }
.answer-coverage { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr)); gap: 6px; margin: 10px 0 0; }
.answer-coverage > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.answer-coverage dt { color: var(--muted); font-size: .78rem; }
.answer-coverage dd { color: var(--gold); margin: 0; font-family: var(--mono); font-size: 1rem; font-weight: 600; }
.dialog-content h4 { color: var(--text); font-size: .9rem; margin: 12px 0 4px; }
.answer-caveats { font-size: .86rem; }
.dialog-content blockquote { margin: 7px 0 0; border-left: 2px solid #6d5536; padding: 4px 9px; }
.detail-pre { max-height: 240px; margin: 8px 0 0; overflow: auto; padding: 9px; background: var(--field); border-radius: 6px; white-space: pre-wrap; color: var(--secondary); font: .85rem/1.5 var(--mono); }
.table-scroll { width: 100%; overflow: auto; }
.detail-table { width: 100%; text-align: left; border-collapse: collapse; font-size: .86rem; }
.detail-table th, .detail-table td { padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; min-width: 90px; }
.detail-table th { color: var(--gold); }
.detail-table td { max-width: 300px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.run-update { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.monitor-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.monitor-controls .page-feedback { margin: 0; }
.monitor-check-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: .85rem; }
.monitor-check-summary time { color: var(--text); }
.check-verification { color: var(--secondary); }
.detail-content .monitor-check-history { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.monitor-check-history li + li { margin: 0; }
.monitor-check-history details { padding: 0; overflow: hidden; }
.monitor-check-history summary { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; list-style: none; }
.monitor-check-history summary::-webkit-details-marker { display: none; }
.monitor-check-history summary:focus-visible { outline-offset: -2px; }
.monitor-check-history details[open] summary > .icon { transform: rotate(180deg); }
.monitor-check-body { display: grid; gap: 5px; padding: 7px 10px 9px; border-top: 1px solid var(--line); }
.monitor-history-content > .button { margin-top: 6px; }
.monitor-diff { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr)); gap: 7px; margin-top: 7px; }
.monitor-diff-group { min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); font-size: .88rem; }
.monitor-diff-group h4 { margin: 0 0 5px; }
.monitor-diff-group[data-change=added] h4 { color: var(--green); }
.monitor-diff-group[data-change=removed] h4 { color: var(--danger); }
.monitor-diff-group p { margin-top: 5px; color: var(--muted); }

@media (max-width: 1150px) {
  .art-plane { right: -5%; transform: translateY(-50%) scale(.88); }
}
@media (max-width: 1000px) {
  :root { --rail-width: 194px; }
  .sidebar { padding-left: 11px; padding-right: 11px; }
  .workbench-grid { grid-template-columns: minmax(0, 1.7fr) minmax(200px, 1fr); gap: 11px; }
  .hero-art { opacity: .8; }
  .art-plane { right: -10%; }
}
@media (max-width: 870px) {
  .workbench-grid { grid-template-columns: minmax(0, 1fr); }
  .workbench-aside { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 11px; }
  .art-plane { right: -21%; }
  .hero-art { left: 42%; opacity: .57; }
}
@media (max-width: 720px) {
  .shell { display: block; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: min(82vw, 250px); height: 100dvh; box-shadow: 8px 0 48px #0008; }
  .sidebar:not(.open) { display: none; }
  .sidebar.open { top: 59px; height: calc(100dvh - 59px); }
  .topbar { min-height: 59px; }
  .topbar .menu-button { display: inline-flex; }
  .top-context, .top-actions { gap: 7px; }
  .main { padding-top: 15px; }
  .hero { min-height: 200px; margin-bottom: 12px; }
  .hero h1 { margin-top: 8px; margin-bottom: 7px; }
  .hero p { max-width: 29ch; }
  .art-plane { right: -13%; }
  .hero-art { left: 41%; opacity: .63; }
}
@media (max-width: 500px) {
  .topbar, .main { padding-left: 12px; padding-right: 12px; }
  .top-workspace, .breadcrumb-divider, .top-agent { display: none; }
  .hero-copy { padding-left: 17px; }
  .hero-art { left: 44%; opacity: .43; }
  .art-plane { right: -46%; transform: translateY(-50%) scale(.76); }
  .workbench-aside, .usage-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .guard-card, .meter-card { padding: 11px; }
  .guard-top .panel-icon { display: none; }
  .form-footer { align-items: flex-end; }
  .shortcut { display: none; }
  .form-actions { margin-left: auto; }
  .record { align-items: flex-start; flex-direction: column; }
  .record-actions { justify-content: flex-start; }
  .dialog-heading, .dialog-content { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 365px) {
  .workbench-aside { grid-template-columns: minmax(0, 1fr); }
  .research-options { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .modes label > span { padding-inline: 7px; }
  .examples .chip { font-size: .74rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; scroll-behavior: auto !important; }
}
