:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-muted: #f0f4f3;
  --line: #d8e0de;
  --text: #172033;
  --muted: #667085;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --success: #15803d;
  --warning: #b45309;
  --danger: #dc2626;
  --shadow: 0 12px 32px rgba(23, 32, 51, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

body {
  background:
    linear-gradient(180deg, #eef4f2 0px, #f7f8fa 360px, #f6f7f9 100%);
  margin: 0;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-header {
  align-items: center;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1240px;
  padding: 38px 24px 24px;
}

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

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

h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  margin-bottom: 12px;
  max-width: 760px;
}

h2 {
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 0;
}

h3 {
  font-size: 16px;
  margin-bottom: 18px;
}

.header-copy {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 18px;
  max-width: 680px;
}

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

.ghost-inline-button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-weight: 800;
  min-height: 44px;
  padding: 10px 14px;
}

.hero-showcase {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(300px, 380px) minmax(190px, 220px);
}

.refined-showcase {
  flex: 0 0 auto;
  min-width: 560px;
}

.report-sheet-preview,
.clean-recipe-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(23, 32, 51, 0.08);
}

.report-sheet-preview {
  min-height: 232px;
  padding: 20px;
  position: relative;
}

.report-sheet-preview::after {
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.12), rgba(15, 118, 110, 0));
  border-radius: 8px;
  content: "";
  height: 78px;
  inset: auto 12px 12px;
  pointer-events: none;
  position: absolute;
}

.sheet-header,
.sheet-main-number {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.sheet-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.sheet-header span,
.sheet-main-number span,
.clean-recipe-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sheet-header strong {
  background: #fff7ed;
  border-radius: 999px;
  color: var(--warning);
  font-size: 12px;
  padding: 6px 10px;
}

.sheet-main-number {
  align-items: flex-end;
  margin: 22px 0 18px;
}

.sheet-main-number strong {
  color: var(--accent-dark);
  display: block;
  font-size: 34px;
  line-height: 1;
}

.sheet-main-number small {
  color: var(--muted);
  display: block;
  font-weight: 800;
  margin-top: 6px;
}

.sheet-lines {
  display: grid;
  gap: 10px;
  max-width: 260px;
}

.sheet-lines i {
  background: #e7eeec;
  border-radius: 999px;
  display: block;
  height: 10px;
  overflow: hidden;
}

.sheet-lines i::after {
  animation: fillBar 1s ease-out both;
  background: var(--accent);
  border-radius: inherit;
  content: "";
  display: block;
  height: 100%;
  width: var(--w);
}

.sample-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 16px 0 0;
  max-width: 300px;
  position: relative;
  z-index: 1;
}

.hero-side-stack {
  display: grid;
  gap: 14px;
  grid-template-rows: 1fr 1fr;
}

.clean-recipe-card {
  padding: 16px;
}

.clean-recipe-card strong {
  display: block;
  font-size: 17px;
  margin: 8px 0 6px;
}

.clean-recipe-card small {
  color: var(--muted);
  display: block;
  line-height: 1.45;
}

.compact-trust-card {
  background: #f8fbfa;
}

.nav-title {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.nav-title strong,
.nav-title span {
  display: block;
}

.nav-title strong {
  font-size: 15px;
}

.nav-title span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 4px;
}

.mini-dashboard {
  background: #12201e;
  border: 1px solid #233a36;
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(23, 32, 51, 0.18);
  color: white;
  min-height: 220px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.mini-dashboard::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  content: "";
  height: 100%;
  left: -80%;
  position: absolute;
  top: 0;
  transform: skewX(-18deg);
  width: 50%;
  animation: sheen 4.8s ease-in-out infinite;
}

.mini-topline {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.mini-topline span {
  color: #a8bbb7;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-topline strong {
  color: #8af3cf;
  font-size: 22px;
}

.animated-chart {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, 1fr);
  height: 92px;
  margin: 20px 0 14px;
  position: relative;
  z-index: 1;
}

.animated-chart span {
  animation: barGrow 1.5s ease-out both;
  animation-delay: calc(var(--h) * 0.01s);
  background: #8af3cf;
  border-radius: 5px 5px 0 0;
  height: var(--h);
  min-height: 18px;
}

