/* LegalNexus — Hebrew RTL contract signing wizard */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Brand */
  --navy:       #1E3A5F;
  --navy-dark:  #122845;
  --navy-mid:   #2D4F77;
  --navy-light: #5C7A99;
  --navy-lighter:#8FA3BD;

  --teal:        #0EA5A5;
  --teal-dark:   #0B8585;
  --teal-light:  #D4F1F1;
  --teal-lightest:#EBFAFA;

  --coral:      #DC2E4E;
  --coral-dark: #B72241;
  --coral-light:#FCE4E9;

  /* Status */
  --blue:       #2563EB;
  --blue-bg:    #DBEAFE;
  --amber:      #D97706;
  --amber-bg:   #FEF3C7;
  --amber-text: #92400E;
  --green:      #059669;
  --green-bg:   #D1FAE5;
  --red:        #DC2626;
  --red-bg:     #FEE2E2;

  /* Surface */
  --surface:    #FFFFFF;
  --bg:         #F8FAFC;
  --border:     #E2E8F0;
  --border-strong: #CBD5E1;

  /* Text */
  --fg-1: #0F172A;
  --fg-2: #475569;
  --fg-3: #94A3B8;

  /* Radii */
  --r-card: 12px;
  --r-btn: 8px;
  --r-pill: 9999px;
  --r-sm: 6px;

  /* Shadows */
  --sh-sm: 0 1px 2px rgba(15,23,42,0.04);
  --sh-md: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --sh-lg: 0 10px 24px -8px rgba(15,23,42,0.12), 0 4px 8px -2px rgba(15,23,42,0.06);
  --sh-xl: 0 24px 48px -12px rgba(15,23,42,0.18);

  /* Layout */
  --nav-h: 64px;
  --max-w: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { font-family: 'Heebo', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--fg-1); background: var(--bg); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* Typography */
.h1 { font-size: 48px; line-height: 1.1; font-weight: 800; letter-spacing: -0.01em; color: var(--navy-dark); text-wrap: balance; }
.h2 { font-size: 32px; line-height: 1.2; font-weight: 700; color: var(--navy-dark); text-wrap: balance; }
.h3 { font-size: 22px; line-height: 1.3; font-weight: 700; color: var(--navy-dark); }
.h4 { font-size: 18px; line-height: 1.35; font-weight: 700; color: var(--navy-dark); }
.h5 { font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--navy-dark); }
.lead { font-size: 18px; line-height: 1.55; color: var(--fg-2); text-wrap: pretty; }
.body { font-size: 15px; line-height: 1.6; color: var(--fg-1); }
.small { font-size: 13px; color: var(--fg-2); }
.tiny { font-size: 12px; color: var(--fg-3); }
.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ────── Nav ────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand {
  font-weight: 800; font-size: 20px; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 8px;
}
.brand .mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 14px;
}
.brand .nm-l { color: var(--navy); }
.brand .nm-r { color: var(--teal); }

