* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(135deg, rgba(197, 84, 26, 0.08), transparent 34%),
    linear-gradient(225deg, rgba(52, 107, 79, 0.1), transparent 30%),
    var(--ground);
  color: var(--ink);
  font-family: var(--font-ui);
  margin: 0;
  min-width: 0;
}

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

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

a {
  color: inherit;
}

.site-header,
.smart-fold-bar {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(255, 253, 248, 0.84);
  border-bottom: 1px solid rgba(217, 209, 196, 0.82);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  left: 0;
  max-width: 100%;
  padding: 12px clamp(16px, 4vw, 44px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 20;
}

.smart-fold-bar {
  min-height: 44px;
  padding-bottom: 6px;
  padding-top: 6px;
}

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

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

.wordmark {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-header nav,
.toolbar,
.doc-meta,
.hero-actions,
.form-actions,
.deliverable-actions,
.pricing-top {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
}

.site-header nav a {
  color: var(--muted);
}

.site-header .pro-link,
.smart-fold-bar .pro-link {
  background: var(--primary, #9f3f13);
  color: var(--on-primary, #ffffff);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(159, 63, 19, 0.2);
  transition: opacity 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
}
.site-header .pro-link:hover,
.smart-fold-bar .pro-link:hover {
  opacity: 0.92;
  text-decoration: none;
  transform: translateY(-1px);
}

.smart-fold-bar span {
  color: var(--muted);
  font-size: 0.86rem;
}

.page-shell {
  display: block;
  margin: 0 auto;
  max-width: 1500px;
  min-width: 0;
  padding: clamp(16px, 3vw, 38px);
  width: 100%;
}

main {
  display: block;
  min-width: 0;
}

.marketing {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.72fr) minmax(260px, 0.58fr);
  min-width: 0;
  padding: clamp(24px, 5vw, 72px) 0 clamp(22px, 4vw, 50px);
}

.hero-copy,
.proof-card,
.pricing-card,
.intake-card,
.result-card,
.deliverable-wrapper,
.modal-panel {
  backdrop-filter: blur(12px);
  background: var(--paper-soft);
  border: 1px solid rgba(217, 209, 196, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 20px 0;
}

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

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

h1 {
  font-size: clamp(2.2rem, 3.8vw, 3.4rem);
  max-width: 780px;
}

.hero-subhead {
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.26rem);
  line-height: 1.55;
  max-width: 720px;
}

.btn-primary,
.jump-tool-btn,
[data-jump-tool] {
  background: var(--primary) !important;
  color: var(--on-primary, #ffffff) !important;
}

.btn-primary,
.btn-secondary,
.jump-tool-btn,
.preset-chip,
.proof-row {
  align-items: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 0 18px;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  white-space: nowrap;
}

.btn-primary,
.jump-tool-btn {
  box-shadow: 0 12px 22px rgba(197, 84, 26, 0.24);
}

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

.btn-secondary,
.preset-chip,
.proof-row {
  background: #fffaf0;
  border: 1px solid var(--line);
  color: var(--ink);
}

.proof-card,
.pricing-card,
.intake-card,
.result-card,
.deliverable-wrapper {
  min-width: 0;
  padding: 18px;
}

.pricing-card {
  align-self: start;
}

.proof-header,
.workspace-heading,
.deliverable-letterhead {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  max-width: 100%;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  padding: 6px 10px;
}

.status-pill.warning,
.severity-safety {
  background: var(--urgent-soft);
  color: var(--urgent);
}

.status-pill.complete,
.severity-repair {
  background: var(--complete-soft);
  color: var(--complete);
}

.severity-monitor {
  background: var(--monitor-soft);
  color: var(--monitor);
}

.proof-row {
  border-radius: var(--radius);
  gap: 12px;
  justify-content: space-between;
  margin-top: 10px;
  min-height: 54px;
  padding: 10px 12px;
  text-align: left;
  white-space: normal;
  width: 100%;
}

.proof-row b {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0.72rem;
  padding: 5px 8px;
}

.mini-report {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  margin-top: 14px;
  padding: 14px;
}

.mini-report span,
.severity-banner {
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  padding: 6px 10px;
}

.mini-report p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.segmented {
  background: #efe6d9;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
}

.segmented label {
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.segmented input[type="radio"] {
  opacity: 0;
  position: absolute;
}

.segmented span {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 800;
  min-height: 34px;
  padding: 8px 12px;
}

.segmented input:checked + span {
  background: var(--ink);
  color: #fff;
}

.price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin: 16px 0;
}

.price small {
  color: var(--muted);
  display: block;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  margin-top: 4px;
}

.checkout-link {
  width: 100%;
}

.workspace {
  backdrop-filter: blur(12px);
  background: rgba(255, 253, 248, 0.54);
  border: 1px solid rgba(217, 209, 196, 0.78);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
  min-width: 0;
  padding: clamp(14px, 2vw, 24px);
}

.workspace-heading {
  margin-bottom: 16px;
}

#workspace-title {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.workspace-empty {
  color: var(--muted);
  margin: 8px 0 0;
}

.workspace-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 0.85fr) minmax(260px, 0.65fr) minmax(360px, 1.2fr);
  min-width: 0;
}

.intake-card,
.result-card,
.deliverable-wrapper {
  align-self: start;
  height: fit-content;
}

.presets,
.two-col {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
  min-width: 0;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preset-chip {
  border-radius: var(--radius);
  height: auto;
  min-height: 44px;
  padding: 9px 10px;
  white-space: normal;
}

.field-group {
  margin-bottom: 13px;
  min-width: 0;
}

label,
.label-text {
  color: var(--ink);
  display: block;
  font-size: 0.84rem;
  font-weight: 900;
  margin-bottom: 6px;
}

input,
textarea {
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  min-height: 44px;
  outline: none;
  padding: 10px 11px;
  width: 100%;
}

textarea {
  line-height: 1.45;
  min-height: 86px;
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  box-shadow: var(--focus);
  outline: none;
}

.field-error {
  color: var(--urgent);
  font-size: 0.83rem;
  font-weight: 800;
  margin: 6px 0 0;
  min-height: 1em;
}

.finding-row {
  background: rgba(255, 250, 240, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 12px;
}

.empty-panel {
  align-items: center;
  background: rgba(255, 250, 240, 0.8);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  display: flex;
  min-height: 160px;
  padding: 16px;
}

.result-output {
  display: grid;
  gap: 12px;
}

.note-action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
}

.copy-status {
  color: var(--complete);
  font-size: 0.84rem;
  font-weight: 900;
  min-height: 1.2em;
}

.result-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.result-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.result-output h3 {
  font-size: 1.28rem;
}

.result-output p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

#report-note {
  background: #fffdf8;
  cursor: text;
  min-height: 210px;
  user-select: text;
}

[data-action="copy-report-note"][data-copied="true"] {
  background: var(--complete) !important;
}

.deliverable-wrapper {
  background: rgba(255, 255, 255, 0.7);
}

[data-deliverable="sheet"] {
  margin-top: 12px;
  min-width: 0;
}

.deliverable-sheet {
  background: var(--paper);
  border: 1px solid #cabfac;
  border-radius: var(--radius);
  box-shadow: 0 16px 50px rgba(32, 35, 31, 0.12);
  color: #161813;
  padding: clamp(18px, 3vw, 32px);
}

.deliverable-logo {
  align-items: center;
  background: var(--ink);
  border-radius: var(--radius);
  color: #fff;
  display: inline-flex;
  font-family: var(--font-display);
  font-weight: 900;
  height: 42px;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
  width: 56px;
}

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

.deliverable-letterhead h2 {
  font-size: 1.45rem;
}

.deliverable-letterhead p {
  color: var(--muted);
  margin: 4px 0 0;
}

.doc-meta {
  color: var(--muted);
  font-size: 0.8rem;
  justify-content: flex-end;
  text-align: right;
}

.meta-date,
.meta-time,
#report-id {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.report-summary {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin: 18px 0;
  padding: 16px 0;
}

