:root {
  --bg: #f3f5f8;
  --shell: rgba(255, 255, 255, 0.72);
  --paper: rgba(255, 255, 255, 0.7);
  --paper-strong: rgba(255, 255, 255, 0.88);
  --ink: #111318;
  --muted: #667085;
  --line: rgba(15, 23, 42, 0.08);
  --accent: #0a84ff;
  --accent-strong: #0066cc;
  --accent-soft: rgba(10, 132, 255, 0.12);
  --warm: #ff9f0a;
  --warm-soft: rgba(255, 159, 10, 0.14);
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
  --glass: saturate(180%) blur(28px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "SF Pro Display",
    "Helvetica Neue",
    sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(10, 132, 255, 0.16), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(90, 200, 250, 0.18), transparent 24%),
    radial-gradient(circle at 80% 80%, rgba(255, 159, 10, 0.1), transparent 22%),
    linear-gradient(180deg, #eef3f8 0%, #e8edf4 100%);
}

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

code {
  font-family: "SF Mono", "Menlo", "Monaco", monospace;
}

.shell {
  width: min(1480px, calc(100vw - 24px));
  margin: 16px auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  overflow: clip;
}

.sidebar,
.panel,
.hero-copy,
.hero-side-card,
.topbar-card,
.stat-card,
.editor-card,
.sidebar-card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}

.sidebar {
  position: sticky;
  top: 12px;
  align-self: start;
  min-height: calc(100vh - 24px);
  border-radius: 32px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 249, 252, 0.66)),
    var(--paper);
}

.brand h1,
.workspace h2,
.workspace h3,
.workspace h4 {
  margin: 0;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "Helvetica Neue",
    sans-serif;
  letter-spacing: -0.03em;
}

.brand h1 {
  font-size: 2.35rem;
  line-height: 0.94;
  max-width: 9ch;
  font-weight: 700;
}

.brand-copy {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 10px;
  color: rgba(0, 102, 204, 0.78);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-button {
  width: 100%;
  border: 1px solid rgba(15, 108, 102, 0.14);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  padding: 14px 16px;
  border-radius: 20px;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-button:hover,
.nav-button.active {
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.16), rgba(255, 255, 255, 0.7));
  border-color: rgba(10, 132, 255, 0.2);
  color: var(--accent-strong);
}

.sidebar-card {
  margin-top: auto;
  border-radius: 22px;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.status-pill,
.chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.sidebar-meta,
.sidebar-status,
.detail,
.hero-text,
.topbar-note,
.stack-subtle,
td,
th {
  color: var(--muted);
}

.sidebar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ghost-button,
.action-button,
.table-row-button {
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  transition: 0.2s ease;
}

.ghost-button {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent-strong);
}

.ghost-button:hover {
  background: rgba(10, 132, 255, 0.08);
}

.action-button {
  border: 0;
  background: linear-gradient(180deg, #1b8cff 0%, #007aff 100%);
  color: white;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(10, 132, 255, 0.24);
}

.action-button:hover {
  background: var(--accent-strong);
}

.table-row-button {
  border: 0;
  background: rgba(15, 108, 102, 0.12);
  color: var(--accent-strong);
  font-weight: 700;
  padding: 8px 12px;
}

.table-row-button:hover {
  background: rgba(15, 108, 102, 0.2);
}

.workspace {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(170px, 0.42fr) minmax(280px, 1fr) minmax(210px, auto);
  align-items: end;
  gap: 16px;
  padding: 14px 4px 2px;
  min-width: 0;
}

.topbar h2 {
  font-size: 2.15rem;
}

.topbar-card {
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.top-search {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.1);
}

.top-search:focus-within {
  border-color: rgba(10, 132, 255, 0.34);
  box-shadow: 0 18px 46px rgba(10, 132, 255, 0.16);
}

.search-icon {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.top-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
}

.top-search button,
.quick-searches button {
  border: 0;
  cursor: pointer;
  font-weight: 700;
}

.top-search button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
}

.view {
  display: none;
  gap: 18px;
  min-width: 0;
}

.view.active {
  display: grid;
}

.search-home {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 34px 18px 18px;
  text-align: center;
}

.search-home h3 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  max-width: 12ch;
}

.quick-searches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 760px;
}

.quick-searches button {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(10, 132, 255, 0.16);
}

.quick-searches button:hover {
  background: rgba(10, 132, 255, 0.1);
}

