/* Hallmark · pre-emit critique: P4 H5 E4 S5 R5 V4 */
:root {
  --bg-canvas: #f4f6f7;
  --surface: #ffffff;
  --surface-warm: #f8faf8;
  --surface-tint: #eaf4ef;
  --surface-deep: #103f36;
  --ink: #141812;
  --ink-2: #465044;
  --ink-3: #7a8375;
  --line: #e1e6dc;
  --line-strong: #c4cebd;
  --brand: #1f6f5b;
  --brand-deep: #103f36;
  --gold: #b7791f;
  --info: #256d85;
  --risk-high: #c2412d;
  --risk-mid: #d9891b;
  --risk-low: #2f7d55;
  --wx: #07c160;
  --on-deep: #ffffff;
  --shadow-soft: rgba(20, 24, 18, 0.08);
  --shadow-card: rgba(20, 24, 18, 0.12);
  --focus: rgba(31, 111, 91, 0.24);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-number: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --radius-10: 10px;
  --radius-12: 12px;
  --radius-16: 16px;
  --radius-20: 20px;
  --radius-pill: 999px;
  --nav-height: 56px;
  --tab-height: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: clip;
  background: var(--bg-canvas);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

h1,
h2,
h3,
p {
  margin: 0;
  overflow-wrap: anywhere;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  background: transparent;
}

.app {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background:
    linear-gradient(180deg, var(--surface-warm) 0, var(--bg-canvas) 280px),
    var(--bg-canvas);
  position: relative;
  overflow-x: clip;
}

.app.is-deep {
  background:
    linear-gradient(180deg, var(--brand-deep) 0, var(--brand-deep) 236px, var(--bg-canvas) 236px),
    var(--bg-canvas);
}

.wx-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--nav-height);
  padding: 8px 92px 8px 12px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  background: color-mix(in srgb, var(--surface-warm) 92%, transparent);
  backdrop-filter: blur(18px);
}

.app.is-deep .wx-nav {
  color: var(--on-deep);
  background: color-mix(in srgb, var(--brand-deep) 88%, transparent);
}

.wx-title {
  justify-self: center;
  margin-left: -44px;
  font-size: 16px;
  font-weight: 700;
}

.wx-back {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-pill);
}

.wx-back:active {
  background: color-mix(in srgb, var(--line) 56%, transparent);
}

.wx-capsule {
  position: absolute;
  top: 13px;
  right: 12px;
  width: 76px;
  height: 30px;
  border: 1px solid color-mix(in srgb, var(--ink-3) 35%, transparent);
  border-radius: var(--radius-pill);
}

.wx-capsule::before,
.wx-capsule::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.wx-capsule::before {
  left: 18px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 8px 0 0 currentColor, 16px 0 0 currentColor;
}

.wx-capsule::after {
  right: 27px;
  width: 1px;
  height: 16px;
  background: color-mix(in srgb, currentColor 24%, transparent);
}

.content {
  padding: 14px var(--space-16) calc(var(--tab-height) + var(--safe-bottom) + 22px);
}

.content.with-paybar {
  padding-bottom: calc(178px + var(--safe-bottom));
}

.content.with-actionbar {
  padding-bottom: calc(104px + var(--safe-bottom));
}

.content.page-tail-safe {
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 96px);
}

.content.with-actionbar.page-tail-safe {
  padding-bottom: calc(154px + var(--safe-bottom));
}

.stack {
  display: grid;
  gap: var(--space-16);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-12);
}

.section-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.section-meta {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}

.icon {
  width: 24px;
  height: 24px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 20px;
  height: 20px;
}

