:root {
  color-scheme: light;
  --near-black: #131515;
  --charcoal: #2b2c28;
  --deep-olive: #333e28;
  --field-tan: #8a7a5c;
  --field-tan-text: #6c5f47; /* darker tan for small text — meets WCAG AA on ivory */
  --mist-gray: #d2dbd9;
  --warm-ivory: #fafce0;
  --page-bg: #fffdf4;
  --white: #ffffff;
  --red: #d82626;
  --error-text: #a82020;
  --surface: rgba(255, 255, 255, 0.72);
  --border: rgba(43, 44, 40, 0.14);
  --control-border: #85877e;
  --control-placeholder: #66685f;
  --shadow: 0 24px 60px rgba(19, 21, 21, 0.1);
  --shadow-soft: 0 12px 32px rgba(19, 21, 21, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 253, 244, 0.76), rgba(255, 253, 244, 0.76)),
    url("/tape-tools-assets/assets/website-background-mirrored.png");
  background:
    linear-gradient(rgba(255, 253, 244, 0.76), rgba(255, 253, 244, 0.76)),
    image-set(
      url("/tape-tools-assets/assets/website-background-mirrored.webp") type("image/webp"),
      url("/tape-tools-assets/assets/website-background-mirrored.png") type("image/png")
    );
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  color: var(--near-black);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

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

main p a:not(.button),
main li a:not(.button) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 10px clamp(18px, 4vw, 56px);
  background: rgba(43, 44, 40, 0.96);
  border-bottom: 1px solid rgba(210, 219, 217, 0.16);
  box-shadow: 0 10px 26px rgba(19, 21, 21, 0.12);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 150px;
}

.brand img {
  width: 154px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 2vw, 24px);
  color: rgba(250, 252, 224, 0.78);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Hamburger (mobile) — checkbox is visually hidden but focusable; the label
   is the visible toggle. The nav is revealed via .nav-toggle:checked. */
.nav-toggle {
  display: none;
}

.nav-burger {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--warm-ivory);
  background: none;
  border: none;
  cursor: pointer;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 2px;
}

.site-nav a {
  padding: 7px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--warm-ivory);
  border-bottom-color: var(--field-tan);
}

.nav-action {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px !important;
  color: var(--near-black) !important;
  background: var(--warm-ivory);
  border: 1px solid var(--warm-ivory);
  border-radius: var(--radius);
}

.nav-action:hover {
  color: var(--warm-ivory) !important;
  background: var(--deep-olive);
  border-color: var(--deep-olive);
}

.app-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 48px) clamp(18px, 4vw, 56px) 72px;
}

.app-hero {
  display: grid;
  grid-template-columns: 1fr;
}

.app-hero-copy,
.profile-panel,
.section-card,
.results-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.app-hero-copy {
  display: grid;
  align-content: center;
  padding: clamp(14px, 2vw, 22px) clamp(20px, 3vw, 36px);
}

.section-tag {
  margin: 0;
  color: var(--field-tan-text);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.app-hero h1 {
  margin: 0;
  color: var(--near-black);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.04;
}

.app-hero-copy p:last-child {
  max-width: 660px;
  margin: 5px 0 0;
  color: rgba(43, 44, 40, 0.78);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  font-weight: 650;
}

.profile-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 24px;
}

.profile-panel h2,
.section-heading h2,
.summary-copy h2 {
  margin: 0;
  color: var(--near-black);
  line-height: 1.08;
}

.profile-panel h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.profile-detail {
  margin: 0;
  color: rgba(43, 44, 40, 0.74);
  font-weight: 700;
}

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

.profile-stats div {
  padding: 12px;
  background: rgba(250, 252, 224, 0.72);
  border: 1px solid rgba(43, 44, 40, 0.12);
  border-radius: var(--radius);
}

.profile-stats dt {
  margin: 0;
  color: var(--field-tan-text);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-stats dd {
  margin: 4px 0 0;
  color: var(--near-black);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 800;
}

.builder-help-card {
  max-width: 900px;
  margin: 22px auto 0;
}

.hiw-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.hiw-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.hiw-num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--deep-olive);
  color: #fafce0;
  border-radius: 999px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 800;
}

.hiw-step h3 {
  margin: 0 0 4px;
  color: var(--near-black);
  font-size: 1rem;
  line-height: 1.15;
}

.hiw-step p,
.hiw-footnote {
  margin: 0;
  color: rgba(43, 44, 40, 0.78);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  text-transform: none;
}

.hiw-footnote {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-weight: 650;
}

.hiw-footnote a,
.hiw-step a,
.print-guide-body a {
  color: var(--deep-olive);
  font-weight: 800;
  text-decoration: underline;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 0.92fr);
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}

.form {
  display: grid;
  gap: 18px;
}

.builder-progress {
  padding: 20px 22px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.builder-progress-count {
  margin: 4px 0 10px;
  color: var(--near-black);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
}

.builder-progress-track {
  height: 4px;
  overflow: hidden;
  background-color: rgba(43, 44, 40, 0.14);
  border-radius: 3px;
}

.builder-progress-track span {
  display: block;
  width: 25%;
  height: 100%;
  background-color: var(--deep-olive);
  transition: width 180ms ease;
}

.builder-progress-status {
  min-height: 1.45em;
  margin: 10px 0 0;
  color: rgba(43, 44, 40, 0.72);
  font-size: 0.9rem;
  font-weight: 700;
}

.builder-progress-status[data-state="error"] { color: var(--error-text); }

.handoff-notice {
  margin: 14px 0 0;
  padding: 12px 14px;
  color: var(--near-black);
  background-color: rgba(51, 62, 40, 0.08);
  border: 1px solid rgba(51, 62, 40, 0.22);
  border-left: 3px solid var(--deep-olive);
  border-radius: 3px;
  font-size: 0.92rem;
  font-weight: 700;
}

.builder-step-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.builder-step-actions button {
  min-width: 132px;
  min-height: 46px;
  border-radius: 3px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.step-back {
  color: var(--deep-olive);
  background-color: transparent;
  border: 1px solid var(--deep-olive);
}

.step-continue {
  margin-left: auto;
  color: var(--warm-ivory);
  background-color: var(--deep-olive);
  border: 1px solid var(--deep-olive);
}

.workspace.is-progressive { grid-template-columns: minmax(0, 900px); justify-content: center; }
.workspace.is-progressive .results-panel { width: 100%; }
.workspace.is-progressive .preview-frame iframe { min-height: min(940px, 75vh); }

body.is-order-result .app-hero,
body.is-order-result #generator,
body.is-order-result #email-preview-panel,
body.is-order-result #purchase-box,
body.is-order-result #cart-panel,
body.is-order-result #preview-note,
body.is-order-result #sample-preview-warning,
body.is-order-result #preview-jump,
body.is-order-result #hiw-card,
body.is-order-result #print-guide {
  display: none !important;
}

body.is-order-result .workspace {
  grid-template-columns: minmax(0, 900px);
  justify-content: center;
}

.email-preview-panel {
  padding: 18px;
  background-color: rgba(51, 62, 40, 0.07);
  border: 1px solid rgba(51, 62, 40, 0.2);
  border-radius: 3px;
}

.email-preview-panel h3 { margin: 0; color: var(--near-black); }
.email-preview-panel p { margin: 7px 0 0; }
.email-preview-panel form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; margin-top: 14px; }
.email-preview-panel form > label { grid-column: 1 / -1; }
.email-preview-panel input[type="email"] { min-height: 46px; font-size: 16px; }
.email-preview-panel button { min-height: 46px; border-radius: 3px; }
.email-preview-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#preview-email-status { grid-column: 1 / -1; min-height: 1.45em; }

.section-card,
.results-panel {
  padding: 24px;
}

.section-card {
  display: grid;
  gap: 20px;
}

.section-heading,
.summary-copy {
  display: grid;
  gap: 8px;
}

.section-heading h2,
.summary-copy h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  align-items: start;
}

label {
  display: grid;
  gap: 7px;
  color: var(--charcoal);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.helper {
  display: block;
  margin-top: 2px;
  color: rgba(43, 44, 40, 0.74);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
  text-transform: none;
}

.diameter-reference-note {
  padding: 8px 10px;
  color: #5f4a22;
  background-color: rgba(138, 122, 92, 0.12);
  border: 1px solid rgba(95, 74, 34, 0.35);
  border-left: 3px solid #8a7a5c;
  border-radius: var(--radius);
}

.field-error {
  margin: -8px 0 0;
  padding: 9px 12px;
  color: var(--error-text);
  background: rgba(216, 38, 38, 0.08);
  border: 1px solid rgba(168, 32, 32, 0.35);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--near-black);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  font-size: 1rem;
  font-weight: 500;
  text-transform: none;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

input[type="number"] {
  font-variant-numeric: tabular-nums;
}

select {
  appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--charcoal) 50%),
    linear-gradient(135deg, var(--charcoal) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) calc(50% - 3px),
    calc(100% - 13px) calc(50% - 3px);
  background-repeat: no-repeat;
  background-size: 6px 6px;
}

input:hover,
select:hover,
textarea:hover {
  background-color: var(--white);
  border-color: var(--deep-olive);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  background-color: var(--white);
  border-color: var(--deep-olive);
  box-shadow:
    0 0 0 3px rgba(138, 122, 92, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

input::placeholder,
textarea::placeholder {
  color: var(--control-placeholder);
  opacity: 1;
}

.checkbox {
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 10px;
  min-height: 72px;
  padding: 13px;
  background: rgba(250, 252, 224, 0.58);
  border: 1px solid rgba(43, 44, 40, 0.13);
  border-radius: var(--radius);
}

.checkbox input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--deep-olive);
  box-shadow: none;
}

