:root {
  color-scheme: light;
  --navy: #071321;
  --navy-2: #0d233d;
  --blue: #1457b8;
  --blue-bright: #0868ed;
  --blue-dark: #0f3f84;
  --green: #2dd87a;
  --green-dark: #128044;
  --gold: #d77a00;
  --gold-soft: #fff7e6;
  --ink: #14213d;
  --muted: #586174;
  --line: #d9e1ee;
  --line-strong: #b8c4d6;
  --soft: #eef5ff;
  --paper: #ffffff;
  --danger: #b42318;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--navy);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input,
select {
  font: inherit;
}

input::placeholder {
  color: #929dad;
  opacity: 1;
}

button,
select,
input[type="checkbox"] {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid #70a9ff;
  outline-offset: 3px;
}

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.skip-link {
  background: var(--paper);
  color: var(--blue);
  left: 1rem;
  padding: 0.6rem 0.9rem;
  position: absolute;
  text-decoration: none;
  top: -5rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.tool-header {
  background: rgba(4, 17, 32, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
}

.tool-nav {
  align-items: center;
  display: flex;
  gap: 1.2rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1120px;
  padding: 0.95rem 1.25rem;
}

.tool-brand {
  align-items: center;
  color: white;
  display: inline-flex;
  font-size: 1.1rem;
  font-weight: 800;
  gap: 0.68rem;
  letter-spacing: 0;
  text-decoration: none;
}

.tool-brand img {
  border-radius: 10px;
  height: 38px;
  transform: rotate(-8deg);
  width: 38px;
}

.header-cta {
  align-items: center;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 750;
  gap: 0.7rem;
  text-decoration: none;
}

.tool-hero {
  background:
    radial-gradient(ellipse 45% 30% at 10% 0%, rgba(20, 87, 184, 0.32), transparent),
    radial-gradient(ellipse 45% 40% at 95% 5%, rgba(45, 216, 122, 0.11), transparent),
    linear-gradient(160deg, var(--navy), var(--navy-2));
  color: white;
  padding: clamp(2.2rem, 5vw, 4.1rem) clamp(1rem, 3vw, 2.2rem) clamp(2.5rem, 6vw, 5.4rem);
}

.tool-heading {
  margin: 0 auto clamp(1.6rem, 3vw, 2.3rem);
  max-width: 1000px;
  text-align: center;
}

.tool-heading h1 {
  font-size: clamp(2.5rem, 5vw, 4.55rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

.tool-heading p {
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  margin: 1rem 0 0;
}

.mobile-subtitle {
  display: none;
}

.analyzer-shell {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) minmax(520px, 1.25fr);
  margin: 0 auto;
  max-width: 1400px;
  overflow: hidden;
}

.scan-column,
.confirm-column {
  min-width: 0;
  padding: clamp(1.6rem, 3vw, 2.35rem);
}

.scan-column {
  border-right: 1px solid var(--line);
}

.drop-zone {
  align-items: center;
  background: linear-gradient(160deg, #f8fbff, #eef5ff);
  border: 2px dashed #3e82df;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-height: 430px;
  padding: 2rem 1.3rem;
  text-align: center;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.drop-zone.is-dragging {
  background: #e7f2ff;
  border-color: var(--blue-dark);
  transform: translateY(-2px);
}

.scan-icon {
  color: var(--blue);
  height: 76px;
  margin-bottom: 1rem;
  position: relative;
  width: 76px;
}

.scan-icon > svg:first-child {
  height: 76px;
  width: 76px;
}

.camera-mark {
  background: #f5f9ff;
  border-radius: 50%;
  bottom: -4px;
  height: 34px;
  padding: 5px;
  position: absolute;
  right: -6px;
  width: 34px;
}

.primary-scan-button,
.analyze-button,
.result-primary {
  background: linear-gradient(135deg, #0b55cd, #0873ee);
  border: 0;
  border-radius: 9px;
  color: white;
  font-weight: 800;
  text-decoration: none;
}

.primary-scan-button {
  align-items: center;
  display: inline-flex;
  gap: 0.55rem;
  justify-content: center;
  min-height: 54px;
  padding: 0.85rem 2rem;
}

.button-icon {
  flex: 0 0 auto;
  height: 1.25rem;
  width: 1.25rem;
}

.primary-scan-button:hover,
.primary-scan-button:focus-visible {
  background: var(--blue-dark);
}

.mobile-label {
  display: none;
}

.or-divider {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.85rem;
  gap: 0.75rem;
  margin: 1rem 0;
  width: min(250px, 85%);
}

.or-divider::before,
.or-divider::after {
  background: var(--line-strong);
  content: "";
  height: 1px;
  width: 100%;
}

.secondary-scan-button,
.manual-button {
  background: transparent;
  border: 0;
  color: var(--blue);
  font-weight: 800;
}

.secondary-scan-button {
  display: none;
}

.manual-button {
  font-size: 1rem;
}

.file-help,
.privacy-line {
  color: var(--muted);
  font-size: 0.82rem;
}

.file-help {
  margin: 1.6rem 0 1rem;
}

.privacy-line {
  margin: 0;
  max-width: 350px;
}

.scan-status {
  background: var(--soft);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  color: var(--blue-dark);
  font-size: 0.92rem;
  font-weight: 650;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
}

.scan-status.is-error {
  background: #fff0ef;
  border-left-color: var(--danger);
  color: var(--danger);
}

.scan-status.is-success {
  background: #eafbf2;
  border-left-color: var(--green);
  color: var(--green-dark);
}

.file-list {
  display: grid;
  gap: 0.65rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.file-list li {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  min-width: 0;
  padding: 0.75rem 0.85rem;
}

.file-list strong {
  display: block;
  font-size: 0.86rem;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list small {
  color: var(--muted);
}

.file-list button {
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  flex: 0 0 32px;
  height: 32px;
}

.step-rail {
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  margin: -0.2rem 0 1.75rem;
  padding: 0;
}

.step-rail li {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 0.55rem;
  padding: 0 0 0.85rem;
  position: relative;
}

.step-rail li span {
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.step-rail li.active {
  color: var(--blue);
}

.step-rail li.active::after {
  background: var(--blue-bright);
  bottom: -1px;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
}

.step-rail li.active span {
  background: var(--blue-bright);
  border-color: var(--blue-bright);
  color: white;
}

.form-heading {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.3rem;
}

.form-heading h2,
.results-heading h2,
.explanation-section h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.35rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
}

.form-heading p,
.results-heading p {
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.reset-button {
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.8rem;
  padding: 0.55rem 0.7rem;
}

.form-error,
.form-notice {
  background: #fff0ef;
  border: 1px solid #f3b7b2;
  border-radius: 8px;
  color: var(--danger);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
}

.form-notice {
  background: #fff9e9;
  border-color: #ebcf7f;
  color: #61480c;
}

.form-notice ul {
  margin: 0.45rem 0 0;
  padding-left: 1.2rem;
}

.form-notice li + li {
  margin-top: 0.3rem;
}

.form-grid,
.subgrid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.subgrid {
  grid-column: 1 / -1;
}

.full-field {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 0.38rem;
  min-width: 0;
}

.field > span:first-child,
.tier-row label > span,
.assumption-fields legend {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 750;
}

.field small {
  color: var(--muted);
  font-weight: 500;
}

input,
select {
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  min-height: 44px;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  width: 100%;
}

input:hover,
select:hover {
  border-color: #8597af;
}

.input-prefix,
.input-suffix {
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  display: flex;
  overflow: hidden;
}

.input-prefix:focus-within,
.input-suffix:focus-within {
  outline: 3px solid #70a9ff;
  outline-offset: 2px;
}

.input-prefix input,
.input-suffix input {
  border: 0;
  border-radius: 0;
  outline: 0;
}

.input-prefix b,
.input-suffix b {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0 0.7rem;
}

.input-suffix input {
  padding-right: 0;
}

.field-review {
  display: none;
  font-size: 0.72rem;
  line-height: 1.35;
}

[data-confidence="low"] input,
[data-confidence="low"] select,
[data-confidence="low"] .input-prefix,
[data-confidence="low"] .input-suffix {
  border-color: #f0a21b;
}

[data-confidence="low"] > .field-review,
details[data-confidence="low"] > .field-review {
  color: var(--gold);
  display: block;
}

[data-confidence="medium"] > .field-review,
details[data-confidence="medium"] > .field-review {
  color: var(--gold);
  display: block;
}

.plan-details {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 0.85rem;
  padding: 0 0.9rem;
}

.plan-details summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  min-height: 64px;
  padding: 0.7rem 0;
}

.plan-details summary::-webkit-details-marker {
  display: none;
}

.plan-details summary > span:first-child {
  display: grid;
  gap: 0.2rem;
}

.plan-details summary strong {
  font-size: 0.95rem;
}

.plan-details summary small {
  color: var(--muted);
  font-size: 0.76rem;
}

.summary-action,
.add-row-button {
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 750;
}

.tier-rows {
  display: grid;
  gap: 0.65rem;
  padding-bottom: 0.65rem;
}

.tier-row {
  align-items: end;
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 34px;
  padding: 0.65rem;
}

.tier-row[data-row-type="tiered-flat"] {
  grid-template-columns: repeat(4, minmax(0, 1fr)) 34px;
}

.tier-row[data-row-type="bonus"] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) 34px;
}

.tier-row label {
  display: grid;
  gap: 0.25rem;
}

.tier-row input {
  min-height: 40px;
  padding: 0.5rem;
}

.tier-row button {
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  height: 34px;
  width: 34px;
}

.add-row-button {
  background: transparent;
  border: 0;
  margin: 0 0 0.85rem;
  padding: 0.3rem 0;
}

.advanced-grid {
  padding-bottom: 0.9rem;
}

.toggle-field {
  align-items: center;
  display: flex;
  font-size: 0.86rem;
  font-weight: 700;
  gap: 0.65rem;
}

.toggle-field input,
.ocr-confirmation input {
  accent-color: var(--blue);
  height: 20px;
  min-height: 20px;
  width: 20px;
}

.assumption-fields {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.2rem 0 0;
  padding: 1.15rem 0 0;
}

.assumption-fields legend {
  font-size: 1rem;
  padding: 0 0.4rem 0 0;
}

.assumption-fields > p {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.25rem 0 0.8rem;
}

.assumptions-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.target-units-field .input-suffix b {
  min-width: 46px;
}

.assumption-fields > .tier-scenario-note {
  color: var(--blue-dark);
  font-weight: 650;
  margin-bottom: 0;
}

.ocr-confirmation {
  align-items: flex-start;
  background: var(--gold-soft);
  border: 1px solid #f2c469;
  border-radius: 8px;
  display: flex;
  font-size: 0.84rem;
  font-weight: 650;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.8rem;
}

.benchmark-contribution {
  background: linear-gradient(145deg, #f5faff, #eff9f3);
  border: 1px solid #b9d7c7;
  border-radius: 10px;
  margin-top: 1rem;
  padding: 0.9rem;
}

.benchmark-consent {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
}

.benchmark-consent input {
  accent-color: var(--green-dark);
  flex: 0 0 21px;
  height: 21px;
  margin-top: 0.1rem;
  width: 21px;
}

.benchmark-consent strong,
.benchmark-consent small {
  display: block;
}

.benchmark-consent strong {
  color: var(--navy-2);
  font-size: 0.9rem;
}

.benchmark-consent small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
  margin-top: 0.25rem;
}

.benchmark-details {
  border-top: 1px solid rgba(18, 128, 68, 0.2);
  margin-top: 0.8rem;
  padding-top: 0.7rem;
}

.benchmark-details summary {
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
}

.benchmark-segment-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0.75rem;
}

.benchmark-form-status {
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.45;
  margin: 0.75rem 0 0;
}

.benchmark-form-status.is-error {
  color: var(--danger);
}

.remove-contribution {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.55rem;
  padding: 0;
  text-decoration: underline;
}

.analyze-button {
  align-items: center;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  display: flex;
  font-size: 1rem;
  justify-content: center;
  margin-top: 1.2rem;
  min-height: 54px;
  padding: 0.85rem 1rem;
  width: 100%;
}

.analyze-button span {
  font-size: 1.5rem;
  margin-left: 0.75rem;
}

.results-section {
  background:
    radial-gradient(ellipse 45% 30% at 90% 0%, rgba(20, 87, 184, 0.32), transparent),
    linear-gradient(165deg, var(--navy), var(--navy-2));
  color: white;
  padding: clamp(2.8rem, 6vw, 5.5rem) clamp(1rem, 3vw, 2.2rem);
}

.results-heading {
  margin: 0 auto 1.8rem;
  max-width: 1200px;
  text-align: center;
}

.results-heading h2 {
  color: white;
  font-size: clamp(2.15rem, 4vw, 3.5rem);
}

.results-heading p {
  color: rgba(255, 255, 255, 0.7);
}

.results-surface {
  background: white;
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: var(--ink);
  margin: 0 auto;
  max-width: 1400px;
  padding: clamp(1.3rem, 3vw, 2.1rem);
}

.verdict-block {
  align-items: center;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.verdict-icon {
  align-items: center;
  background: var(--green);
  border-radius: 50%;
  color: white;
  display: flex;
  flex: 0 0 52px;
  font-size: 1.8rem;
  height: 52px;
  justify-content: center;
}

.verdict-block h3,
.curve-section h3,
.finding-column h3,
.reference-column h3 {
  margin: 0;
}

.verdict-block p {
  color: var(--muted);
  margin: 0.3rem 0 0;
  max-width: 700px;
}

.scenario-grid {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  margin-bottom: 1.2rem;
}

.scenario-intro {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0 0 0.6rem;
}

.scenario-card {
  border-right: 1px solid var(--line);
  padding: 1.15rem 1.35rem;
}

.scenario-card.is-target {
  background: linear-gradient(180deg, rgba(45, 216, 122, 0.12), rgba(45, 216, 122, 0.03));
  box-shadow: inset 0 3px 0 var(--green-dark);
}

.scenario-card:last-child {
  border-right: 0;
}

.scenario-card h3 {
  color: var(--ink);
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
  text-align: center;
}

.scenario-badge {
  color: var(--blue-dark);
  display: block;
  font-size: 0.66rem;
  font-weight: 750;
  margin: 0 0 0.8rem;
  min-height: 1rem;
  text-align: center;
  text-transform: uppercase;
}

.scenario-card dl {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.scenario-card dl > div {
  display: flex;
  font-size: 0.8rem;
  gap: 0.8rem;
  justify-content: space-between;
}

.scenario-card dt {
  color: var(--muted);
}

.scenario-card dd {
  font-weight: 720;
  margin: 0;
}

.scenario-total {
  border-top: 1px solid var(--line);
  font-size: 1rem !important;
  margin-top: 0.35rem;
  padding-top: 0.55rem;
}

.scenario-total dd {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 850;
}

.draw-warning dd {
  color: var(--gold);
}

.curve-section {
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0 1rem;
}

.curve-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.chart-legend {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.72rem;
  gap: 1rem;
}

.chart-legend span {
  align-items: center;
  display: flex;
  gap: 0.35rem;
}

.legend-line {
  border-top: 2px solid var(--blue-bright);
  display: inline-block;
  width: 24px;
}

.commission-line {
  border-top-style: dashed;
  opacity: 0.7;
}

.legend-dot {
  background: var(--blue-bright);
  border-radius: 50%;
  display: inline-block;
  height: 7px;
  width: 7px;
}

.earnings-chart {
  min-height: 285px;
  overflow-x: auto;
  padding-top: 0.75rem;
}

.earnings-chart svg {
  display: block;
  height: auto;
  min-width: 760px;
  width: 100%;
}

.chart-grid-line {
  stroke: #e2e8f2;
  stroke-width: 1;
}

.chart-axis-label {
  fill: var(--muted);
  font-size: 12px;
}

.chart-total-path {
  fill: none;
  stroke: var(--blue-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.chart-commission-path {
  fill: none;
  opacity: 0.75;
  stroke: var(--blue);
  stroke-dasharray: 8 7;
  stroke-width: 2;
}

.chart-threshold-line {
  stroke: var(--gold);
  stroke-dasharray: 4 5;
  stroke-width: 1.5;
}

.chart-threshold-dot {
  fill: white;
  stroke: var(--blue-bright);
  stroke-width: 3;
}

.chart-threshold-label {
  fill: var(--blue-dark);
  font-size: 12px;
  font-weight: 750;
}

.result-details-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 0.95fr 0.95fr 1.1fr;
  padding: 1.3rem 0;
}

.finding-column,
.reference-column {
  min-width: 0;
}

.finding-column ul {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.finding-column li {
  color: var(--muted);
  font-size: 0.8rem;
  padding-left: 1.35rem;
  position: relative;
}

.finding-column li::before {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "✓";
  display: flex;
  font-size: 0.6rem;
  height: 14px;
  justify-content: center;
  left: 0;
  position: absolute;
  top: 0.05rem;
  width: 14px;
}

.positive-findings h3,
.positive-findings li::before {
  color: var(--green-dark);
}

.caution-findings h3,
.caution-findings li::before {
  color: var(--gold);
}

.caution-findings li::before {
  content: "!";
}

.reference-options {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 0.7rem;
}

.reference-option {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font-size: 0.72rem;
  min-height: 72px;
  padding: 0.55rem;
  text-align: left;
}

.reference-option.active {
  border: 2px solid var(--blue-bright);
  padding: calc(0.55rem - 1px);
}

.reference-option strong,
.reference-option small {
  display: block;
}

.reference-option small,
.reference-note,
.reference-summary {
  color: var(--muted);
}

.benchmark-source {
  color: var(--blue);
  display: inline-block;
  font-size: 0.68rem;
  line-height: 1.35;
  margin-top: 0.6rem;
}

.dealbuddy-benchmark {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  border-radius: 12px;
  color: white;
  margin: 0.4rem 0 1.3rem;
  padding: 1.25rem;
}

.benchmark-kicker,
.conversion-kicker {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dealbuddy-benchmark h3 {
  color: white;
  margin: 0.3rem 0 0;
}

.dealbuddy-benchmark > div > p,
.benchmark-method {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.5;
}

.dealbuddy-benchmark > div > p {
  font-size: 0.86rem;
  margin: 0.45rem 0 0;
}

.benchmark-group-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-top: 1rem;
}

.benchmark-group-grid article {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.8rem;
}

.benchmark-group-grid strong,
.benchmark-group-grid span {
  display: block;
}

.benchmark-group-grid span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  margin-top: 0.25rem;
}

.benchmark-method {
  font-size: 0.68rem;
  margin: 1rem 0 0;
}

.conversion-panel {
  align-items: center;
  background: var(--soft);
  border: 1px solid #bed4f2;
  border-radius: 12px;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  margin: 0.4rem 0 1.2rem;
  padding: 1.2rem;
}

.conversion-kicker {
  color: var(--blue);
}

.conversion-panel h3 {
  margin: 0.25rem 0 0;
}

.conversion-panel p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0.35rem 0 0;
  max-width: 720px;
}

.conversion-link {
  background: var(--blue);
  border-radius: 8px;
  color: white;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.8rem 1rem;
  text-decoration: none;
}

.reference-note,
.reference-summary {
  font-size: 0.7rem;
  margin: 0.5rem 0 0;
}

.reference-summary {
  color: var(--blue-dark);
  font-weight: 700;
}

.result-actions {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  grid-template-columns: 0.7fr 1.4fr 0.7fr;
  padding-top: 1.2rem;
}

.result-primary,
.result-secondary {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 50px;
  padding: 0.75rem 1rem;
}

.result-primary {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
}

.result-secondary {
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 750;
}

.results-privacy {
  color: var(--muted);
  font-size: 0.7rem;
  margin: 0.75rem 0 0;
  text-align: center;
}

.explanation-section {
  background: white;
  padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 4vw, 3rem);
}

.explanation-section > h2 {
  margin: 0 auto 2rem;
  max-width: 1100px;
}

.explanation-grid {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  max-width: 1100px;
  padding-top: 1.5rem;
}

.explanation-grid h3 {
  margin: 0;
}

.explanation-grid p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0.45rem 0 0;
}

.tool-footer {
  align-items: center;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  font-size: 0.78rem;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.4rem clamp(1.25rem, 4vw, 3rem);
}

.tool-footer > a {
  color: white;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

.tool-footer nav {
  display: flex;
  gap: 1rem;
}

@media (max-width: 1050px) {
  .analyzer-shell {
    grid-template-columns: 1fr;
    max-width: 780px;
  }

  .scan-column {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .drop-zone {
    min-height: 360px;
  }

  .result-details-grid {
    grid-template-columns: 1fr 1fr;
  }

  .reference-column {
    border-top: 1px solid var(--line);
    grid-column: 1 / -1;
    padding-top: 1rem;
  }
}

@media (max-width: 760px) {
  .tool-nav {
    padding: 0.8rem 1rem;
  }

  .tool-brand span {
    font-size: 0.92rem;
  }

  .header-cta {
    display: none;
  }

  .tool-hero {
    padding: 2rem 0 0;
  }

  .tool-heading {
    padding: 0 1.15rem;
  }

  .tool-heading h1 {
    font-size: clamp(2.35rem, 11vw, 3.25rem);
  }

  .desktop-subtitle {
    display: none;
  }

  .mobile-subtitle {
    display: block;
  }

  .analyzer-shell {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .scan-column {
    border: 0;
    color: white;
    padding: 0 1rem 1.6rem;
  }

  .drop-zone {
    background: transparent;
    border: 0;
    min-height: auto;
    padding: 0;
  }

  .scan-icon,
  .or-divider {
    display: none;
  }

  .primary-scan-button,
  .secondary-scan-button {
    align-items: center;
    border-radius: 10px;
    display: flex;
    font-size: 1.05rem;
    justify-content: center;
    min-height: 60px;
    width: 100%;
  }

  .desktop-label {
    display: none;
  }

  .mobile-label {
    display: inline;
  }

  .secondary-scan-button {
    background: white;
    border: 1px solid var(--line);
    color: var(--blue);
    margin-top: 0.75rem;
  }

  .manual-button {
    color: #5fa4ff;
    margin-top: 1rem;
  }

  .file-help,
  .privacy-line {
    color: rgba(255, 255, 255, 0.72);
  }

  .file-help {
    margin: 1rem 0 0.55rem;
  }

  .file-list li {
    background: white;
    color: var(--ink);
  }

  .scan-status {
    background: rgba(255, 255, 255, 0.95);
  }

  .confirm-column {
    background: white;
    border-radius: 22px 22px 0 0;
    padding: 1.25rem 1rem 1.3rem;
  }

  .step-rail li {
    font-size: 0;
    justify-content: center;
  }

  .step-rail li::before {
    content: attr(data-step);
    font-size: 0.72rem;
    text-transform: capitalize;
  }

  .step-rail li span {
    height: 26px;
    width: 26px;
  }

  .form-heading {
    align-items: center;
  }

  .form-heading h2 {
    font-size: 1.45rem;
  }

  .form-heading p {
    font-size: 0.82rem;
  }

  .reset-button {
    font-size: 0;
    height: 36px;
    padding: 0;
    width: 36px;
  }

  .reset-button::after {
    content: "↻";
    font-size: 1.1rem;
  }

  .form-grid,
  .subgrid,
  .assumptions-grid,
  .benchmark-segment-grid {
    grid-template-columns: 1fr;
  }

  .tier-row,
  .tier-row[data-row-type="tiered-flat"],
  .tier-row[data-row-type="bonus"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tier-row button {
    grid-column: 2;
    justify-self: end;
  }

  .analyze-button {
    bottom: 0;
    box-shadow: 0 -8px 22px rgba(255, 255, 255, 0.88);
    position: sticky;
    z-index: 5;
  }

  .results-section {
    padding: 3rem 0 0;
  }

  .results-heading {
    padding: 0 1rem;
  }

  .results-surface {
    border-radius: 22px 22px 0 0;
    padding: 1.2rem 1rem;
  }

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

  .scenario-card {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .scenario-card:last-child {
    border-bottom: 0;
  }

  .curve-heading {
    align-items: start;
    flex-direction: column;
  }

  .result-details-grid,
  .result-actions,
  .explanation-grid {
    grid-template-columns: 1fr;
  }

  .reference-column {
    grid-column: auto;
  }

  .result-primary {
    grid-row: 1;
  }

  .conversion-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .conversion-link {
    text-align: center;
  }

  .explanation-section {
    padding: 3.5rem 1.15rem;
  }

  .tool-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  .tool-header,
  .tool-hero,
  .explanation-section,
  .tool-footer,
  .result-actions {
    display: none !important;
  }

  .results-section {
    background: white;
    color: var(--ink);
    padding: 0;
  }

  .results-heading h2,
  .results-heading p {
    color: var(--ink);
  }

  .results-surface {
    box-shadow: none;
  }
}