.nav-pill {
  display: inline-flex; gap: 4px;
  background: var(--bg);
  border-radius: var(--r-pill);
  padding: 4px;
  border: 1px solid var(--border);
}
.nav-pill a {
  padding: 7px 16px;
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500;
  color: var(--fg-2);
  transition: all 150ms ease;
  white-space: nowrap;
}
.nav-pill a:hover { color: var(--navy-dark); }
.nav-pill a.active {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.btn-klaim {
  background: var(--coral);
  color: white;
  border: 0;
  border-radius: var(--r-pill);
  padding: 9px 18px;
  font-size: 14px; font-weight: 600;
  transition: background 150ms ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-klaim:hover { background: var(--coral-dark); }
.btn-klaim .dot { width: 6px; height: 6px; border-radius: 50%; background: white; opacity: .8; }

/* ────── Buttons ────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px;
  border-radius: var(--r-btn);
  font-size: 15px; font-weight: 600;
  border: 1px solid transparent;
  transition: all 150ms ease;
  white-space: nowrap;
}
.btn-primary { background: var(--navy); color: white; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-primary:disabled { background: var(--navy-lighter); cursor: not-allowed; }

.btn-coral { background: var(--coral); color: white; }
.btn-coral:hover { background: var(--coral-dark); }

.btn-teal { background: var(--teal); color: white; }
.btn-teal:hover { background: var(--teal-dark); }

.btn-outline {
  background: transparent; color: var(--navy);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { border-color: var(--navy); background: var(--bg); }

.btn-outline-teal {
  background: transparent; color: var(--teal-dark);
  border: 1px solid var(--teal);
}
.btn-outline-teal:hover { background: var(--teal-lightest); }

.btn-ghost { background: transparent; color: var(--fg-2); }
.btn-ghost:hover { background: var(--bg); color: var(--navy-dark); }

.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

/* ────── Cards ────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px;
}
.card.flat { box-shadow: none; }
.card.lift { box-shadow: var(--sh-md); }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 18px; font-weight: 700; color: var(--navy-dark); }
.card-subtitle { font-size: 13px; color: var(--teal-dark); font-weight: 500; margin-top: 4px; }

/* ────── Forms ────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 13px; font-weight: 600; color: var(--navy-dark);
  display: flex; align-items: center; gap: 6px;
}
.field-label .req { color: var(--coral); }
.input, .textarea, .select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-btn);
  padding: 0 14px;
  font-size: 14px;
  background: var(--surface);
  color: var(--fg-1);
  transition: all 150ms ease;
}
.textarea { height: auto; min-height: 90px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-light);
}
.input::placeholder, .textarea::placeholder { color: var(--fg-3); }
.field-hint { font-size: 12px; color: var(--fg-3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Radio + Check */
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-btn);
  font-size: 14px; font-weight: 500;
  color: var(--fg-2);
  background: var(--surface);
  cursor: pointer;
  transition: all 150ms ease;
}
.radio-pill .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); position: relative; }
.radio-pill.on { border-color: var(--teal); background: var(--teal-lightest); color: var(--navy-dark); }
.radio-pill.on .dot { border-color: var(--teal); }
.radio-pill.on .dot::after {
  content: ''; position: absolute; inset: 2px; border-radius: 50%; background: var(--teal);
}

.checkbox {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  cursor: pointer;
  transition: all 150ms ease;
}
.checkbox:hover { border-color: var(--teal); background: var(--teal-lightest); }
.checkbox.on { border-color: var(--teal); background: var(--teal-lightest); }
.checkbox .box {
  width: 20px; height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  transition: all 150ms ease;
}
.checkbox.on .box { background: var(--teal); border-color: var(--teal); }
.checkbox .label { font-size: 14px; color: var(--fg-1); line-height: 1.5; }

