/* FariDocs 1.9 — zoom-safe workspace, premium Home, and persistent themes */
html{background:#fff;color-scheme:light;scrollbar-gutter:stable}
body{min-width:320px;transition:background-color .24s ease,color .24s ease}

/* Theme control */
.theme-switch{flex:0 0 auto;width:66px;height:38px;padding:3px;border:1px solid #cbd9e2;border-radius:12px;background:#edf3f6;box-shadow:inset 0 1px 0 #fff;cursor:pointer}
.theme-track{position:relative;width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;align-items:center}
.theme-slider{position:absolute;z-index:0;top:1px;bottom:1px;left:1px;width:calc(50% - 1px);border-radius:8px;background:#fff;box-shadow:0 3px 9px rgba(15,53,84,.16);transition:transform .25s cubic-bezier(.2,.8,.2,1),background .25s}
.theme-switch.is-dark .theme-slider{transform:translateX(100%);background:#17384d}
.theme-icon{position:relative;z-index:1;display:grid;place-items:center;color:#6f8292;font-size:12px;line-height:1;transition:color .2s,transform .2s}
.theme-switch:not(.is-dark) .theme-sun,.theme-switch.is-dark .theme-moon{color:#0f4261;transform:scale(1.08)}
.theme-switch:focus-visible{outline:2px solid #c89b45;outline-offset:2px}
.nav-wrap{max-width:1360px;gap:20px}
.main-nav{gap:14px}.main-nav a{white-space:nowrap}

/* Zoom-safe centered generator shell */
.generator-main{width:100%;max-width:none;margin:0;padding:42px clamp(18px,3vw,54px) 90px;overflow-x:clip}
.generator-main>.generator-intro,.generator-main>.generator-toolbar,.generator-main>.generator-layout{width:min(100%,1720px);margin-right:auto;margin-left:auto}
.generator-main>.generator-intro{margin-bottom:25px}
.generator-main>.generator-toolbar{margin-bottom:18px}
.generator-layout{grid-template-columns:minmax(540px,1.12fr) minmax(460px,.88fr);gap:22px}
.document-form,.preview-column{min-width:0;width:100%}
.preview-column{justify-self:stretch}
.paper-wrap{display:flex;align-items:flex-start;justify-content:center;width:100%;overflow:hidden}
.document-preview{width:100%;max-width:720px;min-width:0!important;min-height:0!important;height:auto;margin-inline:auto;transform-origin:top center}
.document-preview.paper-letter{aspect-ratio:8.5/11}.document-preview.paper-a4{aspect-ratio:8.27/11.69}.document-preview.paper-f4{aspect-ratio:8.5/13}

/* Refined Home promotional experience */
.hero{position:relative;isolation:isolate;background:radial-gradient(circle at 82% 18%,rgba(25,168,151,.19),transparent 29%),radial-gradient(circle at 12% 2%,rgba(199,154,67,.12),transparent 25%),linear-gradient(180deg,#f8fcfd 0,#fff 87%)}
.hero::before{position:absolute;z-index:-1;inset:0;content:"";opacity:.34;background-image:linear-gradient(rgba(18,59,93,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(18,59,93,.035) 1px,transparent 1px);background-size:40px 40px;mask-image:linear-gradient(to bottom,#000,transparent 82%)}
.hero-copy h1{max-width:720px;text-wrap:balance}.hero-copy>p{text-wrap:pretty}
.hero-actions .btn{min-height:50px;padding-inline:23px;border-radius:11px}
.hero-metrics{position:relative;z-index:3;overflow:hidden;border-radius:16px 16px 0 0;box-shadow:0 -12px 45px rgba(15,53,84,.055)}
.hero-metrics div{height:104px}.hero-metrics strong{font-size:25px}.hero-metrics span{font-size:11px}
.home-trust-ribbon{width:min(1220px,calc(100% - 40px));margin:30px auto 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden;border:1px solid #d8e4ea;border-radius:17px;background:rgba(255,255,255,.92);box-shadow:0 18px 55px rgba(15,53,84,.08);backdrop-filter:blur(12px)}
.home-trust-ribbon article{min-width:0;display:flex;align-items:center;gap:13px;padding:20px 21px;border-right:1px solid #e0e8ed}
.home-trust-ribbon article:last-child{border-right:0}
.home-trust-ribbon article>span{width:43px;height:43px;flex:0 0 43px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(135deg,#e6f4f3,#edf3f7);color:#126d66;font-size:10px;font-weight:900;letter-spacing:.04em}
.home-trust-ribbon strong,.home-trust-ribbon small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-trust-ribbon strong{color:#17384f;font-size:13px}.home-trust-ribbon small{margin-top:2px;color:#758695;font-size:10px}
.document-card{overflow:hidden;border-radius:18px!important}.document-card::before{position:absolute;top:-70px;right:-65px;width:150px;height:150px;border-radius:50%;background:radial-gradient(circle,rgba(20,142,130,.1),transparent 67%);content:""}.document-card:hover{border-color:#bcd7dd;transform:translateY(-7px)}
.promo-showcase{border-color:#d4e2e9;background:radial-gradient(circle at 0 0,rgba(199,154,67,.13),transparent 32%),radial-gradient(circle at 100% 100%,rgba(20,142,130,.1),transparent 31%),#f9fbfc;box-shadow:0 30px 85px rgba(15,53,84,.1)}
.workflow-console{transform:perspective(1200px) rotateY(-1.5deg);box-shadow:0 28px 65px rgba(15,53,84,.15)}
.privacy-mode-section{box-shadow:0 34px 90px rgba(8,39,58,.25)}
.difference-card{border-radius:16px}.faq-list details{border-radius:8px;transition:background .2s}.faq-list details[open]{padding-inline:15px;background:#f6f9fa}

/* Dark theme — app chrome changes, document/PDF paper remains white */
html[data-theme="dark"]{color-scheme:dark;--navy:#17648c;--dark:#edf7fc;--teal:#51d2c0;--line:#29404f;--muted:#91a6b6;--soft:#112736;--shadow:0 20px 55px rgba(0,0,0,.32);background:#07131d}
html[data-theme="dark"] body{background:#07131d;color:#dce8ef}
html[data-theme="dark"] .site-header{border-color:#243b4a;background:rgba(7,23,34,.94);box-shadow:0 10px 32px rgba(0,0,0,.24)}
html[data-theme="dark"] .brand,html[data-theme="dark"] .main-nav a.active{color:#eff8fc}
html[data-theme="dark"] .main-nav a{color:#93a9b8}
html[data-theme="dark"] .theme-switch{border-color:#365160;background:#102a3a;box-shadow:inset 0 1px rgba(255,255,255,.05)}
html[data-theme="dark"] .theme-icon{color:#7590a2}html[data-theme="dark"] .theme-switch.is-dark .theme-moon{color:#dceef8}
html[data-theme="dark"] .language-switcher{border-color:#365160;background:#102a3a}
html[data-theme="dark"] .language-track{background:#0a202e}html[data-theme="dark"] .language-slider{background:#1b3c50;box-shadow:0 3px 10px rgba(0,0,0,.3)}html[data-theme="dark"] .language-track a{color:#7993a4}html[data-theme="dark"] .language-track a.active{color:#f1f8fc}
html[data-theme="dark"] .nav-toggle span{background:#e5f2f8}
html[data-theme="dark"] .main-nav.open{background:#0d2331}
html[data-theme="dark"] .hero{background:radial-gradient(circle at 82% 18%,rgba(31,174,155,.18),transparent 31%),radial-gradient(circle at 10% 0,rgba(199,154,67,.1),transparent 25%),linear-gradient(180deg,#0a1f2e,#07131d)}
html[data-theme="dark"] .hero::before{background-image:linear-gradient(rgba(147,187,207,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(147,187,207,.06) 1px,transparent 1px)}
html[data-theme="dark"] .hero-copy p,html[data-theme="dark"] .section-heading p{color:#91a6b6}
html[data-theme="dark"] .btn-ghost{border-color:#345061;background:#102635;color:#d9edf6}
html[data-theme="dark"] .document-stack,html[data-theme="dark"] .floating-chip,html[data-theme="dark"] .hero-metrics,html[data-theme="dark"] .home-trust-ribbon{border-color:#294352;background:#0e2534;color:#cfe0e9;box-shadow:0 22px 55px rgba(0,0,0,.25)}
html[data-theme="dark"] .mini-doc-head strong,html[data-theme="dark"] .home-trust-ribbon strong{color:#ecf7fb}html[data-theme="dark"] .mini-address i,html[data-theme="dark"] .mini-table i{background:#29404f}html[data-theme="dark"] .hero-metrics div,html[data-theme="dark"] .home-trust-ribbon article{border-color:#29404f}
html[data-theme="dark"] .home-trust-ribbon article>span{background:linear-gradient(135deg,#153b47,#173247);color:#7de0d1}html[data-theme="dark"] .home-trust-ribbon small{color:#8da4b4}
html[data-theme="dark"] .document-card,html[data-theme="dark"] .difference-card,html[data-theme="dark"] .sample-card,html[data-theme="dark"] .sample-label,html[data-theme="dark"] .faq-intro-card,html[data-theme="dark"] .faq-list details[open]{border-color:#29404f;background:#0e2534!important;box-shadow:0 15px 38px rgba(0,0,0,.15)}
html[data-theme="dark"] .document-card h3,html[data-theme="dark"] .difference-card h3,html[data-theme="dark"] .sample-label strong,html[data-theme="dark"] .faq-intro-card strong{color:#e5f2f8}html[data-theme="dark"] .document-card p,html[data-theme="dark"] .document-card li,html[data-theme="dark"] .difference-card p,html[data-theme="dark"] .faq-list p,html[data-theme="dark"] .faq-intro-card p{color:#91a6b6}
html[data-theme="dark"] .document-card a{border-color:#29404f;color:#79d9cb}html[data-theme="dark"] .card-number{color:#2b4657}html[data-theme="dark"] .card-icon,html[data-theme="dark"] .difference-card>span{border-color:#315061;background:#143043;color:#7bd8ca}
html[data-theme="dark"] .promo-showcase{border-color:#29404f;background:radial-gradient(circle at 0 0,rgba(199,154,67,.1),transparent 30%),radial-gradient(circle at 100% 100%,rgba(20,142,130,.1),transparent 30%),#0b202f;box-shadow:0 30px 80px rgba(0,0,0,.27)}html[data-theme="dark"] .promo-showcase h2{color:#eaf5fa}html[data-theme="dark"] .promo-showcase-copy>p{color:#91a6b6}
html[data-theme="dark"] .promo-badges span{border-color:#335060;background:#102838;color:#bfdae6}html[data-theme="dark"] .workflow-console{border-color:#355264;background:#0e2636}html[data-theme="dark"] .workflow-step>span{background:#173447;color:#76d9cb}html[data-theme="dark"] .workflow-step strong{color:#dceaf1}html[data-theme="dark"] .workflow-step small{color:#8ba0b0}html[data-theme="dark"] .workflow-result{background:#0a1d2a}html[data-theme="dark"] .workflow-result>div{color:#9aafbd}
html[data-theme="dark"] .sample-paper,html[data-theme="dark"] .calculation-card{background:#fff;color:#26364a}html[data-theme="dark"] .sample-section{background:transparent}
html[data-theme="dark"] .generator-main{background:#071722}
html[data-theme="dark"] .generator-intro p{color:#91a6b6}html[data-theme="dark"] .free-usage{border-color:#28594f;background:#0d302e}html[data-theme="dark"] .free-usage strong{color:#79d9c8}html[data-theme="dark"] .free-usage small{color:#adc3ce}
html[data-theme="dark"] .generator-toolbar,html[data-theme="dark"] .form-section,html[data-theme="dark"] .preview-column{border-color:#29404f;background:#0d2230;box-shadow:0 15px 40px rgba(0,0,0,.16)}
html[data-theme="dark"] .toolbar-label strong,html[data-theme="dark"] .section-title h2{color:#e4f0f6}html[data-theme="dark"] .toolbar-label small,html[data-theme="dark"] .section-title p,html[data-theme="dark"] .generator-toolbar label>span,html[data-theme="dark"] .field small{color:#8ea4b3}
html[data-theme="dark"] .sliders-icon,html[data-theme="dark"] .logo-placeholder b{background:#173447;color:#77d9ca}
html[data-theme="dark"] .generator-toolbar select,html[data-theme="dark"] .color-control,html[data-theme="dark"] .field input,html[data-theme="dark"] .field textarea,html[data-theme="dark"] .field select,html[data-theme="dark"] .input-prefix,html[data-theme="dark"] .suffix-input,html[data-theme="dark"] .money-input,html[data-theme="dark"] .item-row input{border-color:#365161;background:#0a1b27;color:#dceaf2}
html[data-theme="dark"] .field>span{color:#b7cbd6}html[data-theme="dark"] .logo-uploader,html[data-theme="dark"] .signature-uploader{border-color:#395667;background:#0a1b27}html[data-theme="dark"] .item-row{border-color:#29404f;background:#0a1c28}html[data-theme="dark"] .add-item{border-color:#3a5b6b;background:#102939;color:#8de1d5}html[data-theme="dark"] .optional-panel{border-color:#29404f;background:#0a1c28}html[data-theme="dark"] .optional-buttons button{border-color:#2f625b;background:#10322f;color:#75d6c8}
html[data-theme="dark"] .form-summary>div{color:#9bb0bd}html[data-theme="dark"] .paper-wrap{border-color:#29404f;background:#06131c}html[data-theme="dark"] .preview-top strong{color:#e2eff5}
html[data-theme="dark"] .document-preview{background:#fff;color:#24364b;box-shadow:0 18px 42px rgba(0,0,0,.4);color-scheme:light}
html[data-theme="dark"] .document-preview .preview-title-block h2{color:#111827}
html[data-theme="dark"] .mobile-actions{background:#0d2230}
html[data-theme="dark"] .guide-main,html[data-theme="dark"] .legal-main,html[data-theme="dark"] .blog-main{background:linear-gradient(180deg,#0a1d2a,#07131d 520px)}
html[data-theme="dark"] .guide-content,html[data-theme="dark"] .guide-choice-grid article,html[data-theme="dark"] .guide-pro-grid article,html[data-theme="dark"] .guide-faq-list details,html[data-theme="dark"] .legal-index,html[data-theme="dark"] .blog-featured,html[data-theme="dark"] .blog-card,html[data-theme="dark"] .blog-empty{border-color:#29404f;background:#0d2331;color:#dbe8ef;box-shadow:0 16px 40px rgba(0,0,0,.16)}
html[data-theme="dark"] .legal-hero h1,html[data-theme="dark"] .legal-content h2,html[data-theme="dark"] .blog-featured h2,html[data-theme="dark"] .blog-card h3,html[data-theme="dark"] .blog-detail-copy h1,html[data-theme="dark"] .guide-choice-grid h3,html[data-theme="dark"] .guide-pro-grid h3{color:#e8f4f9}html[data-theme="dark"] .legal-hero>p,html[data-theme="dark"] .legal-content p,html[data-theme="dark"] .blog-featured p,html[data-theme="dark"] .blog-card p,html[data-theme="dark"] .blog-detail-copy>p,html[data-theme="dark"] .blog-article-body{color:#9aafbd}
html[data-theme="dark"] .blog-hero-trust span,html[data-theme="dark"] .blog-tag-row a,html[data-theme="dark"] .blog-tag-row span,html[data-theme="dark"] .blog-detail-tags a{border-color:#355264;background:#102939;color:#a9c2cf}

@media(max-width:1180px) and (min-width:1001px){.generator-layout{grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr)}.nav-wrap{gap:13px}.main-nav{gap:8px}.main-nav a{font-size:12px}.items-table-head{display:none}.item-row{position:relative;grid-template-columns:1fr 1fr}.item-row label:first-child{grid-column:1/-1}.item-row label>span{display:block;color:var(--muted);font-size:8px}.item-row output{align-self:end;padding:9px}.calculation-layout{grid-template-columns:1fr}.identity-grid{grid-template-columns:145px 1fr}}
@media(max-width:1000px) and (min-width:701px){.generator-main{padding:32px 24px 75px}.generator-layout{display:grid;grid-template-columns:1fr}.preview-column{position:relative;z-index:auto;inset:auto;width:min(100%,760px);display:block;margin:22px auto 0;overflow:visible;border-radius:14px}.preview-top button{display:none}.mobile-actions{display:grid}.generator-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}.toolbar-label{grid-column:1/-1}.home-trust-ribbon{grid-template-columns:repeat(2,minmax(0,1fr))}.home-trust-ribbon article:nth-child(2){border-right:0}.home-trust-ribbon article:nth-child(-n+2){border-bottom:1px solid #e0e8ed}html[data-theme="dark"] .home-trust-ribbon article:nth-child(-n+2){border-bottom-color:#29404f}}
@media(max-width:700px){.generator-main{padding:27px 14px 70px}.generator-main>.generator-intro,.generator-main>.generator-toolbar,.generator-main>.generator-layout{width:100%}.generator-intro{align-items:flex-start;flex-direction:column;gap:16px}.generator-toolbar{grid-template-columns:1fr}.toolbar-label{grid-column:auto}.generator-layout{display:block}.identity-grid,.form-grid.two,.calculation-layout{grid-template-columns:1fr}.items-table-head{display:none}.item-row{position:relative;grid-template-columns:1fr 1fr}.item-row label:first-child{grid-column:1/-1}.item-row label>span{display:block;color:var(--muted);font-size:8px}.preview-column{position:fixed;z-index:100;inset:0;width:100%;display:none;margin:0;overflow:auto;border-radius:0}.preview-column.mobile-open{display:block}.paper-wrap{overflow:auto}.document-preview{min-width:390px!important}.home-trust-ribbon{grid-template-columns:1fr}.home-trust-ribbon article,.home-trust-ribbon article:nth-child(2){border-right:0;border-bottom:1px solid #e0e8ed}.home-trust-ribbon article:last-child{border-bottom:0}html[data-theme="dark"] .home-trust-ribbon article{border-bottom-color:#29404f}.workflow-console{transform:none}}
@media(max-width:620px){.nav-wrap{gap:9px}.theme-switch{order:2;width:58px;height:34px}.language-switcher{order:2;margin-left:0}.nav-toggle{order:3}.main-nav{order:4}.home-trust-ribbon{width:calc(100% - 28px);margin-top:20px}.hero-metrics{border-radius:12px 12px 0 0}}
@media(max-width:480px){.brand>span:last-child{display:none}.brand-mark{width:35px;height:35px}.theme-switch{width:56px}.language-track{width:70px!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}}
