@font-face { font-family: "Geist"; src: url("assets/fonts/geist-latin.woff2") format("woff2"); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("assets/fonts/geist-mono-latin.woff2") format("woff2"); font-style: normal; font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #121116;
  --muted: #686572;
  --paper: #fbfafc;
  --white: #fff;
  --line: #e6e3eb;
  --line-strong: #d5d1dd;
  --accent: #5354ed;
  --accent-dark: #3f40c9;
  --accent-hover: #3f40c9;
  --accent-soft: #efefff;
  --on-accent: #fff;
  --mark-bg: #121116;
  --mark-ink: #fff;
  --bar: #fbfafce6;
  --surface: #ffffffd9;
  --surface-solid: #fff;
  --subtle: #fbfafc;
  --quiet: #f2f0f5;
  --state: #f0eef3;
  --hover: #f5f3f8;
  --ambient-shadow: #241e3f12;
  --focus: #5354ed3d;
  font-family: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: clip; color: var(--ink); background: var(--paper); }
body { min-height: 100vh; min-height: 100svh; margin: 0; padding-bottom: env(safe-area-inset-bottom); color: var(--ink); background: radial-gradient(circle at 10% -8%, #5354ed17, transparent 34rem), var(--paper); -webkit-font-smoothing: antialiased; }
button, textarea, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, textarea:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.browser-bar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(24px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent); background: var(--bar); backdrop-filter: blur(18px); }
.brand-home { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 14px; font-weight: 750; letter-spacing: -.02em; text-decoration: none; }
.brand-mark, .search-mark { display: grid; height: 34px; place-items: center; color: var(--mark-ink); background: var(--mark-bg); border-radius: 10px; font-family: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; }
.brand-mark { width: 34px; font-size: 13px; letter-spacing: -.08em; }
.search-mark { min-width: 68px; padding-inline: 12px; box-shadow: 0 8px 22px #1211161f; font-size: 12px; letter-spacing: -.035em; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.search-mark:hover { transform: translateY(-1px); box-shadow: 0 12px 28px #1211162b; }

.workspace { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0 72px; }
.panel-kicker { color: var(--accent-dark); font-family: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.workbench { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: start; gap: 18px; }
.tool-rail { position: sticky; top: 18px; display: grid; gap: 5px; padding: 8px; background: color-mix(in srgb, var(--surface-solid) 72%, transparent); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 45px var(--ambient-shadow); backdrop-filter: blur(16px); }
.tool-rail button { display: grid; gap: 3px; padding: 12px; color: var(--muted); background: transparent; border: 0; border-radius: 12px; cursor: pointer; text-align: left; }
.tool-rail button:hover { color: var(--ink); background: var(--hover); }
.tool-rail button[aria-pressed="true"] { color: var(--ink); background: var(--surface-solid); box-shadow: 0 4px 14px var(--ambient-shadow); }
.tool-rail span { font-size: 12px; font-weight: 750; }
.tool-rail small { font-size: 11px; }
.tool-canvas { min-width: 0; }
.workspace-panel { position: relative; overflow: hidden; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 55px var(--ambient-shadow); backdrop-filter: blur(16px); }
.source-panel { min-height: 560px; }
.source-panel::before { position: absolute; inset: -120px auto auto -100px; width: 250px; height: 250px; pointer-events: none; content: ""; background: #5354ed0f; border-radius: 50%; }
.panel-heading { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.panel-heading > div { display: grid; gap: 3px; }
.panel-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.step-state { padding: 7px 10px; color: var(--muted); background: var(--state); border-radius: 999px; font-size: 11px; font-weight: 700; }
html[data-workspace-state="selected"] #captureStep .step-state, html[data-workspace-state="ready"] #captureStep .step-state, html[data-workspace-state="search"] #captureStep .step-state, html[data-workspace-state="ready"] #askStep .step-state, html[data-workspace-state="search"] #askStep .step-state, html[data-workspace-state="search"] #routeStep .step-state { color: var(--accent-dark); background: var(--accent-soft); }

.capture-actions { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid transparent; border-radius: 11px; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .14s, background-color .14s, border-color .14s; text-decoration: none; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .46; }
.button-primary { color: var(--on-accent); background: var(--accent); box-shadow: 0 8px 20px #5354ed2b; }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); }
.button-secondary { color: var(--ink); background: var(--surface-solid); border-color: var(--line-strong); }
.button-secondary:hover:not(:disabled), .button-quiet:hover:not(:disabled) { background: var(--hover); }
.button-quiet { margin-left: auto; color: var(--muted); background: transparent; border-color: transparent; }
.inline-status { min-height: 20px; margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.capture-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 16px 0 0; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 13px; }
.capture-metrics div { padding: 11px 12px; background: var(--subtle); }
.capture-metrics dt { color: var(--muted); font-size: 11px; font-weight: 700; }
.capture-metrics dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.file-list, .source-routes { margin: 12px 0 0; padding: 0; overflow: hidden; background: var(--subtle); border: 1px solid var(--line); border-radius: 14px; list-style: none; }
.file-list { max-height: 238px; overflow-y: auto; }
.file-list li, .source-routes li { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.file-list li:last-child, .source-routes li:last-child { border-bottom: 0; }
.file-list li > span:first-child, .source-routes code { min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; font-weight: 650; }
.file-list small, .source-routes li > span { flex: none; color: var(--muted); font-size: 11px; }
.file-list .empty-state, .source-routes .empty-route { min-height: 90px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 4px; color: var(--muted); }
.empty-state strong, .empty-route strong { color: var(--ink); font-size: 12px; }
.empty-state span, .empty-route span { font-size: 11px; line-height: 1.45; }
.authorization-row { display: grid; gap: 13px; margin-top: 14px; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); border-radius: 13px; }
.consent-row input { flex: none; margin: 3px 0 0; accent-color: var(--accent); }
.consent-row span { display: grid; gap: 3px; }
.consent-row strong { font-size: 12px; }
.consent-row small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.authorization-row .button { justify-self: start; }

.composer { margin-top: 20px; padding: 14px; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 8px 24px var(--ambient-shadow); }
.composer > label { display: block; margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.composer textarea { width: 100%; min-height: 128px; display: block; padding: 14px 15px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; resize: vertical; font-size: 15px; line-height: 1.55; }
.composer textarea::placeholder { color: var(--muted); }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.composer-footer > span { color: var(--muted); font-size: 11px; }
kbd { padding: 2px 5px; color: var(--ink); background: var(--quiet); border: 1px solid var(--line); border-radius: 5px; font: inherit; }

.result-panel, .account-panel { min-height: 310px; }
.route-summary, .account-card { margin-top: 17px; padding: 16px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); border-radius: 14px; }
.route-summary > strong { color: var(--accent-dark); font-size: 12px; }
.route-summary p, .account-card p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.account-action { min-height: 36px; display: inline-flex; align-items: center; margin-top: 12px; padding: 0 12px; color: var(--mark-ink); background: var(--mark-bg); border-radius: 10px; font-size: 11px; font-weight: 700; text-decoration: none; }
.account-card .button { margin-top: 16px; }

.visually-hidden { position: fixed; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

@media (pointer: coarse) { .tool-rail button { min-height: 44px; } }
@media (max-width: 860px) { .workspace { width: min(100% - 28px, 1120px); padding-top: 38px; } .workbench { grid-template-columns: 1fr; } .tool-rail { position: static; grid-template-columns: repeat(4, 1fr); } .tool-rail button { text-align: center; } .source-panel { min-height: 0; } }
@media (max-width: 560px) { .browser-bar { min-height: 60px; padding: 0 14px; } .workspace { width: min(100% - 20px, 1120px); padding-top: 24px; } .workspace-panel { padding: 17px; border-radius: 19px; } .tool-rail { grid-template-columns: repeat(2, 1fr); } .capture-actions .button { flex: 1 1 120px; } .button-quiet { margin-left: 0; } .capture-metrics { grid-template-columns: 1fr; } .composer-footer { align-items: stretch; flex-direction: column; } .composer-footer .button { width: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
