@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800;900&display=swap");

:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #64717f;
  --line: #d8dee6;
  --panel: #ffffff;
  --field: #f7f9fb;
  --accent: #146c5c;
  --accent-dark: #0f5145;
  --danger: #9d2c2c;
  --surface: #eef2f5;
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.topbar,
.matter-band,
.query-layout,
.login-panel {
  border: 1px solid var(--line);
  background: var(--panel);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 8px 8px 0 0;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 1.55rem;
  line-height: 1.2;
}

h2 {
  font-size: 1rem;
}

.logout {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.matter-band {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1px;
  border-top: 0;
  background: var(--line);
}

.matter-band > div {
  min-width: 0;
  padding: 16px 24px;
  background: var(--panel);
}

.matter-band strong {
  display: block;
  overflow-wrap: anywhere;
}

.query-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.query-main {
  min-width: 0;
  padding: 24px;
}

.query-side {
  border-left: 1px solid var(--line);
  padding: 24px;
  background: #fbfcfd;
}

.question-form {
  display: grid;
  gap: 10px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
}

label {
  color: var(--ink);
  font-weight: 700;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid #c7d0da;
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  padding: 12px 14px;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

button {
  width: fit-content;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 18px;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  background: #6d8f88;
  cursor: wait;
}

.submit-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.submit-status:empty {
  display: none;
}

.answer,
.sources,
.error-box {
  margin-top: 24px;
}

.answer,
.source,
.error-box,
.run {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.answer-meta,
.source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.answer-meta {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 12px 16px;
}

.answer-text {
  padding: 16px;
}

.prose {
  color: #24313b;
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose p,
.prose ul,
.prose ol,
.prose pre,
.prose blockquote,
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  margin: 0 0 14px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li + li {
  margin-top: 6px;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  line-height: 1.3;
}

.prose h1 {
  font-size: 1.25rem;
}

.prose h2 {
  font-size: 1.1rem;
}

.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  font-size: 1rem;
}

.prose code {
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #f1f5f8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.prose pre {
  overflow-x: auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fb;
}

.prose pre code {
  padding: 0;
  background: transparent;
}

.prose blockquote {
  margin-left: 0;
  padding-left: 14px;
  border-left: 3px solid #c7d0da;
  color: #425160;
}

.prose a {
  color: var(--accent-dark);
}

.answer-text p:first-child,
.source p:first-child {
  margin-top: 0;
}

.answer-text p:last-child,
.source p:last-child {
  margin-bottom: 0;
}

.source-uri {
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.sources {
  display: grid;
  gap: 12px;
}

.trace {
  margin-top: 28px;
  border: 1px solid #aeb9c5;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.trace-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fb;
}

.trace-summary,
.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
}

.trace-badge {
  padding: 3px 8px;
  border-radius: 4px;
  background: #e8eef3;
  color: #344351;
  font-weight: 800;
  text-transform: uppercase;
}

.trace-action {
  padding: 5px 8px;
  border: 1px solid #b8c3ce;
  border-radius: 4px;
  background: #fff;
  color: #31414f;
  font-size: 0.76rem;
  font-weight: 800;
}

.trace-action:hover {
  background: #edf2f5;
}

.trace-badge.answered,
.trace-badge.complete,
.verification-result.passed {
  background: #e7f3ee;
  color: #0f624f;
}

.trace-badge.partial,
.trace-badge.insufficient_coverage,
.verification-result.failed {
  background: #fff1d8;
  color: #7b4c00;
}

.question-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.question-presets button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #bac6d2;
  border-radius: 4px;
  background: #f7f9fb;
  color: #354657;
  font-size: 0.76rem;
  font-weight: 800;
}

.question-presets button:hover {
  background: #edf3f7;
}

.coverage-diagnostic {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #f8fafc;
}

.coverage-diagnostic.partial {
  border-color: #e4c16c;
  background: #fff8e8;
}

.coverage-diagnostic.complete {
  border-color: #b8d7ca;
  background: #eef8f4;
}

.coverage-diagnostic strong,
.coverage-diagnostic span {
  display: block;
}

.coverage-diagnostic span {
  margin-top: 3px;
  color: #536170;
  font-size: 0.84rem;
}

.coverage-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.coverage-role {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d3dbe4;
  border-radius: 6px;
  background: #fff;
}

.coverage-role.present {
  border-color: #c5dbd0;
}

.coverage-role.missing {
  border-color: #e5c9a3;
  background: #fffaf2;
}

.coverage-role strong,
.coverage-role span {
  display: block;
}

.coverage-role span,
.coverage-role p,
.coverage-role li {
  color: #536170;
  font-size: 0.8rem;
  line-height: 1.35;
}

.coverage-role ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
}

.trace-disclosure {
  margin: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  color: #4d5b68;
  font-size: 0.88rem;
}

.trace-console {
  display: grid;
  gap: 14px;
  margin: 18px 20px;
  padding: 16px;
  border: 1px solid #c4ced8;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f3f6f8 100%);
}

.console-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.console-header h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

.console-legend,
.flow-stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.console-legend {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.console-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9aa8b5;
}

.legend-dot.active {
  background: var(--accent);
}

.legend-dot.skipped {
  background: #b9c3cc;
}

.legend-dot.warning {
  background: #d99016;
}

.legend-dot.failed {
  background: #b43c3c;
}

.flow-tab {
  padding: 7px 10px;
  border: 1px solid #b8c3ce;
  border-radius: 5px;
  background: #fff;
  color: #31414f;
  font-size: 0.78rem;
}

.flow-tab:hover,
.flow-tab.is-active {
  border-color: var(--accent);
  background: #eaf5f1;
  color: var(--accent-dark);
}

.flow-diagram {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}

.flow-node {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 178px;
  max-width: 220px;
  min-height: 126px;
  padding: 12px;
  border: 1px solid #c5d0da;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  white-space: normal;
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.04);
}

.flow-node:hover {
  border-color: var(--accent);
  background: #f7fcfa;
}

.flow-node.is-skipped {
  opacity: 0.62;
  background: #f8fafb;
}

.flow-node.tone-active {
  border-color: #72b6a7;
  box-shadow: inset 0 0 0 1px #d7eee8;
}

.flow-node.tone-warning {
  border-color: #dfb15f;
  box-shadow: inset 0 0 0 1px #faedcf;
}

.flow-node.tone-failed {
  border-color: #d68c8c;
  box-shadow: inset 0 0 0 1px #f4dada;
}

.flow-node strong,
.flow-node span,
.flow-node small {
  display: block;
}

.flow-node strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.flow-node span:not(.node-status) {
  color: #43515e;
  font-size: 0.8rem;
}

.flow-node small {
  color: var(--muted);
  font-size: 0.74rem;
}

.node-status {
  width: fit-content;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e8eef3;
  color: #344351;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tone-active .node-status {
  background: #e1f2ec;
  color: #0d5e4c;
}

