* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
}

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

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

.site-header,
.smart-fold-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(22, 53, 74, 0.94);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.smart-fold-bar {
  display: none;
  min-height: 44px;
  padding-block: 6px;
}

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

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

.wordmark,
.site-header .wordmark,
.smart-fold-bar .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 850;
  letter-spacing: 0;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header nav a:not(.btn):not(.btn-primary):not(.jump-tool-btn):not(.pro-link),
.smart-fold-bar a:not(.btn):not(.btn-primary):not(.jump-tool-btn):not(.pro-link) {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.btn-primary,
.jump-tool-btn,
header .btn-primary,
header .jump-tool-btn,
nav .btn-primary,
nav .jump-tool-btn,
.smart-fold-bar .btn-primary,
.smart-fold-bar .jump-tool-btn,
[data-jump-tool],
.hero .btn-primary,
.site-header .jump-tool-btn,
a.jump-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  height: auto;
  max-height: none;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary) !important;
  color: var(--on-primary, #ffffff) !important;
  font-weight: 800 !important;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(20, 125, 120, 0.2);
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

@media (max-width: 720px) {
  .site-header .jump-tool-btn,
  .smart-fold-bar .jump-tool-btn,
  header .jump-tool-btn,
  nav .jump-tool-btn,
  a.jump-tool-btn,
  [data-jump-tool],
  .hero .btn-primary,
  .hero a.btn-primary {
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    max-height: none;
    padding-block: 0;
    line-height: 1.2;
  }
}

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

.btn-primary:hover,
.jump-tool-btn:hover,
[data-jump-tool]:hover {
  background: var(--primary-strong) !important;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.btn-secondary:hover {
  border-color: rgba(20, 125, 120, 0.38);
  background: #ffffff;
}

.danger-action {
  border-color: rgba(181, 69, 69, 0.28);
  color: var(--danger);
}

.danger-action:hover {
  border-color: rgba(181, 69, 69, 0.5);
  background: rgba(181, 69, 69, 0.08);
}

.mobile-only {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 44px);
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: clamp(36px, 7vw, 82px) clamp(18px, 5vw, 72px) clamp(24px, 5vw, 56px);
}

.hero-copy {
  grid-column: span 7;
}

.hero-card {
  grid-column: span 5;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-heading);
  letter-spacing: 0;
  line-height: 1.16;
}

h1 {
  max-width: 780px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.02em;
  line-height: 1.17;
  text-wrap: balance;
}