.purchase-ack {
  display: grid;
  margin-bottom: 14px;
  min-height: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  cursor: pointer;
}

.purchase-ack a {
  color: var(--deep-olive);
  font-weight: 800;
  text-decoration: underline;
}

.advanced {
  padding: 0;
}

.advanced > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  cursor: pointer;
  list-style: none;
}

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

.summary-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  color: var(--near-black);
  background: rgba(250, 252, 224, 0.72);
  border: 1px solid rgba(43, 44, 40, 0.13);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.summary-indicator::before {
  content: "+";
  margin-right: 8px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.advanced[open] > summary .summary-indicator::before {
  content: "-";
}

.energy-reference-card {
  min-width: 0;
  margin: 0 24px 24px;
  padding: 18px;
  background-color: var(--surface);
  border: 1px solid var(--control-border);
  border-radius: 3px;
}

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

.energy-reference-copy .section-tag {
  margin: 0;
}

.energy-reference-copy h3 {
  margin: 4px 0;
  color: inherit;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.2;
}

.energy-reference-copy > p:last-child,
.energy-reference-help {
  margin: 6px 0 0;
  color: var(--field-tan-text);
  font-size: .9rem;
  line-height: 1.5;
}

.energy-reference-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 4px;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.energy-reference-toggle > input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  opacity: 0;
}

.energy-toggle-track {
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 26px;
  padding: 3px;
  background-color: var(--control-border);
  border: 1px solid var(--control-border);
  border-radius: 999px;
}

.energy-toggle-track::before {
  content: "";
  width: 18px;
  height: 18px;
  background-color: #ffffff;
  border-radius: 50%;
}

.energy-reference-toggle > input:checked + .energy-toggle-track {
  justify-content: flex-end;
  background-color: var(--accent, var(--deep-olive));
  border-color: var(--accent, var(--deep-olive));
}

.energy-reference-toggle > input:checked + .energy-toggle-track::before {
  background-color: var(--page-bg);
}

.energy-reference-toggle > input:focus-visible + .energy-toggle-track {
  outline: 3px solid var(--accent, var(--deep-olive));
  outline-offset: 4px;
}

.energy-reference-settings {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
  .energy-reference-card { margin: 0 18px 20px; padding: 14px; }
  .energy-reference-header { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .energy-reference-toggle { justify-self: start; }
}

.advanced-grid {
  padding: 0 24px 24px;
}

/* Printing & applying guide (collapsible under How it works) */
.print-guide-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  padding: 0 24px 24px;
}

.print-guide-body h3 {
  margin: 0 0 4px;
  color: var(--near-black);
  font-size: 1rem;
  line-height: 1.15;
}

.print-guide-body p,
.print-guide-body li {
  margin: 0;
  color: rgba(43, 44, 40, 0.78);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.print-guide-body ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.print-guide-body p + p,
.print-guide-body ul + p {
  margin-top: 8px;
}

.print-guide-body li + li {
  margin-top: 4px;
}

.style-customization {
  display: grid;
  gap: 24px;
  container-type: inline-size;
  container-name: tape-style;
}

.style-group {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.style-group > legend {
  width: 100%;
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.2;
}

.style-group > .style-group-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.style-group-heading .style-inline-toggle {
  flex: 0 0 auto;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.style-layout-row,
.style-marks-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.style-layout-row + .style-layout-row {
  margin-top: 18px;
}

.style-marks-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(90px, .45fr);
  align-items: end;
}

.checkbox.style-inline-toggle {
  min-width: 0;
  min-height: 44px;
  grid-template-columns: 18px auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: .78rem;
  cursor: pointer;
}

.style-inline-toggle input {
  margin: 0;
}

.style-inline-toggle > span {
  white-space: nowrap;
}

.style-group > .helper {
  margin: 12px 0 0;
}

@media (max-width: 820px) {
  .style-layout-row,
  .style-marks-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .style-layout-row,
  .style-marks-row { grid-template-columns: minmax(0, 1fr); }
}

/* Paid edits and dealer builds keep a narrower form beside the preview. */
@container tape-style (max-width: 720px) {
  .style-layout-row,
  .style-marks-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container tape-style (max-width: 420px) {
  .style-layout-row,
  .style-marks-row { grid-template-columns: minmax(0, 1fr); }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
}

.buy-email {
  display: grid;
  gap: 7px;
  flex: 1;
  min-width: 220px;
  color: var(--charcoal);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.buy-email input {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--near-black);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
}

.buy-email input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--deep-olive);
  box-shadow: 0 0 0 3px rgba(138, 122, 92, 0.16);
}

.preview-note {
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.5;
}

.preview-note > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--field-tan-text);
}

.preview-note > summary::-webkit-details-marker {
  display: none;
}

.preview-note > summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  font-size: 1.15em;
  font-weight: 700;
  color: var(--field-tan);
}

.preview-note[open] > summary::before {
  content: "\2212"; /* minus */
}

.preview-note > summary:focus-visible {
  outline: 3px solid rgba(51, 62, 40, 0.65);
  outline-offset: 3px;
  border-radius: 3px;
}

.preview-note-body {
  margin-top: 10px;
  color: inherit;
  opacity: 0.85;
}

.preview-note-body p {
  margin: 0 0 10px;
}

.preview-note-body p:last-child {
  margin-bottom: 0;
}

.claim-panel {
  margin-top: 14px;
  padding: 18px;
  background: rgba(250, 252, 224, 0.74);
  border: 1px solid rgba(51, 62, 40, 0.22);
  border-radius: var(--radius);
}

.claim-panel h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.claim-panel p {
  margin: 0 0 12px;
  color: rgba(43, 44, 40, 0.74);
  font-size: 0.9rem;
}

/* An airgun setup's saved slots on the confirmation screen. */
.setup-slots-bar {
  display: flex;
  gap: 4px;
  max-width: 320px;
  margin: 0 0 10px;
}

.setup-slots-bar span {
  flex: 1;
  height: 6px;
  border: 1px solid rgba(51, 62, 40, 0.45);
  border-radius: 3px;
}

.setup-slots-bar span.is-saved {
  background-color: #333e28;
  border-color: #333e28;
}

.setup-slots .setup-slots-account {
  margin-bottom: 0;
}

@media (prefers-color-scheme: dark) {
  .setup-slots-bar span {
    border-color: rgba(233, 247, 183, 0.4);
  }

  .setup-slots-bar span.is-saved {
    background-color: #bce82a;
    border-color: #bce82a;
  }
}

.claim-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.claim-row input {
  flex: 1;
  min-width: 180px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--near-black);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  font: inherit;
}

.claim-row input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--deep-olive);
  box-shadow: 0 0 0 3px rgba(138, 122, 92, 0.16);
}

.claim-msg {
  margin-top: 10px !important;
  font-weight: 700;
}

.claim-msg[data-state="success"] {
  color: var(--deep-olive);
}

.claim-msg[data-state="error"] {
  color: var(--red);
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  color: var(--warm-ivory);
  background: var(--deep-olive);
  border: 1px solid var(--deep-olive);
  border-radius: var(--radius);
  box-shadow: 0 10px 22px rgba(51, 62, 40, 0.18);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--near-black);
  border-color: var(--near-black);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent, var(--deep-olive));
  outline-offset: 3px;
  border-radius: 3px;
}

/* A required field the buyer left blank, flagged on add-to-cart/generate. */
input.field-missing,
select.field-missing,
textarea.field-missing {
  border-color: var(--error-text);
  box-shadow: 0 0 0 3px rgba(216, 38, 38, 0.18);
}

/* "Use my location" control sits in the same grid cell as the Altitude input. */
.field-stack {
  display: grid;
  gap: 7px;
  align-content: start;
}

.locate-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

/* Matches the "Open section" disclosure pill (.summary-indicator) so the two
   controls read as a set; the ivory pill works on both light and dark surfaces. */
.locate-btn {
  min-height: 36px;
  padding: 0 12px;
  color: var(--near-black);
  background: rgba(250, 252, 224, 0.72);
  border: 1px solid rgba(43, 44, 40, 0.13);
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: none;
}

.locate-btn:hover {
  background: rgba(250, 252, 224, 0.92);
  border-color: rgba(43, 44, 40, 0.2);
}

.locate-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Coverage note inside the button, kept lighter and normal-case. */
.locate-btn-note {
  margin-left: 4px;
  text-transform: none;
  font-weight: 650;
  opacity: 0.72;
}

.locate-status {
  flex: 1 1 140px;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.3;
  text-transform: none;
  color: var(--field-tan-text);
}

.locate-status.is-error {
  color: var(--error-text);
}

/* Screen-reader-only text: visually hidden, still announced. */
.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: off-screen until focused, then pinned top-left. */
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--deep-olive, #333e28);
  color: var(--warm-ivory, #f4f1e6);
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition: top 120ms ease;
}
.skip-link:focus {
  top: 8px;
}

