* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(246, 242, 234, 0.82)),
    repeating-linear-gradient(90deg, rgba(32, 38, 34, 0.035) 0, rgba(32, 38, 34, 0.035) 1px, transparent 1px, transparent 64px),
    var(--paper);
  font-family: var(--font-ui);
  line-height: 1.5;
}

body[data-app-state="loading"] .page-shell {
  opacity: 0.55;
}

body[data-app-state="loaded"] .loading-state,
body[data-app-state="error"] .loading-state {
  display: none;
}

a {
  color: inherit;
}

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

button,
.btn-primary,
.btn-secondary,
.jump-tool-btn {
  min-height: 44px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

button:active,
.btn-primary:active,
.btn-secondary:active,
.jump-tool-btn:active {
  transform: translateY(1px) scale(0.99);
}

.site-header,
.mobile-jump,
.smart-fold-bar {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(246, 242, 234, 0.88);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-header nav a:not(.btn-primary) {
  text-decoration: none;
}

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

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0;
}

.wordmark-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.storage-note {
  color: var(--muted);
}

.btn-primary,
.btn-secondary,
.pricing-action,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  max-height: 50px;
  padding: 0 18px;
  border: 0;
  text-decoration: none;
  font-weight: 800;
}

.btn-primary {
  color: var(--on-primary);
  background: var(--primary);
  box-shadow: 0 12px 28px rgba(201, 87, 35, 0.22);
}

.btn-secondary {
  color: var(--ink);
  background: rgba(255, 250, 241, 0.86);
  border: 1px solid var(--line);
}

.text-button {
  height: 40px;
  color: var(--info);
  background: transparent;
  border: 1px solid rgba(34, 124, 145, 0.26);
  border-radius: 999px;
}

[data-layer="marketing"] {
  min-height: calc(100vh - 64px);
  padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px) 42px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
}

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

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

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

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.18;
}

.hero-copy .subhead {
  max-width: 680px;
  margin: 22px 0 0;
  color: #4a514c;
  font-size: clamp(1.04rem, 1.6vw, 1.32rem);
}

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

.hero-support {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-panel {
  grid-column: span 5;
  display: grid;
  gap: 18px;
}

.proof-card,
.pricing-card,
.workspace-card,
.deliverable-wrapper {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

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

.proof-head h2,
.pricing-card h2 {
  margin: 0;
  font-size: 1.34rem;
  line-height: 1.18;
}

.packet-id,
.metric-value,
.priority-badge,
.meta-date,
.meta-time,
.price,
.evidence-progress {
  font-variant-numeric: tabular-nums;
}

.packet-id {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.metric {
  padding: 12px;
  border: 1px solid rgba(32, 38, 34, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 900;
}

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

.proof-list li,
.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  color: var(--ink);
  background: var(--info-soft);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.tag.warn {
  color: #6d330b;
  background: #f5ddc5;
}

.tag.ok {
  color: #1f5039;
  background: var(--complete-soft);
}

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

.billing-toggle,
.segmented,
.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.billing-toggle button,
.segmented button,
[data-preset-chip] {
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.billing-toggle button[aria-pressed="true"],
.segmented button[aria-pressed="true"],
[data-preset-chip][aria-pressed="true"] {
  color: #fff;
  background: var(--info);
  border-color: var(--info);
}

.price {
  margin: 18px 0 8px;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 900;
}

.pricing-action {
  width: 100%;
  margin-top: 14px;
  color: var(--muted);
  background: rgba(32, 38, 34, 0.08);
  border: 1px dashed var(--line);
}

.smart-fold-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 242, 234, 0.94);
}

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

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

.mobile-jump {
  display: none;
  position: sticky;
  top: 0;
  z-index: 31;
  min-height: 52px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 242, 234, 0.94);
}

.page-shell {
  padding: 26px clamp(16px, 3.4vw, 38px) 54px;
}

.workspace {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  max-width: 1360px;
  margin: 0 auto;
}

.workspace-top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.62);
  backdrop-filter: blur(12px);
}

#workspace-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  line-height: 1.18;
}

.workspace-actions,
.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.workspace-card {
  padding: 16px;
}

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