.tone-warning .node-status {
  background: #fff1d8;
  color: #7b4c00;
}

.tone-failed .node-status {
  background: #fbe3e3;
  color: #8f2d2d;
}

.flow-connector {
  display: grid;
  place-items: center;
  min-width: 22px;
  color: #8493a1;
  font-weight: 900;
}

.flow-connector.is-active {
  color: var(--accent);
}

.flow-inspector {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d4dce4;
  border-radius: 7px;
  background: #fff;
}

.inspector-head {
  display: flex;
  gap: 8px;
  align-items: center;
}

.flow-inspector p {
  margin: 0;
  color: #34414d;
}

.flow-inspector ul {
  margin: 0;
  padding-left: 20px;
  color: #41505d;
}

.flow-inspector pre {
  max-height: 300px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid #d7dfe7;
  border-radius: 6px;
  background: #f6f8fa;
  color: #25313c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.74rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.inspector-empty {
  color: var(--muted);
}

.trace details + details {
  border-top: 1px solid var(--line);
}

.trace summary {
  cursor: pointer;
  padding: 14px 20px;
  color: #25323e;
  font-weight: 800;
  list-style-position: inside;
}

.trace details[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.trace-body {
  padding: 18px 20px;
}

.trace-body h3 {
  margin: 18px 0 8px;
  font-size: 0.9rem;
  letter-spacing: 0;
}

.trace-body h3:first-child {
  margin-top: 0;
}

.trace-body pre,
.mono-block {
  max-height: 460px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid #d5dce4;
  border-radius: 6px;
  background: #f5f7f9;
  color: #263642;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.trace-body .prompt,
.trace-body .raw-trace {
  max-height: 720px;
}

.trace-grid,
.trace-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.trace-facts,
.check-list,
.inline-metadata {
  margin: 0;
}

.trace-facts > div,
.check-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.4fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e4e8ed;
}

.trace-facts dt,
.check-list dt,
.inline-metadata dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.trace-facts dd,
.check-list dd,
.inline-metadata dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.compact-list {
  margin: 0;
  padding-left: 20px;
}

.compact-list li + li {
  margin-top: 6px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
}

.claim-list {
  display: grid;
  gap: 8px;
}

.claim-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.claim-row:hover,
.claim-row.is-highlighted {
  border-color: var(--accent);
  background: #f0f8f5;
}

.claim-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8eef3;
  color: #344351;
  font-size: 0.78rem;
}

.claim-copy,
.candidate-text {
  display: block;
}

.claim-copy strong,
.claim-copy span,
.claim-copy small {
  display: block;
}

.claim-copy strong {
  color: var(--accent-dark);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.claim-copy span {
  margin-top: 3px;
  font-weight: 500;
}

.claim-copy small,
.candidate-text {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

.metric-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #f7f9fb;
}

.table-scroll {
  overflow-x: auto;
}

.trace-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.trace-table th,
.trace-table td {
  padding: 9px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.trace-table th {
  background: #f3f6f8;
}

.trace-table tr.excluded {
  color: #697580;
  background: #fafbfc;
}

.trace-table pre {
  min-width: 190px;
  max-height: 150px;
  padding: 7px;
  font-size: 0.7rem;
}

.evidence-list {
  display: grid;
  gap: 12px;
}

.evidence-item {
  padding: 14px;
  border-left: 4px solid #b7c3ce;
  background: #f8fafb;
  scroll-margin: 24px;
}

.evidence-item.is-highlighted {
  border-left-color: var(--accent);
  background: #edf8f4;
  box-shadow: inset 0 0 0 1px #a9d5c9;
}

.evidence-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.evidence-item p {
  margin: 10px 0;
}

.inline-metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  padding-top: 10px;
  border-top: 1px solid #dfe5ea;
}

.inline-metadata > div {
  min-width: 0;
}

.verification-result {
  margin-bottom: 12px;
  padding: 10px 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.source {
  padding: 14px 16px;
}

.source-head span {
  color: var(--muted);
  white-space: nowrap;
}

.source p {
  color: #2f3b46;
  font-size: 0.93rem;
}

.run {
  display: block;
  margin-top: 12px;
  padding: 12px;
  color: inherit;
  text-decoration: none;
}

.run p {
  margin: 6px 0 0;
  color: #33404b;
  font-size: 0.9rem;
}

.run small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
}

.run:hover {
  border-color: #aab8c5;
  background: #f5f8fa;
}

.status {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status.completed {
  color: var(--accent-dark);
}

.status.error,
.error-box {
  color: var(--danger);
}

.error-box {
  padding: 14px 16px;
}

.muted {
  color: var(--muted);
}

.login-panel {
  display: grid;
  gap: 24px;
  width: min(420px, 100%);
  margin: 12vh auto 0;
  padding: 28px;
  border-radius: 8px;
}

.login-form {
  display: grid;
  gap: 10px;
}

.alert {
  border: 1px solid #e3b1b1;
  border-radius: 6px;
  background: #fff5f5;
  color: var(--danger);
  padding: 10px 12px;
}

.dashboard-topbar {
  border-bottom: 0;
}

.nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: flex-end;
}

.nav-link {
  color: #315f8c;
  font-weight: 800;
  text-decoration: none;
}

.nav-link:hover,
.logout:hover {
  text-decoration: underline;
}

.dashboard-summary {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 22px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--panel);
}

.summary-copy {
  min-width: 0;
}

.summary-copy h2 {
  max-width: 680px;
  margin-top: 4px;
  color: #25313d;
  font-size: 1.15rem;
  line-height: 1.35;
}

.summary-stats,
.side-stats,
.matter-card-facts {
  margin: 0;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  min-width: min(440px, 100%);
  border: 1px solid #dfe5ea;
  border-radius: 8px;
  overflow: hidden;
}

.summary-stats div,
.side-stats div {
  min-width: 0;
  padding: 12px;
  background: #fbfcfd;
}

.summary-stats div + div {
  border-left: 1px solid #dfe5ea;
}

.summary-stats dt,
.side-stats dt,
.matter-card-facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-stats dd,
.side-stats dd,
.matter-card-facts dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.summary-stats dd {
  color: #182532;
  font-size: 1.3rem;
  font-weight: 900;
}

.portfolio-workspace,
.matter-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--panel);
}

.portfolio-main,
.matter-main {
  min-width: 0;
  padding: 24px;
}

.portfolio-rail,
.matter-rail {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 24px;
  border-left: 1px solid var(--line);
  background: #fbfcfd;
}

.portfolio-question,
.matter-question,
.matter-summary,
.rail-panel,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.portfolio-question,
.matter-question,
.matter-summary,
.rail-panel,
.empty-state {
  padding: 16px;
}

.inline-question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.inline-question input {
  min-height: 44px;
}

