@font-face { font-family: Inter; src: url('./fonts/inter-latin-400.woff2') format('woff2'); font-weight: 400; }
@font-face { font-family: Inter; src: url('./fonts/inter-latin-600.woff2') format('woff2'); font-weight: 600; }
@font-face { font-family: Inter; src: url('./fonts/inter-latin-700.woff2') format('woff2'); font-weight: 700; }
:root { /* Values mirror assets/tokens.css. */ --plum:#18061b; --ds-plum:#2c1338; --ink-on-plum:#fae0fe; --accent:#8b299b; --focus:#ec85fe; --surface:#f8f7f1; --line:#e7e5da; --text:#363137; --muted:#6f696f; --weak:#9d9898; --r1:4px; --r2:8px; --r3:20px; --z-bar:10; --z-drawer:20; --z-dialog:30; }
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { margin: 0; color: var(--text); background: var(--surface); font: 14px/1.45 Inter, system-ui, sans-serif; }
button, input { font: inherit; }
button { min-height: 32px; border: 1px solid var(--line); border-radius: var(--r1); background: #fff; color: var(--text); cursor: pointer; font-weight: 600; }
button:active { transform: scale(.97); transition: transform 120ms cubic-bezier(.23,1,.32,1); }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 50; top: 8px; left: 8px; transform: translateY(-150%); background: #fff; padding: 8px; }
.skip-link:focus { transform: none; }
.topbar { position: relative; z-index: var(--z-bar); height: 48px; display: flex; align-items: center; gap: 24px; padding: 0 12px; border-bottom: 1px solid var(--line); background: #fff; }
.brand { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand img { width: auto; height: 20px; display: block; }
.brand strong { font-weight: 600; }
.breadcrumb { min-width: 0; max-width: 520px; padding: 4px 10px; border-color: transparent; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb span { color: var(--muted); }
.actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.actions button { padding: 4px 12px; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill { border-radius: var(--r3); background: var(--surface); }
#agent-toggle i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; background: var(--weak); }
#agent-toggle[aria-expanded="true"] i { background: var(--accent); }
#agent-toggle.working i { background: var(--accent); animation: pulse 900ms ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.8); opacity: .45; } }
main { display: flex; height: calc(100dvh - 48px); min-width: 1024px; }
.surface { position: relative; flex: 1; min-width: 0; background: var(--surface); }
.surface.changed::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px var(--focus); opacity: 0; animation: changed 600ms cubic-bezier(.23,1,.32,1); }
@keyframes changed { 0%,35% { opacity: 1; } 100% { opacity: 0; } }
iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
iframe[hidden] { display: none; }
.empty-card { position: absolute; top: 50%; left: 50%; width: 440px; transform: translate(-50%,-52%); padding: 28px; border: 1px solid var(--line); border-radius: var(--r2); background: #fff; box-shadow: 0 12px 36px rgb(24 6 27 / 8%); }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; color: var(--plum); font-size: 28px; line-height: 1.15; text-wrap: balance; }
.empty-card > p { text-wrap: pretty; }
.empty-card[hidden] { display: none; }
.lock-notice .lock-hint { color: var(--muted); font-size: 13px; }
.lock-error { margin: 0; color: #a1173b; font-size: 13px; }
.lock-error[hidden], .banner[hidden] { display: none; }
.banner { position: absolute; z-index: var(--z-bar); top: 12px; left: 50%; display: flex; align-items: flex-start; gap: 12px; width: min(640px, calc(100% - 48px)); padding: 10px 12px 10px 16px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: var(--r2); background: #fff; box-shadow: 0 8px 20px rgb(24 6 27 / 14%); }
.banner p { flex: 1; margin: 6px 0; text-wrap: pretty; }
.banner button { flex: none; width: 32px; padding: 0; font-size: 18px; }
.banner-warning { border-color: #f2c3cf; background: #fff5f7; }
.banner-warning:not([hidden]) + .banner { top: 76px; }
.empty-card > button { margin: 12px 0 24px; padding: 7px 12px; }
.empty-card ol { margin: 8px 0 0; padding: 0; list-style: none; }
.empty-card li { border-top: 1px solid var(--line); }
.empty-card li button { width: 100%; padding: 7px 0; border: 0; text-align: left; color: var(--muted); font-weight: 400; }
#agent-panel { width: 320px; flex: 0 0 320px; padding: 16px; border-left: 1px solid var(--line); background: #fff; transform: translateX(100%); opacity: 0; margin-right: -320px; overscroll-behavior: contain; overflow: auto; transition: transform 200ms cubic-bezier(.23,1,.32,1), opacity 200ms cubic-bezier(.23,1,.32,1), margin-right 200ms cubic-bezier(.23,1,.32,1); }
#agent-panel.open { transform: none; opacity: 1; margin-right: 0; }
.panel-heading, .dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.panel-heading h2, .dialog-heading h2 { margin: 2px 0 0; color: var(--plum); font-size: 18px; }
.panel-heading button, .dialog-heading button { width: 32px; padding: 0; font-size: 20px; }
.agent-connect h3, #agent-log-title { margin: 22px 0 6px; color: var(--plum); font-size: 14px; }
.agent-connect > p { color: var(--muted); }
#agent-tools { padding: 0; list-style: none; }
#agent-tools li { display: grid; gap: 1px; margin: 9px 0; }
#agent-tools code, .snippet code { color: var(--plum); font: 600 11px/1.4 ui-monospace, monospace; }
#agent-tools span { color: var(--muted); font-size: 11px; }
.snippet { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: var(--r1); background: var(--surface); }
.snippet code { min-width: 0; overflow-wrap: anywhere; }
.snippet button { flex: none; padding: 2px 7px; font-size: 11px; }
.agent-note { margin-top: 10px; font-size: 11px; }
#agent-log { list-style: none; margin: 20px 0; padding: 0; }
.tool-row { padding: 12px 0; border-top: 1px solid var(--line); }
.tool-meta { display: flex; align-items: center; gap: 8px; }
.tool-name { font: 600 12px ui-monospace, monospace; }
.tool-status { margin-left: auto; border: 1px solid var(--line); border-radius: 10px; padding: 1px 7px; background: var(--surface); font-size: 11px; font-weight: 600; }
.tool-time { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.tool-summary { margin: 5px 0; color: var(--muted); font-size: 12px; }
.tool-row details summary { cursor: pointer; color: var(--muted); font-size: 11px; }
.tool-row pre { max-height: 180px; overflow: auto; padding: 7px; background: var(--surface); font: 10px/1.4 ui-monospace, monospace; white-space: pre-wrap; }
dialog { z-index: var(--z-dialog); width: min(620px, calc(100vw - 48px)); max-height: min(680px, calc(100dvh - 80px)); padding: 20px; border: 1px solid #e7e5da; border-radius: var(--r2); color: var(--text); box-shadow: 0 8px 20px rgb(24 6 27 / 14%); }
dialog::backdrop { background: rgb(24 6 27 / 0.18); }
.search input, dialog label input { width: 100%; height: 40px; margin: 16px 0 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r1); }
kbd { padding: 3px 6px; border: 1px solid var(--line); border-radius: var(--r1); color: var(--muted); background: var(--surface); }
.project-groups { max-height: 480px; overflow: auto; overscroll-behavior: contain; }
.studio-status { min-height: 20px; margin: 4px 8px; color: var(--muted); font-size: 12px; }
.studio-status.error { color: #b22518; }
.project-group h3 { margin: 16px 8px 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.project-group button { display: block; width: 100%; border-color: transparent; padding: 7px 8px; text-align: left; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-group button.active { background: var(--surface); }
.project-group button.loading::after { content: "Opening…"; float: right; color: var(--muted); font-size: 11px; }
.sheet { margin: auto 0 0 auto; width: 480px; max-height: 100dvh; border-radius: var(--r2) 0 0 0; }
#changed-files { padding: 0; list-style: none; }
#changed-files li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.save-actions { display: flex; gap: 8px; }
.save-actions button { padding: 6px 12px; }
.save-note, #save-status { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
@media (hover:hover) and (pointer:fine) { button:hover:not(:disabled) { background-color: var(--surface); } .primary:hover:not(:disabled) { background-color: #70217d; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.pill.saved #changes-count { display: none; }