.report-summary p {
  line-height: 1.55;
  margin: 0 0 14px;
}

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

.metrics span {
  background: #f2ebdf;
  border-radius: var(--radius);
  font-size: 0.82rem;
  padding: 10px;
}

.metrics b {
  display: block;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.table-responsive {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  table-layout: auto;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
  overflow-wrap: break-word;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
  word-break: normal;
}

th:nth-child(1),
td:nth-child(1) {
  width: 16%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 16%;
}

th:nth-child(3),
td:nth-child(3) {
  width: 34%;
}

th:nth-child(4),
td:nth-child(4) {
  width: 34%;
}

th {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.report-note-block {
  background: #f7f1e7;
  border-radius: var(--radius);
  margin-top: 16px;
  padding: 14px;
}

.report-note-block h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.report-note-block p {
  line-height: 1.55;
  margin: 0;
}

footer {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 18px;
}

.free-watermark {
  color: var(--primary-press);
  font-weight: 900;
  line-height: 1.35;
  white-space: normal;
}

.upgrade-modal {
  align-items: center;
  background: rgba(32, 35, 31, 0.52);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 40;
}

[hidden],
.upgrade-modal[hidden] {
  display: none !important;
}


.modal-panel {
  max-width: 440px;
  padding: 22px;
  width: 100%;
}

.modal-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.sample-mode #result-output {
  display: grid;
}

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

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

  .hero-copy {
    padding-top: 6px;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: center;
  }

  .site-header nav {
    justify-content: space-between;
    width: 100%;
  }

  .jump-tool-btn,
  [data-jump-tool] {
    flex: 1 1 150px;
  }

  .presets,
  .two-col,
  .metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .toolbar .btn-secondary,
  .form-actions .btn-primary,
  .form-actions .btn-secondary,
  .note-action-row .btn-primary,
  .note-action-row .btn-secondary {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 12px;
  }

  h1 {
    font-size: 2.25rem;
  }

  .btn-primary,
  .btn-secondary,
  .jump-tool-btn,
  [data-jump-tool],
  .preset-chip,
  .free-watermark {
    text-wrap: wrap;
    white-space: normal;
  }

  .doc-meta {
    justify-content: flex-start;
    text-align: left;
  }
}

@page {
  margin: 10mm;
  size: auto;
}

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

  header,
  nav,
  form,
  button,
  footer:not(.deliverable-sheet footer),
  [data-layer="marketing"],
  .workspace-heading,
  .result-card,
  .deliverable-actions,
  [data-action="print-deliverable"],
  [data-action="export-csv"],
  [data-action="copy-report-note"],
  .smart-fold-bar {
    display: none !important;
  }

  .workspace-grid {
    display: block !important;
  }

  .deliverable-sheet {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0.25in !important;
  }

  .finding-summary-card,
  .finding-card,
  .deliverable-section,
  .finding-row,
  .signature-grid,
  .evidence-card,
  tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
}
.site-header .jump-tool-btn,
.smart-fold-bar .jump-tool-btn,
.jump-tool-btn {
  align-items: center;
  box-sizing: border-box;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding-block: 10px;
  padding-inline: 14px;
}