.portfolio-answer .coverage-note {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head.compact {
  margin-bottom: 8px;
}

.section-head h2 {
  margin-top: 2px;
}

.matter-list {
  margin-top: 24px;
}

.matter-list-grid {
  display: grid;
  gap: 12px;
}

.matter-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.matter-card:hover {
  border-color: #a8b6c4;
  background: #f7fafb;
}

.matter-card strong {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
}

.matter-card p {
  margin: 0;
  color: #33414e;
}

.status-pill {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 4px;
  background: #eef3f6;
  color: #324250;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.ready {
  background: #e3f1eb;
  color: #0f624f;
}

.status-pill.needs-indexing {
  background: #fff0d1;
  color: #7b4c00;
}

.matter-card-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 14px;
  padding-top: 10px;
  border-top: 1px solid #e3e8ee;
}

.matter-card-cta {
  color: #315f8c;
  font-weight: 900;
}

.matter-summary {
  margin-bottom: 18px;
}

.matter-summary p:last-child {
  margin-bottom: 0;
}

.side-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 10px;
  background: #dfe5ea;
  border: 1px solid #dfe5ea;
  border-radius: 8px;
  overflow: hidden;
}

.side-stats dd {
  color: #182532;
  font-size: 1.15rem;
  font-weight: 900;
}

.document-row {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid #e4e9ee;
}

.document-row:first-of-type {
  border-top: 0;
}

.document-row strong,
.document-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.document-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.empty-state {
  color: #34414d;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.errorlist {
  margin: 0;
  padding-left: 20px;
  color: var(--danger);
}

@media (max-width: 820px) {
  .shell {
    width: min(100vw - 20px, 720px);
    padding: 10px 0 20px;
  }

  .topbar,
  .matter-band,
  .query-layout,
  .dashboard-summary,
  .portfolio-workspace,
  .matter-workspace {
    display: block;
  }

  .topbar,
  .matter-band,
  .query-layout,
  .dashboard-summary,
  .portfolio-workspace,
  .matter-workspace,
  .login-panel {
    border-radius: 8px;
  }

  .matter-band,
  .query-layout,
  .dashboard-summary,
  .portfolio-workspace,
  .matter-workspace {
    margin-top: 10px;
    border-top: 1px solid var(--line);
  }

  .matter-band > div + div,
  .query-side,
  .portfolio-rail,
  .matter-rail {
    border-top: 1px solid var(--line);
  }

  .query-side,
  .portfolio-rail,
  .matter-rail {
    border-left: 0;
  }

  .nav-actions {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .summary-stats,
  .matter-card-facts {
    grid-template-columns: 1fr 1fr;
  }

  .inline-question {
    grid-template-columns: 1fr;
  }

  .inline-question button {
    width: 100%;
  }

  .trace-title,
  .evidence-head,
  .console-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .trace-grid,
  .trace-columns,
  .inline-metadata {
    grid-template-columns: 1fr;
  }

  .trace-console {
    margin: 14px;
    padding: 12px;
  }

  .flow-node {
    min-width: 162px;
  }
}

.prototype-shell {
  width: 100vw;
  min-height: 100vh;
  margin: -32px calc(50% - 50vw) 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.86), transparent 28rem),
    #eef0f5;
  color: #080b20;
}

.app-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 62px;
  padding: 0 28px;
  border-bottom: 1px solid #cfd4dd;
  background: #fff;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #11172a;
  font-size: 1.46rem;
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-icon {
  display: grid;
  gap: 2px;
  width: 21px;
}

.brand-icon i {
  display: block;
  height: 5px;
  border-radius: 999px;
}

.brand-icon i:nth-child(1) {
  width: 9px;
  margin-left: 5px;
  background: #d7333f;
}

.brand-icon i:nth-child(2) {
  width: 16px;
  margin-left: 2px;
  background: #2f8c98;
}

.brand-icon i:nth-child(3) {
  width: 21px;
  background: #235c91;
}

.chrome-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.chrome-link {
  color: #172235;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.chrome-link:hover {
  color: #235c91;
}

.chrome-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #235c91;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.prototype-page {
  width: min(1220px, calc(100vw - 38px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.prototype-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.portfolio-hero {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 18px;
}

.portfolio-hero .count-pill {
  margin-top: 5px;
}

.prototype-hero h1 {
  margin: 0;
  color: #070a1f;
  font-size: 1.92rem;
  font-weight: 500;
  line-height: 1.12;
}

.prototype-hero p {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  align-items: center;
  margin: 8px 0 0;
  color: #5d6574;
  font-size: 0.92rem;
}

.matter-hero p span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 0 2px 10px;
  border-radius: 50%;
  background: #969daa;
}

.count-pill,
.phase-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid #cfd5df;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: #56606f;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.phase-pill.is-ready,
.status-pill.ready {
  border-color: #cfe0f0;
  background: #e8f1fa;
  color: #245782;
}

.phase-pill.needs-indexing,
.status-pill.needs-indexing {
  border-color: #e5cbd0;
  background: #f9e9eb;
  color: #9c2938;
}

.back-link {
  color: #172235;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.back-link:hover {
  color: #235c91;
}

.prototype-ask-card,
.prototype-card,
.portfolio-row {
  border: 1px solid #cfd4dd;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(18, 24, 38, 0.08), 0 1px 2px rgba(18, 24, 38, 0.08);
}

.prototype-ask-card {
  display: grid;
  gap: 13px;
  margin-bottom: 26px;
  padding: 20px 20px 18px;
}

.ask-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #080b20;
  font-size: 1rem;
  font-weight: 600;
}

.traffic-lights {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.traffic-lights i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.traffic-lights i:nth-child(1) {
  background: #e23b45;
}

.traffic-lights i:nth-child(2) {
  background: #5aa64f;
}

.traffic-lights i:nth-child(3) {
  background: #235c91;
}

.prototype-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  min-height: 50px;
  padding: 7px;
  border: 1px solid #c8ced8;
  border-radius: 12px;
  background: #f7f8fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.prototype-input-row input {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #11172a;
  font-size: 0.96rem;
  padding: 0 10px;
  box-shadow: none;
}

.prototype-input-row input:focus {
  outline: 0;
}

.prototype-input-row:focus-within {
  border-color: #235c91;
  outline: 2px solid rgba(35, 92, 145, 0.18);
  outline-offset: 1px;
}

.prototype-input-row button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #153650;
  border-radius: 9px;
  background: #235c91;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

.prototype-input-row button:hover {
  background: #18466f;
}

.ask-note {
  margin: 0;
  color: #5d6574;
  font-size: 0.78rem;
}

.portfolio-table {
  display: grid;
  gap: 10px;
}

.portfolio-table-head,
.portfolio-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.8fr) minmax(112px, 0.8fr) minmax(58px, 0.5fr) minmax(150px, 1.2fr);
  gap: 16px;
  align-items: center;
}

.portfolio-table-head {
  padding: 0 18px;
  color: #4e5868;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portfolio-rows {
  display: grid;
  gap: 14px;
}