.btn {
  min-height: 48px;
  padding: 0 var(--space-16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  border-radius: var(--radius-12);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn[disabled],
.btn.is-loading {
  cursor: default;
  opacity: .72;
  transform: none;
}

.btn.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid color-mix(in srgb, currentColor 28%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 760ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

.btn:focus-visible,
.tab-item:focus-visible,
.tool-entry:focus-visible,
.package-choice:focus-visible,
.value-link:focus-visible,
.choice-card:focus-visible,
.picker-cell:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.btn:active,
.tool-entry:active,
.package-choice:active,
.value-link:active,
.choice-card:active,
.picker-cell:active {
  transform: translateY(1px);
}

.btn-primary {
  color: var(--on-deep);
  background: var(--brand-deep);
  box-shadow: 0 12px 24px var(--shadow-soft);
}

.btn-primary.is-wx {
  background: var(--wx);
}

.btn-secondary {
  color: var(--brand-deep);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn-secondary:hover {
  background: var(--surface-tint);
}

.chip {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  background: var(--surface-tint);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.chip.is-gold {
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, var(--surface));
}

.chip.is-high {
  color: var(--risk-high);
  background: color-mix(in srgb, var(--risk-high) 10%, var(--surface));
}

.chip.is-mid {
  color: var(--risk-mid);
  background: color-mix(in srgb, var(--risk-mid) 12%, var(--surface));
}

.chip.is-low {
  color: var(--risk-low);
  background: color-mix(in srgb, var(--risk-low) 12%, var(--surface));
}

.chip.is-muted {
  color: var(--ink-2);
  background: color-mix(in srgb, var(--ink-3) 14%, var(--surface));
}

.diagnostic-hero {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: var(--radius-20);
  color: var(--on-deep);
  background: linear-gradient(145deg, var(--brand-deep), color-mix(in srgb, var(--brand) 82%, var(--brand-deep)));
  box-shadow: 0 18px 40px var(--shadow-card);
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}

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

.brand-lockup > span:not(.brand-mark) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand-mark {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--brand-deep);
  background: var(--surface);
}

.brand-mark .icon {
  opacity: 0;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
}

.brand-mark::before {
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 8px;
  transform: rotate(45deg);
}

.brand-mark::after {
  width: 13px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: currentColor;
  box-shadow: 0 6px 0 currentColor;
}

.hero-label {
  display: block;
  color: color-mix(in srgb, var(--on-deep) 72%, transparent);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

.hero-name {
  display: block;
  font-size: 18px;
  line-height: 1.18;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.hero-title {
  margin-top: 18px;
  max-width: 10.5em;
  font-size: 25px;
  line-height: 1.16;
  font-weight: 900;
}

.hero-desc {
  margin-top: 8px;
  max-width: 21em;
  color: color-mix(in srgb, var(--on-deep) 80%, transparent);
  font-size: 14px;
  line-height: 1.55;
}

.hero-action {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-12);
  align-items: center;
}

.hero-action .btn-primary {
  background: var(--surface);
  color: var(--brand-deep);
}

.credit-pill {
  min-height: 44px;
  padding: 0 12px;
  display: grid;
  align-content: center;
  border-radius: var(--radius-12);
  background: color-mix(in srgb, var(--surface) 14%, transparent);
}

.credit-pill span {
  display: block;
  color: color-mix(in srgb, var(--on-deep) 70%, transparent);
  font-size: 11px;
}

.credit-pill strong {
  font-family: var(--font-number);
  font-size: 17px;
}

.signal-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}

.signal {
  min-height: 56px;
  padding: 8px 9px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 12%, transparent);
}

.signal b {
  display: block;
  font-family: var(--font-number);
  font-size: 16px;
}

.signal span {
  display: block;
  margin-top: 2px;
  color: color-mix(in srgb, var(--on-deep) 74%, transparent);
  font-size: 11px;
  line-height: 1.3;
}

.signal.is-alert {
  background: color-mix(in srgb, var(--risk-mid) 20%, transparent);
}

.wizard-panel,
.case-toolbar,
.case-card,
.asset-hero,
.ledger-panel,
.answer-editor {
  border: 1px solid var(--line);
  border-radius: var(--radius-20);
  background: var(--surface);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.wizard-panel {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.wizard-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

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

.step-bars span {
  display: block;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--line);
}

.step-bars .is-done {
  background: var(--brand);
}

.step-bars .is-current {
  background: linear-gradient(90deg, var(--brand), var(--gold));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 16%, transparent);
}

.wizard-progress strong {
  font-family: var(--font-number);
  color: var(--brand-deep);
  font-size: 20px;
  font-weight: 950;
}

.wizard-progress span {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
}

.question-title {
  font-size: 23px;
  line-height: 1.24;
  font-weight: 950;
}

.question-desc {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.answer-editor {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.editor-toolbar {
  min-height: 56px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--info) 8%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--info) 16%, var(--line));
}

.editor-toolbar strong,
.editor-toolbar small {
  display: block;
}

.editor-toolbar strong {
  font-size: 14px;
  font-weight: 900;
}

.editor-toolbar small {
  margin-top: 3px;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.35;
}

.quality-meter {
  height: 9px;
  border-radius: var(--radius-pill);
  background: var(--line);
  overflow: hidden;
}

.quality-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--info), var(--brand));
}

.answer-editor__box {
  min-height: 168px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-warm);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
}

.answer-editor__box:focus {
  outline: 3px solid var(--focus);
  border-color: var(--brand);
}

.answer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ai-suggestion {
  padding: 12px;
  border-radius: 14px;
  color: var(--ink-2);
  background: var(--surface-tint);
  font-size: 13px;
  line-height: 1.5;
}

.impact-note {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-warm);
}

.impact-note__copy strong {
  display: block;
  font-size: 14px;
  font-weight: 850;
}

.impact-note__copy span {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}

.bottom-action {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 34;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(18px);
}

.case-toolbar {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.search-box {
  min-height: 48px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-warm);
  color: var(--ink-3);
  font-size: 14px;
}

.search-action {
  min-width: 58px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--brand-deep);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  font-weight: 850;
}

.search-action:active {
  transform: translateY(1px);
}

.search-action.is-loading {
  color: color-mix(in srgb, var(--brand-deep) 70%, transparent);
  background:
    radial-gradient(circle at 18px 50%, transparent 0 6px, color-mix(in srgb, var(--brand) 32%, transparent) 7px 8px, transparent 9px),
    var(--surface);
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.case-scope {
  min-height: 54px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  border-radius: 14px;
  background: var(--surface-tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 14%, var(--line));
}

.case-scope span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 800;
}

.case-scope strong {
  color: var(--brand-deep);
  font-size: 14px;
  font-weight: 900;
}

.case-scope em {
  grid-row: span 2;
  justify-self: end;
  color: var(--ink-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.filter-pill {
  min-height: 44px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  font-weight: 800;
}

.filter-pill.is-active {
  color: var(--brand-deep);
  background: var(--surface-tint);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.case-card {
  padding: 14px;
  display: grid;
  gap: 12px;
  cursor: pointer;
}

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

.case-skeleton {
  position: relative;
  min-height: 142px;
  border-radius: var(--radius-20);
  background:
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 72%, transparent), transparent) 0 0 / 160px 100% no-repeat,
    linear-gradient(var(--surface-warm), var(--surface-warm));
  box-shadow: inset 0 0 0 1px var(--line);
}

.case-skeleton::before,
.case-skeleton::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--line-strong) 54%, transparent);
}

.case-skeleton::before {
  top: 18px;
  width: 52%;
  height: 20px;
  box-shadow:
    0 34px 0 -4px color-mix(in srgb, var(--line-strong) 44%, transparent),
    0 66px 0 -5px color-mix(in srgb, var(--line-strong) 34%, transparent);
}

.case-skeleton::after {
  bottom: 16px;
  width: 28%;
  height: 28px;
}

.case-card__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: start;
}

.case-card h3 {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 900;
}

.case-card p {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}

