:root {
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #64748b;
  --forest: #174ea6;
  --forest-2: #1a73e8;
  --moss: #5b8def;
  --sage: #dbeafe;
  --sage-soft: #eff6ff;
  --cream: #f8fafc;
  --paper: #ffffff;
  --paper-soft: #f1f5f9;
  --white: #ffffff;
  --sand: #e2e8f0;
  --terracotta: #c2410c;
  --terracotta-soft: #ffedd5;
  --amber: #a16207;
  --amber-soft: #fef3c7;
  --red: #b42318;
  --red-soft: #fee4e2;
  --danger: #b42318;
  --success: #067647;
  --blue: #1a73e8;
  --blue-soft: #e8f0fe;
  --border: #dbe3ee;
  --border-soft: #edf1f7;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 72px rgba(15, 23, 42, 0.2);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --header-height: 64px;
  --font-sans: "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.sales-target-card .target-freshness { margin: 4px 0 20px; color: var(--ink-faint); font-size: 14px; }
.target-focus-heading, .target-chart-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.target-focus-heading span { font-size: 14px; color: var(--ink-soft); }
.target-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0 28px; background: var(--sage-soft); border: 1px solid var(--border-soft); }
.target-kpis > div { padding: 18px; min-width: 0; border-right: 1px solid var(--border-soft); }
.target-kpis > div:last-child { border-right: 0; }
.target-kpis span, .target-kpis strong { display: block; }
.target-kpis span { color: var(--ink-soft); font-size: 14px; }
.target-kpis strong { font-size: clamp(18px, 1.7vw, 25px); margin-top: 5px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.target-chart-heading { font-size: 15px; }
.target-chart-heading > span { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); }
.target-swatch { display: inline-block; width: 11px; height: 11px; margin-left: 8px; }
.target-swatch.actual, .target-mark-actual { background: var(--moss); fill: var(--moss); stroke: var(--success); stroke-width: .7; }
.target-swatch.target, .target-mark-target { background: var(--paper-soft); fill: var(--paper-soft); stroke: var(--ink-faint); stroke-width: 1.3; border: 1px solid var(--ink-faint); }
.target-trend-readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); color: var(--ink-soft); }
.target-trend-readout strong { color: var(--ink); }
.target-trend-readout span { color: var(--ink); font-variant-numeric: tabular-nums; }
.target-trend-readout small { flex-basis: 100%; color: var(--ink-faint); }
.target-chart-month { cursor: pointer; outline: none; }
.target-chart-month:focus-visible { outline: 2px solid var(--forest-2); outline-offset: 4px; }
.target-trend-scroll { overflow-x: auto; }
.target-trend { display: block; width: 100%; min-width: 620px; max-height: 270px; }
.target-trend text { fill: var(--ink-soft); font-size: 13px; }
.target-trend .target-missing { fill: var(--ink-faint); font-size: 20px; }
.target-grid { fill: none; stroke: var(--border); stroke-dasharray: 3 4; }
.target-month-details { border-top: 1px solid var(--border); margin-top: 16px; }
.target-month-details summary { cursor: pointer; padding: 16px 0; min-height: 48px; font-weight: 600; }
.store-target-section { margin: 24px 0; }
.store-target-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.store-target-card { min-width: 0; padding: 22px; border: 1px solid var(--border); border-top: 3px solid var(--forest-2); border-radius: 14px; background: var(--paper-soft); }
.store-target-card[data-store-target="tmall_overseas"] { border-top-color: var(--terracotta); }
.store-target-title, .store-target-status { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.store-target-title h4 { font-size: 18px; margin: 0; }
.store-target-title > span { padding: 4px 10px; border-radius: 20px; background: var(--paper); font-size: 13px; }
.store-target-amount { display: grid; gap: 6px; margin-top: 20px; }
.store-target-amount > span, .store-target-tax, .store-target-metrics span, .store-target-status > span { font-size: 12px; color: var(--ink-soft); }
.store-target-amount > strong { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.store-target-tax { margin: 8px 0 22px; }
.store-target-metrics { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.store-target-metrics > div { display: grid; gap: 6px; }
.store-target-metrics strong { font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.store-target-progress { height: 8px; margin: 16px 0 12px; border-radius: 20px; overflow: hidden; background: var(--border); }
.store-target-progress > span { display: block; height: 100%; background: var(--forest-2); border-radius: inherit; }
.store-target-card[data-store-target="tmall_overseas"] .store-target-progress > span { background: var(--terracotta); }
.store-target-status > strong { font-size: 14px; }
.store-target-card details { border-top: 1px solid var(--border); margin-top: 16px; }
.store-target-card summary { cursor: pointer; padding: 12px 0; font-size: 13px; min-height: 44px; }
.store-target-months { margin: 0; }
.store-target-months > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.store-target-months dd { margin: 0; text-align: right; }
.store-target-months small { display: block; margin-top: 4px; color: var(--ink-soft); }
@media (max-width: 760px) { .store-target-grid { grid-template-columns: 1fr; } .store-target-card { padding: 18px; } }
.target-channel-details { margin: 12px 0 20px; border-bottom: 1px solid var(--border); }
.target-channel-details summary { cursor: pointer; padding: 12px 0; min-height: 44px; font-weight: 600; }
.target-channel-details td:nth-child(2), .target-channel-details th:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.target-channel-details tfoot { font-weight: 600; background: var(--surface-soft, #edf8f4); }
.target-channel-details .data-table { min-width: 0; }
.target-channel-details td:last-child { white-space: nowrap; }
.target-channel-details tfoot td:last-child { white-space: normal; }
@media (max-width: 600px) {
  .target-channel-details .data-table th, .target-channel-details .data-table td { padding: 10px 5px; font-size: 12px; }
}
#salesTargetSettingsForm > label { display: block; margin-bottom: 18px; }
#salesTargetFields { margin-top: 16px; }
@media (max-width: 760px) {
  .target-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .target-kpis > div { padding: 14px; border-bottom: 1px solid var(--border-soft); }
  .target-chart-heading { align-items: flex-start; flex-wrap: wrap; }
}

/* Native controls follow the selected ERP theme, not a second OS preference. */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

/* 2026 brand-book alignment: calm, natural, scientific and readable. */
:root {
  --ink: #1f2a21;
  --ink-soft: #3c3c3c;
  --ink-faint: #667067;
  --forest: #0a410f;
  --forest-2: #0a410f;
  --moss: #6f8a68;
  --sage: #e1ebe0;
  --sage-soft: #f2f6f1;
  --cream: #f7f7f2;
  --paper-soft: #f4f5f1;
  --blue: #0a410f;
  --blue-soft: #e7f0e5;
  --border: #d7ddd4;
  --border-soft: #e8ece6;
  --font-sans: "Figtree", "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
}

[data-theme="dark"] {
  --ink: #f1f5f9;
  --ink-soft: #cbd5e1;
  --ink-faint: #a7b5c7;
  --cream: #162019;
  --paper: #1d2a20;
  --paper-soft: #243328;
  --forest: #8fc596;
  --forest-2: #8fc596;
  --blue: #8fc596;
  --blue-soft: #253e29;
  --sage: #2d4531;
  --sage-soft: #213526;
  --border: #405445;
  --border-soft: #334639;
}

.app-shell * {
  background-image: none !important;
}

/* 正式业务版的页面标题由内容区承担，顶部只保留真正需要的店铺切换。 */
html[data-app-mode="runtime"] .topbar-primary,
html[data-app-mode="runtime"] .demo-notice {
  display: none !important;
}

body {
  font-size: 17px;
  color: var(--ink);
  background: var(--cream);
}

.global-header,
.topbar,
.sidebar {
  background: #0a410f;
}

.main-content {
  font-size: 17px;
}

.card-subtitle,
.quiet-note,
.runtime-source-note,
.data-table th,
.data-table small,
.stat-row span,
.chart-legend,
.product-compact-status span {
  font-size: 15px !important;
  line-height: 1.55;
}

.data-table td,
.data-table strong,
.stat-row strong,
.product-compact-status strong {
  font-size: 16px !important;
  line-height: 1.55;
}

.button,
.mini-tab,
.module-tab,
.period-button,
.text-link,
.field,
.field-select,
.icon-button {
  min-height: 48px;
  font-size: 16px !important;
}

.button.primary,
.mini-tab.is-active,
.module-tab.is-active,
.period-button.is-active {
  background: #0a410f;
  border-color: #0a410f;
  color: #fff;
}

.product-thumb,
.product-thumb-button {
  width: 88px !important;
  min-width: 88px !important;
  height: 88px !important;
  border-radius: 8px;
}

.chart-period-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border-soft);
}

.chart-period-picker > span {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.data-source-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid #0a410f;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 15px;
}

.data-source-line strong {
  color: var(--ink);
}

@media (max-width: 760px) {
  .chart-period-picker,
  .data-source-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .period-tabs {
    width: 100%;
    overflow-x: auto;
  }
}

[data-theme="dark"] {
  --ink: #f1f5f9;
  --ink-soft: #cbd5e1;
  --ink-faint: #94a3b8;
  --cream: #0f172a;
  --paper: #172033;
  --paper-soft: #1e293b;
  --sand: #334155;
  --sage: #17345f;
  --sage-soft: #172a49;
  --blue-soft: #17345f;
  --terracotta-soft: #4a2618;
  --amber-soft: #423516;
  --red-soft: #4a2025;
  --danger: #f97066;
  --success: #47cd89;
  --border: #334155;
  --border-soft: #273449;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 24px 72px rgba(0, 0, 0, 0.46);
  color-scheme: dark;
}

[data-theme="dark"] button:focus-visible,
[data-theme="dark"] input:focus-visible,
[data-theme="dark"] textarea:focus-visible,
[data-theme="dark"] select:focus-visible,
[data-theme="dark"] [tabindex]:focus-visible {
  outline-color: #b7e0bd;
}

[data-theme="dark"] .runtime-auth-tab.is-active,
[data-theme="dark"] .auth-callout strong,
[data-theme="dark"] .nav-item.is-active,
[data-theme="dark"] button.import-step.is-current,
[data-theme="dark"] .modal-mark,
[data-theme="dark"] .modal-safety strong,
[data-theme="dark"] .view-conclusion > span:first-child,
[data-theme="dark"] .next-action-label {
  color: #8ab4f8;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #0a410f;
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 120;
  padding: 9px 14px;
  color: var(--white);
  background: var(--forest);
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 0 0, rgba(127, 149, 106, 0.2), transparent 18rem),
    linear-gradient(175deg, #183f35 0%, #102d27 100%);
  box-shadow: 12px 0 34px rgba(15, 46, 39, 0.11);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 82px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-monogram {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--forest);
  background: #dbe4c8;
  border-radius: 50% 50% 48% 52% / 46% 55% 45% 54%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  color: #f5f1e7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  letter-spacing: 0.09em;
}

.brand-copy span,
.sidebar-footer small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.sidebar-close {
  display: none;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.8);
}

.environment-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 14px 8px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
}

.environment-badge > span:last-child {
  display: grid;
}

.environment-badge strong {
  font-size: 12px;
  font-weight: 650;
}

.environment-badge small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #a4c57a;
  border: 2px solid rgba(164, 197, 122, 0.24);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(164, 197, 122, 0.1);
}

.nav-groups {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 11px 20px;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  scrollbar-width: thin;
}

.nav-group {
  margin-top: 17px;
}

.nav-label {
  margin: 0 9px 5px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  border: 0;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.065);
}

.nav-item.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(211, 225, 190, 0.2), rgba(211, 225, 190, 0.08));
  box-shadow: inset 2px 0 #c9d9ac;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  color: #d7e3c5;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}

.nav-item.is-active .nav-icon {
  color: var(--forest);
  background: #d7e3c5;
}

.workspace {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 243, 235, 0.94);
  border-bottom: 1px solid rgba(222, 223, 216, 0.82);
  backdrop-filter: blur(14px);
}

.topbar-primary {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding: 12px 28px 9px;
}

.page-identity {
  min-width: 180px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--moss);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-identity h1 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.icon-button,
.profile-button,
.search-trigger,
.button,
.segmented-button,
.chip,
.filter-button,
.text-link,
.icon-text-button,
.store-tab,
.mini-tab,
.period-button,
.module-tab,
.matrix-cell,
.asset-card,
.knowledge-card,
.product-gallery-card {
  -webkit-tap-highlight-color: transparent;
}

.icon-button {
  display: inline-grid;
  position: relative;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--white);
  border-color: #c9cbc1;
}

.menu-button {
  display: none;
  gap: 3px;
}

.menu-button span {
  display: block;
  width: 15px;
  height: 1.5px;
  background: var(--ink);
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(310px, 27vw);
  min-height: 38px;
  padding: 0 10px;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
}

.search-trigger > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

kbd {
  margin-left: auto;
  padding: 2px 6px;
  color: var(--ink-faint);
  background: var(--sage-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: inset 0 -1px rgba(0, 0, 0, 0.04);
  font-family: inherit;
  font-size: 10px;
}

.notification-button {
  color: var(--forest);
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  background: var(--terracotta);
  border: 1px solid var(--paper);
  border-radius: 50%;
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 3px 10px 3px 4px;
  background: transparent;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
}

.profile-button:hover {
  background: rgba(255, 255, 255, 0.66);
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--white);
  background: var(--forest-2);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 650;
}

.profile-name {
  font-size: 12px;
  font-weight: 650;
}

.store-switcher {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px 10px;
}

.switcher-label {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 650;
}

.store-tabs,
.scrolling-tabs {
  display: flex;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.store-tabs::-webkit-scrollbar,
.scrolling-tabs::-webkit-scrollbar {
  display: none;
}

.store-tab {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 11px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.store-tab:hover {
  background: rgba(255, 255, 255, 0.72);
}

.store-tab.is-active {
  color: var(--forest);
  background: var(--white);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.demo-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  padding: 6px 28px;
  color: #6d5c39;
  background: #f5ecd9;
  border-top: 1px solid #eadfc9;
  font-size: 11px;
}

.demo-pill {
  padding: 2px 6px;
  color: #765716;
  background: #e9d7ad;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.main-content {
  width: 100%;
  max-width: 1660px;
  margin: 0 auto;
  padding: 24px 28px 42px;
}

.view-enter {
  animation: view-enter 0.28s ease both;
}

@keyframes view-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.view-header h2,
.section-heading h2,
.card-title {
  margin: 0;
  color: var(--ink);
}

.view-header h2 {
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: 23px;
  font-weight: 600;
}

.view-header p {
  max-width: 760px;
  margin: 5px 0 0;
  color: var(--ink-soft);
}

.header-actions,
.toolbar-actions,
.card-actions,
.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
  box-shadow: 0 7px 16px rgba(24, 62, 53, 0.16);
}

.button.primary:hover {
  background: #225145;
}

.button.secondary {
  color: var(--ink);
  background: var(--white);
  border-color: var(--border);
}

.button.ghost {
  color: var(--forest);
  background: transparent;
  border-color: rgba(24, 62, 53, 0.18);
}

.button.danger-soft {
  color: var(--red);
  background: var(--red-soft);
  border-color: #f4d3d0;
}

.button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.quiet-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-faint);
  font-size: 11px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.grid.two-column {
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.75fr);
}

.grid.equal-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  min-width: 0;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card.padded {
  padding: 18px;
}

.metric-card {
  position: relative;
  min-height: 134px;
  padding: 17px;
  overflow: hidden;
}

.metric-card::after {
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 100px;
  height: 100px;
  content: "";
  background: radial-gradient(circle, rgba(127, 149, 106, 0.14), transparent 68%);
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  color: var(--forest);
  background: var(--sage-soft);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.metric-value {
  display: block;
  margin-top: 9px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 2.2vw, 32px);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.metric-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 10px;
}

.trend {
  padding: 2px 5px;
  border-radius: 5px;
  font-weight: 700;
}

.trend.up {
  color: var(--forest-2);
  background: var(--sage-soft);
}

.trend.down {
  color: var(--terracotta);
  background: var(--terracotta-soft);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px 12px;
}

.card-header.border-bottom {
  border-bottom: 1px solid var(--border-soft);
}

.card-title {
  font-size: 15px;
  font-weight: 750;
}

.card-subtitle {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.period-tabs,
.mini-tabs,
.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: var(--sage-soft);
  border-radius: 9px;
}

.period-button,
.mini-tab,
.segmented-button {
  min-height: 28px;
  padding: 5px 9px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 10px;
  white-space: nowrap;
}

.period-button.is-active,
.mini-tab.is-active,
.segmented-button.is-active {
  color: var(--forest);
  background: var(--white);
  box-shadow: 0 1px 4px rgba(24, 62, 53, 0.09);
  font-weight: 750;
}

.chart-wrap {
  position: relative;
  min-height: 292px;
  padding: 3px 12px 13px;
}

.chart-canvas {
  display: block;
  width: 100%;
  height: 270px;
}

.chart-legend {
  display: flex;
  gap: 15px;
  padding: 0 18px 14px;
  color: var(--ink-soft);
  font-size: 10px;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
}

.legend-dot.sales { background: var(--forest-2); }
.legend-dot.target { background: var(--terracotta); }
.legend-dot.orders { background: var(--moss); }

.insight-list {
  display: grid;
  gap: 10px;
  padding: 2px 18px 18px;
}

.insight-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}

.insight-item:last-child {
  border-bottom: 0;
}

.insight-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--forest);
  background: var(--sage-soft);
  border-radius: 9px;
  font-family: Georgia, serif;
  font-weight: 700;
}

.insight-copy strong,
.list-copy strong {
  display: block;
  font-size: 12px;
}

.insight-copy span,
.list-copy span {
  color: var(--ink-faint);
  font-size: 10px;
}

.insight-value {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.section-gap {
  margin-top: 16px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 27px 0 12px;
}

.section-heading h2 {
  font-size: 17px;
}

.section-heading p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.alert-strip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  color: #6d4e15;
  background: var(--amber-soft);
  border: 1px solid #ead4aa;
  border-radius: 11px;
}

.alert-strip.danger {
  color: #7d3434;
  background: var(--red-soft);
  border-color: #efcbc8;
}

.alert-strip.info {
  color: #315f68;
  background: var(--blue-soft);
  border-color: #c9e0e4;
}

.alert-strip strong {
  display: block;
  font-size: 12px;
}

.alert-strip p {
  margin: 2px 0 0;
  font-size: 11px;
}

.alert-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 25px;
  height: 25px;
  background: rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 11px 12px;
  background: rgba(255, 253, 248, 0.76);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.field,
