:root {
  --bg: #f3f7fb;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text: #102038;
  --text-soft: #516276;
  --text-faint: #708398;
  --accent: #0b7be8;
  --accent-soft: rgba(11, 123, 232, 0.12);
  --accent-strong: #0f9d79;
  --danger: #dc4c3d;
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.09);
  --shadow-soft: 0 10px 22px rgba(15, 23, 42, 0.06);
  --cell-size: 24px;
  --msa-font-size: 14px;
  --label-width: 220px;
  --grid-border: rgba(148, 163, 184, 0.22);
  --grid-bg: rgba(255, 255, 255, 0.94);
  --ruler-bg: rgba(248, 250, 252, 0.95);
  --highlight: rgba(11, 123, 232, 0.12);
  --neutral-cell: rgba(148, 163, 184, 0.16);
  --gap-cell: rgba(148, 163, 184, 0.11);
  --acid: #fbb6b0;
  --basic: #b9d7ff;
  --polar: #bdecc7;
  --hydrophobic: #fbe2a0;
  --glycine: #f6c28b;
  --proline: #f3b4d1;
  --cys: #f6eb93;
  --nuc-a: #b8e8bf;
  --nuc-c: #b8d8ff;
  --nuc-g: #f6de92;
  --nuc-tu: #f5b2b2;
  --nuc-other: #d4c1f9;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.msa-page {
  margin: 0;
  color: var(--text);
  font-family: "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 520px at 0% 0%, rgba(11, 123, 232, 0.12), transparent 65%),
    radial-gradient(860px 560px at 100% 100%, rgba(15, 157, 121, 0.11), transparent 62%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 40%, #edf4fb 100%);
}

.ambient-glow {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(20px);
  opacity: 0.9;
}

.ambient-glow-left {
  width: 20rem;
  height: 20rem;
  top: -8rem;
  left: -7rem;
  background: rgba(11, 123, 232, 0.08);
}

.ambient-glow-right {
  width: 18rem;
  height: 18rem;
  right: -7rem;
  bottom: -5rem;
  background: rgba(15, 157, 121, 0.08);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: 95vw;
  max-width: 1880px;
  margin: 0 auto;
  padding: 18px 0 28px;
}