.portfolio-row {
  min-height: 76px;
  padding: 14px 18px;
  color: inherit;
  text-decoration: none;
}

.portfolio-row:hover {
  border-color: #b9c1ce;
  transform: translateY(-1px);
}

.matter-title-block,
.activity-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.matter-title-block strong {
  color: #101526;
  font-size: 1rem;
  font-weight: 560;
  line-height: 1.2;
}

.matter-title-block small,
.activity-block small {
  color: #687182;
  font-size: 0.78rem;
}

.metric-number {
  color: #235c91;
  font-size: 1.22rem;
  font-weight: 450;
}

.coverage-meter {
  height: 9px;
  border-radius: 999px;
  background: #dbe6f0;
}

.coverage-meter i {
  display: block;
  width: min(100%, var(--meter-value));
  height: 9px;
  border-radius: 999px;
  background: #235c91;
}

.activity-block strong {
  color: #1b2231;
  font-size: 0.86rem;
  font-weight: 560;
  overflow-wrap: break-word;
}

.prototype-card {
  padding: 24px 28px;
}

.card-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.card-heading-row h2 {
  margin: 0;
  color: #11172a;
  font-size: 1.18rem;
  font-weight: 600;
}

.card-heading-row p {
  margin: 6px 0 0;
  color: #9c2938;
  font-size: 0.9rem;
}

.attention-card,
.answer-card,
.source-card {
  margin-bottom: 24px;
}

.attention-row,
.source-row,
.run-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid #e3e6eb;
}

.attention-row:first-of-type,
.source-row:first-of-type,
.run-row:first-of-type {
  border-top: 0;
}

.attention-row div,
.source-row div,
.run-row span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.attention-row strong,
.source-row strong,
.run-row strong {
  color: #101526;
  font-weight: 650;
}

.attention-row span,
.source-row span,
.run-row small {
  color: #687182;
  font-size: 0.86rem;
}

.attention-row a {
  flex: 0 0 auto;
  padding: 10px 18px;
  border: 1px solid #315f78;
  border-radius: 999px;
  color: #244f67;
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.matter-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.overview-card {
  grid-column: 1 / -1;
}

.overview-card p {
  max-width: 940px;
  margin: 0;
  color: #303849;
  font-size: 1rem;
}

.big-metric {
  color: #080b20;
  font-size: 2.8rem;
  font-weight: 350;
  line-height: 1;
}

.spend-card .muted {
  margin: 8px 0 18px;
}

.coverage-meter {
  display: block;
  height: 10px;
  overflow: hidden;
}

.document-list-compact {
  display: grid;
}

.document-list-compact .document-row {
  padding: 14px 0;
  border-top: 1px solid #e3e6eb;
}

.document-list-compact .document-row:first-child {
  border-top: 0;
}

.run-row {
  color: inherit;
  text-decoration: none;
}

.run-row i {
  font-style: normal;
}

.source-list-compact {
  display: grid;
}

.answer-chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.quality-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #c7d2dd;
  border-radius: 999px;
  background: #eef5f8;
  color: #235c6b;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.quality-chip.partial {
  border-color: #e2c676;
  background: #fff6dd;
  color: #7b4c00;
}

.quality-chip.needs_review {
  border-color: #e0b7bd;
  background: #fbe9ec;
  color: #912a38;
}

.answer-coverage-note {
  margin: 0 0 14px;
  color: #5f6978;
  font-size: 0.86rem;
  line-height: 1.45;
}

.debug-run-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
  color: #235c91;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.frontend-coverage-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.frontend-coverage-role {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid #d2dbe4;
  border-radius: 8px;
  background: #f8fafc;
}

.frontend-coverage-role.present {
  border-color: #c4dacb;
  background: #f0f7f3;
}

.frontend-coverage-role.missing {
  border-color: #e6c477;
  background: #fff8e8;
}

.frontend-coverage-role strong {
  color: #141b2b;
  font-size: 0.82rem;
}

.frontend-coverage-role span {
  color: #667181;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.source-group-list {
  display: grid;
  gap: 16px;
}

.source-group {
  display: grid;
  gap: 8px;
}

.source-group h3 {
  margin: 0;
  color: #273241;
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.source-row small {
  flex: 0 0 auto;
  color: #687182;
}

.prototype-card .answer-text {
  padding: 0;
}

.prototype-card .ask-note {
  margin-top: 16px;
}

@media (max-width: 760px) {
  .prototype-shell {
    margin-top: -10px;
  }

  .app-chrome {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 18px 20px;
  }

  .chrome-actions {
    justify-content: flex-start;
  }

  .prototype-page {
    width: min(100vw - 28px, 720px);
    padding-top: 24px;
  }

  .prototype-hero,
  .card-heading-row,
  .attention-row,
  .source-row,
  .run-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .prototype-hero h1 {
    font-size: 1.72rem;
  }

  .portfolio-table-head {
    display: none;
  }

  .portfolio-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .matter-card-grid {
    grid-template-columns: 1fr;
  }

  .prototype-card,
  .prototype-ask-card {
    padding: 22px 20px;
    border-radius: 18px;
  }
}

@media (min-width: 560px) and (max-width: 980px) {
  .portfolio-hero {
    grid-template-columns: minmax(0, auto) auto;
  }

  .portfolio-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px 36px;
    min-height: 0;
  }

  .matter-title-block {
    grid-column: 1 / -1;
  }

  .attention-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(154px, auto);
  }

  .source-row,
  .run-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .matter-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Prototype fidelity pass for the phase-1 dashboard surface. */
body:has(.prototype-shell) {
  background: #eceef1;
  color: #0a1228;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.42;
}

body:has(.prototype-shell) .shell {
  width: 100%;
  padding: 0;
}

.prototype-shell {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  background: #eceef1;
  color: #0a1228;
}

.app-chrome {
  min-height: 62px;
  padding: 0 24px;
  border-bottom: 1px solid #cfd3db;
  background: #fff;
  box-shadow: none;
}

.brand-lockup {
  gap: 8px;
  color: #10182b;
  font-size: 1.58rem;
  font-weight: 900;
  line-height: 1;
}

.brand-icon {
  width: 22px;
  gap: 2px;
}

.brand-icon i {
  height: 5px;
  border-radius: 8px;
}

.brand-icon i:nth-child(1) {
  width: 8px;
  margin-left: 6px;
  background: #d63d48;
}

.brand-icon i:nth-child(2) {
  width: 16px;
  margin-left: 3px;
  background: #2d8995;
}

.brand-icon i:nth-child(3) {
  width: 22px;
  background: #235f95;
}

.chrome-actions {
  gap: 10px;
  flex-wrap: nowrap;
}

