/* Shared styles for MyKinRecord browser-only printable PDF builders */
.builder-page { background: var(--bg, #f7f4ee); color: var(--ink, #1d2a24); }
.builder-wrap { max-width: 1120px; margin: 0 auto; padding: 24px 20px 64px; }
.builder-hero { max-width: 780px; margin: 12px 0 24px; }
.builder-hero h1 { font-size: clamp(1.75rem, 3.2vw, 2.45rem); line-height: 1.18; margin: 6px 0 12px; }
.builder-privacy { font-size: 0.92rem; color: #3c4f46; background: #eef3ef; border-left: 3px solid #244b3e; padding: 10px 14px; border-radius: 6px; margin-top: 12px; }
.builder-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 24px; align-items: start; margin-top: 20px; }
@media (max-width: 920px) { .builder-grid { grid-template-columns: 1fr; } }
.builder-card { background: #fff; border: 1px solid #d9dfd9; border-radius: 14px; padding: 20px; box-shadow: 0 2px 10px rgba(20, 42, 34, 0.04); }
.builder-card h2 { font-size: 1.18rem; margin: 0 0 12px; }
.builder-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 600px) { .builder-fields { grid-template-columns: 1fr; } }
.builder-field { display: flex; flex-direction: column; gap: 5px; }
.builder-field.full { grid-column: 1 / -1; }
.builder-field label { font-size: 0.85rem; font-weight: 600; color: #2b3e35; }
.builder-field input, .builder-field select, .builder-field textarea {
  font: inherit; font-size: 0.94rem; padding: 9px 11px; border: 1px solid #c5cfc9; border-radius: 8px; background: #fff; color: #16231d; width: 100%; box-sizing: border-box;
}
.builder-field textarea { min-height: 76px; resize: vertical; }
.builder-row-list { display: flex; flex-direction: column; gap: 12px; margin: 12px 0 16px; }
.builder-row { border: 1px solid #dde4df; border-radius: 10px; padding: 12px; background: #fafbf9; }
.builder-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 0.85rem; font-weight: 600; color: #244b3e; }
.builder-row-remove { background: transparent; border: 1px solid #d5b4b4; color: #8c2f2f; border-radius: 6px; padding: 3px 9px; font-size: 0.8rem; cursor: pointer; }
.builder-row-remove:hover { background: #fdf0f0; }
.builder-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.builder-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 0.92rem; font-weight: 600; padding: 10px 16px; border-radius: 9px;
  border: 1px solid #244b3e; background: #fff; color: #244b3e; cursor: pointer; text-decoration: none;
}
.builder-btn.primary { background: #244b3e; color: #fff; }
.builder-btn.primary:hover { background: #1b3a2f; }
.builder-btn:hover { background: #eef4f1; }
.builder-btn.primary:hover { color: #fff; }
.builder-layout-toggle { display: inline-flex; border: 1px solid #c5cfc9; border-radius: 9px; overflow: hidden; margin-bottom: 14px; }
.builder-layout-toggle button { border: 0; background: #fff; padding: 7px 13px; font: inherit; font-size: 0.86rem; font-weight: 600; color: #364a41; cursor: pointer; }
.builder-layout-toggle button[aria-pressed="true"] { background: #244b3e; color: #fff; }
.builder-status { font-size: 0.88rem; color: #244b3e; min-height: 1.3em; margin: 10px 0 0; }

/* Live printable sheet preview */
.sheet-preview-shell { position: sticky; top: 18px; }
.sheet-paper {
  background: #fff; border: 1px solid #cfd8d2; border-radius: 12px; padding: 22px;
  box-shadow: 0 6px 20px rgba(18, 38, 30, 0.06); color: #14201b; font-size: 0.9rem; line-height: 1.45;
}
.sheet-paper.wallet-mode { max-width: 390px; margin: 0 auto; border: 2px dashed #244b3e; padding: 16px; font-size: 0.82rem; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 2px solid #244b3e; padding-bottom: 10px; margin-bottom: 12px; }
.sheet-head h3 { margin: 0; font-size: 1.15rem; color: #163329; }
.sheet-badge { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #244b3e; background: #eaf2ee; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.sheet-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin-bottom: 14px; font-size: 0.85rem; }
.sheet-meta div strong { color: #354b41; font-weight: 600; }
.sheet-table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 0.84rem; }
.sheet-table th, .sheet-table td { border: 1px solid #cbd5cf; padding: 7px 8px; text-align: left; vertical-align: top; }
.sheet-table th { background: #f1f6f3; color: #1d392f; font-weight: 700; }
.sheet-block { margin: 12px 0; }
.sheet-block h4 { font-size: 0.92rem; margin: 0 0 6px; color: #1d392f; border-bottom: 1px solid #e1e8e4; padding-bottom: 3px; }
.sheet-questions { margin: 6px 0 0; padding-left: 20px; }
.sheet-questions li { margin-bottom: 5px; }
.sheet-footer { margin-top: 14px; padding-top: 8px; border-top: 1px solid #e0e7e3; font-size: 0.76rem; color: #52665d; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Conversion CTA card */
.builder-ai-cta {
  margin-top: 20px; background: linear-gradient(135deg, #1f4538 0%, #2c5f4e 100%); color: #fff;
  border-radius: 14px; padding: 20px 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.builder-ai-cta h3 { margin: 0 0 6px; font-size: 1.12rem; color: #fff; }
.builder-ai-cta p { margin: 0; font-size: 0.92rem; color: #e2efe9; max-width: 580px; }
.builder-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; max-width: 100%; }
.builder-ai-cta .cta-btn {
  display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #1a3c30;
  font-weight: 700; padding: 10px 16px; border: 1px solid #fff; border-radius: 9px; text-decoration: none;
}
.builder-ai-cta .cta-btn:hover { background: #f0f7f4; }
.builder-ai-cta .cta-demo { background: transparent; color: #fff; }
.builder-ai-cta .cta-demo:hover { background: rgba(255, 255, 255, 0.14); }
.builder-ai-cta .cta-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.builder-faq { margin-top: 32px; background: #fff; border: 1px solid #d9dfd9; border-radius: 14px; padding: 22px; }
.builder-faq h2 { margin-top: 0; font-size: 1.2rem; }
.builder-faq h3 { font-size: 1rem; margin: 14px 0 4px; color: #1b3a2f; }
.builder-faq p { margin: 0 0 8px; font-size: 0.93rem; color: #364940; }

@media print {
  .builder-page > :not(.builder-wrap),
  .builder-wrap > :not(#builder-app),
  #builder-app > :not(.builder-grid),
  .builder-grid > :not(.sheet-preview-shell),
  .sheet-preview-shell > :not(#print-sheet) { display: none; }

  .builder-page { background: #fff; }
  .builder-wrap { max-width: none; padding: 0; margin: 0; }
  .builder-grid { display: block; margin: 0; }
  .sheet-preview-shell { position: static; }
  #print-sheet { margin: 0; padding: 0; border: 0; box-shadow: none; overflow-wrap: anywhere; }
  #print-sheet.wallet-mode { width: 92mm; max-width: 100%; border: 1.5px dashed #244b3e; padding: 4mm; }
  .sheet-head, .sheet-table tr { break-inside: avoid; }
  .sheet-block h4 { break-after: avoid; }
}
