:root {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-muted: #eef2f1;
  --border: #d9dfdd;
  --text: #20242a;
  --muted: #66716f;
  --positive: #168a5a;
  --positive-soft: #e8f5ee;
  --danger: #c2413f;
  --danger-soft: #fbebea;
  --use: #246fa8;
  --use-soft: #e8f2fb;
  --ink: #343941;
  --ink-soft: #eceff2;
  --warning: #b7791f;
  --focus: #0f6f9f;
  --delight: #10b981;
  --pain: #ef4444;
  --verify: #3b82f6;
  --strategy: #6366f1;
  --listing: #6b7280;
  --shadow: 0 14px 36px rgba(32, 36, 42, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

input:disabled,
select:disabled,
textarea:disabled {
  color: #8a9592;
  background: #f3f6f5;
  cursor: not-allowed;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 16px;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 14px;
  background: #f8fafc;
  box-shadow:
    0 12px 28px rgba(99, 102, 241, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.72) inset;
}

.brand-mark img {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 2px;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.subtitle {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.system-status {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--positive);
}

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

.input-panel,
.results-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.input-panel {
  position: sticky;
  top: 20px;
  padding: 18px;
}

.results-panel {
  padding: 18px;
}

.panel-heading,
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-heading h2,
.results-toolbar h2 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.2;
}

.limit-pill {
  flex: 0 0 auto;
  min-width: 96px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.limit-pill.is-warning {
  background: #fff4df;
  color: var(--warning);
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.mode-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.mode-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.mode-button::after {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  z-index: 5;
  width: max-content;
  max-width: min(260px, 82vw);
  padding: 7px 9px;
  border: 1px solid rgba(36, 41, 50, 0.1);
  border-radius: 8px;
  background: #242932;
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(32, 36, 42, 0.18);
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.mode-button::before {
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  z-index: 6;
  width: 10px;
  height: 10px;
  background: #242932;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px) rotate(45deg);
  transition: opacity 140ms ease, transform 140ms ease;
}

.mode-button:hover::after,
.mode-button:focus-visible::after,
.mode-button:hover::before,
.mode-button:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mode-button:hover::before,
.mode-button:focus-visible::before {
  transform: translate(-50%, 0) rotate(45deg);
}

.mode-button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 5px rgba(32, 36, 42, 0.08);
}

.category-field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.category-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.category-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  background: #fbfcfc;
  color: var(--text);
  font: inherit;
  font-weight: 750;
}

.category-field select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(15, 111, 159, 0.14);
}

textarea {
  display: block;
  width: 100%;
  min-height: 480px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  background: #fbfcfc;
  color: var(--text);
  line-height: 1.55;
}

textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(15, 111, 159, 0.14);
}

textarea::placeholder {
  color: #8a9592;
}

.legacy-input {
  display: none;
}

.listing-editor {
  display: grid;
  gap: 12px;
  min-height: 480px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfc;
}

.optional-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.listing-field {
  position: relative;
  display: grid;
  gap: 7px;
}

.listing-field span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.listing-input {
  min-height: 44px;
  padding: 10px 54px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
}

.listing-input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(15, 111, 159, 0.14);
}

.listing-bullets {
  min-height: 260px;
  padding-right: 54px;
  background: var(--surface);
}

.listing-field em,
.review-char-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: #8a9592;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.review-char-count {
  bottom: 14px;
}

.review-editor {
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfc;
}

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

.review-row {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

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

.review-index {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.review-required-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
}

.review-required-badge.is-optional {
  background: var(--surface-muted);
  color: var(--muted);
}

.review-input {
  min-height: 118px;
  resize: vertical;
  padding: 11px 54px 28px 12px;
  background: #fbfcfc;
}

.text-input {
  min-height: 480px;
}

.input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
}

.truncate-notice {
  color: var(--warning);
  font-weight: 700;
  text-align: right;
}

.action-row {
  display: grid;
  grid-template-columns: 88px 88px 1fr;
  gap: 8px;
}