.chrome-org {
  color: #10182b;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}

.chrome-avatar {
  width: 34px;
  height: 34px;
  background: #23639b;
  font-size: 0.82rem;
  font-weight: 800;
}

.chrome-link {
  margin-left: 6px;
  color: #596373;
  font-size: 0.78rem;
  font-weight: 700;
}

.prototype-page {
  width: min(1220px, calc(100vw - 38px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.prototype-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 28px;
}

.portfolio-hero {
  grid-template-columns: minmax(0, auto) auto;
  justify-content: start;
}

.prototype-hero h1 {
  color: #070d22;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.08;
}

.prototype-hero p {
  margin-top: 7px;
  color: #5e6676;
  font-size: 0.95rem;
  line-height: 1.35;
}

.matter-hero p {
  gap: 8px 11px;
}

.matter-hero p span {
  display: inline-flex;
  align-items: center;
}

.matter-hero p span:not(:last-child)::after {
  display: none;
}

.matter-hero p span + span::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 3px;
  height: 3px;
  margin-right: 10px;
  border-radius: 50%;
  background: #969daa;
}

.matter-hero p span:last-child::before {
  display: none;
}

.matter-hero p span:first-child,
.matter-hero p span:last-child,
.count-pill,
.phase-pill {
  min-height: 23px;
  padding: 3px 10px;
  border: 1px solid #cfd3dc;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: #515b6b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.portfolio-hero .count-pill {
  margin-top: 6px;
}

.back-link {
  align-self: center;
  color: #1c283a;
  font-size: 0.92rem;
  font-weight: 500;
}

.back-link::first-letter {
  color: #1c283a;
}

.prototype-ask-card,
.prototype-card,
.portfolio-row {
  border: 1px solid #cfd3dc;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 34px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.08);
}

.prototype-ask-card {
  gap: 12px;
  margin-bottom: 26px;
  padding: 19px 20px 18px;
}

.ask-card-title {
  gap: 10px;
  color: #11182a;
  font-size: 1.06rem;
  font-weight: 600;
}

.traffic-lights {
  gap: 6px;
}

.traffic-lights i {
  width: 8px;
  height: 8px;
}

.traffic-lights i:nth-child(1) {
  background: #df3e49;
}

.traffic-lights i:nth-child(2) {
  background: #62a95f;
}

.traffic-lights i:nth-child(3) {
  background: #23639b;
}

.prototype-input-row {
  min-height: 50px;
  padding: 7px;
  border-color: #c8ced8;
  border-radius: 12px;
  background: #f7f8fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.prototype-input-row input {
  min-height: 34px;
  color: #2a3345;
  font-size: 0.96rem;
}

.prototype-input-row input::placeholder {
  color: #626b7d;
  opacity: 1;
}

.prototype-input-row button {
  border: 1px solid #12324c;
  background: #235f95;
  color: #fff;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.28);
}

.prototype-input-row button {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.prototype-input-row button:hover {
  background: #184a76;
}

.prototype-input-row button:disabled {
  border-color: #7188a0;
  background: #6f8cac;
  box-shadow: none;
  cursor: wait;
}

.ask-note {
  color: #5c6574;
  font-size: 0.79rem;
}

.prototype-ask-card .errorlist {
  margin-top: -3px;
  color: #9a2a38;
  font-size: 0.78rem;
}

.portfolio-table {
  display: block;
}

.portfolio-table-head {
  display: none;
}

.portfolio-rows {
  display: grid;
  gap: 12px;
}

.portfolio-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(120px, 0.72fr) minmax(110px, 0.62fr) minmax(0, 1.15fr);
  gap: 16px 28px;
  align-items: center;
  min-height: 170px;
  padding: 20px 28px;
  color: #11182a;
}

.portfolio-row:hover {
  border-color: #bcc3cf;
  background: #fff;
  box-shadow: 0 16px 30px rgba(16, 24, 40, 0.09), 0 1px 2px rgba(16, 24, 40, 0.08);
  transform: none;
}

.portfolio-row:focus-visible,
.back-link:focus-visible,
.attention-row a:focus-visible,
.run-row:focus-visible,
.prototype-input-row button:focus-visible {
  outline: 2px solid rgba(36, 95, 148, 0.45);
  outline-offset: 3px;
}

.matter-title-block {
  align-self: start;
  padding-top: 1px;
}

.matter-title-block strong {
  color: #10182b;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.18;
}

.matter-title-block small,
.activity-block small {
  color: #5f6878;
  font-size: 0.82rem;
}

.portfolio-card-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.col-lab {
  color: #3f4a5d;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.phase-pill.is-ready,
.status-pill.ready {
  border-color: #d6e5f6;
  background: #e7f0fb;
  color: #154f81;
}

.phase-pill.needs-indexing,
.status-pill.needs-indexing,
.phase-pill.warn {
  border-color: #edcfd3;
  background: #fae6e9;
  color: #a12838;
}

.phase-pill.phase-pleadings {
  border-color: #d9dfe9;
  background: #eef1f6;
  color: #46536b;
}

.phase-pill.phase-discovery {
  border-color: #d6e5f6;
  background: #e7f0fb;
  color: #154f81;
}

.phase-pill.phase-dispositive_motions {
  border-color: #f0ddba;
  background: #fdf3e0;
  color: #8a5a0b;
}

.phase-pill.phase-pretrial {
  border-color: #e0d7f3;
  background: #f1ecfb;
  color: #5b3ea6;
}

.phase-pill.phase-trial {
  border-color: #edcfd3;
  background: #fae6e9;
  color: #a12838;
}

.phase-pill.phase-finished {
  border-color: #cfe6d8;
  background: #e8f5ee;
  color: #2c6e49;
}

.metric-number {
  color: #245f92;
  font-size: 1.34rem;
  font-weight: 400;
  line-height: 1;
}

.activity-block strong {
  color: #11182a;
  font-size: 0.96rem;
  font-weight: 500;
}

.prototype-card {
  padding: 24px 28px;
}

.card-heading-row {
  margin-bottom: 20px;
}

.card-heading-row h2 {
  color: #11182a;
  font-size: 1.12rem;
  font-weight: 500;
}

.card-heading-row p {
  margin-top: 8px;
  color: #9b2736;
  font-size: 0.88rem;
}

.attention-card {
  padding-top: 25px;
}

.attention-row,
.source-row,
.run-row,
.document-list-compact .document-row {
  min-height: 56px;
  padding: 14px 0;
  border-top: 1px solid #dde2e8;
}

.attention-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(154px, auto);
  gap: 18px;
}

.attention-row strong,
.source-row strong,
.run-row strong,
.document-row strong {
  color: #11182a;
  font-size: 1rem;
  font-weight: 500;
}

.attention-row span,
.source-row span,
.run-row small,
.document-row span {
  color: #687182;
  font-size: 0.82rem;
}

.attention-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 20px;
  border: 1px solid #244f67;
  border-radius: 999px;
  background: #fff;
  color: #244f67;
  box-shadow: none;
  font-size: 0.86rem;
  font-weight: 700;
}

.attention-row a:hover {
  background: #f5fafc;
}

.matter-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.overview-card {
  grid-column: auto;
}

.overview-card p {
  color: #2d3546;
  font-size: 0.98rem;
}

.big-metric {
  color: #11182a;
  font-size: 2.55rem;
  font-weight: 400;
  letter-spacing: 0;
}

.spend-card .muted,
.muted {
  color: #667080;
}

.coverage-meter {
  height: 10px;
  border-radius: 999px;
  background: #dce7f0;
}

.coverage-meter i {
  height: 10px;
  background: #245f92;
}

.document-list-compact,
.source-list-compact {
  display: grid;
}

.run-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.source-row small,
.run-row i {
  color: #667080;
  font-size: 0.82rem;
  font-style: normal;
}

.answer-card .answer-text,
.source-card .source-list-compact {
  color: #273246;
}

.prototype-card .answer-text {
  padding: 0;
}

@media (max-width: 980px) {
  .portfolio-row {
    grid-template-columns: 1fr 1fr;
    min-height: 0;
  }

  .matter-title-block {
    grid-column: 1 / -1;
  }

  .matter-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-chrome {
    flex-direction: row;
    align-items: center;
    min-height: 62px;
    padding: 0 20px;
  }

  .chrome-link {
    display: none;
  }

  .prototype-page {
    width: min(100vw - 38px, 720px);
    padding-top: 28px;
  }

  .prototype-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .prototype-hero h1 {
    font-size: 1.72rem;
  }

  .portfolio-row,
  .attention-row,
  .source-row,
  .run-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 560px) and (max-width: 980px) {
  .portfolio-hero {
    grid-template-columns: minmax(0, auto) auto;
  }

  .matter-hero {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .back-link {
    justify-self: end;
    margin-top: 78px;
  }

  .portfolio-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 15px 36px;
    min-height: 0;
  }

  .matter-title-block {
    grid-column: 1 / -1;
  }
}

@media (min-width: 560px) and (max-width: 980px) {
  .attention-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(154px, auto) !important;
  }

  .source-row,
  .run-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .matter-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .card-heading-row {
    align-items: flex-start !important;
    flex-direction: row !important;
  }
}