.case-cause {
  padding: 12px;
  border-radius: 14px;
  color: var(--risk-high);
  background: color-mix(in srgb, var(--risk-high) 9%, var(--surface));
  font-size: 13px;
  font-weight: 800;
}

.evidence-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.evidence-tags span {
  min-height: 28px;
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  color: var(--brand-deep);
  background: var(--surface-tint);
  font-size: 11px;
  font-weight: 850;
}

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

.case-metric {
  min-height: 52px;
  padding: 8px;
  border-radius: 12px;
  background: var(--surface-warm);
}

.case-metric b {
  display: block;
  font-family: var(--font-number);
  font-size: 16px;
}

.case-metric span {
  color: var(--ink-3);
  font-size: 11px;
}

.asset-hero {
  padding: 18px;
  display: grid;
  gap: 16px;
  color: var(--on-deep);
  background: linear-gradient(145deg, var(--brand-deep), var(--brand));
}

.profile-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.avatar {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--brand-deep);
  background: var(--surface);
  font-size: 20px;
  font-weight: 950;
}

.avatar-user::before,
.avatar-user::after {
  content: "";
  position: absolute;
  color: var(--brand-deep);
}

.avatar-user::before {
  width: 15px;
  height: 15px;
  top: 12px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.avatar-user::after {
  width: 27px;
  height: 14px;
  bottom: 10px;
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.profile-row h1 {
  font-size: 20px;
  font-weight: 950;
}

.profile-row p {
  color: color-mix(in srgb, var(--on-deep) 76%, transparent);
  font-size: 12px;
}

.asset-grid,
.asset-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.asset-actions button {
  min-height: 44px;
  padding: 0 8px;
  border-radius: 13px;
  color: var(--on-deep);
  background: color-mix(in srgb, var(--surface) 14%, transparent);
  font-size: 12px;
  font-weight: 850;
}

.asset-actions button:active {
  transform: translateY(1px);
}

.asset-stat {
  min-height: 68px;
  padding: 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 13%, transparent);
}

.asset-stat b {
  display: block;
  font-family: var(--font-number);
  font-size: 20px;
}

.asset-stat span {
  display: block;
  margin-top: 3px;
  color: color-mix(in srgb, var(--on-deep) 72%, transparent);
  font-size: 11px;
}

.ledger-panel {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.ledger-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
}

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

.ledger-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--brand);
  background: var(--surface-tint);
}

.ledger-icon .icon {
  opacity: 0;
}

.ledger-icon::before,
.ledger-icon::after {
  content: "";
  position: absolute;
}

.ledger-icon-receipt::before {
  width: 20px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.ledger-icon-receipt::after {
  width: 12px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor;
}

.ledger-icon-report::before {
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: var(--radius-pill);
  clip-path: inset(0 0 7px 0);
}

.ledger-icon-report::after {
  width: 11px;
  height: 11px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateY(2px) rotate(-45deg);
}

.ledger-icon-case::before {
  width: 24px;
  height: 18px;
  bottom: 9px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.ledger-icon-case::after {
  width: 12px;
  height: 6px;
  top: 9px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.ledger-icon-support::before {
  width: 24px;
  height: 19px;
  border: 2px solid currentColor;
  border-radius: 10px 10px 6px 6px;
}

.ledger-icon-support::after {
  width: 18px;
  height: 2px;
  bottom: 10px;
  background: currentColor;
  box-shadow: -8px -7px 0 -1px currentColor, 8px -7px 0 -1px currentColor;
}

.ledger-icon-shield::before {
  width: 23px;
  height: 27px;
  border: 2px solid currentColor;
  border-radius: 12px 12px 9px 9px;
  clip-path: polygon(50% 0, 100% 16%, 100% 61%, 50% 100%, 0 61%, 0 16%);
}

.ledger-icon-shield::after {
  width: 10px;
  height: 6px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(-45deg);
}

.ledger-row strong {
  display: block;
  font-size: 14px;
  font-weight: 850;
}

.ledger-row span {
  color: var(--ink-3);
  font-size: 12px;
}

.ledger-value {
  font-family: var(--font-number);
  color: var(--brand-deep);
  font-size: 16px;
  font-weight: 900;
}

.component-lab {
  display: grid;
  gap: 14px;
}

.state-panel {
  padding: 14px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-20);
  background: var(--surface);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

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

.state-label {
  display: grid;
  gap: 6px;
}

.state-label span:first-child {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.btn.is-success {
  color: var(--on-deep);
  background: var(--risk-low);
}

.btn.is-error {
  color: var(--on-deep);
  background: var(--risk-high);
}

.toast {
  min-height: 48px;
  padding: 12px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  color: var(--ink-2);
  background: var(--surface-warm);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  line-height: 1.4;
}

.toast.is-success {
  color: var(--risk-low);
  background: color-mix(in srgb, var(--risk-low) 10%, var(--surface));
}

.toast.is-error {
  color: var(--risk-high);
  background: color-mix(in srgb, var(--risk-high) 10%, var(--surface));
}

.empty-state {
  min-height: 180px;
  padding: 20px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-20);
  background: var(--surface-warm);
}

.empty-state__icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--brand);
  background: var(--surface-tint);
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 900;
}

.empty-state p {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.45;
}

.compact-empty {
  min-height: 236px;
  gap: 10px;
}

.compact-empty .btn {
  width: 100%;
  margin-top: 4px;
}

.locked-panel,
.result-panel {
  padding: 18px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-20);
  background: var(--surface);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.result-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: var(--brand);
  background: var(--surface-tint);
}

.result-icon.is-success {
  color: var(--risk-low);
  background: color-mix(in srgb, var(--risk-low) 12%, var(--surface));
}

.result-icon.is-error {
  color: var(--risk-high);
  background: color-mix(in srgb, var(--risk-high) 11%, var(--surface));
}

