:root {
  --ink: #101310;
  --ink-soft: #1a1f1b;
  --paper: #f7f8f4;
  --white: #ffffff;
  --line: #dce1da;
  --muted: #667067;
  --lime: #c9ff4f;
  --lime-dark: #688f00;
  --coral: #ff6d5f;
  --cyan: #4fd5ff;
  --yellow: #ffd23f;
  --violet: #8f7cff;
  --green: #26a269;
  --red: #d64435;
  --shadow: 0 18px 48px rgba(12, 17, 13, 0.12);
  --font: "Manrope", Arial, sans-serif;
  --mono: "DM Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 15px;
  letter-spacing: 0;
}
button, input, select { font: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; stroke-width: 1.9; }
.hidden { display: none !important; }
.page-width { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  color: var(--white);
  background: var(--ink);
  border-bottom: 1px solid #323832;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand small { color: var(--ink); background: var(--lime); padding: 3px 5px; font: 500 9px var(--mono); }
.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: var(--lime);
  border-radius: 4px;
}
.brand-mark svg { width: 20px; height: 20px; stroke-width: 2.4; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.source-status { display: inline-flex; align-items: center; gap: 7px; color: #c9d0c9; font: 500 12px var(--mono); margin-right: 6px; }
.source-status b { color: var(--white); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #899289; }
.source-status.connected .status-dot { background: var(--lime); box-shadow: 0 0 0 4px rgba(201,255,79,.12); }

.button, .icon-button, .text-button {
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: 5px;
  font-weight: 700;
  white-space: nowrap;
}
.button:hover, .icon-button:hover, .text-button:hover { transform: translateY(-1px); }
.button-primary { color: var(--ink); background: var(--lime); }
.button-primary:hover { background: #d6ff75; }
.button-secondary { color: var(--ink); background: var(--white); border: 1px solid var(--line); }
.button-secondary:hover { border-color: #aeb8ae; }
.button-quiet { color: inherit; background: transparent; border: 1px solid currentColor; }
.topbar .button-quiet { color: #d7ddd7; border-color: #3f463f; }
.topbar .button-quiet:hover { color: var(--white); border-color: #6c756c; }
.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 5px;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
}
.topbar .icon-button { color: #d7ddd7; border-color: #3f463f; }
.small-icon { width: 34px; height: 34px; }
.small-icon svg { width: 16px; height: 16px; }
.text-button { display: inline-flex; align-items: center; gap: 8px; color: #d8ded8; background: transparent; padding: 10px 3px; font-weight: 700; }
.text-button:hover { color: var(--white); }
.button:disabled, .icon-button:disabled { opacity: .42; cursor: not-allowed; transform: none; }

.connection-stage {
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, .82fr);
  align-items: center;
  gap: 72px;
  color: var(--white);
  padding-block: 64px 72px;
}
main { background: var(--ink); }
.kicker, .step-label, .section-kicker { margin: 0; font: 500 11px var(--mono); text-transform: uppercase; color: var(--muted); }
.kicker { display: flex; align-items: center; gap: 9px; color: var(--lime); }
.kicker span { width: 22px; height: 2px; background: var(--lime); }
.stage-copy h1 {
  margin: 18px 0;
  max-width: 700px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.01;
  font-weight: 800;
  letter-spacing: 0;
}
.stage-copy h1 em { color: var(--lime); font-style: normal; }
.stage-text { max-width: 610px; margin: 0; color: #bdc5bd; font-size: 17px; line-height: 1.7; }
.stage-actions { display: flex; align-items: center; gap: 20px; margin-top: 30px; }
.security-line { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: #899389; font: 400 11px var(--mono); }
.security-line svg { width: 15px; height: 15px; }

.signal-board { background: #171c18; border: 1px solid #394139; box-shadow: 16px 16px 0 #252b25; overflow: hidden; }
.signal-topline { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; color: #879087; border-bottom: 1px solid #353c35; font: 500 10px var(--mono); }
.live-label { display: flex; align-items: center; gap: 7px; color: var(--lime); }
.live-label i { width: 6px; height: 6px; background: var(--lime); border-radius: 50%; }
.signal-main { padding: 27px 24px 8px; }
.signal-main span { display: block; color: #aab3aa; font-size: 12px; }
.signal-main strong { display: block; margin: 7px 0 1px; color: var(--white); font: 500 54px/1 var(--mono); }
.signal-main small { color: #727c72; font-size: 10px; }
.signal-bars { height: 120px; display: flex; align-items: flex-end; gap: 7px; padding: 14px 24px 0; }
.signal-bars span { flex: 1; height: var(--h); background: var(--cyan); opacity: .35; border-top: 2px solid var(--cyan); }
.signal-bars span:nth-child(4n), .signal-bars span:nth-child(7n) { background: var(--lime); border-color: var(--lime); opacity: .75; }
.signal-alert { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 20px; padding: 13px; color: var(--ink); background: var(--coral); }
.alert-icon { width: 34px; height: 34px; display: grid; place-items: center; background: rgba(16,19,16,.12); }
.signal-alert span:nth-child(2) { min-width: 0; }
.signal-alert small, .signal-alert b { display: block; }
.signal-alert small { font: 500 9px var(--mono); opacity: .68; }
.signal-alert b { margin-top: 2px; font-size: 12px; }
.signal-alert > strong { font: 500 15px var(--mono); white-space: nowrap; }

.connector-band { background: var(--white); padding: 70px 0 66px; border-bottom: 1px solid var(--line); }
.connector-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.connector-heading h2, .path-heading h2, .results-toolbar h2 { margin: 7px 0 6px; font-size: 27px; line-height: 1.2; }
.connector-heading p:not(.step-label) { margin: 0; color: var(--muted); }
.coverage-badge { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 9px 11px; color: #394139; border: 1px solid var(--line); font: 500 11px var(--mono); }
.coverage-badge svg { width: 15px; height: 15px; }
.provider-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.provider-button {
  min-width: 0;
  min-height: 104px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 16px;
  text-align: left;
  background: var(--white);
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  position: relative;
}
.provider-button::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: transparent; }
.provider-button:hover { background: #f6f8f4; }
.provider-button:hover::before, .provider-button.featured::before { background: var(--lime-dark); }
.provider-button.connected { background: #f3f8e8; }
.provider-button.connected::after { content: "CONNECTÉ"; position: absolute; top: 8px; right: 8px; color: var(--lime-dark); font: 500 8px var(--mono); }
.provider-button.connected > svg { color: var(--green); }
.provider-logo { width: 42px; height: 42px; display: grid; place-items: center; background: #f0f2ed; border-radius: 5px; overflow: hidden; }
.provider-logo img { display: block; width: 25px; height: 25px; object-fit: contain; }
.provider-logo.dark-logo { background: var(--ink); }
.provider-logo.mollie-logo { color: var(--white); background: #00a4de; font: 800 18px var(--font); }
.provider-button span:nth-child(2) { min-width: 0; }
.provider-button b, .provider-button small { display: block; }
.provider-button b { font-size: 14px; }
.provider-button small { margin-top: 4px; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.provider-button > svg { width: 16px; height: 16px; color: #8a938a; }
.all-providers-button { width: 100%; min-height: 68px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 13px 17px; text-align: left; background: #f1f4ef; border: 1px solid var(--line); border-top: 0; cursor: pointer; }
.all-providers-button:hover { background: #e9eee6; }
.all-providers-button strong, .all-providers-button small { display: block; }
.all-providers-button small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.provider-stack { display: flex; align-items: center; }
.provider-stack b { width: 30px; height: 30px; display: grid; place-items: center; margin-left: -6px; color: var(--white); background: var(--ink); border: 2px solid #f1f4ef; border-radius: 50%; font: 500 9px var(--mono); }
.provider-stack b:first-child { margin-left: 0; background: #635bff; }
.provider-stack b:nth-child(2) { background: #0070e0; }

.source-path { color: var(--ink); background: var(--paper); padding-block: 64px; }
.path-heading { max-width: 680px; margin-bottom: 25px; }
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.path-item { min-height: 148px; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 14px; padding: 20px; background: var(--white); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.path-item.active { background: var(--ink); color: var(--white); }
.path-number { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #aeb7ae; font: 500 11px var(--mono); }
.path-item.active .path-number { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.path-item small { color: #879187; font: 500 9px var(--mono); }
.path-item h3 { margin: 7px 0 4px; font-size: 17px; }
.path-item p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.path-item.active p { color: #aeb7ae; }
.path-state { align-self: start; padding: 5px 7px; color: var(--lime); border: 1px solid #435043; font: 500 8px var(--mono); white-space: nowrap; }
.path-action { width: 30px; height: 30px; color: #707970; border-color: #cbd1cb; }

.advanced-import { color: var(--ink); background: var(--paper); padding-bottom: 70px; }
.advanced-import > summary { min-height: 78px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 15px 18px; background: var(--white); border: 1px solid var(--line); cursor: pointer; list-style: none; }
.advanced-import > summary::-webkit-details-marker { display: none; }
.advanced-import > summary:hover { border-color: #aeb7ae; }
.advanced-import > summary > svg { transition: transform .2s ease; }
.advanced-import[open] > summary > svg { transform: rotate(180deg); }
.summary-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); }
.advanced-import summary strong, .advanced-import summary small { display: block; }
.advanced-import summary small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-top: 0; }
.tool-panel { min-width: 0; padding: 24px; background: var(--white); }
.panel-heading, .section-heading, .results-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading { margin-bottom: 18px; }
.panel-heading h2 { margin: 6px 0 0; font-size: 20px; }
.drop-zone { min-height: 216px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; border: 1px dashed #aab3aa; background: #f8f9f6; cursor: pointer; }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--lime-dark); background: #f4f9e8; }
.drop-zone input { display: none; }
.drop-zone > span:not(.drop-icon):not(.fake-button) { color: var(--muted); font-size: 11px; }
.drop-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--lime-dark); background: #e9f5c9; border-radius: 5px; }
.fake-button { margin-top: 7px; pointer-events: none; }
.import-list { margin-top: 12px; }
.empty-import { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #7a847a; font-size: 11px; }
.empty-import svg { width: 16px; }
.import-item { min-height: 58px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.import-item > svg { color: var(--green); }
.import-item-info { min-width: 0; }
.import-item-info strong, .import-item-info span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-item-info strong { font-size: 11px; }
.import-item-info span { color: var(--muted); font-size: 9px; }
.provider-badge { padding: 4px 6px; color: #344034; background: #e6eee2; font: 500 8px var(--mono); }
.provider-badge.custom { color: #695b00; background: #fff4c2; }
.import-notice { margin-top: 12px; padding: 10px; color: #6f5b00; background: #fff6ce; border-left: 3px solid var(--yellow); font-size: 11px; }
.detected-fee { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font: 500 9px var(--mono); }
.detected-fee svg { width: 14px; }
.assumption-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span:first-child, .currency-row label { color: #566056; font-size: 10px; font-weight: 700; }
.field input, .field select, .currency-row select { width: 100%; min-height: 42px; color: var(--ink); background: var(--white); border: 1px solid #cfd6cf; border-radius: 4px; padding: 9px 11px; outline: none; }
.field input:focus, .field select:focus, .currency-row select:focus { border-color: var(--lime-dark); box-shadow: 0 0 0 3px rgba(104,143,0,.12); }
.input-affix { display: grid; grid-template-columns: 1fr auto; align-items: center; border: 1px solid #cfd6cf; border-radius: 4px; overflow: hidden; }
.input-affix:focus-within { border-color: var(--lime-dark); box-shadow: 0 0 0 3px rgba(104,143,0,.12); }
.input-affix input { border: 0; border-radius: 0; box-shadow: none !important; }
.input-affix b { padding-right: 11px; color: #758075; font: 500 11px var(--mono); }
.currency-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; }
.currency-row select { width: 120px; }
.analyze-button { width: 100%; margin-top: 18px; }

.results { color: var(--ink); background: var(--paper); padding-block: 72px; }
.result-app { display: grid; grid-template-columns: 238px minmax(0, 1fr); background: var(--white); border: 1px solid #bec6be; box-shadow: 14px 14px 0 #dfe4dc; }
.result-rail { min-width: 0; display: flex; flex-direction: column; color: var(--white); background: var(--ink); border-right: 1px solid #343b34; }
.rail-heading { min-height: 82px; display: flex; align-items: center; gap: 11px; padding: 16px; border-bottom: 1px solid #343b34; }
.rail-mark { width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink); background: var(--lime); border-radius: 4px; }
.rail-heading small, .rail-heading strong { display: block; }
.rail-heading small { color: #7f8a7f; font: 500 8px var(--mono); }
.rail-heading strong { margin-top: 3px; font-size: 13px; }
.rail-section { padding: 18px 14px; }
.rail-label { display: block; margin: 0 4px 10px; color: #6f796f; font: 500 8px var(--mono); }
.rail-source { min-width: 0; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 7px; border-bottom: 1px solid #2d332d; }
.rail-provider-logo, .rail-provider-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 4px; }
.rail-provider-logo { background: var(--white); }
.rail-provider-logo img { width: 20px; height: 20px; }
.rail-provider-logo > b { color: var(--ink); font: 800 14px var(--font); }
.rail-provider-icon { color: var(--ink); }
.rail-provider-icon.ads { background: var(--cyan); }
.rail-provider-icon.costs { background: var(--yellow); }
.rail-provider-icon svg { width: 16px; height: 16px; }
.rail-source span:nth-child(2) { min-width: 0; }
.rail-source b, .rail-source small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-source b { font-size: 10px; }
.rail-source small { margin-top: 2px; color: #758075; font-size: 8px; }
.rail-source > svg { width: 14px; height: 14px; color: var(--lime); }
.rail-source.estimated > svg { color: #657065; }
.rail-add { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; padding: 9px; color: #c1c9c1; border: 1px dashed #465046; font-size: 9px; font-weight: 700; }
.rail-add:hover { color: var(--lime); border-color: #718071; }
.rail-add svg { width: 13px; height: 13px; }
.confidence-block { margin: auto 14px 16px; padding: 14px; color: var(--ink); background: var(--lime); }
.confidence-block > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.confidence-block span { font-size: 8px; font-weight: 800; }
.confidence-block strong { font: 500 16px var(--mono); }
.confidence-track { height: 4px; margin-top: 9px; background: rgba(16, 19, 16, .2); }
.confidence-track i { display: block; width: 72%; height: 100%; background: var(--ink); }
.confidence-block p { margin: 9px 0 0; font-size: 8px; line-height: 1.5; }

.result-workspace { min-width: 0; padding: 26px; background: #f7f8f4; }
.results-toolbar { align-items: flex-end; margin-bottom: 22px; }
.results-toolbar .step-label { display: flex; align-items: center; gap: 7px; color: var(--green); }
.live-pulse { width: 6px; height: 6px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(38, 162, 105, .12); }
.result-context { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.toolbar-actions { display: flex; gap: 7px; }
.workspace-action { color: #596359; background: var(--white); border-color: #cbd2cb; }
.profit-signal { min-height: 218px; display: grid; grid-template-columns: minmax(250px, .8fr) 1.2fr; align-items: end; gap: 24px; padding: 26px; color: var(--white); background: var(--ink); overflow: hidden; }
.profit-copy > span { color: #7f897f; font: 500 9px var(--mono); }
.profit-copy > strong { display: block; margin: 10px 0 3px; color: var(--lime); font: 500 52px/1 var(--mono); }
.profit-signal.loss .profit-copy > strong { color: var(--coral); }
.profit-copy > small { color: #9ba59b; font-size: 9px; }
.profit-copy p { display: flex; align-items: flex-start; gap: 7px; margin: 23px 0 0; color: #b6beb6; font-size: 9px; line-height: 1.5; }
.profit-copy p svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--lime); }
.profit-bars { height: 150px; display: flex; align-items: flex-end; gap: 7px; }
.profit-bars i { flex: 1; height: var(--h); background: #285967; border-top: 2px solid var(--cyan); opacity: .76; }
.profit-bars i:nth-child(4n), .profit-bars i:last-child { background: #647f1d; border-color: var(--lime); opacity: 1; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-left: 1px solid var(--line); }
.metric-card { min-width: 0; min-height: 102px; display: flex; flex-direction: column; justify-content: center; padding: 14px; background: var(--white); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-card > span { color: var(--muted); font-size: 8px; font-weight: 700; }
.metric-card > strong { display: block; margin: 8px 0 4px; font: 500 19px var(--mono); white-space: nowrap; }
.metric-card > small { color: #7a847a; font-size: 7px; line-height: 1.4; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.decision-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-top: 18px; padding: 18px; background: var(--coral); border-left: 5px solid var(--ink); }
.decision-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--white); background: var(--ink); }
.decision-banner span { color: #6d2822; font: 500 8px var(--mono); }
.decision-banner strong { display: block; margin-top: 4px; font-size: 14px; }
.decision-banner p { margin: 3px 0 0; color: #702b25; font-size: 9px; line-height: 1.4; }
.decision-impact { min-width: 116px; text-align: right; }
.decision-impact strong { font: 500 18px var(--mono); }
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.analysis-section { background: var(--white); border: 1px solid var(--line); padding: 18px; }
.section-heading { align-items: center; margin-bottom: 18px; }
.section-heading h3 { margin: 5px 0 0; font-size: 15px; }
.legend-note { color: var(--muted); font: 400 8px var(--mono); }
.cost-stack { height: 19px; display: flex; overflow: hidden; background: #edf0eb; }
.cost-segment.fees { background: var(--violet); }.cost-segment.refunds { background: var(--coral); }.cost-segment.cogs { background: var(--yellow); }.cost-segment.fulfillment { background: var(--cyan); }.cost-segment.ads { background: #56b881; }.cost-segment.fixed { background: #899389; }.cost-segment.profit { background: var(--ink); }
.cost-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 15px; margin-top: 15px; }
.legend-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; color: #596359; font-size: 8px; }
.legend-item strong { color: var(--ink); font: 500 8px var(--mono); }
.legend-dot { width: 7px; height: 7px; }.legend-dot.fees { background: var(--violet); }.legend-dot.refunds { background: var(--coral); }.legend-dot.cogs { background: var(--yellow); }.legend-dot.fulfillment { background: var(--cyan); }.legend-dot.ads { background: #56b881; }.legend-dot.fixed { background: #899389; }.legend-dot.profit { background: var(--ink); }
.leak-count { min-width: 24px; height: 24px; display: grid; place-items: center; color: var(--white); background: var(--coral); font: 500 9px var(--mono); }
.leak-list { display: grid; gap: 1px; background: var(--line); }
.leak-item { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px; background: var(--white); }
.leak-rank { width: 22px; height: 22px; display: grid; place-items: center; background: #f0f2ed; font: 500 8px var(--mono); }
.leak-copy { min-width: 0; }
.leak-copy strong, .leak-copy span { display: block; }
.leak-copy strong { font-size: 9px; }
.leak-copy span { margin-top: 2px; color: var(--muted); font-size: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leak-value { color: var(--red); font: 500 9px var(--mono); white-space: nowrap; }
.healthy-state { min-height: 90px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--green); background: var(--white); }
.diagnostic-details { margin-top: 14px; background: var(--white); border: 1px solid var(--line); }
.diagnostic-details > summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; cursor: pointer; list-style: none; }
.diagnostic-details > summary::-webkit-details-marker { display: none; }
.diagnostic-details > summary span { display: flex; align-items: center; gap: 8px; font-size: 10px; }
.diagnostic-details > summary svg { width: 15px; height: 15px; }
.diagnostic-details > summary > svg { transition: transform .2s ease; }
.diagnostic-details[open] > summary > svg { transform: rotate(180deg); }
.table-section { padding: 18px; border-top: 1px solid var(--line); }
.table-heading { margin-bottom: 13px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 10px 9px; text-align: right; border-bottom: 1px solid #e4e8e2; font-size: 9px; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); background: #f5f7f3; font: 500 8px var(--mono); }
td { font-family: var(--mono); }
td:first-child { font-family: var(--font); font-weight: 700; }
.calculation-note { margin: 13px 0 0; color: var(--muted); font-size: 8px; }

.footer { min-height: 120px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #9ba59b; background: var(--ink); }
.footer::before { content: ""; position: absolute; left: 0; right: 0; height: 120px; background: var(--ink); z-index: -1; }
.footer-brand { display: flex; align-items: center; gap: 9px; color: var(--white); }
.footer p { max-width: 500px; margin: 0; text-align: right; font-size: 10px; }

.modal { width: min(620px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; color: var(--ink); background: var(--white); border: 1px solid #5f685f; border-radius: 6px; box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(8, 11, 9, .78); }
.modal-shell { padding: 25px; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.modal-heading h2 { margin: 7px 0 0; font-size: 24px; }
.modal-heading p:not(.step-label) { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.mapping-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.checkbox-field { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; color: var(--muted); font-size: 10px; }
.account-shell { width: 100%; }
#auth-fields { display: grid; gap: 13px; }
.full-button { width: 100%; }
.form-message { min-height: 15px; margin: 0; color: var(--red); font-size: 10px; }
.account-state { text-align: center; }
.account-avatar { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 12px; color: var(--ink); background: var(--lime); border-radius: 50%; }
.account-state p { color: var(--muted); font-size: 11px; }
.connector-shell { padding: 27px; }
.connector-permission { display: grid; grid-template-columns: auto 1fr; gap: 15px; align-items: start; padding: 16px; background: #f3f5f1; border-left: 4px solid var(--lime-dark); }
.connector-modal-logo { width: 46px; height: 46px; display: grid; place-items: center; color: var(--white); background: var(--ink); border-radius: 5px; }
.connector-modal-logo img { width: 27px; height: 27px; object-fit: contain; }
.connector-permission p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.permission-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 13px; }
.permission-list span { display: flex; align-items: center; gap: 6px; padding: 9px; color: #4c574c; border: 1px solid var(--line); font-size: 9px; }
.permission-list svg { width: 13px; height: 13px; color: var(--green); }
.connector-dev-note { margin: 13px 0 0; padding: 11px; color: #675800; background: #fff4c2; font-size: 10px; line-height: 1.5; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: min(460px, calc(100% - 32px)); padding: 11px 15px; color: var(--white); background: var(--ink); border: 1px solid #596159; box-shadow: var(--shadow); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s ease; font-size: 11px; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

/* V5: one continuous product surface. White is reserved for text, never page blocks. */
body { color: #f2f5ef; background: #0d100e; }
main { background: #0d100e; }
.button-secondary { color: #edf2eb; background: #1b211c; border-color: #3a433b; }
.button-secondary:hover { background: #222a23; border-color: #637064; }

.connector-band { color: #f2f5ef; background: #121613; border-top: 1px solid #2b322c; border-bottom-color: #2b322c; }
.connector-heading h2, .path-heading h2 { color: #f7f9f5; }
.connector-heading p:not(.step-label), .path-heading p { color: #8f9a90; }
.coverage-badge { color: #c9d1c9; background: #181d19; border-color: #343c35; }
.provider-grid { border-color: #343c35; }
.provider-button { color: #eef2ec; background: #171c18; border-color: #343c35; }
.provider-button:hover { background: #202721; }
.provider-button.connected { background: #202b19; }
.provider-button b { color: #f4f7f2; }
.provider-button small { color: #7f8a80; }
.provider-button > svg { color: #79847a; }
.provider-logo { background: #242b25; }
.provider-button:hover::before, .provider-button.featured::before { background: var(--lime); }
.all-providers-button { color: #eef2ec; background: #1b211c; border-color: #343c35; }
.all-providers-button:hover { background: #232b24; }
.all-providers-button small { color: #7f8a80; }
.provider-stack b { border-color: #1b211c; }

.source-path { color: #f2f5ef; background: #0d100e; }
.path-grid { border-color: #343c35; }
.path-item { color: #edf2eb; background: #171c18; border-color: #343c35; }
.path-item.active { background: #20271d; border-top: 2px solid var(--lime); }
.path-item p, .path-item.active p { color: #859086; }
.path-number { border-color: #536054; }
.path-action { color: #b5beb5; background: #202621; border-color: #465047; }

.advanced-import { color: #eef2ec; background: #0d100e; }
.advanced-import > summary { color: #eef2ec; background: #171c18; border-color: #343c35; }
.advanced-import > summary:hover { background: #1d241e; border-color: #586459; }
.advanced-import summary small { color: #879288; }
.work-grid { background: #343c35; border-color: #343c35; }
.tool-panel { color: #edf2eb; background: #151a16; }
.panel-heading h2 { color: #f5f7f3; }
.drop-zone { color: #e7ece5; background: #101411; border-color: #576258; }
.drop-zone:hover, .drop-zone.dragover { background: #1b2418; border-color: var(--lime); }
.drop-zone > span:not(.drop-icon):not(.fake-button), .empty-import { color: #7f8a80; }
.import-item { border-color: #333b34; }
.provider-badge { color: #cfe0cc; background: #283329; }
.provider-badge.custom { color: #ffe88d; background: #3a3218; }
.field > span:first-child, .currency-row label { color: #a8b1a9; }
.field input, .field select, .currency-row select { color: #eef2ec; background: #101411; border-color: #3b443c; }
.input-affix { background: #101411; border-color: #3b443c; }
.input-affix input { background: transparent; }
.input-affix b { color: #89948a; }

.results { color: #eef2ec; background: #0d100e; }
.result-app { background: #111512; border-color: #343c35; box-shadow: 12px 12px 0 #080a08; }
.result-rail { background: #101310; border-color: #343c35; }
.result-workspace { color: #eef2ec; background: #151a16; }
.results-toolbar h2 { color: #f7f9f5; }
.result-context { color: #879288; }
.workspace-action { color: #c2cbc2; background: #1d231e; border-color: #3b443c; }
.workspace-action:hover { background: #252d26; }
.profit-signal { border: 1px solid #363f37; background: #0f120f; }
.metric-grid { border-color: #343c35; }
.metric-card { color: #eef2ec; background: #1a201b; border-color: #343c35; }
.metric-card > span { color: #89948a; }
.metric-card > small { color: #6f7a70; }
.analysis-section { color: #eef2ec; background: #181e19; border-color: #343c35; }
.section-heading h3 { color: #f3f6f1; }
.legend-note, .legend-item { color: #89948a; }
.legend-item strong { color: #e9eee7; }
.cost-stack { background: #293029; }
.leak-list { background: #343c35; }
.leak-item { color: #edf2eb; background: #181e19; }
.leak-rank { color: #cbd3cb; background: #29302a; }
.leak-copy span { color: #7f8a80; }
.diagnostic-details { color: #edf2eb; background: #171c18; border-color: #343c35; }
.diagnostic-details > summary:hover { background: #1e251f; }
.table-section { background: #151a16; border-color: #343c35; }
th { color: #8d988e; background: #202621; }
th, td { border-color: #303831; }
td { color: #dce2dc; }
.calculation-note { color: #758076; }

.modal { color: #edf2eb; background: #171c18; border-color: #4b564c; }
.modal-heading h2 { color: #f5f7f3; }
.modal-heading p:not(.step-label), .connector-permission p, .account-state p { color: #929d93; }
.connector-permission { background: #101411; border-color: var(--lime); }
.permission-list span { color: #c3ccc3; background: #141915; border-color: #343c35; }
.connector-dev-note { color: #f5dfa0; background: #342d18; }
.checkbox-field { color: #a4aea5; }

.footer { color: #89948a; background: #0d100e; border-top: 1px solid #2b322c; }
.footer::before { background: #0d100e; }

@media (max-width: 980px) {
  .connection-stage { grid-template-columns: 1fr; gap: 40px; padding-block: 50px 64px; }
  .stage-copy { max-width: 720px; }
  .signal-board { max-width: 650px; }
  .provider-grid { grid-template-columns: repeat(2, 1fr); }
  .path-grid { grid-template-columns: 1fr; }
  .path-item { min-height: 112px; }
  .work-grid, .analysis-grid { grid-template-columns: 1fr; }
  .result-app { grid-template-columns: 1fr; }
  .result-rail { display: grid; grid-template-columns: 200px minmax(0, 1fr) 230px; align-items: stretch; border-right: 0; border-bottom: 1px solid #343b34; }
  .rail-heading { border-bottom: 0; border-right: 1px solid #343b34; }
  .rail-section { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 10px; }
  .rail-label, .rail-add { display: none; }
  .rail-source { border: 0; }
  .confidence-block { align-self: center; margin: 10px; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .page-width { width: min(100% - 28px, 1180px); }
  .topbar { min-height: 60px; padding: 10px 14px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 31px; height: 31px; }
  .source-status, .topbar .button-quiet span { display: none; }
  .topbar .button-quiet { width: 40px; padding: 0; }
  .connection-stage { min-height: 0; padding-block: 42px 56px; }
  .connection-stage .signal-board { display: none; }
  .stage-copy h1 { font-size: 40px; }
  .stage-text { font-size: 15px; }
  .stage-actions { align-items: stretch; flex-direction: column; gap: 5px; }
  .stage-actions .button { width: 100%; }
  .text-button { justify-content: center; }
  .signal-board { box-shadow: 8px 8px 0 #252b25; }
  .signal-main strong { font-size: 43px; }
  .signal-alert { grid-template-columns: auto 1fr; }
  .signal-alert > strong { grid-column: 2; }
  .connector-band { padding-block: 50px; }
  .connector-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .connector-heading h2, .path-heading h2, .results-toolbar h2 { font-size: 23px; }
  .coverage-badge { white-space: normal; }
  .provider-grid { grid-template-columns: 1fr; }
  .provider-button { min-height: 83px; }
  .all-providers-button { grid-template-columns: auto 1fr; }
  .all-providers-button > svg { display: none; }
  .source-path { padding-block: 50px; }
  .advanced-import { padding-bottom: 52px; }
  .tool-panel { padding: 18px; }
  .assumption-form { grid-template-columns: 1fr; }
  .results { padding-block: 50px; }
  .result-app { box-shadow: 7px 7px 0 #dfe4dc; }
  .result-rail { display: block; }
  .rail-heading { min-height: 68px; border-right: 0; border-bottom: 1px solid #343b34; }
  .rail-section { display: block; padding: 10px 14px 4px; }
  .rail-label { display: block; }
  .rail-source { border-bottom: 1px solid #2d332d; }
  .rail-add { display: flex; }
  .confidence-block { margin: 14px; }
  .result-workspace { padding: 14px; }
  .results-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: auto; align-self: flex-start; margin-top: 2px; }
  .profit-signal { min-height: 300px; grid-template-columns: 1fr; gap: 18px; padding: 20px; }
  .profit-copy > strong { font-size: 44px; }
  .profit-bars { height: 92px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 105px; padding: 13px; }
  .metric-card > strong { font-size: 18px; }
  .metric-card:last-child { grid-column: 1 / -1; }
  .decision-banner { grid-template-columns: auto 1fr; }
  .decision-impact { grid-column: 2; text-align: left; }
  .cost-legend { grid-template-columns: 1fr; }
  .footer { align-items: flex-start; flex-direction: column; justify-content: center; }
  .footer p { text-align: left; }
  .mapping-grid, .permission-list { grid-template-columns: 1fr; }
  .connector-actions { align-items: stretch; flex-direction: column-reverse; }
  .connector-actions .button { width: 100%; }
}

@media print {
  .topbar, .connection-stage, .connector-band, .source-path, .advanced-import, .footer, .toolbar-actions { display: none !important; }
  body, main, .results { color: #000; background: #fff; }
  .results { display: block !important; width: 100%; padding: 0; }
  .analysis-section, .table-section, .metric-card { break-inside: avoid; }
}