/* ADA: respect users who turn off motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  color: rgba(43, 44, 40, 0.72);
  font-weight: 800;
}

.status::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--field-tan);
  box-shadow: 0 0 0 4px rgba(138, 122, 92, 0.14);
}

.status[data-state="working"]::before {
  background: var(--field-tan);
  box-shadow: 0 0 0 4px rgba(138, 122, 92, 0.18);
}

.status[data-state="ready"]::before {
  background: var(--deep-olive);
  box-shadow: 0 0 0 4px rgba(51, 62, 40, 0.16);
}

.status[data-state="error"]::before {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(216, 38, 38, 0.14);
}

.status[data-state="error"] {
  color: var(--error-text);
}

.results-panel {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 16px;
}

.download {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  color: rgba(43, 44, 40, 0.62);
  background: rgba(250, 252, 224, 0.72);
  border: 1px solid rgba(43, 44, 40, 0.13);
  border-radius: var(--radius);
  font-weight: 800;
  pointer-events: none;
}

.download.ready {
  color: var(--warm-ivory);
  background: var(--deep-olive);
  border-color: var(--deep-olive);
  box-shadow: 0 10px 22px rgba(51, 62, 40, 0.18);
  pointer-events: auto;
}

.download.ready:hover {
  background: var(--near-black);
  border-color: var(--near-black);
}

.sample-preview-warning {
  margin: -8px 0 0;
  padding: 12px 14px;
  color: rgba(43, 44, 40, 0.86);
  background: rgba(51, 62, 40, 0.07);
  border: 1px solid rgba(51, 62, 40, 0.2);
  border-left: 3px solid var(--deep-olive);
  border-radius: var(--radius);
  font-size: 0.94rem;
  line-height: 1.45;
}

.sample-preview-warning strong {
  display: block;
  margin-bottom: 2px;
  color: var(--near-black);
}

.sample-preview-warning + .preview-note {
  margin-top: -2px;
}

.preview-frame {
  padding: 10px;
  background: var(--charcoal);
  border: 1px solid rgba(210, 219, 217, 0.18);
  border-radius: var(--radius);
}

iframe {
  display: block;
  width: 100%;
  min-height: 860px;
  background: var(--mist-gray);
  border: none;
  border-radius: 2px;
}

@media (max-width: 1120px) {
  .app-hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .results-panel {
    position: static;
  }
}

/* Keep the compact desktop purchase card where returning users expect it. On
   stacked layouts, source order wins: preview and fit guidance come first. */
@media (min-width: 1121px) {
  #purchase-box {
    order: -1;
  }
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-toggle {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .nav-burger {
    display: block;
  }

  .nav-toggle:focus-visible ~ .nav-burger span {
    background: var(--warm-ivory);
    box-shadow: 0 0 0 2px rgba(250, 252, 224, 0.4);
  }

  .site-nav {
    display: none;
    order: 5;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding-top: 10px;
  }

  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  .site-nav a {
    width: 100%;
    padding: 11px 2px;
  }

  .app-shell {
    padding: 18px 14px 48px;
  }

  .app-hero-copy,
  .section-card,
  .results-panel {
    padding: 20px;
  }

  .profile-panel {
    padding: 20px;
  }

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

  .advanced > summary {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }

  .advanced-grid {
    padding: 0 20px 20px;
  }

  iframe {
    min-height: 480px;
  }
}

@media (max-width: 600px) {
  .builder-step-actions { position: sticky; bottom: 8px; z-index: 4; padding: 8px; background-color: var(--page-bg); border: 1px solid var(--border); border-radius: 3px; }
  .builder-step-actions button { flex: 1; min-width: 0; }
  .email-preview-panel form { grid-template-columns: 1fr; }
  .dw-analytics-open .builder-step-actions { bottom: calc(var(--dw-analytics-height, 200px) + 8px); }
  .dw-analytics-open .preview-jump { bottom: calc(var(--dw-analytics-height, 200px) + 18px); }
}

@media (prefers-reduced-motion: reduce) {
  .builder-progress-track span { transition: none; }
}

@media (max-width: 560px) {
  .brand img {
    width: 136px;
  }

  .site-nav {
    gap: 14px;
    font-size: 0.8rem;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .actions {
    align-items: stretch;
  }

  button,
  .download {
    width: 100%;
  }

  /* Keep small inline controls compact — only the primary CTAs go full-width */
  .cart-item-actions button,
  .cart-clear,
  .preset-btn,
  .mode-btn {
    width: auto;
  }
}

/* ------------------------------------------------------------------
   Purchase box (results panel)
   ------------------------------------------------------------------ */

.purchase-box {
  display: grid;
  gap: 14px;
  padding: 20px;
  background: rgba(250, 252, 224, 0.88);
  border: 2px solid rgba(51, 62, 40, 0.5);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.purchase-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.purchase-heading h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.1;
}

.price-tag {
  color: var(--deep-olive);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 800;
}

.purchase-box .buy-email {
  flex: none;
  min-width: 0;
}

.purchase-box .purchase-ack {
  margin-bottom: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.purchase-ack span {
  text-transform: none;
  font-weight: 600;
}

.buy-button {
  width: 100%;
  font-size: 1.05rem;
}

.add-to-cart {
  width: 100%;
  min-height: 44px;
  color: var(--deep-olive);
  background: transparent;
  border: 1.5px solid rgba(51, 62, 40, 0.5);
  border-radius: var(--radius);
  box-shadow: none;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.add-to-cart:hover {
  color: var(--near-black);
  background: rgba(51, 62, 40, 0.08);
}

.checkout-hint {
  margin: 0;
  color: rgba(43, 44, 40, 0.62);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.4;
}

/* ------------------------------------------------------------------
   Edit a purchased tape
   ------------------------------------------------------------------ */

.paid-edit-loading-panel {
  display: none;
  width: min(640px, 100%);
  margin: 40px auto;
  border-radius: 3px;
}

.paid-edit-loading-panel h1 {
  margin: 0;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
}

.paid-edit-loading-panel p {
  margin: 8px 0 0;
}

.paid-edit-pending .paid-edit-loading-panel {
  display: block;
}

.paid-edit-pending .app-hero,
.paid-edit-pending #builder-view,
.paid-edit-pending #nav-cart,
.paid-edit-pending #hiw-card,
.paid-edit-pending #print-guide,
.paid-edit-pending #preview-jump {
  display: none;
}

/* An invalid edit link shows its error and return link, not sample chrome. */
.paid-edit-error #finished-preview > :not(#edit-box) {
  display: none;
}

.paid-edit-mode .app-hero,
.paid-edit-mode #builder-progress,
.paid-edit-mode #builder-step-actions,
.paid-edit-mode #hiw-card,
.paid-edit-mode #print-guide {
  display: none;
}

.paid-edit-loading #generator > [data-progress-step],
.paid-edit-loading #builder-step-actions {
  display: none;
}

.paid-edit-mode .workspace {
  grid-template-columns: minmax(0, 1040px);
  justify-content: center;
  gap: 14px;
  margin-top: 0;
}

.paid-edit-mode .form,
.paid-edit-mode .results-panel {
  width: 100%;
  max-width: 1040px;
}

.paid-edit-mode .form {
  gap: 12px;
}

.paid-edit-mode .section-card {
  border-radius: 3px;
}

.paid-edit-mode .section-card:not(details) {
  gap: 12px;
  padding: 16px;
}

.paid-edit-mode details.section-card {
  padding: 0;
}

.paid-edit-mode details.section-card > summary {
  padding: 16px;
}

.paid-edit-mode details.section-card > .advanced-note {
  padding: 0 16px;
}

.paid-edit-mode details.section-card > .advanced-grid {
  padding: 0 16px 16px;
}

.paid-edit-mode .section-heading h2,
.paid-edit-mode .summary-copy h2 {
  font-size: 1.35rem;
}

.paid-edit-summary-title {
  margin: 0;
  color: var(--near-black);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.08;
}

.paid-edit-mode .section-note {
  max-width: none;
  font-size: 0.84rem;
  line-height: 1.4;
}

.paid-edit-mode .results-panel {
  position: static;
  top: auto;
  gap: 12px;
  padding: 16px;
}

.paid-edit-mode #status {
  display: none;
}

.paid-edit-summary {
  display: grid;
  gap: 10px;
}

.paid-edit-mode .paid-edit-summary > .section-heading .section-note {
  display: none;
}

.paid-edit-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.paid-edit-facts div {
  min-width: 0;
  padding: 9px 11px;
  background-color: rgba(51, 62, 40, 0.035);
  border-right: 1px solid var(--border);
}

.paid-edit-facts div:last-child {
  border-right: 0;
}

.paid-edit-facts dt {
  color: var(--field-tan-text);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.paid-edit-facts dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: var(--near-black);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

.paid-edit-window {
  margin: 0;
  padding: 8px 10px;
  color: var(--near-black);
  background-color: rgba(51, 62, 40, 0.055);
  border-left: 3px solid var(--deep-olive);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.4;
}

.paid-edit-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.paid-edit-mode .advanced-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.paid-edit-mode .style-customization {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.paid-edit-mode .style-layout-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.paid-edit-mode .style-marks-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(110px, .55fr);
  gap: 12px;
}

.paid-edit-mode .style-group > legend {
  margin-bottom: 10px;
  padding-bottom: 7px;
  font-size: 1.15rem;
}

.paid-edit-mode .style-layout-row + .style-layout-row {
  margin-top: 12px;
}

.paid-edit-mode .style-presets {
  align-items: flex-start;
  margin: 0 16px 12px;
}

.paid-edit-mode .energy-reference-card {
  margin: 0 16px 16px;
  padding: 14px;
}

.paid-edit-mode .paid-edit-range-options .builder-note {
  margin: 0;
  padding: 9px 11px;
  font-size: 0.82rem;
}

.paid-edit-mode #edit-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 14px 16px;
  border-width: 1px;
  box-shadow: none;
}