.status-symbol {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--surface-tint);
  box-shadow: inset 0 0 0 1px var(--line);
}

.status-symbol::before,
.status-symbol::after {
  content: "";
  position: absolute;
}

.status-symbol.is-processing {
  background:
    radial-gradient(circle at 50% 50%, var(--surface) 0 31%, transparent 32%),
    conic-gradient(from 20deg, var(--brand) 0 68%, var(--line) 68% 100%);
}

.status-symbol.is-processing::before {
  width: 24px;
  height: 24px;
  border: 3px solid var(--brand);
  border-right-color: transparent;
  border-radius: var(--radius-pill);
}

.status-symbol.is-processing::after {
  width: 6px;
  height: 6px;
  right: 14px;
  top: 15px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  box-shadow: -36px 28px 0 color-mix(in srgb, var(--brand) 80%, var(--surface));
}

.status-symbol.is-locked {
  background: color-mix(in srgb, var(--gold) 12%, var(--surface));
}

.status-symbol.is-locked::before {
  top: 15px;
  width: 26px;
  height: 21px;
  border: 3px solid var(--gold);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}

.status-symbol.is-locked::after {
  bottom: 15px;
  width: 34px;
  height: 28px;
  border-radius: 9px;
  background: var(--gold);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface) 32%, transparent);
}

.status-symbol.is-success {
  background: color-mix(in srgb, var(--risk-low) 12%, var(--surface));
}

.status-symbol.is-success::before {
  width: 29px;
  height: 16px;
  border-left: 4px solid var(--risk-low);
  border-bottom: 4px solid var(--risk-low);
  transform: translateY(-3px) rotate(-45deg);
}

.status-symbol.is-error {
  background: color-mix(in srgb, var(--risk-high) 11%, var(--surface));
}

.status-symbol.is-error::before,
.status-symbol.is-error::after {
  width: 34px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--risk-high);
}

.status-symbol.is-error::before {
  transform: rotate(45deg);
}

.status-symbol.is-error::after {
  transform: rotate(-45deg);
}

.status-symbol.is-empty {
  margin: 0 auto 12px;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}

.status-symbol.is-empty::before {
  width: 28px;
  height: 28px;
  border: 4px solid var(--brand);
  border-radius: var(--radius-pill);
  transform: translate(-3px, -3px);
}

.status-symbol.is-empty::after {
  width: 18px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  transform: translate(14px, 16px) rotate(45deg);
}

.process-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-warm);
}

.process-row {
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  color: var(--ink-3);
  font-size: 12px;
}

.process-row span {
  width: 10px;
  height: 10px;
  margin-left: 4px;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
}

.process-row strong {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 850;
}

.process-row em {
  font-style: normal;
  font-weight: 800;
}

.process-row.is-done span {
  background: var(--risk-low);
}

.process-row.is-active span {
  background: var(--gold);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 14%, transparent);
}

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

.locked-preview {
  display: grid;
  gap: 8px;
}

.locked-preview div {
  min-height: 48px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  border-radius: 14px;
  background: var(--surface-warm);
}

.locked-preview strong {
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 900;
}

.locked-preview span {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.4;
}

.suggestion-grid {
  width: 100%;
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.suggestion-chip {
  min-height: 44px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  color: var(--brand-deep);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12px;
  font-weight: 850;
}

.receipt-card {
  padding: 12px;
  display: grid;
  gap: 10px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--risk-low) 10%, var(--surface)), var(--surface-warm));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--risk-low) 18%, var(--line));
}

.receipt-card.is-error {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--risk-high) 9%, var(--surface)), var(--surface-warm));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--risk-high) 18%, var(--line));
}

.receipt-card div {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.receipt-card span {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 750;
}

.receipt-card strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.receipt-card .is-ok {
  color: var(--risk-low);
}

.receipt-card .is-bad {
  color: var(--risk-high);
}

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

.result-panel .hero-action .btn-primary {
  color: var(--on-deep);
  background: var(--brand-deep);
}

.result-panel .hero-action .btn.is-error {
  color: var(--on-deep);
  background: var(--risk-high);
}

.insight-panel,
.case-detail-hero {
  padding: 16px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-20);
  background: var(--surface);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.insight-row {
  min-height: 54px;
  padding: 12px;
  display: grid;
  gap: 4px;
  border-radius: 14px;
  background: var(--surface-warm);
}

.insight-row strong,
.action-check strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.insight-row span,
.action-check span span {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}

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

.decision-rail div {
  min-height: 62px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 7%, var(--surface-warm));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 16%, var(--line));
}

.decision-rail span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 800;
}

.decision-rail strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 900;
}

.evidence-weight {
  min-height: 50px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--risk-high) 7%, var(--surface-warm));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--risk-high) 14%, var(--line));
}

.evidence-weight span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 800;
}

.evidence-weight strong {
  grid-row: span 2;
  color: var(--risk-high);
  font-size: 16px;
  font-weight: 950;
}

.case-detail-hero h1 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 950;
}

.case-detail-hero p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.case-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.status-symbol.is-case {
  background: color-mix(in srgb, var(--brand) 9%, var(--surface));
}

.status-symbol.is-case::before {
  width: 32px;
  height: 22px;
  bottom: 17px;
  border: 4px solid var(--brand);
  border-radius: 8px;
}

.status-symbol.is-case::after {
  width: 16px;
  height: 8px;
  top: 16px;
  border: 4px solid var(--brand);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

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

.timeline-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 3px;
}

.timeline-row > span {
  width: 10px;
  height: 10px;
  margin: 6px 0 0 4px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 10%, transparent);
}

.timeline-row strong {
  font-size: 14px;
  font-weight: 900;
}

.timeline-row p {
  grid-column: 2;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}

.value-link.is-compact {
  min-height: 64px;
  padding: 10px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 10%, var(--line));
}