.field-select,
.field-textarea {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.field,
.field-select {
  min-height: 36px;
  padding: 7px 10px;
}

.field {
  width: min(260px, 100%);
}

.field-select {
  min-width: 118px;
}

.field-textarea {
  width: 100%;
  min-height: 180px;
  padding: 13px;
  line-height: 1.75;
  resize: vertical;
}

.table-shell {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table th {
  padding: 11px 12px;
  color: var(--ink-faint);
  background: #f8f7f1;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.14s ease;
}

.data-table tbody tr:hover {
  background: rgba(238, 242, 233, 0.62);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.product-thumb,
.asset-thumb,
.media-thumb {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(255,255,255,.7), rgba(255,255,255,.05)),
    var(--thumb-color, #dce5d5);
}

.product-thumb {
  display: grid;
  place-items: center;
  width: 43px;
  height: 48px;
  border: 1px solid rgba(24, 62, 53, 0.08);
  border-radius: 8px 8px 12px 12px;
}

.product-thumb::after {
  width: 18px;
  height: 28px;
  content: "";
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 62, 53, 0.11);
  border-radius: 4px 4px 8px 8px;
  box-shadow: 0 8px 12px rgba(24, 62, 53, 0.08);
}

.product-thumb.has-runtime-image::after {
  display: none;
}

.product-missing-image {
  align-content: center;
  gap: 9px;
  padding: 10px;
  color: var(--forest);
  background: linear-gradient(155deg, #fbfaf6, #e9eee6);
  text-align: center;
}

.product-missing-image::after { display: none; }

.product-missing-image strong {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .08em;
  line-height: 1.15;
}

.product-missing-image em {
  color: var(--ink-faint);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.product-thumb > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper-soft);
}

.product-cell .candidate-thumb-label {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 2;
  display: block;
  margin: 0;
  padding: 1px 3px;
  color: #fff;
  background: rgba(133, 49, 37, 0.92);
  border-radius: 4px;
  font-size: 7px;
  font-weight: 800;
  line-height: 1.3;
}

.runtime-review-thumbnail-error {
  display: grid;
  min-width: 0;
  min-height: 44px;
  place-items: center;
  padding: 4px;
  color: var(--danger);
  font-size: var(--text-xs);
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
}

.product-cell strong {
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-cell span {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 9px;
}

.product-cell small {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
}

.product-name-button {
  max-width: 250px;
  padding: 0;
  color: var(--forest);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  line-height: 1.45;
  text-align: left;
}

.product-name-button:hover,
.product-name-button:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.badge.success {
  color: #315e47;
  background: #e4f0df;
}

.badge.warning {
  color: #805b18;
  background: var(--amber-soft);
}

.badge.danger {
  color: #8f3838;
  background: var(--red-soft);
}

.badge.info {
  color: #3a6670;
  background: var(--blue-soft);
}

.badge.neutral {
  color: #5f6d66;
  background: #edefe9;
}

.badge.dark {
  color: #eff4ea;
  background: var(--forest);
}

.text-link,
.icon-text-button {
  padding: 0;
  color: var(--forest-2);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.text-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.text-link:hover,
.icon-text-button:hover {
  text-decoration: underline;
}

.text-link:disabled,
.icon-text-button:disabled {
  color: #66736c;
  opacity: 0.68;
  cursor: not-allowed;
  text-decoration: none;
}

.text-link:disabled:hover,
.icon-text-button:disabled:hover {
  text-decoration: none;
}

.media-review-block-note {
  flex-basis: 100%;
  max-width: 260px;
  line-height: 1.45;
}

.gallery-grid,
.asset-grid,
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.product-gallery-card,
.asset-card,
.knowledge-card {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-gallery-card:hover,
.asset-card:hover,
.knowledge-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.gallery-visual {
  display: grid;
  place-items: center;
  min-height: 165px;
  background:
    radial-gradient(circle at 65% 35%, rgba(255,255,255,.65), transparent 32%),
    linear-gradient(135deg, var(--thumb-color, #dce5d5), #f8f5ed);
}

.bottle-shape {
  position: relative;
  width: 57px;
  height: 100px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 62, 53, 0.13);
  border-radius: 8px 8px 17px 17px;
  box-shadow: 0 18px 25px rgba(24, 62, 53, 0.13);
}

.bottle-shape::before {
  position: absolute;
  top: -13px;
  left: 17px;
  width: 22px;
  height: 14px;
  content: "";
  background: var(--forest);
  border-radius: 3px 3px 0 0;
}

.bottle-shape::after {
  position: absolute;
  top: 38px;
  left: 8px;
  width: 39px;
  height: 24px;
  content: "AB";
  color: var(--forest);
  border-top: 1px solid rgba(24, 62, 53, 0.25);
  border-bottom: 1px solid rgba(24, 62, 53, 0.25);
  font-family: Georgia, serif;
  font-size: 9px;
  line-height: 24px;
  text-align: center;
}

.video-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
}

.gallery-copy,
.asset-copy,
.knowledge-copy {
  padding: 13px;
}

.gallery-copy strong,
.asset-copy strong,
.knowledge-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.gallery-copy p,
.asset-copy p,
.knowledge-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink-faint);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 10px;
}

.gallery-meta,
.asset-meta,
.knowledge-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 9px;
}

.stat-list {
  display: grid;
  gap: 0;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}

.stat-row:last-child {
  border-bottom: 0;
}

.stat-row span {
  color: var(--ink-soft);
  font-size: 11px;
}

.stat-row strong {
  font-variant-numeric: tabular-nums;
}

.stock-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 18px;
}

.stock-summary-item {
  padding: 12px;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

.stock-summary-item span {
  display: block;
  color: var(--ink-faint);
  font-size: 10px;
}

.stock-summary-item strong {
  display: block;
  margin-top: 4px;
  font-family: Georgia, serif;
  font-size: 20px;
}

.rule-box {
  padding: 15px;
  background: linear-gradient(135deg, #173c33, #24594b);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.rule-box h3 {
  margin: 0 0 7px;
  color: #fff;
  font-size: 14px;
}

.rule-box p {
  margin: 0;
  font-size: 11px;
}

.rule-formula {
  display: block;
  margin: 11px 0;
  padding: 9px 10px;
  color: #dce8ca;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-family: Consolas, monospace;
  font-size: 10px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 18px;
}

.timeline-step {
  position: relative;
  min-height: 74px;
  padding: 0 12px;
}

.timeline-step::before {
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  height: 2px;
  content: "";
  background: var(--border);
}

.timeline-step:first-child::before { left: 50%; width: 50%; }
.timeline-step:last-child::before { width: 50%; }

.timeline-dot {
  position: relative;
  z-index: 1;
  display: block;
  width: 20px;
  height: 20px;
  margin: 0 auto 9px;
  background: var(--paper);
  border: 5px solid var(--moss);
  border-radius: 50%;
}

.timeline-step.is-current .timeline-dot {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 4px var(--terracotta-soft);
}

.timeline-step strong,
.timeline-step span {
  display: block;
  text-align: center;
}

.timeline-step strong { font-size: 11px; }
.timeline-step span { color: var(--ink-faint); font-size: 9px; }

.forecast-bar {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.forecast-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  background: #e8ebe2;
  border-radius: 999px;
}

.forecast-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--forest-2), var(--moss));
  border-radius: inherit;
}

.forecast-fill.warning { background: linear-gradient(90deg, #c08332, #e2b267); }
.forecast-fill.danger { background: linear-gradient(90deg, #aa4b43, #db8576); }

.import-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 18px;
}

.import-step {
  position: relative;
  padding: 13px;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 11px;
}

.import-step::after {
  position: absolute;
  top: 50%;
  right: -10px;
  z-index: 1;
  color: var(--moss);
  content: "→";
  transform: translateY(-50%);
}

.import-step:last-child::after { display: none; }

.import-step span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-bottom: 8px;
  color: var(--forest);
  background: var(--sage);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
}

.import-step strong { display: block; font-size: 11px; }
.import-step small { color: var(--ink-faint); font-size: 9px; }

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 26px;
  border: 1.5px dashed #aeb9a5;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(238, 242, 233, .82), rgba(255, 253, 248, .82));
  text-align: center;
}

.drop-zone-icon {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  margin-bottom: 10px;
  color: var(--forest);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  font-size: 20px;
}

.drop-zone h3 { margin: 0; font-size: 14px; }
.drop-zone p { max-width: 420px; margin: 5px 0 13px; color: var(--ink-faint); font-size: 10px; }

.evidence-list {
  display: grid;
  gap: 9px;
}

.evidence-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

.file-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 36px;
  color: var(--forest-2);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 8px;
  font-weight: 800;
}

.file-meta strong { display: block; font-size: 10px; }
.file-meta span { color: var(--ink-faint); font-size: 9px; }

.asset-thumb {
  min-height: 138px;
  background:
    linear-gradient(160deg, rgba(255,255,255,.1), rgba(255,255,255,.6)),
    linear-gradient(130deg, var(--asset-a, #cedbc3), var(--asset-b, #f4eadb));
}

.asset-thumb::before,
.asset-thumb::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.asset-thumb::before {
  right: 12%;
  bottom: -25%;
  width: 72%;
  height: 105%;
  background: rgba(255,255,255,.28);
  transform: rotate(-14deg);
}

.asset-thumb::after {
  top: 28%;
  left: 23%;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(24, 62, 53, 0.16);
  box-shadow: inset 0 0 0 9px rgba(255,255,255,.32), 0 14px 30px rgba(24,62,53,.12);
}

.asset-type {
  position: absolute;
  top: 10px;
  right: 10px;
}

.vi-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.swatch {
  min-height: 86px;
  padding: 8px;
  color: var(--swatch-text, #fff);
  background: var(--swatch-color);
  border-radius: 10px;
  font-size: 9px;
}

.swatch strong { display: block; margin-top: 38px; font-size: 10px; }

.matrix-wrap {
  overflow-x: auto;
}

.product-matrix {
  display: grid;
  grid-template-columns: 132px repeat(4, minmax(132px, 1fr));
  min-width: 760px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
}

.matrix-head,
.matrix-label,
.matrix-cell {
  min-height: 84px;
  padding: 12px;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.matrix-head {
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  background: var(--cream);
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}

.matrix-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--cream);
}

.matrix-label strong { font-size: 11px; }
.matrix-label span { color: var(--ink-faint); font-size: 9px; }

.matrix-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--ink);
  background: var(--paper);
  border-top: 0;
  border-left: 0;
  cursor: pointer;
  text-align: left;
}

.matrix-cell:hover { background: var(--sage-soft); }
.matrix-cell strong { font-size: 10px; }
.matrix-cell span { margin-top: 3px; color: var(--ink-faint); font-size: 9px; }

.module-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
  padding: 5px;
  overflow-x: auto;
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  scrollbar-width: thin;
}

.module-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 11px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 10px;
  white-space: nowrap;
}

.module-tab.is-active {
  color: #fff;
  background: var(--forest);
  box-shadow: 0 4px 10px rgba(24, 62, 53, .18);
  font-weight: 700;
}

.competitor-topic-tabs {
  margin-top: 4px;
  margin-bottom: 22px;
}

.competitor-topic-tabs .module-tab {
  min-height: 42px;
  padding: 9px 14px;
  font-size: 13px;
}

.competitor-panel {
  display: grid;
  gap: 18px;
}

.competitor-brand-filter {
  display: grid;
  gap: 7px;
  width: min(320px, 100%);
}

.competitor-brand-filter > span,
.competitor-compare-controls label > span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.competitor-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.competitor-insight-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

.competitor-insight-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border-soft);
}

.competitor-insight-card > header span {
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
}

.competitor-insight-card h3 {
  margin: 5px 0 4px;
  font-size: 18px;
}

.competitor-insight-card header p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 12px;
}

.competitor-insight-card dl {
  margin: 0;
  padding: 6px 22px 10px;
}

.competitor-insight-card dl > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.competitor-insight-card dl > div:last-child { border-bottom: 0; }
.competitor-insight-card dt { color: var(--ink-faint); font-size: 12px; }
.competitor-insight-card dd { margin: 0; color: var(--ink); font-size: 14px; line-height: 1.65; }
.competitor-insight-card footer { padding: 0 22px 18px; }
.competitor-more-fields {
  margin: 0 22px 16px;
  border-top: 1px solid var(--border-soft);
}
.competitor-more-fields summary {
  padding: 13px 0;
  color: var(--forest);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.competitor-more-fields dl { padding: 0; }

.competitor-compare-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

.competitor-compare-controls label {
  display: grid;
  gap: 7px;
}

.competitor-view-switch {
  display: flex;
  width: max-content;
  padding: 3px;
  background: var(--cream);
  border-radius: 3px;
}

.competitor-view-switch button {
  min-height: 42px;
  padding: 0 20px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 700;
}

.competitor-view-switch button.is-active {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 1px 4px rgba(16, 16, 16, .08);
}

.competitor-page-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
  align-items: start;
  min-height: 640px;
  padding: 14px;
  background: #ebece7;
  border-radius: 10px;
}

.competitor-page-compare > section {
  min-width: 0;
  min-height: 610px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.competitor-page-compare > section > header {
  min-height: 76px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.competitor-page-compare h3 { margin: 0 0 5px; font-size: 18px; }
.competitor-page-compare header p { margin: 0; color: var(--ink-faint); font-size: 12px; line-height: 1.5; }
.competitor-vs { align-self: start; justify-self: center; margin-top: 285px; color: var(--forest); font-size: 12px; font-weight: 900; }

.competitor-own-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding: 12px;
}

.competitor-own-image,
.competitor-long-image {
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-soft);
  cursor: zoom-in;
}

.competitor-own-image img,
.competitor-long-image img {
  display: block;
  width: 100%;
  height: auto;
}

.competitor-own-image span {
  display: block;
  padding: 8px 10px;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: left;
}

.competitor-long-image {
  display: block;
  width: 100%;
  max-height: 720px;
  overflow: auto;
  border: 0;
}

.competitor-analysis { display: grid; gap: 16px; }
.competitor-verdict {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}
.competitor-verdict span { color: var(--forest); font-size: 12px; font-weight: 800; }
.competitor-verdict h2 { margin: 5px 0; font-size: 26px; }
.competitor-verdict p { margin: 0; color: var(--ink-soft); line-height: 1.6; }
.competitor-score-pair { display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 12px; padding: 12px 16px; background: var(--sage-soft); }
.competitor-score-pair strong { color: var(--forest); font-size: 28px; }
.competitor-score-pair span { color: var(--ink-faint); font-size: 11px; }

.competitor-copy-section,
.competitor-difference-column {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}
.competitor-copy-section > header { display: flex; justify-content: space-between; margin-bottom: 12px; }
.competitor-copy-section h3,
.competitor-difference-column h3 { margin: 0; font-size: 18px; }
.competitor-copy-match { display: grid; grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr); gap: 10px; align-items: start; margin-top: 8px; }
.competitor-copy-match mark { padding: 10px; color: var(--ink); background: #e6f1e9; border: 1px solid #c8ddcf; line-height: 1.55; }
.competitor-copy-match span { padding-top: 10px; color: var(--ink-faint); font-size: 11px; text-align: center; }
.competitor-difference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.competitor-difference-column details { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.competitor-difference-column details:last-child { border-bottom: 0; }
.competitor-difference-column summary { cursor: pointer; font-weight: 700; }
.competitor-difference-column summary span { float: right; color: var(--forest); }
.competitor-difference-column details p { color: var(--ink-soft); line-height: 1.7; }
.competitor-footnote { margin: 0; color: var(--ink-faint); font-size: 12px; }
.competitor-image-modal { max-height: 76vh; overflow: auto; background: #f2f2ee; }
.competitor-image-modal img { display: block; width: 100%; height: auto; }

@media (max-width: 1100px) {
  .competitor-insight-grid,
  .competitor-difference-grid { grid-template-columns: 1fr; }
  .competitor-page-compare { grid-template-columns: 1fr; }
  .competitor-vs { display: none; }
  .competitor-compare-controls { grid-template-columns: 1fr; }
}

.finance-tabs {
  margin-bottom: 16px;
}

.finance-layout {
  align-items: start;
}

.finance-card-header {
  padding: 0 0 12px;
}

.finance-mode {
  margin-top: 2px;
}

.finance-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.finance-fields.one-column {
  grid-template-columns: minmax(0, 1fr);
}

.finance-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.finance-field-label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.finance-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 40px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.finance-input-wrap:focus-within {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(127, 149, 106, .14);
}

.finance-input-wrap:has(.finance-input[aria-invalid="true"]) {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(157, 69, 62, .09);
}

.finance-input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-family: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.finance-input[readonly] {
  color: var(--ink-soft);
  background: rgba(238, 240, 232, .48);
  cursor: default;
}

.finance-input-wrap > span {
  padding: 0 10px 0 5px;
  color: var(--ink-faint);
  font-size: 10px;
}

.finance-field small {
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.45;
}

.closed-actual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.closed-actual-card {
  min-width: 0;
  padding: 13px;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 11px;
}

.closed-actual-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.closed-actual-header strong,
.closed-actual-header small {
  display: block;
}

.closed-actual-header strong {
  font-size: 11px;
}

.closed-actual-header small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
}

.actual-source,
.actual-ratio {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border-soft);
}

.actual-source span,
.actual-ratio span {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-size: 8px;
}

.actual-source strong {
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-align: right;
}

.actual-ratio strong {
  color: var(--forest);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.finance-promo-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

.finance-promo-toggle strong {
  display: block;
  font-size: 11px;
}

.finance-promo-toggle p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.promo-basis {
  display: grid;
  gap: 6px;
  margin-top: 11px;
  padding: 10px;
  color: var(--ink-faint);
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  font-size: 8px;
  overflow-wrap: anywhere;
}

.promo-basis strong {
  display: inline-block;
  min-width: 58px;
  margin-right: 5px;
  color: var(--ink-soft);
}

.finance-rule-box {
  min-height: 174px;
}

.finance-month-card {
  display: grid;
  gap: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.finance-month-card.is-selected {
  border-color: rgba(38, 91, 76, .42);
  box-shadow: 0 0 0 2px rgba(38, 91, 76, .08), var(--shadow-sm);
}

.finance-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2px 12px;
  margin-top: 4px;
  padding: 13px;
  background: var(--sage-soft);
  border-radius: 10px;
}

.finance-result > span {
  color: var(--ink-soft);
  font-size: 10px;
}

.finance-result strong {
  grid-row: span 2;
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2vw, 27px);
  font-variant-numeric: tabular-nums;
}

.finance-result small {
  color: var(--ink-faint);
  font-size: 9px;
}

.finance-month-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-faint);
  font-size: 9px;
}

.validation-list {
  display: grid;
  gap: 3px;
  margin: 6px 0 0;
  padding-left: 17px;
  font-size: 10px;
}

.cashflow-flow {
  display: grid;
  gap: 0;
}

.cashflow-step {
  display: grid;
  position: relative;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  min-height: 70px;
  padding-bottom: 12px;
}

.cashflow-step::before {
  position: absolute;
  top: 30px;
  bottom: 0;
  left: 14px;
  width: 1px;
  content: "";
  background: var(--border);
}

.cashflow-step:last-child::before {
  display: none;
}

.cashflow-step > span {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--forest);
  background: var(--sage-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
}

.cashflow-step.is-pending > span {
  color: #805b18;
  background: var(--amber-soft);
}

.cashflow-step strong {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.cashflow-step p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.purchase-lanes {
  display: grid;
  gap: 10px;
}

.purchase-lanes article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 12px;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

.purchase-lanes strong {
  display: block;
  font-size: 11px;
}

.purchase-lanes p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.65;
}

.cashflow-table {
  min-width: 760px;
}

.compare-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.brand-compare-card {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 13px;
}

.brand-compare-card.ours {
  background: linear-gradient(140deg, #173d34, #255448);
  color: rgba(255,255,255,.8);
  border-color: transparent;
}

.brand-compare-card.ours h3 { color: #fff; }
.brand-compare-card h3 { margin: 4px 0 3px; font-family: Georgia, serif; }
.brand-compare-card p { margin: 0; color: inherit; font-size: 10px; }

.versus {
  display: grid;
  place-items: center;
  color: var(--moss);
  font-family: Georgia, serif;
  font-size: 13px;
  font-style: italic;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.compare-block {
  padding: 14px;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 11px;
}

.compare-block h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 11px;
}

.compare-block p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.evidence-placeholder {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 22px;
  color: var(--ink-faint);
  background:
    repeating-linear-gradient(-45deg, rgba(127,149,106,.05) 0 10px, transparent 10px 20px),
    #f5f6f0;
  border: 1.5px dashed #b8c0b0;
  border-radius: 12px;
  text-align: center;
}

.evidence-placeholder span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  color: var(--forest-2);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 13px;
  font-size: 20px;
}

.evidence-placeholder strong { display: block; color: var(--ink); font-size: 12px; }
.evidence-placeholder p { max-width: 360px; margin: 4px 0 0; font-size: 10px; }

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.collection-field {
  padding: 11px;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

.collection-field > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-faint);
  font-size: 9px;
}

.collection-field strong { font-size: 11px; }

.compliance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  gap: 16px;
}

.compliance-disclaimer {
  padding: 12px 14px;
  color: #704f18;
  background: var(--amber-soft);
  border: 1px solid #ead4aa;
  border-radius: 10px;
  font-size: 10px;
}