/* Prototype fidelity pass 2: tighter desktop/narrow visual match. */
body:has(.prototype-shell) {
  background: #eceef2;
  color: #091127;
}

.prototype-shell {
  background: #eceef2;
}

.app-chrome {
  min-height: 62px;
  padding: 0 22px;
}

.brand-lockup {
  gap: 7px;
  font-size: 1.5rem;
  transform: translateY(1px);
}

.brand-icon {
  width: 21px;
  gap: 2px;
}

.brand-icon i {
  height: 4px;
}

.brand-icon i:nth-child(1) {
  width: 7px;
  margin-left: 6px;
}

.brand-icon i:nth-child(2) {
  width: 15px;
  margin-left: 3px;
}

.brand-icon i:nth-child(3) {
  width: 21px;
}

.chrome-actions {
  gap: 9px;
}

.chrome-org {
  font-size: 0.91rem;
  transform: translateY(-1px);
}

.chrome-avatar {
  width: 34px;
  height: 34px;
}

.chrome-link {
  display: none;
}

.prototype-page {
  padding-top: 26px;
}

.prototype-hero {
  gap: 16px;
  margin-bottom: 28px;
}

.prototype-hero h1 {
  font-size: 1.92rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.matter-hero h1 {
  font-size: 1.82rem;
}

.prototype-hero p {
  margin-top: 7px;
  font-size: 0.94rem;
}

.matter-hero p {
  gap: 7px 10px;
}

.matter-hero p span:first-child,
.matter-hero p span:last-child,
.count-pill,
.phase-pill {
  min-height: 22px;
  padding: 3px 9px;
  font-size: 0.68rem;
  letter-spacing: 0.055em;
}

.back-link {
  font-size: 0.91rem;
}

.prototype-ask-card,
.prototype-card,
.portfolio-row {
  border-color: #d0d5de;
  box-shadow: 0 14px 28px rgba(16, 24, 40, 0.075), 0 1px 2px rgba(16, 24, 40, 0.07);
}

.prototype-ask-card {
  gap: 11px;
  margin-bottom: 26px;
  padding: 18px 20px 17px;
}

.ask-card-title {
  gap: 9px;
  font-size: 1rem;
  font-weight: 600;
}

.traffic-lights {
  gap: 5px;
}

.traffic-lights i {
  width: 7px;
  height: 7px;
}

.prototype-input-row {
  grid-template-columns: minmax(0, 1fr) 36px;
  min-height: 49px;
  padding: 6px;
  border-color: #c9cfd9;
  background: #f8f9fb;
}

.prototype-input-row input {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.94rem;
}

.prototype-input-row button {
  width: 34px;
  height: 34px;
  border-color: #153b5f;
  border-radius: 8px;
  background: #245f94;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
  font-size: 1.08rem;
}

.ask-note {
  font-size: 0.78rem;
}

.prototype-card {
  padding: 23px 28px;
}

.card-heading-row {
  margin-bottom: 18px;
}

.card-heading-row h2 {
  font-size: 1.08rem;
  font-weight: 500;
}

.card-heading-row p {
  margin-top: 7px;
  color: #9a2a38;
  font-size: 0.86rem;
}

.attention-card {
  padding-top: 23px;
}

.attention-row,
.source-row,
.run-row,
.document-list-compact .document-row {
  min-height: 52px;
  padding: 12px 0;
  border-top-color: #dde1e7;
}

.attention-row {
  grid-template-columns: minmax(0, 1.35fr) 126px 174px;
  gap: 18px;
}

.attention-row strong,
.source-row strong,
.run-row strong,
.document-row strong {
  font-size: 0.98rem;
}

.attention-row span,
.source-row span,
.run-row small,
.document-row span {
  font-size: 0.8rem;
}

.attention-row > .phase-pill {
  justify-self: center;
}

.attention-row a {
  min-height: 31px;
  width: 174px;
  padding: 6px 16px;
  font-size: 0.83rem;
}

.matter-card-grid {
  gap: 22px;
  margin-top: 6px;
}

.matter-card-grid .prototype-card {
  min-height: 210px;
}

.matter-card-grid .card-heading-row {
  margin-bottom: 16px;
}

.matter-card-grid .card-heading-row h2 {
  font-size: 1.04rem;
  line-height: 1.2;
}

.overview-card p {
  font-size: 0.96rem;
  line-height: 1.45;
}

.overview-card .phase-pill {
  max-width: none;
  white-space: nowrap;
}

.big-metric {
  font-size: 2.42rem;
  margin-top: 4px;
}

.spend-card .muted {
  margin: 7px 0 17px;
  color: #566071;
  font-size: 0.92rem;
}

.coverage-meter,
.coverage-meter i {
  height: 9px;
}

.document-list-compact .document-row {
  padding: 12px 0;
}

.document-row strong,
.run-row strong {
  font-size: 0.94rem;
}

.run-row:hover {
  background: transparent;
}

.question-card .run-row:hover strong {
  color: #245f94;
}

.document-row strong {
  font-weight: 500;
  line-height: 1.22;
}

.document-row span {
  color: #6b7483;
  font-size: 0.78rem;
  line-height: 1.25;
}

.question-card .run-row {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) auto !important;
  min-height: 0;
  padding: 10px 0;
}