.action-check {
  min-height: 58px;
  padding: 10px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  background: var(--surface-warm);
}

.action-hero {
  padding: 18px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-20);
  background: var(--surface);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.action-hero > .chip {
  justify-self: start;
}

.action-hero h1 {
  font-size: 24px;
  line-height: 1.18;
  font-weight: 950;
}

.action-hero p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.task-card {
  min-height: 86px;
  padding: 12px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-16);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.task-card.is-active {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
}

.task-card.is-done {
  border-color: color-mix(in srgb, var(--risk-low) 32%, var(--line));
  background: color-mix(in srgb, var(--risk-low) 6%, var(--surface));
}

.task-card.is-blocked {
  border-color: color-mix(in srgb, var(--risk-high) 28%, var(--line));
  background: color-mix(in srgb, var(--risk-high) 6%, var(--surface));
}

.task-index {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--brand-deep);
  background: var(--surface-tint);
  font-family: var(--font-number);
  font-weight: 900;
}

.task-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.task-card span span {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.4;
}

.check-row {
  min-height: 50px;
  padding: 9px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  background: var(--surface-warm);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}

.case-detail-actions {
  margin-top: 18px;
}

.case-detail-why {
  padding-bottom: 96px;
}

.status-symbol.is-mini-check {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--risk-low) 11%, var(--surface));
}

.status-symbol.is-mini-check::before {
  width: 18px;
  height: 10px;
  border-left: 3px solid var(--risk-low);
  border-bottom: 3px solid var(--risk-low);
  transform: translateY(-2px) rotate(-45deg);
}

.result-panel h1,
.locked-panel h1 {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 950;
}

.result-panel p,
.locked-panel p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

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

.report-preview,
.retry-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.report-preview div,
.retry-panel div {
  min-height: 74px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-radius: 14px;
  background: var(--surface-warm);
}

.report-preview strong,
.retry-panel strong {
  color: var(--brand-deep);
  font-size: 16px;
  font-weight: 950;
}

.report-preview span,
.retry-panel span {
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.35;
}

.benefit-row {
  min-height: 44px;
  padding: 10px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 12px;
  background: var(--surface-warm);
  color: var(--ink-2);
  font-size: 13px;
}

.status-panel,
.report-hero,
.pay-target,
.rule-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-20);
  background: var(--surface);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.status-panel {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.decision-card {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--gold) 22%, var(--line));
  border-radius: var(--radius-20);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 10%, var(--surface)), var(--surface));
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.decision-eyebrow {
  display: block;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.decision-card h2 {
  margin-top: 4px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 950;
}

.decision-card p {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}

.status-row > div {
  min-width: 0;
}

.status-title {
  font-size: 16px;
  font-weight: 850;
}

.status-desc {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}

.progress-track,
.risk-track {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--line);
}

.progress-bar,
.risk-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tool-entry {
  min-height: 108px;
  padding: 14px 8px 13px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-16);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  box-shadow: 0 6px 18px var(--shadow-soft);
}

.tool-entry:hover {
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  background: color-mix(in srgb, var(--brand) 4%, var(--surface));
}

.tool-entry__icon {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--brand);
  background: var(--surface-tint);
}

.tool-entry__icon .icon {
  opacity: 0;
}

.tool-entry__icon::before,
.tool-entry__icon::after {
  content: "";
  position: absolute;
}

.tool-icon-report::before {
  width: 19px;
  height: 23px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.tool-icon-report::after {
  width: 12px;
  height: 8px;
  left: 13px;
  bottom: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: skewX(-18deg);
}

.tool-icon-case::before {
  width: 24px;
  height: 18px;
  top: 13px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.tool-icon-case::after {
  width: 12px;
  height: 6px;
  top: 9px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.tool-icon-wallet::before {
  width: 25px;
  height: 19px;
  border: 2px solid currentColor;
  border-radius: 6px;
}

.tool-icon-wallet::after {
  width: 9px;
  height: 9px;
  right: 8px;
  border: 2px solid currentColor;
  border-radius: var(--radius-pill);
  background: var(--surface-tint);
}

button.tool-entry__icon {
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.case-fav::before {
  width: 24px;
  height: 24px;
  background: currentColor;
  clip-path: polygon(50% 5%, 61% 36%, 94% 36%, 67% 55%, 78% 88%, 50% 68%, 22% 88%, 33% 55%, 6% 36%, 39% 36%);
}

.case-fav::after {
  width: 14px;
  height: 14px;
  background: var(--surface-tint);
  clip-path: polygon(50% 20%, 57% 43%, 82% 43%, 62% 57%, 70% 80%, 50% 66%, 30% 80%, 38% 57%, 18% 43%, 43% 43%);
}

.tool-entry strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.tool-entry span:last-child {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.3;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  width: min(100%, 430px);
  margin: 0 auto;
  min-height: calc(var(--tab-height) + var(--safe-bottom));
  padding: 6px 12px calc(6px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(18px);
}

.tab-item {
  min-height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 14px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  position: relative;
}

.tab-item::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: transparent;
  position: absolute;
  top: 4px;
}

.tab-item .icon {
  opacity: 0;
}

.tab-item::after {
  content: "";
  order: -1;
  width: 23px;
  height: 23px;
  display: block;
  color: currentColor;
}

.tab-item:nth-child(1)::after {
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 5px;
  transform: translateY(2px);
  box-shadow: inset 0 -7px 0 color-mix(in srgb, currentColor 10%, transparent);
}

.tab-item:nth-child(1) .icon {
  display: none;
}

.tab-item:nth-child(2)::after {
  border: 2px solid currentColor;
  border-radius: 7px;
  box-shadow:
    inset 8px 0 0 color-mix(in srgb, currentColor 18%, transparent),
    inset 0 8px 0 color-mix(in srgb, currentColor 11%, transparent);
}

.tab-item:nth-child(2) .icon {
  display: none;
}

.tab-item:nth-child(3)::after {
  width: 24px;
  height: 18px;
  margin-top: 3px;
  border: 2px solid currentColor;
  border-radius: 5px;
  box-shadow: 0 -5px 0 -3px currentColor;
}

.tab-item:nth-child(3) .icon {
  display: none;
}

.tab-item:nth-child(4)::after {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  background:
    radial-gradient(circle at 50% 35%, currentColor 0 4px, transparent 5px),
    radial-gradient(ellipse at 50% 82%, currentColor 0 8px, transparent 9px);
}

.tab-item:nth-child(4) .icon {
  display: none;
}

.tab-item.is-active {
  color: var(--brand-deep);
  background: var(--surface-tint);
}

.tab-item.is-active::before {
  background: var(--brand);
}

.report-hero {
  padding: 18px;
  overflow: hidden;
}

.score-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.score-number {
  font-family: var(--font-number);
  font-size: 58px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--brand-deep);
}

.score-meta {
  display: grid;
  gap: 8px;
}

.score-meta h1 {
  font-size: 21px;
  line-height: 1.2;
  font-weight: 900;
}

.score-meta p {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}

.evidence-strip {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.evidence-item {
  min-height: 66px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 3px;
  background: var(--surface-warm);
}

.evidence-item + .evidence-item {
  border-left: 1px solid var(--line);
}

.evidence-item b {
  font-family: var(--font-number);
  font-size: 18px;
}

.evidence-item span {
  color: var(--ink-3);
  font-size: 11px;
}

.report-next {
  margin-top: 12px;
  padding: 12px;
  display: grid;
  gap: 5px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface-warm));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 18%, var(--line));
}

.report-next__tag {
  width: max-content;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  color: var(--brand-deep);
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  font-size: 11px;
  font-weight: 900;
}

.report-next strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.report-next span:last-child {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.35;
}

.risk-map {
  display: grid;
  gap: 10px;
}

.risk-matrix {
  padding: 14px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-20);
  background: var(--surface);
}