.button,
.icon-button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 800;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.button:active,
.icon-button:active {
  transform: translateY(1px);
}

.button.primary {
  border-color: var(--strategy);
  background: var(--strategy);
  color: #ffffff;
}

.button.primary:disabled {
  border-color: #9ca3af;
  background: #9ca3af;
  color: #ffffff;
  opacity: 1;
}

.button.secondary {
  background: var(--ink-soft);
  color: var(--ink);
}

.button.ghost {
  background: var(--surface);
  color: var(--muted);
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.text-button {
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.icon-button {
  display: grid;
  width: 42px;
  place-items: center;
  background: var(--surface);
  color: var(--ink);
}

.icon-button:disabled {
  color: #aab3b0;
  background: #f5f7f6;
}

.status-area {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--muted);
  font-weight: 700;
}

.status-area.is-error {
  border-color: #efb7b4;
  background: var(--danger-soft);
  color: var(--danger);
}

.status-area.is-success {
  border-color: #a7d8c2;
  background: var(--positive-soft);
  color: var(--positive);
}

.status-icon {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
}

.status-area.is-loading .status-icon {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(36, 41, 50, 0.18);
  border-top-color: var(--focus);
  background: transparent;
  animation: spin 800ms linear infinite;
}

.history-panel {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfc;
}

.history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.history-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.history-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.history-item:hover {
  border-color: var(--focus);
  background: #f7faf9;
}

.history-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meta-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.meta-strip span {
  min-height: 40px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.meta-strip strong {
  color: var(--text);
}

.report-header-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid #cfe1dc;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(59, 130, 246, 0.08)),
    var(--surface);
}

.report-header-card h3 {
  margin-bottom: 5px;
  font-size: 20px;
  line-height: 1.25;
}

.report-header-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
}

.report-meta {
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
  min-width: 210px;
}

