* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  max-width: 100%;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(247, 243, 234, 0.94), rgba(217, 212, 199, 0.58)),
    var(--field-paper);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
}

button,
input,
textarea,
select {
  font: inherit;
  box-sizing: border-box;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header,
.smart-fold-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px clamp(18px, 4vw, 48px);
  background: rgba(247, 243, 234, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.smart-fold-bar {
  min-height: 44px;
  height: 44px;
  padding-block: 4px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.wordmark.compact {
  font-size: 0.94rem;
}

.mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--on-primary);
  background: var(--primary);
  font-size: 0.86rem;
}

.site-header nav a,
.smart-fold-bar a {
  color: var(--muted);
}

header .jump-tool-btn,
nav .jump-tool-btn,
.smart-fold-bar .jump-tool-btn,
[data-jump-tool].jump-tool-btn,
.btn-primary {
  color: var(--on-primary, #ffffff) !important;
  background: var(--primary) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.jump-tool-btn,
.btn-primary,
.btn-secondary,
.checkout-link,
[data-preset-chip] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-height: 50px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.jump-tool-btn:active,
.btn-primary:active,
.btn-secondary:active,
.checkout-link:active,
[data-preset-chip]:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  box-shadow: 0 8px 20px rgba(23, 48, 58, 0.2);
}

.btn-secondary,
[data-preset-chip] {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.74);
  border-color: var(--line);
}

.mobile-jump {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 30;
  display: none;
  box-shadow: var(--shadow);
}

.page-shell {
  width: 100%;
}

.marketing-layer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: clamp(34px, 6vw, 76px) clamp(18px, 5vw, 72px) clamp(26px, 4vw, 52px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  color: var(--primary);
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.0rem, 3.8vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.subhead {
  max-width: 680px;
  color: #34474d;
  font-size: clamp(1.04rem, 1.6vw, 1.26rem);
  line-height: 1.65;
}

.hero-actions,
.pro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.trust-line,
.fine-print,
.storage-note,
.upgrade-message,
.pro-card p {
  color: var(--muted);
  line-height: 1.5;
}

.hero-side {
  display: grid;
  gap: 16px;
}

.proof-card,
.pricing-card,
.capture-panel,
.preview-panel,
.form-card,
.modal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.proof-card,
.pricing-card {
  padding: 18px;
}

.proof-header,
.pricing-head,
.section-row,
.preview-toolbar,
.workspace-head,
.deliverable-letterhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mini-map {
  position: relative;
  min-height: 230px;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid rgba(23, 48, 58, 0.18);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(90deg, rgba(23, 48, 58, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(23, 48, 58, 0.09) 1px, transparent 1px),
    #f9f7ef;
  background-size: 36px 36px;
}

.map-house,
.map-landmark,
.map-pin {
  position: absolute;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.map-house {
  left: 28px;
  top: 26px;
  width: 86px;
  height: 54px;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--line);
}

.map-landmark {
  right: 22px;
  bottom: 24px;
  padding: 9px 13px;
  color: #6b3b1e;
  background: #f5ddc9;
}

.map-pin {
  width: 40px;
  height: 40px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(217, 95, 33, 0.26);
}

.pin-one {
  left: 42%;
  top: 32%;
}

.pin-two {
  left: 64%;
  top: 56%;
}

.map-line {
  position: absolute;
  height: 3px;
  background: var(--primary);
  transform-origin: left center;
  opacity: 0.72;
}

.map-line.one {
  left: 104px;
  top: 72px;
  width: 138px;
  transform: rotate(18deg);
}

.map-line.two {
  left: 53%;
  top: 48%;
  width: 120px;
  transform: rotate(24deg);
}

.billing-toggle,
.segmented {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 12px 0 0;
  border: 0;
}

.billing-toggle label,
.segmented label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  cursor: pointer;
}

.discount-badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: #6b2f12;
  background: #f5dccf;
  font-weight: 800;
}

.checkout-link.is-disabled {
  width: 100%;
  color: var(--muted);
  background: #ede8dc;
  border-color: var(--line);
  cursor: not-allowed;
  text-decoration: none;
}

.workspace {
  padding: clamp(24px, 4vw, 52px) clamp(14px, 4vw, 48px) 64px;
}

.workspace-head {
  max-width: 1360px;
  margin: 0 auto 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px);
}

.workspace-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  max-width: 520px;
}

.workspace-actions .storage-note {
  margin: 0;
}

.reset-action {
  flex: 0 0 auto;
  color: #6b2f12;
  border-color: rgba(217, 95, 33, 0.42);
  background: #fff4ec;
}

.workspace-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.restore-banner {
  max-width: 1360px;
  margin: 0 auto 16px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 95, 33, 0.34);
  border-radius: var(--radius-sm);
  color: #5e2b12;
  background: #fff4ec;
  font-weight: 800;
  line-height: 1.4;
}

.restore-banner[hidden] {
  display: none;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1360px;
  margin: 0 auto 16px;
}

.sample-path-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1360px;
  margin: 0 auto 16px;
  padding: 14px 16px;
  border: 1px solid rgba(23, 48, 58, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 34px rgba(23, 48, 58, 0.08);
  backdrop-filter: blur(12px);
}

.sample-path-card p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.sample-path-card.is-verified {
  border-color: rgba(217, 95, 33, 0.44);
  background: #fff8f3;
}

.sample-label {
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 800;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(360px, 5fr) minmax(460px, 7fr);
  gap: 18px;
  align-items: start;
  max-width: 1360px;
  margin: 0 auto;
}