.paid-edit-ready #edit-box-title,
.paid-edit-ready #edit-box-note {
  display: none;
}

.paid-edit-mode #paid-chart-note {
  order: 4;
  flex-basis: 100%;
  margin: 0;
  font-size: 0.78rem;
}

.paid-edit-mode #save-edit-btn,
.paid-edit-mode #paid-chart-btn {
  width: auto;
  min-width: 150px;
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.9rem;
}

.paid-edit-mode #edit-box-back {
  order: 3;
  margin-left: auto;
}

.paid-edit-mode #edit-status,
.paid-edit-mode #paid-chart-status {
  order: 5;
  flex-basis: 100%;
  min-height: 0;
}

.paid-edit-mode #edit-success-actions {
  order: 6;
  flex-basis: 100%;
}

.edit-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(51, 62, 40, 0.18);
}

.edit-success-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1.5px solid var(--deep-olive);
  border-radius: var(--radius);
  font-size: 0.94rem;
  font-weight: 800;
}

.edit-success-primary {
  min-width: 220px;
  color: var(--warm-ivory);
  background: var(--deep-olive);
  box-shadow: 0 10px 22px rgba(51, 62, 40, 0.18);
}

.edit-success-primary:hover {
  color: var(--warm-ivory);
  background: var(--near-black);
  border-color: var(--near-black);
}

.edit-success-secondary {
  color: var(--deep-olive);
  background: transparent;
}

.edit-success-secondary:hover {
  color: var(--near-black);
  background: rgba(51, 62, 40, 0.08);
}

.paid-edit-mode #edit-status:empty,
.paid-edit-mode #paid-chart-status:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.paid-edit-mode #edit-status:empty::before,
.paid-edit-mode #paid-chart-status:empty::before {
  display: none;
}

@media (max-width: 700px) {
  .paid-edit-facts {
    grid-template-columns: 1fr;
  }

  .paid-edit-facts div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .paid-edit-facts div:last-child {
    border-bottom: 0;
  }

  .paid-edit-quick-grid,
  .paid-edit-mode .advanced-grid,
  .paid-edit-mode .style-layout-row,
  .paid-edit-mode .style-marks-row {
    grid-template-columns: 1fr;
  }

  .paid-edit-mode #save-edit-btn,
  .paid-edit-mode #paid-chart-btn {
    width: 100%;
    min-height: 46px;
  }

  .paid-edit-mode #edit-box-back {
    margin-left: 0;
  }

  .edit-success-actions {
    display: grid;
    width: 100%;
  }

  .edit-success-action {
    width: 100%;
  }
}

