:root {
  --blue: #0b5ed7;
  --blue-dark: #073f96;
  --blue-soft: #eaf3ff;
  --navy: #10213f;
  --ink: #1b2a44;
  --muted: #65748b;
  --line: #dce4ef;
  --cream: #fffaf0;
  --yellow: #ffca45;
  --white: #ffffff;
  --surface: #f5f8fc;
  --success: #17754b;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(28, 55, 94, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; font-family: "DM Sans", system-ui, sans-serif; color: var(--ink); background: var(--surface); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar { height: 76px; padding: 0 clamp(20px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; background: var(--white); border-bottom: 1px solid rgba(220, 228, 239, .9); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: var(--white); background: var(--blue); border-radius: 12px 12px 12px 4px; font: 800 22px/1 "Plus Jakarta Sans", sans-serif; box-shadow: 0 8px 20px rgba(11,94,215,.22); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font: 800 20px/1 "Plus Jakarta Sans", sans-serif; letter-spacing: -.6px; }
.brand-copy strong span { color: var(--blue); }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .05px; }
.free-badge { padding: 8px 11px; color: var(--blue-dark); background: var(--blue-soft); border: 1px solid #c9dfff; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .8px; }

main { max-width: 1440px; margin: 0 auto; }
.hero { position: relative; min-height: 370px; padding: 64px clamp(20px, 5vw, 72px) 78px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 56px; align-items: center; overflow: hidden; color: var(--white); background: linear-gradient(120deg, #073f96 0%, #0b5ed7 55%, #2479e9 100%); }
.hero::before { content: ""; position: absolute; width: 440px; height: 440px; right: -120px; bottom: -260px; border: 70px solid rgba(255,255,255,.07); border-radius: 50%; }
.hero-copy, .hero-card { position: relative; z-index: 1; }
.eyebrow, .step-kicker { display: block; margin-bottom: 10px; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; }
.hero .eyebrow { color: #c9e0ff; }
h1, h2, h3 { margin-top: 0; font-family: "Plus Jakarta Sans", sans-serif; }
.hero h1 { max-width: 780px; margin-bottom: 18px; font-size: clamp(36px, 5vw, 62px); line-height: 1.04; letter-spacing: -2.6px; }
.hero p { max-width: 650px; margin: 0; color: #dfeeff; font-size: 18px; line-height: 1.6; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; color: #eff7ff; font-size: 13px; font-weight: 600; }
.hero-card { justify-self: center; width: min(100%, 340px); padding: 34px 30px; color: var(--ink); background: var(--white); border-radius: 8px 8px 24px 8px; transform: rotate(2deg); box-shadow: 0 28px 55px rgba(0, 26, 73, .28); }
.hero-card::after { content: ""; position: absolute; inset: 10px -10px -10px 10px; z-index: -1; border: 2px solid rgba(255,255,255,.28); border-radius: inherit; }
.paper-label { display: inline-block; margin-bottom: 23px; padding: 7px 10px; color: var(--blue-dark); background: var(--blue-soft); border-radius: 5px; font: 800 12px/1 "Plus Jakarta Sans", sans-serif; letter-spacing: 1px; }
.paper-line { width: 82%; height: 8px; margin: 11px 0; background: #dce7f5; border-radius: 8px; }
.paper-line.wide { width: 100%; height: 12px; background: #bcd5f6; }.paper-line.short { width: 60%; }
.paper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 25px; }.paper-grid i { height: 52px; background: #f2f6fb; border: 1px solid #e1e8f1; border-radius: 7px; }
.spark { position: absolute; display: grid; place-items: center; width: 42px; height: 42px; color: var(--navy); background: var(--yellow); border-radius: 50%; font-size: 18px; box-shadow: 0 10px 25px rgba(0,0,0,.16); }.spark-one { top: -20px; right: -20px; }.spark-two { bottom: -18px; left: -18px; transform: scale(.72); }

.workspace { position: relative; z-index: 2; margin: -32px clamp(16px, 4vw, 56px) 64px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(460px, 1.1fr); border-radius: 22px; background: var(--white); box-shadow: var(--shadow); overflow: hidden; }
.workspace > *, .form-panel, .preview-panel, .result-wrap { min-width: 0; }
.form-panel, .preview-panel { padding: clamp(24px, 4vw, 46px); }
.preview-panel { background: #eef3f9; border-left: 1px solid var(--line); }
.panel-heading, .preview-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.panel-heading h2, .preview-toolbar h2 { margin: 0; font-size: 23px; letter-spacing: -.5px; }
.step-kicker { margin-bottom: 6px; color: var(--blue); }
.text-button, .sample-link { padding: 0; color: var(--blue); background: transparent; border: 0; font-size: 13px; font-weight: 700; }
.text-button:hover, .sample-link:hover { text-decoration: underline; }

.form-section { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 28px 0; border-top: 1px solid var(--line); }
.form-section:first-of-type { padding-top: 0; border-top: 0; }
.section-number { display: grid; place-items: center; width: 32px; height: 32px; color: var(--blue); background: var(--blue-soft); border-radius: 50%; font-weight: 800; font-size: 13px; }
.section-content h3 { margin: 4px 0 20px; font-size: 16px; }
.field-grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
label { display: block; margin: 0 0 18px; color: #31425b; font-size: 13px; font-weight: 700; }
label > span { color: var(--danger); }
input, select, textarea { width: 100%; margin-top: 8px; padding: 12px 13px; color: var(--ink); background: var(--white); border: 1px solid #cdd8e6; border-radius: 9px; outline: none; font-size: 14px; font-weight: 400; transition: .18s ease; }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #9aa7b8; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 94, 215, .11); }
input.invalid, textarea.invalid { border-color: var(--danger); background: #fff8f7; }
.hint { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 400; }
details { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; }
summary { padding: 14px 15px; color: var(--blue-dark); font-size: 13px; font-weight: 700; cursor: pointer; }
summary span { float: right; color: var(--muted); font-size: 11px; font-weight: 600; }
.details-body { padding: 5px 15px 2px; border-top: 1px solid var(--line); }
.form-alert { margin-bottom: 14px; padding: 12px 14px; color: var(--danger); background: #fff1ef; border: 1px solid #ffd4cf; border-radius: 9px; font-size: 13px; }
.form-actions, .result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.primary-button, .secondary-button { min-height: 44px; padding: 11px 16px; border-radius: 9px; font-weight: 700; font-size: 13px; transition: .18s ease; }
.primary-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--white); background: var(--blue); border: 1px solid var(--blue); box-shadow: 0 8px 18px rgba(11,94,215,.18); }.primary-button:hover { background: var(--blue-dark); transform: translateY(-1px); }
.secondary-button { color: #41516a; background: var(--white); border: 1px solid #cdd8e6; }.secondary-button:hover { color: var(--blue); border-color: var(--blue); }
.privacy-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; }.privacy-note span { color: var(--success); }

.save-status { padding: 6px 9px; color: var(--muted); background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; white-space: nowrap; }
.save-status.ready { color: var(--success); background: #eaf8f1; border-color: #b9e5cf; }
.empty-preview { min-height: 570px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px; text-align: center; background: rgba(255,255,255,.6); border: 1px dashed #bdc9d8; border-radius: 14px; }
.empty-icon { display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 20px; color: var(--blue); background: var(--blue-soft); border-radius: 20px; font-size: 26px; }
.empty-preview h3 { margin-bottom: 9px; font-size: 18px; }.empty-preview p { max-width: 330px; margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.result-wrap { width: 100%; max-width: 100%; }
.document { width: 100%; max-width: 100%; min-height: 700px; padding: 48px 46px; overflow-wrap: anywhere; word-break: normal; color: #17243a; background: var(--white); border: 1px solid #d7dfea; box-shadow: 0 12px 30px rgba(32, 50, 80, .08); font-family: Arial, sans-serif; font-size: 12px; line-height: 1.55; }
.document h1 { margin: 0; text-align: center; font-family: Arial, sans-serif; font-size: 20px; letter-spacing: .7px; }.document .doc-subtitle { margin: 4px 0 22px; color: #4b5b72; text-align: center; font-weight: 700; }
.document h2 { margin: 23px 0 9px; padding-bottom: 5px; color: #0b4caa; border-bottom: 1.5px solid #bdd4f4; font-family: Arial, sans-serif; font-size: 13px; text-transform: uppercase; letter-spacing: .35px; }
.document h3 { margin: 14px 0 5px; font-family: Arial, sans-serif; font-size: 12px; }
.document p { margin: 5px 0; }.document ol, .document ul { margin: 5px 0 8px; padding-left: 20px; }.document li { margin-bottom: 4px; }.document p, .document li, .document td, .document th { overflow-wrap: anywhere; }
.identity-table { width: 100%; table-layout: fixed; border-collapse: collapse; }.identity-table td { padding: 5px 7px; border: 1px solid #cfd8e5; vertical-align: top; }.identity-table td:first-child { width: 34%; background: #f3f7fc; font-weight: 700; }
.activity-table { width: 100%; margin-top: 8px; border-collapse: collapse; }.activity-table th, .activity-table td { padding: 7px; border: 1px solid #cfd8e5; text-align: left; vertical-align: top; }.activity-table th { color: #133d75; background: #edf4fd; }.activity-table th:last-child, .activity-table td:last-child { width: 14%; text-align: center; }
.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.signature { width: 45%; min-width: 210px; margin: 34px 0 0 auto; text-align: center; }.signature-space { height: 52px; }.signature-line { border-bottom: 1px solid #333; }
.result-actions { margin-top: 18px; }.result-actions .primary-button { flex: 1; }.review-note { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.about-strip { margin: 0 clamp(20px, 5vw, 72px) 64px; padding: 38px 42px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; background: var(--cream); border: 1px solid #f1e4c7; border-radius: 18px; }.about-strip .eyebrow { color: #9a6400; }.about-strip h2 { margin: 0; font-size: clamp(24px, 3vw, 35px); line-height: 1.17; letter-spacing: -1px; }.about-strip p { margin: 0; color: #685d49; line-height: 1.7; }
footer { max-width: 1440px; margin: 0 auto; padding: 28px clamp(20px, 5vw, 72px); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }footer a { color: var(--blue); font-weight: 800; text-decoration: none; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 10; max-width: 330px; padding: 12px 16px; color: var(--white); background: var(--navy); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.2); font-size: 13px; opacity: 0; transform: translateY(15px); pointer-events: none; transition: .25s ease; }.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }.hero-card { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr); }.preview-panel { overflow: hidden; border-top: 1px solid var(--line); border-left: 0; }.empty-preview { min-height: 360px; }
}
@media (max-width: 640px) {
  .topbar { height: 68px; padding: 0 16px; }.brand-copy small { display: none; }.brand-copy strong { font-size: 18px; }.brand-mark { width: 35px; height: 35px; }
  .hero { padding: 45px 20px 64px; }.hero h1 { font-size: 38px; letter-spacing: -1.7px; }.hero p { font-size: 15px; }.trust-row { gap: 10px 15px; font-size: 11px; }
  .workspace { margin: -24px 10px 42px; border-radius: 16px; }.form-panel, .preview-panel { padding: 25px 18px; }.panel-heading, .preview-toolbar { margin-bottom: 25px; }
  .field-grid.two { grid-template-columns: 1fr; gap: 0; }.form-section { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }.section-number { width: 27px; height: 27px; }
  .form-actions .primary-button { flex: 1; }.document { min-height: 600px; padding: 30px 22px; overflow: hidden; font-size: 11px; }.activity-table { min-width: 520px; }.document .table-scroll { display: block; max-width: 100%; overflow-x: auto; }
  .result-actions { display: grid; grid-template-columns: 1fr 1fr; }.result-actions .primary-button { grid-column: 1 / -1; }
  .about-strip { margin: 0 10px 42px; padding: 28px 24px; grid-template-columns: 1fr; gap: 20px; }
  footer { padding: 25px 20px; flex-direction: column; align-items: flex-start; gap: 7px; }
}

@media print {
  body { background: white; }
  body * { visibility: hidden; }
  #printDocument, #printDocument * { visibility: visible; }
  #printDocument { position: absolute; inset: 0; width: 100%; min-height: 0; padding: 10mm 12mm; border: 0; box-shadow: none; font-size: 10.5pt; }
  #printDocument h2 { break-after: avoid; }
  #printDocument table { break-inside: avoid; }
  @page { size: A4; margin: 9mm; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
