:root { --paper: #f5f6f7; --ink: #252a30; --ink-muted: #697078; --line: #e0e4e7; --shadow: 0 8px 28px #20283012; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
* { letter-spacing: 0; }
[hidden] { display: none !important; }
body { height: 100dvh; overflow: hidden; }
button svg, label svg { width: 17px; height: 17px; flex: 0 0 17px; pointer-events: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.button, .icon-button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; border-radius: 4px; }
.button.primary { background: var(--teal); border-color: var(--teal); }
.button.primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
button:disabled { opacity: .45; cursor: not-allowed; }
.topbar { height: 64px; min-height: 64px; padding: 10px 20px; background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.brand-copy { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 32px; height: 32px; border-radius: 8px; flex: 0 0 32px; }
.brand-copy strong { font-size: 17px; }
.brand-copy .brand-label { font-size: 13px; font-weight: 500; color: var(--ink-muted); margin-left: 8px; }
.brand-copy > span { max-width: min(50vw, 600px); color: var(--ink-muted); }
.status-pill { color: var(--ink-muted); border: 0; }
.status-pill.dirty { color: var(--yellow); }
.top-actions { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.auth-actions, .auth-user { display: flex; align-items: center; gap: 8px; }
.auth-user span { font-size: 13px; color: var(--ink); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-shell { width: 100%; height: calc(100dvh - 64px); padding: 0; }
.layout-grid { height: 100%; grid-template-columns: 176px minmax(0, 1fr); gap: 0; align-items: stretch; }
.side-panel { position: static; min-height: 0; padding: 20px 10px 12px; border: 0; border-right: 1px solid var(--line); background: #fafbfc; display: flex; flex-direction: column; overflow: auto; }
.side-heading { padding: 0 10px 16px; border: 0; }
.side-heading h1 { font-size: 12px; margin: 0; color: var(--ink-muted); font-weight: 500; }
.tabs { padding: 0; gap: 5px; }
.tab { gap: 10px; border: 0; border-radius: 4px; min-height: 42px; }
.tab.active { background: var(--teal-soft); color: var(--teal-dark); border: 0; }
.tab:hover { background: #eaf0f1; }
.nav-count { margin-left: auto; font-size: 11px; color: var(--yellow); }
.summary-grid { display: grid; grid-template-columns: 1fr; gap: 12px; border-top: 1px solid var(--line); padding: 18px 10px; margin: 24px 0 0; }
.summary-item { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-muted); }
.summary-item strong { color: var(--ink); font-weight: 550; font-variant-numeric: tabular-nums; }
.side-note { margin: auto 10px 0; padding-top: 14px; }
.sheet-list { display: grid; gap: 14px; padding: 8px 4px 24px; }
.sheet-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 14px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.sheet-card header { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.sheet-card header strong { font-size: 15px; }
.sheet-card header span { font-size: 12px; color: var(--ink-muted); }
.sheet-card label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-muted); }
.sheet-card input, .sheet-card select { min-height: 34px; border: 1px solid var(--line); border-radius: 4px; padding: 0 8px; }
.sheet-card .sheet-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.locate-button { min-height: 32px; margin-top: 6px; }
.cloud-auth { margin: 12px 0; }
.cloud-quote { margin: 8px 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 1.6; }
.content-panel { min-height: 0; overflow: hidden; }
.view { height: 100%; overflow: auto; border: 0; box-shadow: none; }
.overview-view { background: #f7f8f9; padding: clamp(18px, 3vw, 42px); }
.overview-view.active { display: block; }
.overview-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; max-width: 1240px; margin: 0 auto; padding: 4px 0 30px; }
.section-kicker { display: block; color: var(--teal); font-size: 11px; font-weight: 700; line-height: 1.3; }
.overview-header h2 { margin: 7px 0 5px; color: var(--ink); font-size: clamp(24px, 3vw, 34px); line-height: 1.2; font-weight: 680; text-wrap: pretty; }
.overview-header p, .flow-heading p { margin: 0; color: var(--ink-muted); font-size: 13px; line-height: 1.6; }
.overview-header-status { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; padding-top: 4px; }
.flow-status { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; color: #59636b; background: #eceff1; font-size: 11px; font-weight: 650; white-space: nowrap; }
.flow-status.complete, .flow-status.working { color: var(--teal-dark); background: var(--teal-soft); }
.flow-status.attention { color: #8a5c00; background: var(--yellow-soft); }
.flow-section, .overview-grid, .usage-note { max-width: 1240px; margin-left: auto; margin-right: auto; }
.flow-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.flow-heading { display: flex; justify-content: space-between; gap: 18px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.flow-heading h3, .panel-heading h3 { margin: 3px 0 0; color: var(--ink); font-size: 16px; font-weight: 650; }
.flow-version { align-self: center; color: var(--ink-muted); font-size: 12px; white-space: nowrap; }
.flow-version strong { color: var(--ink); font-weight: 600; }
.workflow-steps { list-style: none; margin: 0; padding: 0; }
.workflow-step { position: relative; display: grid; grid-template-columns: 44px 34px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 82px; padding: 13px 22px 13px 0; border-bottom: 1px solid var(--line); }
.workflow-step:last-child { border-bottom: 0; }
.step-rail { align-self: stretch; display: flex; justify-content: flex-end; align-items: center; color: #899197; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.workflow-step:not(:last-child) .step-rail::after { content: ""; position: absolute; width: 1px; top: 65px; bottom: -15px; margin-right: -21px; background: var(--line); }
.step-icon { display: grid; place-items: center; width: 32px; height: 32px; color: #697078; background: #edf0f1; border-radius: 4px; }
.workflow-step.complete .step-icon { color: var(--teal-dark); background: var(--teal-soft); }
.workflow-step.attention .step-icon { color: #8a5c00; background: var(--yellow-soft); }
.workflow-step.muted .step-icon { color: #899197; background: #f1f3f4; }
.step-icon svg { width: 16px; height: 16px; }
.step-copy { display: grid; gap: 3px; min-width: 0; }
.step-copy > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.step-copy h4 { margin: 0; color: var(--ink); font-size: 14px; font-weight: 650; }
.step-copy p { margin: 0; max-width: 720px; color: var(--ink-muted); font-size: 12px; line-height: 1.5; text-wrap: pretty; }
.flow-action, .text-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; color: var(--teal-dark); background: transparent; font-size: 12px; font-weight: 650; text-decoration: none; white-space: nowrap; }
button.flow-action { min-height: 34px; padding: 0 8px; border: 1px solid transparent; border-radius: 4px; }
button.flow-action:hover, .text-action:hover { color: var(--teal); background: var(--teal-soft); }
.flow-action.disabled { color: #9ba2a7; cursor: default; }
.flow-action svg, .text-action svg { width: 15px; height: 15px; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.overview-panel { min-width: 0; padding: 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.source-files, .readiness-list { display: grid; }
.source-file, .readiness-row { display: flex; align-items: center; gap: 10px; min-height: 58px; border-bottom: 1px solid #edf0f1; }
.source-file:last-child, .readiness-row:last-child { border-bottom: 0; }
.source-file-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; color: var(--teal-dark); background: var(--teal-soft); border-radius: 4px; }
.source-file-icon svg { width: 16px; height: 16px; }
.source-file div { min-width: 0; display: grid; gap: 2px; }
.source-file strong { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.source-file div span { color: var(--ink-muted); font-size: 11px; }
.source-file-state { margin-left: auto; color: var(--teal-dark); font-size: 11px; white-space: nowrap; }
.readiness-row { justify-content: space-between; color: var(--ink-muted); font-size: 12px; }
.readiness-row strong { font-weight: 620; }
.readiness-row strong.complete, .readiness-row strong.working { color: var(--teal-dark); }
.readiness-row strong.attention { color: #8a5c00; }
.readiness-row strong.muted { color: #899197; }
.empty-state { padding: 24px 0; color: var(--ink-muted); font-size: 12px; }
.usage-note { display: flex; gap: 9px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; color: var(--ink-muted); border: 1px solid var(--line); background: #fff; border-radius: 6px; }
.usage-note svg { flex: 0 0 17px; width: 17px; height: 17px; margin-top: 1px; color: var(--teal); }
.usage-note p { margin: 0; font-size: 12px; line-height: 1.65; }
.eyebrow, .view-header p { display: none; }
.view-header { padding: 20px 24px; align-items: center; }
.view-header h2 { margin: 0; font-size: 18px; }
#view-model.active { display: flex; flex-direction: column; overflow: hidden; }
.model-header { padding: 12px 18px; gap: 12px; align-items: center; flex-shrink: 0; }
.model-header h2 { font-size: 15px; margin: 0 0 4px; }
.model-header p { font-size: 11px; }
.model-tools { gap: 6px; }
.model-search { min-width: 150px; width: 190px; border-radius: 4px; }
.model-search input, .search-box input { border: 0; box-shadow: none; min-height: 0; padding: 0; background: transparent; }
.model-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); position: relative; }
.model-layout:has(.model-inspector:not([hidden])) { grid-template-columns: minmax(0, 1fr) 280px; }
.model-stage { height: 100%; min-height: 0; background: #eceff1; }
#modelCanvas { height: 100%; min-height: 0; width: 100%; }
.model-loading { background: #eceff1; color: var(--ink-muted); }
.model-loading.error { color: var(--red); }
.model-inspector { height: 100%; min-height: 0; overflow: auto; background: #fff; }
.inspector-heading { min-height: 60px; padding: 16px; }
.model-toolbar { left: 18px; right: auto; bottom: 42px; }
.view-button { color: var(--ink-muted); background: #ffffffed; border-color: #cbd2d6; min-height: 32px; font-size: 12px; }
.view-button:hover, .view-button.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.model-legend { color: #555f67; bottom: 16px; }
.model-legend-item i { box-shadow: none; }
.icon-button[aria-expanded="true"] { color: var(--teal); background: var(--teal-soft); border-color: var(--teal); }
.finding-count { border: 0; border-radius: 4px; }
.storey-card { border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 12px 0; }
.toast { top: 72px; }
dialog { width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); box-shadow: 0 20px 80px #1e242833; }
dialog::backdrop { background: #18212b55; }
.dialog-heading, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { font-size: 19px; margin: 0; }
.delivery-facts { margin: 22px 0; }
.delivery-facts div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.delivery-facts dt { color: var(--ink-muted); }
.delivery-facts dd { margin: 0; overflow-wrap: anywhere; }
.delivery-warning { font-size: 12px; line-height: 1.7; color: var(--yellow); background: var(--yellow-soft); padding: 12px; border-radius: 4px; }
#deliveryMessage { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.dialog-actions { margin-top: 24px; flex-wrap: wrap; }
.export-links { display: flex; flex-wrap: wrap; padding: 12px 0 0; gap: 16px; }
.export-links a, .export-links a:hover { color: var(--teal); font-size: 13px; }
@media (max-width: 1150px) {
  .layout-grid { grid-template-columns: 150px minmax(0, 1fr); }
  .model-header { align-items: flex-start; flex-direction: column; }
  .model-tools { width: 100%; justify-content: flex-start; }
  .model-search { flex: 1; }
  .model-layout:has(.model-inspector:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .model-inspector { position: absolute; right: 0; top: 0; width: min(280px, 85%); z-index: 2; border-left: 1px solid var(--line); box-shadow: -5px 0 15px #20283012; }
}
@media (max-width: 760px) {
  .topbar { height: 64px; padding: 8px 12px; flex-wrap: nowrap; align-items: center; gap: 8px; }
  .brand-copy { flex: 1; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy .brand-label, .status-pill { display: none; }
  .top-actions { width: auto; margin: 0; gap: 7px; }
  .top-actions .button { font-size: 12px; padding: 0 10px; }
  .app-shell { padding: 0; }
  .layout-grid { display: flex; flex-direction: column; }
  .side-panel { flex: 0 0 auto; padding: 0; margin: 0; border: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .side-heading, .summary-grid { display: none; }
  .tabs { display: flex; padding: 4px 6px; gap: 2px; overflow: auto; }
  .tab { padding: 0 9px; gap: 6px; min-height: 44px; font-size: 12px; }
  .tab svg { display: none; }
  .content-panel { flex: 1; }
  .overview-view { padding: 18px 12px 24px; }
  .overview-header { display: grid; gap: 14px; padding-bottom: 20px; }
  .overview-header h2 { font-size: 25px; }
  .overview-header-status { justify-content: space-between; padding: 0; }
  .flow-heading { display: grid; gap: 12px; padding: 17px 14px; }
  .flow-version { align-self: start; }
  .workflow-step { grid-template-columns: 26px 32px minmax(0, 1fr); gap: 10px; min-height: 0; padding: 14px 12px 14px 0; }
  .workflow-step:not(:last-child) .step-rail::after { top: 56px; bottom: -16px; margin-right: -12px; }
  .step-copy > div { flex-wrap: wrap; gap: 6px; }
  .flow-action { grid-column: 3; justify-content: flex-start; width: max-content; padding: 5px 0; }
  .overview-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .overview-panel { padding: 18px 16px; }
  .usage-note { margin-top: 12px; padding: 13px; }
  .model-header { padding: 10px 12px; gap: 8px; }
  .model-header > div:first-child { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; }
  .model-header h2 { white-space: nowrap; margin: 0; }
  .model-header p { font-size: 10px; text-align: right; }
  .model-tools { margin: 0; gap: 5px; }
  .model-search { flex: 1 1 100%; height: 38px; }
  .model-tools select { flex: 1 1 80px; width: 80px; padding: 0 4px; }
  .model-tools .icon-button { flex: 0 0 38px; }
  .icon-button, .button, .view-button, select { min-height: 38px; }
  .model-stage, #modelCanvas { height: 100%; min-height: 0; }
  .model-toolbar { bottom: 54px; left: 12px; }
  .model-legend { left: 12px; right: 12px; gap: 7px; }
  dialog { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
