/* ============================================================================
   SCOPEFORGE STUDIO — EXECUTIVE B2B DESIGN SYSTEM & PRINT ENGINE
   ============================================================================ */

:root {
  --bg-app: #0b0f19;
  --bg-panel: #111827;
  --bg-card: #1e293b;
  --bg-input: #0f172a;
  --border-subtle: #1e293b;
  --border-muted: #334155;
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #4f46e5;
  --accent-hover: #6366f1;
  --accent-soft: rgba(79, 70, 229, 0.15);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.15);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.15);
  --rose: #f43f5e;
  --doc-accent: #3730a3;
  --doc-accent-light: #eef2ff;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 15% 0%, rgba(79, 70, 229, 0.14), transparent 40%),
              radial-gradient(circle at 85% 10%, rgba(16, 185, 129, 0.08), transparent 35%),
              var(--bg-app);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================================
   TOP NAVIGATION BAR
   ============================================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  color: #fff;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.topbar-nav a:hover {
  color: #fff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* ============================================================================
   BUTTONS & BADGES
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  transform: translateY(-1px);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.btn-emerald:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-amber {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0b0f19;
  font-weight: 700;
}

.btn-amber:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-muted);
}

.btn-secondary:hover {
  background: #334155;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.btn-ghost:hover {
  color: #fff;
  border-color: var(--border-muted);
  background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 0.8rem 1.5rem;
  font-size: 0.98rem;
  border-radius: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-pro {
  background: var(--amber-soft);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-unlocked {
  background: var(--emerald-soft);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-accent {
  background: var(--accent-soft);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

/* ============================================================================
   HERO & MARKETING SECTIONS
   ============================================================================ */
.hero-banner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.75rem;
  text-align: center;
}

.hero-title {
  font-size: clamp(1.85rem, 3.8vw, 3rem);
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0.75rem auto;
  max-width: 900px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0 auto 1.4rem;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.trust-pill {
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

/* ============================================================================
   STUDIO SPLIT WORKSPACE
   ============================================================================ */
.studio-shell {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: 520px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1120px) {
  .studio-shell {
    grid-template-columns: 1fr;
  }
}

/* LEFT EDITOR PANEL */
.editor-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-muted);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.mode-switcher {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  padding: 0.6rem;
  background: #090d16;
  border-bottom: 1px solid var(--border-subtle);
}

.mode-btn {
  padding: 0.55rem 0.35rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.mode-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.mode-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.editor-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.7);
}

.editor-tab {
  flex: 1;
  padding: 0.7rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.editor-tab:hover {
  color: #fff;
}

.editor-tab.active {
  color: #818cf8;
  border-bottom-color: #6366f1;
  background: rgba(79, 70, 229, 0.08);
}

.editor-body {
  padding: 1.15rem;
  max-height: 78vh;
  overflow-y: auto;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.form-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin: 1rem 0 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-section-title:first-child {
  margin-top: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.form-group {
  margin-bottom: 0.65rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.28rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.52rem 0.7rem;
  border-radius: 7px;
  border: 1px solid var(--border-muted);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.83rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-hover);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-textarea {
  resize: vertical;
  min-height: 74px;
}

/* LINE ITEM EDITOR ROWS */
.item-editor-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-muted);
  border-radius: 9px;
  padding: 0.65rem;
  margin-bottom: 0.55rem;
}

.item-editor-top {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.item-editor-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.item-num-inputs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.item-num-inputs input {
  width: 85px;
}

/* CLAUSE CARDS IN EDITOR */
.clause-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-muted);
  border-radius: 9px;
  padding: 0.7rem;
  margin-bottom: 0.55rem;
  transition: border-color 0.15s;
}

.clause-card.pro-locked {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(15, 23, 42, 0.9));
}

.clause-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.clause-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.clause-desc {
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* COLOR SWATCHES */
.swatch-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s;
}

.color-swatch.active {
  border-color: #fff;
  transform: scale(1.12);
}

/* SIGNATURE CANVAS */
.sig-pad-wrapper {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border-muted);
  padding: 0.35rem;
  text-align: center;
}

.sig-canvas {
  width: 100%;
  height: 110px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  cursor: crosshair;
  touch-action: none;
}

/* ============================================================================
   RIGHT PANE — LIVE DOCUMENT PREVIEW
   ============================================================================ */
.preview-column {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-muted);
  padding: 0.7rem 1rem;
  border-radius: 12px;
}