.review-results {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.finding {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 11px;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

.finding-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
}

.finding strong { display: block; font-size: 11px; }
.finding p { margin: 2px 0 0; color: var(--ink-faint); font-size: 9px; }

.risk-score {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 13px;
  padding: 14px;
  background: var(--cream);
  border-radius: 11px;
}

.score-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  background: var(--sage-soft);
  border-radius: 50%;
}

.score-ring.has-findings { background: var(--red-soft); }
.score-ring.no-findings { background: var(--sage-soft); }

.score-ring::before {
  position: absolute;
  width: 60px;
  height: 60px;
  content: "";
  background: var(--cream);
  border-radius: 50%;
}

.score-ring span {
  z-index: 1;
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
}

.score-ring.has-findings span { color: var(--red); }

.score-copy strong { display: block; }
.score-copy p { margin: 4px 0 0; color: var(--ink-faint); font-size: 10px; }

.rule-source {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}

.rule-source:last-child { border-bottom: 0; }
.rule-source span:first-child {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--forest);
  background: var(--sage-soft);
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
}
.rule-source strong { display: block; font-size: 10px; }
.rule-source small { color: var(--ink-faint); font-size: 9px; }

.activity-list {
  display: grid;
  gap: 0;
}

.activity-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.activity-row:last-child { border-bottom: 0; }

button.activity-row {
  width: 100%;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

button.activity-row:last-child { border-bottom: 0; }

.activity-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  background: var(--moss);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--sage-soft);
}
.activity-row strong { display: block; font-size: 10px; }
.activity-row p { margin: 2px 0 0; color: var(--ink-faint); font-size: 9px; }
.activity-row time { color: var(--ink-faint); font-size: 9px; }

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 28px;
  color: var(--ink-faint);
  text-align: center;
}

.empty-state strong { color: var(--ink); }
.empty-state p { max-width: 480px; margin: 5px 0; font-size: 11px; }

.empty-state.is-compact {
  min-height: 168px;
  padding: 24px;
}

.modal-backdrop,
.search-overlay,
.drawer-backdrop {
  position: fixed;
  inset: 0;
}

.modal-backdrop,
.search-overlay {
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(11, 34, 29, 0.46);
  backdrop-filter: blur(8px);
}

.modal {
  position: relative;
  width: min(470px, 100%);
  padding: 27px;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  animation: modal-enter 0.2s ease both;
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(.97) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.modal-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 15px;
  color: var(--forest);
  background: var(--sage);
  border-radius: 13px;
  font-weight: 800;
}

.modal h2 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 23px;
}

.modal > p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.modal-safety {
  display: grid;
  gap: 2px;
  margin-top: 18px;
  padding: 12px;
  color: var(--ink-soft);
  background: var(--sage-soft);
  border-radius: 10px;
  font-size: 10px;
}

.modal-safety strong { color: var(--forest); }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 19px;
}

.command-palette {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(680px, 100%);
  height: min(680px, 85vh);
  height: min(680px, 85dvh);
  max-height: none;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: modal-enter 0.2s ease both;
}

.command-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}

.command-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}

.command-results {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 8px;
}

.command-result {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.command-result:hover,
.command-result.is-selected {
  background: var(--sage-soft);
}

.command-result-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--forest);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
}

.command-result strong { display: block; font-size: 11px; }
.command-result span { color: var(--ink-faint); font-size: 9px; }
.command-result em { color: var(--ink-faint); font-size: 9px; font-style: normal; }

.runtime-search-notice {
  display: grid;
  gap: 2px;
  margin: 4px 4px 8px;
  padding: 9px 11px;
  color: #315f68;
  background: var(--blue-soft);
  border: 1px solid #c9e0e4;
  border-radius: 9px;
}

.runtime-search-notice.is-danger {
  color: #7d3434;
  background: var(--red-soft);
  border-color: #efcbc8;
}

.runtime-search-notice strong { font-size: 11px; }
.runtime-search-notice span { font-size: 9px; line-height: 1.5; }

.runtime-search-group + .runtime-search-group {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--border-soft);
}

.runtime-search-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 10px 6px;
  color: var(--ink-soft);
}

.runtime-search-group-title strong { font-size: 10px; }
.runtime-search-group-title span { color: var(--ink-faint); font-size: 9px; }

.command-result-copy {
  display: block;
  min-width: 0;
}

.runtime-search-result .command-result-copy strong,
.runtime-search-result .command-result-copy span,
.runtime-search-result .command-result-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.runtime-search-result .command-result-copy strong {
  white-space: nowrap;
}

.runtime-search-result .runtime-search-meta {
  display: block;
  margin-top: 1px;
  white-space: nowrap;
}

.runtime-search-result .command-result-copy small {
  display: -webkit-box;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.runtime-search-result.is-source-index .command-result-icon {
  color: #315f68;
  background: var(--blue-soft);
  border-color: #c9e0e4;
}

.command-hint {
  margin: 0;
  padding: 9px 14px;
  color: var(--ink-faint);
  background: var(--cream);
  border-top: 1px solid var(--border-soft);
  font-size: 9px;
}

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 130;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 40px));
}

.toast {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 14px;
  color: rgba(255,255,255,.86);
  background: #173b33;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 11px;
  box-shadow: var(--shadow-md);
  animation: toast-enter .22s ease both;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--forest);
  background: #dce7cb;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
}