/* ────── Callouts ────── */
.callout {
  border-radius: var(--r-card);
  padding: 16px 18px;
  display: flex; gap: 12px;
  font-size: 14px; line-height: 1.55;
}
.callout-teal { background: var(--teal-lightest); color: var(--teal-dark); border: 1px solid var(--teal-light); }
.callout-navy { background: var(--surface); color: var(--navy-dark); border: 1px solid var(--navy); }
.callout-amber { background: var(--amber-bg); color: var(--amber-text); border: 1px solid #FCD34D; }

/* ────── Badges / Pills ────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
  line-height: 1;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber-text); }
.badge-blue  { background: var(--blue-bg); color: var(--blue); }
.badge-navy  { background: var(--bg); color: var(--navy-dark); border: 1px solid var(--border); }
.badge-teal  { background: var(--teal-light); color: var(--teal-dark); }

/* ────── Stepper ────── */
.stepper-wrap {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.stepper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex; align-items: center;
  gap: 0;
}
.stepper-item {
  display: flex; align-items: center;
  flex: 1;
  min-width: 0;
}
.stepper-item:last-child { flex: 0; }
.stepper-node {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.stepper-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
  transition: all 200ms ease;
}
.stepper-dot.future { background: var(--bg); color: var(--fg-3); border: 1.5px solid var(--border); }
.stepper-dot.current { background: var(--teal); color: white; box-shadow: 0 0 0 4px var(--teal-light); }
.stepper-dot.done { background: var(--navy); color: white; }

.stepper-label {
  font-size: 12px; font-weight: 500;
  white-space: nowrap;
}
.stepper-label.future { color: var(--fg-3); }
.stepper-label.current { color: var(--teal-dark); font-weight: 700; }
.stepper-label.done { color: var(--navy); }

.stepper-bar {
  flex: 1; height: 2px;
  background: var(--border);
  margin: 0 12px;
  position: relative;
  border-radius: 2px;
}
.stepper-bar.done { background: var(--navy); }

/* ────── Page shell ────── */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 24px 120px;
}
.page-narrow { max-width: 820px; }
.page-wide { max-width: 1320px; }

.page-head { margin-bottom: 24px; }
.page-title { font-size: 26px; font-weight: 700; color: var(--navy-dark); }
.page-subtitle { font-size: 14px; color: var(--fg-2); margin-top: 4px; }

/* ────── Sticky action bar ────── */
.action-bar {
  position: sticky; bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin: 32px -24px -120px;
  padding: 16px 24px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  z-index: 10;
}
.action-bar-left { display: flex; gap: 12px; align-items: center; }
.action-bar-right { display: flex; gap: 12px; align-items: center; }

/* ────── Phone frame ────── */
.phone-frame {
  width: 390px;
  height: 780px;
  border-radius: 48px;
  background: #0F172A;
  padding: 12px;
  box-shadow: var(--sh-xl), 0 0 0 1px rgba(0,0,0,0.05);
  position: relative;
  margin: 0 auto;
}
.phone-frame::before {
  content: '';
  position: absolute;
  top: 24px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 32px;
  background: #0F172A;
  border-radius: 999px;
  z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 38px;
  background: var(--surface);
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
}
.phone-status {
  height: 44px;
  flex-shrink: 0;
  background: var(--surface);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  font-size: 14px; font-weight: 700; color: var(--navy-dark);
  position: relative;
  z-index: 1;
}
.phone-status .icons { display: inline-flex; gap: 6px; align-items: center; }
.phone-body {
  flex: 1; overflow: auto;
  display: flex; flex-direction: column;
}

/* Persona toggle in stepper area */
.persona-banner {
  background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: white;
  padding: 8px 24px;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-weight: 500;
}
.persona-banner .who { color: var(--teal-light); font-weight: 600; }

/* utility */
.row { display: flex; gap: 16px; align-items: center; }
.row-between { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; border: 0; }