.risk-matrix__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.risk-matrix__head strong {
  font-size: 15px;
  font-weight: 900;
}

.risk-matrix__head span {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
}

.matrix-grid {
  position: relative;
  height: 154px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(180deg, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(135deg, color-mix(in srgb, var(--risk-low) 10%, var(--surface)) 0%, var(--surface) 42%, color-mix(in srgb, var(--risk-high) 10%, var(--surface)) 100%);
}

.matrix-axis {
  position: absolute;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 800;
}

.matrix-axis.is-y {
  top: 10px;
  left: 10px;
}

.matrix-axis.is-x {
  right: 10px;
  bottom: 10px;
}

.matrix-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), 0 8px 18px var(--shadow-soft);
}

.matrix-dot.is-danger {
  background: var(--risk-high);
  box-shadow: 0 0 0 1px var(--risk-high), 0 8px 18px var(--shadow-soft);
}

.matrix-dot.is-warn {
  background: var(--risk-mid);
  box-shadow: 0 0 0 1px var(--risk-mid), 0 8px 18px var(--shadow-soft);
}

.risk-card {
  min-height: 76px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-16);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.risk-card h3 {
  font-size: 15px;
  font-weight: 850;
}

.risk-card p {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 12px;
}

.risk-evidence {
  display: block;
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 750;
}

.risk-card .risk-track {
  margin-top: 10px;
}

.risk-score {
  font-family: var(--font-number);
  font-size: 25px;
  font-weight: 900;
  text-align: right;
}

.risk-fill.is-high {
  background: var(--risk-high);
}

.risk-fill.is-mid {
  background: var(--risk-mid);
}

.risk-fill.is-low {
  background: var(--risk-low);
}

.value-link {
  min-height: 76px;
  padding: 14px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 24px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-16);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}

.value-link__icon {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--brand);
  background: var(--surface-tint);
}

.value-link__icon .icon {
  opacity: 0;
}

.value-link__icon::before,
.value-link__icon::after {
  content: "";
  position: absolute;
}

.value-link__icon::before {
  width: 23px;
  height: 25px;
  border: 2px solid currentColor;
  border-radius: 6px;
}

.value-link__icon::after {
  width: 13px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor;
}

.value-link strong {
  display: block;
  font-size: 15px;
  font-weight: 850;
}

.value-link span {
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.4;
}

.pay-target {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.target-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.target-line h1 {
  font-size: 20px;
  font-weight: 900;
}

.target-line p {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}

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

.trade-summary div {
  min-height: 58px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 3px;
  border-radius: 14px;
  background: var(--surface-warm);
}

.trade-summary span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 800;
}

.trade-summary strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 900;
}

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

.package-choice {
  min-height: 92px;
  padding: 14px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-16);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.package-choice.is-selected {
  border-color: var(--brand);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 6%, var(--surface)), var(--surface));
  box-shadow: 0 10px 26px var(--shadow-soft), inset 0 0 0 1px var(--brand);
}

.radio {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}

.package-choice.is-selected .radio {
  border-color: var(--brand);
}

.package-choice.is-selected .radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}

.package-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 900;
}

.package-desc {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}

.package-benefit {
  width: max-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 5px 8px;
  display: inline-flex;
  border-radius: var(--radius-pill);
  color: var(--brand-deep);
  background: var(--surface-tint);
  font-size: 11px;
  font-weight: 850;
}

.package-price {
  font-family: var(--font-number);
  color: var(--brand-deep);
  font-size: 19px;
  font-weight: 900;
  white-space: nowrap;
}

.rule-panel {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.payment-method {
  min-height: 52px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--wx) 8%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wx) 18%, var(--line));
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.4;
}

.method-mark {
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  color: var(--on-deep);
  background: var(--wx);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.rule-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
}