@media (min-width: 360px) and (max-width: 700px) {
  .paid-edit-mode .style-marks-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.edit-box {
  display: grid;
  gap: 12px;
  padding: 20px;
  background: rgba(250, 252, 224, 0.88);
  border: 2px solid rgba(51, 62, 40, 0.5);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.edit-box h2 {
  margin: 0;
  font-size: 1.2rem;
}

.edit-box-note {
  margin: 0;
  color: rgba(43, 44, 40, 0.78);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.5;
}

#paid-chart-status:empty { min-height: 0; }
#paid-chart-status:empty::before { content: none; }

.edit-box-back {
  color: var(--deep-olive);
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
}

.edit-box-back:hover {
  text-decoration: underline;
}

/* Locked (read-only) fields while editing a purchased tape */
.locked-field {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Greyed-out control, e.g. 50-yd label styling when labels are hidden */
.control-off {
  opacity: 0.55;
}

/* ------------------------------------------------------------------
   Cart
   ------------------------------------------------------------------ */

.cart-panel {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(51, 62, 40, 0.28);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.cart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.cart-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.cart-clear {
  min-height: auto;
  padding: 4px 10px;
  color: rgba(43, 44, 40, 0.74);
  background: transparent;
  border: 1px solid rgba(43, 44, 40, 0.2);
  border-radius: calc(var(--radius) - 4px);
  box-shadow: none;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.cart-clear:hover {
  color: var(--near-black);
  border-color: rgba(43, 44, 40, 0.4);
}

.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(43, 44, 40, 0.14);
  border-radius: calc(var(--radius) - 4px);
}

.cart-item-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cart-item-name {
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-sum {
  color: rgba(43, 44, 40, 0.76);
  font-size: 0.74rem;
  font-weight: 650;
}

.cart-item-actions {
  display: flex;
  flex: none;
  gap: 6px;
}

.cart-item-edit,
.cart-item-remove {
  min-height: auto;
  padding: 5px 10px;
  border-radius: calc(var(--radius) - 5px);
  box-shadow: none;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.cart-item-edit {
  color: var(--deep-olive);
  background: rgba(51, 62, 40, 0.08);
  border: 1px solid rgba(51, 62, 40, 0.22);
}

.cart-item-edit:hover {
  background: rgba(51, 62, 40, 0.16);
}

.cart-item-remove {
  color: #9a2b2b;
  background: transparent;
  border: 1px solid rgba(154, 43, 43, 0.3);
}

.cart-item-remove:hover {
  background: rgba(154, 43, 43, 0.1);
}

.cart-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px dashed rgba(43, 44, 40, 0.2);
}

.cart-total-label {
  color: rgba(43, 44, 40, 0.7);
  font-size: 0.82rem;
  font-weight: 700;
}

.cart-total {
  color: var(--deep-olive);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.25rem;
  font-weight: 800;
}

.cart-nudge {
  margin: 0;
  color: var(--deep-olive);
  font-size: 0.78rem;
  font-weight: 650;
}

.download-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.download-list .download {
  margin: 0;
}

/* ------------------------------------------------------------------
   Checkout (review) view
   ------------------------------------------------------------------ */

.checkout-view {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 0 40px;
}

.checkout-back {
  min-height: auto;
  margin-bottom: 16px;
  padding: 6px 0;
  color: var(--deep-olive);
  background: transparent;
  border: none;
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.checkout-back:hover {
  text-decoration: underline;
}

.checkout-card {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 4vw, 32px);
  background: rgba(250, 252, 224, 0.88);
  border: 2px solid rgba(51, 62, 40, 0.5);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.checkout-card h2 {
  margin: 0;
  font-size: 1.4rem;
}

.checkout-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.checkout-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(43, 44, 40, 0.14);
  border-radius: calc(var(--radius) - 4px);
}

.checkout-pricing {
  display: grid;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(43, 44, 40, 0.2);
}

.checkout-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

#checkout-form {
  display: grid;
  gap: 14px;
}

.example-note {
  margin: 0;
  color: rgba(43, 44, 40, 0.78);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.5;
}

/* Purchased-tape update policy. Keep the copy in update-policy.js. */
.update-policy-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  justify-self: start;
  width: auto;
  min-height: 22px;
  margin-left: 7px;
  padding: 2px 7px;
  color: #334019;
  background-color: #eef8c9;
  border: 1px solid #8da633;
  border-radius: 3px;
  font: 700 10px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: .02em;
  text-transform: none;
  vertical-align: middle;
}
.update-policy-tag[data-tone="fix"] { color: #56564f; background-color: #eeeeea; border-color: #aaa99f; }
.update-policy-tag[data-tone="reference"] { color: #62645d; background-color: transparent; border-color: #b9b9b1; }
.update-policy-link {
  width: fit-content;
  min-height: 40px;
  padding: 6px 0;
  color: var(--deep-olive);
  background-color: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: .84rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: none;
  cursor: pointer;
}
.update-policy-link:hover { color: var(--near-black); background-color: transparent; }
.update-policy-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: min(760px, calc(100dvh - 40px));
  padding: 0;
  color: var(--near-black);
  background-color: #fffef9;
  border: 1px solid rgba(43, 44, 40, .28);
  border-radius: 3px;
  box-shadow: 0 24px 80px rgba(19, 21, 21, .28);
}
.update-policy-dialog::backdrop { background-color: rgba(15, 17, 15, .58); }
.update-policy-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(43, 44, 40, .16);
}
.update-policy-dialog-heading h2 { margin: 2px 0 0; font-size: 1.65rem; }
.update-policy-dialog-body { padding: 20px 24px 24px; overflow-y: auto; }
.update-policy-close {
  flex: 0 0 42px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  color: inherit;
  background-color: transparent;
  border: 1px solid rgba(43, 44, 40, .22);
  border-radius: 3px;
  font-size: 1.6rem;
  line-height: 1;
}
.update-policy-done { display: none; }
.update-policy-kicker {
  margin: 0;
  color: rgba(43, 44, 40, .65);
  font: 700 10px/1.3 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.update-policy-panel,
.update-policy-review { display: grid; gap: 10px; }
.update-policy-tier {
  padding: 14px 16px;
  background-color: #f3f3ed;
  border: 1px solid rgba(43, 44, 40, .16);
  border-left: 4px solid #9a9a91;
  border-radius: 3px;
}
.update-policy-frequency { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13px; line-height: 1.5; }
.update-policy-tier[data-tone="free"] { background-color: #f2f8db; border-color: #a3b858; }
.update-policy-tier[data-tone="fix"] { border-left-color: #8a7a5c; }
.update-policy-tier h3 { margin: 0; font-size: 1.04rem; }
.update-policy-tier p { margin: 5px 0 0; color: rgba(43, 44, 40, .76); font-size: .86rem; line-height: 1.45; }
.update-policy-tier ul { margin: 8px 0 0; padding-left: 19px; font-size: .85rem; line-height: 1.5; }
.update-policy-included {
  padding: 16px;
  background-color: #f2f8db;
  border: 1px solid #a3b858;
  border-radius: 3px;
}
.update-policy-included h3 { margin: 4px 0 8px; font-size: 1.12rem; }
.update-policy-included ul { margin: 0; padding-left: 18px; font-size: .84rem; line-height: 1.5; }
.update-policy-included .update-policy-link { margin-top: 3px; }
.update-policy-included.is-compact ul { display: none; }
.update-policy-review .update-policy-tier p { font-weight: 650; }
.saved-tape-update-wrap { margin: 14px 0; }
.saved-tape-update-heading { margin: 0; color: rgba(43, 44, 40, .65); font: 700 10px/1.3 ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; }
.saved-tape-update-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; margin: 7px 0 0; padding-left: 18px; }
.saved-tape-update-item { font-size: .85rem; line-height: 1.5; }

@media (max-width: 600px) {
  .update-policy-dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 48px);
    margin: auto 0 0;
    border-width: 1px 0 0;
    border-radius: 3px 3px 0 0;
  }
  .update-policy-dialog-heading { padding: 18px 18px 14px; }
  .update-policy-dialog-body { padding: 16px 18px; }
  .update-policy-done { display: block; width: calc(100% - 36px); min-height: 44px; margin: 0 18px 18px; }
  .saved-tape-update-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-color-scheme: dark) {
  .update-policy-link { color: #bce82a; }
  .update-policy-link:hover { color: #e5f7a5; }
  .update-policy-tag { color: #e9f7b7; background-color: rgba(188, 232, 42, .12); border-color: #bce82a; }
  .update-policy-tag[data-tone="fix"],
  .update-policy-tag[data-tone="reference"] { color: #d1d3c8; background-color: rgba(255, 255, 255, .04); border-color: rgba(238, 241, 226, .35); }
  .update-policy-dialog { color: #eef1e2; background-color: #20231e; border-color: rgba(238, 241, 226, .24); }
  .update-policy-dialog-heading,
  .update-policy-close { border-color: rgba(238, 241, 226, .24); }
  .update-policy-kicker,
  .saved-tape-update-heading,
  .update-policy-tier p { color: rgba(238, 241, 226, .7); }
  .update-policy-tier { background-color: #292c26; border-color: rgba(238, 241, 226, .2); }
  .update-policy-tier[data-tone="free"],
  .update-policy-included { background-color: rgba(188, 232, 42, .08); border-color: rgba(188, 232, 42, .6); }
  .saved-tape-update-item { color: #edf7c8; }
}

.nav-cart-count {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------
   Bullet and scope database pickers
   ------------------------------------------------------------------ */

.projectile-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bullet-mode {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(43, 44, 40, 0.07);
  border-radius: var(--radius);
}

.mode-btn {
  min-height: 34px;
  padding: 0 14px;
  color: rgba(43, 44, 40, 0.75);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  box-shadow: none;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.mode-btn:hover {
  color: var(--near-black);
  background: rgba(255, 255, 255, 0.55);
}

.mode-btn.is-active {
  color: var(--near-black);
  background: var(--white);
  box-shadow: 0 1px 4px rgba(19, 21, 21, 0.12);
}

.bullet-results {
  display: grid;
  gap: 2px;
  max-height: 280px;
  margin-top: 12px;
  padding: 6px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(43, 44, 40, 0.16);
  border-radius: var(--radius);
}

.bullet-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 6px 12px;
  color: var(--near-black);
  background: transparent;
  border: none;
  border-radius: 2px;
  box-shadow: none;
  font-size: 0.92rem;
  font-weight: 650;
  text-align: left;
  text-transform: none;
  cursor: pointer;
}

.bullet-row:hover {
  color: var(--warm-ivory);
  background: var(--deep-olive);
}

.bullet-row:hover .bullet-bc {
  color: rgba(250, 252, 224, 0.8);
}

.bullet-bc {
  flex-shrink: 0;
  color: var(--field-tan-text);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 800;
}

.bullet-more {
  margin: 4px 0;
  padding: 6px 12px;
  color: rgba(43, 44, 40, 0.74);
  font-size: 0.85rem;
  font-weight: 650;
}

.bullet-chosen {
  margin: 12px 0 0;
  padding: 10px 14px;
  color: rgba(43, 44, 40, 0.85);
  background: rgba(250, 252, 224, 0.74);
  border: 1px solid rgba(51, 62, 40, 0.3);
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.5;
}

.bullet-chosen {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid rgba(51, 62, 40, 0.55);
  background: rgba(250, 252, 224, 0.9);
}

.bullet-chosen-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  color: var(--warm-ivory);
  background: var(--deep-olive);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
}

#bullet_chosen_text {
  flex: 1;
}

#scope_chosen_text {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.scope-row-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.scope-row-title,
.scope-row-configuration,
.scope-chosen-configuration,
.scope-chosen-spec {
  overflow-wrap: anywhere;
}

.scope-row-title {
  font-weight: 800;
}

.scope-row-configuration,
.scope-chosen-configuration {
  color: rgba(43, 44, 40, 0.74);
  font-size: 0.82rem;
  font-weight: 650;
}

.scope-mechanics {
  max-width: 19ch;
  text-align: right;
  white-space: normal;
}

.scope-chosen-spec {
  color: var(--field-tan-text);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 800;
}

.scope-source {
  width: fit-content;
  color: var(--deep-olive);
  font-size: 0.82rem;
  font-weight: 800;
}

.scope-status {
  margin: -8px 0 0;
  color: rgba(43, 44, 40, 0.68);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
}

.scope-row:hover .scope-row-configuration,
.scope-row:hover .scope-mechanics {
  color: rgba(250, 252, 224, 0.8);
}

.bullet-change {
  flex-shrink: 0;
  min-height: 34px;
  padding: 0 14px;
  color: var(--near-black);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(43, 44, 40, 0.32);
  box-shadow: none;
  font-size: 0.82rem;
}

.bullet-change:hover {
  color: var(--warm-ivory);
  background: var(--charcoal);
  border-color: var(--charcoal);
}

@media (max-width: 560px) {
  .mode-btn,
  .bullet-change,
  .bullet-row {
    min-height: 48px;
  }

  .bullet-change {
    width: auto;
  }

  .scope-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .scope-mechanics {
    max-width: none;
    text-align: left;
  }

  .scope-chosen {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  #scope_chosen_text {
    flex-basis: calc(100% - 42px);
  }

  .scope-change {
    margin-left: 38px;
  }

  .scope-status {
    font-size: 1rem;
  }
}

/* The hidden attribute must always win, even over display rules */
[hidden] {
  display: none !important;
}

/* Guideline audit pass (design_audit branch) */
h1, h2, h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

label,
.section-tag,
.profile-stats dt,
.helper {
  letter-spacing: 0.05em;
}

.helper {
  letter-spacing: 0;
}

/* ==================================================================
   DARK MODE (design_audit branch) — follows the OS setting
   ================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page-bg: #161815;
    --surface: rgba(255, 255, 255, 0.045);
    --border: rgba(238, 241, 226, 0.14);
    --control-border: #777d70;
    --control-placeholder: #afb4a8;
    --shadow: none;
    --shadow-soft: none;
    --field-tan-text: #b9aa86;
    --red: #ff8f83;
    --error-text: #ff9e94;
  }

  html {
    background: var(--page-bg);
  }

  body {
    background:
      linear-gradient(rgba(16, 18, 15, 0.9), rgba(16, 18, 15, 0.9)),
      image-set(
        url("/tape-tools-assets/assets/website-background-mirrored.webp") type("image/webp"),
        url("/tape-tools-assets/assets/website-background-mirrored.png") type("image/png")
      );
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    color: #eef0e3;
  }

  .app-hero h1,
  .paid-edit-summary-title,
  .profile-panel h2,
  .section-heading h2,
  .summary-copy h2,
  .profile-stats dd,
  .purchase-heading h2,
  .hiw-step h3,
  .print-guide-body h3 {
    color: #eef0e3;
  }

  .app-hero-copy p:last-child,
  .profile-detail,
  .helper,
  .preview-note,
  .claim-panel p,
  .purchase-ack span,
  .hiw-step p,
  .print-guide-body p,
  .print-guide-body li,
  .hiw-footnote {
    color: rgba(238, 241, 226, 0.75);
  }

  .diameter-reference-note {
    color: #f1dfb0;
    background-color: rgba(216, 184, 103, 0.09);
    border-color: rgba(243, 214, 147, 0.35);
    border-left-color: #f3d693;
  }

  .hiw-num {
    background: var(--accent);
    color: var(--accent-ink);
  }

  label,
  .checkbox span {
    color: rgba(238, 241, 226, 0.85);
  }

  button:hover {
    background: #46583a;
    border-color: #46583a;
  }

  input,
  select,
  textarea,
  .buy-email input,
  .claim-row input {
    color: #eef0e3;
    background-color: rgba(255, 255, 255, 0.06);
    border-color: var(--control-border);
    box-shadow: none;
  }

  input::placeholder {
    color: var(--control-placeholder);
  }

  input:hover,
  select:hover,
  textarea:hover {
    background-color: rgba(255, 255, 255, 0.08);
  }

  input:focus,
  select:focus,
  textarea:focus,
  .buy-email input:focus,
  .claim-row input:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(186, 204, 156, 0.7);
    box-shadow: 0 0 0 3px rgba(186, 204, 156, 0.15);
  }

  select {
    background-image:
      linear-gradient(45deg, transparent 50%, #cfd2c2 50%),
      linear-gradient(135deg, #cfd2c2 50%, transparent 50%);
    background-position:
      calc(100% - 19px) calc(50% - 3px),
      calc(100% - 13px) calc(50% - 3px);
    background-repeat: no-repeat;
    background-size: 6px 6px;
  }

  .checkbox,
  .profile-stats div,
  .preview-note,
  .claim-panel,
  .purchase-box,
  .cart-panel,
  .cart-item,
  .checkout-card,
  .checkout-item,
  .edit-box,
  .bullet-chosen {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(238, 241, 226, 0.2);
  }

  /* The chosen-bullet card flips to a dark surface — light up its text */
  .bullet-chosen {
    color: rgba(238, 241, 226, 0.85);
  }

  .scope-row-configuration,
  .scope-chosen-configuration,
  .scope-status {
    color: rgba(238, 241, 226, 0.65);
  }

  .scope-chosen-spec,
  .scope-source {
    color: #cdd9b6;
  }

  .sample-preview-warning {
    color: rgba(238, 241, 226, 0.8);
    background-color: rgba(188, 232, 42, 0.07);
    border-color: rgba(188, 232, 42, 0.24);
    border-left-color: var(--accent);
  }

  .sample-preview-warning strong {
    color: #eef0e3;
  }

  .checkout-card h2,
  .edit-box h2,
  .paid-edit-facts dd {
    color: #eef0e3;
  }

  .paid-edit-facts div,
  .paid-edit-window {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(238, 241, 226, 0.2);
  }

  .paid-edit-facts dt,
  .paid-edit-window {
    color: rgba(238, 241, 226, 0.78);
  }

  .edit-box-note {
    color: rgba(238, 241, 226, 0.72);
  }

  .edit-box-back {
    color: #cdd9b6;
  }

  .edit-success-actions {
    border-color: rgba(238, 241, 226, 0.2);
  }

  .edit-success-primary {
    color: #1c2208;
    background: #bce82a;
    border-color: #bce82a;
    box-shadow: none;
  }

  .edit-success-primary:hover {
    color: #1c2208;
    background: #c8ef47;
    border-color: #c8ef47;
  }

  .edit-success-secondary {
    color: #cdd9b6;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(238, 241, 226, 0.3);
  }

  .edit-success-secondary:hover {
    color: var(--warm-ivory);
    background: rgba(255, 255, 255, 0.1);
  }

  .example-note {
    color: rgba(238, 241, 226, 0.72);
  }

  .checkout-back {
    color: #cdd9b6;
  }

  .price-tag,
  .purchase-ack a,
  .hiw-footnote a,
  .hiw-step a,
  .print-guide-body a {
    color: #b9cf9a;
  }

  .cart-head h2,
  .cart-item-name {
    color: #eef0e3;
  }

  .cart-item-sum,
  .cart-total-label {
    color: rgba(238, 241, 226, 0.78);
  }

  .cart-total,
  .cart-nudge {
    color: #b9cf9a;
  }

  .add-to-cart,
  .cart-item-edit {
    color: #cdd9b6;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(238, 241, 226, 0.3);
  }

  .add-to-cart:hover,
  .cart-item-edit:hover {
    color: var(--warm-ivory);
    background: rgba(255, 255, 255, 0.1);
  }

  .cart-clear {
    color: rgba(238, 241, 226, 0.6);
    border-color: rgba(238, 241, 226, 0.22);
  }

  .cart-clear:hover {
    color: var(--warm-ivory);
    border-color: rgba(238, 241, 226, 0.45);
  }

  .cart-item-remove {
    color: #e88a8a;
    border-color: rgba(232, 138, 138, 0.34);
  }

  .cart-item-remove:hover {
    background: rgba(232, 138, 138, 0.14);
  }

  .status {
    color: rgba(238, 241, 226, 0.8);
  }

  .field-error {
    color: var(--error-text);
    background: rgba(255, 100, 88, 0.12);
    border-color: rgba(255, 158, 148, 0.48);
  }

  .download {
    color: rgba(238, 241, 226, 0.55);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(238, 241, 226, 0.16);
  }

  .download.ready {
    color: var(--warm-ivory);
    background: var(--deep-olive);
    border-color: var(--deep-olive);
    box-shadow: none;
  }

  .download.ready:hover {
    background: #46583a;
    border-color: #46583a;
  }

  .bullet-results {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(238, 241, 226, 0.18);
  }

  .bullet-row {
    color: #eef0e3;
  }

  .bullet-more {
    color: rgba(238, 241, 226, 0.55);
  }

  .bullet-mode {
    background: rgba(255, 255, 255, 0.06);
  }

  .mode-btn {
    color: rgba(238, 241, 226, 0.6);
  }

  .mode-btn.is-active {
    color: #131515;
    background: #e8ebdc;
    box-shadow: none;
  }

  .mode-btn:hover:not(.is-active) {
    color: #eef0e3;
    background: rgba(255, 255, 255, 0.08);
  }

  .buy-email {
    color: rgba(238, 241, 226, 0.85);
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline-color: rgba(186, 204, 156, 0.8);
  }
}

@media (prefers-color-scheme: dark) {
  /* App banner: light masthead, matching the site's inner pages */
  .app-hero-copy {
    background: #eef0e0;
    border-color: rgba(238, 241, 226, 0.2);
  }

  .app-hero-copy h1 {
    color: #131515;
  }

  .app-hero-copy p:last-child {
    color: rgba(43, 44, 40, 0.8);
  }
}

/* Brand eyebrow with the red index tick, matching the homepage */
.eyebrow {
  margin: 0 0 10px;
  color: var(--field-tan-text);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 3px;
  margin-right: 10px;
  vertical-align: 0.18em;
  background: var(--red);
}

@media (prefers-color-scheme: dark) {
  /* On the light masthead the tan label needs its light-mode depth */
  .app-hero-copy .eyebrow {
    color: #6c5f47;
  }
}

/* ==================================================================
   LIME ACCENT (dark mode only) — additional_customizations branch
   ================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #bce82a;
    --accent-grad: linear-gradient(135deg, #d6f23a, #9bd618);
    --accent-grad-hover: linear-gradient(135deg, #e2f85a, #abe62c);
    --accent-ink: #1c2208;
  }

  /* Primary actions ONLY → lime gradient. Scoped by class so the bullet
     result rows, mode toggle, and Change button stay neutral. */
  .buy-button,
  #claim-btn,
  .download.ready {
    color: var(--accent-ink);
    background: var(--accent-grad);
    border-color: transparent;
    box-shadow: none;
  }

  .buy-button:hover,
  #claim-btn:hover,
  .download.ready:hover {
    color: var(--accent-ink);
    background: var(--accent-grad-hover);
    border-color: transparent;
  }

  /* BUILD TAPE nav button → lime, matching the site */
  .nav-action {
    color: var(--accent-ink) !important;
    background: var(--accent-grad);
    border-color: transparent;
  }

  .nav-action:hover {
    color: var(--accent-ink) !important;
    background: var(--accent-grad-hover);
    border-color: transparent;
  }

  /* Index mark + brand crosshair → lime */
  .eyebrow::before {
    background: var(--accent-grad);
  }

  /* Price, status-ready dot, chosen-bullet check → lime */
  .price-tag {
    color: var(--accent);
  }

  .status[data-state="ready"]::before {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(188, 232, 42, 0.16);
  }

  .bullet-chosen-check {
    background: var(--accent-grad);
    color: var(--accent-ink);
  }
}

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
  filter: grayscale(0.25);
}

/* ------------------------------------------------------------------
   Appearance customization controls
   ------------------------------------------------------------------ */

.style-presets {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.style-presets-label {
  color: var(--charcoal);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.style-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-color-note {
  display: none;
}

.preset-btn {
  min-height: 34px;
  padding: 0 16px;
  color: var(--near-black);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(43, 44, 40, 0.28);
  border-radius: var(--radius);
  box-shadow: none;
  font-size: 0.85rem;
  font-weight: 700;
}

.preset-btn:hover {
  color: var(--warm-ivory);
  background: var(--charcoal);
  border-color: var(--charcoal);
}

/* Wrap-count visual: one tape-like sample with a lane per wrap (1/2/3) */
.wrap-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding: 8px 10px;
  background: #f2f2ec;
  border: 1px solid rgba(43, 44, 40, 0.18);
  border-radius: var(--radius);
}

.wrap-lane {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 20px;
  padding: 2px 6px;
  color: #1c1c1c;
  border-radius: 2px;
  background-color: #fbfbf7;
  background-image:
    repeating-linear-gradient(90deg, rgba(200, 40, 40, 0.85) 0 2px, transparent 2px 46px),
    repeating-linear-gradient(90deg, rgba(20, 20, 20, 0.5) 0 1px, transparent 1px 9px);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

input[type="color"] {
  width: 100%;
  min-height: 42px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  cursor: pointer;
}

.color-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.color-field > label {
  display: block;
}

.color-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.color-palette {
  position: relative;
  display: none;
}

.color-palette > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  color: var(--near-black);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.color-palette > summary::-webkit-details-marker {
  display: none;
}

.color-palette > summary::before {
  width: 12px;
  height: 12px;
  margin-right: 7px;
  background:
    linear-gradient(90deg, #000000 0 50%, #ffffff 50% 100%);
  border: 1px solid rgba(43, 44, 40, 0.45);
  border-radius: 2px;
  content: "";
}

.color-palette > summary:hover {
  background: var(--white);
  border-color: var(--deep-olive);
}

.color-palette > summary:focus-visible {
  outline: 3px solid rgba(51, 62, 40, 0.65);
  outline-offset: 3px;
}

.color-palette[data-disabled] > summary {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.color-swatches {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  right: 0;
  grid-template-columns: repeat(4, 44px);
  gap: 8px;
  width: max-content;
  padding: 10px;
  background: #fffdf4;
  border: 1px solid rgba(43, 44, 40, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 14px 32px rgba(28, 30, 26, 0.2);
}

.color-palette:not([open]) > .color-swatches {
  display: none;
}

.color-palette[open] > .color-swatches {
  display: grid;
}

.color-palette--up > .color-swatches {
  top: auto;
  bottom: calc(100% + 7px);
}

.color-swatch {
  position: relative;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  background: var(--swatch-color);
  border: 2px solid rgba(43, 44, 40, 0.45);
  border-radius: var(--radius);
  box-shadow: none;
}

.color-swatch:hover {
  background: var(--swatch-color);
  border-color: var(--near-black);
  box-shadow: none;
}

.color-swatch[aria-pressed="true"] {
  box-shadow:
    0 0 0 2px #fffdf4,
    0 0 0 4px var(--near-black);
}

.color-swatch[aria-pressed="true"]::after {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border: 2px solid #111111;
  border-radius: 50%;
  content: "";
}

.builder-note {
  margin: 14px 0 0;
  color: rgba(43, 44, 40, 0.74);
  font-size: 0.9rem;
  line-height: 1.5;
}

.reference-scale-warning {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #bc8538;
  border-radius: 3px;
  color: #70400d;
  background-color: #fff3db;
  font-size: .86rem;
  line-height: 1.45;
}

@media (prefers-color-scheme: dark) {
  .reference-scale-warning {
    color: #f0cf8d;
    background-color: #30281b;
    border-color: #997239;
  }
}

.customer-data-box {
  display: grid;
  gap: 14px;
  padding: 16px;
  background-color: rgba(51, 62, 40, 0.04);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.customer-data-box .section-heading h3 {
  margin: 0;
  color: var(--near-black);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.customer-trajectory-panel {
  display: grid;
  gap: 13px;
}

.customer-trajectory-panel .builder-note,
.customer-trajectory-panel .helper,
.customer-trajectory-panel .field-error {
  margin: 0;
}

.customer-trajectory-panel .field-error:empty {
  display: none;
}

.customer-data-update-note {
  margin: 0;
  padding: 10px 11px;
  color: #2f4a59;
  background-color: rgba(82, 111, 128, .09);
  border: 1px solid rgba(82, 111, 128, .38);
  border-left: 3px solid #526f80;
  border-radius: 3px;
  font-size: .86rem;
  line-height: 1.45;
}

.customer-data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 44px;
  padding: 9px 14px;
  color: var(--near-black);
  background-color: transparent;
  border: 1px solid var(--deep-olive);
  border-radius: 3px;
  font-size: .86rem;
  font-weight: 800;
  text-transform: none;
  cursor: pointer;
}

.customer-data-actions > .builder-secondary,
.customer-data-actions > .customer-file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--deep-olive);
  border-radius: 3px;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: none;
}

.customer-file-label:hover {
  background-color: rgba(51, 62, 40, .08);
}

.customer-file-label:focus-within {
  outline: 3px solid var(--accent, var(--deep-olive));
  outline-offset: 3px;
}

#customer_data_text {
  min-height: 190px;
  resize: vertical;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.customer-data-estimate-notice {
  display: grid;
  gap: 9px;
  padding: 12px;
  color: #493815;
  background-color: #fbf5e5;
  border: 1px solid #b89a56;
  border-left: 3px solid #9a762b;
  border-radius: 3px;
}

.customer-data-estimate-heading-row,
.customer-data-review-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
}

.customer-data-estimate-heading-row h4,
.customer-data-estimate-notice p,
.customer-data-review-heading p {
  margin: 0;
}

.customer-data-estimate-heading-row h4 {
  color: inherit;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.customer-data-est-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 5px;
  color: #44330f;
  background-color: #e8d6a7;
  border: 1px dashed #9a762b;
  border-radius: 3px;
  font: 800 .65rem/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: .06em;
}

.customer-data-estimate-summary,
.customer-data-wide-gap-warning {
  font-size: .85rem;
  line-height: 1.45;
}

.customer-data-gap-acknowledgments {
  display: grid;
  gap: 8px;
}

.customer-data-gap-ack {
  min-height: 0;
  padding: 9px 10px;
  color: #70400d;
  background-color: #fff3db;
  border: 1px solid #bc8538;
  border-radius: 3px;
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.45;
  text-transform: none;
}

.customer-data-estimate-distances {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#customer-data-estimate-details summary {
  cursor: pointer;
  padding: 8px 0;
  font-size: .86rem;
}

.customer-data-unit-check,
.customer-data-unit-review-warning {
  margin: 0;
  padding: 12px;
  color: #70400d;
  background-color: #fff3db;
  border: 1px solid #bc8538;
  border-radius: 3px;
  font-size: .9rem;
  line-height: 1.5;
}

.customer-data-unit-check { display: grid; gap: 10px; }
.customer-data-unit-check h4,
.customer-data-unit-check p { margin: 0; }
.customer-data-unit-check h4 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 1.2rem; font-weight: 600; }
.customer-data-unit-check .checkbox { color: inherit; text-transform: none; }
.customer-data-unit-check button,
.customer-data-wrap-notice button { min-height: 44px; white-space: normal; }
.customer-data-wrap-notice { padding: 10px 12px; border: 1px solid var(--border); border-radius: 3px; }
.customer-data-wrap-notice p { margin: 0 0 8px; font-size: .88rem; line-height: 1.5; }

.customer-data-estimate-distances li {
  padding: 3px 6px;
  background-color: rgba(154, 118, 43, .1);
  border: 1px dashed rgba(154, 118, 43, .55);
  border-radius: 3px;
  font: 700 .73rem/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.customer-data-wide-gap-warning {
  padding-top: 8px;
  border-top: 1px solid rgba(154, 118, 43, .35);
  font-weight: 700;
}

.customer-data-estimate-help { color: var(--near-black); }

.customer-data-review {
  border: 1px solid var(--border);
  border-radius: 3px;
}

.customer-data-review-heading {
  justify-content: space-between;
  padding: 10px;
}

.customer-data-review h4 {
  margin: 0;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.customer-data-review-heading p {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: .72rem;
}

.customer-data-review-scroll {
  max-height: 320px;
  overflow: auto;
  border-top: 1px solid var(--border);
}

.customer-data-review table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.customer-data-review th,
.customer-data-review td {
  padding: 7px 10px;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  text-align: left;
}

.customer-data-review th {
  background-color: rgba(51, 62, 40, .06);
}

.customer-data-review th:nth-child(1) { width: 24%; }
.customer-data-review th:nth-child(2) { width: 30%; }
.customer-data-review th:nth-child(3) { width: 46%; }

.customer-data-review tr.is-interpolated td {
  color: #5f4b22;
  background-color: rgba(184, 154, 86, .09);
  font-style: italic;
}

.customer-data-review tr.is-interpolated td:last-child { font-style: normal; }

.customer-data-review td .customer-data-est-badge {
  margin-left: 6px;
  vertical-align: middle;
  font-style: normal;
}

.customer-data-source {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.customer-data-source.interpolated {
  color: var(--muted);
}

#customer-data-status[data-state="info"] {
  color: #365466;
  background-color: rgba(82, 111, 128, .09);
  border-color: rgba(82, 111, 128, .38);
}

.customer-data-ack {
  min-height: 0;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.45;
  text-transform: none;
}

.customer-data-consent {
  min-height: 0;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.45;
  text-transform: none;
}

.customer-data-checks {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.customer-data-checks summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
}

.customer-data-checks p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.5;
}

.customer-data-advisories {
  display: grid;
  gap: 8px;
}

.customer-data-advisories:empty,
.customer-data-advisories p:empty,
#customer-data-reference-warnings:empty {
  display: none;
}

.customer-data-advisories p,
#customer-data-reference-warnings > p {
  margin: 0;
  padding: 9px 10px;
  color: #70400d;
  background-color: #fff3db;
  border: 1px solid #bc8538;
  border-radius: 3px;
  font-size: .84rem;
  line-height: 1.45;
}

#customer-data-wrap-warning {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  color: #70400d;
  background-color: #fff3db;
  border: 1px solid #bc8538;
  border-radius: 3px;
}

#customer-data-wrap-warning p { padding: 0; border: 0; background: transparent; }
#customer-data-use-wraps { flex: 0 0 auto; min-height: 38px; }
.wrap-count-field { display: grid; min-width: 0; gap: 8px; }

/* Live transonic-range readout under the trim toggle */
.transonic-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 10px;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(51, 62, 40, 0.06);
  border: 1px solid rgba(51, 62, 40, 0.2);
  border-left: 3px solid var(--deep-olive);
  border-radius: var(--radius);
}

.transonic-readout-label {
  color: var(--field-tan-text);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.transonic-readout-value {
  color: var(--near-black);
  font-size: 0.92rem;
  font-weight: 800;
}

.style-contrast-warning {
  margin: 12px 0 0;
  padding: 10px 14px;
  color: #5f4a22;
  background: rgba(138, 122, 92, 0.12);
  border: 1px solid rgba(95, 74, 34, 0.35);
  border-left: 3px solid #8a7a5c;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.45;
}

.style-contrast-warning strong {
  display: block;
  color: #3f321e;
}

@media (max-width: 820px) {
  .color-control-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .color-palette {
    display: block;
  }

  .mobile-color-note {
    display: block;
    margin: 0 20px 18px;
    padding: 10px 12px;
    color: rgba(43, 44, 40, 0.78);
    background: rgba(51, 62, 40, 0.06);
    border: 1px solid rgba(51, 62, 40, 0.2);
    border-left: 3px solid var(--deep-olive);
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.45;
  }
}

@media (prefers-color-scheme: dark) {
  .style-presets-label { color: rgba(238, 241, 226, 0.85); }
  .wrap-preview {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(238, 241, 226, 0.2);
  }
  .transonic-readout {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(238, 241, 226, 0.2);
    border-left-color: var(--accent, #b9cf9a);
  }
  .transonic-readout-label { color: rgba(238, 241, 226, 0.7); }
  .transonic-readout-value { color: #eef0e3; }
  .preset-btn {
    color: #eef0e3;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(238, 241, 226, 0.3);
  }
  .preset-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(238, 241, 226, 0.4);
  }
  input[type="color"] {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--control-border);
  }
  .color-palette > summary {
    color: #eef0e3;
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--control-border);
  }
  .color-palette > summary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(238, 241, 226, 0.4);
  }
  .color-palette > summary:focus-visible {
    outline-color: rgba(186, 204, 156, 0.8);
  }
  .color-swatches {
    background: #23251f;
    border-color: rgba(238, 241, 226, 0.3);
    box-shadow: none;
  }
  .color-swatch {
    border-color: rgba(238, 241, 226, 0.45);
  }
  .color-swatch:hover {
    border-color: #eef0e3;
  }
  .color-swatch[aria-pressed="true"] {
    box-shadow:
      0 0 0 2px #23251f,
      0 0 0 4px #eef0e3;
  }
  .builder-note { color: rgba(238, 241, 226, 0.7); }
  .customer-data-box,
  .customer-data-review,
  .customer-data-review th,
  .customer-file-label {
    color: #eef0e3;
    background-color: rgba(255, 255, 255, .045);
    border-color: rgba(238, 241, 226, .18);
  }
  .customer-data-box .section-heading h3 { color: #eef0e3; }
  .customer-data-update-note {
    color: #d9e6ec;
    background-color: rgba(148, 173, 188, .09);
    border-color: rgba(148, 173, 188, .42);
    border-left-color: #94adbc;
  }
  .customer-data-estimate-notice {
    color: #f1dfb0;
    background-color: #302a1c;
    border-color: #9d8041;
    border-left-color: #d4b565;
  }
  .customer-data-estimate-help { color: #eef0e3; }
  .customer-data-est-badge {
    color: #fff4d3;
    background-color: #594920;
    border-color: #c2a65d;
  }
  .customer-data-estimate-distances li {
    background-color: rgba(226, 210, 166, .08);
    border-color: rgba(226, 210, 166, .36);
  }
  .customer-data-review tr.is-interpolated td { color: #e2d2a6; background-color: rgba(226, 210, 166, .06); }
  #customer-data-status[data-state="info"] { color: #c4d7e1; background-color: rgba(148, 173, 188, .09); border-color: rgba(148, 173, 188, .42); }
  .customer-data-advisories p,
  #customer-data-reference-warnings > p { color: #f3ce88; background-color: #35291a; border-color: #b68a47; }
  #customer-data-wrap-warning { color: #f3ce88; background-color: #35291a; border-color: #b68a47; }
  .customer-data-unit-check,
  .customer-data-unit-review-warning { color: #f3ce88; background-color: #35291a; border-color: #b68a47; }
  #customer-data-wrap-warning p { background-color: transparent; border: 0; }
  .style-contrast-warning {
    color: #f1dfb0;
    background: rgba(216, 184, 103, 0.09);
    border-color: rgba(243, 214, 147, 0.35);
    border-left-color: #f3d693;
  }
  .style-contrast-warning strong {
    color: #fff4d3;
  }
  .mobile-color-note {
    color: rgba(238, 241, 226, 0.8);
    background: rgba(188, 232, 42, 0.06);
    border-color: rgba(188, 232, 42, 0.22);
    border-left-color: var(--accent, #bce82a);
  }
}

/* Builder help stays below the workspace and is collapsed by default. */
.hiw-body {
  display: grid;
  gap: 20px;
  padding: 0 24px 24px;
}

/* Per-section helper line under the heading. */
.section-note {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  opacity: 0.75;
  max-width: 62ch;
}

.section-note.advanced-note {
  padding: 0 24px;
}

/* Floating "See your tape" jump for stacked (single-column) layouts. */
.preview-jump {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: none;
  align-items: center;
  width: auto; /* the mobile full-width button rule must not stretch this */
  min-height: 46px;
  padding: 0 18px;
  color: var(--warm-ivory);
  background: var(--deep-olive);
  border: 1px solid var(--deep-olive);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(20, 24, 16, 0.35);
  font-weight: 800;
}

.preview-jump.is-off {
  display: none !important;
}

@media (max-width: 1120px) {
  .preview-jump {
    display: inline-flex;
  }
}

/* Short desktop windows: trim the preview so it fits beside the form. */
@media (min-width: 1121px) and (max-height: 920px) {
  iframe {
    min-height: 620px;
  }
}

@media (prefers-color-scheme: dark) {
  .preview-jump {
    color: var(--accent-ink);
    background: var(--accent-grad);
    border-color: transparent;
  }
}

/* Minimal builder footer: the contact path after Contact left the top nav. */
.app-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  padding: 6px 18px 44px;
  font-size: 0.88rem;
  text-align: center;
}

.app-footer a {
  color: inherit;
  opacity: 0.66;
  font-weight: 600;
  text-decoration: none;
}

.problem-report-link {
  width: auto;
  min-height: 0;
  padding: 0;
  color: inherit;
  background-color: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 0.72;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.problem-report-link:hover { opacity: 1; }

#customer-data-report {
  min-height: 44px;
  margin: 4px 0;
  padding: 8px 0;
  text-align: left;
}

.customer-data-feedback.is-soft-launch {
  margin: 12px 0;
  padding: 14px 16px;
  color: var(--ink);
  background-color: #f3f7e7;
  border: 1px solid #657347;
  border-left-width: 3px;
  border-radius: 3px;
}
.customer-data-feedback.is-soft-launch p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.customer-data-feedback.is-soft-launch #customer-data-report {
  padding: 10px 12px;
  opacity: 1;
  border: 1px solid currentColor;
  border-radius: 3px;
  text-decoration: none;
}
@media (prefers-color-scheme: dark) {
  .customer-data-feedback.is-soft-launch {
    color: #eef0e3;
    background-color: #252e1b;
    border-color: #bce82a;
  }
}

.problem-report-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  color: var(--ink);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(20, 24, 16, 0.28);
  overflow: auto;
}

.problem-report-dialog::backdrop { background-color: rgba(20, 24, 16, 0.62); }
.problem-report-dialog h2 { margin: 0; }
.problem-report-dialog > p { margin: 10px 0 20px; line-height: 1.55; }
.problem-report-dialog label { display: block; margin-top: 14px; font-weight: 700; }
.problem-report-dialog label input,
.problem-report-dialog label select,
.problem-report-dialog label textarea { width: 100%; margin-top: 6px; font-weight: 500; }
.problem-report-heading,
.problem-report-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.problem-report-actions { justify-content: flex-start; flex-wrap: wrap; margin-top: 20px; }
.problem-report-actions .buy-button,
.problem-report-actions .secondary-button { width: auto; margin: 0; }
.problem-report-close {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  color: inherit;
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

@media (prefers-color-scheme: dark) {
  .problem-report-dialog {
    color: #eef0e3;
    background-color: #20231e;
    border-color: rgba(238, 241, 226, 0.24);
  }
  .problem-report-close { border-color: rgba(238, 241, 226, 0.24); }
}

.app-footer a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-color-scheme: dark) {
  .builder-progress,
  .email-preview-panel {
    color: rgba(238, 241, 226, 0.82);
    background-color: rgba(255, 255, 255, 0.045);
    border-color: rgba(238, 241, 226, 0.18);
  }
  .builder-progress-count,
  .email-preview-panel h3 { color: #eef0e3; }
  .builder-progress-status { color: rgba(238, 241, 226, 0.72); }
  .handoff-notice { color: #eef0e3; background-color: rgba(188, 232, 42, 0.06); border-color: rgba(188, 232, 42, 0.22); border-left-color: #bce82a; }
  .builder-progress-track { background-color: rgba(238, 241, 226, 0.14); }
  .builder-progress-track span { background-color: #bce82a; }
  .step-back { color: #bce82a; border-color: #bce82a; }
  .step-continue { color: #1c2208; background-color: #bce82a; border-color: #bce82a; }
  .email-preview-panel button { color: #1c2208; background-color: #bce82a; border-color: #bce82a; }
  @media (max-width: 600px) {
    .builder-step-actions { background-color: #1a1c18; border-color: rgba(238, 241, 226, 0.18); }
  }
}