.question-card .run-row strong {
  max-width: none;
  font-size: 0.9rem;
  line-height: 1.25;
}

.question-card .run-row small {
  margin-top: 5px;
  font-size: 0.78rem;
}

.question-card .run-row .status {
  justify-self: start;
  margin-top: 2px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #315f54;
  font-size: 0.62rem;
  letter-spacing: 0.055em;
}

.portfolio-row {
  gap: 14px 27px;
  min-height: 164px;
  padding: 19px 28px;
}

.matter-title-block strong {
  font-size: 1.06rem;
}

.matter-title-block small,
.activity-block small {
  font-size: 0.8rem;
}

.portfolio-card-field {
  gap: 6px;
}

.col-lab {
  color: #424c5e;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.metric-number {
  color: #245f94;
  font-size: 1.28rem;
}

.activity-block strong {
  font-size: 0.94rem;
}

@media (min-width: 560px) and (max-width: 980px) {
  .prototype-page {
    width: min(100vw - 38px, 720px);
  }

  .matter-hero {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .back-link {
    justify-self: end;
    margin-top: 74px;
  }

  .portfolio-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 13px 34px;
  }

  .attention-row {
    grid-template-columns: minmax(0, 1.35fr) 126px 174px !important;
  }

  .matter-card-grid {
    gap: 22px !important;
  }
}