.rule-row.is-link {
  border-top: 1px solid var(--line);
  color: var(--brand-deep);
  font-weight: 800;
}

.rule-row .icon {
  color: var(--brand);
}

.payment-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(18px);
}

.pay-summary span {
  display: block;
  color: var(--ink-3);
  font-size: 11px;
}

.pay-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 850;
}

.amount {
  margin-top: 4px;
  font-family: var(--font-number);
  color: var(--risk-high);
  font-size: 23px;
  font-weight: 950;
}

.pay-summary small {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 750;
}

.launch-index {
  min-height: 100vh;
  padding: 18px 16px 28px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.prd-hero,
.prd-panel,
.module-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-20);
  background: var(--surface);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.prd-hero {
  padding: 18px;
  display: grid;
  gap: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-tint) 76%, var(--surface)), var(--surface));
}

.prd-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prd-hero__meta a.chip {
  min-height: 44px;
}

.prd-hero h1 {
  font-size: 25px;
  line-height: 1.2;
  font-weight: 950;
}

.prd-hero p,
.module-head p,
.flow-step span,
.rule-list span,
.state-matrix span,
.module-overview span,
.index-link span span {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}

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

.prd-summary-grid div {
  min-height: 68px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 2px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-warm) 70%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--line);
}

.prd-summary-grid strong {
  color: var(--brand-deep);
  font-family: var(--font-number);
  font-size: 22px;
  font-weight: 950;
}

.prd-summary-grid span {
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 800;
}

.prd-panel,
.module-section {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.flow-steps,
.rule-list,
.state-matrix,
.link-group {
  display: grid;
  gap: 10px;
}

.flow-step {
  min-height: 54px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-radius: 14px;
  background: var(--surface-warm);
}

.flow-step b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  color: var(--on-deep);
  background: var(--brand-deep);
  font-family: var(--font-number);
  font-size: 13px;
  font-weight: 900;
}

.rule-list div,
.state-matrix div {
  min-height: 64px;
  padding: 12px;
  display: grid;
  gap: 5px;
  border-radius: 14px;
  background: var(--surface-warm);
  box-shadow: inset 0 0 0 1px var(--line);
}

.rule-list strong,
.state-matrix strong,
.module-overview strong,
.index-link strong {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 900;
}

.module-overview {
  display: grid;
  gap: 8px;
}

.module-overview a {
  min-height: 58px;
  padding: 10px 12px;
  display: grid;
  align-content: center;
  gap: 3px;
  border-radius: 14px;
  background: var(--surface-warm);
  box-shadow: inset 0 0 0 1px var(--line);
}

.module-overview a:active,
.index-link:active {
  transform: scale(.99);
}

.module-head {
  display: grid;
  gap: 8px;
}

.module-head h2 {
  font-size: 19px;
  line-height: 1.25;
  font-weight: 950;
}

.index-link {
  min-height: 78px;
  padding: 14px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 24px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-16);
  background: var(--surface);
  box-shadow: 0 8px 22px var(--shadow-soft);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.index-link .value-link__icon {
  color: var(--brand-deep);
}

.index-link span span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}

.onboarding-hero,
.form-hero,
.canvas-hero,
.choice-panel,
.form-panel,
.canvas-board,
.confirm-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-20);
  background: var(--surface);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.onboarding-hero,
.form-hero {
  padding: 18px;
  display: grid;
  gap: 10px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-tint) 70%, var(--surface)), var(--surface));
}

.onboarding-hero h1,
.form-hero h1,
.canvas-hero h1 {
  font-size: 23px;
  line-height: 1.2;
  font-weight: 950;
}

.onboarding-hero p,
.form-hero p,
.canvas-hero p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.choice-panel,
.form-panel {
  padding: 14px;
  display: grid;
  gap: 12px;
}

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

.choice-card {
  min-height: 64px;
  padding: 12px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-warm);
  text-align: left;
}

.choice-card .icon {
  color: var(--brand);
}

.choice-card strong,
.choice-card small {
  display: block;
}

.choice-card strong {
  font-size: 14px;
  font-weight: 900;
}

.choice-card small {
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.35;
}

.choice-card.is-selected {
  border-color: var(--brand);
  background: var(--surface-tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 24%, transparent);
}

.tag-selector,
.stage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-error {
  min-height: 44px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border-radius: 13px;
  color: var(--risk-mid);
  background: color-mix(in srgb, var(--risk-mid) 10%, var(--surface));
  font-size: 12px;
  line-height: 1.4;
  font-weight: 750;
}

.field-block {
  display: grid;
  gap: 7px;
}

.field-block > span:first-child {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 850;
}

.field-block small {
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.4;
}

.field-block.is-error small {
  color: var(--risk-high);
  font-weight: 750;
}

.input-shell,
.picker-cell {
  min-height: 50px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-warm);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.field-block.is-error .input-shell {
  border-color: color-mix(in srgb, var(--risk-high) 54%, var(--line));
  background: color-mix(in srgb, var(--risk-high) 6%, var(--surface));
}

.input-shell.is-multiline {
  min-height: 86px;
}

.picker-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.picker-cell strong,
.picker-cell small {
  display: block;
}

.picker-cell strong {
  font-size: 15px;
  font-weight: 900;
}

.picker-cell small {
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 12px;
}

.canvas-hero {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 14px;
  align-items: start;
}

.canvas-version {
  min-height: 76px;
  padding: 10px;
  display: grid;
  align-content: center;
  justify-items: center;
  border-radius: 16px;
  color: var(--brand-deep);
  background: var(--surface-tint);
}

.canvas-version strong {
  font-family: var(--font-number);
  font-size: 24px;
  font-weight: 950;
}

.canvas-version span {
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}