.search-results-panel {
  box-shadow: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 18px;
  min-width: 0;
}

.hero-copy,
.hero-side-card,
.panel,
.stat-card,
.editor-card {
  border-radius: 30px;
}

.hero-copy {
  padding: 30px;
  position: relative;
  overflow: hidden;
  min-height: 240px;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.16), rgba(90, 200, 250, 0.12));
}

.hero h3 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.98;
  max-width: 10ch;
}

.hero-text {
  margin-top: 16px;
  max-width: 62ch;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.analysis-hero {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 34px;
  border-radius: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.7fr);
  align-items: end;
  gap: 24px;
  color: #f8fbff;
  background:
    radial-gradient(circle at 82% 12%, rgba(90, 200, 250, 0.34), transparent 30%),
    linear-gradient(135deg, #071a2e 0%, #103e65 56%, #0b6ea8 100%);
  box-shadow: 0 28px 70px rgba(5, 38, 67, 0.24);
}

.analysis-hero .eyebrow,
.analysis-hero .hero-text {
  color: rgba(239, 248, 255, 0.72);
}

.analysis-hero h3 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.analysis-source-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(18px);
}

.analysis-source-card p {
  margin: 6px 0 0;
  color: rgba(239, 248, 255, 0.68);
}

.signal-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #32d74b;
  box-shadow: 0 0 0 6px rgba(50, 215, 75, 0.14);
}