.preview-toolbar-left,
.preview-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* EXECUTIVE A4 / LETTER PAPER DOCUMENT */
.document-paper {
  background: #ffffff;
  color: #0f172a;
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.doc-header-band {
  background: var(--doc-accent);
  color: #ffffff;
  padding: 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.doc-brand-block {
  max-width: 60%;
}

.doc-custom-logo {
  max-height: 48px;
  max-width: 180px;
  object-fit: contain;
  margin-bottom: 0.65rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 4px 8px;
  border-radius: 6px;
}

.doc-type-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.doc-main-title {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.doc-meta-box {
  text-align: right;
  font-size: 0.8rem;
  line-height: 1.55;
  background: rgba(0, 0, 0, 0.18);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  min-width: 210px;
}

.doc-body {
  padding: 2.25rem 2.5rem;
}

.doc-parties-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 2px solid #f1f5f9;
}

.party-box-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.party-name {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.party-details {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.5;
  margin-top: 0.2rem;
}

.doc-section {
  margin-bottom: 1.85rem;
}

.doc-section-heading {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--doc-accent);
  padding-bottom: 0.45rem;
  margin-bottom: 0.85rem;
  border-bottom: 2px solid var(--doc-accent-light);
}

.doc-summary-text {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.65;
  white-space: pre-line;
}

.doc-deliverables-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.doc-deliverables-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: #1e293b;
  background: #f8fafc;
  padding: 0.55rem 0.85rem;
  border-radius: 7px;
  border-left: 3px solid var(--doc-accent);
}

.doc-milestone-table,
.doc-pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.doc-milestone-table th,
.doc-pricing-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}

.doc-milestone-table td,
.doc-pricing-table td {
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.doc-pricing-table th.num,
.doc-pricing-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.optional-row {
  background: #fefce8;
}

.optional-row.unselected td {
  color: #94a3b8;
  text-decoration: line-through;
}

.optional-row.unselected td:first-child {
  text-decoration: none;
}

.optional-badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  background: #fef08a;
  color: #854d0e;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  text-transform: uppercase;
}

/* TOTALS SUMMARY BOX */
.doc-totals-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.doc-payment-terms-box {
  flex: 1;
  min-width: 240px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  font-size: 0.8rem;
  color: #475569;
}

.doc-totals-card {
  width: 310px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  color: #475569;
  padding: 0.3rem 0;
  font-variant-numeric: tabular-nums;
}

.totals-row.grand-total {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
  border-top: 2px solid #cbd5e1;
  margin-top: 0.35rem;
  padding-top: 0.6rem;
}

.totals-row.deposit-highlight {
  background: var(--doc-accent-light);
  color: var(--doc-accent);
  font-weight: 800;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  margin-top: 0.45rem;
}

/* CONTRACT CLAUSES IN DOCUMENT */
.doc-clauses-grid {
  display: grid;
  gap: 0.75rem;
}

.doc-clause-item {
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.55;
}

.doc-clause-item strong {
  color: #0f172a;
  display: block;
  margin-bottom: 0.15rem;
}

/* SIGNATURE BLOCKS */
.doc-signatures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 2px solid #e2e8f0;
}

.sig-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.sig-display-area {
  height: 68px;
  border-bottom: 1.5px solid #334155;
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.35rem;
  margin-bottom: 0.45rem;
}

.sig-typed {
  font-family: "Georgia", "Times New Roman", serif;
  font-style: italic;
  font-size: 1.55rem;
  color: #1e3a8a;
}

.sig-drawn-img {
  max-height: 60px;
  max-width: 220px;
  object-fit: contain;
}

.sig-meta {
  font-size: 0.76rem;
  color: #475569;
  line-height: 1.45;
}

/* VIRAL FOOTER WATERMARK (REMOVABLE WITH PRO) */
.doc-viral-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 0.75rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: #64748b;
}

.doc-viral-footer a {
  color: var(--doc-accent);
  font-weight: 700;
}