.toast strong { display: block; color: #fff; font-size: 11px; }
.toast span { display: block; margin-top: 1px; color: rgba(255,255,255,.58); font-size: 9px; }

@keyframes toast-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.noscript-message {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 200;
  padding: 12px;
  color: white;
  background: var(--red);
  border-radius: 10px;
  text-align: center;
}

@media (max-width: 1180px) {
  .grid.metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid, .asset-grid, .knowledge-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stock-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-name { display: none; }
  .search-trigger { width: min(260px, 28vw); }
  .closed-actual-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .workspace { grid-column: auto; }
  .sidebar {
    transform: translateX(-103%);
    transition: transform .22s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close, .menu-button { display: inline-grid; }
  .drawer-backdrop {
    z-index: 40;
    background: rgba(11, 34, 29, .4);
  }
  .grid.two-column,
  .grid.equal-two,
  .compliance-layout { grid-template-columns: 1fr; }
  .gallery-grid, .asset-grid, .knowledge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-primary { padding-inline: 18px; }
  .store-switcher, .demo-notice { padding-inline: 18px; }
  .main-content { padding: 20px 18px 36px; }
  .search-trigger > span:nth-child(2), .search-trigger kbd { display: none; }
  .search-trigger { width: 38px; justify-content: center; padding: 0; }
  .compare-hero { grid-template-columns: 1fr; }
  .versus { min-height: 20px; }
  .import-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .import-step::after { display: none; }
}

@media (max-width: 640px) {
  .topbar-primary { min-height: 67px; gap: 10px; }
  .page-identity { min-width: 0; }
  .page-identity .eyebrow { display: none; }
  .page-identity h1 { font-size: 20px; white-space: nowrap; }
  .notification-button, .profile-button { display: none; }
  .store-switcher { display: block; padding-bottom: 9px; }
  .switcher-label { display: block; margin-bottom: 5px; }
  .demo-notice { align-items: flex-start; font-size: 10px; }
  .main-content { padding: 16px 12px 30px; }
  .view-header { display: block; }
  .view-header .header-actions { margin-top: 12px; }
  .grid.metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { min-height: 120px; padding: 13px; }
  .metric-value { font-size: 24px; }
  .grid.three-column { grid-template-columns: 1fr; }
  .gallery-grid, .asset-grid, .knowledge-grid { grid-template-columns: 1fr; }
  .gallery-visual { min-height: 145px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-left, .toolbar-actions { width: 100%; }
  .field { flex: 1; }
  .stock-summary { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 8px; }
  .timeline-step { display: grid; grid-template-columns: 25px minmax(0, 1fr); min-height: auto; gap: 9px; padding: 4px; }
  .timeline-step::before { top: 0; left: 15px !important; width: 2px !important; height: 100%; }
  .timeline-dot { margin: 2px 0; }
  .timeline-step strong, .timeline-step span { grid-column: 2; text-align: left; }
  .timeline-step strong { grid-row: 1; }
  .timeline-step span { grid-row: 2; }
  .import-flow { grid-template-columns: 1fr; }
  .compare-grid, .collection-grid { grid-template-columns: 1fr; }
  .vi-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forecast-bar { grid-template-columns: 78px minmax(0, 1fr) 52px; }
  .finance-fields { grid-template-columns: 1fr; }
  .finance-promo-toggle { align-items: flex-start; flex-direction: column; }
  .finance-month-status { align-items: flex-start; flex-direction: column; }
  .card-header { display: block; }
  .card-header .card-actions, .card-header .period-tabs { margin-top: 10px; }
  .chart-wrap { min-height: 240px; }
  .chart-canvas { height: 225px; }
}

@media (max-width: 410px) {
  .grid.metrics { grid-template-columns: 1fr; }
  .stock-summary { grid-template-columns: 1fr; }
  .profile-button { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Meaning remains visible in text; colour is only a secondary cue. */
html .exception-center .badge.danger { color: #8f2424; background: #fde8e8; }
html .exception-center .badge.warning { color: #8a390b; background: #ffe5ce; }
html .exception-center .badge.info { color: #705600; background: #fff2ba; }
html .exception-center .badge.neutral { color: #50575d; background: #eceff1; }

/* Final VI overrides stay last so legacy component rules cannot restore blue. */
:root {
  --ink: #1f2a21;
  --ink-soft: #3c3c3c;
  --ink-faint: #667067;
  --forest: #0a410f;
  --forest-2: #0a410f;
  --moss: #6f8a68;
  --sage: #e1ebe0;
  --sage-soft: #f2f6f1;
  --cream: #f7f7f2;
  --paper-soft: #f4f5f1;
  --blue: #0a410f;
  --blue-soft: #e7f0e5;
  --border: #d7ddd4;
  --border-soft: #e8ece6;
  --font-sans: "Figtree", "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
}

[data-theme="dark"] {
  --ink: #f1f5f9;
  --ink-soft: #cbd5e1;
  --ink-faint: #a7b5c7;
  --cream: #162019;
  --paper: #1d2a20;
  --paper-soft: #243328;
  --forest: #8fc596;
  --forest-2: #8fc596;
  --blue: #8fc596;
  --blue-soft: #253e29;
  --sage: #2d4531;
  --sage-soft: #213526;
  --border: #405445;
  --border-soft: #334639;
}

.app-shell * { background-image: none !important; }
body { font-size: 17px; color: var(--ink); background: var(--cream); }
.global-header, .topbar, .sidebar { background: #0a410f !important; }
.main-content { font-size: 17px; }
.card-subtitle, .quiet-note, .runtime-source-note, .data-table th, .data-table small,
.stat-row span, .chart-legend, .product-compact-status span {
  font-size: 15px !important;
  line-height: 1.55;
}
.data-table td, .data-table strong, .stat-row strong, .product-compact-status strong {
  font-size: 16px !important;
  line-height: 1.55;
}
.button, .mini-tab, .module-tab, .period-button, .text-link, .field, .field-select, .icon-button {
  min-height: 48px;
  font-size: 16px !important;
}
.button.primary, .mini-tab.is-active, .module-tab.is-active, .period-button.is-active {
  background: #0a410f !important;
  border-color: #0a410f !important;
  color: #fff !important;
}
.product-thumb, .product-thumb-button {
  width: 88px !important;
  min-width: 88px !important;
  height: 88px !important;
  border-radius: 8px;
}

.runtime-contract-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.runtime-permission-disabled,
.runtime-permission-disabled:hover {
  cursor: not-allowed;
  opacity: 0.5;
  filter: grayscale(0.35);
  text-decoration: none;
}

@media print {
  .sidebar, .topbar, .header-actions, .toolbar, .button { display: none !important; }
  .app-shell { display: block; }
  .workspace { display: block; }
  .main-content { max-width: none; padding: 0; }
  .card { break-inside: avoid; box-shadow: none; }
}

/* --------------------------------------------------------------------------
   Anna Berlin ERP shell parity layer
   The business views above stay dependency-free; this layer aligns the shell
   and shared primitives with the original blue Ant Design visual baseline.
   -------------------------------------------------------------------------- */

html,
body {
  max-width: 100%;
  min-height: 100%;
  overflow-x: clip;
}

body {
  transition: color 0.18s ease, background-color 0.18s ease;
}

button,
input,
textarea,
select {
  border-radius: 10px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline-color: #0a410f;
}

.skip-link {
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  z-index: 180;
  min-height: 40px;
  color: #fff;
  background: #0a410f;
  border-radius: 10px;
}

/* Local demo entry --------------------------------------------------------- */

.demo-gate {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    max(32px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(32px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  place-items: center;
  background:
    radial-gradient(circle at 12% 8%, rgba(26, 115, 232, 0.18), transparent 28rem),
    radial-gradient(circle at 92% 92%, rgba(23, 78, 166, 0.12), transparent 34rem),
    linear-gradient(145deg, #f8fafc 0%, #eef4ff 100%);
}

[data-theme="dark"] .demo-gate {
  background:
    radial-gradient(circle at 12% 8%, rgba(26, 115, 232, 0.26), transparent 28rem),
    radial-gradient(circle at 92% 92%, rgba(23, 78, 166, 0.2), transparent 34rem),
    #0f172a;
}

.demo-gate-card {
  width: min(100%, 600px);
  padding: clamp(28px, 5vw, 52px);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(23, 78, 166, 0.16);
}

.demo-gate-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  color: #174ea6;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.demo-gate-brand .brand-monogram {
  width: 42px;
  height: 42px;
}

.demo-gate-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #174ea6;
  background: var(--blue-soft);
  border: 1px solid rgba(26, 115, 232, 0.2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.demo-gate h1 {
  margin: 16px 0 8px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.demo-gate-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}

.demo-boundaries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0;
}

.demo-boundaries span {
  position: relative;
  min-height: 44px;
  padding: 10px 12px 10px 34px;
  color: var(--ink-soft);
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 13px;
}

.demo-boundaries span::before {
  position: absolute;
  top: 11px;
  left: 12px;
  content: "✓";
  color: #1a73e8;
  font-weight: 800;
}

.demo-enter-button {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  font-size: 15px;
}

.demo-enter-button span {
  font-size: 20px;
}

.demo-gate-note {
  margin: 14px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
  text-align: center;
}

.runtime-auth {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.runtime-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 18px;
  padding: 4px;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}

.runtime-auth-tab {
  min-height: 42px;
  padding: 8px 14px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.runtime-auth-tab.is-active {
  color: #174ea6;
  background: var(--paper);
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.08);
}

.auth-mode-hint {
  margin: -6px 0 16px;
  padding: 10px 12px;
  color: var(--ink-soft);
  background: rgba(127, 149, 106, 0.1);
  border: 1px solid rgba(127, 149, 106, 0.22);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.55;
}

.auth-mode-hint.is-warning {
  color: var(--danger);
  background: var(--red-soft);
  border-color: rgba(180, 35, 24, 0.2);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.auth-form .field {
  width: 100%;
  min-height: 46px;
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
}

.auth-form-note {
  margin: 10px 2px 0;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.55;
}

.auth-callout {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  color: var(--ink-soft);
  background: var(--blue-soft);
  border: 1px solid rgba(26, 115, 232, 0.2);
  border-radius: 10px;
  font-size: 12px;
}

.auth-callout strong { color: #174ea6; }

.auth-status {
  min-height: 20px;
  margin: 13px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.auth-status.is-error { color: var(--danger); }
.auth-status.is-success { color: var(--success); }

.auth-retry {
  display: block;
  margin: 8px auto 0;
}

.runtime-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.runtime-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.runtime-form-grid .is-wide { grid-column: 1 / -1; }

.runtime-check-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 16px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.runtime-check-options legend {
  padding: 0 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.runtime-form-grid .runtime-check-options label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.runtime-form-grid small {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.55;
}

.runtime-textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

.runtime-code-input {
  tab-size: 2;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre;
}

.runtime-fieldset {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin: 4px 0 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.runtime-fieldset legend {
  padding: 0 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.runtime-check {
  display: flex !important;
  align-items: center;
  align-self: end;
  gap: 10px;
  min-height: var(--tk-target-size, 48px);
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--sage-soft);
  cursor: pointer;
  font-size: var(--tk-control-size, 16px);
  line-height: 1.5;
}

.runtime-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--forest-2);
}

.runtime-check > span {
  display: grid;
  gap: 2px;
}

.runtime-trend {
  padding: 4px 18px 18px;
}

.runtime-trend svg {
  display: block;
  width: 100%;
  min-height: 220px;
}

.runtime-chart-grid {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
}

.runtime-chart-line {
  fill: none;
  stroke: var(--forest-2);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.runtime-chart-labels {
  fill: var(--ink-faint);
  font-family: var(--font-sans);
  font-size: 11px;
}

.runtime-json {
  max-height: 320px;
  margin: 8px 0 0;
  padding: 12px;
  overflow: auto;
  color: var(--ink-soft);
  background: var(--sage-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.runtime-source-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 11px;
  font-weight: 750;
}

.source-index-status {
  margin-bottom: 16px;
}

.runtime-source-note::before {
  width: 7px;
  height: 7px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.runtime-error-card {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
}

.runtime-asset-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.runtime-evidence-shell {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--sage-soft);
}

.runtime-evidence-preview {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(62vh, 720px);
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.asset-governance-card {
  cursor: default;
}

.asset-governance-card .asset-thumb {
  position: relative;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--paper) 88%, var(--border-soft));
}

.asset-governance-card .asset-thumb::before,
.asset-governance-card .asset-thumb::after,
.asset-detail-preview::before,
.asset-detail-preview::after {
  display: none;
}

.asset-open {
  display: block;
  width: 100%;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.runtime-preview-empty {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.asset-governance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px;
  border-top: 1px solid var(--border-soft);
}

.asset-governance-actions .text-link {
  padding-top: 10px;
}

.asset-filter-toolbar .toolbar-left {
  flex-wrap: wrap;
}

.marketing-view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.marketing-page-size {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-faint);
  font-size: 12px;
}

.asset-governance-card .asset-thumb {
  min-height: 210px;
  aspect-ratio: 4 / 3;
}

.asset-availability {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--sage-soft) 72%, var(--paper));
}

.asset-availability strong { color: var(--ink); font-size: 11px; }
.asset-availability span { color: var(--ink-faint); font-size: 10px; line-height: 1.45; }

.marketing-table-preview {
  display: grid;
  place-items: center;
  width: 96px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  color: var(--ink-faint);
  background: var(--sage-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 720px) {
  .marketing-view-bar { align-items: stretch; flex-direction: column; }
  .marketing-page-size { justify-content: space-between; }
}

/* Global header and grouped navigation ----------------------------------- */

.app-shell {
  display: block;
  min-height: 100vh;
  background: var(--cream);
}

.global-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  height: var(--header-height);
  color: #fff;
  background: #174ea6;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.16);
}

.global-header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  padding: 0 20px;
}

.global-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-width: 142px;
}

.brand-monogram {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #174ea6;
  background: #fff;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.03em;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16);
}

.brand-copy {
  display: grid;
  gap: 0;
  min-width: 0;
}

.brand-copy strong {
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.35;
}

.brand-copy span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  letter-spacing: 0.05em;
  line-height: 1.35;
}

.desktop-nav {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}

.sidebar {
  position: static;
  display: block;
  width: auto;
  height: 100%;
  overflow: visible;
  color: inherit;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.drawer-header,
.drawer-environment,
.drawer-footer {
  display: none;
}

.nav-groups {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 100%;
  padding: 0;
  overflow: visible;
}

.nav-group {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
}

.nav-group-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 100%;
  min-height: 44px;
  padding: 0 11px;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-group-trigger:hover,
.nav-group:focus-within > .nav-group-trigger,
.nav-group:hover > .nav-group-trigger {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-group-trigger > span:last-child {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  transition: transform 0.16s ease;
}

.nav-group:hover > .nav-group-trigger > span:last-child,
.nav-group-trigger[aria-expanded="true"] > span:last-child {
  transform: rotate(180deg);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 90;
  display: grid;
  gap: 4px;
  width: 286px;
  max-height: min(70vh, 620px);
  padding: 8px;
  overflow-y: auto;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}

.nav-menu::before {
  position: absolute;
  inset: -9px 0 auto;
  height: 10px;
  content: "";
}

.nav-group:hover > .nav-menu,
.nav-group-trigger[aria-expanded="true"] + .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-group.nav-menu-dismissed:hover > .nav-menu {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
}

.nav-menu-wide {
  width: 310px;
}

.nav-menu-mega {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 570px;
}

.nav-menu-end {
  right: 0;
  left: auto;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}

.nav-item:hover {
  color: var(--ink);
  background: var(--cream);
  transform: none;
}

.nav-item.is-active {
  color: #174ea6;
  background: var(--blue-soft);
}

.nav-item > span:last-child {
  display: grid;
  min-width: 0;
}

.nav-item strong {
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.nav-item small {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #174ea6;
  background: var(--blue-soft);
  border: 0;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.nav-item.is-active .nav-icon {
  color: #fff;
  background: #1a73e8;
}

.nav-more {
  display: none;
}

.menu-button,
.sidebar-close {
  display: none;
}

/* Header utilities -------------------------------------------------------- */

.top-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.global-header .icon-button,
.global-header .profile-button,
.global-header .search-trigger {
  min-width: 40px;
  min-height: 40px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.global-header .notification-button,
.global-header .theme-button,
.global-header .exit-demo-button {
  display: inline-grid;
}

.global-header .profile-button,
.global-header .search-trigger {
  display: flex;
}

.global-header .icon-button:hover,
.global-header .profile-button:hover,
.global-header .search-trigger:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.17);
}

.global-header .search-trigger {
  width: 216px;
  height: 40px;
  padding: 0 10px;
}

.global-header .search-trigger > span:nth-child(2) {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-header .search-trigger kbd {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.global-header .profile-button {
  height: 40px;
  padding: 0 9px 0 5px;
}

.global-header .avatar {
  width: 30px;
  height: 30px;
  color: #174ea6;
  background: #fff;
  border-radius: 9px;
  font-size: 12px;
}

.global-header .profile-name {
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
}

.global-header .notification-dot {
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: #fbbf24;
  border-color: #174ea6;
}

.exit-demo-button {
  width: auto;
  padding: 0 10px;
  gap: 5px;
}

.exit-label {
  font-size: 11px;
}

/* Workspace --------------------------------------------------------------- */

.workspace {
  display: block;
  min-width: 0;
  padding-top: var(--header-height);
  grid-column: auto;
}

.topbar {
  position: sticky;
  top: var(--header-height);
  z-index: 30;
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(12px);
}

.topbar-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px clamp(18px, 3vw, 36px) 8px;
  border-bottom: 0;
}

.page-identity {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 2px;
  color: #1a73e8;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-identity h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.local-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 10px;
  color: var(--ink-soft);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.local-state > span {
  width: 7px;
  height: 7px;
  background: #1a73e8;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.store-switcher {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(18px, 3vw, 36px) 10px;
  border-bottom: 0;
}

.switcher-label {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 700;
}

.store-tabs,
.scrolling-tabs {
  gap: 5px;
  min-width: 0;
  padding-bottom: 2px;
}

.store-tab {
  min-height: 36px;
  padding: 7px 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.store-tab:hover {
  color: #1a73e8;
  background: var(--blue-soft);
}

.store-tab.is-active {
  color: #fff;
  background: #1a73e8;
  border-color: #1a73e8;
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.24);
}

.demo-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 6px clamp(18px, 3vw, 36px);
  color: #475569;
  background: #f0f6ff;
  border-top: 1px solid #dbeafe;
  font-size: 11px;
}

[data-theme="dark"] .demo-notice {
  color: #cbd5e1;
  background: #142642;
  border-top-color: #24466f;
}

.demo-pill {
  flex: 0 0 auto;
  min-width: auto;
  height: auto;
  padding: 2px 7px;
  color: #174ea6;
  background: #dbeafe;
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.main-content {
  width: min(100%, 1600px);
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px clamp(18px, 3vw, 36px) 52px;
}

/* Shared component sizing ------------------------------------------------- */

.view-header h2,
.section-heading h2,
.card-title,
.brand-compare-card h3 {
  font-family: var(--font-sans);
}

.view-header h2 {
  font-size: 22px;
}

.view-header p,
.section-heading p,
.card-subtitle {
  font-size: 13px;
}

.card-title,
.section-heading h2 {
  font-size: 16px;
}

.metric-label,
.product-cell span,
.gallery-copy p,
.asset-copy p,
.knowledge-copy p,
.insight-copy span,
.list-copy span,
.quiet-note,
.finance-field small,
.closed-actual-header small,
.activity-row p,
.activity-row time,
.file-meta span {
  font-size: 12px;
}

.metric-meta,
.gallery-meta,
.asset-meta,
.knowledge-meta,
.badge {
  font-size: 11px;
}

.card {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.button,
.segmented-button,
.period-button,
.mini-tab,
.module-tab,
.filter-button,
.field,
.field-select,
.field-textarea,
.finance-input-wrap {
  border-radius: 10px;
}

.button {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
}

.button.primary {
  color: #fff;
  background: #1a73e8;
  border-color: #1a73e8;
}

.button.primary:hover {
  background: #155fc1;
  border-color: #155fc1;
}

.button.secondary,
.button.ghost {
  color: var(--ink-soft);
  background: var(--paper);
  border-color: var(--border);
}

.toolbar,
.alert-strip,
.rule-box,
.drop-zone,
.empty-state {
  border-radius: 16px;
}

.field,
.field-select {
  min-height: 40px;
  color: var(--ink);
  background-color: var(--paper);
  border-color: var(--border);
  font-size: 14px;
}

.field-textarea {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--border);
  font-size: 14px;
}

.metric-value,
.insight-value,
.finance-result strong,
.stock-summary-item strong,
.rule-formula,
.data-table td,
.data-table th {
  font-variant-numeric: tabular-nums;
}

.metric-value,
.insight-value,
.finance-result strong,
.rule-formula {
  font-family: var(--font-mono);
}

.table-shell {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  -webkit-overflow-scrolling: touch;
}

.runtime-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 760px;
  padding: 14px 16px;
  background: var(--paper);
  border-top: 1px solid var(--border);
}

.data-table {
  min-width: 760px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 14px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 48px;
  padding: 12px 14px;
  color: var(--ink-soft);
  background: var(--cream);
  border-bottom-color: var(--border);
  font-size: 12px;
  font-weight: 750;
}

.data-table td {
  height: 48px;
  padding: 11px 14px;
  border-bottom-color: var(--border-soft);
  font-size: 14px;
}

.data-table td[data-number],
.data-table th[data-number],
.data-table .numeric,
.data-table .money,
.data-table .quantity {
  font-family: var(--font-mono);
  text-align: right;
}

.data-table tbody tr:hover {
  background: var(--sage-soft);
}

button.import-step {
  width: 100%;
  min-height: 44px;
  color: var(--ink);
  background: transparent;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

button.import-step:hover:not(:disabled) {
  background: var(--cream);
  box-shadow: inset 0 0 0 1px #93baf5;
}

button.import-step.is-current {
  color: #174ea6;
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 2px #1a73e8;
}

button.import-step.is-current span {
  color: #fff;
  background: #1a73e8;
}

button.import-step:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.import-step strong {
  font-size: 13px;
}

button.import-step small {
  font-size: 11px;
}

.modal-backdrop,
.search-overlay {
  z-index: 130;
  padding:
    max(20px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(5px);
}

.modal,
.command-palette {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.modal {
  width: min(100%, 680px);
  max-height: min(88vh, 820px);
  padding: 28px;
  overflow-y: auto;
}

.modal-mark {
  color: #174ea6;
  background: var(--blue-soft);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 16px;
}

.modal h2 {
  font-family: var(--font-sans);
  font-size: 22px;
}

.modal-body:empty {
  display: none;
}

.modal-body {
  margin-top: 16px;
}

.modal-body > p {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.modal-body .stat-list {
  overflow: hidden;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.modal-body .stat-row {
  min-height: 44px;
  padding: 9px 12px;
  border-bottom-color: var(--border);
}

.modal-body .stat-row span {
  color: var(--ink-soft);
  font-size: 12px;
}

.modal-body .stat-row strong {
  color: var(--ink);
  font-size: 13px;
  text-align: right;
}

.modal-safety {
  color: var(--ink-soft);
  background: var(--cream);
  border-color: var(--border);
  border-radius: 10px;
}

.modal-safety strong {
  color: #174ea6;
}

.command-input-wrap input {
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}

.command-result:hover,
.command-result.is-selected {
  background: var(--blue-soft);
}

.toast {
  color: #fff;
  background: #172033;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.toast-icon {
  color: #174ea6;
  background: #dbeafe;
}

/* Dark theme corrections for hard-coded light surfaces ------------------- */

[data-theme="dark"] .toolbar,
[data-theme="dark"] .finance-input-wrap,
[data-theme="dark"] .closed-actual-card,
[data-theme="dark"] .finance-month-card,
[data-theme="dark"] .collection-field,
[data-theme="dark"] .compare-block,
[data-theme="dark"] .activity-row,
[data-theme="dark"] .evidence-item,
[data-theme="dark"] .product-gallery-card,
[data-theme="dark"] .asset-card,
[data-theme="dark"] .knowledge-card {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--border);
}

[data-theme="dark"] canvas {
  filter: brightness(0.86) contrast(1.12);
}

/* Medium desktop: retain a horizontal shell and collect wide groups. ------ */

@media (max-width: 1260px) and (min-width: 769px) {
  .global-header-inner {
    gap: 9px;
    padding-inline: 14px;
  }

  .global-brand {
    min-width: 118px;
  }

  .brand-copy span {
    display: none;
  }

  .nav-group-trigger {
    padding-inline: 9px;
    font-size: 13px;
  }

  .nav-group.is-collapsible {
    display: none;
  }

  .nav-more {
    display: block;
  }

  .nav-more .nav-menu {
    position: fixed;
    top: calc(var(--header-height) + 8px);
    right: 14px;
    left: auto;
    width: min(570px, calc(100vw - 28px));
  }

  .global-header .search-trigger {
    width: 40px;
    justify-content: center;
    padding: 0;
  }

  .global-header .search-trigger > span:nth-child(2),
  .global-header .search-trigger kbd,
  .profile-name,
  .exit-label {
    display: none;
  }

  .global-header .profile-button,
  .exit-demo-button {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Tachikoma product-interaction acceptance layer
   Keeps the approved blue ERP shell while enforcing the readable hierarchy,
   practical 48px targets, calm motion and responsive review contract.
   -------------------------------------------------------------------------- */

:root {
  --tk-body-size: 17px;
  --tk-secondary-size: 15px;
  --tk-meta-size: 14px;
  --tk-control-size: 16px;
  --tk-target-size: 48px;
  --tk-section-gap: 44px;
  --tk-card-padding: 22px;
  --tk-motion-fast: 180ms;
  --tk-motion-standard: 240ms;
}

body {
  font-size: var(--tk-body-size);
  line-height: 1.65;
}

.page-identity .page-title-context {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.eyebrow,
.local-state,
.switcher-label,
.demo-notice,
.demo-pill,
.brand-copy span,
.global-header .search-trigger > span:nth-child(2),
.global-header .search-trigger kbd,
.global-header .profile-name,
.exit-label,
.nav-group-trigger,
.nav-item small,
.drawer-environment small,
.drawer-footer,
.drawer-footer strong {
  font-size: var(--tk-meta-size);
  line-height: 1.45;
}

.brand-copy strong,
.nav-group-trigger,
.nav-item strong,
.global-header .profile-name {
  font-size: var(--tk-secondary-size);
}

.view-header {
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}

.view-header-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.view-header h1 {
  max-width: 22ch;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(46px, 4vw, 58px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.view-header .view-conclusion {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 860px;
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--tk-body-size);
  line-height: 1.65;
}

.view-conclusion > span:first-child,
.next-action-label {
  flex: 0 0 auto;
  color: #174ea6;
  font-size: var(--tk-meta-size);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.7;
}

.view-conclusion > span:first-child {
  margin-top: 2px;
  padding: 2px 8px;
  background: var(--blue-soft);
  border-radius: 999px;
}

.view-conclusion > span:last-child {
  min-width: 0;
  color: var(--ink-soft);
  font-size: var(--tk-body-size);
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.65;
}

.header-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  align-items: center;
  justify-content: end;
  gap: 8px;
}

.header-actions .next-action-label {
  grid-column: 1 / -1;
  justify-self: end;
}

.view-header p,
.section-heading p,
.card-subtitle,
.gallery-copy p,
.asset-copy p,
.knowledge-copy p,
.insight-copy span,
.list-copy span,
.quiet-note,
.activity-row p,
.file-meta span,
.modal-body > p,
.auth-callout,
.auth-mode-hint,
.auth-form-note,
.auth-status {
  font-size: var(--tk-secondary-size);
  line-height: 1.5;
}

.section-heading h2,
.modal h2 {
  font-size: clamp(26px, 2.4vw, 30px);
  line-height: 1.25;
}

.card-title,
.brand-compare-card h3 {
  font-size: 20px;
  line-height: 1.35;
}

.metric-label,
.metric-meta,
.gallery-meta,
.asset-meta,
.knowledge-meta,
.badge,
.trend,
.finance-field small,
.closed-actual-header small,
.activity-row time,
.runtime-form-grid label,
.runtime-form-grid small,
.runtime-fieldset legend,
.runtime-chart-labels,
.runtime-json,
.runtime-source-note,
.runtime-preview-empty,
.runtime-controlled-source,
.runtime-copy-diff section > span,
.demo-gate-note,
.demo-boundaries span,
.auth-form label,
.modal-body .stat-row span,
.modal-body .stat-row strong,
button.import-step small,
button.import-step strong,
.data-table th {
  font-size: var(--tk-meta-size);
  line-height: 1.45;
}

.metric-icon,
.brand-monogram,
.avatar {
  font-size: var(--tk-meta-size);
}

.button,
.icon-button,
.profile-button,
.search-trigger,
.store-tab,
.segmented-button,
.period-button,
.mini-tab,
.module-tab,
.filter-button,
.runtime-auth-tab,
.text-link,
button.import-step,
.field,
.field-select,
.field-textarea,
.finance-input,
.command-input-wrap input {
  min-height: var(--tk-target-size);
  font-size: var(--tk-control-size);
  line-height: 1.5;
}

.icon-button,
.menu-button,
.sidebar-close,
.global-header .icon-button {
  min-width: var(--tk-target-size);
  width: var(--tk-target-size);
  height: var(--tk-target-size);
}

.skip-link {
  min-height: var(--tk-target-size);
  padding: 10px 16px;
  font-size: var(--tk-control-size);
}

.global-header {
  --header-height: 72px;
  min-height: var(--header-height);
}

.global-header .search-trigger,
.global-header .profile-button {
  min-height: var(--tk-target-size);
  height: var(--tk-target-size);
}

.global-header .search-trigger {
  width: 248px;
}

.store-tab,
.period-button,
.mini-tab,
.segmented-button,
.module-tab,
.filter-button {
  padding: 10px 15px;
}

.card.padded,
.modal,
.runtime-copy-diff section {
  padding: var(--tk-card-padding);
}

.section-gap {
  margin-top: var(--tk-section-gap);
}

.grid + .grid,
.card + .card,
.table-shell + .card,
.card + .table-shell {
  margin-top: 24px;
}

.data-table {
  font-size: var(--tk-secondary-size);
  line-height: 1.5;
}

.data-table th,
.data-table td {
  height: 52px;
  padding: 13px 15px;
}

.data-table td {
  font-size: var(--tk-secondary-size);
}

.button,
.nav-menu,
.sidebar,
.data-table tbody tr,
.toast,
.modal,
.command-palette {
  transition-duration: var(--tk-motion-fast);
}

@media (max-width: 1260px) and (min-width: 769px) {
  .global-brand .brand-copy,
  .global-header .search-trigger > span:nth-child(2),
  .global-header .search-trigger kbd,
  .global-header .profile-name,
  .exit-label {
    display: none;
  }

  .global-brand {
    min-width: 48px;
  }

  .global-header .search-trigger,
  .global-header .profile-button,
  .exit-demo-button {
    width: var(--tk-target-size);
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
    --tk-section-gap: 40px;
  }

  .global-header .icon-button,
  .global-header .profile-button,
  .global-header .search-trigger,
  .menu-button,
  .sidebar-close {
    flex-basis: var(--tk-target-size);
    min-width: var(--tk-target-size);
    width: var(--tk-target-size);
    height: var(--tk-target-size);
    min-height: var(--tk-target-size);
  }

  .page-identity .page-title-context {
    font-size: var(--tk-secondary-size);
  }

  .view-header {
    display: grid;
    align-items: start;
    gap: 20px;
    margin-bottom: 24px;
  }

  .view-header h1 {
    max-width: none;
    font-size: clamp(36px, 10vw, 40px);
  }

  .view-header .view-conclusion {
    display: grid;
    gap: 8px;
  }

  .view-conclusion > span:first-child {
    justify-self: start;
  }

  .header-actions {
    width: 100%;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .header-actions .next-action-label {
    justify-self: start;
  }

  .header-actions .button,
  .header-actions > .badge {
    width: 100%;
  }

  .store-tab,
  .button,
  .icon-button,
  .profile-button,
  .segmented-button,
  .period-button,
  .mini-tab,
  .module-tab,
  .filter-button {
    min-height: var(--tk-target-size);
  }

  .nav-group-trigger {
    min-height: 36px;
  }

  .nav-item {
    min-height: 56px;
  }

  .demo-notice {
    font-size: var(--tk-meta-size);
  }

  .main-content {
    padding: 24px 16px max(40px, env(safe-area-inset-bottom));
  }

  .table-shell {
    max-width: calc(100vw - 32px);
  }
}

@media (max-width: 390px) {
  .global-header-inner {
    gap: 4px;
    padding-inline: 7px;
  }

  .global-brand {
    display: none;
  }

  .top-actions {
    margin-left: auto;
  }
}

.product-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-height) + 12px);
}

.product-pagination.is-top {
  margin-bottom: 12px;
  border-radius: var(--radius-md);
}

.product-pagination.is-bottom {
  margin-top: 12px;
  border-radius: var(--radius-md);
}

.product-pagination-summary {
  display: grid;
  flex: 0 0 auto;
  gap: 1px;
  min-width: 150px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.product-pagination-summary strong {
  color: var(--ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.product-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.product-page-size .field-select {
  width: auto;
  min-width: 92px;
}

.product-page-navigation,
.product-page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.product-page-navigation {
  justify-content: flex-end;
  min-width: 0;
}

.product-page-button {
  min-width: 40px;
  min-height: 40px;
  padding: 7px 11px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.product-page-button:hover:not([disabled]),
.product-page-button.is-current {
  color: var(--forest);
  background: var(--sage-soft);
  border-color: var(--forest-2);
}

[data-theme="dark"] .product-page-button:hover:not([disabled]),
[data-theme="dark"] .product-page-button.is-current {
  color: #8ab4f8;
  border-color: #8ab4f8;
}

.product-page-button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-pagination-ellipsis {
  min-width: 20px;
  color: var(--ink-faint);
  text-align: center;
}

@media (max-width: 1024px) {
  .product-pagination {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .product-page-navigation {
    flex-basis: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 480px) {
  .product-pagination {
    padding: 12px;
  }

  .product-pagination-summary {
    min-width: 0;
  }

  .product-page-button {
    min-width: 44px;
    min-height: 44px;
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   ANNEMARIE BÖRLIND official-brand visual system · 2026-09-01

   The live German site and the supplied bilingual VI are intentionally treated
   as one system here: black-and-white editorial structure, Pantone 338 mint,
   Pantone 192 brand red, generous spacing and product imagery before chrome.
   Tachikoma's reviewed type, touch-target and responsive floors remain intact.
   -------------------------------------------------------------------------- */

html[data-theme="light"] {
  --ink: #101010;
  --ink-soft: #494949;
  --ink-muted: #5f5f5f;
  --ink-faint: #707070;
  --forest: #101010;
  --forest-2: #101010;
  --moss: #6acdb1;
  --sage: #cfeee5;
  --sage-soft: #eef9f5;
  --cream: #ffffff;
  --paper: #ffffff;
  --paper-soft: #faf9f7;
  --sand: #e8e2d9;
  --blue: #101010;
  --blue-soft: #cfeee5;
  --terracotta: #e62658;
  --terracotta-soft: #fff0f4;
  --red: #c81d49;
  --red-soft: #fff0f4;
  --success: #2d725d;
  --amber: #8a5a00;
  --amber-soft: #fff7df;
  --border: #d9d7d2;
  --border-soft: #ece9e3;
  --shadow-sm: 0 1px 1px rgba(16, 16, 16, 0.04);
  --shadow-md: 0 18px 48px rgba(16, 16, 16, 0.1);
  --shadow-lg: 0 28px 80px rgba(16, 16, 16, 0.15);
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
}

body {
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.002em;
}

html[data-theme="light"] body,
html[data-theme="light"] .app-shell {
  color: var(--ink);
  background: var(--cream);
}

/* Sales workspace: white canvas, compact shop choice and one shared date bar. */
.store-select-wrap {
  display: none;
}

.store-switcher.is-compact .store-tabs {
  overflow: visible;
}

.store-switcher.is-compact .store-tab:not([data-store="all"]) {
  display: none;
}

.store-switcher.is-compact .store-select-wrap {
  display: block;
}

.store-select,
.analytics-date-select select {
  min-height: 44px;
  padding: 8px 40px 8px 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 3px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.analytics-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  padding: 15px 18px;
  background: var(--paper-soft);
  border: 1px solid var(--border-soft);
}

.analytics-top-row > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.analytics-top-row > div:first-child strong {
  font-size: inherit;
  font-weight: 400;
}

.analytics-top-row > div:first-child span {
  color: var(--ink-soft);
  font-size: inherit;
}

.analytics-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.analytics-toolbar .period-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.analytics-toolbar .period-button {
  min-height: 36px;
  padding: 6px 11px;
  border: 0;
  border-radius: 1px;
  box-shadow: none;
}

.analytics-toolbar .period-button.is-active {
  color: #ffffff;
  background: #101010;
}

.analytics-main-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, 0.75fr);
}

.sales-mix-card {
  min-width: 0;
}

.sales-mix-card .forecast-bar {
  grid-template-columns: minmax(94px, 0.9fr) minmax(70px, 1fr) minmax(112px, max-content);
}

.sales-mix-card .forecast-bar > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sales-mix-card .forecast-bar > strong {
  min-width: 0;
  text-align: right;
  white-space: nowrap;
  font-size: 14px;
}

.runtime-chart-grid text,
.runtime-axis-title {
  fill: var(--ink-soft);
  stroke: none;
  font-family: var(--font-sans);
  font-size: 11px;
}

.runtime-axis-title {
  font-size: 12px;
  font-weight: 700;
}

.runtime-chart-hit {
  fill: transparent;
  pointer-events: all;
}

.runtime-chart-point circle {
  fill: #ffffff;
  stroke: var(--forest-2);
  stroke-width: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, r 120ms ease;
}

.runtime-chart-point:hover circle,
.runtime-chart-point:focus circle,
.runtime-chart-point:focus-visible circle {
  opacity: 1;
  r: 6;
}

.plain-card-header {
  padding: 0 0 14px !important;
}

.section-intro {
  max-width: 860px;
  margin: 0 0 18px;
  color: var(--ink-soft);
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.scenario-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 20px;
  text-align: left;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}

.scenario-card:hover,
.scenario-card:focus-visible {
  border-color: #101010;
  box-shadow: 0 8px 26px rgb(16 16 16 / 8%);
  transform: translateY(-1px);
}

.scenario-card > span,
.scenario-card > strong,
.scenario-card > small,
.scenario-card > em {
  display: block;
}

.scenario-card > strong {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 32px);
  line-height: 1.1;
}

.scenario-card > small {
  min-height: 44px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.scenario-card > em {
  color: var(--forest-2);
  font-style: normal;
  font-size: 13px;
  font-weight: 750;
}

.scenario-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px;
  background: var(--sage-soft);
}

.scenario-summary strong {
  font-family: var(--font-display);
  font-size: 30px;
}

.plain-explanation {
  margin-bottom: 20px;
}

.plain-explanation h3,
.plain-explanation p {
  margin: 0;
}

.plain-explanation p {
  margin-top: 6px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.scenario-detail .data-table td:first-child small {
  display: block;
  color: var(--ink-soft);
}

.modal-backdrop[data-runtime-modal-type="sales-plan"] .modal {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
}

.modal-backdrop[data-runtime-modal-type="sales-plan"] .modal-safety {
  display: none;
}

.report-detail-heading {
  align-items: end;
}

.detail-grain-switch {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--paper-soft);
  border: 1px solid var(--border);
}

.detail-grain-switch button {
  min-height: 38px;
  padding: 7px 16px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.detail-grain-switch button.is-active {
  color: #ffffff;
  background: #101010;
}

@media (max-width: 1180px) {
  .analytics-top-row,
  .analytics-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-toolbar {
    justify-content: flex-start;
  }

  .analytics-toolbar .period-tabs {
    overflow-x: auto;
  }

  .analytics-main-grid,
  .scenario-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .store-switcher.is-compact {
    display: flex;
    flex-wrap: wrap;
  }

  .analytics-main-grid,
  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .analytics-toolbar .period-tabs {
    max-width: 100%;
  }

  .analytics-date-select select,
  .store-select {
    width: 100%;
  }

  .report-detail-heading {
    align-items: stretch;
  }
}

html[data-theme="light"] .global-header,
html[data-theme="light"] .topbar,
html[data-theme="light"] .sidebar {
  background: #ffffff !important;
}

html[data-theme="light"] .global-header {
  color: var(--ink);
  border-bottom: 1px solid #d8d5cf;
  box-shadow: none;
}

.global-header-inner {
  gap: 22px;
  max-width: 1920px;
  margin: 0 auto;
  padding-inline: clamp(18px, 2.5vw, 46px);
}

.global-brand {
  gap: 0;
  min-width: 218px;
}

.global-brand > .brand-monogram,
.drawer-header .brand-monogram {
  display: none;
}

.brand-copy {
  gap: 1px;
}

html[data-theme="light"] .brand-copy strong {
  color: #101010;
}

.brand-copy strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.25;
  white-space: nowrap;
}

html[data-theme="light"] .brand-copy span {
  color: #656565;
}

.brand-copy span {
  font-size: 14px;
  font-weight: 520;
  letter-spacing: 0.08em;
  line-height: 1.35;
}

.nav-groups {
  gap: 1px;
}

.nav-group-trigger {
  min-height: 48px;
  padding-inline: 12px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.015em;
}

html[data-theme="light"] .nav-group-trigger {
  color: #242424;
}

html[data-theme="light"] .nav-group-trigger > span:last-child {
  color: #77736d;
}

html[data-theme="light"] .nav-group-trigger:hover,
html[data-theme="light"] .nav-group:focus-within > .nav-group-trigger,
html[data-theme="light"] .nav-group:hover > .nav-group-trigger {
  color: #101010;
  background: #eef9f5;
}

.nav-group-trigger::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 2px;
  background: transparent;
  content: "";
}

.nav-group:focus-within > .nav-group-trigger::after,
.nav-group:hover > .nav-group-trigger::after {
  background: #6acdb1;
}

.nav-menu {
  top: calc(100% + 1px);
  gap: 2px;
  padding: 10px;
  border-color: #d8d5cf;
  border-radius: 2px;
  box-shadow: 0 20px 50px rgba(16, 16, 16, 0.12);
}

.nav-menu::before {
  inset-block-start: -2px;
  height: 3px;
}

.nav-item {
  min-height: 62px;
  border-radius: 2px;
}

html[data-theme="light"] .nav-item:hover {
  background: #f5f2ec;
}

html[data-theme="light"] .nav-item.is-active {
  color: #101010;
  background: #cfeee5;
}

html[data-theme="light"] .nav-icon {
  color: #101010;
  background: #eef9f5;
}

html[data-theme="light"] .nav-item.is-active .nav-icon {
  color: #101010;
  background: #ffffff;
}

.nav-icon {
  border-radius: 50%;
}

.top-actions {
  gap: 8px;
}

html[data-theme="light"] .global-header .icon-button,
html[data-theme="light"] .global-header .profile-button,
html[data-theme="light"] .global-header .search-trigger {
  color: #101010;
  background: #ffffff;
  border-color: #d8d5cf;
  border-radius: 999px;
}

html[data-theme="light"] .global-header .icon-button:hover,
html[data-theme="light"] .global-header .profile-button:hover,
html[data-theme="light"] .global-header .search-trigger:hover {
  color: #101010;
  background: #eef9f5;
  border-color: #6acdb1;
}

html[data-theme="light"] .global-header .search-trigger > span:nth-child(2),
html[data-theme="light"] .global-header .profile-name {
  color: #494949;
}

html[data-theme="light"] .global-header .search-trigger kbd {
  color: #494949;
  background: #f5f2ec;
  border-color: #d8d5cf;
}

html[data-theme="light"] .global-header .avatar {
  color: #101010;
  background: #cfeee5;
  border-radius: 50%;
}

html[data-theme="light"] .global-header .notification-dot {
  background: #e62658;
  border-color: #ffffff;
}

html[data-theme="light"] .topbar {
  border-bottom-color: #d8d5cf;
  box-shadow: none;
  backdrop-filter: none;
}

.store-switcher {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4.5vw, 92px);
}

.switcher-label {
  color: #6d6962;
  font-weight: 650;
  letter-spacing: 0.035em;
}

.store-tabs {
  gap: clamp(2px, 0.6vw, 12px);
}

.store-tab {
  position: relative;
  min-height: 54px;
  padding: 12px 14px;
  color: #4d4d4d;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 16px;
  font-weight: 620;
}

.store-tab::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 3px;
  background: transparent;
  content: "";
}

html[data-theme="light"] .store-tab:hover:not(.is-active) {
  color: #101010;
  background: #eef9f5;
}

html[data-theme="light"] .store-tab.is-active {
  color: #101010;
  background: transparent;
  box-shadow: none;
}

.store-tab.is-active::after {
  background: #6acdb1;
}

.main-content {
  width: min(100%, 1780px);
  margin: 0 auto;
  padding: clamp(36px, 4.5vw, 76px) clamp(18px, 4.5vw, 92px) 96px;
}

.view-header {
  padding-bottom: clamp(22px, 3vw, 42px);
  margin-bottom: clamp(28px, 4vw, 52px);
  border-bottom: 1px solid var(--border);
}

.view-header h1 {
  color: #101010;
  font-size: clamp(46px, 4vw, 56px);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.view-header p,
.section-heading p {
  max-width: 74ch;
  color: var(--ink-soft);
}

.view-header .view-conclusion {
  max-width: 76ch;
}

.view-conclusion > span:first-child,
.next-action-label {
  color: #101010;
}

.view-conclusion > span:first-child {
  background: #cfeee5;
  border-radius: 999px;
}

.section-heading {
  gap: 8px;
  margin-bottom: 22px;
}

.section-heading h2,
.modal h2 {
  color: #101010;
  font-size: clamp(26px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.card,
.metric-card,
.asset-card,
.knowledge-card,
.product-gallery-card,
.brand-compare-card,
.runtime-product-media-card,
.product-pagination,
.table-shell,
.filter-panel,
.toolbar,
.empty-state,
.runtime-copy-diff section,
.product-record-card,
.product-record-grid > section {
  border-color: var(--border);
  border-radius: 4px;
  box-shadow: none;
}

html[data-theme="light"] .card,
html[data-theme="light"] .metric-card,
html[data-theme="light"] .asset-card,
html[data-theme="light"] .knowledge-card,
html[data-theme="light"] .product-gallery-card,
html[data-theme="light"] .brand-compare-card,
html[data-theme="light"] .runtime-product-media-card,
html[data-theme="light"] .product-pagination,
html[data-theme="light"] .table-shell,
html[data-theme="light"] .filter-panel,
html[data-theme="light"] .toolbar,
html[data-theme="light"] .empty-state {
  background: #ffffff;
}

.card.padded,
.modal,
.runtime-copy-diff section {
  padding: clamp(20px, 2vw, 26px);
}

.metric-card {
  position: relative;
  min-height: 170px;
  padding: 24px;
  overflow: hidden;
}

.metric-card::after {
  top: 0;
  right: auto;
  bottom: 0;
  left: 0;
  width: 4px;
  height: auto;
  background: #6acdb1;
  opacity: 1;
}

.metric-value {
  color: #101010;
  font-family: var(--font-sans);
  font-weight: 690;
  letter-spacing: -0.035em;
}

.metric-icon,
.insight-rank,
.import-step > span,
.cashflow-step > span {
  color: #101010;
  background: #cfeee5;
  border-radius: 50%;
}

.button {
  min-height: 48px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.01em;
  box-shadow: none;
}

html[data-theme="light"] .button.primary {
  color: #ffffff;
  background: #101010;
  border-color: #101010;
}

html[data-theme="light"] .button.primary:hover {
  color: #ffffff;
  background: #343434;
  border-color: #343434;
  transform: none;
}

html[data-theme="light"] .button.secondary,
html[data-theme="light"] .button.ghost {
  color: #101010;
  background: #ffffff;
  border-color: #9c9891;
}

html[data-theme="light"] .button.secondary:hover,
html[data-theme="light"] .button.ghost:hover {
  color: #101010;
  background: #eef9f5;
  border-color: #6acdb1;
}

.button.compact {
  min-height: 42px;
  padding-inline: 15px;
}

.field,
.field-select,
.field-textarea,
.finance-input,
.command-input-wrap input {
  min-height: 48px;
  border-radius: 2px;
}

html[data-theme="light"] .field,
html[data-theme="light"] .field-select,
html[data-theme="light"] .field-textarea,
html[data-theme="light"] .finance-input,
html[data-theme="light"] .command-input-wrap input {
  color: #101010;
  background: #ffffff;
  border-color: #aaa69e;
}

html[data-theme="light"] .field:focus,
html[data-theme="light"] .field-select:focus,
html[data-theme="light"] .field-textarea:focus,
html[data-theme="light"] .finance-input:focus,
html[data-theme="light"] .command-input-wrap input:focus {
  border-color: #101010;
  box-shadow: 0 0 0 3px rgba(106, 205, 177, 0.28);
}

.segmented-control,
.period-tabs,
.module-tabs,
.runtime-library-tabs {
  gap: 2px;
  padding: 3px;
  background: #f1eee8;
  border-radius: 2px;
}

.segmented-button,
.period-button,
.mini-tab,
.module-tab,
.filter-button,
.runtime-auth-tab {
  min-height: 48px;
  border-radius: 1px;
  font-size: 16px;
}

html[data-theme="light"] .segmented-button.is-active,
html[data-theme="light"] .period-button.is-active,
html[data-theme="light"] .mini-tab.is-active,
html[data-theme="light"] .module-tab.is-active,
html[data-theme="light"] .filter-button.is-active,
html[data-theme="light"] .runtime-auth-tab.is-active {
  color: #101010;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 16, 16, 0.08);
}

.data-table {
  font-size: 15px;
  line-height: 1.5;
}

.data-table th,
.data-table td {
  height: 58px;
  padding: 15px 17px;
}

html[data-theme="light"] .data-table th {
  color: #383838;
  background: #f5f2ec;
  border-bottom-color: #d8d5cf;
}

html[data-theme="light"] .data-table td {
  color: #494949;
  background: #ffffff;
  border-bottom-color: #ece9e3;
}

html[data-theme="light"] .data-table tbody tr:hover td {
  background: #eef9f5;
}

html[data-theme="light"] .product-master-row.is-expanded > td,
html[data-theme="light"] .product-inline-row > td {
  background: #eef9f5;
}

.product-thumb,
.product-thumb-button {
  width: 112px !important;
  min-width: 112px !important;
  height: 112px !important;
  border-radius: 2px;
}

.product-thumb img,
.product-thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.runtime-product-media-hero > img,
.runtime-review-hero-image > img,
.runtime-image-lightbox img {
  background: #ffffff;
  border-radius: 2px;
}

.runtime-gallery-image,
.runtime-product-media-thumb {
  min-height: 260px;
  background: #f7f5f1;
}

.runtime-gallery-image > img,
.runtime-product-media-thumb img {
  height: 260px;
  padding: 12px;
  object-fit: contain;
}

.product-inline-archive {
  padding: clamp(22px, 3vw, 36px);
  border-top: 3px solid #6acdb1;
}

.product-identity-strip {
  gap: 10px;
}

.product-identity-strip > div,
.channel-identity-item,
.official-registration {
  border-radius: 2px;
}

.product-pagination {
  padding: 16px 18px;
}

.product-page-button {
  min-width: 46px;
  min-height: 46px;
  border-radius: 50%;
}

html[data-theme="light"] .product-page-button:hover:not([disabled]),
html[data-theme="light"] .product-page-button.is-current {
  color: #101010;
  background: #cfeee5;
  border-color: #6acdb1;
}

.alert-strip,
.runtime-search-notice,
.compliance-disclaimer,
.data-source-line {
  border-radius: 2px;
  box-shadow: none;
}

html[data-theme="light"] .alert-strip.info,
html[data-theme="light"] .runtime-search-notice,
html[data-theme="light"] .data-source-line {
  color: #33473f;
  background: #eef9f5;
  border-color: #b6dfd3;
}

html[data-theme="light"] .badge.info,
html[data-theme="light"] .badge.success,
html[data-theme="light"] .local-state,
html[data-theme="light"] .demo-pill {
  color: #234d40;
  background: #cfeee5;
}

.badge,
.local-state,
.demo-pill {
  border-radius: 999px;
}

.asset-card,
.knowledge-card,
.product-gallery-card,
.runtime-product-media-card {
  overflow: hidden;
}

.asset-card:hover,
.knowledge-card:hover,
.product-gallery-card:hover,
.runtime-product-media-card:hover {
  border-color: #6acdb1;
  transform: translateY(-2px);
}

/* Compact account entry; provisioning controls only appear when required. */
.demo-gate {
  align-items: center;
  padding: clamp(24px, 5vw, 72px);
  background:
    linear-gradient(90deg, #eef9f5 0 34%, transparent 34% 100%),
    #f7f5f1;
}

.demo-gate-card {
  position: relative;
  width: min(500px, 100%);
  padding: clamp(24px, 5vw, 44px);
  background: #ffffff;
  border: 1px solid #d8d5cf;
  border-radius: 2px;
  box-shadow: 0 28px 80px rgba(16, 16, 16, 0.12);
}

.demo-gate-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #6acdb1;
  content: "";
}

.demo-gate-brand {
  color: #101010;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.demo-gate-brand .brand-monogram {
  display: none;
}

.demo-gate h1 {
  color: #101010;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.demo-gate-lead,
.auth-mode-hint,
.auth-form-note {
  color: #595959;
}

.demo-boundaries {
  gap: 0;
  padding: 0;
  background: #f7f5f1;
  border: 1px solid #e2ded7;
  border-radius: 2px;
}

.demo-boundaries span {
  padding: 11px 14px;
  border-bottom: 1px solid #e2ded7;
}

.demo-boundaries span:last-child {
  border-bottom: 0;
}

.demo-gate-badge {
  color: #234d40;
  background: #cfeee5;
  border-radius: 999px;
}

.runtime-auth-tabs {
  background: #f1eee8;
  border-radius: 2px;
}

/* Mobile and 200% zoom: keep the brand calm and the work surface usable. */
@media (max-width: 1260px) and (min-width: 769px) {
  .global-brand {
    min-width: 48px;
  }

  .global-brand > .brand-monogram {
    display: grid;
    color: #101010;
    background: #cfeee5;
    border-radius: 50%;
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  html[data-theme="light"] .sidebar {
    background: #ffffff !important;
  }

  .global-header-inner {
    padding-inline: max(10px, env(safe-area-inset-left));
  }

  .drawer-header {
    min-height: 78px;
    padding-inline: 18px 12px;
  }

  .drawer-header .brand-monogram {
    display: none;
  }

  .drawer-header .brand-copy strong {
    font-size: 15px;
  }

  .drawer-header .brand-copy span {
    font-size: 14px;
  }

  .drawer-environment {
    margin: 14px 16px 4px;
    background: #eef9f5;
    border-color: #b6dfd3;
    border-radius: 2px;
  }

  .nav-groups {
    padding: 8px 16px 24px;
  }

  .nav-group-trigger {
    padding-inline: 10px;
    color: #101010;
    font-size: 16px;
    letter-spacing: 0;
  }

  .nav-group-trigger::after {
    display: none;
  }

  .nav-item {
    min-height: 64px;
  }

  .nav-menu,
  .nav-menu-wide,
  .nav-menu-mega,
  .nav-menu-end {
    padding: 3px 0 10px;
  }

  .store-switcher {
    padding: 0 16px 8px;
  }

  .store-tab {
    min-height: 50px;
  }

  .main-content {
    padding: 32px 16px max(48px, env(safe-area-inset-bottom));
  }

  .view-header {
    padding-bottom: 24px;
    margin-bottom: 32px;
  }

  .view-header h1 {
    font-size: clamp(36px, 10vw, 40px);
  }

  .product-thumb,
  .product-thumb-button {
    width: 96px !important;
    min-width: 96px !important;
    height: 96px !important;
  }

  .demo-gate {
    padding: 18px;
    background: #eef9f5;
  }

  .demo-gate-card {
    padding: 32px 24px;
  }
}

@media (max-width: 390px) {
  .global-brand {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .view-header h1 {
    font-size: 30px;
  }
}

@media (min-width: 1261px) {
  .nav-more {
    display: none;
  }
}

/* Mobile: only the navigation becomes a drawer. Utilities remain reachable. */

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .global-header {
    height: calc(var(--header-height) + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }

  .global-header-inner {
    gap: 8px;
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }

  .menu-button {
    display: inline-grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    place-content: center;
  }

  .menu-button span {
    width: 19px;
    height: 2px;
    background: currentColor;
  }

  .global-brand {
    min-width: 0;
    margin-right: auto;
  }

  .global-brand .brand-copy {
    display: none;
  }

  .global-brand .brand-monogram {
    width: 36px;
    height: 36px;
  }

  .desktop-nav {
    position: static;
    flex: 0 0 0;
    width: 0;
    height: 0;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    width: min(88vw, 350px);
    height: 100vh;
    height: 100dvh;
    padding-top: env(safe-area-inset-top);
    overflow: hidden;
    color: var(--ink);
    background: var(--paper);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(-103%);
    transition: transform 0.2s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .drawer-header {
    display: flex;
    align-items: center;
    min-height: 68px;
    padding: 10px 12px 10px 16px;
    border-bottom: 1px solid var(--border);
  }

  .drawer-header .brand-lockup {
    min-height: 0;
    padding: 0;
    border: 0;
  }

  .drawer-header .brand-copy strong {
    color: var(--ink);
  }

  .drawer-header .brand-copy span {
    display: block;
    color: var(--ink-faint);
  }

  .sidebar-close {
    display: inline-grid;
    width: 44px;
    height: 44px;
    margin-left: auto;
    color: var(--ink-soft);
    background: var(--cream);
    border-color: var(--border);
  }

  .drawer-environment {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 14px 4px;
    padding: 10px 12px;
    color: var(--ink-soft);
    background: var(--blue-soft);
    border: 1px solid rgba(26, 115, 232, 0.2);
    border-radius: 10px;
  }

  .drawer-environment > span:last-child {
    display: grid;
  }

  .drawer-environment strong {
    color: #174ea6;
    font-size: 12px;
  }

  .drawer-environment small {
    color: var(--ink-faint);
    font-size: 10px;
  }

  .status-dot {
    background: #1a73e8;
    border-color: #bfdbfe;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
  }

  .nav-groups {
    display: block;
    flex: 1 1 auto;
    height: auto;
    padding: 8px 12px 20px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .nav-group,
  .nav-group.is-collapsible {
    display: block;
    margin-top: 12px;
  }

  .nav-more {
    display: none;
  }

  .nav-group-trigger {
    width: 100%;
    height: auto;
    min-height: 30px;
    padding: 4px 8px;
    color: var(--ink-faint);
    background: transparent;
    cursor: default;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: left;
  }

  .nav-group-trigger:hover,
  .nav-group:focus-within > .nav-group-trigger,
  .nav-group:hover > .nav-group-trigger {
    color: var(--ink-faint);
    background: transparent;
  }

  .nav-group-trigger > span:last-child {
    display: none;
  }

  .nav-menu,
  .nav-menu-wide,
  .nav-menu-mega,
  .nav-menu-end {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    width: 100%;
    max-height: none;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-item {
    min-height: 50px;
    padding: 7px 8px;
  }

  .nav-item small {
    font-size: 10px;
  }

  .drawer-footer {
    display: grid;
    gap: 2px;
    padding:
      12px
      max(16px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
    color: var(--ink-faint);
    background: var(--cream);
    border-top: 1px solid var(--border);
    font-size: 10px;
  }

  .drawer-footer strong {
    color: var(--ink-soft);
    font-size: 11px;
  }

  .drawer-backdrop {
    z-index: 90;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(2px);
  }

  .top-actions {
    gap: 5px;
    margin-left: 0;
  }

  .global-header .icon-button,
  .global-header .profile-button,
  .global-header .search-trigger {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 0;
  }

  .global-header .notification-button {
    display: inline-grid;
  }

  .global-header .profile-button,
  .global-header .search-trigger {
    display: flex;
  }

  .global-header .search-trigger > span:nth-child(2),
  .global-header .search-trigger kbd,
  .profile-name,
  .global-header .profile-button > span:last-child,
  .exit-label {
    display: none;
  }

  .global-header .avatar {
    width: 30px;
    height: 30px;
  }

  .workspace {
    padding-top: calc(var(--header-height) + env(safe-area-inset-top));
  }

  .topbar {
    top: calc(var(--header-height) + env(safe-area-inset-top));
  }

  .topbar-primary {
    min-height: 64px;
    padding: 10px 16px 7px;
  }

  .page-identity h1 {
    font-size: 21px;
  }

  .store-switcher {
    display: block;
    padding: 0 16px 8px;
  }

  .switcher-label {
    display: block;
    margin-bottom: 5px;
  }

  .store-tabs {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .store-tabs::-webkit-scrollbar {
    display: none;
  }

  .store-tab {
    flex: 0 0 auto;
    min-height: 44px;
    padding-inline: 13px;
  }

  .demo-notice {
    align-items: flex-start;
    min-height: 38px;
    padding: 7px 16px;
    font-size: 10px;
  }

  .main-content {
    padding: 18px 14px max(34px, env(safe-area-inset-bottom));
  }

  .button,
  .icon-button,
  .profile-button,
  .segmented-button,
  .period-button,
  .mini-tab,
  .module-tab,
  .filter-button {
    min-height: 44px;
  }

  .field,
  .field-select,
  .field-textarea,
  .finance-input,
  .command-input-wrap input {
    font-size: 16px;
  }

  .table-shell {
    width: 100%;
    max-width: calc(100vw - 28px);
  }

  .data-table th,
  .data-table td {
    height: 48px;
    font-size: 14px;
  }

  .modal {
    max-height: calc(100dvh - max(32px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    padding: 22px 18px;
  }
}

.runtime-library-tabs {
  margin: 18px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.runtime-library-panel {
  display: grid;
  gap: 16px;
}

.runtime-product-media {
  display: grid;
  gap: 16px;
}

.runtime-product-media-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-content: start;
}

.runtime-product-media-hero > img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: var(--paper-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.runtime-review-hero-image {
  position: relative;
  min-width: 0;
}

.runtime-review-hero-image > img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: var(--paper-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.runtime-product-image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.runtime-product-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.runtime-video-card {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.runtime-video-card video {
  width: 100%;
  max-height: 360px;
  background: #101713;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.runtime-gallery-image {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  overflow: hidden;
  color: var(--ink-faint);
  background: var(--paper-soft);
  border-bottom: 1px solid var(--border);
}

.runtime-gallery-image > img {
  width: 100%;
  height: 220px;
  object-fit: contain;
}

.runtime-gallery-image > span:first-child {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.promotion-detail-row > td {
  padding: 0 14px 14px;
  background: var(--paper-soft);
}

.promotion-calculation-detail {
  margin: 0;
}

.runtime-product-media-card {
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.runtime-product-media-card .asset-open {
  width: 100%;
  height: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.runtime-product-media-thumb {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 170px;
  color: var(--ink-faint);
  background: var(--paper-soft);
  border-bottom: 1px solid var(--border);
}

.runtime-product-media-thumb img {
  width: 100%;
  height: 190px;
  object-fit: contain;
}

.candidate-preview-label {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  max-width: calc(100% - 16px);
  padding: 5px 8px;
  color: #fff;
  background: rgba(112, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 7px;
  box-shadow: 0 4px 14px rgba(34, 0, 0, 0.2);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.3;
  text-align: center;
}

.is-review-candidate {
  outline: 2px solid color-mix(in srgb, var(--red) 42%, transparent);
  outline-offset: -2px;
}

.runtime-controlled-source {
  display: inline-block;
  max-width: 340px;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 12px;
}

.runtime-copy-diff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.runtime-copy-diff section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  background: var(--paper-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.runtime-copy-diff section > span {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.runtime-copy-diff p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.compliance-evidence-card {
  min-width: 0;
}

.compliance-evidence-card .grid section,
.product-copy-version > div {
  min-width: 0;
  padding: 14px;
  background: var(--paper-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.compliance-evidence-card .grid section p {
  min-height: 72px;
  margin: 8px 0 12px;
  color: var(--ink-soft);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.compliance-policy-section .rule-source {
  align-items: flex-start;
}

.compliance-policy-section .rule-source small,
.compliance-policy-section .rule-source a {
  display: block;
  margin-top: 6px;
}

.product-copy-versions {
  display: grid;
  gap: 14px;
}

.product-copy-version {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 14px;
  padding-top: 12px;
}

.product-copy-version h4 {
  margin: 0 0 10px;
}

@media (max-width: 1100px) {
  .runtime-product-image-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .runtime-product-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .runtime-product-video-grid {
    grid-template-columns: 1fr;
  }

  .runtime-copy-diff {
    grid-template-columns: 1fr;
  }

  .product-copy-version,
  .compliance-policy-section .grid.three-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .runtime-product-image-grid {
    grid-template-columns: 1fr;
  }

  .top-actions {
    gap: 4px;
  }

  .local-state {
    max-width: 104px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .demo-boundaries {
    grid-template-columns: 1fr;
  }

  .runtime-form-grid {
    grid-template-columns: 1fr;
  }

  .runtime-fieldset {
    grid-template-columns: 1fr;
  }

  .runtime-form-grid .is-wide {
    grid-column: auto;
  }
}

@media (max-width: 390px) {
  .global-header-inner {
    gap: 5px;
    padding-inline: 8px;
  }

  .global-brand .brand-monogram {
    width: 34px;
    height: 34px;
  }

  .menu-button,
  .global-header .search-trigger,
  .global-header .theme-button,
  .global-header .notification-button,
  .global-header .profile-button,
  .global-header .exit-demo-button {
    flex-basis: 44px;
    width: 44px;
    min-width: 44px;
  }

  .local-state {
    display: none;
  }

  .page-identity h1 {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .sidebar,
  .nav-menu,
  .nav-group-trigger > span:last-child {
    transition: none !important;
  }
}

@media print {
  .demo-gate,
  .global-header,
  .topbar,
  .drawer-backdrop,
  .modal-backdrop,
  .search-overlay,
  .toast-region,
  .header-actions,
  .toolbar,
  .button {
    display: none !important;
  }

  .app-shell,
  .workspace {
    display: block !important;
    padding: 0;
  }

  .main-content {
    width: 100%;
    max-width: none;
    padding: 0;
  }
}

/* Keep the acceptance tokens last so legacy responsive/runtime additions
   cannot silently reduce text or touch targets below the reviewed floor. */
.runtime-controlled-source,
.runtime-copy-diff section > span,
.runtime-preview-empty {
  font-size: var(--tk-meta-size);
  line-height: 1.45;
}

.nav-item small,
.drawer-environment small,
.drawer-footer,
.drawer-footer strong {
  font-size: var(--tk-meta-size);
  line-height: 1.45;
}

.nav-group-trigger {
  min-height: var(--tk-target-size);
  font-size: var(--tk-control-size);
  line-height: 1.5;
}

.empty-state p {
  font-size: var(--tk-secondary-size);
  line-height: 1.5;
}

.alert-strip,
.alert-strip strong,
.alert-strip p {
  font-size: var(--tk-secondary-size);
  line-height: 1.5;
}

.alert-strip .alert-icon {
  font-size: var(--tk-meta-size);
}

.activity-row strong,
.brand-compare-card p,
.cashflow-step strong,
.cashflow-step p,
.closed-actual-header strong,
.compare-block h4,
.compare-block p,
.compliance-disclaimer,
.drop-zone p,
.evidence-placeholder strong,
.evidence-placeholder p,
.finance-promo-toggle strong,
.finance-promo-toggle p,
.finding strong,
.finding p,
.insight-copy strong,
.matrix-label strong,
.modal-safety,
.purchase-lanes strong,
.purchase-lanes p,
.rule-box p,
.rule-source strong,
.runtime-search-notice strong,
.runtime-search-notice span,
.score-copy p,
.timeline-step strong,
.toast strong,
.toast > div > span,
.validation-list,
.command-result > span:not(.command-result-icon) > span,
.runtime-search-result .command-result-copy small {
  font-size: var(--tk-secondary-size);
  line-height: 1.5;
}

.asset-card .asset-copy strong,
.asset-open .asset-copy strong,
button.product-gallery-card .gallery-copy strong,
.knowledge-card .knowledge-copy strong,
.matrix-cell strong,
button.import-step strong,
.command-result strong {
  font-size: var(--tk-control-size);
  line-height: 1.5;
}

.actual-ratio span,
.actual-ratio strong,
.actual-source span,
.actual-source strong,
.cashflow-step > span,
.chart-legend,
.collection-field > span:first-child,
.command-hint,
.command-result em,
.command-result-icon,
.runtime-search-meta,
.runtime-search-group-title strong,
.runtime-search-group-title span,
.finance-field-label,
.finance-input-wrap > span,
.finance-month-status,
.finance-result > span,
.finance-result small,
.import-step > span,
.import-step small,
.matrix-head,
.matrix-label span,
.matrix-cell span,
.product-cell span,
.profile-name,
.promo-basis,
.rule-formula,
.rule-source small,
.score-ring span,
.stock-summary-item span,
.swatch,
.swatch strong,
.timeline-step span,
kbd,
.drawer-environment strong,
.runtime-copy-diff small,
.compliance-evidence-card .detail-note > small,
.finding small,
.data-table td > small {
  font-size: var(--tk-meta-size);
  line-height: 1.45;
}

.runtime-form-grid label.runtime-check {
  gap: 10px;
  min-height: var(--tk-target-size);
  cursor: pointer;
  font-size: var(--tk-control-size);
  line-height: 1.5;
}

[data-theme="dark"] .alert-strip,
[data-theme="dark"] .compliance-disclaimer,
[data-theme="dark"] .badge.warning,
[data-theme="dark"] .cashflow-step.is-pending > span {
  color: #fde68a;
}

[data-theme="dark"] .alert-strip.danger,
[data-theme="dark"] .runtime-search-notice.is-danger,
[data-theme="dark"] .badge.danger,
[data-theme="dark"] .button.danger-soft,
[data-theme="dark"] .finding-index,
[data-theme="dark"] .score-ring.has-findings span {
  color: #fda29b;
}

[data-theme="dark"] .alert-strip.info,
[data-theme="dark"] .runtime-search-notice,
[data-theme="dark"] .badge.info,
[data-theme="dark"] .demo-gate-brand,
[data-theme="dark"] .demo-gate-badge,
[data-theme="dark"] .nav-icon,
[data-theme="dark"] .drawer-environment strong,
[data-theme="dark"] .metric-icon,
[data-theme="dark"] .insight-rank,
[data-theme="dark"] .import-step > span,
[data-theme="dark"] .cashflow-step > span,
[data-theme="dark"] .actual-ratio strong,
[data-theme="dark"] .finance-result strong,
[data-theme="dark"] .rule-source span:first-child,
[data-theme="dark"] .score-ring span,
[data-theme="dark"] .score-ring.no-findings span,
[data-theme="dark"] .runtime-search-result.is-source-index .command-result-icon {
  color: #bfdbfe;
}

[data-theme="dark"] .text-link,
[data-theme="dark"] .icon-text-button,
[data-theme="dark"] .button.ghost,
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .store-tab:hover:not(.is-active) {
  color: #8ab4f8;
}

[data-theme="dark"] .text-link:disabled,
[data-theme="dark"] .icon-text-button:disabled {
  color: #a4aea9;
  opacity: 0.72;
  cursor: not-allowed;
  text-decoration: none;
}

[data-theme="dark"] .text-link:disabled:hover,
[data-theme="dark"] .icon-text-button:disabled:hover {
  text-decoration: none;
}

[data-theme="dark"] .button.ghost {
  border-color: rgba(138, 180, 248, 0.5);
}

[data-theme="dark"] .trend.up {
  color: #bfdbfe;
}

[data-theme="dark"] .trend.down {
  color: #fdba74;
}

[data-theme="dark"] .field,
[data-theme="dark"] .field-select,
[data-theme="dark"] .field-textarea,
[data-theme="dark"] .button.secondary,
[data-theme="dark"] .modal-close.icon-button {
  color: var(--ink);
  background: var(--paper-soft);
  border-color: var(--border);
}

[data-theme="dark"] .alert-icon {
  background: var(--cream);
}

[data-theme="dark"] .drop-zone,
[data-theme="dark"] .evidence-placeholder {
  background: var(--paper-soft);
  border-color: var(--border);
}

[data-theme="dark"] .drop-zone,
[data-theme="dark"] .evidence-placeholder strong {
  color: var(--ink);
}

[data-theme="dark"] .drop-zone p,
[data-theme="dark"] .evidence-placeholder {
  color: var(--ink-faint);
}

.stat-row,
.stat-row span {
  font-size: var(--tk-meta-size);
  line-height: 1.45;
}

.stat-row > * {
  min-width: 0;
}

.stat-row strong {
  max-width: 70%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.demo-gate h1 {
  font-size: clamp(46px, 5vw, 58px);
}

.demo-gate-brand,
.demo-gate-badge {
  font-size: var(--tk-meta-size);
  line-height: 1.45;
}

.auth-form .field {
  min-height: var(--tk-target-size);
  font-size: var(--tk-control-size);
}

.global-header .exit-demo-button {
  width: auto;
  min-width: var(--tk-target-size);
  padding-inline: 12px;
}

.exit-label {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .global-header .icon-button,
  .global-header .profile-button,
  .global-header .search-trigger,
  .menu-button,
  .sidebar-close,
  .global-header .theme-button,
  .global-header .notification-button,
  .global-header .exit-demo-button {
    flex-basis: var(--tk-target-size);
    min-width: var(--tk-target-size);
    width: var(--tk-target-size);
    height: var(--tk-target-size);
    min-height: var(--tk-target-size);
  }

  .button,
  .icon-button,
  .profile-button,
  .segmented-button,
  .period-button,
  .mini-tab,
  .module-tab,
  .filter-button,
  .store-tab {
    min-height: var(--tk-target-size);
    font-size: var(--tk-control-size);
  }

  .demo-notice {
    font-size: var(--tk-meta-size);
    line-height: 1.45;
  }

  .nav-group-trigger {
    min-height: var(--tk-target-size);
    font-size: var(--tk-control-size);
    cursor: pointer;
  }

  .nav-group-trigger > span:last-child {
    display: inline;
  }

  .nav-menu,
  .nav-menu-wide,
  .nav-menu-mega,
  .nav-menu-end {
    display: none;
  }

  .nav-group-trigger[aria-expanded="true"] + .nav-menu {
    display: grid;
  }

  .modal-body .stat-row {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
    align-items: start;
  }

  .demo-gate h1 {
    font-size: clamp(36px, 10vw, 40px);
  }
}

@media (max-width: 390px) {
  .global-brand {
    display: none;
  }
}

@media (max-width: 340px) {
  .global-header-inner {
    gap: 2px;
    padding-inline: 4px;
  }

  .top-actions {
    gap: 2px;
  }

  .menu-button,
  .global-header .icon-button,
  .global-header .profile-button,
  .global-header .search-trigger,
  .global-header .theme-button,
  .global-header .notification-button,
  .global-header .exit-demo-button {
    flex-basis: 44px;
    min-width: 44px;
    width: 44px;
    height: var(--tk-target-size);
    min-height: var(--tk-target-size);
    padding-inline: 0;
  }
}

.product-master-table {
  min-width: 1280px;
}

.product-master-table th:nth-child(4),
.product-master-table td:nth-child(4) {
  min-width: 150px;
}

.product-master-table th:nth-child(5),
.product-master-table td:nth-child(5) {
  min-width: 145px;
}

.product-thumb-button,
.runtime-product-media-preview,
.runtime-product-hero-preview,
button.runtime-review-hero-image {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.product-thumb-button {
  position: relative;
  flex: 0 0 auto;
}

.product-thumb-zoom,
.media-preview-zoom {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(12, 31, 59, 0.82);
  color: #fff;
  font-size: 10px;
  line-height: 1.2;
  opacity: 0;
  transition: opacity 160ms ease;
}

.product-thumb-button:hover .product-thumb-zoom,
.product-thumb-button:focus-visible .product-thumb-zoom,
.runtime-product-media-preview:hover .media-preview-zoom,
.runtime-product-media-preview:focus-visible .media-preview-zoom {
  opacity: 1;
}

.product-compact-status {
  display: grid;
  gap: 2px;
  min-width: 120px;
}

.product-compact-status strong {
  color: var(--ink);
  line-height: 1.35;
}

.product-compact-status span {
  color: var(--ink-faint);
  font-size: var(--tk-meta-size);
  line-height: 1.35;
}

.section-gap-compact {
  margin-top: 7px;
}

.product-row-actions {
  display: grid;
  justify-items: start;
  gap: 7px;
  min-width: 112px;
}

/* Product gallery follows the established ERP pattern: one focused modal,
   clean media, category controls above, and paging only below the results. */
.modal-backdrop[data-runtime-modal-type="product-gallery"] .modal {
  width: min(1280px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: clamp(22px, 3vw, 38px);
}

.modal-backdrop[data-runtime-modal-type="product-gallery"] .modal-mark,
.modal-backdrop[data-runtime-modal-type="product-gallery"] .modal-safety {
  display: none;
}

.modal-backdrop[data-runtime-modal-type="product-gallery"] .modal-body {
  margin-top: 22px;
}

.modal-backdrop[data-runtime-modal-type="product-gallery"] .modal-actions {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.modal-backdrop[data-runtime-modal-type="product-gallery"] #modalCancel {
  display: none;
}

.runtime-product-gallery {
  display: grid;
  gap: 18px;
}

.product-gallery-summary,
.product-gallery-filter-row,
.product-gallery-pagination,
.product-gallery-load-more,
.product-gallery-file {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-gallery-summary {
  color: var(--ink-soft);
}

.product-gallery-summary strong {
  margin-left: auto;
  color: var(--ink);
}

.product-gallery-controls {
  display: grid;
  gap: 12px;
}

.product-gallery-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  background: transparent;
}

.product-gallery-category-tabs .mini-tab span {
  margin-left: 4px;
  color: currentColor;
  opacity: 0.68;
}

.product-gallery-filter-row .field {
  flex: 1 1 320px;
  min-width: 220px;
}

.product-gallery-filter-row .field-select {
  width: auto;
  min-width: 140px;
}

.product-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-gallery-item,
.product-gallery-file {
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.product-gallery-item > div:last-child {
  display: grid;
  gap: 3px;
  padding: 12px 14px 14px;
}

.product-gallery-item strong,
.product-gallery-file strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-gallery-item span,
.product-gallery-file span {
  color: var(--ink-soft);
  font-size: 12px;
}

.product-gallery-image {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  background: #f7f5f1;
  border: 0;
  cursor: zoom-in;
}

.product-gallery-image img {
  width: 100%;
  height: 100%;
  padding: 10px;
  object-fit: contain;
}

.product-gallery-image > span:not(.runtime-review-thumbnail-error) {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 4px 8px;
  color: #fff;
  background: rgba(16, 40, 31, 0.84);
  border-radius: 999px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.product-gallery-image:hover > span:not(.runtime-review-thumbnail-error),
.product-gallery-image:focus-visible > span:not(.runtime-review-thumbnail-error) {
  opacity: 1;
}

.product-gallery-placeholder {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  color: var(--ink-faint);
  background: var(--paper-soft);
}

.product-gallery-item video {
  width: 100%;
  aspect-ratio: 1;
  background: #101713;
  object-fit: contain;
}

.product-gallery-file {
  padding: 16px;
}

.product-gallery-file > div {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.product-gallery-file-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--forest);
  background: var(--sage-soft);
  border-radius: 50%;
  font-weight: 800;
}

.product-gallery-pagination {
  justify-content: space-between;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
}

.product-gallery-pagination label,
.product-gallery-pagination > div {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.product-gallery-pagination .field-select {
  width: auto;
  min-width: 80px;
}

.product-gallery-load-more {
  justify-content: center;
  padding: 14px;
  background: var(--paper-soft);
  border: 1px solid var(--border);
}

.product-gallery-status,
.product-page-compact-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: var(--ink-soft);
  background: var(--paper-soft);
  border: 1px solid var(--border);
}

.product-gallery-empty,
.product-gallery-loading {
  display: grid;
  min-height: 240px;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--ink-soft);
  text-align: center;
}

.runtime-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 24, 19, 0.88);
  backdrop-filter: blur(8px);
}

.runtime-gallery-lightbox-close {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
}

.runtime-gallery-lightbox figure {
  display: grid;
  max-width: min(1400px, 94vw);
  max-height: 92vh;
  margin: 0;
  gap: 10px;
  place-items: center;
}

.runtime-gallery-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 48px);
  background: #fff;
  object-fit: contain;
}

.runtime-gallery-lightbox figcaption {
  color: #fff;
  font-weight: 700;
}

.product-filter-toolbar .toolbar-left {
  align-items: stretch;
  flex-wrap: wrap;
}

.product-filter-toolbar .field,
.product-filter-toolbar .field-select {
  min-height: 46px;
}

.product-source-select,
.pricing-store-select {
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.product-source-select .field-select { min-width: 180px; }
.product-series-select { min-width: 250px; }
.pricing-store-select .field-select { min-width: 210px; }

.inventory-filter-bar .toolbar-left {
  align-items: stretch;
  width: 100%;
}

.inventory-filter-bar .field,
.inventory-filter-bar .field-select {
  min-height: 44px;
}

.inventory-search-field {
  flex: 1 1 320px;
}

.inventory-stop-filter .field-select { border-left: 5px solid var(--border-color, #ccc); }
.inventory-stop-filter.stop-window-90 .field-select { border-left-color: #c99013; background: #fff8df; color: #513d05; }
.inventory-stop-filter.stop-window-180 .field-select { border-left-color: #318066; background: #edf8f2; color: #183f30; }

.inventory-search-field .field {
  width: 100%;
}

.inventory-stock-table .data-table {
  min-width: 1120px;
}

.inventory-stock-table .data-table th:first-child,
.inventory-stock-table .data-table td:first-child {
  min-width: 270px;
}

.inventory-stock-table .data-table th:last-child,
.inventory-stock-table .data-table td:last-child {
  min-width: 230px;
}

.inventory-product-toggle {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-align: left;
}

.inventory-product-toggle::after {
  content: "  查看批次";
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.inventory-lot-detail-row > td {
  padding: 0 !important;
  background: color-mix(in srgb, var(--sage-soft) 40%, var(--paper));
}

.inventory-lot-detail {
  padding: 20px 24px 24px;
}

.inventory-lot-detail h4 {
  margin: 0 0 12px;
}

.inventory-month-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  gap: 6px;
}

.inventory-month-grid span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  background: var(--canvas);
  border: 1px solid var(--border-soft);
}

.inventory-forecast-value {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}

.replenishment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--paper);
}

.replenishment-summary > span {
  flex: 1 1 210px;
  padding: 16px 20px;
  color: var(--ink-soft);
  border-right: 1px solid var(--border-soft);
}

.replenishment-summary > span:last-child {
  border-right: 0;
}

.replenishment-summary strong {
  margin-left: 8px;
  color: var(--ink);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.replenishment-summary .is-gap strong {
  color: #9a3412;
}

.replenishment-filter-bar {
  margin-bottom: 18px;
}

.replenishment-filter-bar .toolbar-left {
  width: 100%;
  flex-wrap: wrap;
}

.replenishment-search-field {
  flex: 1 1 320px;
}

.replenishment-search-field .field {
  width: 100%;
}

.replenishment-table {
  min-width: 1540px;
}

.replenishment-product-list {
  display: grid;
  gap: 16px;
}

.planning-calculation-popover { width: min(560px, calc(100vw - 48px)); max-height: calc(100dvh - 80px); overflow: auto; padding: 24px; border: 1px solid #d8dedb; border-radius: 12px; background: var(--surface, white); color: var(--text, #151b17); box-shadow: 0 12px 48px #0003; }
.planning-calculation-popover::backdrop { background: #0002; }
.planning-calculation-popover p { white-space: pre-line; }
.planning-calculation-popover small { display: block; overflow-wrap: anywhere; }
.modal-backdrop[data-runtime-modal-type^="inventory-planning"] .modal,
.modal-backdrop:has(#calculatedMatrixControls) .modal { width: min(1440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
#calculatedMatrixControls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
#calculatedMatrixControls .button { white-space: nowrap; flex-shrink: 0; }
#planningBatchForm .field { min-width: 90px; }
.replenishment-matrix-shell { max-height: 70vh; overflow: auto; }
.replenishment-matrix { min-width: 100%; width: max-content; border-collapse: separate; border-spacing: 0; }
.replenishment-matrix th, .replenishment-matrix td { min-width: 125px; vertical-align: middle; }
.replenishment-matrix .replenishment-fixed-product { position: sticky; left: 0; z-index: 1; width: 260px; min-width: 260px; max-width: 260px; background: var(--paper); white-space: normal; }
.replenishment-matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--paper); }
.replenishment-matrix thead .replenishment-fixed-product { z-index: 3; }
.replenishment-matrix small { display: block; font-weight: 400; color: var(--ink-soft); margin-top: 5px; }
.replenishment-number { text-align: right; font-variant-numeric: tabular-nums; }
.replenishment-cell-number { display: block; margin-left: auto; padding: 8px; border: 0; border-bottom: 1px dotted currentColor; background: transparent; color: var(--green); font: inherit; font-weight: 700; cursor: pointer; }
.replenishment-cell-number:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.replenishment-cell-explanation p { overflow-wrap: anywhere; }
.replenishment-matrix-controls { justify-content: flex-start; gap: 16px; flex-wrap: wrap; }

.replenishment-product-card {
  padding: 20px;
}

.replenishment-product-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.replenishment-product-heading h3,
.replenishment-product-heading p {
  margin: 0;
}

.replenishment-product-heading p {
  margin-top: 5px;
  color: var(--ink-soft);
}

.replenishment-month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.replenishment-month-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--paper) 84%, var(--canvas));
}

.replenishment-month-card span {
  color: var(--ink-soft);
  font-size: 13px;
}

.replenishment-scenario-details {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  background: var(--paper);
}

.replenishment-scenario-details summary {
  color: var(--green);
  font-weight: 800;
  cursor: pointer;
}

.replenishment-scenario-details p {
  color: var(--ink-soft);
}

.replenishment-table th:first-child,
.replenishment-table td:first-child {
  min-width: 260px;
}

.replenishment-table th:nth-child(5),
.replenishment-table td:nth-child(5) {
  min-width: 390px;
}

.replenishment-compare {
  display: grid;
  gap: 5px;
  min-width: 140px;
}

.replenishment-compare span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 13px;
}

.replenishment-compare strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.replenishment-stage-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(64px, 1fr));
  gap: 7px;
}

.replenishment-stage {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--paper) 80%, var(--canvas));
  text-align: center;
}

.replenishment-stage small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.3;
}

.replenishment-stage strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.replenishment-stage.is-arrived {
  border-color: color-mix(in srgb, #2f6f57 34%, var(--border-soft));
  background: color-mix(in srgb, #dcece5 54%, var(--paper));
}

.replenishment-stage.is-gap {
  border-color: color-mix(in srgb, #b45309 34%, var(--border-soft));
  background: color-mix(in srgb, #fff2dc 58%, var(--paper));
}

.replenishment-warning {
  display: inline-block;
  margin-top: 6px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
  cursor: help;
}

.replenishment-edit-context {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin-top: 20px;
  border: 1px solid var(--border-soft);
  background: var(--border-soft);
}

.replenishment-edit-context span {
  flex: 1 1 150px;
  padding: 14px 16px;
  background: var(--paper);
}

.replenishment-pagination {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .replenishment-summary > span {
    flex-basis: 50%;
    padding: 13px 15px;
  }

  .replenishment-stage-grid {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }
}

.product-name-list-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  color: var(--ink-soft);
  background: var(--sage-soft);
  border-radius: 8px;
  line-height: 1.6;
}

@media (max-width: 1000px) {
  .product-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .modal-backdrop[data-runtime-modal-type="product-gallery"] {
    padding: 0;
  }

  .modal-backdrop[data-runtime-modal-type="product-gallery"] .modal {
    width: 100vw;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .product-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-gallery-summary,
  .product-gallery-filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .product-gallery-summary strong {
    margin-left: 0;
  }
}

@media (max-width: 460px) {
  .product-gallery-grid {
    grid-template-columns: 1fr;
  }
}

.button.compact {
  min-height: 34px;
  padding: 6px 10px;
  font-size: var(--tk-control-size);
}

.product-master-row.is-expanded > td {
  background: color-mix(in srgb, var(--blue-soft) 44%, var(--paper));
  border-bottom-color: transparent;
}

.product-inline-row > td {
  padding: 0 !important;
  background: color-mix(in srgb, var(--blue-soft) 28%, var(--paper));
}

.product-inline-archive {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-top: 2px solid color-mix(in srgb, var(--blue) 50%, var(--border));
}

.product-inline-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.product-inline-heading h2 {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 28px);
}

.product-inline-heading p:last-child {
  margin: 0;
  color: var(--ink-muted);
}

.product-identity-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
}

.product-identity-strip > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--paper);
}

.product-identity-strip span,
.product-record-card-title p {
  color: var(--ink-faint);
  font-size: var(--tk-meta-size);
}

.product-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.product-record-grid > section,
.product-record-card {
  min-width: 0;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--paper);
}

.product-record-grid > section {
  padding: 14px;
}

.product-record-grid > section.is-wide {
  grid-column: 1 / -1;
}

.product-record-grid h4 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: var(--tk-control-size);
}

.product-channel-detail > section:first-child {
  grid-column: span 1;
}

.product-record-card {
  padding: 16px;
}

.product-record-card.is-empty {
  color: var(--ink-muted);
}

.product-record-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.product-record-card-title h3,
.product-record-card-title p {
  margin: 0;
}

.product-record-lines {
  display: grid;
  gap: 7px;
}

.product-record-lines > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  overflow-wrap: anywhere;
  color: var(--ink-muted);
  line-height: 1.55;
}

.product-record-lines > div > strong {
  min-width: 80px;
  color: var(--ink);
}

.empty-value {
  color: var(--ink-faint);
}

.runtime-product-media-preview {
  position: relative;
  display: block;
  width: 100%;
}

.runtime-product-hero-preview {
  display: block;
  width: min(240px, 100%);
}

.runtime-product-hero-preview img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.runtime-image-lightbox {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0;
}

.runtime-image-lightbox img {
  display: block;
  max-width: min(100%, 1100px);
  max-height: 72vh;
  object-fit: contain;
  border-radius: 12px;
  background: var(--paper-soft);
}

.runtime-image-lightbox figcaption {
  color: var(--ink-muted);
  text-align: center;
}

.channel-identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 6px;
  min-width: 0;
}

.channel-identity-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  background: var(--paper-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.channel-identity-item span {
  color: var(--ink-faint);
  font-size: var(--tk-meta-size);
  line-height: 1.35;
}

.channel-identity-item strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: var(--tk-control-size);
  line-height: 1.4;
}

.channel-identity-item.is-empty strong {
  color: var(--ink-faint);
  font-weight: 600;
}

.official-registration {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 8px;
  background: var(--paper-soft);
  border: 1px solid var(--border-soft);
  border-radius: 9px;
}

.official-registration strong,
.official-registration span {
  overflow-wrap: anywhere;
}

.official-registration > span:not(.badge),
.official-registration .quiet-note {
  color: var(--ink-faint);
  font-size: var(--tk-meta-size);
  line-height: 1.4;
}

.official-registration.is-ambiguous,
.official-registration.is-error {
  border-color: color-mix(in srgb, var(--amber) 34%, var(--border-soft));
  background: color-mix(in srgb, var(--amber-soft) 58%, var(--paper));
}

.product-gallery-card .official-registration {
  margin-top: 10px;
}

.pricing-catalog-table {
  min-width: 1460px;
}

  .pricing-catalog-table th:nth-child(n+3),
  .pricing-catalog-table td:nth-child(n+3) {
  min-width: 130px;
}

.pricing-product-link {
  display: inline-block;
  max-width: 260px;
  overflow-wrap: anywhere;
}

.pricing-filter-toolbar .toolbar-left {
  align-items: end;
  flex-wrap: wrap;
}

.pricing-filter-toolbar .field,
.pricing-filter-toolbar .field-select,
.product-filter-toolbar .field,
.product-filter-toolbar .field-select {
  min-height: 46px;
}

.pricing-filter-toolbar .field,
.product-filter-toolbar .field {
  width: min(360px, 100%);
  min-width: 260px;
}

.pricing-product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

.pricing-product-cell > div {
  display: grid;
  gap: 4px;
}

.pricing-product-cell > div > span {
  color: var(--ink-faint);
  font-size: var(--tk-meta-size);
}

.pricing-product-thumb {
  display: grid;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  overflow: hidden;
  place-items: center;
  background: var(--paper-soft);
  border: 1px solid var(--border);
}

.pricing-product-thumb img {
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
}

.pricing-product-thumb.product-missing-image strong {
  font-size: 13px;
}

.pricing-product-thumb.product-missing-image em {
  font-size: 9px;
}

.report-detail-heading,
.report-ranking-heading {
  align-items: end;
}

.report-month-filter {
  display: grid;
  gap: 5px;
  min-width: 180px;
  color: var(--ink-soft);
  font-size: var(--tk-meta-size);
  font-weight: 750;
}

.report-ranking-table {
  min-width: 880px;
}

.report-change {
  display: grid;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

.report-change span {
  font-size: var(--tk-meta-size);
}

.report-change.up strong,
.report-change.up span {
  color: var(--forest);
}

.report-change.down strong,
.report-change.down span {
  color: var(--red);
}

.modal-backdrop[data-runtime-modal-type="product-detail"] .modal {
  width: min(1240px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
}

.modal-backdrop[data-runtime-modal-type="product-detail"] .modal-mark,
.modal-backdrop[data-runtime-modal-type="product-detail"] .modal-safety,
.modal-backdrop[data-runtime-modal-type="product-detail"] #modalCancel {
  display: none;
}

.runtime-product-detail-modal {
  display: grid;
  gap: 22px;
}

.product-detail-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: clamp(22px, 4vw, 46px);
  padding: clamp(18px, 3vw, 32px);
  background: var(--paper-soft);
  border: 1px solid var(--border);
}

.product-detail-hero h2 {
  margin: 8px 0 5px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

.product-detail-hero p {
  margin: 0;
  color: var(--ink-soft);
}

.product-detail-brand {
  color: var(--forest);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.product-detail-hero-image {
  position: relative;
  display: grid;
  width: 220px;
  aspect-ratio: 1;
  padding: 12px;
  overflow: hidden;
  place-items: center;
  background: #fff;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

.product-detail-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail-hero-image > span {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 4px 8px;
  color: #fff;
  background: rgba(15, 55, 34, 0.86);
  font-size: 11px;
}

.product-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.product-detail-meta > span {
  padding: 6px 10px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--border);
  font-size: var(--tk-meta-size);
}

.product-detail-section,
.product-detail-collapsible {
  padding: clamp(16px, 2.5vw, 26px);
  background: var(--paper);
  border: 1px solid var(--border);
}

.product-detail-section > h3,
.product-detail-collapsible > summary {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
}

.product-detail-collapsible > summary {
  margin: 0;
  cursor: pointer;
}

.product-detail-collapsible[open] > summary {
  margin-bottom: 18px;
}

.product-detail-collapsible article + article {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.product-detail-note {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: var(--tk-meta-size);
}

.product-ean-list {
  display: grid;
  margin: 14px 0 0;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.product-ean-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 10px 12px;
  background: var(--paper-soft);
  border: 1px solid var(--border);
}

.product-ean-list span {
  color: var(--ink-soft);
  font-size: var(--tk-meta-size);
}

.product-inventory-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-inventory-cards article,
.product-official-source {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: var(--paper-soft);
  border: 1px solid var(--border);
}

.product-inventory-cards span,
.product-inventory-cards small,
.product-official-source span,
.product-official-source p {
  color: var(--ink-soft);
}

.product-inventory-cards strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.product-official-sources {
  display: grid;
  gap: 10px;
}

.product-official-source p {
  margin: 0;
}

.product-detail-empty {
  display: grid;
  min-height: 130px;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--ink-soft);
  text-align: center;
}

@media (max-width: 760px) {
  .product-detail-hero {
    grid-template-columns: 1fr;
  }

  .product-detail-hero-image {
    width: min(260px, 100%);
    justify-self: center;
  }

  .product-inventory-cards {
    grid-template-columns: 1fr;
  }
}

.catalog-price-value {
  display: grid;
  gap: 3px;
  min-width: 105px;
}

.catalog-price-value strong {
  color: var(--ink);
  font-size: var(--tk-control-size);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.catalog-price-value span {
  color: var(--ink-faint);
  font-size: var(--tk-meta-size);
  line-height: 1.35;
}

.catalog-price-missing {
  display: inline-flex;
  min-width: 82px;
}

@media (max-width: 768px) {
  .product-master-table {
    min-width: 1120px;
  }

  .product-master-table th:nth-child(4),
  .product-master-table td:nth-child(4) {
    min-width: 140px;
  }

  .product-master-table th:nth-child(5),
  .product-master-table td:nth-child(5) {
    min-width: 135px;
  }

  .channel-identity-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-inline-heading {
    display: grid;
  }

  .product-identity-strip,
  .product-record-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-record-grid > section.is-wide {
    grid-column: auto;
  }

  .pricing-catalog-table {
    min-width: 1160px;
  }

  .pricing-catalog-table th:nth-child(n+3),
  .pricing-catalog-table td:nth-child(n+3) {
    min-width: 118px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Final brand guard: this stays last because earlier compatibility rules still
   carry legacy green !important declarations used by older installations. */
html[data-theme="light"] .button.primary,
html[data-theme="light"] .mini-tab.is-active,
html[data-theme="light"] .module-tab.is-active,
html[data-theme="light"] .period-button.is-active {
  color: #ffffff !important;
  background: #101010 !important;
  border-color: #101010 !important;
}

html[data-theme="light"] .button.primary:hover,
html[data-theme="light"] .mini-tab.is-active:hover,
html[data-theme="light"] .module-tab.is-active:hover,
html[data-theme="light"] .period-button.is-active:hover {
  color: #ffffff !important;
  background: #343434 !important;
  border-color: #343434 !important;
}

html[data-theme="light"] .demo-notice {
  color: #33473f;
  background: #eef9f5;
  border-color: #b6dfd3;
}

html[data-theme="light"] .eyebrow,
html[data-theme="light"] .text-link,
html[data-theme="light"] .icon-text-button {
  color: #245f4d;
}

.button.compact {
  min-height: 42px;
  padding-inline: 15px;
  border-radius: 999px;
}

.product-identity-strip > div,
.product-record-grid > section,
.product-record-card,
.channel-identity-item,
.official-registration,
.runtime-image-lightbox img {
  border-radius: 2px;
}

.runtime-gallery-image,
.runtime-product-media-thumb {
  min-height: 260px;
  background: #f7f5f1;
}

.runtime-gallery-image > img,
.runtime-product-media-thumb img {
  height: 260px;
  padding: 12px;
  object-fit: contain;
}

@media (max-width: 1500px) and (min-width: 769px) {
  .global-header .search-trigger > span:nth-child(2),
  .global-header .search-trigger kbd,
  .global-header .profile-name,
  .exit-label {
    display: none;
  }

  .global-header .search-trigger,
  .global-header .profile-button,
  .exit-demo-button {
    width: var(--tk-target-size);
    padding: 0;
    justify-content: center;
  }

  .local-state {
    display: none;
  }
}

@media (max-width: 390px) {
  .global-brand {
    display: none;
  }
}

@media (max-width: 768px) {
  .local-state {
    display: none;
  }
}

/* The optional dark theme keeps the same monochrome brand hierarchy. */
html[data-theme="dark"] {
  --ink: #f2f2f2;
  --ink-soft: #d0d0d0;
  --ink-faint: #ababab;
  --cream: #0b0b0b;
  --paper: #141414;
  --paper-soft: #202020;
  --sand: #383838;
  --forest: #e0e0e0;
  --forest-2: #d0d0d0;
  --moss: #aaa;
  --sage: #303030;
  --sage-soft: #242424;
  --blue: #ddd;
  --blue-soft: #292929;
  --border: #3c3c3c;
  --border-soft: #2b2b2b;
  --surface: #141414;
  --surface-soft: #202020;
  --text: #f2f2f2;
  --text-secondary: #d0d0d0;
}
html[data-theme="dark"] .mini-tab.is-active,
html[data-theme="dark"] .module-tab.is-active,
html[data-theme="dark"] .period-button.is-active {
  background: #333 !important;
  border-color: #888 !important;
  color: #fff !important;
}
html[data-theme="dark"] .forecast-category-dialog {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--border);
}
html[data-theme="dark"] .global-header,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .sidebar {
  background: #101010 !important;
}

html[data-theme="dark"] .global-header {
  border-bottom: 1px solid #343434;
  box-shadow: none;
}

html[data-theme="dark"] .view-header h1,
html[data-theme="dark"] .section-heading h2,
html[data-theme="dark"] .modal h2,
html[data-theme="dark"] .metric-value,
html[data-theme="dark"] .demo-gate h1 {
  color: #f1f5f9;
}

html[data-theme="dark"] .switcher-label,
html[data-theme="dark"] .store-tab {
  color: #cbd5e1;
}

html[data-theme="dark"] .store-tab.is-active {
  color: #ffffff;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .store-tab.is-active::after {
  background: #ddd;
}

html[data-theme="dark"] .button.primary {
  color: #101010 !important;
  background: #e0e0e0 !important;
  border-color: #e0e0e0 !important;
}

html[data-theme="dark"] .button.primary:hover {
  color: #101010 !important;
  background: #fff !important;
  border-color: #fff !important;
}

html[data-theme="dark"] .demo-notice {
  color: #cbd5e1;
  background: #202020;
  border-color: #3c3c3c;
}

html[data-theme="dark"] .demo-gate {
  background: #101010;
}

html[data-theme="dark"] .demo-gate-card,
html[data-theme="dark"] .demo-boundaries,
html[data-theme="dark"] .runtime-auth-tabs {
  background: var(--paper);
  border-color: var(--border);
}

html[data-theme="dark"] .demo-gate-lead,
html[data-theme="dark"] .auth-mode-hint,
html[data-theme="dark"] .auth-form-note {
  color: #cbd5e1;
}

.runtime-source-link,
.runtime-external-source {
  white-space: nowrap;
}

.runtime-source-path {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.runtime-knowledge-readable {
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--forest) 18%, var(--border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--forest) 5%, var(--paper));
}

.runtime-knowledge-readable > span {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.runtime-knowledge-readable > p {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.75;
}

.runtime-vi-guide {
  padding: 6px 0 12px;
}

.runtime-vi-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.runtime-vi-swatch {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
}

.runtime-vi-swatch > span {
  display: block;
  height: 60px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgb(15 23 42 / 8%);
}

.runtime-vi-swatch strong,
.runtime-vi-swatch small {
  display: block;
}

.runtime-vi-swatch small {
  margin-top: 3px;
  color: var(--ink-soft);
}

.runtime-vi-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.runtime-vi-preview-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.runtime-vi-preview-card > div {
  padding: 16px 18px 18px;
}

.runtime-vi-preview-card p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.runtime-vi-preview {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #f7f6f1;
  cursor: zoom-in;
}

.runtime-vi-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.runtime-vi-preview > span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgb(10 65 15 / 88%);
  font-size: 12px;
  font-weight: 700;
}

.brand-knowledge-map {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 2.6fr);
  gap: 18px;
  align-items: stretch;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.brand-map-root,
.brand-map-domain {
  appearance: none;
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.brand-map-root {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 230px;
  padding: 26px;
  border: 1px solid #0a410f;
  border-radius: 18px;
  background: #eef4ec;
}

.brand-map-root.is-active {
  color: #fff;
  background: #0a410f;
}

.brand-map-root strong {
  font-size: clamp(22px, 2vw, 32px);
  letter-spacing: 0.02em;
}

.brand-map-root span {
  margin-top: 9px;
  font-size: 20px;
  font-weight: 800;
}

.brand-map-root small {
  margin-top: 18px;
  color: inherit;
  opacity: 0.78;
}

.brand-map-branches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.brand-map-domain {
  position: relative;
  min-height: 108px;
  padding: 16px 52px 15px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--paper-soft);
}

.brand-map-domain:hover,
.brand-map-domain:focus-visible,
.brand-map-domain.is-active {
  border-color: #0a410f;
  background: #e7f0e5;
}

.brand-map-domain span,
.brand-map-domain small {
  display: block;
}

.brand-map-domain span {
  font-weight: 800;
}

.brand-map-domain strong {
  position: absolute;
  top: 14px;
  right: 15px;
  color: #0a410f;
  font-size: 20px;
}

.brand-map-domain small {
  margin-top: 8px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.brand-library-coverage {
  margin: 12px 4px 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.brand-topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.brand-topic-chip,
.brand-page-button {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.brand-topic-chip span {
  margin-left: 7px;
  color: var(--ink-faint);
}

.brand-topic-chip.is-active,
.brand-page-button.is-active {
  border-color: #0a410f;
  color: #fff;
  background: #0a410f;
}

.brand-library-toolbar {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(180px, 0.28fr) minmax(180px, 0.28fr);
  gap: 12px;
  align-items: end;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--paper);
}

.brand-library-toolbar label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.brand-library-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
}

.brand-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.brand-library-card {
  display: flex;
  flex-direction: column;
  min-height: 238px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.brand-library-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-library-card h3 {
  margin: 16px 0 8px;
  font-size: 21px;
  line-height: 1.35;
}

.brand-library-card > p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.brand-library-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--ink-faint);
  font-size: 14px;
}

.button.compact {
  min-height: 40px;
  padding: 8px 13px;
  font-size: 14px !important;
}

.brand-library-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--paper);
}

.brand-library-pagination > div,
.brand-library-pagination nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-library-pagination label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
}

.brand-page-button {
  min-width: 40px;
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 10px;
}

.brand-library-original {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper-soft);
}

.brand-library-original summary {
  color: #0a410f;
  font-weight: 800;
  cursor: pointer;
}

.brand-library-original pre {
  max-height: 420px;
  overflow: auto;
  margin: 14px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  line-height: 1.65;
}

.runtime-readable-fields {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
}

.runtime-readable-fields > div {
  display: grid;
  grid-template-columns: minmax(110px, 180px) 1fr;
  gap: 14px;
  align-items: start;
}

.runtime-readable-fields dt { color: var(--ink-faint); }
.runtime-readable-fields dd { margin: 0; }
.runtime-readable-fields .runtime-contract-list { margin: 0; }

.competitor-price-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(220px, 1fr) minmax(210px, .8fr);
  gap: 12px;
  margin-bottom: 14px;
}

.competitor-price-toolbar label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 13px;
}

.competitor-price-summary { margin: 0 0 14px; }
.competitor-price-table th:first-child { width: 29%; }
.competitor-price-table td { vertical-align: top; }

.competitor-price-observations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.competitor-price-observations article {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.competitor-price-observations header,
.competitor-price-observations article > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.competitor-price-observations p,
.competitor-price-observations small { margin: 0; }

[data-theme="dark"] .brand-map-root {
  background: #223526;
}

[data-theme="dark"] .brand-map-root.is-active,
[data-theme="dark"] .brand-topic-chip.is-active,
[data-theme="dark"] .brand-page-button.is-active {
  color: #102014;
  background: #8fc596;
}

@media (max-width: 1080px) {
  .brand-knowledge-map {
    grid-template-columns: 1fr;
  }

  .brand-map-root {
    min-height: 150px;
  }

  .brand-library-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .brand-library-search {
    grid-column: 1 / -1;
  }

  .competitor-price-toolbar,
  .competitor-price-observations {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .brand-map-branches,
  .brand-library-grid,
  .brand-library-toolbar {
    grid-template-columns: 1fr;
  }

  .brand-library-search {
    grid-column: auto;
  }

  .brand-library-card-footer,
  .brand-library-pagination,
  .brand-library-pagination > div,
  .brand-library-pagination nav {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .runtime-vi-swatches {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .runtime-vi-swatches,
  .runtime-vi-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
.calculation-group{margin:16px 0;padding:14px;border:1px solid var(--border);border-radius:14px}.calculation-group h3{margin:0 0 10px}.planning-model-tabs{display:flex;gap:8px;flex-wrap:wrap}.modal[data-modal-type="inventory-replenishment-detail"] .modal-card{width:min(980px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto}.sales-target-row{display:grid;grid-template-columns:minmax(130px,.7fr) minmax(180px,2fr) minmax(240px,1.4fr);gap:14px;align-items:center;padding:10px 0;border-top:1px solid var(--border)}.sales-target-row>div{display:flex;gap:10px;justify-content:space-between;flex-wrap:wrap}.sales-target-bars{position:relative;display:block!important;height:18px;background:var(--surface-soft);border-radius:999px;overflow:hidden}.sales-target-bars span{position:absolute;left:0;height:7px;border-radius:999px}.sales-target-bars .target{top:2px;background:var(--terracotta)}.sales-target-bars .actual{bottom:2px;background:var(--forest-2)}.policy-clause .stat-row{align-items:flex-start}.policy-clause .stat-row strong{max-width:68%;text-align:right;white-space:normal}@media(max-width:760px){.sales-target-row{grid-template-columns:1fr}.sales-target-row>div{justify-content:flex-start}.modal[data-modal-type="inventory-replenishment-detail"] .stat-row{display:block}.modal[data-modal-type="inventory-replenishment-detail"] .stat-row>*{display:block;text-align:left;margin-top:4px}.policy-clause .stat-row strong{max-width:none;text-align:left}}
.policy-handbook{display:grid;grid-template-columns:250px minmax(0,1fr);gap:32px;align-items:start;margin-top:24px}
.policy-directory{position:sticky;top:96px;border-right:1px solid var(--border);padding-right:18px}
.policy-directory h2{font-size:15px;margin:0 0 18px}
.policy-directory button{display:flex;align-items:center;gap:10px;width:100%;padding:14px 10px;text-align:left;border:0;border-bottom:1px solid var(--border);background:transparent;color:var(--ink);cursor:pointer;border-radius:4px}
.policy-directory button[aria-current]{background:var(--ink);color:var(--paper)}
/* Dashboard and reports share the same in-content shop/date controls. */
.analytics-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  min-width: 0;
}
.analytics-filter-row > [data-analytics-store-slot] { min-width: 0; max-width: 100%; }
.analytics-filter-row .store-switcher.is-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}
.analytics-filter-row .switcher-label { font-size: 12px; }
.analytics-filter-row .store-tabs { flex: 0 0 auto; }
.analytics-filter-row .store-tab { min-height: 44px; padding: 8px 12px; }
.analytics-filter-row .store-select-wrap { min-width: 0; max-width: 100%; }
.analytics-filter-row .store-select { max-width: 100%; }
.analytics-filter-row .analytics-toolbar {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  max-width: 100%;
}
.analytics-filter-row .period-tabs { flex-wrap: wrap; max-width: 100%; }
.global-header .exit-demo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--tk-target-size);
  width: var(--tk-target-size);
  height: var(--tk-target-size);
  padding: 0;
  line-height: 1;
}
.policy-directory small{display:block;font-size:11px;line-height:1.6;opacity:.7;font-weight:400;margin-top:4px}
.policy-index{font-size:18px;opacity:.55;font-variant-numeric:tabular-nums}.policy-count{margin-left:auto;font-size:12px;opacity:.65}
.policy-content{min-width:0}.policy-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.policy-toolbar .field{flex:1;min-width:180px;width:auto}.policy-toolbar .button{flex-shrink:0}
.policy-chapter{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:32px 0 20px}.policy-chapter h2{font-size:26px;margin:6px 0}.policy-chapter p{margin:0}
.policy-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.policy-clause{padding:24px;border:1px solid var(--border);border-top:3px solid var(--ink);border-radius:4px;background:var(--paper);min-width:0;overflow-wrap:anywhere}
.policy-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:22px}.policy-clause h3{font-size:20px;line-height:1.5;margin:0}.policy-card-heading .badge{white-space:nowrap}
.policy-clause dl{margin:0}.policy-field{margin:0 0 20px}.policy-field dt,.policy-steps h4{font-size:12px;color:var(--ink-soft);margin:0 0 7px;font-weight:500}.policy-field dd{margin:0;font-size:15px;line-height:1.85;text-align:left;font-weight:400}
.policy-steps{padding-top:18px;border-top:1px solid var(--border);margin-bottom:22px}.policy-clause ol{padding-left:24px;margin:0;line-height:1.9;font-size:15px}.policy-clause li{padding-left:5px;margin:0 0 12px}.policy-clause li::marker{font-weight:700}.policy-clause .text-link{margin-top:8px}.policy-template{border-top-style:dashed}.policy-template p{line-height:1.8}
.policy-more{margin-top:22px}.policy-footnote{margin-top:26px}.policy-preset-picker{display:grid;gap:10px;padding:16px;border:1px solid var(--border);border-radius:4px}.policy-preset-picker small{color:var(--ink-soft)}
@media(max-width:1150px){.policy-handbook{grid-template-columns:220px minmax(0,1fr);gap:20px}.policy-cards{grid-template-columns:1fr}}
@media(max-width:760px){.policy-handbook{grid-template-columns:1fr;gap:20px}.policy-directory{position:static;border-right:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.policy-directory h2{grid-column:1/-1}.policy-directory small{display:none}.policy-directory button{font-size:12px;padding:12px 6px}.policy-chapter{align-items:flex-start}.policy-chapter h2{font-size:22px}.policy-clause{padding:20px}.policy-toolbar{gap:8px}.policy-toolbar .field{min-width:130px}}