.analysis-filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.analysis-filter-actions {
  grid-column: span 4;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.analysis-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.analysis-kpi {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(10, 132, 255, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.analysis-kpi span,
.analysis-kpi small {
  display: block;
  color: var(--muted);
}

.analysis-kpi span {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analysis-kpi strong {
  display: block;
  margin: 12px 0 8px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.055em;
}

.analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(280px, 0.85fr);
  gap: 18px;
  min-width: 0;
}

.analysis-chart-panel,
.analysis-mix-panel {
  min-width: 0;
}

.analysis-chart {
  min-height: 390px;
  overflow-x: auto;
}

.analysis-chart svg {
  display: block;
  width: 100%;
  min-width: 650px;
  height: auto;
}

.chart-grid {
  stroke: rgba(15, 23, 42, 0.09);
  stroke-width: 1;
}

.chart-axis,
.chart-label {
  fill: #667085;
  font-family: "SF Mono", "Menlo", monospace;
  font-size: 11px;
}

.chart-bar {
  fill: url("#analysis-gradient");
  fill: #0a84ff;
  transition: opacity 0.2s ease;
}

.chart-bar:hover {
  opacity: 0.72;
}

.chart-line {
  fill: none;
  stroke: #0a84ff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-point {
  fill: #f8fbff;
  stroke: #0a84ff;
  stroke-width: 4;
}

.stacked-chart {
  display: grid;
  gap: 13px;
  padding: 12px 2px;
}

.stacked-year {
  display: grid;
  grid-template-columns: 52px minmax(240px, 1fr) 52px;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
}

.stacked-year small {
  color: var(--muted);
  text-align: right;
}

.stacked-track {
  height: 20px;
  display: flex;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.06);
}

.stacked-track span {
  min-width: 0;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding-top: 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

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

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.analysis-methodology {
  padding: 18px 22px;
  border-left: 4px solid var(--accent);
  border-radius: 0 18px 18px 0;
  background: rgba(10, 132, 255, 0.07);
}

.analysis-methodology p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-side {
  display: grid;
}

.hero-side-card {
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.hero-side-card h4 {
  font-size: 1.5rem;
}

.stats-grid,
.panel-grid {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.stats-grid {
  grid-template-columns: repeat(4, 1fr);
}

.panel-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.forecast-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
  align-items: start;
}

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

.forecast-input-panel .editor-card {
  gap: 16px;
}

.forecast-output-panel {
  position: sticky;
  top: 20px;
}

.optional-fields {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
}

.optional-fields summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.optional-fields[open] summary {
  margin-bottom: 12px;
}

.stat-card {
  padding: 22px;
  min-height: 150px;
}

.stat-card h3 {
  font-size: 2.2rem;
}

.panel {
  padding: 22px;
  min-width: 0;
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 18px;
  min-width: 0;
}

.section-header > div {
  min-width: 0;
}

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

.list-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(31, 39, 38, 0.08);
  min-width: 0;
  overflow: hidden;
}

.list-row strong {
  color: var(--warm);
  flex: 0 0 auto;
  max-width: 42%;
  text-align: right;
  overflow-wrap: anywhere;
}

.list-meta {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.list-meta span,
.stack-subtle,
.detail,
.topbar-note,
td,
th {
  overflow-wrap: anywhere;
}

.outcome-row {
  display: grid;
  gap: 9px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(31, 39, 38, 0.08);
  min-width: 0;
}

.outcome-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.outcome-row-header strong {
  color: var(--ink);
  font-size: 1rem;
  white-space: nowrap;
}

.outcome-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(102, 112, 133, 0.12);
  color: #475467;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
  text-transform: capitalize;
  overflow-wrap: anywhere;
}

.outcome-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.outcome-fill {
  height: 100%;
  border-radius: inherit;
  background: #8e98a8;
}

.outcome-approved,
.outcome-approved.outcome-fill,
.outcome-approved-with-conditions,
.outcome-approved-with-conditions.outcome-fill {
  background: rgba(52, 199, 89, 0.14);
  color: #187a34;
}

.outcome-approved.outcome-fill {
  background: linear-gradient(90deg, #34c759, #73d98b);
}

.outcome-approved-with-conditions.outcome-fill {
  background: linear-gradient(90deg, #0a84ff, #64d2ff);
}

.outcome-clarification-requested {
  background: rgba(255, 159, 10, 0.16);
  color: #9a5d00;
}

.outcome-clarification-requested.outcome-fill {
  background: linear-gradient(90deg, #ff9f0a, #ffd166);
}

.outcome-deferred {
  background: rgba(175, 82, 222, 0.14);
  color: #7a35a1;
}

.outcome-deferred.outcome-fill {
  background: linear-gradient(90deg, #af52de, #d8a8f0);
}

.outcome-rejected {
  background: rgba(255, 69, 58, 0.13);
  color: #b42318;
}

.outcome-rejected.outcome-fill {
  background: linear-gradient(90deg, #ff453a, #ff8a80);
}

.outcome-unknown {
  background: rgba(102, 112, 133, 0.14);
  color: #475467;
}

.outcome-unknown.outcome-fill {
  background: linear-gradient(90deg, #98a2b3, #c7ced8);
}

.pipeline-steps {
  display: grid;
  gap: 10px;
}

.pipeline-step {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(31, 39, 38, 0.08);
  background: rgba(255, 255, 255, 0.68);
  min-width: 0;
}

.pipeline-step > div {
  min-width: 0;
}

.pipeline-step span {
  font-weight: 800;
}

.pipeline-step strong {
  max-width: 45%;
  color: var(--accent-strong);
  font-size: 0.86rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.pipeline-error {
  border-color: rgba(255, 69, 58, 0.24);
  background: rgba(255, 69, 58, 0.06);
}

.pipeline-error strong {
  color: #b42318;
}

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

.search-result-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 39, 38, 0.08);
  min-width: 0;
}

.search-card-topline,
.search-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.search-card-topline strong {
  color: var(--warm);
  margin-left: auto;
}

.search-card-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.search-card-main h4 {
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.search-card-main p,
.search-card-recommendation {
  margin: 0;
  line-height: 1.55;
}

.search-card-main p {
  color: var(--muted);
}

.search-card-recommendation {
  color: var(--ink);
}

.search-card-footer {
  padding-top: 4px;
}

.search-card-footer a {
  font-weight: 700;
}

.forecast-result-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.56));
  border: 1px solid rgba(31, 39, 38, 0.08);
  min-width: 0;
}

.forecast-result-main {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  min-width: 0;
}

.forecast-result-main strong {
  font-size: 1.8rem;
  color: var(--warm);
  min-width: 0;
  overflow-wrap: anywhere;
}

.forecast-result-main span {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.probability-grid {
  display: grid;
  gap: 10px;
}

.probability-row {
  display: grid;
  grid-template-columns: minmax(135px, 0.75fr) minmax(120px, 1fr) minmax(54px, auto);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.probability-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 108, 102, 0.12);
  overflow: hidden;
}

.probability-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--warm));
}

.table-shell {
  overflow-x: auto;
  max-width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(31, 39, 38, 0.08);
  font-size: 0.94rem;
  overflow-wrap: anywhere;
  word-break: normal;
}

td a,
td code {
  overflow-wrap: anywhere;
}

.cell-id,
.cell-agenda,
.cell-action,
.cell-status,
.cell-confidence,
.cell-accuracy,
.cell-train-size,
.cell-test-size,
.cell-created {
  width: 1%;
  white-space: nowrap;
}

.cell-model-path,
.cell-resolved-pdf-url,
.cell-saved-to,
.cell-notes,
.cell-meeting-title,
.cell-meeting {
  font-size: 0.86rem;
}

th {
  color: var(--ink);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.empty-state {
  padding: 20px;
  border-radius: 18px;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 18px;
  min-width: 0;
}

.compact-grid {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.editor-card {
  padding: 20px;
  display: grid;
  gap: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.workspace-title {
  font-size: 1.3rem;
}

.form-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.form-field span {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid rgba(31, 39, 38, 0.12);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
}

.form-field textarea {
  resize: vertical;
  min-width: 0;
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

  .analysis-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-filter-actions {
    grid-column: span 2;
  }
}

@media (max-width: 980px) {
  .hero,
  .stats-grid,
  .panel-grid.two-up,
  .forecast-workspace,
  .forecast-field-grid,
  .workspace-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .analysis-layout,
  .analysis-hero {
    grid-template-columns: 1fr;
  }

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

  .forecast-output-panel {
    position: static;
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .topbar-card {
    flex-wrap: wrap;
  }

  .top-search {
    grid-template-columns: 1fr;
    border-radius: 22px;
    padding: 14px;
  }

  .top-search button {
    width: 100%;
  }

  .section-header,
  .forecast-result-main,
  .list-row,
  .pipeline-step {
    flex-direction: column;
    align-items: stretch;
  }

  .list-row strong,
  .pipeline-step strong {
    max-width: 100%;
    text-align: left;
  }

  .probability-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 0;
  }

  table {
    min-width: 680px;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100%, calc(100vw - 16px));
    margin: 8px auto;
  }

  .sidebar,
  .panel,
  .hero-copy,
  .hero-side-card,
  .stat-card,
  .editor-card {
    border-radius: 24px;
    background: rgba(250, 252, 255, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .analysis-hero {
    min-height: 0;
    padding: 24px 20px;
    border-radius: 24px;
  }

  .analysis-hero h3 {
    font-size: 2.45rem;
  }

  .analysis-filter-panel,
  .analysis-kpis {
    grid-template-columns: 1fr;
  }

  .analysis-filter-actions {
    grid-column: auto;
    justify-content: stretch;
  }

  .analysis-filter-actions button {
    flex: 1;
  }

  .analysis-chart {
    min-height: 320px;
  }

  .sidebar {
    position: static;
    z-index: 10;
    min-height: 0;
    padding: 14px;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
  }

  .brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
  }

  .brand .eyebrow,
  .brand-copy,
  .sidebar-card,
  .topbar > div:first-child,
  .topbar-card {
    display: none;
  }

  .brand h1 {
    max-width: none;
    font-size: 1.55rem;
    line-height: 1;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    width: 100%;
    min-width: 0;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-button {
    flex: 0 0 auto;
    width: auto;
    padding: 10px 14px;
    border-radius: 999px;
    white-space: nowrap;
  }

  .workspace {
    gap: 12px;
  }

  .topbar {
    padding: 0;
    gap: 0;
  }

  .top-search {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 52px;
    padding: 6px 6px 6px 14px;
    border-radius: 18px;
  }

  .top-search .search-icon {
    display: none;
  }

  .top-search button {
    width: auto;
    min-height: 40px;
  }

  .hero-copy,
  .hero-side-card,
  .panel,
  .stat-card,
  .editor-card {
    padding: 20px;
  }

  .table-shell {
    overflow-x: visible;
    border: 0;
    background: transparent;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tr {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.68);
    overflow: hidden;
  }

  td {
    display: grid;
    grid-template-columns: minmax(96px, 0.38fr) minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(31, 39, 38, 0.06);
  }

  td::before {
    content: attr(data-label);
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  td:last-child {
    border-bottom: 0;
  }

  .cell-id,
  .cell-agenda,
  .cell-action,
  .cell-status,
  .cell-confidence,
  .cell-accuracy,
  .cell-train-size,
  .cell-test-size,
  .cell-created {
    width: 100%;
    white-space: normal;
  }
}