/* ============================================================================
   MODAL OVERLAY (PRO UPGRADE & SHARE LINK)
   ============================================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(6, 10, 19, 0.82);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-muted);
  border-radius: 16px;
  max-width: 780px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65);
}

.pricing-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin: 1.25rem 0;
}

@media (max-width: 680px) {
  .pricing-cards-grid,
  .doc-parties-grid,
  .doc-signatures-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-tier-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pricing-tier-card.featured {
  border: 2px solid #f59e0b;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.price-tag {
  font-size: 2.2rem;
  font-weight: 850;
  color: #fff;
  margin: 0.4rem 0 0.15rem;
}

.price-strike {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 500;
  margin-left: 0.35rem;
}

.feature-check-list {
  list-style: none;
  margin: 1rem 0 1.25rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: #cbd5e1;
}

/* ============================================================================
   SEO DIRECTORY & CONTENT SECTIONS
   ============================================================================ */
.content-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.seo-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.15rem;
  transition: transform 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.seo-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-hover);
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (max-width: 780px) {
  html,
  body {
    overflow-x: hidden;
  }

  .topbar {
    flex-wrap: wrap;
    padding: 0.6rem 0.85rem;
    gap: 0.5rem;
  }

  .topbar-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    gap: 0.85rem;
    font-size: 0.78rem;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .topbar-actions {
    gap: 0.4rem;
  }

  .topbar-actions .btn {
    padding: 0.32rem 0.55rem;
    font-size: 0.72rem;
  }

  .hero-banner {
    padding: 1.4rem 0.9rem 1rem;
  }

  .hero-subtitle {
    font-size: 0.92rem;
  }

  .studio-shell {
    padding: 0.5rem 0.65rem 2rem;
    gap: 1rem;
  }

  .editor-panel,
  .preview-column,
  .document-paper {
    min-width: 0;
    max-width: 100%;
  }

  .mode-switcher {
    grid-template-columns: 1fr 1fr;
  }

  .editor-body {
    max-height: none;
    overflow-y: visible;
    padding: 0.85rem;
  }

  .preview-toolbar {
    padding: 0.6rem 0.75rem;
  }

  .preview-toolbar-left,
  .preview-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .doc-header-band {
    flex-direction: column;
    padding: 1.25rem 1.1rem;
    gap: 0.85rem;
  }

  .doc-brand-block {
    max-width: 100%;
  }

  .doc-main-title {
    font-size: 1.22rem;
  }

  .doc-meta-box {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .doc-body {
    padding: 1.15rem 1rem;
  }

  .doc-milestone-table,
  .doc-pricing-table {
    font-size: 0.76rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .doc-milestone-table th,
  .doc-pricing-table th,
  .doc-milestone-table td,
  .doc-pricing-table td {
    padding: 0.48rem 0.45rem;
  }

  .doc-totals-card {
    width: 100%;
  }

  .doc-viral-footer {
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    text-align: center;
  }

  .modal-backdrop {
    padding: 0.55rem;
  }

  .modal-card {
    padding: 1.1rem;
    max-height: 94vh;
  }

  .pricing-cards-grid,
  .doc-parties-grid,
  .doc-signatures-grid,
  .form-grid,
  .faq-grid {
    grid-template-columns: 1fr !important;
  }

  .pricing-tier-card .btn {
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
}

.faq-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 1.15rem;
}

.faq-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
  color: #f8fafc;
}

.faq-card p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ============================================================================
   PRINT MEDIA ENGINE — RAZOR-SHARP A4/LETTER PDF EXPORT
   ============================================================================ */
@media print {
  @page {
    size: auto;
    margin: 10mm;
  }

  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .topbar,
  .hero-banner,
  .editor-panel,
  .preview-toolbar,
  .modal-backdrop,
  .no-print,
  .seo-directory-section,
  .site-footer {
    display: none !important;
  }

  .studio-shell {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  .preview-column {
    display: block !important;
  }

  .document-paper {
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    width: 100% !important;
  }

  .doc-header-band {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .doc-deliverables-list li,
  .totals-row.deposit-highlight,
  .optional-row,
  .doc-viral-footer {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
