:root {
  --ink: #132b27;
  --ink-2: #1d3a34;
  --paper: #f3f1ea;
  --surface: #fbfaf6;
  --line: #d7d8d0;
  --muted: #66736f;
  --green: #b8ee63;
  --green-dark: #476b22;
  --red: #c64836;
  --red-bg: #fff3ef;
  --amber: #d09539;
  --amber-bg: #fff9e9;
  --blue: #4c7785;
  --shadow: 0 18px 60px rgba(22, 45, 40, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(198,72,54,.42); outline-offset: 3px; }

.setup-shell {
  min-height: 100vh;
  background:
    linear-gradient(rgba(19, 43, 39, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 43, 39, .055) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  overflow: hidden;
}

.landing-nav {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 76px);
  border-bottom: 1px solid rgba(19, 43, 39, .2);
  background: rgba(243, 241, 234, .88);
  backdrop-filter: blur(12px);
}

.landing-brand, .sidebar-brand { display: flex; align-items: center; gap: 12px; }
.landing-brand > div, .sidebar-brand > div { display: flex; flex-direction: column; gap: 2px; }
.landing-brand strong, .sidebar-brand strong { font-size: 19px; letter-spacing: -.4px; }
.landing-brand span, .sidebar-brand span { font-size: 8px; letter-spacing: 1.65px; font-weight: 800; opacity: .62; }

.brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  border-radius: 4px 14px 4px 4px;
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -4px;
  padding-right: 4px;
}
.brand-mark span { color: var(--green); font-size: inherit; letter-spacing: inherit; opacity: 1; }

.nav-actions { display: flex; align-items: center; gap: 26px; font-size: 13px; font-weight: 650; }
.version-pill { padding: 7px 10px; background: rgba(19,43,39,.07); border: 1px solid rgba(19,43,39,.12); border-radius: 99px; font-family: ui-monospace, monospace; font-size: 10px; letter-spacing: .7px; }
.github-link { padding: 10px 14px; border: 1px solid var(--ink); border-radius: 4px; transition: .2s ease; }
.github-link:hover { background: var(--ink); color: white; }

.hero-grid {
  min-height: calc(100vh - 132px);
  display: grid;
  grid-template-columns: minmax(480px, 1fr) minmax(420px, .82fr);
  gap: clamp(48px, 7vw, 108px);
  align-items: center;
  max-width: 1500px;
  margin: 0 auto;
  padding: 64px clamp(24px, 5vw, 76px) 68px;
}

