:root {
  --bg: #F6F4EE;
  --surface: #FFFFFF;
  --surface-soft: #FBF9F5;
  --border: #E4DFD4;
  --border-strong: #CFC7B8;
  --ink: #13221E;
  --ink-secondary: #4B5B55;
  --ink-muted: #6C7A75;
  --accent: #0F766E;
  --accent-hover: #0B5E58;
  --accent-soft: #E4F3F1;
  --gold: #D97706;
  --gold-soft: #FEF3C7;
  --danger: #B91C1C;
  --danger-soft: #FEE2E2;
  --success: #15803D;
  --success-soft: #DCFCE7;
  --shadow-sm: 0 1px 2px rgba(19, 34, 30, 0.05);
  --shadow-md: 0 10px 28px -8px rgba(19, 34, 30, 0.09);
  --radius: 14px;
  --radius-sm: 9px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 244, 238, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 0.35);
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.nav-tab:hover {
  background: rgba(19, 34, 30, 0.05);
  color: var(--ink);
}
.nav-tab.active {
  background: var(--ink);
  color: #FFFFFF;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hero Banner */
.hero {
  padding: 34px 0 22px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 3.4vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  color: var(--ink);
}

.hero p.lead {
  font-size: 1.02rem;
  color: var(--ink-secondary);
  margin: 0;
  max-width: 650px;
}

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

.metric-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.metric-chip strong {
  display: block;
  font-size: 1.05rem;
  color: var(--ink);
}
.metric-chip span {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

/* Sample Preset Strip */
.preset-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.preset-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-right: 4px;
}
.preset-btn {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* Workbench Panels */
.tool-panel { display: none; }
.tool-panel.active { display: block; animation: fadeIn 0.2s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 22px;
  align-items: start;
}

.split-layout > *,
.field-grid > *,
.pillar-grid > * {
  min-width: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.card-sticky {
  position: sticky;
  top: 84px;
}

.card-title {
  margin: 0 0 4px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-sub {
  margin: 0 0 18px;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

/* Form Elements */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}

.field label .hint {
  font-weight: 500;
  color: var(--ink-muted);
  font-size: 0.75rem;
}

input[type="text"],
input[type="url"],
input[type="number"],
input[type="email"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: #FFFFFF;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

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

.input-row {
  display: flex;
  gap: 8px;
}
.input-row input { flex: 1; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-dark {
  background: var(--ink);
  color: #FFFFFF;
}
.btn-dark:hover { background: #203630; }

.btn-outline {
  background: #FFFFFF;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--ink);
  background: var(--surface-soft);
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.79rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Segmented selectors */
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.option-card {
  border: 1.5px solid var(--border);
  background: var(--surface-soft);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.option-card strong {
  display: block;
  font-size: 0.84rem;
  color: var(--ink);
}
.option-card span {
  display: block;
  font-size: 0.74rem;
  color: var(--ink-muted);
}
.option-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Color Swatches */
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.swatch-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  border-radius: 999px;
  padding: 5px 11px 5px 7px;
  font-family: inherit;
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.swatch-btn.selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(19, 34, 30, 0.12);
}
.swatch-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Checkboxes & Toggle Cards */
.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  margin-bottom: 10px;
  cursor: pointer;
}
.toggle-row input[type="checkbox"] {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.toggle-row strong {
  display: block;
  font-size: 0.85rem;
}
.toggle-row small {
  display: block;
  font-size: 0.77rem;
  color: var(--ink-muted);
}

.toggle-highlight {
  border-color: rgba(15, 118, 110, 0.35);
  background: #F1FAF8;
}

/* Alerts & Badges */
.alert {
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.83rem;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.alert-ok {
  background: var(--success-soft);
  border-color: #BBF7D0;
  color: #14532D;
}
.alert-warn {
  background: var(--gold-soft);
  border-color: #FDE68A;
  color: #78350F;
}
.alert-danger {
  background: var(--danger-soft);
  border-color: #FECACA;
  color: #7F1D1D;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
}
.badge-critical { background: var(--danger-soft); color: var(--danger); }
.badge-high { background: #FFEDD5; color: #9A3412; }
.badge-medium { background: var(--gold-soft); color: #92400E; }
.badge-low { background: var(--accent-soft); color: var(--accent); }
.badge-ok { background: var(--success-soft); color: var(--success); }

/* Poster Preview Stage */
.preview-stage {
  background: radial-gradient(circle at 20% 20%, #EFECE4, #E3DDD0);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 460px;
}

.poster-frame {
  max-width: 100%;
  box-shadow: 0 22px 44px -14px rgba(19, 34, 30, 0.28);
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
  background: #FFFFFF;
}
.poster-frame svg {
  max-width: 100%;
  height: auto;
  max-height: 520px;
  display: block;
}

.preview-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.77rem;
  color: var(--ink-secondary);
  flex-wrap: wrap;
}

/* Audit Score Dashboard */
.score-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

.score-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--pct, 75) * 1%), #E5E1D8 0);
  flex-shrink: 0;
}
.score-ring-inner {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-ring-inner strong {
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 800;
}
.score-ring-inner span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.pillar-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  background: #FFFFFF;
}
.pillar-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.bar-track {
  height: 7px;
  background: #EBE7DE;
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.finding-item {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 10px;
  background: #FFFFFF;
}
.finding-item.sev-critical { border-left-color: var(--danger); }
.finding-item.sev-high { border-left-color: #EA580C; }
.finding-item.sev-medium { border-left-color: var(--gold); }
.finding-item h4 {
  margin: 6px 0 4px;
  font-size: 0.92rem;
}
.finding-item p {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}
.finding-fix {
  font-size: 0.81rem;
  color: var(--ink);
  background: var(--surface-soft);
  padding: 7px 10px;
  border-radius: 7px;
}

.code-box {
  background: #141B19;
  color: #E2F1EC;
  border-radius: 10px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.5;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  max-height: 290px;
  margin: 8px 0 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Reply Variants & Scripts */
.reply-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  background: var(--surface-soft);
}
.reply-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.reply-text {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--ink);
  white-space: pre-wrap;
}

/* Rating Math Stats */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.stat-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
}
.stat-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.1;
  color: var(--ink);
}
.stat-box span {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.milestone-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.milestone-table th, .milestone-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.milestone-table th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

/* Pricing & SEO Educational Section */
.section-block {
  margin-top: 38px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.section-block h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin: 0 0 8px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-md);
}
.price-num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  margin: 8px 0 4px;
}
.price-num small {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-weight: 500;
}
.price-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 20px;
  font-size: 0.85rem;
  color: var(--ink-secondary);
  flex: 1;
}
.price-list li {
  padding: 5px 0;
  display: flex;
  gap: 8px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.faq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.faq-card h3 {
  margin: 0 0 6px;
  font-size: 0.96rem;
}
.faq-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-secondary);
}

.trust-grid, .industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.industry-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 16px;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.industry-card:hover {
  text-decoration: none;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.industry-card strong {
  display: block;
  color: var(--ink);
  font-size: 0.94rem;
  margin-bottom: 4px;
}
.industry-card span {
  display: block;
  color: var(--ink-muted);
  font-size: 0.79rem;
}

.legal-prose h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 22px 0 8px;
}
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose p, .legal-prose li {
  font-size: 0.92rem;
  color: var(--ink-secondary);
}
.legal-prose ul { padding-left: 20px; margin: 8px 0 14px; }
.legal-prose li { margin-bottom: 6px; }

/* Footer */
.site-footer {
  margin-top: 48px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  font-size: 0.83rem;
  color: var(--ink-muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Details Accordion */
details.guide-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--surface-soft);
  margin-bottom: 14px;
  font-size: 0.83rem;
}
details.guide-box summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent);
}
details.guide-box ol {
  margin: 8px 0 2px 18px;
  padding: 0;
  color: var(--ink-secondary);
}
details.guide-box li { margin-bottom: 4px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--ink);
  color: #FFFFFF;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(19, 34, 30, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: #FFFFFF;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .split-layout, .pricing-grid, .faq-grid, .trust-grid, .industry-grid {
    grid-template-columns: 1fr;
  }
  .card-sticky { position: static; }
  .header-inner { padding: 10px 0; flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .field-grid, .option-grid, .pillar-grid, .stat-row, .hero-metrics {
    grid-template-columns: 1fr;
  }
}

/* Clean Print Mode (Supports Printing either QR Standee OR Agency Audit Report) */
@media print {
  body { background: #FFFFFF !important; }
  .site-header, .hero, .preset-strip, .section-block, .site-footer, .no-print, .toast, .modal-backdrop {
    display: none !important;
  }
  body.print-poster .tool-panel:not(#panel-poster),
  body.print-poster #poster-controls-col,
  body.print-poster .preview-meta,
  body.print-poster .card-title,
  body.print-poster .card-sub {
    display: none !important;
  }
  body.print-poster .split-layout { display: block !important; }
  body.print-poster .preview-stage,
  body.print-poster .card {
    border: none !important;
    background: #FFFFFF !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  body.print-poster .poster-frame {
    box-shadow: none !important;
    margin: 0 auto !important;
  }
  body.print-poster .poster-frame svg {
    max-height: none !important;
    width: 100% !important;
  }

  body.print-audit .tool-panel:not(#panel-audit),
  body.print-audit #audit-controls-col {
    display: none !important;
  }
  body.print-audit .split-layout { display: block !important; }
  body.print-audit .card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}
