/* FariDocs 1.10 — template designer and complete Home dark-mode heading */

html[data-theme="dark"] .hero-copy h1{color:#f0f8fc}
html[data-theme="dark"] .hero-kicker{color:#78ded0}

/* Template Designer lives in normal page flow, so it never overlays the form. */
.generator-main>.template-designer{width:min(100%,1720px);margin:0 auto 18px}
.template-designer{display:grid;grid-template-columns:minmax(190px,.75fr) minmax(0,3.25fr);align-items:center;gap:18px;padding:17px 18px;border:1px solid #d7e3e9;border-radius:14px;background:#fff;box-shadow:0 12px 32px rgba(15,53,84,.065)}
.template-designer-heading{display:flex;align-items:center;gap:11px;min-width:0}
.template-designer-heading strong,.template-designer-heading small{display:block}
.template-designer-heading strong{color:#17384f;font-size:12px;line-height:1.35}
.template-designer-heading small{margin-top:2px;color:#718493;font-size:8px;line-height:1.45}
.template-designer-icon{width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;border-radius:9px;background:#e8f4f3;color:#147b70;font-size:16px}
.template-options{min-width:0;display:grid;grid-template-columns:repeat(6,minmax(118px,1fr));gap:8px}
.template-choice{position:relative;min-width:0;min-height:78px;display:grid;grid-template-columns:43px minmax(0,1fr);align-items:center;gap:9px;padding:9px 9px;border:1px solid #d9e4ea;border-radius:10px;background:#fbfcfd;color:#1d3548;text-align:left;transition:border-color .18s,background .18s,box-shadow .18s,transform .18s}
.template-choice:hover{border-color:#91b8c4;background:#f7fbfc;transform:translateY(-1px)}
.template-choice.active{border-color:#188e82;background:#eff9f7;box-shadow:0 0 0 2px rgba(24,142,130,.1)}
.template-choice:focus-visible{outline:2px solid #c89b45;outline-offset:2px}
.template-choice-copy{min-width:0}.template-choice-copy strong,.template-choice-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.template-choice-copy strong{font-size:10px}.template-choice-copy small{margin-top:2px;color:#778997;font-size:7px}
.template-choice-check{position:absolute;top:5px;right:6px;width:15px;height:15px;display:none;place-items:center;border-radius:50%;background:#188e82;color:#fff;font-size:8px}.template-choice.active .template-choice-check{display:grid}
.template-choice-preview{position:relative;width:42px;height:55px;display:block;overflow:hidden;border:1px solid #cfdbe3;background:#fff;box-shadow:0 3px 8px rgba(15,53,84,.08)}
.template-choice-preview i,.template-choice-preview b,.template-choice-preview em,.template-choice-preview small{position:absolute;display:block;content:""}
.template-choice-preview i{top:6px;right:5px;width:16px;height:3px;background:#173e5c}
.template-choice-preview b{top:14px;right:5px;width:17px;height:5px;background:#148e82}
.template-choice-preview em{top:28px;right:5px;left:5px;height:6px;border-top:2px solid #173e5c;border-bottom:1px solid #dbe4ea}
.template-choice-preview small{right:5px;bottom:7px;width:13px;height:4px;border-top:1px solid #aebdc8;border-bottom:2px solid #173e5c}
.template-choice-professional{border-top:3px solid #148e82}.template-choice-professional i{width:22px}.template-choice-professional b{background:#173e5c}
.template-choice-corporate i{top:5px;right:4px;left:4px;width:auto;height:7px;background:#173e5c}.template-choice-corporate b{top:15px;right:4px;left:4px;width:auto;height:4px;background:#148e82}
.template-choice-minimal{box-shadow:none}.template-choice-minimal i{background:#5d7181}.template-choice-minimal b{height:4px;border:1px solid #148e82;background:#fff}.template-choice-minimal em{border-top:1px solid #148e82}
.template-choice-elegant{border:3px double #c9b89d}.template-choice-elegant i{background:#7b5d35}.template-choice-elegant b{background:#a98757}.template-choice-elegant em{border-top-color:#a98757}
.template-choice-classic i{right:7px;left:7px;width:auto;background:#2d3748}.template-choice-classic b{right:7px;left:7px;width:auto;background:#8b6f47}.template-choice-classic em{border-top-color:#2d3748}

html[data-theme="dark"] .template-designer{border-color:#294555;background:#0d2331;box-shadow:0 14px 34px rgba(0,0,0,.2)}
html[data-theme="dark"] .template-designer-heading strong{color:#e9f4f9}html[data-theme="dark"] .template-designer-heading small{color:#91a7b5}html[data-theme="dark"] .template-designer-icon{background:#153b42;color:#79dfcf}
html[data-theme="dark"] .template-choice{border-color:#34505f;background:#0a1c28;color:#dceaf1}html[data-theme="dark"] .template-choice:hover{border-color:#4b7182;background:#102a39}html[data-theme="dark"] .template-choice.active{border-color:#53cbbb;background:#10332f;box-shadow:0 0 0 2px rgba(83,203,187,.1)}html[data-theme="dark"] .template-choice-copy small{color:#8ea4b2}

/* Live preview themes only decorate existing safe regions; field geometry stays unchanged. */
.document-preview.template-professional .preview-header{border-top:4px solid var(--preview-accent);padding-top:7px}
.document-preview.template-professional .preview-title-block h2{color:var(--preview-accent);letter-spacing:.035em}
.document-preview.template-professional .preview-addresses span{letter-spacing:.04em}
.document-preview.template-professional .preview-items th{letter-spacing:.035em}

.document-preview.template-corporate .preview-title-block h2{color:var(--preview-accent);letter-spacing:.06em}
.document-preview.template-corporate .preview-origin-meta dd{color:var(--preview-accent);font-weight:800}
.document-preview.template-corporate .preview-addresses span{background:var(--preview-accent);color:#fff;letter-spacing:.045em}
.document-preview.template-corporate .preview-addresses>div{border-color:var(--preview-accent)}

.document-preview.template-minimal .preview-logo{border-color:transparent;background:transparent}
.document-preview.template-minimal .preview-title-block h2{color:#26364a;font-weight:650}
.document-preview.template-minimal .preview-title-block span{border:1px solid var(--preview-accent);background:#fff;color:var(--preview-accent)}
.document-preview.template-minimal .preview-addresses>div{border-width:0 0 1px}
.document-preview.template-minimal .preview-addresses span{border-bottom:1px solid #dce4e9;background:#fff}
.document-preview.template-minimal .preview-items th{border-top:1px solid var(--preview-accent);border-bottom:1px solid var(--preview-accent);background:#fff;color:var(--preview-accent)}
.document-preview.template-minimal .preview-items td{background:#fff}
.document-preview.template-minimal .preview-balance{border:1px solid var(--preview-accent);background:#fff!important;color:var(--preview-accent)}

.document-preview.template-elegant{box-shadow:inset 0 0 0 3px #eee7dc,0 18px 42px rgba(15,53,84,.12)}
.document-preview.template-elegant .preview-header{border-bottom:3px double #cbbda8}
.document-preview.template-elegant .preview-title-block h2{color:#5d4932;font-style:italic;font-weight:650;letter-spacing:.025em}
.document-preview.template-elegant .preview-addresses>div{border-color:#d9cdbb}
.document-preview.template-elegant .preview-addresses span{background:#f7f2eb;color:#745a38}
.document-preview.template-elegant .preview-items tr:nth-child(even) td{background:#fcfaf7}

.document-preview.template-classic .preview-header{border-bottom:1px solid #9d8c73}
.document-preview.template-classic .preview-title-block h2{color:#2d3748;letter-spacing:.085em}
.document-preview.template-classic .preview-title-block span{background:#2d3748}
.document-preview.template-classic .preview-addresses>div{border-color:#cfc5b6;background:#fdfbf7}
.document-preview.template-classic .preview-addresses span{background:#f3eee5;color:#3f4854}
.document-preview.template-classic .preview-items th{background:#2d3748}
.document-preview.template-classic .preview-balance{background:#2d3748!important}

@media(max-width:1320px){.template-designer{grid-template-columns:1fr}.template-options{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.generator-main>.template-designer{width:100%}.template-designer{gap:14px;padding:15px 13px}.template-options{grid-template-columns:repeat(2,minmax(0,1fr))}.template-choice{min-height:74px}.template-designer-heading strong{font-size:13px}.template-designer-heading small{font-size:9px}}
@media(max-width:380px){.template-choice{grid-template-columns:36px minmax(0,1fr);gap:7px;padding:8px 7px}.template-choice-preview{width:35px;height:49px}.template-choice-copy strong{font-size:9px}.template-choice-copy small{font-size:6.5px}}