.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font: 750 10px/1 ui-monospace, monospace; letter-spacing: 1.6px; color: #526560; }
.eyebrow span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--ink); color: var(--ink); border-radius: 50%; letter-spacing: 0; }
.hero-copy h1 { max-width: 760px; margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(46px, 5vw, 76px); line-height: 1.09; letter-spacing: -3.2px; font-weight: 500; }
.hero-copy h1 em { color: var(--red); font-style: normal; position: relative; }
.hero-copy h1 em::after { content: ""; position: absolute; left: 2px; right: 4px; bottom: -6px; height: 4px; background: var(--red); opacity: .2; transform: rotate(-1.3deg); }
.hero-lead { max-width: 660px; margin: 25px 0 34px; color: #51605c; font-size: 16px; line-height: 1.8; }

.project-form { max-width: 690px; padding: 24px; background: rgba(251,250,246,.96); border: 1px solid rgba(19,43,39,.27); box-shadow: 8px 8px 0 rgba(19,43,39,.08); }
.form-heading, .form-heading > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-heading { padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.form-heading h2 { margin: 0; font-size: 17px; }
.form-heading > span { color: var(--muted); font-size: 11px; }
.step-number, .section-index { font: 800 10px/1 ui-monospace, monospace; color: var(--surface); background: var(--ink); padding: 7px; border-radius: 2px; }
.file-drop { min-height: 92px; margin-top: 18px; padding: 16px 18px; display: flex; align-items: center; gap: 15px; border: 1px dashed #9aa5a1; background: #f7f6f1; cursor: pointer; transition: .2s ease; }
.file-drop:hover, .file-drop.has-file { border-color: var(--ink); background: #f1f6e9; }
.file-drop input { display: none; }
.drop-icon { width: 42px; height: 42px; display: grid; place-items: center; background: var(--ink); color: var(--green); border-radius: 50%; font-size: 21px; }
.file-drop > span:nth-child(3) { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.file-drop strong { font-size: 13px; }
.file-drop small { color: var(--muted); font-size: 11px; }
.file-drop > b { font: 800 10px ui-monospace, monospace; color: var(--muted); }
.repo-field { display: block; margin-top: 17px; }
.repo-field > span { display: block; margin-bottom: 8px; font: 800 9px ui-monospace, monospace; letter-spacing: 1px; text-transform: uppercase; }
.repo-field > div { height: 48px; display: flex; align-items: center; border: 1px solid #aeb7b4; background: white; }
.repo-field i { padding: 0 14px; font-style: normal; color: var(--muted); }
.repo-field input { height: 100%; min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); font-family: ui-monospace, monospace; font-size: 12px; background: transparent; }
.repo-field input::placeholder { color: #9da7a4; }
.form-footer { display: flex; align-items: center; gap: 18px; margin-top: 20px; }
.primary-button { min-height: 49px; flex: 1; padding: 0 18px; border: 0; border-radius: 3px; background: var(--ink); color: white; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 750; transition: .2s ease; }
.primary-button:not(:disabled):hover { background: #21483f; transform: translateY(-1px); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.primary-button .button-label { color: white; font-size: 13px; }
.primary-button > span:last-child { color: var(--green); font-size: 21px; }
.sample-button { border: 0; background: transparent; color: #52605d; cursor: pointer; font-size: 12px; font-weight: 650; }
.sample-button:hover { color: var(--red); }
.sample-button span { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 5px; border: 1px solid currentColor; border-radius: 50%; font-size: 8px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 23px; color: #5e6d69; font-size: 11px; }
.trust-row b { color: var(--green-dark); margin-right: 5px; }

.artifact-preview { position: relative; padding: 18px; background: var(--ink); color: white; box-shadow: 20px 22px 0 rgba(19,43,39,.11); transform: rotate(.7deg); }
.artifact-preview::before { content: ""; position: absolute; width: 110px; height: 28px; top: -14px; left: 42%; background: rgba(221,213,185,.74); transform: rotate(-2deg); }
.preview-topline { display: flex; justify-content: space-between; padding: 3px 3px 15px; font: 750 9px ui-monospace, monospace; letter-spacing: 1.1px; }
.preview-topline b { color: var(--green); }
.paper-sheet { min-height: 470px; padding: 30px; background: #f9f8f3; color: var(--ink); border-radius: 2px; }
.paper-meta { display: flex; justify-content: space-between; font: 800 9px ui-monospace, monospace; letter-spacing: 1px; color: var(--muted); }
.paper-sheet h3 { margin: 25px 0 10px; font-family: Georgia, serif; font-size: clamp(23px, 2vw, 31px); line-height: 1.23; font-weight: 500; }
.paper-sheet > p { color: var(--muted); font: 10px ui-monospace, monospace; }
.mini-graph { margin: 33px 0 25px; display: flex; flex-direction: column; align-items: center; }
.mini-line { width: 1px; height: 25px; background: #9aa5a1; }
.mini-nodes-row { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; position: relative; }
.mini-nodes-row::before { content: ""; position: absolute; left: 16%; right: 16%; top: -1px; height: 1px; background: #9aa5a1; }
.mini-node { min-height: 46px; padding: 12px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #9aa5a1; background: white; font: 800 9px ui-monospace, monospace; }
.claim-node { width: 124px; justify-content: center; background: var(--ink); color: white; border-color: var(--ink); }
.mini-node.ok { border-top: 3px solid #6e9843; }
.mini-node.warning { border-top: 3px solid var(--amber); }
.mini-node.danger { border-top: 3px solid var(--red); }
.mini-node span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: #edf1e6; }
.risk-strip { padding: 14px; border-left: 3px solid var(--red); background: #f7e9e4; display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; }
.risk-strip span { grid-row: 1 / 3; font: 800 8px ui-monospace, monospace; color: var(--red); writing-mode: vertical-rl; }
.risk-strip strong { font-size: 12px; }
.risk-strip small { color: #745f58; font-size: 9px; }
.spec-lines { margin-top: 25px; display: flex; flex-direction: column; gap: 8px; }
.spec-lines span { height: 5px; background: #dfe1da; }
.floating-score { position: absolute; right: -35px; bottom: 60px; width: 112px; height: 112px; display: grid; place-content: center; text-align: center; background: var(--green); color: var(--ink); border-radius: 50%; box-shadow: 0 12px 30px rgba(19,43,39,.25); transform: rotate(-5deg); }
.floating-score span { font: 800 8px ui-monospace, monospace; letter-spacing: .8px; }
.floating-score strong { font: 500 43px/1 Georgia, serif; }
.floating-score small { font-size: 9px; }
.preview-caption { margin: 15px 8px 3px; color: #c9d2cf; font-size: 10px; line-height: 1.6; }
.landing-footer { height: 48px; display: flex; align-items: center; justify-content: space-around; background: var(--ink); color: #aebbb7; font: 800 8px ui-monospace, monospace; letter-spacing: 1.5px; }
.landing-footer span::before { content: "◆"; color: var(--green); margin-right: 9px; }

/* Application shell */
.app-shell { min-height: 100vh; background: #eef0eb; }
.sidebar { width: 236px; position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; background: var(--ink); color: white; }
.sidebar-brand { height: 74px; width: 100%; padding: 0 20px; border: 0; border-bottom: 1px solid rgba(255,255,255,.11); background: transparent; color: white; cursor: pointer; text-align: left; }
.sidebar-brand .brand-mark { background: var(--green); color: var(--ink); }
.sidebar-brand .brand-mark span { color: var(--red); }
.side-nav { padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.side-nav button, .sidebar-bottom > button { width: 100%; min-height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 4px; background: transparent; color: #b9c5c1; cursor: pointer; text-align: left; font-size: 12px; }
.side-nav button:hover, .sidebar-bottom > button:hover { background: rgba(255,255,255,.06); color: white; }
.side-nav button.active { background: rgba(184,238,99,.13); color: var(--green); }
.side-nav button span { width: 20px; font-size: 17px; text-align: center; }
.side-nav button b { margin-left: auto; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 9px; }
.sidebar-section { margin: 4px 12px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-section > small { display: block; padding: 0 10px 9px; color: #71857e; font: 750 8px ui-monospace, monospace; letter-spacing: 1.2px; text-transform: uppercase; }
.project-link { width: 100%; padding: 9px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 4px; background: rgba(255,255,255,.055); color: white; text-align: left; cursor: pointer; }
.project-link > i { width: 30px; height: 30px; display: grid; place-items: center; background: #34574f; color: var(--green); border-radius: 3px; font: 800 9px ui-monospace, monospace; font-style: normal; }
.project-link > span { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.project-link strong { font-size: 11px; }
.project-link small { color: #879a94; font-size: 8px; }
.project-link > b { color: #778c85; font-size: 8px; }
.sidebar-bottom { margin-top: auto; padding: 13px 12px 16px; border-top: 1px solid rgba(255,255,255,.1); }
.quota { padding: 10px 12px 14px; }
.quota span { display: flex; justify-content: space-between; color: #93a49f; font-size: 8px; }
.quota span b { color: #bac7c3; }
.quota > div { height: 3px; margin-top: 8px; background: #2b4942; }
.quota i { display: block; width: 15%; height: 100%; background: var(--green); }
.user-button { margin-top: 5px; padding-top: 12px !important; border-top: 1px solid rgba(255,255,255,.08) !important; }
.user-button i, .avatar { width: 29px; height: 29px; display: grid; place-items: center; background: var(--green); color: var(--ink); border-radius: 50%; font-size: 10px; font-style: normal; font-weight: 800; }
.user-button span { display: flex; flex-direction: column; gap: 2px; }
.user-button b { color: white; font-size: 10px; }
.user-button small { color: #82958f; font-size: 8px; }

.workspace { min-height: 100vh; margin-left: 236px; }
.workspace-topbar { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: #f7f7f3; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 10px; }
.breadcrumb span { color: var(--muted); }
.breadcrumb b { color: #adb4b1; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.sync-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.sync-status i { width: 6px; height: 6px; background: #79a548; border-radius: 50%; box-shadow: 0 0 0 4px rgba(121,165,72,.12); }
.top-actions > button:not(.avatar) { min-height: 32px; padding: 0 12px; border: 1px solid #bdc4c1; border-radius: 3px; background: white; cursor: pointer; font-size: 9px; font-weight: 700; }
.avatar { border: 0; }
.project-header { background: #f7f7f3; border-bottom: 1px solid var(--line); }
.project-title-row { padding: 25px 30px 21px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.status-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; }
.audit-badge { padding: 5px 8px; background: #e7edda; color: #526f32; border-radius: 2px; font: 800 8px ui-monospace, monospace; letter-spacing: .6px; }
.project-title-row h1 { margin: 10px 0 8px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(22px, 2vw, 30px); font-weight: 500; letter-spacing: -.5px; }
.project-title-row p { margin: 0; display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 9px; }
.readiness-score { display: flex; align-items: center; gap: 13px; min-width: 180px; }
.score-ring { width: 64px; height: 64px; display: grid; place-content: center; text-align: center; border-radius: 50%; background: conic-gradient(var(--amber) 0 64%, #dfe1da 64%); position: relative; }
.score-ring::after { content: ""; position: absolute; inset: 6px; background: #f7f7f3; border-radius: 50%; }
.score-ring strong, .score-ring span { z-index: 1; }
.score-ring strong { font: 500 22px/1 Georgia, serif; }
.score-ring span { font-size: 7px; color: var(--muted); }
.readiness-score > div:last-child { display: flex; flex-direction: column; gap: 5px; }
.readiness-score b { font-size: 11px; }
.readiness-score small { color: var(--red); font-size: 8px; }
.phase-track { margin: 0 30px; padding: 16px 0; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.phase-track > div { display: flex; align-items: center; gap: 9px; position: relative; }
.phase-track > div:not(:last-child)::after { content: ""; position: absolute; height: 1px; left: 39px; right: 8px; top: 15px; background: #cdd2cf; }
.phase-track > div.done:not(:last-child)::after { background: #759648; }
.phase-track i { width: 29px; height: 29px; z-index: 1; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #c2c9c5; background: #f7f7f3; border-radius: 50%; color: #8a9893; font: 800 8px ui-monospace, monospace; font-style: normal; }
.phase-track .done i { border-color: #759648; background: #759648; color: white; }
.phase-track .current i { border-color: var(--ink); background: var(--ink); color: var(--green); box-shadow: 0 0 0 4px rgba(19,43,39,.09); }
.phase-track span { display: flex; flex-direction: column; gap: 3px; z-index: 1; padding-right: 7px; background: #f7f7f3; }
.phase-track b { font-size: 9px; }
.phase-track small { color: #87928f; font-size: 7px; }
.view-tabs { display: flex; gap: 26px; padding: 0 30px; }
.view-tabs button { height: 38px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 700; }
.view-tabs button.active { color: var(--ink); border-color: var(--ink); }

.dashboard-grid { display: grid; grid-template-columns: minmax(270px, .85fr) minmax(380px, 1.25fr) minmax(310px, 1fr); gap: 14px; padding: 17px 20px 24px; }
.panel { background: #fafaf7; border: 1px solid #d2d7d3; border-radius: 4px; }
.panel-heading { min-height: 64px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-heading > div, .panel-heading > div > div { display: flex; align-items: center; gap: 11px; }
.panel-heading > div > div { align-items: flex-start; flex-direction: column; gap: 3px; }
.panel-heading h2 { margin: 0; font-size: 12px; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 8px; }
.count-pill, .danger-pill { padding: 5px 7px; border: 1px solid #ccd2ce; border-radius: 99px; color: var(--muted); font: 800 7px ui-monospace, monospace; }
.danger-pill { color: var(--red); border-color: #e7c5bd; background: var(--red-bg); }
.icon-button { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #c9cfcc; background: white; border-radius: 3px; cursor: pointer; }
.claim-list { padding: 9px; display: flex; flex-direction: column; gap: 7px; }
.claim-list > button { width: 100%; min-height: 105px; display: flex; gap: 10px; padding: 12px 11px; border: 1px solid #d7dbd8; border-left: 3px solid transparent; border-radius: 3px; background: white; text-align: left; cursor: pointer; position: relative; transition: .15s ease; }
.claim-list > button:hover { border-color: #aeb9b4; }
.claim-list > button.active { border-color: #9baaa4; border-left-color: var(--ink); background: #f2f5ee; }
.claim-radio { width: 16px; padding-top: 2px; }
.claim-radio i { width: 13px; height: 13px; display: block; border: 1px solid #aeb7b3; border-radius: 50%; position: relative; }
.claim-list > button.active .claim-radio i::after { content: ""; position: absolute; inset: 3px; background: var(--ink); border-radius: 50%; }
.claim-content { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.claim-content > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.claim-content > span b { color: var(--red); font: 800 8px ui-monospace, monospace; }
.claim-content > span small { color: #87938f; font-size: 7px; }
.claim-content > strong { font-size: 10px; line-height: 1.45; }
.claim-content > div { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.claim-content em { padding: 3px 5px; background: #e4ebdc; color: #4c6630; border-radius: 2px; font-size: 7px; font-style: normal; font-weight: 700; }
.claim-content > div span { color: #7b8984; font-size: 7px; }
.risk-count { width: 19px; height: 19px; display: grid; place-items: center; background: #f5e2dd; color: var(--red); border-radius: 50%; font-size: 8px; font-weight: 800; }
.show-more { width: calc(100% - 18px); margin: 0 9px 10px; min-height: 34px; border: 1px dashed #c6cdca; background: transparent; color: var(--muted); cursor: pointer; font-size: 8px; }
.show-more span { margin-left: 8px; }

.evidence-graph { min-height: 330px; padding: 12px 15px 16px; }
.graph-legend { display: flex; justify-content: flex-end; gap: 12px; color: var(--muted); font-size: 7px; }
.graph-legend span { display: flex; align-items: center; gap: 5px; }
.dot { width: 6px; height: 6px; border-radius: 50%; }
.dot.green { background: #709848; }.dot.amber { background: var(--amber); }.dot.red { background: var(--red); }
.graph-canvas { padding-top: 27px; position: relative; display: flex; flex-direction: column; align-items: center; }
.graph-node { min-width: 115px; padding: 10px; display: flex; flex-direction: column; gap: 5px; border: 1px solid #c9d0cc; border-top: 3px solid #91a09a; border-radius: 3px; background: white; text-align: left; box-shadow: 0 3px 10px rgba(19,43,39,.04); }
.graph-node small { color: #7b8984; font: 800 6px ui-monospace, monospace; letter-spacing: .5px; }
.graph-node strong { font-size: 9px; }
.graph-node span { color: #81908b; font-size: 7px; }
.root-node { min-width: 160px; border-top-color: var(--ink); background: var(--ink); color: white; }
.root-node small { color: var(--green); }.root-node span { color: #b5c1bd; }
.branch-line.vertical { width: 1px; height: 32px; background: #aeb9b4; }
.branch-line.horizontal { width: 76%; height: 1px; background: #aeb9b4; }
.graph-children { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding-top: 26px; }
.graph-children .graph-node { position: relative; }
.graph-children .graph-node::before { content: ""; position: absolute; width: 1px; height: 27px; top: -27px; left: 50%; background: #aeb9b4; }
.graph-node.status-green { border-top-color: #709848; }.graph-node.status-amber { border-top-color: var(--amber); background: var(--amber-bg); }.graph-node.status-red { border-top-color: var(--red); background: var(--red-bg); }
.evidence-graph.expanded { min-height: 470px; padding: 25px 6%; }
.evidence-graph.expanded .graph-children { grid-template-columns: repeat(4, 1fr); gap: 25px; }
.evidence-graph.expanded .graph-node { padding: 18px; }
.evidence-graph.expanded .graph-node strong { font-size: 12px; }
.evidence-graph.expanded .graph-node span { font-size: 9px; }

.risk-panel { grid-row: span 2; }
.risk-card { margin: 11px 11px 0; padding: 12px; border: 1px solid; border-radius: 3px; }
.risk-card.critical { border-color: #e5c2ba; background: var(--red-bg); }
.risk-card.high { border-color: #ead9a9; background: var(--amber-bg); }
.risk-card-top { display: flex; justify-content: space-between; font: 800 6px ui-monospace, monospace; letter-spacing: .35px; color: var(--red); }
.risk-card.high .risk-card-top { color: #9b6921; }
.risk-card h3 { margin: 10px 0 6px; font-size: 10px; }
.risk-card p { margin: 0; color: #67736f; font-size: 8px; line-height: 1.55; }
.evidence-box { margin-top: 10px; padding: 8px; display: grid; grid-template-columns: auto 1fr auto; gap: 7px; align-items: center; background: rgba(255,255,255,.7); border: 1px solid rgba(198,72,54,.16); font-size: 6px; }
.evidence-box span { font-weight: 800; color: var(--red); }
.evidence-box code { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.evidence-box b { color: var(--red); }
.risk-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
.risk-actions button { padding: 5px 7px; border: 1px solid rgba(19,43,39,.17); background: rgba(255,255,255,.7); border-radius: 2px; cursor: pointer; font-size: 6px; font-weight: 700; }
.comparison-row { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.comparison-row span { padding: 6px 8px; background: rgba(255,255,255,.7); font-size: 7px; }
.comparison-row i { color: var(--red); font-style: normal; }
.notice-card { margin: 11px; padding: 10px; display: flex; align-items: center; gap: 9px; background: #eef2ed; border: 1px solid #d3d9d5; }
.notice-card > span { width: 19px; height: 19px; display: grid; place-items: center; background: var(--blue); color: white; border-radius: 50%; font: 700 9px Georgia, serif; }
.notice-card p { margin: 0; color: var(--muted); font-size: 7px; line-height: 1.5; }

.decision-panel { grid-column: 1 / 3; min-height: 99px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: white; border-radius: 4px; }
.decision-panel > div { display: flex; align-items: center; gap: 15px; }
.decision-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: rgba(184,238,99,.12); color: var(--green); font-size: 23px; }
.decision-panel small { color: var(--green); font: 800 6px ui-monospace, monospace; letter-spacing: 1px; }
.decision-panel h2 { margin: 5px 0 3px; font-family: Georgia, serif; font-size: 15px; font-weight: 500; }
.decision-panel p { margin: 0; color: #aebcb7; font-size: 8px; }
.decision-panel button { min-height: 40px; padding: 0 15px; border: 0; border-radius: 3px; background: var(--green); color: var(--ink); cursor: pointer; font-size: 8px; font-weight: 800; }
.decision-panel button span { margin-left: 12px; font-size: 14px; }

.single-view { margin: 18px 20px; min-height: 590px; }
.secondary-button { min-height: 31px; padding: 0 11px; border: 1px solid #c4cbc7; background: white; border-radius: 3px; cursor: pointer; font-size: 8px; font-weight: 700; }
.graph-insights { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 24px 24px; border: 1px solid var(--line); }
.graph-insights > div { min-height: 86px; display: flex; flex-direction: column; justify-content: center; padding: 14px; border-right: 1px solid var(--line); }
.graph-insights > div:last-child { border-right: 0; }
.graph-insights small { color: var(--muted); font-size: 7px; }
.graph-insights strong { margin: 4px 0; font: 500 21px Georgia, serif; }
.graph-insights span { color: #788782; font-size: 7px; }
.run-timeline { max-width: 800px; margin: 45px auto; }
.run-event { min-height: 100px; display: flex; gap: 20px; position: relative; }
.run-event:not(:last-child)::after { content: ""; position: absolute; top: 31px; bottom: 0; left: 15px; width: 1px; background: #bdc6c2; }
.run-event > i { width: 31px; height: 31px; z-index: 1; display: grid; place-items: center; border-radius: 50%; border: 1px solid #aeb8b4; background: #fafaf7; font-style: normal; font-size: 10px; }
.run-event.done > i { background: #759648; color: white; border-color: #759648; }
.run-event.current > i { background: var(--amber-bg); color: #a46d1d; border-color: var(--amber); }
.run-event > div { flex: 1; padding: 5px 0 25px; }
.run-event div > span { display: flex; justify-content: space-between; }
.run-event b { font-size: 11px; }
.run-event time { color: var(--muted); font: 8px ui-monospace, monospace; }
.run-event p { color: var(--muted); font-size: 9px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(10,25,22,.65); backdrop-filter: blur(5px); animation: fadeIn .16s ease; }
.plan-modal { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 23px; background: #f8f7f2; border: 1px solid rgba(255,255,255,.28); box-shadow: var(--shadow); animation: rise .22s ease; }
.modal-header { display: flex; align-items: center; justify-content: space-between; }
.modal-header > div, .modal-header > div > div { display: flex; align-items: center; gap: 12px; }
.modal-header > div > div { align-items: flex-start; flex-direction: column; gap: 3px; }
.modal-header small { color: var(--muted); font: 800 7px ui-monospace, monospace; letter-spacing: 1px; }
.modal-header h2 { margin: 0; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.modal-header > button { border: 0; background: transparent; font-size: 27px; cursor: pointer; }
.modal-intro { margin: 19px 0; padding: 12px; background: #edf0ea; color: var(--muted); border-left: 3px solid var(--ink); font-size: 9px; }
.plan-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan-options > button { min-height: 208px; padding: 15px; border: 1px solid #ced4d0; background: white; text-align: left; cursor: pointer; transition: .15s ease; }
.plan-options > button.active { border: 2px solid var(--ink); background: #f2f5ec; box-shadow: 4px 4px 0 rgba(19,43,39,.09); }
.plan-choice { height: 23px; display: flex; align-items: center; justify-content: space-between; }
.plan-choice i { width: 15px; height: 15px; border: 1px solid #aeb7b3; border-radius: 50%; position: relative; }
.plan-options > button.active .plan-choice i::after { content: ""; position: absolute; inset: 3px; background: var(--ink); border-radius: 50%; }
.plan-choice span { padding: 4px 6px; background: var(--green); font: 800 7px ui-monospace, monospace; }
.plan-options h3 { margin: 17px 0 5px; font-size: 12px; }
.plan-options p { min-height: 30px; margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.plan-options dl { margin: 17px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.plan-options dl > div { display: flex; justify-content: space-between; margin-bottom: 8px; }
.plan-options dt { color: var(--muted); font-size: 7px; }.plan-options dd { margin: 0; font-size: 8px; font-weight: 800; }
.command-preview { min-height: 43px; margin-top: 14px; padding: 9px 11px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; background: var(--ink); color: #c3d0cc; }
.command-preview span, .command-preview b { font: 800 6px ui-monospace, monospace; color: var(--green); }
.command-preview code { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 8px; }
.command-preview b { padding: 4px 6px; background: rgba(184,238,99,.1); }
.approval-check { display: flex; align-items: center; gap: 8px; margin: 15px 0; color: var(--muted); font-size: 8px; cursor: pointer; }
.approval-check input { accent-color: var(--ink); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 15px; border-top: 1px solid var(--line); }
.modal-actions button { min-height: 39px; padding: 0 15px; border: 1px solid #bcc5c1; background: white; border-radius: 3px; cursor: pointer; font-size: 8px; font-weight: 750; }
.modal-actions button:last-child { min-width: 165px; border-color: var(--ink); background: var(--ink); color: white; }
.modal-actions button:last-child span { color: var(--green); margin-left: 10px; }
.modal-actions button:disabled { opacity: .4; cursor: not-allowed; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 200; padding: 12px 16px; display: flex; align-items: center; gap: 9px; background: var(--ink); color: white; border-radius: 3px; box-shadow: var(--shadow); font-size: 9px; animation: rise .2s ease; }
.toast span { width: 18px; height: 18px; display: grid; place-items: center; background: var(--green); color: var(--ink); border-radius: 50%; font-size: 9px; }

/* v0.2 live input states */
.repo-help-row { min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 7px; }
.repo-help-row small { color: var(--muted); font-size: 10px; }
#repo-validation { font-size: 10px; font-weight: 750; text-align: right; }
#repo-validation.valid { color: var(--green-dark); }
#repo-validation.invalid { color: var(--red); }
.repo-field.invalid > div { border-color: var(--red); box-shadow: 0 0 0 2px rgba(198,72,54,.08); }
.analysis-progress { margin-top: 17px; padding: 14px 15px; border: 1px solid #c7ceca; background: #f0f3ec; }
.analysis-progress[hidden], .form-error[hidden] { display: none; }
.progress-track { height: 4px; overflow: hidden; background: #d6ddd7; }
.progress-track i { display: block; width: 0; height: 100%; background: var(--ink); transition: width .32s ease; }
.analysis-progress p { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; margin: 11px 0 0; }
.analysis-progress strong { font-size: 11px; }
.analysis-progress small { grid-column: 2; margin-top: 3px; color: var(--muted); font-size: 9px; }
.progress-pulse { grid-row: 1 / 3; width: 8px; height: 8px; margin-top: 2px; border-radius: 50%; background: var(--green-dark); box-shadow: 0 0 0 0 rgba(71,107,34,.3); animation: progressPulse 1.6s infinite; }
.form-error { margin-top: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; border-left: 3px solid var(--red); background: var(--red-bg); }
.form-error strong { color: var(--red); font-size: 11px; }
.form-error span { color: #765f59; font-size: 10px; line-height: 1.55; }

/* v0.2 evidence-first report */
.report-shell { min-height: 100vh; background: #eef0eb; }
.report-rail { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 260px; display: flex; flex-direction: column; background: var(--ink); color: white; }
.report-brand { min-height: 78px; padding: 0 22px; display: flex; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid rgba(255,255,255,.11); background: transparent; color: white; cursor: pointer; text-align: left; }
.report-brand > div { display: flex; flex-direction: column; gap: 2px; }
.report-brand strong { font-size: 19px; }
.report-brand > div span { color: #8fa29c; font-size: 8px; font-weight: 800; letter-spacing: 1.4px; }
.report-brand .brand-mark { background: var(--green); color: var(--ink); }
.report-brand .brand-mark span { color: var(--red); }
.rail-source { margin: 24px 16px 16px; padding: 16px; display: flex; flex-direction: column; gap: 7px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.045); }
.rail-source small, .rail-boundary small { color: #789089; font: 800 8px ui-monospace, monospace; letter-spacing: 1.2px; }
.rail-source strong { overflow: hidden; font: 600 14px ui-monospace, monospace; text-overflow: ellipsis; }
.rail-source span { color: #91a39e; font: 10px ui-monospace, monospace; }
.rail-source a { width: fit-content; margin-top: 5px; color: var(--green); font-size: 10px; font-weight: 750; }
.report-nav { padding: 6px 12px; display: flex; flex-direction: column; gap: 5px; }
.report-nav button { min-height: 44px; padding: 0 12px; display: grid; grid-template-columns: 27px 1fr auto; align-items: center; gap: 7px; border: 0; border-left: 2px solid transparent; background: transparent; color: #aab9b5; cursor: pointer; text-align: left; font-size: 12px; }
.report-nav button > span { font: 800 8px ui-monospace, monospace; color: #697f78; }
.report-nav button > b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); font-size: 8px; }
.report-nav button:hover { background: rgba(255,255,255,.045); color: white; }
.report-nav button.active { border-left-color: var(--green); background: rgba(184,238,99,.1); color: var(--green); }
.report-nav button.active > span { color: var(--green); }
.rail-boundary { margin: auto 20px 22px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.1); }
.rail-boundary p { margin: 7px 0 14px; color: #9daea9; font-size: 10px; line-height: 1.7; }
.report-workspace { min-height: 100vh; margin-left: 260px; }
.report-topbar { height: 61px; position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(250,250,246,.93); backdrop-filter: blur(12px); }
.report-breadcrumb { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 11px; }
.report-breadcrumb span { color: var(--muted); font: 800 8px ui-monospace, monospace; letter-spacing: 1px; }
.report-breadcrumb b { color: #b0b7b4; }
.report-breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-actions { display: flex; gap: 9px; }
.report-actions button { min-height: 34px; padding: 0 12px; border: 1px solid #bbc4bf; border-radius: 3px; background: white; cursor: pointer; font-size: 10px; font-weight: 750; }
.report-actions .export-button { border-color: var(--ink); background: var(--ink); color: white; }
.report-actions button:hover { transform: translateY(-1px); }
.report-hero { padding: 29px clamp(24px, 4vw, 56px) 22px; border-bottom: 1px solid var(--line); background: #f8f7f2; }
.report-kicker { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 9px; }
.mode-badge { padding: 6px 8px; border-radius: 2px; font: 800 8px ui-monospace, monospace; letter-spacing: .6px; }
.mode-badge.live { background: #e6efd7; color: #48652b; }
.mode-badge.sample { background: var(--amber-bg); color: #9b671f; border: 1px solid #ead39c; }
.report-hero-main { margin-top: 13px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.report-hero-main > div:first-child { min-width: 0; }
.report-hero h1 { margin: 0; font: 500 clamp(28px, 3vw, 42px)/1.15 Georgia, "Noto Serif SC", serif; letter-spacing: -1.2px; }
.report-hero-main > div:first-child > p { max-width: 780px; margin: 9px 0 13px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.repo-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.repo-facts span { padding: 5px 8px; border: 1px solid #d4d8d2; background: #eeefe9; color: #5c6b66; font: 9px ui-monospace, monospace; }
.readiness-card { min-width: 220px; display: flex; align-items: center; gap: 14px; }
.report-score { width: 76px; height: 76px; position: relative; display: grid; place-content: center; flex: 0 0 auto; text-align: center; border-radius: 50%; background: conic-gradient(var(--green-dark) calc(var(--score) * 1%), #d9ddd6 0); }
.report-score::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #f8f7f2; }
.report-score strong, .report-score span { position: relative; z-index: 1; }
.report-score strong { font: 500 27px/1 Georgia, serif; }
.report-score span { margin-top: 2px; color: var(--muted); font-size: 8px; }
.readiness-card > div:last-child { display: flex; flex-direction: column; gap: 4px; }
.readiness-card b { font-size: 12px; }
.readiness-card small { color: var(--muted); font-size: 9px; }
.score-explainer { margin: 18px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: #66746f; font-size: 10px; line-height: 1.6; }
.report-dashboard, .single-report-view { width: min(1320px, calc(100% - 48px)); margin: 24px auto 54px; }
.decision-brief { min-height: 125px; padding: 22px 24px; display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 24px; background: var(--ink); color: white; box-shadow: 8px 8px 0 rgba(19,43,39,.1); }
.brief-label { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid rgba(255,255,255,.15); }
.brief-label span { color: var(--green); font: 800 9px ui-monospace, monospace; letter-spacing: 1.1px; }
.brief-label b { color: #799089; font: 800 8px ui-monospace, monospace; }
.decision-brief h2 { margin: 0 0 8px; font: 500 23px Georgia, "Noto Serif SC", serif; }
.decision-brief p { max-width: 720px; margin: 0; color: #acbbb6; font-size: 11px; line-height: 1.65; }
.decision-brief button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 3px; background: var(--green); color: var(--ink); cursor: pointer; font-size: 10px; font-weight: 800; }
.decision-brief button span { margin-left: 12px; font-size: 15px; }
.metric-row { margin: 18px 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--surface); }
.metric-row article { min-height: 104px; padding: 20px; display: grid; grid-template-columns: auto 1fr; align-content: center; border-right: 1px solid var(--line); }
.metric-row article:last-child { border-right: 0; }
.metric-row small { grid-column: 1 / 3; margin-bottom: 6px; color: var(--muted); font-size: 9px; }
.metric-row strong { font: 500 28px/1 Georgia, serif; }
.metric-row span { align-self: end; margin-left: 7px; color: #82908b; font-size: 8px; }
.report-section { margin-top: 18px; border: 1px solid var(--line); background: var(--surface); }
.report-section-title { min-height: 76px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.report-section-title > div { display: flex; align-items: center; gap: 13px; }
.report-section-title > div > span { width: 30px; height: 30px; display: grid; place-items: center; background: var(--ink); color: var(--green); border-radius: 2px; font: 800 9px ui-monospace, monospace; }
.report-section-title h2 { margin: 0 0 4px; font: 500 18px Georgia, "Noto Serif SC", serif; }
.report-section-title p { margin: 0; color: var(--muted); font-size: 9px; }
.report-section-title > button { border: 0; background: transparent; color: var(--green-dark); cursor: pointer; font-size: 10px; font-weight: 750; }
.report-section-title > b { color: var(--muted); font: 800 8px ui-monospace, monospace; letter-spacing: 1px; }
.audit-check-grid { padding: 14px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.audit-check { min-height: 220px; padding: 17px; position: relative; display: flex; flex-direction: column; border: 1px solid #d5dad4; background: white; }
.audit-check::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #7b9d4e; }
.audit-check.warning::before { background: var(--amber); }
.audit-check.fail::before { background: var(--red); }
.check-status { display: flex; align-items: center; gap: 7px; }
.check-status i { width: 7px; height: 7px; border-radius: 50%; background: #739949; }
.warning .check-status i { background: var(--amber); }
.fail .check-status i { background: var(--red); }
.check-status span { color: var(--muted); font: 800 8px ui-monospace, monospace; letter-spacing: .6px; }
.check-status b { margin-left: auto; padding: 4px 6px; background: #edf3e5; color: #4c6a2e; font-size: 8px; }
.warning .check-status b { background: var(--amber-bg); color: #99671f; }
.fail .check-status b { background: var(--red-bg); color: var(--red); }
.audit-check h3 { margin: 15px 0 7px; font-size: 14px; }
.audit-check > p { margin: 0; color: #62706b; font-size: 10px; line-height: 1.65; }
.check-proof { margin: 13px 0; padding: 10px; display: flex; flex-direction: column; gap: 5px; background: #f2f3ee; }
.check-proof code { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.check-proof span { color: var(--muted); font-size: 8px; }
.check-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.check-footer a, .check-footer button, .source-unavailable { color: var(--green-dark); font-size: 9px; font-weight: 750; }
.check-footer button { border: 0; background: transparent; cursor: pointer; }
.report-risk-list { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.report-risk { padding: 17px 18px; border: 1px solid #e3cfc9; background: var(--red-bg); }
.report-risk.severity-medium, .report-risk.severity-low { border-color: #e5d6ae; background: var(--amber-bg); }
.report-risk > div:first-child { display: flex; justify-content: space-between; color: var(--red); font: 800 8px ui-monospace, monospace; letter-spacing: .5px; }
.report-risk.severity-medium > div:first-child, .report-risk.severity-low > div:first-child { color: #99671f; }
.report-risk h3 { margin: 12px 0 6px; font-size: 14px; }
.report-risk > p { margin: 0; color: #6f625d; font-size: 10px; line-height: 1.6; }
.risk-evidence { margin: 12px 0 9px; padding: 9px 10px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; background: rgba(255,255,255,.65); }
.risk-evidence span { color: var(--red); font: 800 8px ui-monospace, monospace; }
.risk-evidence code { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.risk-evidence a { color: var(--green-dark); font-size: 9px; font-weight: 750; }
.report-risk > small { color: #776c67; font-size: 9px; }
.empty-state { padding: 44px; text-align: center; }
.empty-state > span { width: 36px; height: 36px; margin: auto; display: grid; place-items: center; border-radius: 50%; background: var(--green); font-weight: 800; }
.empty-state h3 { margin: 13px 0 5px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 10px; }
.single-report-view { border: 1px solid var(--line); background: var(--surface); }
.view-intro { padding: 31px; border-bottom: 1px solid var(--line); }
.view-intro > span { color: var(--green-dark); font: 800 8px ui-monospace, monospace; letter-spacing: 1.1px; }
.view-intro h2 { margin: 9px 0 6px; font: 500 30px Georgia, "Noto Serif SC", serif; }
.view-intro p { margin: 0; color: var(--muted); font-size: 11px; }
.snapshot-strip { display: grid; grid-template-columns: 2fr repeat(3, 1fr); border-bottom: 1px solid var(--line); background: #f0f1eb; }
.snapshot-strip > div { min-height: 90px; padding: 18px; display: flex; flex-direction: column; justify-content: center; gap: 7px; border-right: 1px solid var(--line); }
.snapshot-strip > div:last-child { border-right: 0; }
.snapshot-strip small { color: var(--muted); font: 800 8px ui-monospace, monospace; letter-spacing: .7px; }
.snapshot-strip code { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.snapshot-strip strong { font-size: 13px; }
.evidence-table-wrap { overflow-x: auto; padding: 18px; }
.evidence-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.evidence-table th { padding: 11px; border-bottom: 1px solid var(--ink); color: var(--muted); text-align: left; font: 800 8px ui-monospace, monospace; letter-spacing: .8px; }
.evidence-table td { padding: 16px 11px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 10px; }
.evidence-table td:nth-child(2), .evidence-table td:nth-child(3) { max-width: 310px; }
.evidence-table td strong, .evidence-table td small { display: block; }
.evidence-table td small { margin-top: 5px; color: var(--muted); font-size: 8px; }
.evidence-table td code { font-size: 9px; overflow-wrap: anywhere; }
.evidence-table td a { color: var(--green-dark); font-weight: 750; }
.table-status { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 750; }
.table-status i { width: 7px; height: 7px; border-radius: 50%; background: #749849; }
.table-status.warning i { background: var(--amber); }
.table-status.fail i { background: var(--red); }
.method-note { margin: 0 18px 18px; padding: 17px; border-left: 3px solid var(--ink); background: #eef0e9; }
.method-note strong { font-size: 10px; }
.method-note p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.actual-log { max-width: 900px; margin: 0 auto; padding: 38px 42px 10px; list-style: none; }
.actual-log li { min-height: 92px; position: relative; display: flex; gap: 16px; }
.actual-log li:not(:last-child)::after { content: ""; position: absolute; top: 29px; bottom: 0; left: 13px; width: 1px; background: #c9ceca; }
.actual-log li > i { width: 28px; height: 28px; z-index: 1; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #789b4d; color: white; font-size: 9px; font-style: normal; font-weight: 800; }
.actual-log li.sample > i { background: var(--amber); }
.actual-log li.error > i { background: var(--red); }
.actual-log li > div { flex: 1; padding: 4px 0 22px; }
.actual-log li div > span { display: flex; justify-content: space-between; gap: 20px; }
.actual-log strong { font-size: 12px; }
.actual-log time { color: var(--muted); font: 8px ui-monospace, monospace; }
.actual-log p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.method-grid { margin: 15px 18px 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.method-grid article { min-height: 145px; padding: 18px; border: 1px solid var(--line); background: #f1f2ec; }
.method-grid small { color: var(--green-dark); font: 800 8px ui-monospace, monospace; letter-spacing: .8px; }
.method-grid h3 { margin: 16px 0 7px; font-size: 13px; }
.method-grid p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }

@keyframes progressPulse { 70% { box-shadow: 0 0 0 7px rgba(71,107,34,0); } 100% { box-shadow: 0 0 0 0 rgba(71,107,34,0); } }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: 1fr .75fr; gap: 40px; }
  .hero-copy h1 { font-size: 53px; }
  .dashboard-grid { grid-template-columns: minmax(260px,.8fr) minmax(360px,1.2fr); }
  .risk-panel { grid-row: auto; grid-column: 1 / 3; }
  .decision-panel { grid-column: 1 / 3; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .artifact-preview { max-width: 620px; width: calc(100% - 30px); margin: 0 auto 30px; }
  .sidebar { width: 74px; }
  .sidebar-brand { padding: 0 15px; }
  .sidebar-brand > div, .side-nav button:not(.active) b, .side-nav button { font-size: 0; }
  .sidebar-brand .brand-mark { width: 42px; flex: 0 0 42px; }
  .side-nav button { justify-content: center; padding: 0; }
  .side-nav button span { font-size: 17px; }
  .sidebar-section, .sidebar-bottom { display: none; }
  .workspace { margin-left: 74px; }
  .phase-track span { display: none; }
  .phase-track > div:not(:last-child)::after { left: 30px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .risk-panel, .decision-panel { grid-column: auto; }
  .graph-insights { grid-template-columns: repeat(2, 1fr); }
  .graph-insights > div:nth-child(2) { border-right: 0; }
  .evidence-graph.expanded .graph-children { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .landing-nav { height: 70px; padding: 0 17px; }
  .nav-actions > *:not(.github-link) { display: none; }
  .hero-grid { padding: 42px 17px; }
  .hero-copy h1 { font-size: 41px; letter-spacing: -2px; }
  .hero-lead { font-size: 14px; }
  .project-form { padding: 17px; }
  .form-heading > span { display: none; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .primary-button { flex: auto; }
  .floating-score { right: -18px; width: 92px; height: 92px; }
  .landing-footer { display: none; }
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .workspace-topbar { padding: 0 14px; }
  .breadcrumb strong, .sync-status { display: none; }
  .project-title-row { padding: 20px 16px; align-items: flex-start; flex-direction: column; }
  .phase-track { margin: 0 16px; }
  .view-tabs { padding: 0 16px; }
  .dashboard-grid { padding: 12px; }
  .decision-panel { align-items: stretch; flex-direction: column; gap: 14px; }
  .single-view { margin: 12px; }
  .plan-options { grid-template-columns: 1fr; }
  .plan-options > button { min-height: 150px; }
  .command-preview { grid-template-columns: 1fr; }
  .command-preview b { justify-self: start; }
  .graph-insights { grid-template-columns: 1fr; }
  .graph-insights > div { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

@media (max-width: 1040px) {
  .report-rail { width: 210px; }
  .report-workspace { margin-left: 210px; }
  .decision-brief { grid-template-columns: 1fr auto; }
  .brief-label { grid-column: 1 / 3; min-height: auto; flex-direction: row; border-right: 0; }
  .metric-row { grid-template-columns: repeat(2, 1fr); }
  .metric-row article:nth-child(2) { border-right: 0; }
  .metric-row article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .repo-help-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  #repo-validation { text-align: left; }
  .report-rail { height: auto; width: 100%; position: static; }
  .report-brand { min-height: 65px; }
  .rail-source, .rail-boundary { display: none; }
  .report-nav { padding: 7px 10px; flex-direction: row; overflow-x: auto; border-top: 1px solid rgba(255,255,255,.1); }
  .report-nav button { min-width: 140px; }
  .report-workspace { margin-left: 0; }
  .report-topbar { position: static; padding: 0 16px; }
  .report-breadcrumb span, .report-breadcrumb b { display: none; }
  .report-actions button:first-child { display: none; }
  .report-hero { padding: 22px 18px; }
  .report-hero-main { align-items: flex-start; flex-direction: column; }
  .readiness-card { min-width: 0; }
  .report-dashboard, .single-report-view { width: calc(100% - 24px); margin-top: 12px; }
  .decision-brief { padding: 19px; grid-template-columns: 1fr; }
  .brief-label { grid-column: auto; }
  .decision-brief button { width: 100%; }
  .audit-check-grid { grid-template-columns: 1fr; }
  .snapshot-strip { grid-template-columns: repeat(2, 1fr); }
  .snapshot-strip > div:nth-child(2) { border-right: 0; }
  .snapshot-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .method-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .report-actions .export-button { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .report-hero h1 { font-size: 28px; }
  .metric-row { grid-template-columns: 1fr; }
  .metric-row article { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-row article:last-child { border-bottom: 0; }
  .report-section-title { padding: 14px; align-items: flex-start; gap: 12px; }
  .report-section-title > button, .report-section-title > b { display: none; }
  .risk-evidence { grid-template-columns: 1fr auto; }
  .risk-evidence span { grid-column: 1 / 3; }
  .actual-log { padding: 28px 20px 0; }
  .actual-log li div > span { flex-direction: column; gap: 4px; }
}

/* v0.4 industry lab entry */
.nav-lab-button {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-bottom: 2px solid var(--red);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}
.nav-lab-button:hover { color: var(--red); }
.industry-entry {
  width: 100%;
  min-height: 70px;
  margin-top: 18px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #b7c2bd;
  border-left: 4px solid var(--red);
  background: #f2f5ec;
  cursor: pointer;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.industry-entry:hover { transform: translateY(-1px); border-color: var(--ink); background: #edf3e3; }
.industry-index { padding: 6px 8px; background: var(--ink); color: var(--green); font: 800 8px ui-monospace, monospace; letter-spacing: .8px; }
.industry-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.industry-copy strong { font-size: 12px; }
.industry-copy small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.industry-entry > b { color: var(--red); font-size: 10px; white-space: nowrap; }

/* v0.4 finance reasoning experiment */
.finance-shell { min-height: 100vh; background: #ecefe9; }
.finance-rail {
  width: 276px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: white;
}
.finance-rail .report-brand { min-height: 76px; }
.finance-lab-stamp { margin: 22px 18px 10px; padding: 15px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.045); }
.finance-lab-stamp span { color: var(--green); font: 800 8px ui-monospace, monospace; letter-spacing: 1.1px; }
.finance-lab-stamp h2 { margin: 8px 0 5px; font: 500 18px/1.25 Georgia, "Noto Serif SC", serif; }
.finance-lab-stamp p { margin: 0; color: #91a69f; font-size: 9px; line-height: 1.55; }
.finance-case-filter-controls { padding: 10px 11px 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.finance-case-filter-controls label { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.finance-case-filter-controls span { color: #6f857e; font: 800 7px ui-monospace, monospace; letter-spacing: .7px; }
.finance-case-filter-controls select, .finance-mobile-case-picker select { width: 100%; min-height: 36px; padding: 0 8px; border: 1px solid #405a53; border-radius: 2px; background: #1b3732; color: #d6e0dc; font-size: 9px; }
.finance-mobile-case-picker { display: none; }
.finance-case-list { min-height: 0; padding: 10px 11px; display: flex; flex: 1; flex-direction: column; gap: 7px; overflow-y: auto; }
.finance-case-list > small { padding: 0 9px 3px; color: #6f857e; font: 800 8px ui-monospace, monospace; letter-spacing: 1px; }
.finance-case-empty { margin: 8px; padding: 16px 12px; border: 1px dashed #466159; color: #91a69f; }
.finance-case-empty strong, .finance-case-empty span { display: block; }
.finance-case-empty strong { color: white; font-size: 11px; }
.finance-case-empty span { margin-top: 6px; font-size: 9px; line-height: 1.5; }
.finance-case-button {
  width: 100%;
  min-height: 76px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  background: transparent;
  color: #b3c1bd;
  cursor: pointer;
  text-align: left;
}
.finance-case-button:hover { background: rgba(255,255,255,.045); color: white; }
.finance-case-button.active { border-color: rgba(184,238,99,.18); border-left-color: var(--green); background: rgba(184,238,99,.095); color: white; }
.finance-case-button > span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #4f6962; border-radius: 50%; color: #829890; font: 800 8px ui-monospace, monospace; }
.finance-case-button.active > span { border-color: var(--green); color: var(--green); }
.finance-case-button div { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.finance-case-button strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.finance-case-button small { color: #778e86; font: 8px ui-monospace, monospace; }
.finance-case-button.active small { color: #9fb0aa; }
.finance-rail-boundary { margin: auto 20px 21px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.finance-rail-boundary strong { display: block; color: var(--green); font: 800 8px ui-monospace, monospace; letter-spacing: 1px; }
.finance-rail-boundary p { margin: 8px 0 0; color: #8fa39c; font-size: 9px; line-height: 1.65; }

.finance-workspace { min-height: 100vh; margin-left: 276px; }
.finance-topbar {
  height: 62px;
  position: sticky;
  top: 0;
  z-index: 15;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(250,250,246,.94);
  backdrop-filter: blur(12px);
}
.finance-breadcrumb { min-width: 0; display: flex; align-items: center; gap: 9px; }
.finance-breadcrumb span { color: var(--muted); font: 800 8px ui-monospace, monospace; letter-spacing: 1px; }
.finance-breadcrumb b { color: #acb5b1; }
.finance-breadcrumb strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.finance-top-actions { display: flex; align-items: center; gap: 8px; }
.finance-top-actions a, .finance-top-actions button { min-height: 34px; padding: 0 11px; display: inline-flex; align-items: center; border: 1px solid #bec6c2; border-radius: 3px; background: white; cursor: pointer; font-size: 9px; font-weight: 750; }
.finance-top-actions button { border-color: var(--ink); background: var(--ink); color: white; }
.finance-top-actions button.secondary { border-color: #bec6c2; background: white; color: var(--ink); }

.finance-hero { padding: 27px clamp(22px, 4vw, 55px) 23px; border-bottom: 1px solid var(--line); background: #f8f7f2; }
.finance-hero-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.finance-hero-kicker span { padding: 5px 7px; border: 1px solid #ccd3cd; color: #586a64; font: 800 8px ui-monospace, monospace; letter-spacing: .6px; }
.finance-hero-kicker .frozen { border-color: #e4cc91; background: var(--amber-bg); color: #93631e; }
.finance-hero-kicker .deterministic { border-color: #c7d6b6; background: #edf4e4; color: #47632c; }
.finance-hero h1 { margin: 13px 0 8px; font: 500 clamp(28px, 3vw, 43px)/1.15 Georgia, "Noto Serif SC", serif; letter-spacing: -1.1px; }
.finance-hero > p { max-width: 850px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.finance-method-links { margin-top: 15px; display: flex; flex-wrap: wrap; gap: 14px; }
.finance-method-links a { color: var(--green-dark); font-size: 9px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }

.finance-content { width: min(1380px, calc(100% - 42px)); margin: 21px auto 55px; }
.finance-question-card { padding: 22px 24px; border: 1px solid var(--line); background: var(--surface); box-shadow: 7px 7px 0 rgba(19,43,39,.07); }
.finance-question-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.finance-question-meta span { padding: 5px 7px; background: var(--ink); color: var(--green); font: 800 8px ui-monospace, monospace; letter-spacing: .7px; }
.finance-question-meta b { color: var(--muted); font: 800 8px ui-monospace, monospace; }
.finance-question-card h2 { max-width: 1000px; margin: 15px 0 7px; font: 500 22px/1.38 Georgia, "Noto Serif SC", serif; }
.finance-question-card > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.finance-view-switch { margin-top: 18px; padding-top: 16px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.finance-view-switch > span { margin-right: auto; color: var(--muted); font: 800 8px ui-monospace, monospace; letter-spacing: .8px; }
.finance-view-switch button { min-height: 37px; padding: 0 13px; border: 1px solid #c3cbc7; border-radius: 3px; background: white; cursor: pointer; font-size: 9px; font-weight: 750; }
.finance-view-switch button.active { border-color: var(--ink); background: var(--ink); color: white; box-shadow: inset 0 -3px var(--green); }
.candidate-switch { margin-top: 19px; padding-top: 16px; display: grid; grid-template-columns: 155px 1fr; gap: 18px; border-top: 1px solid var(--line); }
.candidate-switch > span { padding-top: 7px; color: var(--muted); font: 800 8px ui-monospace, monospace; letter-spacing: .8px; }
.candidate-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.candidate-buttons button { min-height: 37px; padding: 0 12px; border: 1px solid #c3cbc7; border-radius: 3px; background: white; cursor: pointer; font-size: 9px; font-weight: 700; }
.candidate-buttons button:hover { border-color: var(--ink); }
.candidate-buttons button.active { border-color: var(--ink); background: var(--ink); color: white; box-shadow: inset 0 -3px var(--green); }

.finance-metrics { margin: 17px 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--surface); }
.finance-metrics article { min-height: 98px; padding: 18px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.finance-metrics article:last-child { border-right: 0; }
.finance-metrics small { color: var(--muted); font: 800 8px ui-monospace, monospace; letter-spacing: .5px; }
.finance-metrics strong { margin: 8px 0 3px; font: 500 25px/1 Georgia, serif; }
.finance-metrics span { color: #76847f; font-size: 8px; }
.finance-metrics .metric-pass strong { color: #4f7130; }
.finance-metrics .metric-fail strong { color: var(--red); }
.finance-metrics .metric-warning strong { color: #9a671f; }

.finance-comparison { margin: 17px 0; border: 1px solid var(--line); background: var(--surface); box-shadow: 7px 7px 0 rgba(19,43,39,.05); }
.finance-comparison-heading, .finance-history-heading { min-height: 72px; padding: 14px 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.finance-comparison-heading > div:first-child { display: flex; align-items: center; gap: 11px; }
.finance-comparison-heading > div:first-child > span { width: 29px; height: 29px; display: grid; flex: 0 0 auto; place-items: center; background: var(--ink); color: var(--green); font: 800 8px ui-monospace, monospace; }
.finance-comparison-heading h3, .finance-history h3 { margin: 0 0 4px; font: 500 16px Georgia, "Noto Serif SC", serif; }
.finance-comparison-heading p, .finance-history p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.finance-comparison-heading > div:last-child { display: flex; gap: 7px; }
.finance-comparison-heading button, .finance-history-heading > button { min-height: 38px; padding: 0 11px; border: 1px solid #aeb9b4; background: white; cursor: pointer; font-size: 9px; font-weight: 750; }
.finance-comparison-heading button:first-child { border-color: var(--ink); background: var(--ink); color: white; }
.finance-comparison-grid { padding: 15px; display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); gap: 12px; align-items: stretch; }
.finance-compare-run { min-width: 0; padding: 16px; border: 1px solid #d5dbd7; background: white; }
.finance-compare-run.reference { border-color: #b9cda5; background: #f4f8ee; }
.finance-compare-run header { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font: 800 8px ui-monospace, monospace; letter-spacing: .6px; }
.finance-compare-run.reference header b { color: var(--green-dark); }
.finance-compare-run.baseline header b { color: var(--red); }
.finance-compare-score { margin: 18px 0 12px; }
.finance-compare-score strong { font: 500 38px/1 Georgia, serif; }
.finance-compare-score small { margin-left: 3px; color: var(--muted); }
.finance-compare-run dl { margin: 0; border-top: 1px solid var(--line); }
.finance-compare-run dl div { padding: 9px 0; display: grid; grid-template-columns: 100px 1fr; gap: 10px; border-bottom: 1px solid var(--line); }
.finance-compare-run dt { color: var(--muted); font-size: 9px; }
.finance-compare-run dd { margin: 0; overflow-wrap: anywhere; font: 700 9px/1.45 ui-monospace, monospace; text-align: right; }
.finance-compare-program { margin-top: 12px; padding: 11px; border-left: 3px solid #718b83; background: #132b27; }
.finance-compare-program small { display: block; margin-bottom: 6px; color: #78938a; font: 800 7px ui-monospace, monospace; }
.finance-compare-program code { display: block; overflow-wrap: anywhere; color: var(--green); font: 9px/1.55 ui-monospace, monospace; }
.finance-issue-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.finance-issue-tag, .finance-compare-delta div span { padding: 5px 6px; border: 1px solid #e1b9ae; background: var(--red-bg); color: var(--red); font: 800 7px ui-monospace, monospace; }
.finance-issue-tag.pass, .finance-compare-delta div span { border-color: #c8d8b8; background: #edf4e6; color: var(--green-dark); }
.finance-compare-delta { padding: 18px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #b6c1bc; background: #f2f3ef; text-align: center; }
.finance-compare-delta > small { color: var(--muted); font: 800 7px ui-monospace, monospace; letter-spacing: .8px; }
.finance-compare-delta > strong { margin-top: 8px; color: var(--green-dark); font: 500 34px/1 Georgia, serif; }
.finance-compare-delta > span { color: var(--muted); font-size: 8px; }
.finance-compare-delta div { margin-top: 13px; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.finance-compare-delta div span.neutral { border-color: #cbd2ce; background: white; color: var(--muted); }
.finance-compare-delta p { margin: 12px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }

.finance-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: 16px; align-items: start; }
.finance-panel { border: 1px solid var(--line); background: var(--surface); }
.finance-panel-heading { min-height: 69px; padding: 14px 17px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.finance-panel-heading > div { display: flex; align-items: center; gap: 11px; }
.finance-panel-heading > div > span { width: 29px; height: 29px; display: grid; place-items: center; background: var(--ink); color: var(--green); font: 800 8px ui-monospace, monospace; }
.finance-panel-heading h3 { margin: 0 0 4px; font: 500 16px Georgia, "Noto Serif SC", serif; }
.finance-panel-heading p { margin: 0; color: var(--muted); font-size: 8px; }
.finance-panel-heading > b { color: var(--muted); font: 800 8px ui-monospace, monospace; }

.finance-evidence-list { padding: 13px; display: flex; flex-direction: column; gap: 9px; }
.finance-evidence-item { padding: 14px; border: 1px solid #d9ddd8; border-left: 3px solid #9caaa5; background: white; }
.finance-evidence-item.used { border-left-color: var(--green-dark); background: #f6f9f1; }
.finance-evidence-item.missing { border-left-color: var(--red); background: var(--red-bg); }
.finance-evidence-item header { display: flex; justify-content: space-between; gap: 14px; }
.finance-evidence-item header span { color: var(--green-dark); font: 800 8px ui-monospace, monospace; letter-spacing: .6px; }
.finance-evidence-item header b { color: var(--muted); font-size: 8px; }
.finance-evidence-item p { margin: 10px 0; color: #53625d; font-size: 11px; line-height: 1.65; }
.finance-evidence-value { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding-top: 10px; border-top: 1px solid #e0e3de; }
.finance-evidence-value span { color: var(--muted); font-size: 9px; }
.finance-evidence-value strong { font: 700 13px ui-monospace, monospace; }

.finance-program-body { padding: 15px; }
.finance-program-code { padding: 14px; overflow-x: auto; border-left: 3px solid var(--blue); background: #122925; color: #d3dfda; }
.finance-program-code small { display: block; margin-bottom: 8px; color: #78938a; font: 800 7px ui-monospace, monospace; letter-spacing: 1px; }
.finance-program-code code { color: var(--green); font: 10px/1.65 ui-monospace, "SFMono-Regular", monospace; white-space: nowrap; }
.finance-output-strip { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: #f1f2ed; }
.finance-output-strip > div { min-height: 67px; padding: 11px; display: flex; flex-direction: column; justify-content: center; gap: 6px; border-right: 1px solid var(--line); }
.finance-output-strip > div:last-child { border-right: 0; }
.finance-output-strip small { color: var(--muted); font: 800 7px ui-monospace, monospace; }
.finance-output-strip strong { font: 700 10px ui-monospace, monospace; overflow-wrap: anywhere; }
.finance-trace { margin: 14px 0 0; padding: 0; list-style: none; }
.finance-trace li { min-height: 55px; padding: 10px 0; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.finance-trace li:last-child { border-bottom: 0; }
.finance-trace li > span { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid #bdc7c2; border-radius: 50%; color: var(--muted); font: 800 7px ui-monospace, monospace; }
.finance-trace li div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.finance-trace li code { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.finance-trace li small { color: var(--muted); font-size: 8px; }
.finance-trace li > strong { font: 700 10px ui-monospace, monospace; }

.finance-verdict { margin-top: 16px; border: 1px solid var(--line); background: var(--surface); }
.finance-verdict-summary { min-height: 103px; padding: 19px; display: grid; grid-template-columns: 58px 1fr; gap: 15px; align-items: center; background: var(--ink); color: white; }
.finance-verdict-summary > span { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: var(--green); font-size: 24px; }
.finance-verdict.fail .finance-verdict-summary > span { color: #ff8874; }
.finance-verdict.warning .finance-verdict-summary > span { color: #f1c065; }
.finance-verdict-summary small { color: var(--green); font: 800 8px ui-monospace, monospace; letter-spacing: .8px; }
.finance-verdict.fail .finance-verdict-summary small { color: #ff9c8a; }
.finance-verdict.warning .finance-verdict-summary small { color: #efc36f; }
.finance-verdict-summary h3 { margin: 6px 0 4px; font: 500 18px Georgia, "Noto Serif SC", serif; }
.finance-verdict-summary p { margin: 0; color: #aabbb5; font-size: 9px; line-height: 1.55; }
.finance-issue-list { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.finance-issue { padding: 12px; border: 1px solid #e3d2cc; background: var(--red-bg); }
.finance-issue.pass { border-color: #cedabb; background: #f1f6e9; }
.finance-issue.warning { border-color: #ead7a8; background: var(--amber-bg); }
.finance-issue header { display: flex; justify-content: space-between; gap: 12px; }
.finance-issue header span { color: var(--red); font: 800 8px ui-monospace, monospace; }
.finance-issue.pass header span { color: var(--green-dark); }
.finance-issue.warning header span { color: #98661f; }
.finance-issue header b { color: var(--muted); font-size: 8px; }
.finance-issue p { margin: 7px 0 0; color: #665d59; font-size: 9px; line-height: 1.55; }

.finance-history { margin-top: 16px; border: 1px solid var(--line); background: var(--surface); }
.finance-history > div:first-child:not(.finance-history-heading) { padding: 18px 20px; }
.finance-history > div:first-child > span, .finance-history-heading span { color: var(--green-dark); font: 800 8px ui-monospace, monospace; letter-spacing: .8px; }
.finance-history-heading > button { color: var(--red); }
.finance-history-list { padding: 10px; display: flex; flex-direction: column; gap: 7px; }
.finance-history-list article { display: grid; grid-template-columns: 1fr 42px; border: 1px solid #d8ddd9; background: white; }
.finance-history-open { min-height: 58px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.finance-history-open span { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.finance-history-open b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.finance-history-open small { color: var(--muted); font-size: 8px; }
.finance-history-open > strong { color: var(--green-dark); font: 700 12px ui-monospace, monospace; white-space: nowrap; }
.finance-history-delete { border: 0; border-left: 1px solid var(--line); background: #f6f3ee; color: var(--red); cursor: pointer; font-size: 18px; }

.finance-boundary { margin-top: 16px; padding: 18px 20px; display: grid; grid-template-columns: 170px 1fr auto; gap: 20px; align-items: center; border: 1px solid #d8d3c3; border-left: 4px solid var(--amber); background: #f7f3e8; }
.finance-boundary span { color: #95651f; font: 800 8px ui-monospace, monospace; letter-spacing: .9px; }
.finance-boundary p { margin: 0; color: #6f695d; font-size: 9px; line-height: 1.65; }
.finance-boundary a { color: var(--green-dark); font-size: 9px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

@media (max-width: 1080px) {
  .finance-rail { width: 224px; }
  .finance-workspace { margin-left: 224px; }
  .finance-grid { grid-template-columns: 1fr; }
  .finance-comparison-grid { grid-template-columns: minmax(0, 1fr) 125px minmax(0, 1fr); }
  .finance-boundary { grid-template-columns: 130px 1fr; }
  .finance-boundary a { grid-column: 2; }
}

@media (max-width: 780px) {
  .nav-lab-button { display: none; }
  .finance-rail { width: 100%; position: static; }
  .finance-lab-stamp, .finance-rail-boundary { display: none; }
  .finance-case-filter-controls { padding-top: 8px; border-top: 1px solid rgba(255,255,255,.1); }
  .finance-case-filter-controls select, .finance-mobile-case-picker select { min-height: 44px; font-size: 12px; }
  .finance-mobile-case-picker { padding: 8px 11px 12px; display: flex; flex-direction: column; gap: 6px; color: #91a69f; font: 800 9px ui-monospace, monospace; }
  .finance-case-list { display: none; }
  .finance-workspace { margin-left: 0; }
  .finance-topbar { height: auto; min-height: 0; padding: 10px 12px; position: static; flex-wrap: wrap; }
  .finance-breadcrumb { width: 100%; min-height: 24px; }
  .finance-breadcrumb span, .finance-breadcrumb b { display: none; }
  .finance-top-actions { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .finance-top-actions a { display: none; }
  .finance-top-actions button { min-height: 44px; padding: 0 7px; justify-content: center; font-size: 11px; }
  .finance-content { width: calc(100% - 24px); margin-top: 12px; }
  .finance-question-card { padding: 18px; }
  .candidate-switch { grid-template-columns: 1fr; gap: 8px; }
  .finance-metrics { grid-template-columns: repeat(2, 1fr); }
  .finance-metrics article:nth-child(2) { border-right: 0; }
  .finance-metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .finance-comparison-grid { grid-template-columns: 1fr; }
  .finance-compare-delta { min-height: 150px; }
  .finance-boundary { grid-template-columns: 1fr; }
  .finance-boundary a { grid-column: auto; }
}

@media (max-width: 500px) {
  .industry-entry { grid-template-columns: 1fr auto; }
  .industry-index { grid-column: 1 / 3; width: fit-content; }
  .industry-copy small { font-size: 10px; }
  .finance-hero { padding: 20px 16px; }
  .finance-hero h1 { font-size: 29px; }
  .finance-hero > p { font-size: 12px; }
  .finance-question-card h2 { font-size: 19px; }
  .finance-question-card > p { font-size: 12px; }
  .finance-question-meta span, .finance-question-meta b, .finance-view-switch > span, .candidate-switch > span { font-size: 10px; }
  .finance-view-switch { display: grid; grid-template-columns: 1fr 1fr; }
  .finance-view-switch > span { grid-column: 1 / 3; }
  .finance-view-switch button { min-height: 44px; font-size: 12px; }
  .candidate-buttons { display: grid; grid-template-columns: 1fr; }
  .candidate-buttons button { min-height: 44px; font-size: 12px; text-align: left; }
  .finance-metrics { grid-template-columns: 1fr; }
  .finance-metrics article { min-height: 82px; border-right: 0; border-bottom: 1px solid var(--line); }
  .finance-metrics article:last-child { border-bottom: 0; }
  .finance-metrics small { font-size: 10px; }
  .finance-metrics span { font-size: 12px; line-height: 1.45; }
  .finance-panel-heading { align-items: flex-start; }
  .finance-panel-heading p { font-size: 12px; line-height: 1.45; }
  .finance-panel-heading > b { font-size: 10px; }
  .finance-evidence-item header span, .finance-evidence-item header b { font-size: 10px; }
  .finance-evidence-item p { font-size: 12px; }
  .finance-evidence-value span { font-size: 11px; }
  .finance-program-code small, .finance-output-strip small { font-size: 10px; }
  .finance-program-code code, .finance-output-strip strong { font-size: 12px; }
  .finance-trace li { grid-template-columns: 28px 1fr; }
  .finance-trace li code, .finance-trace li small, .finance-trace li > strong { font-size: 11px; }
  .finance-trace li > strong { grid-column: 2; }
  .finance-output-strip { grid-template-columns: 1fr; }
  .finance-output-strip > div { min-height: 55px; border-right: 0; border-bottom: 1px solid var(--line); }
  .finance-output-strip > div:last-child { border-bottom: 0; }
  .finance-verdict-summary { grid-template-columns: 46px 1fr; }
  .finance-verdict-summary > span { width: 44px; height: 44px; }
  .finance-verdict-summary small { font-size: 10px; }
  .finance-verdict-summary p, .finance-issue p { font-size: 12px; }
  .finance-issue header span, .finance-issue header b { font-size: 10px; }
  .finance-comparison-heading, .finance-history-heading { padding: 15px; align-items: stretch; flex-direction: column; }
  .finance-comparison-heading p, .finance-history p { font-size: 12px; }
  .finance-comparison-heading > div:last-child { display: grid; grid-template-columns: 1fr; }
  .finance-comparison-heading button, .finance-history-heading > button { min-height: 44px; font-size: 12px; }
  .finance-comparison-grid { padding: 10px; }
  .finance-compare-run { padding: 14px; }
  .finance-compare-run dl div { grid-template-columns: 84px 1fr; }
  .finance-compare-run dt, .finance-compare-run dd, .finance-compare-program code, .finance-compare-delta p { font-size: 11px; }
  .finance-compare-run header, .finance-compare-delta > small, .finance-history > div:first-child > span, .finance-history-heading span { font-size: 10px; }
  .finance-compare-delta > span { font-size: 11px; }
  .finance-issue-tag, .finance-compare-delta div span { font-size: 9px; }
  .finance-history-list article { grid-template-columns: 1fr 44px; }
  .finance-history-open { align-items: flex-start; flex-direction: column; }
  .finance-history-open b { font-size: 12px; }
  .finance-history-open small { font-size: 11px; }
  .finance-boundary p { font-size: 12px; }
  .finance-boundary span, .finance-boundary a { font-size: 10px; }
}