.canvas-board {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.canvas-tile {
  min-height: 82px;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 6px;
  border-radius: 14px;
  background: var(--surface-warm);
  box-shadow: inset 0 0 0 1px var(--line);
}

.canvas-tile span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 850;
}

.canvas-tile strong {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 900;
}

.canvas-tile.is-risk {
  background: var(--surface-tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 30%, var(--line));
}

.canvas-tile.is-warning {
  background: color-mix(in srgb, var(--risk-mid) 9%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--risk-mid) 24%, var(--line));
}

.canvas-lock-note {
  border: 1px solid var(--line);
  border-radius: var(--radius-20);
  background: var(--surface);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.canvas-lock-note {
  min-height: 78px;
  padding: 14px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  background: var(--surface-tint);
}

.canvas-lock-note p {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}

.canvas-lock-note h2 {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 950;
}

.bmc-shell {
  border: 2px solid var(--brand);
  border-radius: var(--radius-20);
  background: var(--surface);
  box-shadow: 0 12px 32px var(--shadow-card);
  overflow: hidden;
}

.bmc-header {
  padding: 12px;
  display: grid;
  gap: 10px;
  border-bottom: 2px solid color-mix(in srgb, var(--brand) 58%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface-tint) 78%, var(--surface)), var(--surface));
}

.bmc-brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.bmc-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--on-deep);
  background: var(--brand-deep);
  font-size: 19px;
  font-weight: 950;
}

.bmc-brand h1 {
  font-size: 20px;
  line-height: 1.18;
  font-weight: 950;
}

.bmc-brand p {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
}

.bmc-meta,
.bmc-purpose {
  display: grid;
  gap: 6px;
}

.bmc-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bmc-meta span,
.bmc-purpose span {
  min-height: 38px;
  padding: 7px 9px;
  display: grid;
  align-content: center;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.35;
}

.bmc-meta b,
.bmc-purpose b {
  color: var(--brand-deep);
  font-weight: 950;
}

.bmc-purpose {
  padding: 10px 12px;
  grid-template-columns: 1fr;
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 26%, var(--line));
  background: var(--surface-tint);
}

.bmc-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  background:
    linear-gradient(90deg, rgba(255,255,255,.92), rgba(255,255,255,0)),
    var(--surface);
  background-size: 18px 100%, auto;
  background-repeat: no-repeat;
}

.bmc-board {
  min-width: 760px;
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.05fr 1.1fr 1.1fr 1.1fr 1.05fr;
  grid-template-rows: 255px 215px 180px;
  border-top: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line));
  border-left: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line));
}

.bmc-cell {
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 7px;
  border-right: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line));
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line));
  background: var(--surface);
}

.bmc-cell.is-core {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-tint) 74%, var(--surface)), var(--surface) 48%);
}

.bmc-kp { grid-column: 1; grid-row: 1 / 3; }
.bmc-ka { grid-column: 2; grid-row: 1; }
.bmc-vp { grid-column: 3; grid-row: 1 / 3; }
.bmc-cr { grid-column: 4; grid-row: 1; }
.bmc-cs { grid-column: 5; grid-row: 1 / 3; }
.bmc-kr { grid-column: 2; grid-row: 2; }
.bmc-ch { grid-column: 4; grid-row: 2; }
.bmc-cost { grid-column: 1 / 3; grid-row: 3; }
.bmc-revenue { grid-column: 3 / 6; grid-row: 3; }

.bmc-cell__head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.bmc-cell__head b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  color: var(--on-deep);
  background: var(--brand);
  font-family: var(--font-number);
  font-size: 17px;
  font-weight: 950;
}

.bmc-cell__head span {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 950;
}

.bmc-cell__head em {
  color: var(--brand);
  font-style: normal;
  font-size: 11px;
  font-weight: 950;
}

.bmc-cell ul,
.bmc-split ul {
  margin: 0;
  padding-left: 15px;
  display: grid;
  gap: 4px;
}

.bmc-cell li,
.bmc-revenue-grid span {
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.38;
}

.bmc-cell p {
  align-self: end;
  margin-top: auto;
  padding: 8px;
  border-radius: 11px;
  color: var(--brand-deep);
  background: var(--surface-tint);
  font-size: 10px;
  line-height: 1.38;
  font-weight: 850;
  text-align: center;
}

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

.bmc-split > div,
.bmc-revenue-grid div {
  min-height: 64px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-warm) 76%, var(--surface));
}

.bmc-split strong,
.bmc-revenue-grid strong {
  display: block;
  color: var(--brand-deep);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 950;
}

.bmc-revenue-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.bmc-revenue-grid span {
  display: block;
  margin-top: 4px;
}

.bmc-footer {
  min-height: 48px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--on-deep);
  background: var(--brand-deep);
}

.bmc-footer strong {
  font-size: 17px;
  font-weight: 950;
}

.bmc-footer span {
  color: color-mix(in srgb, var(--on-deep) 86%, transparent);
  font-size: 12px;
  line-height: 1.35;
}

.confirm-panel {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.confirm-panel h2 {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 900;
}

.confirm-panel p {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}

.empty-state.is-compact {
  min-height: auto;
  padding: 16px;
  text-align: left;
  align-items: start;
}

@media (min-width: 431px) {
  body {
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--brand-deep) 6%, var(--bg-canvas)), var(--bg-canvas));
  }

  .app {
    box-shadow: 0 0 0 1px var(--line), 0 20px 70px var(--shadow-card);
  }
}

@media (max-width: 340px) {
  .hero-action,
  .payment-bar,
  .decision-card,
  .editor-toolbar,
  .canvas-hero,
  .confirm-panel {
    grid-template-columns: 1fr;
  }

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

  .canvas-board {
    grid-template-columns: 1fr;
  }

  .score-line {
    grid-template-columns: 1fr;
  }

  .score-number {
    font-size: 52px;
  }
}