.capture-panel,
.preview-panel {
  padding: 14px;
}

.capture-panel {
  display: grid;
  gap: 14px;
}

.form-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.72);
}

.form-card h3,
#executive-deliverable h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.2;
}

.field-grid,
.condition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #263a40;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid rgba(23, 48, 58, 0.22);
  border-radius: 12px;
  color: var(--ink);
  background: #fffefb;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(217, 95, 33, 0.35);
  outline-offset: 2px;
}

.validation-summary {
  padding: 12px 14px;
  border: 1px solid rgba(217, 95, 33, 0.48);
  border-radius: var(--radius-sm);
  color: #5e2b12;
  background: #fff4ec;
  font-weight: 800;
  line-height: 1.4;
}

.validation-summary[hidden],
.field-error[hidden] {
  display: none;
}

[data-required-field].has-error input {
  border-color: var(--accent);
  background: #fff8f3;
  box-shadow: 0 0 0 3px rgba(217, 95, 33, 0.13);
}

.field-error {
  color: #8d3510;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.service-list,
.lid-rows {
  display: grid;
  gap: 10px;
}

.service-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 74px auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffefb;
}

.service-item.is-selected {
  border-color: rgba(217, 95, 33, 0.46);
  background: #fff8f3;
}

.service-item input[type="number"] {
  min-height: 38px;
  padding: 8px;
}

.running-total {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
}

.lid-row {
  display: grid;
  grid-template-columns: 0.65fr 0.7fr 0.75fr 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffefb;
}

.lid-row label:last-child {
  grid-column: 1 / -1;
}

.toggle-line,
.file-field {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffefb;
}

.toggle-line {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.preview-panel {
  position: sticky;
  top: 78px;
}

.preview-toolbar {
  margin-bottom: 12px;
  color: var(--primary);
  font-weight: 800;
}

.deliverable-wrapper {
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

#executive-deliverable {
  display: grid;
  gap: 18px;
  min-height: 680px;
  padding: clamp(18px, 3vw, 30px);
  color: var(--ink);
  background: #ffffff;
}

.deliverable-letterhead {
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--primary);
}

.deliverable-letterhead h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.deliverable-logo {
  max-width: 120px;
  max-height: 54px;
  object-fit: contain;
  margin-bottom: 8px;
}

.doc-meta {
  display: grid;
  gap: 5px;
  justify-items: end;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.meta-date,
.meta-time {
  white-space: nowrap;
}

.empty-copy,
.route-summary,
.summary-notes {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--field-paper);
  line-height: 1.55;
}

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

.summary-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.summary-grid div:last-child {
  grid-column: 1 / -1;
  background: var(--field-paper);
}

dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 5px 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.summary-list {
  display: grid;
  gap: 9px;
  padding-left: 0;
  margin: 10px 0 0;
  list-style: none;
}

.summary-list.numbered {
  padding-left: 22px;
  list-style: decimal;
}

.summary-list li,
.flag-list span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffefb;
  line-height: 1.5;
}

.service-summary-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

.flag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.free-watermark {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.pro-active .free-watermark {
  display: none;
}

.pro-only {
  display: none;
}

.pro-active .pro-only {
  display: grid;
  gap: 10px;
}

.signature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.signature-grid span {
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 33, 38, 0.46);
}

.modal[hidden] {
  display: none;
}

.modal-card {
  width: min(460px, 100%);
  padding: 22px;
  background: #fffefb;
}

.returning-user .marketing-layer,
.returning-user .site-header {
  display: none;
}

.returning-user .smart-fold-bar {
  display: flex;
}

.returning-user .workspace {
  padding-top: 18px;
}

@media (max-width: 980px) {
  .marketing-layer,
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
  }

  .capture-panel,
  .preview-panel,
  .form-card,
  .field-grid {
    min-width: 0;
    max-width: 100%;
  }

  .preview-panel {
    position: static;
  }

  .mobile-jump {
    display: inline-flex;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding-inline: 14px;
    flex-wrap: wrap;
  }

  select,
  input,
  textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .site-header nav {
    display: none;
  }

  .marketing-layer {
    padding-top: 28px;
  }

  h1 {
    font-size: 2.5rem;
  }

  .workspace {
    padding-inline: 10px;
  }

  .workspace-head,
  .sample-path-card,
  .preview-toolbar,
  .deliverable-letterhead {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-grid {
    gap: 12px;
  }

  .field-grid,
  .condition-grid,
  .summary-grid,
  .signature-grid {
    grid-template-columns: 1fr;
  }

  .service-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .service-item input[type="number"],
  .service-item strong {
    grid-column: 2;
  }

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

  .service-summary-line {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    margin: 10mm;
    size: auto;
  }
  .lid-card, .summary-grid, .service-table, .report-section, .repeat-row, .form-card, [data-deliverable="sheet"], #executive-deliverable {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  body,
  main,
  .page-shell,
  .workspace,
  .deliverable-wrapper {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  form,
  nav,
  header,
  footer,
  button,
  [data-layer="marketing"],
  .smart-fold-bar,
  .mobile-jump,
  .workspace-head,
  .preset-row,
  .sample-path-card,
  .preview-toolbar,
  [data-action="print-deliverable"],
  .capture-panel,
  .modal {
    display: none !important;
  }

  .workspace-grid,
  .preview-panel,
  [data-deliverable="sheet"],
  #executive-deliverable {
    display: block !important;
    width: 100% !important;
    min-height: auto !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  #executive-deliverable {
    padding: 0.35in !important;
  }
}
