.pricing-intro {
  padding: 30px 0 32px;
  border-bottom: 1px solid #d9e4e8;
  background: #f1f6f5;
}

.pricing-intro .back-link {
  display: inline-block;
  margin: 0 0 12px;
  color: #416e7a;
  font-size: 1rem;
}

.pricing-intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.125rem, 5vw, 3.25rem);
  line-height: 1.35;
}

.pricing-intro p {
  margin: 8px 0 0;
  color: #496273;
}

.pricing-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding-block: 24px 60px;
}

.pricing-panel,
.pricing-tool-card {
  border: 1px solid #d8e4e9;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}

.pricing-panel { padding: clamp(16px, 2.6vw, 27px); }

.pricing-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 16px;
}

.pricing-panel h2,
.pricing-tool-card h2 {
  margin: 0;
  line-height: 1.45;
}

.pricing-panel h2 { font-size: clamp(1.375rem, 2.2vw, 1.625rem); }
.pricing-tool-card h2 { font-size: 1.25rem; }

.pricing-input-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pricing-input-actions button,
.pricing-menu button {
  min-height: 44px;
  padding: 5px 12px;
  border: 1px solid #b9cfd3;
  border-radius: 8px;
  color: #254b56;
  background: #f2f7f7;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.pricing-input-actions button:enabled:hover,
.pricing-menu button:enabled:hover { background: #e5efef; }
.pricing-menu button:disabled { opacity: .6; cursor: default; }
#pricing-clear { background: #fff; }
#pricing-clear:hover { background: #f2f7f7; }

.pricing-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pricing-fields label {
  display: block;
  margin: 0 0 4px;
  font-size: 1.125rem;
  line-height: 1.5;
  font-weight: 600;
}

.pricing-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  border: 1px solid #c6d6df;
  border-radius: 8px;
  background: #fff;
  color: #466373;
}

.pricing-field:focus-within {
  outline: 2px solid #416e7a;
  outline-offset: 2px;
}

.pricing-field input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.pricing-field input:focus { outline: none; }
.pricing-field:has([aria-invalid="true"]) { border-color: #a14031; }
.pricing-field span { text-align: center; }
.pricing-proposed .pricing-field { background: #f0f7f6; border-color: #93b5b6; }

.pricing-hint,
.pricing-status {
  margin: 5px 0 0;
  color: #4c6474;
  font-size: 1rem;
  line-height: 1.65;
}

.pricing-example-note,
.pricing-scope { margin-top: 14px; }

.pricing-thresholds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.pricing-thresholds > div {
  padding: 13px 15px;
  border: 1px solid #dbe6ea;
  border-radius: 11px;
  background: #f7fafb;
}

.pricing-thresholds > .pricing-same-earnings {
  border-color: #c9dfdd;
  background: #eef6f4;
}

.pricing-thresholds dt {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.5;
}

.pricing-thresholds dd,
.pricing-costs dd { margin: 0; }

.pricing-thresholds strong {
  display: block;
  margin: 5px 0 1px;
  color: #214d56;
  font-size: clamp(1.625rem, 3vw, 2rem);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.pricing-thresholds small {
  color: #496273;
  font-size: 1rem;
  line-height: 1.65;
}

.pricing-suggestion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 4px;
}

.pricing-suggestion-reason {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid #c9dfdd;
}

#pricing-apply-suggestion {
  min-height: 44px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  background: #214d56;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

#pricing-apply-suggestion:enabled:hover { background: #173b43; }
#pricing-apply-suggestion:disabled {
  color: #4c6474;
  border-color: #c9dfdd;
  background: #f7fafb;
  cursor: default;
}

.pricing-rounding { margin-block: 8px 14px; }
.pricing-status { margin: 8px 0 0; color: #8a412f; }
.pricing-status[data-next-dish] { color: #4c6474; }
.pricing-status:empty, #pricing-difference:empty { display: none; }

.pricing-remaining {
  padding: 16px;
  border: 1px solid #c9dfdd;
  border-radius: 11px;
  background: #eef6f4;
}

.pricing-result-details {
  display: grid;
  gap: 12px;
}

.pricing-result-details + .pricing-scope { margin-block: 10px 16px; }

.pricing-breakdown {
  padding: 16px;
  border: 1px solid #dbe6ea;
  border-radius: 11px;
}

.pricing-remaining h3,
.pricing-breakdown h3 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5;
  font-weight: 600;
}

.pricing-remaining strong {
  display: block;
  margin: 3px 0;
  color: #193f4a;
  font-size: clamp(1.65rem, 4vw, 2.2rem);
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.pricing-results [data-loss],
.pricing-menu [data-loss] { color: #a33225; }

.pricing-comparison-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0;
}

.pricing-comparison-values > div {
  padding: 8px 10px;
  border-radius: 8px;
  background: #ffffffa6;
}

.pricing-comparison-values dt {
  color: #314e5b;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.pricing-comparison-values dd { margin: 0; }

.pricing-comparison-values strong {
  font-size: clamp(1.375rem, 2.5vw, 1.875rem);
}

.pricing-comparison[data-tone="loss"] { background: #fff2ef; border-color: #f0c7be; }
.pricing-comparison[data-tone="less"] { background: #fff6db; border-color: #ead394; }
.pricing-comparison[data-tone="good"] { background: #edf7ee; border-color: #bad9c2; }

#pricing-difference {
  margin: 5px 0 0;
  color: #3b626c;
  font-size: 1.125rem;
  line-height: 1.5;
  font-weight: 600;
}

.pricing-comparison[data-tone="less"] #pricing-difference { color: #6d4c07; }
.pricing-comparison[data-tone="good"] #pricing-difference { color: #22603a; }

.pricing-costs { margin: 4px 0 0; font-size: 1.0625rem; }

.pricing-costs > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
}

.pricing-costs dd {
  flex-shrink: 0;
  color: #274e58;
  font-variant-numeric: tabular-nums;
}

.pricing-breakdown-total {
  margin: 5px 0 0;
  padding-top: 5px;
  border-top: 1px solid #dbe6ea;
  color: #193f4a;
  text-align: right;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.pricing-price-options {
  padding-inline: 12px;
  border: 1px solid #dbe6ea;
  border-radius: 8px;
}

.pricing-price-options summary {
  padding-block: 10px;
  color: #214d56;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
}

.pricing-price-options [hidden] { display: none; }
.pricing-price-options .pricing-hint { margin: 0 0 10px; }

.pricing-price-options table {
  width: 100%;
  margin-bottom: 10px;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.pricing-price-options :is(th, td) {
  padding: 6px;
  border-top: 1px solid #dbe6ea;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.pricing-price-options th { color: #214d56; background: #f2f7f7; }

.pricing-guide h3 {
  margin: 20px 0 8px;
  font-size: 1.25rem;
  line-height: 1.55;
}

.pricing-guide p { margin: 8px 0; }
.pricing-guide strong { color: #214d56; }

.pricing-guide-table { overflow-x: auto; margin-top: 20px; }
.pricing-guide-table table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.pricing-guide-table caption { text-align: left; margin-bottom: 8px; font-weight: 600; }
.pricing-guide-table :is(th, td) { padding: 10px; border-bottom: 1px solid #dbe6ea; text-align: left; white-space: nowrap; }
.pricing-guide-table thead { background: #f2f7f7; }

.pricing-formulas {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

.pricing-formulas > div {
  padding: 10px 14px;
  border-radius: 8px;
  background: #f2f7f7;
}

.pricing-formulas dt { font-weight: 600; }
.pricing-formulas dd { margin: 2px 0 0; color: #314e5b; }

.pricing-menu { grid-column: 1 / -1; min-width: 0; }
.pricing-menu [hidden] { display: none; }
.pricing-menu-form label { display: block; margin-bottom: 4px; font-weight: 600; }

.pricing-menu-editing,
.pricing-menu-draft {
  padding: 8px 12px;
  border-radius: 8px;
  color: #214d56;
  background: #f2f7f7;
  font-size: 1rem;
}

.pricing-menu-editing { margin: 0 0 12px; font-weight: 600; }
.pricing-menu-draft { margin: 8px 0 0; }

.pricing-menu-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
}

.pricing-menu-controls input {
  width: 20rem;
  min-width: 0;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid #c6d6df;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.pricing-menu .pricing-primary { background: #214d56; color: #fff; }
.pricing-menu .pricing-primary:hover { background: #173b43; color: #fff; }

.pricing-menu-feedback:has(#pricing-next-dish:not([hidden])) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-block: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #edf7ee;
}

.pricing-menu-feedback:has(#pricing-next-dish:not([hidden])) .pricing-status {
  margin: 0;
  color: #22603a;
}
.pricing-menu-scroll { margin-top: 14px; overflow-x: auto; }

.pricing-menu table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.pricing-menu :is(th,td) {
  padding: 8px 10px;
  border-bottom: 1px solid #dbe6ea;
  text-align: left;
  white-space: nowrap;
}

.pricing-menu th { background: #f2f7f7; color: #214d56; }
.pricing-menu td:first-child { min-width: 7rem; max-width: 16rem; white-space: normal; overflow-wrap: anywhere; }
.pricing-menu-row-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pricing-menu td button { min-height: 40px; padding: 3px 9px; }

.pricing-menu-outcome {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.pricing-menu-outcome[data-tone="loss"] { background: #fff2ef; color: #a33225; }
.pricing-menu-outcome[data-tone="less"] { background: #fff6db; color: #6d4c07; }
.pricing-menu-outcome[data-tone="good"] { background: #edf7ee; color: #22603a; }

.pricing-field-error { margin: 4px 0 0; color: #a33225; font-size: 1rem; }

.pricing-jump {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 14px;
  padding: 5px 14px;
  border-radius: 8px;
  background: #214d56;
  color: #fff;
  font-weight: 600;
}

.pricing-jump:hover { background: #173b43; color: #fff; }
#pricing-results-title, #pricing-menu-title { scroll-margin-top: 110px; }

.pricing-tool-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-block: 24px 60px;
}

.pricing-tool-card {
  display: flex;
  flex-direction: column;
  padding: 21px 24px;
}

.pricing-tool-card:hover { border-color: #80a9af; background: #f6faf9; }
.pricing-tool-card p { margin: 6px 0 15px; color: #496273; }
.pricing-tool-card span { margin-top: auto; color: #32616b; font-size: .9375rem; font-weight: 600; }

.tools-directory .tools-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; color: #496273; font-size: .875rem; }
.tools-directory .tools-breadcrumbs a,
.tools-guide a:not(.button) { color: #32616b; text-decoration: underline; text-underline-offset: 4px; }
.tools-directory .page-intro { padding-bottom: 12px; }
.tools-directory .tools-summary { margin-top: 22px; color: #173b43; }
.tools-directory .pricing-tool-list { padding-bottom: 40px; }
.tools-directory .pricing-tool-card { text-decoration: none; }
.tools-directory .pricing-tool-card .tools-scope { margin: 0 0 12px; color: #32616b; font-size: .875rem; font-weight: 600; }
.tools-directory .pricing-tool-card h2 { font-size: clamp(1.25rem, 2.5vw, 1.65rem); }
.tools-directory .pricing-tool-card .tools-question { margin: 14px 0; color: var(--ink); font-weight: 500; }
.tools-card-details { margin: 0 0 24px; color: #496273; font-size: .9375rem; }
.tools-card-details div + div { margin-top: 14px; }
.tools-card-details dt { margin-bottom: 4px; color: #173b43; font-weight: 600; }
.tools-card-details dd { margin: 0; }
.tools-guide { padding-bottom: 60px; }
.tools-guide > section { padding-block: 32px; border-top: 1px solid #d8e4e9; }
.tools-guide h2 { margin: 0 0 22px; font-size: clamp(1.375rem, 3vw, 1.875rem); line-height: 1.5; }
.tools-guide h3 { margin: 26px 0 8px; font-size: 1.125rem; line-height: 1.6; }
.tools-guide p { max-width: 52em; margin: 8px 0 16px; color: #496273; }
.tools-steps { padding-left: 1.5em; }
.tools-steps li { padding-left: 8px; margin-bottom: 22px; }
.tools-steps li::marker { color: #32616b; font-weight: 600; }
.tools-guide .tools-note { padding: 18px 20px; border-left: 3px solid #32616b; background: #f1f6f5; }
.tools-contact-panel .button { margin-block: 8px 12px; }
.tools-guide .tools-updated { font-size: .8125rem; }

:is(.delivery-pricing button, .delivery-pricing a, .pricing-price-options summary, .pricing-tool-card, .pricing-menu-controls input, .pricing-menu-scroll):focus-visible {
  outline: 2px solid #416e7a;
  outline-offset: 3px;
}

@media (min-width: 900px) {
  .pricing-result-details { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}

@media (min-width: 1101px) {
  .pricing-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .pricing-workbench, .pricing-tool-list { gap: 14px; }
  .pricing-intro { padding-block: 22px; }
  .delivery-pricing:has(:is(.pricing-field, .pricing-menu-controls):focus-within) ~ #social-dock { visibility: hidden; }
}

@media (max-width: 600px) {
  .pricing-tool-list { grid-template-columns: minmax(0, 1fr); }
  .pricing-fields { grid-template-columns: minmax(0, 1fr); }
  .pricing-thresholds { grid-template-columns: 1fr; }
  .pricing-thresholds > div { padding: 9px 11px; }
  .pricing-menu td button { min-height: 44px; }
}

@media (max-width: 460px) {
  .pricing-comparison-values { grid-template-columns: minmax(0, 1fr); }
  .pricing-comparison-values > div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 10px;
  }

  .pricing-comparison-values dd { min-width: 0; }
}