.report-meta span {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(22, 138, 90, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-meta strong {
  color: var(--text);
}

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

.insight-card {
  min-height: 280px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.positive-card {
  border-top: 4px solid var(--delight);
}

.pain-card {
  border-top: 4px solid var(--pain);
}

.use-card {
  border-top: 4px solid var(--verify);
}

.conclusion-card {
  border-top: 4px solid var(--strategy);
}

.listing-card {
  border-top: 4px solid var(--listing);
}

.findings-card {
  border-top: 4px solid var(--positive);
  background: linear-gradient(180deg, rgba(232, 245, 238, 0.68), #ffffff 38%);
}

.disclaimer-card {
  min-height: 180px;
  border-top: 4px solid var(--warning);
  background: #fffdf8;
}

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

.card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.card-token {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink-soft);
  color: var(--ink);
  font-weight: 900;
}

.positive-card .card-token {
  background: var(--delight);
  color: #ffffff;
}

.pain-card .card-token {
  background: var(--pain);
  color: #ffffff;
}

.use-card .card-token {
  background: var(--verify);
  color: #ffffff;
}

.conclusion-card .card-token {
  background: var(--strategy);
  color: #ffffff;
}

.listing-card .card-token {
  background: var(--listing);
  color: #ffffff;
}

.findings-card .card-token {
  background: var(--positive);
  color: #ffffff;
}

.disclaimer-card .card-token {
  background: var(--warning);
  color: #ffffff;
}

.card-heading h3 {
  margin-bottom: 2px;
  font-size: 17px;
  line-height: 1.2;
}

.card-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.empty-list {
  display: grid;
  min-height: 178px;
  place-items: center;
  color: #9ca3af;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f9fafb;
  text-align: center;
  line-height: 1.5;
}

.empty-card,
.loading-card,
.error-card {
  display: grid;
  gap: 6px;
  max-width: 280px;
  place-items: center;
}

.empty-card strong,
.loading-card strong,
.error-card strong {
  color: currentColor;
  font-size: 14px;
}

.empty-card span,
.loading-card span,
.error-card span {
  color: inherit;
  font-size: 13px;
}

.theme-item {
  padding: 11px 0 0;
  border-top: 1px solid var(--border);
}

.theme-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.theme-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.theme-title-row h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.theme-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.theme-item p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.module-row {
  display: grid;
  gap: 8px;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}

.module-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.finding-row {
  padding: 12px;
  border: 1px solid rgba(22, 138, 90, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.finding-row + .finding-row {
  margin-top: 8px;
}

.module-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
  line-height: 1.35;
}

.heat-badge,
.tag-badge,
.confidence-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.confidence-badge {
  background: #eef6ff;
  color: var(--verify);
}

.confidence-line {
  margin-bottom: 0;
  color: #6b5a1c;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.copy-line {
  color: var(--muted);
  line-height: 1.5;
}

.copy-line strong {
  color: currentColor;
}

.positive-card .copy-line strong {
  color: var(--delight);
}

.pain-card .copy-line strong {
  color: var(--pain);
}

.use-card .copy-line strong {
  color: var(--verify);
}

.conclusion-card .copy-line strong {
  color: var(--strategy);
}

.asset-grid {
  display: grid;
  gap: 12px;
}

.sample-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #f0d9a8;
  border-radius: 8px;
  background: #fff8e8;
  color: #7a5418;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.asset-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfc;
}

.asset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.asset-copy {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
}

.copy-asset {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--listing);
  font-size: 12px;
  font-weight: 900;
}

.loading-card {
  min-height: 178px;
  color: var(--muted);
  border-radius: 8px;
  background: linear-gradient(90deg, #f7f9f8, #eef2f1, #f7f9f8);
  background-size: 220% 100%;
  animation: shimmer 1.4s ease infinite;
  text-align: center;
}

.error-card {
  min-height: 178px;
  border: 1px solid #efb7b4;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  text-align: center;
  font-weight: 850;
}

.disclaimer-copy {
  display: grid;
  gap: 12px;
}

.disclaimer-copy p {
  margin-bottom: 0;
  color: #4b5563;
  line-height: 1.6;
}

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

.confidence-guide span {
  padding: 9px 10px;
  border: 1px solid rgba(183, 121, 31, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: #5d6570;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.evidence {
  margin: 0;
  padding: 0;
  list-style: none;
}

.evidence li {
  position: relative;
  margin-top: 5px;
  padding-left: 12px;
  color: #4a5452;
  font-size: 13px;
  line-height: 1.45;
}

.evidence li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.json-panel {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfc;
}

.json-panel summary {
  padding: 12px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.json-panel pre {
  overflow: auto;
  max-height: 280px;
  margin: 0;
  padding: 0 12px 12px;
  color: #313940;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
  padding: 18px 0 4px;
  color: var(--muted);
  text-align: center;
}

.app-footer p {
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 700;
}

.footer-link {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.footer-link:hover {
  color: var(--text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(32, 36, 42, 0.48);
}

.share-dialog {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.share-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.share-dialog img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f9fafb;
}

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

  .input-panel {
    position: static;
  }

  textarea {
    min-height: 320px;
  }

  .review-editor {
    min-height: 320px;
  }

  .review-input {
    min-height: 150px;
  }

  .report-header-card {
    flex-direction: column;
  }

  .report-meta {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 14px;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark,
  .brand-mark img {
    width: 48px;
    height: 48px;
    border-radius: 13px;
  }

  .system-status {
    width: 100%;
    justify-content: center;
  }

  .panel-heading,
  .results-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .limit-pill,
  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .icon-button {
    width: 100%;
  }

  .share-heading .icon-button {
    width: 42px;
    min-width: 42px;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .action-row {
    grid-template-columns: 1fr;
  }

  .meta-strip {
    grid-template-columns: 1fr;
  }

  .confidence-guide {
    grid-template-columns: 1fr;
  }

  .mode-button {
    gap: 5px;
    font-size: 12px;
  }

  .mode-icon {
    width: 15px;
    height: 15px;
  }

  .mode-button::before,
  .mode-button::after {
    display: none;
  }
}