.hero-card,
.panel-card {
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-card {
  display: block;
  padding: 16px 20px;
  border-radius: 28px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 100%;
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-badge,
.hint-pill,
.stat-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.panel-card {
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 16px;
}

.toolbar-row,
.toolbar-main,
.toolbar-side,
.content-grid,
.card-head,
.pill-row,
.import-row,
.hint-row,
.minor-action-row,
.section-bar,
.section-actions,
.meta-row,
.editor-controls,
.analysis-summary-grid,
.analysis-overview,
.analysis-card-grid,
.history-head,
.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toolbar-row,
.section-bar {
  align-items: center;
  justify-content: space-between;
}

.toolbar-main,
.toolbar-side,
.section-actions,
.editor-controls {
  align-items: center;
}

.import-box .hint-row {
  margin-top: 8px;
}

.content-grid {
  display: block;
  margin-top: 14px;
}

.input-card,
.side-card,
.overview-panel,
.table-panel {
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
}

.input-card,
.side-card {
  padding: 16px;
}

.card-head {
  align-items: start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-head h2,
.section-bar h2,
.history-head h3,
.overview-panel h3,
.detail-title {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.card-head p,
.section-bar p,
.history-head p,
.editor-copy span {
  margin: 4px 0 0;
  color: var(--text-faint);
  line-height: 1.55;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.overview-tile,
.summary-card,
.meta-pill {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}

.overview-label,
.summary-card span,
.meta-pill span {
  display: block;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-tile strong,
.summary-card strong,
.meta-pill strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  color: var(--text);
}

.wide-pill {
  min-width: 280px;
  flex: 1 1 320px;
}

.summary-pill {
  min-width: 180px;
  flex: 0 1 240px;
}

.field-label {
  display: block;
  margin: 14px 0 8px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
}


.soft-input,
.soft-textarea,
.inline-number-input,
.inline-text-input {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.soft-input,
.inline-number-input,
.inline-text-input {
  min-height: 44px;
  border-radius: 16px;
  padding: 0 14px;
}

.import-row .soft-input {
  flex: 0 1 620px;
  max-width: 620px;
}

.soft-textarea {
  min-height: 320px;
  border-radius: 20px;
  padding: 14px 16px;
  resize: vertical;
  font-family: "SF Mono", "Cascadia Code", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.58;
}

.soft-input:focus,
.soft-textarea:focus,
.inline-number-input:focus,
.inline-text-input:focus,
.msa-select.open .msa-select-trigger {
  border-color: rgba(11, 123, 232, 0.42);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.inline-number-field,
.inline-text-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px 0 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.inline-number-input {
  width: 74px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 12px;
}

.inline-text-field {
  min-width: auto;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  gap: 6px;
  border-radius: 0;
}

.inline-text-input {
  width: 180px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 13px;
}

.search-field {
  min-width: auto;
}

.search-field .inline-text-input {
  width: 240px;
}

.inline-text-field span {
  white-space: nowrap;
  color: var(--text-soft);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.toggle-btn {
  border: 0;
  border-radius: 16px;
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.small-btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.toolbar-main .primary-btn,
.toolbar-main .secondary-btn,
.toolbar-main .ghost-btn,
.toolbar-main .toggle-btn,
.minor-action-row .primary-btn,
.minor-action-row .secondary-btn,
.minor-action-row .ghost-btn,
.minor-action-row .toggle-btn,
.section-actions .primary-btn,
.section-actions .secondary-btn,
.section-actions .ghost-btn,
.section-actions .toggle-btn {
  height: 44px;
  min-height: 44px;
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background: linear-gradient(135deg, #0f9d79, #14b88d);
  color: #fff;
}

.secondary-btn {
  background: linear-gradient(135deg, #0b7be8, #36a0ff);
  color: #fff;
}

.ghost-btn,
.toggle-btn {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.toggle-btn.is-on {
  background: rgba(11, 123, 232, 0.12);
  border-color: rgba(11, 123, 232, 0.2);
  color: var(--accent);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.toggle-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled,
.toggle-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.message-box {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 90;
  width: min(420px, calc(100vw - 32px));
  min-height: 58px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text-soft);
  line-height: 1.6;
}

.meta-message {
  min-height: 0;
}

.hidden-file-input {
  display: none;
}

.message-box.is-success {
  border-color: rgba(15, 157, 121, 0.24);
  background: rgba(236, 253, 245, 0.94);
  color: #06735b;
}

.message-box.is-error {
  border-color: rgba(220, 76, 61, 0.22);
  background: rgba(254, 242, 242, 0.96);
  color: #b5382f;
}

.empty-panel,
.empty-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.42);
  background: rgba(255, 255, 255, 0.58);
  color: var(--text-faint);
  text-align: center;
}

.empty-panel {
  min-height: 220px;
  padding: 18px;
  line-height: 1.7;
}

.compact-empty {
  min-height: 140px;
  margin-top: 16px;
}

.empty-mini {
  min-height: 90px;
  padding: 12px;
}

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

.history-item {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
}

.history-title {
  font-size: 14px;
  font-weight: 800;
}

.history-meta,
.history-snippet {
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.55;
}

.history-snippet {
  margin-top: 8px;
  font-family: "SF Mono", "Cascadia Code", "Consolas", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-card {
  width: min(880px, 96vw);
  max-height: min(80vh, 900px);
  overflow: auto;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.modal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.modal-head h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.modal-head p {
  margin: 4px 0 0;
  color: var(--text-faint);
  line-height: 1.55;
}

.msa-select {
  position: relative;
}

.compact-select {
  min-width: 200px;
}

.msa-select-trigger {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.msa-select-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msa-select-caret {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--text-faint);
  transition: transform 0.18s ease;
}

.msa-select.open .msa-select-caret {
  transform: rotate(180deg);
}

.msa-select-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.msa-select.open .msa-select-menu {
  display: block;
}

.msa-select-item {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.msa-select-item:hover {
  background: rgba(11, 123, 232, 0.08);
}

.msa-select-item.is-selected {
  background: rgba(11, 123, 232, 0.14);
  color: var(--accent);
  font-weight: 800;
}

.editor-panel {
  margin: 12px 0 14px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
}

.result-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  margin-bottom: 18px;
}

.result-tool-row .primary-btn,
.result-tool-row .secondary-btn,
.result-tool-row .ghost-btn,
.result-tool-row .toggle-btn,
.result-tool-row .small-btn {
  height: 40px;
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.result-tool-row .inline-text-input {
  min-height: 40px;
}

.editor-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 12px;
}

.editor-copy strong {
  font-size: 15px;
}

.alignment-shell {
  margin-top: 14px;
}

.alignment-viewport {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
}

.alignment-content {
  width: max-content;
  min-width: 100%;
}

.alignment-viewport::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.alignment-viewport::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(11, 123, 232, 0.26);
  border-radius: 999px;
}

.msa-row {
  display: flex;
  width: max-content;
  min-width: 100%;
}

.msa-row-spaced {
  margin-bottom: 12px;
}

.msa-label {
  position: sticky;
  left: 0;
  z-index: 6;
  width: var(--label-width);
  min-width: var(--label-width);
  max-width: var(--label-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 10px;
  border-right: 1px solid var(--grid-border);
  border-bottom: 1px solid var(--grid-border);
  background: var(--grid-bg);
  overflow: hidden;
}

.msa-label-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.msa-label-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.msa-label-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: fit-content;
  white-space: nowrap;
}

.msa-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(11, 123, 232, 0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.kind-badge-protein {
  background: rgba(245, 158, 11, 0.12);
  color: #b26a00;
}

.kind-badge-nucleotide {
  background: rgba(15, 157, 121, 0.12);
  color: #0a7a5f;
}

.kind-badge-mixed {
  background: rgba(148, 163, 184, 0.18);
  color: #5d6e82;
}

.msa-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
}

.msa-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 2px;
  border-radius: 999px;
  background: rgba(11, 123, 232, 0.22);
}

.msa-track {
  display: flex;
}

.msa-cell,
.msa-ruler-cell,
.msa-tail-cell {
  width: var(--cell-size);
  min-width: var(--cell-size);
  height: var(--cell-size);
  min-height: var(--cell-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--grid-border);
  border-bottom: 1px solid var(--grid-border);
  font-family: "SF Mono", "Cascadia Code", "Consolas", monospace;
  font-size: var(--msa-font-size);
  line-height: 1;
  color: var(--text);
  user-select: none;
}

.msa-ruler-cell,
.msa-tail-cell {
  background: var(--ruler-bg);
}

.msa-tail-cell {
  position: sticky;
  right: 0;
  z-index: 5;
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  font-size: 12px;
}

.msa-tail-checkbox {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

.col-highlight {
  background-image: linear-gradient(var(--highlight), var(--highlight));
}

.search-hit {
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.92);
}

.res-neutral { background: var(--neutral-cell); }
.res-gap { background: var(--gap-cell); color: #64748b; }
.res-acid { background: var(--acid); }
.res-basic { background: var(--basic); }
.res-polar { background: var(--polar); }
.res-hydrophobic { background: var(--hydrophobic); }
.res-glycine { background: var(--glycine); }
.res-proline { background: var(--proline); }
.res-cys { background: var(--cys); }
.res-nuc-a { background: var(--nuc-a); }
.res-nuc-c { background: var(--nuc-c); }
.res-nuc-g { background: var(--nuc-g); }
.res-nuc-tu { background: var(--nuc-tu); }
.res-nuc-other { background: var(--nuc-other); }

.consensus-strong { box-shadow: inset 0 -3px 0 rgba(15, 157, 121, 0.86); }
.consensus-medium { box-shadow: inset 0 -3px 0 rgba(245, 158, 11, 0.82); }
.consensus-weak { box-shadow: inset 0 -3px 0 rgba(220, 76, 61, 0.76); }

.analysis-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.analysis-headline {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f5f5f7;
  color: #515154;
  font-size: 13px;
  line-height: 1.5;
}
.analysis-headline strong { color: #1d1d1f; }
.analysis-headline-note { color: #6e6e73; }
.analysis-headline.warning { background: #fff7ed; }
.analysis-headline.warning .analysis-headline-note { color: #9a5b13; }
.analysis-headline.positive { background: #eef7ff; }
.analysis-headline.positive .analysis-headline-note { color: #2563a8; }
.tree-panel { padding: 18px; border-radius: 18px; background: #fbfbfd; }
.tree-panel .detail-title { margin: 0; }
.tree-head p { margin: 5px 0 0; color: #86868b; font-size: 12px; }
.phylo-tree { margin-top: 14px; overflow-x: auto; min-height: 120px; padding: 12px; border-radius: 12px; background: #fff; }
.phylo-tree svg { display: block; width: 100%; min-width: 520px; height: auto; }
.phylo-tree line { stroke: #6b7280; stroke-width: 1.8; stroke-linecap: round; }
.phylo-tree .tree-label { fill: #1d1d1f; font: 12px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.phylo-tree .tree-axis { stroke: #0071e3; stroke-width: 1.2; }
.phylo-tree .tree-scale { fill: #86868b; font: 10px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

.analysis-layout {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.overview-panel,
.table-panel {
  padding: 14px;
}

.analysis-overview {
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.analysis-tip {
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-soft);
  line-height: 1.65;
}

.table-scroll {
  overflow: auto;
}

.analysis-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.analysis-table th,
.analysis-table td {
  padding: 11px 12px;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.analysis-table th {
  background: rgba(248, 250, 252, 0.96);
  color: var(--text-soft);
  font-weight: 800;
}

.analysis-table tr > *:last-child {
  border-right: 0;
}

.analysis-table tr:last-child > * {
  border-bottom: 0;
}

.analysis-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.analysis-card {
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
}

.analysis-card h4 {
  margin: 0;
  font-size: 18px;
}

.analysis-card p {
  margin: 8px 0 0;
  color: var(--text-faint);
}

.analysis-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.analysis-mini-tile {
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.88);
}

.analysis-mini-tile span {
  display: block;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analysis-mini-tile strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  color: var(--text);
}

.analysis-subsection {
  margin-top: 12px;
}

.analysis-subsection h5 {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.analysis-subsection ul {
  margin: 0;
  padding-left: 18px;
}

.history-note-box {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.history-note-input {
  width: 100%;
  min-height: 74px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
  resize: vertical;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.history-note-input:focus {
  outline: none;
  border-color: rgba(11, 123, 232, 0.42);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.collapsed-panel {
  display: none !important;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(11, 123, 232, 0.08);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.analysis-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.62;
}

.analysis-card li + li {
  margin-top: 4px;
}

body.is-resizing {
  cursor: col-resize;
}

body.is-resizing * {
  user-select: none;
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .analysis-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: 96vw;
    padding-top: 12px;
  }

  .hero-card {
    padding: 16px;
  }

  .panel-card {
    padding: 14px;
  }

  .toolbar-main,
  .toolbar-side,
  .section-actions,
  .editor-controls {
    width: 100%;
  }

  .compact-select,
  .msa-select {
    width: 100%;
  }

  .inline-text-field,
  .search-field {
    width: 100%;
  }

  .analysis-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Practical analysis presentation */
.analysis-summary-grid {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.summary-card {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e5e5ea;
}
.summary-card span { color: #86868b; font-size: 11px; letter-spacing: .06em; }
.summary-card strong { margin-top: 8px; color: #1d1d1f; font-size: 22px; letter-spacing: -.03em; }
.analysis-layout { display: grid; gap: 16px; }
.overview-panel { padding: 18px; }
.overview-panel h3 { margin: 0 0 12px; font-size: 17px; }
.analysis-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.analysis-tip {
  position: relative;
  padding: 12px 14px 12px 38px;
  border-radius: 12px;
  background: #f5f5f7;
  color: #515154;
  font-size: 13px;
  line-height: 1.55;
}
.analysis-tip::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 12px;
  color: #0071e3;
  font-weight: 700;
}
.table-panel { padding: 0; overflow: hidden; }
.table-scroll { max-height: 420px; overflow: auto; }
.analysis-table { font-size: 13px; }
.analysis-table th { position: sticky; top: 0; z-index: 1; background: #f5f5f7; color: #6e6e73; font-size: 11px; letter-spacing: .04em; }
.analysis-table td { color: #515154; padding: 10px 12px; }
.analysis-table tbody tr:hover { background: #f8fbff; }
.analysis-card { padding: 18px; }
.analysis-card h4 { font-size: 16px; }
.analysis-card p { color: #6e6e73; font-size: 13px; }
.analysis-mini-tile { background: #f5f5f7; border: 0; border-radius: 10px; }
.analysis-subsection h5 { color: #1d1d1f; }
@media (max-width: 900px) {
  .analysis-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .analysis-summary-grid, .analysis-overview { grid-template-columns: 1fr 1fr; }
}

/* Match the qPCR tool visual language: blue glass surfaces and pill controls. */
body.msa-page {
  color: #0f172a;
  font-family: "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 800px at -12% -8%, rgba(0, 113, 227, 0.13), transparent 62%),
    radial-gradient(1000px 700px at 108% 104%, rgba(95, 145, 210, 0.14), transparent 60%),
    linear-gradient(160deg, #f8fafc 0%, #eef2f7 48%, #f6f8fb 100%);
}
.ambient-glow { display: block; filter: blur(2px); opacity: 1; }
.ambient-glow-left { width: 30rem; height: 30rem; top: -12rem; left: -8rem; background: radial-gradient(circle at 34% 35%, rgba(0,113,227,.28), transparent); }
.ambient-glow-right { width: 26rem; height: 26rem; right: -8rem; bottom: -7rem; background: radial-gradient(circle at 58% 48%, rgba(116,146,186,.24), transparent); }
.page-shell { width: 90vw; max-width: 1800px; padding: 16px 0 32px; }
.hero-card, .panel-card { background: linear-gradient(165deg, rgba(255,255,255,.9), rgba(255,255,255,.78)); border: 1px solid rgba(255,255,255,.68); border-radius: 28px; box-shadow: 0 28px 80px rgba(15,23,42,.14); backdrop-filter: blur(22px) saturate(145%); }
.hero-card { padding: 20px 24px; margin-bottom: 20px; }
.eyebrow { color: #64748b; letter-spacing: .08em; margin-bottom: 8px; }
.hero-copy h1 { color: #0b1220; font-size: clamp(28px, 3vw, 42px); font-weight: 740; }
.hero-accent { color: #0071e3; }
.hero-text { color: #64748b; font-size: 14px; white-space: normal; }
.panel-card { padding: 20px; margin-bottom: 20px; }
.input-card, .side-card, .overview-panel, .table-panel, .editor-panel { background: linear-gradient(170deg, rgba(255,255,255,.92), rgba(255,255,255,.76)); border-color: rgba(255,255,255,.72); box-shadow: 0 12px 32px rgba(15,23,42,.1); }
.primary-btn, .secondary-btn, .ghost-btn, .toggle-btn { border-radius: 999px; font-weight: 700; }
.primary-btn { background: linear-gradient(135deg, #0071e3, #3e9aff); box-shadow: 0 14px 28px rgba(0,113,227,.28); }
.secondary-btn { background: linear-gradient(135deg, #334155, #64748b); color: #fff; }
.ghost-btn, .toggle-btn { background: rgba(255,255,255,.88); border-color: rgba(15,23,42,.13); color: #0f172a; box-shadow: 0 6px 14px rgba(15,23,42,.08); }
.toggle-btn.is-on { background: rgba(0,113,227,.15); border-color: rgba(0,113,227,.3); color: #0058b0; box-shadow: none; }
.soft-input, .soft-textarea, .inline-number-input, .inline-text-input { border-radius: 15px; background: rgba(255,255,255,.9); border-color: rgba(15,23,42,.12); }
.soft-input:focus, .soft-textarea:focus, .inline-number-input:focus, .inline-text-input:focus { border-color: rgba(0,113,227,.66); box-shadow: 0 0 0 4px rgba(0,113,227,.14); }
.meta-pill, .summary-card, .overview-tile { background: rgba(255,255,255,.86); box-shadow: 0 6px 14px rgba(15,23,42,.06); }
.alignment-viewport { background: rgba(255,255,255,.9); box-shadow: 0 12px 32px rgba(15,23,42,.08); }

/* Apple-inspired visual refresh */
:root {
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --text: #1d1d1f;
  --text-soft: #515154;
  --text-faint: #86868b;
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.11);
  --accent-strong: #0071e3;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.07);
  --shadow-soft: 0 5px 18px rgba(0, 0, 0, 0.045);
}

body.msa-page {
  background: #f5f5f7;
  letter-spacing: -0.01em;
}

.ambient-glow { display: none; }

.page-shell {
  width: min(94vw, 1480px);
  padding: 28px 0 56px;
}

.hero-card,
.panel-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.055);
  backdrop-filter: none;
}

.hero-card {
  padding: clamp(28px, 5vw, 58px) clamp(22px, 6vw, 78px);
  border-radius: 30px;
  margin-bottom: 22px;
  background: #fff;
}

.eyebrow {
  margin-bottom: 18px;
  color: #6e6e73;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.hero-copy h1 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-accent { color: var(--accent); }

.hero-text {
  max-width: 700px;
  margin-top: 20px;
  color: #6e6e73;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.55;
  white-space: normal;
}

.panel-card {
  padding: clamp(16px, 2.4vw, 28px);
  border-radius: 24px;
  margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.92);
}

.input-card, .side-card, .overview-panel, .table-panel {
  border-color: rgba(0, 0, 0, 0.07);
  background: #fbfbfd;
}

.primary-btn, .secondary-btn, .ghost-btn, .toggle-btn,
.msa-select-trigger, .soft-input, .soft-textarea,
.inline-number-field, .meta-pill, .summary-card, .overview-tile {
  border-radius: 12px;
}

.primary-btn { background: #0071e3; }
.secondary-btn { background: #1d1d1f; }
.ghost-btn, .toggle-btn { background: #fff; color: #515154; }
.toggle-btn.is-on { background: #e8f2ff; border-color: #c7e0ff; color: #0071e3; }
.primary-btn:hover, .secondary-btn:hover, .ghost-btn:hover, .toggle-btn:hover { transform: translateY(-1px); filter: none; }

.soft-input, .soft-textarea, .inline-number-input, .inline-text-input { background: #fff; border-color: rgba(0,0,0,.11); }
.soft-textarea { min-height: 280px; }
.meta-pill, .summary-card, .overview-tile { box-shadow: none; background: #fff; }
.meta-pill strong, .summary-card strong, .overview-tile strong { font-variant-numeric: tabular-nums; }
.alignment-viewport { border-radius: 14px; background: #fff; }
.editor-panel { border-radius: 14px; background: #f5f5f7; }

@media (max-width: 720px) {
  .page-shell { width: calc(100vw - 24px); padding-top: 12px; }
  .hero-card { padding: 28px 22px; border-radius: 22px; }
  .hero-copy h1 { font-size: 42px; }
  .hero-text { font-size: 15px; }
  .panel-card { border-radius: 18px; }
}

/* Final sizing adjustments */
.page-shell { width: 95%; max-width: 1800px; }
.hero-card { padding: 20px 24px; min-height: 0; }
.hero-copy h1 { font-size: clamp(28px, 3vw, 42px); line-height: 1.08; }
.eyebrow { margin-bottom: 8px; }
.hero-text { margin-top: 10px; font-size: 14px; line-height: 1.5; }

/* Flatten nested controls in the editor toolbar. */
.editor-panel {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.72);
  box-shadow: none;
}
.editor-copy { margin-bottom: 8px; }
.editor-controls { gap: 8px; }
.editor-controls .inline-number-field,
.editor-controls .inline-text-field {
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: #475467;
}
.editor-controls .inline-number-input,
.editor-controls .inline-text-input {
  width: 76px;
  min-height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}
.editor-controls .ghost-btn,
.editor-controls .secondary-btn { box-shadow: 0 5px 12px rgba(15, 23, 42, 0.07); }

/* Make row-selection checkboxes easy to spot in the alignment matrix. */
.msa-tail-cell {
  background: rgba(248, 250, 252, 0.98);
  box-shadow: -4px 0 10px rgba(15, 23, 42, 0.06);
}
.msa-tail-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 2px solid #64748b;
  border-radius: 4px;
  background: #fff;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.msa-tail-checkbox::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform .12s ease;
}
.msa-tail-checkbox:checked {
  background: #0071e3;
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, .16);
}
.msa-tail-checkbox:checked::before { transform: rotate(-45deg) scale(1); }
.msa-tail-checkbox:focus-visible { outline: 3px solid rgba(0, 113, 227, .25); outline-offset: 2px; }
.msa-label + .msa-tail-cell {
  position: static;
  right: auto;
  z-index: 1;
  box-shadow: none;
}

/* Refined qPCR-style button hierarchy. */
.primary-btn, .secondary-btn, .ghost-btn, .toggle-btn {
  min-height: 38px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  border: 1px solid transparent;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.08);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #0071e3, #3e9aff);
  border-color: rgba(0, 113, 227, .25);
  box-shadow: 0 9px 18px rgba(0, 113, 227, .24);
}
.secondary-btn {
  color: #0759a4;
  background: linear-gradient(180deg, #eef7ff, #e2f0ff);
  border-color: #c7e0fb;
  box-shadow: 0 5px 12px rgba(0, 113, 227, .09);
}
.ghost-btn {
  color: #334155;
  background: rgba(255, 255, 255, .72);
  border-color: rgba(15, 23, 42, .12);
  box-shadow: 0 4px 10px rgba(15, 23, 42, .06);
}
.toggle-btn {
  color: #64748b;
  background: rgba(241, 245, 249, .82);
  border-color: rgba(148, 163, 184, .22);
  box-shadow: none;
}
.toggle-btn.is-on {
  color: #0759a4;
  background: #e5f2ff;
  border-color: #b8d8ff;
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, .06);
}
.primary-btn:hover, .secondary-btn:hover, .ghost-btn:hover, .toggle-btn:hover {
  transform: translateY(-1px);
  filter: none;
}
.primary-btn:hover { box-shadow: 0 12px 22px rgba(0, 113, 227, .3); }
.secondary-btn:hover { background: linear-gradient(180deg, #e5f3ff, #d8ebff); }
.ghost-btn:hover { border-color: rgba(0, 113, 227, .28); color: #0759a4; background: #fff; }
.small-btn { min-height: 34px; height: 34px; padding: 0 12px; font-size: 12px; }
.toolbar-main .primary-btn, .toolbar-main .secondary-btn, .toolbar-main .ghost-btn { min-height: 38px; height: 38px; }

/* Keep controls rounded, but closer to the compact qPCR cards than full pills. */
.primary-btn, .secondary-btn, .ghost-btn, .toggle-btn { border-radius: 10px; }
.small-btn { border-radius: 9px; }

/* Flat surface pass: reduce visual noise from stacked shadows and borders. */
.hero-card, .panel-card, .input-card, .side-card, .overview-panel, .table-panel,
.editor-panel, .analysis-card, .overview-tile, .summary-card, .meta-pill,
.alignment-viewport, .modal-card {
  box-shadow: none;
  border-color: rgba(15, 23, 42, .08);
}
.hero-card, .panel-card { background: rgba(255, 255, 255, .86); }
.input-card, .side-card, .overview-panel, .table-panel, .analysis-card { background: rgba(255, 255, 255, .62); }
.alignment-viewport { background: rgba(255, 255, 255, .78); }
.primary-btn, .secondary-btn, .ghost-btn, .toggle-btn,
.editor-controls .ghost-btn, .editor-controls .secondary-btn {
  box-shadow: none;
}
.primary-btn:hover, .secondary-btn:hover, .ghost-btn:hover, .toggle-btn:hover {
  box-shadow: none;
}
.soft-input, .soft-textarea, .inline-number-input, .inline-text-input,
.history-note-input, .msa-select-trigger {
  box-shadow: none;
  border-color: rgba(15, 23, 42, .12);
}
.meta-pill, .summary-card, .overview-tile { background: rgba(255, 255, 255, .72); }

/* Final clean design system */
:root {
  --bg: #f5f5f7;
  --text: #1d1d1f;
  --text-soft: #6e6e73;
  --text-faint: #86868b;
  --accent: #0071e3;
  --accent-soft: #eaf3ff;
  --border: #d2d2d7;
  --shadow: none;
  --shadow-soft: none;
}
body.msa-page {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.ambient-glow { display: none; }
.page-shell { width: 95%; max-width: 1700px; padding: 18px 0 36px; }
.hero-card, .panel-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: none;
  backdrop-filter: none;
}
.hero-card { padding: 22px 26px; margin-bottom: 14px; }
.eyebrow { margin: 0 0 8px; color: var(--text-faint); font-size: 11px; letter-spacing: .1em; }
.hero-copy h1 { color: var(--text); font-size: clamp(26px, 3vw, 40px); line-height: 1.1; letter-spacing: -.035em; }
.hero-text { max-width: 760px; margin-top: 8px; color: var(--text-soft); font-size: 14px; line-height: 1.5; }
.panel-card { padding: 16px; margin-bottom: 14px; }
.input-card, .side-card, .overview-panel, .table-panel, .analysis-card, .editor-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: none;
}
.input-card, .side-card { padding: 14px; }
.card-head h2, .section-bar h2 { font-size: 18px; font-weight: 650; }
.card-head p, .section-bar p { color: var(--text-faint); font-size: 12px; }
.primary-btn, .secondary-btn, .ghost-btn, .toggle-btn { border-radius: 8px; box-shadow: none; }
.primary-btn { background: var(--accent); border-color: var(--accent); }
.secondary-btn { color: #1d1d1f; background: #f5f5f7; border-color: var(--border); }
.ghost-btn, .toggle-btn { color: #515154; background: #fff; border-color: var(--border); }
.toggle-btn.is-on { color: #0058b0; background: var(--accent-soft); border-color: #b8d8ff; }
.primary-btn:hover { background: #0077ed; }
.secondary-btn:hover, .ghost-btn:hover, .toggle-btn:hover { background: #f5f5f7; border-color: #a1a1a6; }
.soft-input, .soft-textarea, .inline-number-input, .inline-text-input, .history-note-input, .msa-select-trigger {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.soft-input:focus, .soft-textarea:focus, .inline-number-input:focus, .inline-text-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,.12); }
.hint-pill, .stat-pill, .metric-chip { background: #f5f5f7; border-color: var(--border); color: var(--text-soft); }
.meta-pill, .summary-card, .overview-tile { background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: none; }
.alignment-viewport { border: 1px solid var(--border); border-radius: 10px; box-shadow: none; background: #fff; }
.editor-panel { padding: 12px; background: #f5f5f7; }

/* Apple-inspired finish: hierarchy through spacing and tone, not borders. */
body.msa-page { background: #f5f5f7; }
.page-shell { width: 95%; max-width: none; padding: 28px 0 64px; }
.hero-card, .panel-card {
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.035), 0 18px 48px rgba(0,0,0,.045);
}
.hero-card { padding: 44px 52px; margin-bottom: 20px; }
.eyebrow { color: #86868b; font-size: 11px; letter-spacing: .14em; }
.hero-copy h1 { font-size: clamp(34px, 5vw, 62px); font-weight: 700; letter-spacing: -.055em; }
.hero-text { max-width: 660px; margin-top: 16px; color: #6e6e73; font-size: 17px; line-height: 1.5; }
.panel-card { padding: 24px; margin-bottom: 20px; }
.input-card, .side-card, .overview-panel, .table-panel, .analysis-card, .editor-panel {
  border: 0;
  border-radius: 18px;
  background: #fbfbfd;
  box-shadow: none;
}
.input-card, .side-card { padding: 20px; }
.card-head h2, .section-bar h2 { font-size: 21px; font-weight: 650; letter-spacing: -.025em; }
.card-head p, .section-bar p { font-size: 13px; color: #86868b; }
.primary-btn, .secondary-btn, .ghost-btn, .toggle-btn { border: 0; border-radius: 999px; box-shadow: none; }
.primary-btn { background: #0071e3; color: #fff; }
.secondary-btn { background: #1d1d1f; color: #fff; }
.ghost-btn, .toggle-btn { background: #f5f5f7; color: #1d1d1f; }
.toggle-btn.is-on { background: #e8f2ff; color: #0071e3; }
.primary-btn:hover { background: #0077ed; }
.secondary-btn:hover { background: #424245; }
.ghost-btn:hover, .toggle-btn:hover { background: #e8e8ed; }
.soft-input, .soft-textarea, .inline-number-input, .inline-text-input, .history-note-input, .msa-select-trigger {
  border: 0;
  border-radius: 12px;
  background: #f5f5f7;
}
.soft-input:focus, .soft-textarea:focus, .inline-number-input:focus, .inline-text-input:focus { box-shadow: 0 0 0 3px rgba(0,113,227,.18); }
.meta-pill, .summary-card, .overview-tile { border: 0; border-radius: 16px; background: #f5f5f7; }
.alignment-viewport { border: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.editor-panel { background: #f5f5f7; }
@media (max-width: 720px) {
  .page-shell { width: calc(100% - 24px); padding-top: 12px; }
  .hero-card { padding: 30px 24px; border-radius: 20px; }
  .panel-card { padding: 16px; border-radius: 18px; }
  .hero-copy h1 { font-size: 40px; }
  .hero-text { font-size: 15px; }
}

/* Compact workspace density. */
.page-shell { padding-top: 10px; padding-bottom: 24px; }
.hero-card { padding: 14px 20px; margin-bottom: 12px; border-radius: 20px; }
.eyebrow { margin-bottom: 4px; font-size: 11px; }
.hero-copy h1 { font-size: clamp(24px, 2.6vw, 36px); }
.hero-text { margin-top: 6px; font-size: 13px; line-height: 1.35; }
.panel-card { padding: 14px; margin-bottom: 12px; border-radius: 18px; }
.toolbar-row, .toolbar-main, .toolbar-side, .section-actions, .editor-controls { gap: 7px; }
.content-grid { margin-top: 10px; }
.input-card, .side-card { padding: 12px; }
.card-head { margin-bottom: 8px; }
.card-head h2, .section-bar h2 { font-size: 18px; }
.card-head p, .section-bar p { margin-top: 2px; font-size: 12px; }
.field-label { margin: 9px 0 5px; font-size: 13px; }
.soft-textarea { min-height: 220px; }
.result-tool-row { margin-top: 8px; margin-bottom: 10px; gap: 6px; }
.meta-row { gap: 6px; }
.meta-pill, .summary-card, .overview-tile { padding: 9px 11px; border-radius: 14px; }
.meta-pill strong, .summary-card strong, .overview-tile strong { margin-top: 3px; font-size: 16px; }
.analysis-summary-grid { gap: 8px; }