.checklist-card {
  grid-column: span 4;
}

.deliverable-wrapper {
  grid-column: span 3;
  align-self: start;
  position: sticky;
  top: 62px;
  padding: 12px;
  background: rgba(255, 250, 241, 0.9);
}

.workspace-card h2 {
  margin: 0 0 12px;
  font-size: 1.16rem;
  line-height: 1.18;
}

.form-grid {
  display: grid;
  gap: 12px;
}

label,
.field-label {
  display: grid;
  gap: 6px;
  color: #37413b;
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(32, 38, 34, 0.18);
  border-radius: 8px;
}

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

.areas-list {
  display: grid;
  gap: 10px;
}

.area-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(100px, 0.8fr) minmax(110px, 0.8fr);
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(32, 38, 34, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.4);
}

.file-input {
  border-style: dashed;
}

.checklist {
  display: grid;
  gap: 8px;
}

.check-item span:first-child {
  font-weight: 750;
}

.generated-output {
  margin: 12px 0;
}

.triage-result-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(34, 124, 145, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.triage-result-card h3,
.triage-result-card h4 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
}

.triage-fields {
  display: grid;
  gap: 10px;
  margin: 0;
}

.triage-fields div {
  display: grid;
  gap: 5px;
}

.triage-fields dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.triage-fields dd {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
}

.triage-result-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.triage-result-card li {
  color: #37413b;
}

#copy-ready-update {
  min-height: 112px;
  color: var(--ink);
  background: rgba(246, 242, 234, 0.74);
}

.empty-state,
.loading-state,
.error-state,
.intake-status,
.photo-status {
  padding: 12px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.preview-note {
  padding: 12px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-weight: 500;
  line-height: 1.5;
}

.intake-status,
.photo-status {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 750;
}

.intake-status.is-complete {
  color: #1f5039;
  background: var(--complete-soft);
  border-color: rgba(60, 110, 85, 0.28);
}

#executive-deliverable {
  padding: 18px;
  color: #1f2722;
  background: #fffdf8;
  border: 1px solid rgba(32, 38, 34, 0.16);
  border-radius: 6px;
}

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

.deliverable-logo {
  display: none;
  max-width: 72px;
  max-height: 40px;
}

.deliverable-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.18;
  font-weight: 900;
}


.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

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

.priority-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 5px 10px;
  color: #fff;
  background: var(--primary-dark);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
}

.deliverable-section {
  margin-top: 14px;
}

.deliverable-section h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  line-height: 1.2;
}

.deliverable-section p,
.deliverable-section ul {
  margin: 0;
}

.deliverable-section ul {
  padding-left: 18px;
}

.callout {
  padding: 10px;
  border-left: 4px solid var(--info);
  background: var(--info-soft);
  border-radius: 6px;
}

.free-watermark {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(32, 38, 34, 0.14);
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

dialog {
  width: min(680px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(32, 38, 34, 0.36);
}

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

@media (max-width: 940px) {
  .site-header nav .storage-note {
    display: none;
  }

  .hero-copy,
  .hero-panel,
  .intake-card,
  .checklist-card,
  .deliverable-wrapper {
    grid-column: 1 / -1;
  }

  .deliverable-wrapper {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    display: none;
  }

  .mobile-jump {
    display: flex;
    justify-content: space-between;
  }

  [data-layer="marketing"] {
    padding-top: 22px;
  }

  .hero-grid,
  .workspace {
    gap: 14px;
  }

  .metric-strip,
  .area-row {
    grid-template-columns: 1fr;
  }

  .workspace-top {
    align-items: stretch;
    flex-direction: column;
  }
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.photo-thumb {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
}

@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;
  }

  article,
  section,
  .metric-strip,
  .damage-row,
  .photo-grid,
  .evidence-card {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  form,
  nav,
  header,
  footer,
  button,
  [data-layer="marketing"],
  .smart-fold-bar,
  .mobile-jump,
  .workspace-top,
  .intake-card,
  .checklist-card,
  [data-action="print-deliverable"],
  .workspace-actions {
    display: none !important;
  }

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