.icon-circle {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-circle-teal { background: var(--teal-light); color: var(--teal-dark); }
.icon-circle-navy { background: var(--bg); color: var(--navy); border: 1px solid var(--border); }
.icon-circle-green { background: var(--green-bg); color: var(--green); }
.icon-circle-amber { background: var(--amber-bg); color: var(--amber-text); }
.icon-circle-coral { background: var(--coral-light); color: var(--coral); }

/* RTL-aware arrow flips */
.arr-back::before { content: '→'; display: inline-block; margin-inline-start: 4px; }
.arr-fwd::after { content: '←'; display: inline-block; margin-inline-start: 4px; }

/* Legal-style document */
.legal-doc {
  background: white;
  padding: 56px 64px;
  font-size: 13.5px;
  line-height: 1.75;
  color: #1f2937;
  font-family: 'Heebo', serif;
}
.legal-doc h1.doc-h1 { font-size: 22px; text-align: center; font-weight: 800; color: var(--navy-dark); margin: 0 0 4px; letter-spacing: -0.01em; }
.legal-doc .doc-sub { text-align: center; font-size: 13px; color: var(--teal-dark); font-weight: 500; margin-bottom: 36px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.legal-doc h2.doc-h2 { font-size: 14px; font-weight: 700; color: var(--navy-dark); margin: 24px 0 8px; }
.legal-doc p { margin: 6px 0; text-align: justify; }
.legal-doc ol.clauses { list-style: none; padding: 0; counter-reset: clause; }
.legal-doc ol.clauses > li { counter-increment: clause; margin: 18px 0; padding-inline-start: 0; }
.legal-doc ol.clauses > li::before {
  content: counter(clause) ".";
  font-weight: 800; color: var(--navy-dark);
  display: inline-block; margin-inline-end: 8px;
}
.legal-doc ol.clauses > li > .clause-title {
  display: inline; font-weight: 700; color: var(--navy-dark);
}
.fill {
  background: var(--amber-bg);
  color: var(--amber-text);
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
  margin: 0 2px;
  border-bottom: 1px solid #FCD34D;
}
.sig-area {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px dashed var(--border-strong);
}
.sig-block { text-align: center; }
.sig-line { border-bottom: 1px solid var(--fg-2); margin: 32px 8px 8px; }
.sig-name { font-size: 13px; font-weight: 600; }
.sig-sub { font-size: 11px; color: var(--fg-3); }

/* ─── Screen-specific grids (desktop defaults) ─── */

/* Landing — "how it works" 4-step timeline */
.howit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.howit-bar {
  position: absolute;
  top: 28px; right: 12.5%; left: 12.5%;
  height: 2px; background: var(--border);
  z-index: 0;
}

/* Share — form + WhatsApp preview */
.share-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}
.share-form { padding: 36px; }
.share-form-footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Tenant — read-only summary cards */
.tenant-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

/* Preview — document + sidebar */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
.preview-doc-wrap {
  background: #E5E7EB;
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--sh-md);
  overflow: hidden;
}
.preview-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 100px);
}

/* Sign — two parties side by side */
.sign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.sign-card { padding: 24px; }

/* ═══════════════════════ Responsive ═══════════════════════ */

/* viewport-aware HTML — override the desktop-first viewport from index.html */
@media (max-width: 1320px) {
  /* let small screens scale naturally rather than zoom out */
}

