:root {
  color-scheme: light;
  --ink: #102238;
  --muted: #63748a;
  --line: #dce5ec;
  --paper: #f4f7f9;
  --panel: #ffffff;
  --teal: #00a995;
  --teal-dark: #007c70;
  --mint: #e7f6f3;
  --amber: #a25b00;
  --shadow: 0 18px 48px rgba(20, 45, 67, .07);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Manrope, Inter, system-ui, sans-serif; font-size: 14px; }
a { color: var(--teal-dark); }
.topbar { min-height: 72px; padding: 0 max(28px, calc((100vw - 1200px)/2)); display: flex; align-items: center; justify-content: space-between; background: #102238; color: white; border-bottom: 3px solid var(--teal); }
.brand { display: inline-flex; gap: 11px; align-items: center; color: white; font-weight: 800; font-size: 13px; letter-spacing: .13em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; height: 31px; width: 31px; color: #102238; background: var(--teal); border-radius: 9px 9px 9px 2px; font-size: 17px; font-weight: 800; letter-spacing: 0; }
.brand-accent { color: #6fe1ce; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.tenant-label { font-weight: 700; color: #eaf2f8; }
.user-label { color: #adc2d2; font-size: 12px; }
.inline-form { display: inline; margin: 0; }
.page-shell { max-width: 1200px; padding: 38px 28px 70px; margin: 0 auto; min-height: calc(100vh - 130px); }
.footer { max-width: 1200px; margin: 0 auto; padding: 0 28px 26px; display: flex; justify-content: space-between; color: #8795a4; font-size: 11px; }
h1,h2,h3,h4,p { margin-top: 0; }
h1 { font-size: clamp(30px, 3vw, 42px); letter-spacing: -.045em; margin: 8px 0 9px; line-height: 1.12; }
h2 { font-size: 22px; letter-spacing: -.035em; margin: 4px 0 9px; }
h3 { font-size: 17px; margin: 0 0 10px; letter-spacing: -.02em; }
h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #477080; margin-bottom: 8px; }
.eyebrow { color: var(--teal-dark); font: 500 10px 'DM Mono', monospace; letter-spacing: .12em; text-transform: uppercase; }
.lede { font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 690px; margin-bottom: 0; }
.muted { color: var(--muted); line-height: 1.6; }
.small { font-size: 11px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 31px; }
.hero-note,.ready-badge { border: 1px solid #cfe7e2; border-radius: 999px; padding: 10px 14px; color: #176b62; background: #f1fbf8; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px #d7f4ed; margin-right: 8px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.dashboard-grid { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 18px; }
.create-panel,.list-panel { padding: 23px; }
.stack-form { display: grid; gap: 16px; margin-top: 22px; }
.field,.mini-field { display: grid; gap: 7px; color: #314b61; font-size: 12px; font-weight: 700; }
input,textarea { font: inherit; color: var(--ink); }
.field input,.field textarea,.mini-field input,.mini-field textarea { width: 100%; border: 1px solid #cfdae3; background: #fbfdfe; border-radius: 8px; padding: 11px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus,.field textarea:focus,.mini-field input:focus,.mini-field textarea:focus { border-color: #00a995; box-shadow: 0 0 0 3px rgba(0,169,149,.12); }
.field textarea,.mini-field textarea { resize: vertical; line-height: 1.5; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 41px; border: 1px solid transparent; border-radius: 8px; padding: 0 15px; font: 700 12px Manrope, sans-serif; text-decoration: none; cursor: pointer; transition: transform .12s, background .12s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-primary { color: white; background: #007f73; }
.button-primary:hover:not(:disabled) { background: #006c62; }
.button-secondary { color: #174259; background: white; border-color: #cbd8e1; }
.button-secondary:hover:not(:disabled) { background: #f4faf9; border-color: #98cfc5; }
.button-quiet { color: #d6e1e9; background: transparent; border-color: #39536a; min-height: 34px; }
.button-wide { width: 100%; }
.section-heading,.panel-title-row,.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.count-pill { display: grid; place-items: center; min-width: 31px; height: 31px; padding: 0 9px; border-radius: 999px; background: #edf4f5; color: #427176; font: 500 11px 'DM Mono',monospace; }
.project-list { margin-top: 18px; border-top: 1px solid #e7edf1; }
.project-row { display: flex; align-items: center; gap: 13px; padding: 16px 5px; border-bottom: 1px solid #e7edf1; color: var(--ink); text-decoration: none; }
.project-row:hover { background: #f7fbfb; }
.project-icon { display: grid; place-items: center; flex: 0 0 37px; height: 37px; border-radius: 10px; background: var(--mint); color: var(--teal-dark); font-size: 20px; }
.project-main { display: grid; gap: 5px; min-width: 0; flex: 1; }
.project-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-main small { color: #8795a4; font-size: 11px; }
.project-state { color: #66798c; font-size: 10px; white-space: nowrap; }
.row-arrow { color: var(--teal-dark); }
.empty-state { display: grid; place-items: center; text-align: center; padding: 44px 10px; color: #77899a; gap: 8px; }
.empty-state strong { color: #425a6d; }
.empty-glyph { color: var(--teal); font-size: 30px; }
.note-strip { margin-top: 18px; border: 1px solid #d7e9e7; border-radius: 10px; background: #f0f8f7; padding: 14px 17px; color: #476370; font-size: 12px; line-height: 1.6; }
.notice { border-radius: 9px; padding: 13px 16px; margin: 16px 0; font-size: 12px; line-height: 1.5; }
.notice-error { background: #fff0ed; border: 1px solid #f1c4b9; color: #8b3225; }
.notice-amber { margin: 12px 0 18px; background: #fff8e8; border: 1px solid #ead7a9; color: #76500b; }
.login-wrap { max-width: 440px; margin: 55px auto; }
.login-panel { padding: 25px; display: grid; gap: 18px; margin-top: 24px; }
.back-link { display: inline-block; color: #577083; text-decoration: none; margin: 0 0 22px; font-size: 12px; }
.back-link:hover { color: var(--teal-dark); }
.project-hero { margin-bottom: 22px; }
.project-hero-actions { display: flex; align-items: center; gap: 10px; }
.project-hero-actions form { margin: 0; }
.danger-quiet { color: #8b4539; border-color: #e8cdc8; }
.ready-badge { display: flex; align-items: center; gap: 8px; }
.ready-check { background: var(--teal); color: white; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; }
.workflow-steps { display: flex; align-items: center; gap: 11px; margin: 0 0 21px; color: #8a99a8; }
.workflow-step { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.workflow-step span { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #d4dee5; border-radius: 50%; color: #728397; font: 10px 'DM Mono',monospace; }
.workflow-step.active { color: #176b62; }
.workflow-step.active span { color: #fff; background: #078a7d; border-color: #078a7d; }
.workflow-line { height: 1px; width: 45px; background: #d8e1e7; }
.upload-panel,.architecture-panel { padding: 23px; margin-bottom: 18px; }
.upload-form { display: flex; gap: 12px; align-items: center; margin-top: 17px; }
.upload-drop { position: relative; display: flex; gap: 13px; align-items: center; flex: 1; min-height: 65px; padding: 10px 14px; border: 1px dashed #9fb7c4; border-radius: 9px; background: #f8fbfc; cursor: pointer; }
.upload-drop:hover { border-color: #00a995; background: #f1faf8; }
.upload-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-drop span:not(.upload-mark) { display: grid; gap: 4px; }
.upload-drop small { color: #8191a1; font-size: 10px; }
.upload-mark { display: grid; place-items: center; height: 35px; width: 35px; border-radius: 9px; color: var(--teal-dark); background: #dff5ef; font-size: 21px; }
.file-chip { padding: 6px 9px; border-radius: 6px; border: 1px solid #dce5eb; color: #718296; background: #f7fafb; font: 10px 'DM Mono',monospace; }
.source-line { margin: 13px 0 0; font-size: 11px; color: #7b8c9b; }
.source-line strong { color: #365166; }
.component-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 19px; }
.component-card { padding: 15px; background: #fbfdfe; border: 1px solid #dfe7ed; border-radius: 11px; }
.component-card-top { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 14px; }
.component-card-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; font-size: 13px; }
.component-number { color: #8092a1; font: 10px 'DM Mono',monospace; }
.component-kind { color: #47877d; font-size: 9px; background: #e7f5f1; border-radius: 5px; padding: 4px 6px; white-space: nowrap; }
.component-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-field { gap: 5px; font-size: 10px; color: #607487; }
.mini-field input,.mini-field textarea { padding: 8px 9px; border-radius: 7px; font-size: 11px; min-height: 34px; }
.mini-field textarea { min-height: 50px; }
.component-flags { display: flex; gap: 18px; padding-top: 13px; margin-top: 12px; border-top: 1px solid #e7edf1; }
.check-row { display: inline-flex; align-items: center; gap: 7px; color: #617387; font-size: 10px; cursor: pointer; }
.check-row input { accent-color: #078a7d; width: 15px; height: 15px; margin: 0; }
.crown-check { color: #a26b08; font-weight: 800; }
.crown-check input { accent-color: #e4a42b; }
.flows-panel { margin-top: 20px; }
.flows-heading { margin-bottom: 9px; font: 500 10px 'DM Mono',monospace; letter-spacing: .1em; color: #577083; text-transform: uppercase; }
.flow-list { display: flex; flex-wrap: wrap; gap: 7px; }
.flow-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #e0e8ed; border-radius: 7px; background: #f9fbfc; font-size: 10px; color: #586e80; }
.flow-from,.flow-to { font-weight: 700; color: #365268; }
.flow-arrow { color: var(--teal-dark); }
.flow-label { padding-left: 7px; margin-left: 1px; border-left: 1px solid #cbd8e0; color: #8291a0; }
.context-field { margin-top: 21px; }
.context-field textarea { max-width: 100%; }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.editor-actions form { margin: 0; }
.results-heading { margin: 38px 0 12px; }
.download-actions { display: flex; gap: 9px; }
.finding-list { display: grid; gap: 12px; }
.finding-card { padding: 18px 20px; }
.finding-top { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.priority { display: inline-block; padding: 4px 7px; border-radius: 5px; background: #ffebe4; color: #a2462c; font: 500 10px 'DM Mono',monospace; }
.priority-p2 { background: #fff4da; color: #8d5c00; }
.priority-p3 { background: #eaf0f5; color: #526b80; }
.finding-id { color: #7c8d9d; font: 10px 'DM Mono',monospace; }
.finding-component { color: #507282; font-size: 10px; }
.finding-card > p { color: #465d70; line-height: 1.6; font-size: 12px; }
.finding-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; border-top: 1px solid #e5ebef; padding-top: 14px; }
.finding-grid p,.finding-grid li { font-size: 11px; color: #617487; line-height: 1.55; }
.finding-grid ul { padding-left: 17px; margin-bottom: 0; }
.finding-grid li + li { margin-top: 4px; }
.finding-grid a { color: #007d70; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.finding-status { margin: 14px 0 0; color: #976208 !important; font: 10px 'DM Mono',monospace; }
.attribution { margin-top: 18px; color: #8897a4; line-height: 1.5; font-size: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 860px) { .dashboard-grid { grid-template-columns: 1fr; } .component-editor { grid-template-columns: 1fr; } .hero-row,.results-heading { align-items: flex-start; flex-direction: column; } .download-actions { width: 100%; flex-wrap: wrap; } }
@media (max-width: 560px) { .topbar { padding: 0 17px; } .tenant-label { display: none; } .page-shell { padding: 27px 16px 55px; } .footer { padding: 0 16px 20px; flex-direction: column; gap: 6px; } .upload-form { align-items: stretch; flex-direction: column; } .workflow-steps { gap: 5px; } .workflow-step { gap: 4px; font-size: 9px; } .workflow-line { width: 14px; } .component-fields,.finding-grid { grid-template-columns: 1fr; } .editor-actions { align-items: stretch; flex-direction: column-reverse; } .editor-actions .button { width: 100%; } .project-state { display: none; } }
