*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  font-family: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

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

.site-header,
.smart-fold-bar,
.mobile-sticky-action {
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(251, 246, 238, 0.84);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  justify-content: space-between;
}

.site-header {
  min-height: 72px;
  padding: 14px clamp(18px, 5vw, 64px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header nav,
.smart-fold-bar nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 12px;
}

.site-header nav a,
.smart-fold-bar nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.wordmark {
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

header .jump-tool-btn.btn-primary,
header [data-jump-tool].jump-tool-btn.btn-primary,
nav .jump-tool-btn.btn-primary,
.site-header nav a.jump-tool-btn.btn-primary,
.smart-fold-bar nav a.jump-tool-btn.btn-primary,
.mobile-sticky-action a.jump-tool-btn.btn-primary {
  background: var(--primary) !important;
  color: var(--on-primary, #ffffff) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  min-height: 40px;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
}

.btn-primary,
.btn-secondary,
.chip,
.status-pill {
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  min-height: 42px;
  height: auto;
  justify-content: center;
  line-height: 1.25;
  padding: 10px 20px;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
  white-space: nowrap;
}

.chip,
.status-pill {
  min-height: 38px;
  padding: 8px 18px;
  font-size: 0.88rem;
}

.btn-primary {
  background: var(--primary);
  box-shadow: 0 10px 20px rgba(194, 65, 12, 0.18);
  color: var(--on-primary);
}

.btn-secondary,
.chip,
.status-pill {
  background: rgba(255, 255, 255, 0.74);
  border-color: var(--line);
  color: var(--ink);
}

.btn-primary:active,
.btn-secondary:active,
.chip:active,
.status-pill:active {
  transform: translateY(2px) scale(0.99);
}

.mobile-sticky-action,
.smart-fold-bar {
  display: none;
}

.mobile-sticky-action {
  bottom: 0;
  left: 0;
  padding: 10px 16px;
  position: fixed;
  right: 0;
  z-index: 30;
}

.smart-fold-bar {
  align-items: center;
  left: 0;
  min-height: 56px;
  padding: 8px clamp(18px, 5vw, 64px);
  position: sticky;
  top: 0;
  z-index: 25;
}

body.returning .site-header,
body.returning [data-layer="marketing"] {
  display: none;
}

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

.hero {
  display: block;
  min-height: auto;
  padding: 20px clamp(18px, 5vw, 64px) 16px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 820px;
}

.eyebrow,
.section-label {
  color: var(--primary-strong);
  font-size: 0.77rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.2;
  max-width: 780px;
}

h2 {
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  line-height: 1.22;
  max-width: 780px;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.2;
}

.hero p,
.workspace-intro,
.muted {
  color: var(--muted);
  line-height: 1.6;
}

.hero p {
  font-size: 1rem;
  margin: 6px 0 14px;
  max-width: 680px;
}

.hero-actions,
.pricing-toggle,
.preset-row,
.filter-row,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-row {
  margin-bottom: 20px;
}

.form-actions {
  margin-top: 16px;
  margin-bottom: 16px;
}

.form-validation-cue {
  background: #fef2f2;
  border: 1px solid #ef4444;
  border-radius: var(--radius-sm);
  color: #991b1b;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 18px;
  padding: 12px 16px;
}

.form-validation-cue ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.form-validation-cue li {
  margin-bottom: 4px;
}

input.is-invalid,
textarea.is-invalid {
  border-color: #ef4444 !important;
  background: #fff5f5 !important;
  outline: 2px solid rgba(239, 68, 68, 0.25);
}

.hero-panel,
.pricing-card,
.glass-panel,
.inbox-card,
.deliverable-wrapper {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-panel,
.pricing-card {
  padding: 20px;
}

.proof-status {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.status-badge {
  background: var(--pending-soft);
  border-radius: 999px;
  color: var(--pending);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 8px 10px;
}

.status-badge.approved,
.status-pill.active[data-status="Approved"],
.record-state.approved {
  background: var(--approved-soft);
  color: var(--approved);
}

.job-summary {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
}

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

.metric {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
}

.metric strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.45rem;
}

.price {
  align-items: baseline;
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.price strong {
  font-family: var(--font-heading);
  font-size: 2.4rem;
}

.discount-badge {
  background: #1f2937;
  border-radius: 999px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 7px 9px;
}

.pricing-toggle button[aria-pressed="true"],
.status-pill.active {
  background: var(--ink);
  color: #fff;
}

.pricing-card [data-checkout="pro"] {
  display: inline-flex;
  margin-top: 16px;
  margin-bottom: 12px;
}

.page-shell.workspace {
  padding: clamp(18px, 3vw, 36px) clamp(14px, 4vw, 54px) 64px;
}

[data-layer="utility"] {
  scroll-margin-top: 12px;
}

.app-shell {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 0.98fr) minmax(420px, 1.02fr);
  min-width: 0;
}

.workspace-left,
.workspace-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.glass-panel,
.inbox-card,
.deliverable-wrapper {
  padding: 18px;
}

#workspace-title {
  font-size: clamp(1.4rem, 2.2vw, 2.2rem);
  line-height: 1.2;
}

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

label {
  color: var(--muted);
  display: grid;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 6px;
}

input,
textarea {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(36, 33, 31, 0.18);
  border-radius: var(--radius-sm);
  color: var(--ink);
  min-height: 42px;
  padding: 10px 11px;
  width: 100%;
}

textarea {
  min-height: 76px;
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
  margin-bottom: 12px;
}

.repair-lines {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.line-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(200px, 1fr) minmax(180px, 200px) auto;
}

.line-row input[name="linePrice"] {
  min-width: 180px;
}

.checkbox-label {
  align-items: center;
  display: flex;
  gap: 8px;
}

.checkbox-label input {
  min-height: auto;
  width: auto;
}

.inbox-item {
  align-items: start;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  grid-template-columns: 118px 1fr;
  padding: 12px 0;
}

.deliverable-wrapper {
  position: static;
}

#executive-deliverable {
  background: var(--surface-strong);
  border: 1px solid rgba(36, 33, 31, 0.2);
  border-radius: var(--radius-md);
  color: #1f1a17;
  padding: 24px;
}

.deliverable-header {
  align-items: start;
  border-bottom: 2px solid var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
}

.deliverable-logo {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  height: 58px;
  justify-content: center;
  overflow: hidden;
  width: 112px;
}

.deliverable-logo img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.meta-line,
.record-state {
  white-space: nowrap;
}

.free-watermark {
  white-space: normal;
  text-wrap: wrap;
}

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

.deliverable-section {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

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

.detail-grid span,
.repair-table span,
.deliverable-section .section-label {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.repair-table {
  display: grid;
  gap: 8px;
}

.repair-table .repair-row {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 90px 112px;
}

.summary-callout {
  background: #fff7ed;
  border: 1px solid rgba(194, 65, 12, 0.24);
  border-radius: var(--radius-sm);
  color: #1e293b;
  font-weight: 500;
  line-height: 1.55;
  padding: 12px;
}

.live-status-cue {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 8px;
  font-style: italic;
}

.free-watermark {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 14px;
  text-align: center;
}

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

.pro-only {
  opacity: 0.55;
}

body.pro-active .pro-only {
  opacity: 1;
}

.upgrade-modal {
  background: rgba(36, 33, 31, 0.42);
  display: none;
  inset: 0;
  padding: 20px;
  place-items: center;
  position: fixed;
  z-index: 60;
}

.upgrade-modal.open {
  display: grid;
}

.upgrade-card {
  background: #fffaf3;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  max-width: 460px;
  padding: 22px;
}

@media (max-width: 880px) {
  .site-header nav a:not(.jump-tool-btn) {
    display: none;
  }

  .mobile-sticky-action {
    display: flex;
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric-grid,
  .composer-grid,
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .line-row,
  .repair-table .repair-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .deliverable-wrapper {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header,
  .smart-fold-bar {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .site-header .header-submit-btn,
  .smart-fold-bar .header-submit-btn {
    display: none !important;
  }

  .mobile-sticky-action a.jump-tool-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 0.95rem;
  }

  .wordmark {
    font-size: 0.95rem;
    word-break: break-word;
  }

  .deliverable-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .deliverable-wrapper,
  .glass-panel,
  .inbox-card {
    padding: 14px;
    max-width: 100%;
  }

  #executive-deliverable {
    padding: 16px;
    max-width: 100%;
  }

  .meta-line {
    white-space: normal;
    text-wrap: wrap;
  }

  .free-watermark {
    white-space: normal;
    text-wrap: wrap;
  }
}

@media print {
  @page {
    margin: 12mm;
  }

  body,
  main,
  .page-shell,
  .workspace,
  .deliverable-wrapper {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  form,
  nav,
  header,
  footer,
  button,
  [data-layer="marketing"],
  [data-action="print-deliverable"],
  [data-action="copy-summary"],
  .no-print,
  .workspace-left,
  .mobile-sticky-action,
  .smart-fold-bar,
  .upgrade-modal,
  .pricing-card,
  .hero-panel,
  #proof,
  #pricing,
  #inbox,
  .inbox-card,
  .deliverable-disclosure {
    display: none !important;
  }

  .app-shell,
  .workspace-right {
    display: block !important;
  }

  #executive-deliverable {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: auto;
  }

  .deliverable-section,
  .proof-status,
  .callout,
  .summary-callout,
  .repair-row,
  article,
  .detail-grid {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* 2026-10-09 class fix: returning visitors always keep a checkout path. The
   marketing-layer collapse hid the only upgrade CTA; this chip lives outside
   that layer and appears only once .returning is set on <body>. */
.returning-checkout-chip { display: none; }
.returning .returning-checkout-chip {
  display: inline-flex; align-items: center;
  position: fixed; bottom: 18px; right: 18px; z-index: 60;
  padding: 10px 16px; border-radius: 9999px;
  background: var(--primary, #007f7a); color: #ffffff !important;
  font-weight: 700; font-size: 0.9rem; text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