.risk-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.risk-strip span {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.risk-good {
  background: rgba(21, 128, 61, 0.22);
  color: #b9f6ca;
}

.risk-watch {
  background: rgba(217, 119, 6, 0.22);
  color: #fed7aa;
}

.recipe-card-mini {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 12px;
  position: relative;
  z-index: 1;
}

.recipe-card-mini span,
.recipe-card-mini strong {
  display: block;
}

.recipe-card-mini span {
  color: #c9d8d5;
  font-size: 12px;
}

.recipe-card-mini strong {
  color: white;
  margin-top: 4px;
}

.price-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 170px;
  padding: 18px;
}

.price-box span,
.price-box small {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.price-box strong {
  display: block;
  font-size: 32px;
  line-height: 1.1;
  margin: 4px 0;
}

.preview-band {
  align-items: center;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  margin-bottom: 18px;
  overflow: hidden;
  padding: 20px;
}

.preview-copy p:last-child {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.value-section {
  margin-bottom: 18px;
}

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

.value-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.value-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 9px;
}

.value-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 0;
}

.report-preview-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 35px rgba(23, 32, 51, 0.08);
  padding: 16px;
}

.report-preview-head,
.preview-score {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.report-preview-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-preview-head strong {
  background: #fff7ed;
  border-radius: 999px;
  color: var(--warning);
  font-size: 12px;
  padding: 6px 10px;
}

.preview-score {
  border-bottom: 1px solid var(--line);
  margin: 16px 0;
  padding-bottom: 14px;
}

.preview-score span,
.preview-score small {
  color: var(--muted);
}

.preview-score strong {
  color: var(--accent-dark);
  font-size: 28px;
}

.cost-bars {
  display: grid;
  gap: 10px;
}

.cost-bars div {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 54px minmax(0, 1fr) 52px;
}

.cost-bars span,
.cost-bars em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.cost-bars b {
  background: #dbe7e4;
  border-radius: 999px;
  display: block;
  height: 9px;
  overflow: hidden;
  position: relative;
}

.cost-bars b::after {
  animation: fillBar 1.2s ease-out both;
  background: var(--accent);
  border-radius: inherit;
  content: "";
  display: block;
  height: 100%;
  width: var(--w);
}

.app-shell {
  display: grid;
  gap: 20px;
  grid-template-columns: 280px minmax(0, 1fr);
  margin: 0 auto 40px;
  max-width: 1240px;
  padding: 0 24px;
}

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

.side-panel {
  align-self: start;
  padding: 18px;
  position: sticky;
  top: 16px;
}

.brand-card {
  align-items: center;
  background: var(--surface-muted);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  padding: 12px;
}

.brand-mark {
  align-items: center;
  background: var(--accent);
  border-radius: 6px;
  color: white;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.brand-card strong,
.brand-card span {
  display: block;
}

.brand-card span:last-child {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.tool-tabs {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.tab-button,
.secondary-button,
.ghost-button,
.primary-button {
  border-radius: 7px;
  min-height: 44px;
  padding: 10px 14px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tab-button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  text-align: left;
}

.tab-button:hover,
.tab-button.active {
  background: #e8f3f1;
  border-color: #cfe5e1;
  color: var(--accent-dark);
}

.primary-button {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: white;
  font-weight: 800;
}

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

.secondary-button,
.ghost-button {
  width: 100%;
}

.secondary-button {
  background: var(--text);
  border: 1px solid var(--text);
  color: white;
  font-weight: 800;
  margin-bottom: 8px;
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.content-panel {
  min-height: 720px;
  overflow: hidden;
}

.tool-section {
  display: none;
  padding: 28px;
}

.tool-section.active {
  display: block;
}

.section-heading,
.report-toolbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.compact-heading {
  margin-bottom: 16px;
}

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

.metric-card,
.input-card,
.result-card,
.notice-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-card {
  min-height: 128px;
  padding: 18px;
}

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

.metric-card strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  margin: 12px 0 8px;
  overflow-wrap: anywhere;
}

.status-good strong {
  color: var(--success);
}

.status-watch strong {
  color: var(--warning);
}

.status-danger strong {
  color: var(--danger);
}

.instant-results {
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 18px;
  padding: 20px;
}

.result-card-spaced {
  margin-top: 14px;
}

.progress-pill {
  background: #e8f3f1;
  border: 1px solid #cfe5e1;
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 850;
  padding: 8px 12px;
  white-space: nowrap;
}

.diagnosis-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.diagnosis-card {
  display: grid;
  gap: 18px;
}

.diagnosis-progress {
  background: #dbe7e4;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.diagnosis-progress span {
  background: var(--accent);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 0.2s ease;
  width: 0%;
}

.diagnosis-group-head,
.diagnosis-nav {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.diagnosis-group-head h3 {
  margin-bottom: 0;
}

.diagnosis-group-head small {
  color: var(--muted);
  font-weight: 800;
}

.diagnosis-questions {
  display: grid;
  gap: 12px;
}

.diagnosis-question {
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.diagnosis-question label {
  margin-bottom: 0;
}

.diagnosis-question-title {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 9px;
}

.diagnosis-question-title strong {
  line-height: 1.45;
}

.diagnosis-question-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.diagnosis-options {
  display: grid;
  gap: 8px;
}

.diagnosis-options label {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  margin-bottom: 0;
  padding: 10px;
}

.diagnosis-options input {
  min-height: auto;
  width: auto;
}

.diagnosis-summary-card {
  align-self: start;
  position: sticky;
  top: 16px;
}

.diagnosis-mini-list {
  background: #f8fbfa;
  border-radius: 7px;
  margin: 16px 0;
  padding: 12px;
}

.diagnosis-mini-list strong {
  display: block;
  margin-bottom: 8px;
}

.diagnosis-mini-list ol,
.report-diagnosis-grid ol {
  line-height: 1.65;
  margin: 0;
  padding-left: 20px;
}

.diagnosis-report-summary {
  margin-top: 12px;
}

.report-diagnosis-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.report-diagnosis-grid h4,
.knowledge-card h4 {
  font-size: 14px;
  margin: 0 0 10px;
}

.knowledge-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.knowledge-card {
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.knowledge-card p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 8px;
}

.knowledge-card p:last-child {
  margin-bottom: 0;
}

.improvement-box {
  background: #eef8f5;
  border: 1px solid #cfe5e1;
  border-radius: 8px;
  margin-top: 18px;
  padding: 14px;
}

.improvement-box span {
  color: var(--accent-dark);
  display: block;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 6px;
}

.improvement-box p {
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0;
}

.action-list {
  line-height: 1.7;
  margin-bottom: 0;
  padding-left: 24px;
}

.notice-row {
  align-items: center;
  background: #f8fbfa;
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  padding: 18px;
}

.notice-row p {
  color: var(--muted);
  margin-bottom: 0;
}

.menu-guide {
  margin-bottom: 16px;
  margin-top: 0;
}

.ingredient-card {
  margin-bottom: 16px;
}

.card-title-row,
.ingredient-total {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.card-title-row p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 0;
}

.ingredient-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 16px;
  overflow: hidden;
}

.ingredient-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 1.4fr 0.9fr 0.9fr 0.75fr 0.9fr 0.9fr 42px;
  padding: 10px;
}

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

.ingredient-head {
  background: #f0f4f3;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ingredient-row input,
.ingredient-row select {
  min-height: 38px;
}

.ingredient-cost {
  font-weight: 850;
  overflow-wrap: anywhere;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--danger);
  display: inline-flex;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.ingredient-total {
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
  padding: 14px;
}

.ingredient-total span {
  color: var(--muted);
}

.ingredient-total strong {
  font-size: 24px;
}

.secondary-inline {
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: 7px;
  color: white;
  font-weight: 800;
  min-height: 40px;
  padding: 9px 12px;
}

.form-grid,
.two-column {
  display: grid;
  gap: 16px;
}

.form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

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

.input-card,
.result-card {
  padding: 20px;
}

label {
  color: var(--text);
  display: grid;
  font-size: 13px;
  font-weight: 750;
  gap: 7px;
  margin-bottom: 14px;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

input,
select {
  background: #fff;
  border: 1px solid #cfd8dc;
  border-radius: 7px;
  color: var(--text);
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
  outline: none;
}

.result-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.result-list div,
.ratio-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
}

.result-list dt,
.ratio-row span:first-child {
  color: var(--muted);
}

.result-list dd {
  font-weight: 850;
  margin: 0;
}

.card-note {
  background: #f8fbfa;
  border-radius: 7px;
  color: var(--muted);
  line-height: 1.55;
  margin: 18px 0 0;
  padding: 12px;
}

.big-result {
  color: var(--accent-dark);
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 900;
  line-height: 1;
  margin: 22px 0 10px;
}

.report-page {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 auto;
  max-width: 900px;
  padding: 34px;
}

.report-header {
  align-items: flex-start;
  border-bottom: 2px solid var(--text);
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 20px;
}

.report-header p {
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 8px;
}

.report-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 24px;
}

.report-summary div {
  background: #f7f8fa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
}

.report-summary span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
}

.report-summary strong {
  font-size: 24px;
}

.report-block {
  margin-top: 24px;
}

.report-chart-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.report-chart-card {
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.report-chart-card h4 {
  font-size: 14px;
  margin: 0 0 14px;
}

.report-pie-chart {
  min-height: 230px;
}

.pie-chart-wrap {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(150px, 190px) 1fr;
}

.pie-svg {
  display: block;
  height: auto;
  max-width: 190px;
  width: 100%;
}

.pie-center-label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.pie-center-value {
  fill: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.pie-legend {
  display: grid;
  gap: 8px;
}

.pie-legend-row {
  align-items: center;
  border-bottom: 1px solid rgba(34, 51, 51, 0.08);
  display: grid;
  gap: 8px;
  grid-template-columns: 10px minmax(58px, 1fr) 54px minmax(74px, auto);
  padding-bottom: 8px;
}

.pie-legend-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.pie-legend-row strong {
  color: var(--text);
  font-size: 13px;
  text-align: right;
}

.pie-legend-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-align: right;
}

.pie-dot {
  border-radius: 999px;
  display: block;
  height: 10px;
  width: 10px;
}

.chart-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.ratio-table {
  border-top: 1px solid var(--line);
}

.ratio-pill {
  border-radius: 999px;
  color: white;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  min-width: 58px;
  padding: 5px 9px;
  text-align: center;
}

.pill-good {
  background: var(--success);
}

.pill-watch {
  background: var(--warning);
}

.pill-danger {
  background: var(--danger);
}

@keyframes barGrow {
  from {
    height: 12px;
    opacity: 0.4;
  }
  to {
    height: var(--h);
    opacity: 1;
  }
}

@keyframes fillBar {
  from {
    width: 0;
  }
  to {
    width: var(--w);
  }
}

@keyframes sheen {
  0%,
  55% {
    left: -80%;
  }
  100% {
    left: 130%;
  }
}

#actionList {
  line-height: 1.7;
  margin-bottom: 0;
  padding-left: 24px;
}

.report-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 28px;
  padding-top: 16px;
}

@media (max-width: 960px) {
  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-showcase {
    grid-template-columns: 1fr;
  }

  .refined-showcase {
    min-width: 0;
  }

  .hero-side-stack {
    grid-template-columns: 1fr 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .tool-tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .tab-button {
    text-align: center;
  }

  .metrics-grid,
  .value-grid,
  .form-grid,
  .two-column,
  .diagnosis-layout,
  .report-diagnosis-grid {
    grid-template-columns: 1fr 1fr;
  }

  .diagnosis-summary-card {
    position: static;
  }
}

@media (max-width: 680px) {
  .app-header,
  .app-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .app-header {
    padding-top: 24px;
  }

  h1 {
    font-size: 34px;
  }

  .report-sheet-preview {
    min-height: 0;
    padding: 16px;
  }

  .sample-note {
    display: none;
  }

  .tool-section {
    padding: 18px;
  }

  .section-heading,
  .notice-row,
  .report-toolbar,
  .report-header {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions,
  .preview-score {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-side-stack {
    grid-template-columns: 1fr;
  }

  .sheet-main-number {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .preview-band {
    grid-template-columns: 1fr;
  }

  .cost-bars div {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }

  .tool-tabs,
  .metrics-grid,
  .value-grid,
  .form-grid,
  .two-column,
  .diagnosis-layout,
  .report-diagnosis-grid,
  .report-chart-grid,
  .report-summary {
    grid-template-columns: 1fr;
  }

  .pie-chart-wrap {
    justify-items: center;
    grid-template-columns: 1fr;
  }

  .pie-legend {
    width: 100%;
  }

  .diagnosis-group-head,
  .diagnosis-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .card-title-row,
  .ingredient-total {
    align-items: stretch;
    flex-direction: column;
  }

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

  .ingredient-head {
    display: none;
  }

  .metric-card {
    min-height: auto;
  }
}

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

@media print {
  body {
    background: white;
  }

  .app-header,
  .side-panel,
  .report-toolbar,
  .tool-section:not(#report) {
    display: none !important;
  }

  .app-shell,
  .content-panel,
  .tool-section,
  .report-page {
    border: 0;
    box-shadow: none;
    display: block !important;
    margin: 0;
    max-width: none;
    padding: 0;
  }

  .report-page {
    page-break-after: always;
  }
}