.hero-subhead {
  max-width: 690px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.55vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.proof-card,
.pricing-card,
.intake-card,
.deliverable-wrapper,
.workspace-header {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.proof-card {
  max-width: 690px;
  margin-top: 28px;
  padding: 18px;
}

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

.proof-item {
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(20, 125, 120, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.proof-label,
.field-note,
.mini-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.proof-item strong {
  display: block;
  margin-top: 6px;
  font-size: 0.93rem;
}

.pricing-card {
  padding: 24px;
}

.pricing-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #6f4612;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.billing-toggle,
.segment-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.toggle,
.segment {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.toggle[aria-pressed="true"],
.segment[aria-pressed="true"] {
  border-color: rgba(20, 125, 120, 0.42);
  background: var(--sage-soft);
  color: var(--primary-strong);
}

.price {
  margin: 22px 0 4px;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.pricing-card .btn-primary[aria-disabled="true"] {
  width: 100%;
  margin-top: 18px;
  opacity: 0.68;
  cursor: not-allowed;
}

.reassurance {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.page-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px);
}

.workspace-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 20px;
}

.workspace-header .wordmark {
  color: var(--ink);
}

#workspace-title {
  margin-top: 10px;
  font-size: clamp(1.65rem, 2.7vw, 2.5rem);
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.storage-disclosure {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.progress {
  min-width: 160px;
  text-align: right;
}

.progress-meter {
  overflow: hidden;
  height: 10px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--mist);
}

.progress-fill {
  display: block;
  width: 12%;
  height: 100%;
  border-radius: inherit;
  background: var(--sage-strong);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.chip {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(20, 125, 120, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--primary-strong);
  font-weight: 850;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(360px, 5fr);
  gap: 20px;
  align-items: start;
}

.intake-card,
.deliverable-wrapper {
  padding: 20px;
}

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

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

fieldset:last-of-type {
  border-bottom: 0;
}

legend {
  margin-bottom: 12px;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 900;
}

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

.visit-meta {
  margin-top: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

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

label,
.label {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(22, 53, 74, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(20, 125, 120, 0.72);
  box-shadow: 0 0 0 4px rgba(20, 125, 120, 0.1);
}

.row-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.dynamic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.dynamic-row button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--danger);
  font-weight: 900;
  cursor: pointer;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.deliverable-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.deliverable-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.copy-status {
  flex-basis: 100%;
  min-height: 20px;
  color: var(--sage-strong);
  font-size: 0.82rem;
  font-weight: 850;
}

.copy-status[data-status="warning"] {
  color: var(--amber);
}

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

.deliverable-sheet {
  min-height: 560px;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid rgba(22, 53, 74, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.deliverable-sheet h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
  letter-spacing: -0.018em;
  line-height: 1.18;
}

.empty-state {
  display: grid;
  min-height: 430px;
  place-items: center;
  padding: 28px;
  border: 1px dashed rgba(20, 125, 120, 0.28);
  border-radius: 8px;
  background: rgba(220, 237, 230, 0.36);
  color: var(--muted);
  text-align: center;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.doc-meta span {
  white-space: nowrap;
}

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

.summary-item {
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sage-soft);
}

.summary-item span {
  display: block;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-item strong {
  display: block;
  margin-top: 6px;
}

.notes-block {
  margin-top: 18px;
  padding: 16px;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: rgba(220, 237, 230, 0.42);
  white-space: pre-wrap;
}

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

.note-list li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.generated-section {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.draft-summary-editor,
.editable-text {
  outline: none;
}

.draft-summary-editor {
  min-height: 136px;
  padding: 16px;
  border: 1px solid rgba(20, 125, 120, 0.26);
  border-radius: 8px;
  background: rgba(220, 237, 230, 0.42);
  white-space: pre-wrap;
}

.draft-summary-editor:focus,
.editable-text:focus {
  box-shadow: 0 0 0 4px rgba(20, 125, 120, 0.1);
}

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

.editable-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--primary);
}

.flag-label {
  min-width: 48px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.flag-warning .flag-label {
  background: var(--amber);
}

.flag-clear .flag-label {
  background: var(--sage-strong);
}

.editable-text {
  min-height: 24px;
  padding: 2px 4px;
  border-radius: 6px;
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.signature-box {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(22, 53, 74, 0.38);
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-panel {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 22px;
  box-shadow: var(--shadow);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 900px) {
  .mobile-only {
    display: inline-flex;
  }

  .site-header nav a:not(.jump-tool-btn) {
    display: none;
  }

  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  .hero-copy,
  .hero-card {
    grid-column: auto;
  }

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

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

  .progress {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .site-header,
  .smart-fold-bar {
    padding-inline: 14px;
  }

  .wordmark span:last-child {
    max-width: 180px;
    line-height: 1.1;
  }

  .page-shell {
    padding-inline: 14px;
  }

  .hero-actions,
  .form-actions,
  .deliverable-toolbar,
  .deliverable-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .jump-tool-btn,
  [data-jump-tool] {
    width: 100%;
  }

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

@page {
  margin: 10mm;
}

@media print {
  body,
  main,
  .page-shell,
  .workspace,
  .deliverable-wrapper {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  table,
  tr,
  td,
  th,
  section,
  article,
  .deliverable-sheet,
  .deliverable-section,
  .doc-meta {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  form,
  nav,
  header,
  footer,
  button,
  [data-layer="marketing"],
  .site-header,
  .smart-fold-bar,
  .workspace-header,
  .intake-card,
  .preset-row,
  .deliverable-toolbar,
  .copy-status,
  [data-action="print-deliverable"] {
    display: none !important;
  }

  [data-deliverable="sheet"],
  #executive-deliverable {
    display: block !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}