/* Prototype fidelity pass 3: secondary states and lower-surface polish. */
.prototype-shell {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.prototype-page {
  max-width: 1220px;
}

.brand-lockup:hover,
.back-link:hover {
  color: #0d1427;
  text-decoration: none;
}

.chrome-avatar {
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

.prototype-hero h1 {
  text-wrap: balance;
}

.matter-hero p {
  max-width: 760px;
}

.matter-hero p span:nth-child(2) {
  color: #525c6c;
}

.prototype-ask-card:focus-within {
  border-color: #b6c2d0;
  box-shadow: 0 16px 32px rgba(16, 24, 40, 0.09), 0 0 0 3px rgba(36, 95, 148, 0.08);
}

.prototype-input-row:focus-within {
  border-color: #9fb3c7;
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 0 0 2px rgba(36, 95, 148, 0.12);
}

.prototype-input-row button:active,
.attention-row a:active {
  transform: translateY(1px);
}

.prototype-card {
  overflow: hidden;
}

.attention-card .card-heading-row {
  padding-bottom: 2px;
}

.attention-row:first-of-type {
  border-top-color: #d9dee6;
}

.attention-row div {
  align-content: start;
}

.attention-row strong {
  line-height: 1.18;
}

.attention-row span:not(.phase-pill) {
  line-height: 1.35;
}

.attention-row .phase-pill {
  align-self: center;
}

.attention-row a {
  align-self: center;
}

.answer-card,
.source-card {
  margin-bottom: 22px;
}

.answer-card .prose {
  color: #202a3c;
  font-size: 0.94rem;
  line-height: 1.5;
}

.answer-card .prose h1,
.answer-card .prose h2,
.answer-card .prose h3 {
  color: #10182b;
  font-size: 1rem;
  font-weight: 500;
}

.answer-card .prose p,
.answer-card .prose ul,
.answer-card .prose ol {
  margin-bottom: 11px;
}

.source-card .source-row {
  min-height: 0;
  padding: 12px 0;
}

.source-card .source-row strong {
  font-size: 0.9rem;
  line-height: 1.22;
}

.source-card .source-row span {
  display: -webkit-box;
  overflow: hidden;
  color: #596474;
  font-size: 0.76rem;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.source-card .source-row small {
  align-self: start;
  min-width: 44px;
  color: #596474;
  font-size: 0.8rem;
  text-align: right;
}

.matter-card-grid .prototype-card {
  display: flex;
  flex-direction: column;
}

.document-card,
.question-card {
  min-height: 500px;
}

.document-list-compact,
.question-card {
  min-width: 0;
}

.document-row,
.run-row {
  scroll-margin-top: 78px;
}

.document-row:last-child,
.question-card .run-row:last-child,
.source-row:last-child {
  padding-bottom: 0;
}

.document-row strong,
.question-card .run-row strong {
  overflow-wrap: anywhere;
}

.question-card .run-row .status.completed {
  color: #315f54;
}

.question-card .run-row:hover .status.completed {
  color: #174d7c;
}

.portfolio-row {
  position: relative;
}

.portfolio-hero + .prototype-ask-card {
  gap: 7px;
  padding: 14px 20px 13px;
}

.portfolio-hero + .prototype-ask-card .prototype-input-row {
  min-height: 45px;
}

.portfolio-hero + .prototype-ask-card .prototype-input-row button {
  width: 32px;
  height: 32px;
}

.portfolio-hero + .prototype-ask-card .ask-note {
  font-size: 0.76rem;
}

.portfolio-row::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.portfolio-row:hover .matter-title-block strong {
  color: #0c3760;
}

.empty-state.prototype-card {
  display: grid;
  gap: 7px;
  min-height: 150px;
  align-content: center;
}

.empty-state.prototype-card strong {
  color: #11182a;
  font-size: 1.05rem;
  font-weight: 500;
}

.empty-state.prototype-card p {
  margin: 0;
  color: #687182;
  font-size: 0.86rem;
}

.phase-pill,
.count-pill,
.status-pill {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.coverage-meter {
  box-shadow: inset 0 1px 1px rgba(16, 24, 40, 0.04);
}

@media (min-width: 981px) {
  .portfolio-row {
    min-height: 116px;
  }

  .matter-title-block {
    align-self: center;
  }

  .matter-card-grid {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
  }

  .attention-row {
    grid-template-columns: minmax(0, 1fr) 148px 184px;
  }

  .attention-row a {
    width: 184px;
  }
}

@media (max-width: 680px) {
  .chrome-org {
    max-width: 34vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .matter-hero p span:nth-child(2) {
    max-width: 100%;
  }
}

.portfolio-answer,
.answer-card,
.source-card {
  animation: prototype-card-in 140ms ease-out;
}

@keyframes prototype-card-in {
  from {
    opacity: 0.9;
    transform: translateY(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.answer-card .prose,
.source-card,
.portfolio-row,
.attention-row {
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-answer,
  .answer-card,
  .source-card {
    animation: none;
  }

  .prototype-input-row button:active,
  .attention-row a:active {
    transform: none;
  }
}

/* Answer page: dedicated answer route, citation chips, and cited-document panel. */
.answer-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.answer-question-label {
  margin: 0 0 6px;
  color: #5f6878;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.answer-hero .answer-question {
  font-size: 1.6rem;
  line-height: 1.25;
}

.answer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.answer-layout.panel-open {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
}

.answer-main {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.citation-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 3px;
  padding: 0 6px;
  border: 1px solid #d6e5f6;
  border-radius: 999px;
  background: #e7f0fb;
  color: #154f81;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  vertical-align: baseline;
  cursor: pointer;
}

.citation-chip:first-child {
  margin-left: 0;
}

.citation-chip:hover {
  border-color: #9fc2e4;
  background: #d9e9f9;
  text-decoration: none;
}

.citation-chip.is-static {
  cursor: default;
}

.citation-chip.is-static:hover {
  border-color: #d6e5f6;
  background: #e7f0fb;
}

.source-doc-list {
  display: grid;
  gap: 10px;
}

.source-doc-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid #d8dde5;
  border-radius: 12px;
  background: #fbfcfe;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.source-doc-row:hover {
  border-color: #9fc2e4;
  background: #f2f7fc;
}

.source-doc-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.source-doc-main strong {
  color: #11182a;
  font-size: 0.95rem;
  font-weight: 600;
}

.source-doc-main small {
  color: #687182;
  font-size: 0.78rem;
}

.source-doc-cites {
  display: inline-flex;
  flex-shrink: 0;
  gap: 5px;
}

.doc-panel {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 20px 22px;
  border: 1px solid #d0d5de;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(16, 24, 40, 0.075), 0 1px 2px rgba(16, 24, 40, 0.07);
}

.doc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.doc-panel-kicker {
  color: #5f6878;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.doc-panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d8dde5;
  border-radius: 50%;
  background: #fff;
  color: #46536b;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.doc-panel-close:hover {
  border-color: #b9c1ce;
  color: #11182a;
}

.doc-panel-group h2 {
  margin: 0;
  color: #11182a;
  font-size: 1.08rem;
  font-weight: 600;
}

.doc-panel-file {
  margin: 4px 0 16px;
  color: #687182;
  font-size: 0.78rem;
}

.doc-excerpt {
  padding: 13px 14px;
  border: 1px solid #e3e7ed;
  border-radius: 12px;
  background: #fbfcfe;
}

.doc-excerpt + .doc-excerpt {
  margin-top: 10px;
}

.doc-excerpt header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.doc-excerpt header small {
  color: #687182;
  font-size: 0.76rem;
}

.doc-excerpt p {
  margin: 0;
  color: #273246;
  font-size: 0.88rem;
  line-height: 1.55;
}

.doc-excerpt.is-active {
  border-color: #9fc2e4;
  background: #eef5fc;
  box-shadow: 0 0 0 3px rgba(36, 95, 148, 0.12);
}

@media (max-width: 980px) {
  .answer-layout.panel-open {
    grid-template-columns: minmax(0, 1fr);
  }

  .answer-layout.panel-open .doc-panel {
    position: fixed;
    inset: auto 12px 12px 12px;
    z-index: 40;
    max-height: 60vh;
  }

  .answer-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .answer-hero .back-link {
    order: -1;
  }
}

/* Matter page boxes: phase stepper, deadlines, budget, attorneys, motions, documents. */
.attention-review-form {
  display: contents;
}

.attention-review-form button,
.summarize-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 20px;
  border: 1px solid #244f67;
  border-radius: 999px;
  background: #fff;
  color: #244f67;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.attention-review-form button:hover,
.summarize-form button:hover {
  background: #f2f7fc;
}

.phase-stepper {
  display: flex;
  gap: 0;
  margin: 4px 0 18px;
  padding: 0;
  list-style: none;
}

.phase-step {
  position: relative;
  flex: 1;
  min-width: 0;
  padding-top: 22px;
  text-align: center;
}

.phase-step i {
  position: absolute;
  top: 4px;
  left: 50%;
  z-index: 1;
  width: 14px;
  height: 14px;
  border: 2px solid #c6cdd8;
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
}

.phase-step::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 50%;
  left: -50%;
  height: 2px;
  background: #dde2e8;
}

.phase-step:first-child::before {
  display: none;
}

.phase-step.is-complete i {
  border-color: #245f92;
  background: #245f92;
}

.phase-step.is-complete::before,
.phase-step.is-current::before {
  background: #245f92;
}

.phase-step.is-current i {
  border-color: #245f92;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(36, 95, 148, 0.18);
}

.phase-step span {
  display: block;
  overflow: hidden;
  padding: 0 4px;
  color: #687182;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phase-step.is-current span {
  color: #154f81;
  font-weight: 800;
}

.phase-step.is-complete span {
  color: #3f4a5d;
}

.deadline-list,
.attorney-list {
  display: grid;
}

.deadline-row,
.attorney-row {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 56px;
  padding: 12px 0;
  border-top: 1px solid #dde2e8;
}

.deadline-row:first-child,
.attorney-row:first-child {
  border-top: 0;
}

.deadline-date {
  display: grid;
  flex: 0 0 auto;
  gap: 1px;
  min-width: 52px;
  padding: 7px 10px;
  border: 1px solid #d6e5f6;
  border-radius: 10px;
  background: #eef5fc;
  text-align: center;
}

.deadline-date strong {
  color: #154f81;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.1;
}

.deadline-date small {
  color: #5f6878;
  font-size: 0.68rem;
}

.deadline-main,
.attorney-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.deadline-main strong,
.attorney-main strong {
  color: #11182a;
  font-size: 0.95rem;
  font-weight: 550;
}

.deadline-main small,
.attorney-main small {
  color: #687182;
  font-size: 0.8rem;
  text-transform: capitalize;
}

.attorney-main small {
  text-transform: none;
}

.attorney-avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #245f92;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
}

.document-row-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.document-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.summarize-form {
  flex: 0 0 auto;
}

.summarize-form button {
  min-height: 28px;
  padding: 5px 14px;
  font-size: 0.78rem;
}

.document-summary {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #d6e5f6;
  color: #3f4a5d;
  font-size: 0.85rem;
  line-height: 1.5;
  background: #f7fafd;
  border-radius: 0 8px 8px 0;
}

@media (max-width: 680px) {
  .phase-step span {
    display: none;
  }

  .phase-step.is-current span {
    display: block;
    white-space: normal;
  }

  .document-row-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Documents card: type filter and show-all expander for high document counts. */
.document-filter-row {
  margin-bottom: 12px;
}

.document-filter-row select {
  width: 100%;
  max-width: 220px;
  padding: 7px 10px;
  border: 1px solid #d8dde5;
  border-radius: 8px;
  background: #fff;
  color: #273246;
  font: inherit;
  font-size: 0.86rem;
}

.show-all-docs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  margin-top: 12px;
  padding: 8px 16px;
  border: 1px dashed #c6cdd8;
  border-radius: 10px;
  background: #fbfcfe;
  color: #244f67;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
}

.show-all-docs:hover {
  border-color: #9fc2e4;
  background: #f2f7fc;
}
