:root {
  --ink: #142720;
  --ink-2: #224239;
  --canvas: #f5f6f1;
  --card: #ffffff;
  --muted: #687770;
  --line: #dde3dc;
  --green: #176b50;
  --green-soft: #e9f5ee;
  --lime: #d8ff4d;
  --amber: #a76b05;
  --amber-soft: #fff6db;
  --red: #b84936;
  --shadow: 0 15px 40px rgba(24, 47, 39, 0.07);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(39, 133, 100, 0.25); outline-offset: 2px; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: 224px; display: flex; flex-direction: column;
  background: #10251f; color: white; border-right: 1px solid rgba(255,255,255,.07);
}
.brand { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 0 20px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--lime); color: #10251f; font-weight: 900; letter-spacing: -.05em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand small { margin-top: 3px; color: rgba(255,255,255,.43); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.side-nav { display: flex; flex: 1; flex-direction: column; gap: 5px; padding: 18px 12px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 9px; background: transparent; color: rgba(255,255,255,.55); text-align: left; font-size: 13px; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.08); color: white; }
.nav-item.active span { color: var(--lime); }
.nav-item span { width: 18px; text-align: center; font-size: 17px; }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.profile { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px; border-radius: 11px; background: rgba(0,0,0,.16); }
.profile > span:nth-child(2) { min-width: 0; flex: 1; }
.profile strong, .profile small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.profile strong { font-size: 12px; }
.profile small { margin-top: 2px; color: rgba(255,255,255,.4); font-size: 9px; }
.profile-actions { display: flex; align-items: center; gap: 2px; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; background: #e7f3ec; color: #143329; font-size: 11px; font-weight: 800; }
.icon-button { border: 0; background: transparent; color: rgba(255,255,255,.45); font-size: 17px; }

.workspace { min-height: 100vh; margin-left: 224px; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 10px 30px; background: rgba(245,246,241,.93); border-bottom: 1px solid rgba(211,219,212,.9); backdrop-filter: blur(14px); }
.topbar > div:first-child { min-width: 0; }
.topbar strong { display: block; margin-top: 4px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb { color: var(--muted); font-size: 10px; letter-spacing: .07em; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.model-pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; border: 1px solid #cdd9d1; border-radius: 9px; background: white; color: var(--green); font-size: 11px; font-weight: 700; }
.model-pill i { width: 7px; height: 7px; border-radius: 50%; background: #25a36e; box-shadow: 0 0 0 3px #def3e8; }
.secondary-button, .dark-button, .primary-button { min-height: 38px; padding: 0 15px; border-radius: 9px; border: 1px solid var(--line); font-size: 12px; font-weight: 700; transition: transform .15s ease, background .15s ease; }
.secondary-button { background: white; color: var(--ink); }
.dark-button { background: #10251f; border-color: #10251f; color: white; }
.primary-button { background: #176b50; border-color: #176b50; color: white; }
.primary-button:hover, .dark-button:hover { transform: translateY(-1px); filter: brightness(1.05); }
.primary-button:disabled { cursor: not-allowed; transform: none; opacity: .48; }
.wide { width: 100%; }

.content { width: min(100%, 1540px); margin: 0 auto; padding: 24px 30px 46px; }
.foundation-banner { display: flex; align-items: center; gap: 13px; margin-bottom: 21px; padding: 13px 15px; border: 1px solid #b9ddcc; border-radius: 12px; background: #edf8f2; }
.foundation-banner > div { flex: 1; }
.foundation-banner strong { color: #145e47; font-size: 12px; }
.foundation-banner p { margin: 4px 0 0; color: #477565; font-size: 11px; line-height: 1.6; }
.banner-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; background: #12342a; color: var(--lime); }
.warning-chip, .green-chip { display: inline-flex; align-items: center; width: max-content; padding: 5px 8px; border-radius: 7px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.warning-chip { border: 1px solid #edd28f; background: var(--amber-soft); color: var(--amber); }
.green-chip { background: var(--green-soft); color: var(--green); }

.title-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.title-row h1 { margin: 10px 0 5px; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.045em; }
.title-row p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.chips { display: flex; gap: 7px; }

.pipeline { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 24px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 5px 20px rgba(28,53,44,.03); }
.stage { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 12px; border-right: 1px solid #edf0ec; color: #859089; }
.stage:last-child { border-right: 0; }
.stage b { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 auto; border-radius: 50%; background: #edf0ec; font-size: 10px; }
.stage strong, .stage small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.stage strong { font-size: 11px; }
.stage small { margin-top: 3px; font-size: 9px; }
.stage.done, .stage.active { color: var(--ink); }
.stage.done b { background: var(--green-soft); color: var(--green); }
.stage.active { background: #f2f8f4; border-radius: 9px; }
.stage.active b { background: #16382e; color: var(--lime); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.metric { min-width: 0; padding: 16px 17px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.metric span, .metric small { display: block; color: var(--muted); font-size: 10px; }
.metric strong { display: block; margin: 8px 0 5px; font-size: 24px; letter-spacing: -.045em; }
.metric strong.amber { color: var(--amber); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 14px; margin-top: 14px; align-items: start; }
.panel { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 5px 24px rgba(28,53,44,.035); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.panel-heading h2 { margin: 4px 0 0; font-size: 15px; letter-spacing: -.02em; }
.eyebrow { color: #849087; font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.drop-zone { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 23px 15px; border: 1.5px dashed #b9c9c0; border-radius: 11px; background: #f7faf8; color: var(--ink); }
.drop-zone:hover, .drop-zone.dragging { border-color: #4c9278; background: #edf8f2; }
.drop-zone strong { margin: 8px 0 4px; font-size: 12px; }
.drop-zone small { color: var(--muted); font-size: 10px; }
.upload-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #15392e; color: var(--lime); font-size: 20px; }
.upload-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.upload-fields label span, .login-card label span { display: block; margin: 0 0 6px; color: #586861; font-size: 10px; font-weight: 700; }
.upload-fields input, .login-card input { width: 100%; height: 39px; padding: 0 11px; border: 1px solid #d7ded8; border-radius: 8px; background: white; color: var(--ink); font-size: 12px; }
.upload-fields .selected-files, .upload-fields .primary-button { grid-column: 1 / -1; }
.selected-files { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 8px; background: #f2f4f1; color: var(--muted); font-size: 10px; }
.selected-files > span { padding: 2px 3px; }
.selected-file-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px; border: 1px solid #dde4de; border-radius: 7px; background: white; }
.selected-file-row > span { min-width: 0; flex: 1; }
.selected-file-row strong, .selected-file-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file-row strong { color: var(--ink); font-size: 10px; }
.selected-file-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.remove-file { width: 26px; height: 26px; flex: 0 0 auto; border: 0; border-radius: 7px; background: #f1f4f1; color: #637068; font-size: 16px; line-height: 1; }
.remove-file:hover { background: #ffe9e4; color: var(--red); }
.result-box { margin-top: 10px; padding: 11px 12px; border-radius: 9px; font-size: 11px; line-height: 1.55; }
.result-box.success { background: var(--green-soft); color: var(--green); }
.result-box.error { background: #fff0ed; color: var(--red); }

.risk-list { display: flex; flex-direction: column; gap: 7px; }
.risk { display: grid; grid-template-columns: 31px minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 1px solid #e3e7e3; border-radius: 9px; background: white; color: var(--ink); text-align: left; }
.risk:hover, .risk.active { border-color: #86af9f; background: #f5faf7; }
.risk-level { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; font-size: 10px; font-weight: 800; }
.risk-level.high { background: #ffe8e3; color: var(--red); }
.risk-level.medium { background: var(--amber-soft); color: var(--amber); }
.risk strong, .risk small { display: block; }
.risk strong { font-size: 11px; }
.risk small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.risk > b { color: var(--amber); font-size: 10px; }
.evidence-card { margin-top: 10px; padding: 12px; border-radius: 10px; background: #f2f5f2; }
.evidence-card strong { font-size: 10px; }
.evidence-card p { margin: 6px 0; color: #52635c; font-size: 10px; line-height: 1.65; }
.evidence-card small { color: #8b948f; font-size: 9px; }
.capability-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.capability-grid > div { display: flex; align-items: start; gap: 10px; min-width: 0; padding: 12px; border: 1px solid #e3e8e3; border-radius: 10px; background: #fafbf8; }
.capability-grid > div > span { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; border-radius: 8px; background: #e9f5ee; color: var(--green); font-size: 9px; font-weight: 900; }
.capability-grid p { margin: 0; }
.capability-grid strong, .capability-grid small { display: block; }
.capability-grid strong { font-size: 11px; }
.capability-grid small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.empty-analysis { display: flex; align-items: center; gap: 11px; margin-top: 10px; padding: 13px; border-radius: 10px; background: #f0f5f1; }
.empty-analysis > span { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; border-radius: 10px; background: #15392e; color: var(--lime); font-size: 18px; }
.empty-analysis strong, .empty-analysis small { display: block; }
.empty-analysis strong { font-size: 10px; }
.empty-analysis small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.55; }

.analysis-panel { grid-column: 2; grid-row: 1 / span 3; }
.recent-panel, .guardrail-panel { grid-column: 1; }
.analysis-consent { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; padding: 14px; border: 1px solid #c7ded3; border-radius: 10px; background: #f1f8f4; }
.analysis-consent > div { min-width: 0; }
.analysis-consent strong, .analysis-consent small { display: block; }
.analysis-consent strong { color: #145e47; font-size: 11px; }
.analysis-consent small { margin-top: 5px; color: #527266; font-size: 9px; line-height: 1.6; }
.analysis-consent .primary-button { flex: 0 0 auto; }
.analysis-loading { display: flex; align-items: center; gap: 14px; min-height: 170px; padding: 25px; border-radius: 11px; background: #f2f7f3; }
.analysis-loading strong, .analysis-loading small { display: block; }
.analysis-loading strong { font-size: 12px; }
.analysis-loading small { max-width: 520px; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.analysis-spinner { width: 34px; height: 34px; flex: 0 0 auto; border: 3px solid #dce9e1; border-top-color: var(--green); border-radius: 50%; animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.analysis-result { display: flex; flex-direction: column; gap: 14px; }
.analysis-summary { padding: 16px; border-radius: 11px; background: #14352b; color: white; }
.analysis-summary > span { color: var(--lime); font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.analysis-summary h3 { margin: 8px 0 12px; font-size: 15px; line-height: 1.55; letter-spacing: -.015em; }
.analysis-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.analysis-meta span { padding: 5px 7px; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; color: rgba(255,255,255,.72); font-size: 8px; }
.analysis-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.analysis-section-grid > section, .analysis-block { min-width: 0; padding: 13px; border: 1px solid #e3e8e3; border-radius: 10px; background: #fbfcfa; }
.analysis-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.analysis-section-title strong { font-size: 11px; }
.analysis-section-title small { color: var(--muted); font-size: 8px; }
.fact-list, .route-list, .dfm-list { display: flex; flex-direction: column; gap: 7px; }
.fact-card { padding: 10px; border: 1px solid #e2e7e2; border-left: 3px solid #6ba68d; border-radius: 8px; background: white; }
.fact-card.inferred { border-left-color: #d4a343; }
.fact-card.missing { border-left-color: #c56b57; }
.fact-card > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fact-card strong { color: var(--muted); font-size: 8px; }
.fact-card b { font-size: 10px; text-align: right; }
.fact-card > small { display: block; margin-top: 6px; color: #66756e; font-size: 8px; line-height: 1.55; }
.fact-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.fact-tags span { padding: 3px 5px; border-radius: 5px; background: #eef3ef; color: #627169; font-size: 7px; }
.route-card { display: grid; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: start; gap: 9px; padding: 10px; border: 1px solid #e1e7e2; border-radius: 8px; background: white; }
.route-card > span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; background: var(--green-soft); color: var(--green); font-size: 8px; font-weight: 900; }
.route-card strong, .route-card small { display: block; }
.route-card strong { font-size: 10px; }
.route-card p { margin: 4px 0; color: #38574c; font-size: 9px; line-height: 1.5; }
.route-card small { color: var(--muted); font-size: 8px; line-height: 1.5; }
.route-card > b { padding: 4px 6px; border-radius: 5px; background: var(--amber-soft); color: var(--amber); font-size: 7px; white-space: nowrap; }
.dfm-card { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 10px; border: 1px solid #e3e7e3; border-radius: 8px; background: white; }
.dfm-card > span { display: grid; place-items: center; width: 34px; height: 28px; border-radius: 6px; background: #edf3ef; color: #577067; font-size: 8px; font-weight: 900; }
.dfm-card.critical > span, .dfm-card.high > span { background: #ffe9e4; color: var(--red); }
.dfm-card.medium > span { background: var(--amber-soft); color: var(--amber); }
.dfm-card strong { font-size: 10px; }
.dfm-card p { margin: 5px 0 0; color: #5d6e66; font-size: 8px; line-height: 1.55; }
.dfm-card small { display: block; margin-top: 6px; color: var(--amber); font-size: 8px; font-weight: 700; }
.completeness-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.completeness-column { padding: 10px; border-radius: 8px; background: #eef6f1; }
.completeness-column.missing { background: #fff8e8; }
.completeness-column.blocker { background: #fff0ed; }
.completeness-column > strong { color: var(--green); font-size: 9px; }
.completeness-column.missing > strong { color: var(--amber); }
.completeness-column.blocker > strong { color: var(--red); }
.completeness-column ul, .action-list, .limitation-list { margin: 7px 0 0; padding-left: 16px; }
.completeness-column li, .action-list li, .limitation-list li { margin: 4px 0; color: #5b6b64; font-size: 8px; line-height: 1.5; }
.analysis-list-empty { margin: 6px 0; color: #89938d; font-size: 9px; text-align: center; }
.limitation-list { margin-top: 0; }

.text-button { border: 0; background: transparent; color: var(--green); font-size: 10px; font-weight: 800; }
.recent-list { display: flex; flex-direction: column; gap: 7px; }
.recent-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 11px; border: 1px solid #e5e9e5; border-radius: 9px; background: white; color: var(--ink); text-align: left; }
.recent-item:hover, .recent-item.active { border-color: #86af9f; background: #f3f8f5; }
.recent-item strong, .recent-item small { display: block; }
.recent-item strong { font-size: 10px; }
.recent-item small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.recent-meta { flex: 0 0 auto; text-align: right; }
.recent-meta b { color: var(--green); font-size: 9px; }
.empty-state { margin: 12px 0 16px; color: #89938d; font-size: 11px; text-align: center; }
.guardrails { display: flex; flex-direction: column; gap: 12px; }
.guardrails > div { display: flex; align-items: start; gap: 10px; }
.guardrails p { margin: 0; }
.guardrails strong, .guardrails small { display: block; }
.guardrails strong { font-size: 11px; }
.guardrails small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.check { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 auto; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 10px; font-weight: 900; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; max-width: 340px; padding: 12px 16px; border-radius: 10px; background: #10251f; color: white; box-shadow: var(--shadow); font-size: 11px; }
.account-dialog { width: min(calc(100% - 32px), 430px); padding: 0; border: 0; border-radius: 16px; background: white; color: var(--ink); box-shadow: 0 28px 80px rgba(10,29,23,.26); }
.account-dialog::backdrop { background: rgba(11,28,23,.56); backdrop-filter: blur(3px); }
.account-form { padding: 25px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.dialog-heading h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.035em; }
.dialog-close { display: grid; place-items: center; width: 31px; height: 31px; border: 0; border-radius: 8px; background: #f0f3f0; color: #67746e; font-size: 20px; }
.dialog-copy { margin: 13px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.account-form label { display: block; margin-top: 12px; }
.account-form label span { display: block; margin-bottom: 6px; color: #586861; font-size: 10px; font-weight: 700; }
.account-form input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #d7ded8; border-radius: 8px; background: white; color: var(--ink); font-size: 13px; }
.password-hint { display: block; margin: 9px 0 17px; color: #7b8881; font-size: 9px; line-height: 1.55; }

.login-body { min-height: 100vh; background: #eef2ec; }
.login-shell { display: grid; grid-template-columns: minmax(420px, 1.08fr) minmax(420px, .92fr); min-height: 100vh; }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 28px 44px 38px; background: #10251f; color: white; }
.login-story::before { position: absolute; content: ""; width: 470px; height: 470px; right: -150px; top: 17%; border: 1px solid rgba(216,255,77,.12); border-radius: 44% 56% 61% 39%; transform: rotate(18deg); }
.login-story::after { position: absolute; content: ""; width: 320px; height: 320px; right: -40px; top: 25%; border-radius: 50%; background: radial-gradient(circle, rgba(216,255,77,.16), transparent 68%); }
.login-story .brand { padding: 0; z-index: 1; }
.login-copy { position: relative; z-index: 1; max-width: 620px; margin: auto 0; padding: 70px 0; }
.login-copy .eyebrow { color: var(--lime); }
.login-copy h1 { margin: 18px 0; font-size: clamp(38px, 4.3vw, 66px); line-height: 1.06; letter-spacing: -.055em; }
.login-copy p { max-width: 520px; color: rgba(255,255,255,.58); font-size: 14px; line-height: 1.8; }
.login-trust { position: relative; z-index: 1; display: flex; gap: 9px; }
.login-trust span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; color: rgba(255,255,255,.65); font-size: 10px; }
.login-panel { display: grid; place-items: center; padding: 35px; background: #f5f6f1; }
.login-card { width: min(100%, 410px); padding: 34px; border: 1px solid #dfe4de; border-radius: 17px; background: white; box-shadow: var(--shadow); }
.login-card h2 { margin: 12px 0 7px; font-size: 28px; letter-spacing: -.04em; }
.login-card > div > p { margin: 0 0 25px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.login-card label { display: block; margin-top: 14px; }
.login-card input { height: 44px; font-size: 13px; }
.login-card .primary-button { margin-top: 20px; height: 44px; }
.mobile-brand { color: var(--green); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.form-error { margin: 12px 0 -7px; padding: 9px 10px; border-radius: 7px; background: #fff0ed; color: var(--red); font-size: 10px; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px; color: #76847d; font-size: 9px; }
.secure-dot { width: 7px; height: 7px; border-radius: 50%; background: #2b9d71; box-shadow: 0 0 0 3px #e0f3e9; }

@media (max-width: 1180px) {
  .pipeline { grid-template-columns: repeat(4, 1fr); }
  .stage:nth-child(4) { border-right: 0; }
  .stage { border-bottom: 1px solid #edf0ec; }
  .stage:nth-child(n+5) { border-bottom: 0; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .analysis-panel, .recent-panel, .guardrail-panel { grid-column: 1; grid-row: auto; }
}

@media (max-width: 850px) {
  .sidebar { position: static; width: 100%; height: auto; min-height: 64px; flex-direction: row; align-items: center; }
  .sidebar .brand { min-height: 64px; }
  .side-nav { display: none; }
  .sidebar-foot { margin-left: auto; border: 0; }
  .sidebar-foot > .nav-item { display: none; }
  .profile { margin: 0; background: transparent; }
  .workspace { margin-left: 0; }
  .topbar { top: 64px; padding: 10px 18px; }
  .top-actions .secondary-button, .model-pill { display: none; }
  .content { padding: 18px 18px 36px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-panel { min-height: 100vh; padding: 20px; }
}

@media (max-width: 620px) {
  .profile > span:nth-child(2) { display: none; }
  .title-row { align-items: start; flex-direction: column; }
  .title-row .primary-button { width: 100%; }
  .foundation-banner { align-items: start; flex-wrap: wrap; }
  .foundation-banner .warning-chip { margin-left: 47px; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .stage, .stage:nth-child(n+5) { border-right: 1px solid #edf0ec; border-bottom: 1px solid #edf0ec; }
  .stage:nth-child(even) { border-right: 0; }
  .stage:last-child { border-bottom: 0; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { padding: 14px; }
  .metric strong { font-size: 20px; }
  .upload-fields { grid-template-columns: 1fr; }
  .upload-fields label, .upload-fields .selected-files, .upload-fields .primary-button { grid-column: 1; }
  .topbar .dark-button { padding: 0 10px; }
  .login-card { padding: 27px 22px; }
  .capability-grid { grid-template-columns: 1fr; }
  .analysis-consent { align-items: stretch; flex-direction: column; }
  .analysis-section-grid, .completeness-grid { grid-template-columns: 1fr; }
}