/* Tablet & below */
@media (max-width: 900px) {
  :root {
    --nav-h: 56px;
  }
  .h1 { font-size: 36px; }
  .h2 { font-size: 26px; }
  .h3 { font-size: 19px; }
  .lead { font-size: 16px; }

  .nav-inner { padding: 0 16px; gap: 12px; }
  .brand { font-size: 18px; }
  .brand .mark { width: 24px; height: 24px; font-size: 12px; }
  .nav-pill { display: none; }   /* hide secondary nav on tablets */
  .btn-klaim { padding: 7px 14px; font-size: 13px; }

  .stepper { padding: 14px 12px; overflow-x: auto; gap: 0; }
  .stepper-item { flex: 1 0 auto; }
  .stepper-label { display: none; }   /* only dots on tablet/mobile */
  .stepper-bar { min-width: 16px; margin: 0 6px; }

  .page { padding: 20px 16px 120px; }
  .page-title { font-size: 22px; }

  .card { padding: 18px; }
  .card-head { margin-bottom: 14px; padding-bottom: 12px; }
  .card-title { font-size: 16px; }

  .field-row,
  .field-row-3,
  .grid-2,
  .grid-3 { grid-template-columns: 1fr; gap: 12px; }

  .legal-doc { padding: 32px 24px; font-size: 13px; }
  .legal-doc h1.doc-h1 { font-size: 18px; }
  .legal-doc .doc-sub { font-size: 12px; margin-bottom: 24px; padding-bottom: 16px; }

  .sig-area { grid-template-columns: 1fr; gap: 20px; margin-top: 32px; }

  /* Screen-specific grids collapse on tablet */
  .share-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .share-form { padding: 22px; }

  .preview-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .preview-doc-wrap { padding: 14px; }
  .preview-sidebar {
    position: static;
    top: auto;
  }

  .sign-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .sign-card { padding: 18px; }

  .tenant-summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

/* Phone */
@media (max-width: 600px) {
  .h1 { font-size: 28px; }
  .h2 { font-size: 22px; }
  .h3 { font-size: 17px; }
  .h4 { font-size: 16px; }
  .lead { font-size: 14px; line-height: 1.5; }
  .body { font-size: 14px; }
  .small { font-size: 12px; }

  .nav-inner { padding: 0 12px; }
  .brand { font-size: 16px; }
  .brand .mark { width: 22px; height: 22px; font-size: 11px; }
  .btn-klaim { padding: 6px 10px; font-size: 12px; gap: 4px; }

  .stepper { padding: 10px 8px; }
  .stepper-dot { width: 26px; height: 26px; font-size: 11px; }
  .stepper-bar { min-width: 8px; margin: 0 3px; }

  .persona-banner {
    padding: 7px 12px;
    font-size: 11px;
    flex-wrap: wrap;
    gap: 8px;
    text-align: center;
    justify-content: center;
  }

  .page { padding: 16px 12px 140px; }
  .page-title { font-size: 19px; }

  .card { padding: 14px; }

  .btn { height: 40px; padding: 0 16px; font-size: 14px; }
  .btn-sm { height: 34px; padding: 0 12px; font-size: 12px; }

  /* Sticky action-bar stacks on phone */
  .action-bar {
    flex-direction: column-reverse;   /* primary action on top */
    gap: 8px;
    margin: 24px -12px -140px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  }
  .action-bar-left,
  .action-bar-right {
    width: 100%;
    justify-content: stretch;
  }
  .action-bar .btn { width: 100%; }

  /* Phone-frame mockup looks silly on a real phone — hide it */
  .phone-frame {
    width: 100%;
    max-width: 360px;
    height: auto;
    min-height: 560px;
    border-radius: 32px;
    padding: 8px;
  }
  .phone-frame::before {
    width: 90px;
    height: 22px;
    top: 16px;
  }

  /* Forms */
  .input, .select { height: 40px; font-size: 13px; }
  .textarea { font-size: 13px; }
  .field-label { font-size: 12px; }

  /* OTP boxes shrink */
  .otp-box,
  input[id^="otp-"] { width: 38px !important; height: 46px !important; font-size: 19px !important; }

  /* Legal doc */
  .legal-doc { padding: 20px 14px; font-size: 12.5px; line-height: 1.7; }
  .legal-doc h1.doc-h1 { font-size: 16px; }

  /* Card-head titles + icon can stack */
  .card-head {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 8px;
  }

  /* "How it works" — 2-column on phone, hide the timeline bar */
  .howit-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .howit-bar { display: none; }

  /* Share form — stack footer + remove WhatsApp preview entirely on phone */
  .share-form-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .share-form-footer .btn { width: 100%; }
  /* Hide the WhatsApp PhoneFrame preview on real phones — user already sees real phone */
  .share-grid > div:last-child {
    display: none;
  }

  /* Tenant readonly summary — single column on phone */
  .tenant-summary-grid { grid-template-columns: 1fr; gap: 8px; }

  /* Preview document — flush */
  .preview-doc-wrap { padding: 10px; border-radius: 8px; }

  /* OTP boxes shrink further on smallest screens */
  input[id^="otp-"] {
    width: 36px !important;
    height: 44px !important;
    font-size: 18px !important;
  }
}

/* Print-friendly legal doc */
@media print {
  .nav, .stepper-wrap, .persona-banner, .action-bar, [class*="tweaks"] { display: none !important; }
  .legal-doc { padding: 0; }
}
