/* LAPY PROCH / Editorial App v3 — designed for a small, high-trust mobile interface */
:root{--paper:#f8f5f0;--cream:#fffefa;--choc:#26170f;--choc2:#382319;--warm:#765644;--muted:#71665d;--line:#e9e1d7;--serif:Georgia,'Times New Roman',serif;--sans:-apple-system,BlinkMacSystemFont,'Segoe UI',Inter,Manrope,system-ui,sans-serif}
html{background:#1c100c}body{font:14px/1.52 var(--sans);letter-spacing:-.015em}
.phone{max-width:485px;background:var(--paper);padding-bottom:calc(93px + env(safe-area-inset-bottom))}
.desktop-atmosphere{background:radial-gradient(ellipse at 12% 12%,#4c3024 0,#221510 43%,#150e0b 100%)}
.desktop-label{letter-spacing:-.075em}.desktop-label span{color:#c8b1a3}
.app-header{height:77px;background:var(--paper);padding:10px 23px;border-color:#e7ddd2;position:sticky;top:0}
.brand{gap:11px}.brand-symbol{width:49px;height:49px;border-radius:13px;background:#eee1d4;border:1px solid #e2d3c1;box-shadow:inset 0 1px 0 #fff8}
.brand-symbol img{width:91%;height:91%}.brand-copy{gap:4px}.brand-copy strong{font-size:19px;font-weight:930;letter-spacing:-.058em}.brand-copy small{font-size:10px;letter-spacing:-.005em;color:#736358}
.header-info{background:#efe7dc;border-color:#dfd2c3;width:38px;height:38px;border-radius:12px}
.demo-ribbon{background:#eee2d3;color:#6d4d38;font-size:10px;font-weight:650;padding:8px 17px}
.page{padding:23px 21px 35px}.home-page{padding-top:18px}
.hero{min-height:449px;border-radius:23px;background:radial-gradient(ellipse at 94% 66%,#77543b 0%,#442a1d 40%,#251710 81%);box-shadow:0 20px 48px -35px #21130fce;padding:28px 25px 21px;overflow:hidden;display:flex;justify-content:space-between}
.hero:before{right:-120px;top:42px;width:350px;height:350px;z-index:0;border:1px solid #f4cca41c}.hero:after{right:-77px;bottom:-237px;width:425px;height:425px;border:1px solid #f3c7a61c;z-index:0}
.hero-sheen{position:absolute;inset:0;background:linear-gradient(127deg,#ffffff0d,transparent 42%,#d49e6c09);pointer-events:none}
.hero-intro{width:100%;max-width:100%;z-index:2;position:relative}
.hero .eyebrow{font-size:9px;letter-spacing:.11em;color:#e9c9aa;font-weight:780;display:flex;align-items:center;gap:8px;white-space:normal}
.pindot{display:block;width:6px;height:6px;background:#efc79e;border-radius:50%;box-shadow:0 0 0 4px #f2c69e1e}
.hero-title{font:850 clamp(38px,10.2vw,48px)/.99 var(--sans);letter-spacing:-.064em;color:#fff6ed;margin:19px 0 12px;max-width:350px}
.hero-title em{font-style:normal;color:#e4b994}
.hero-lead{font-size:12px;line-height:1.55;color:#ebd8c8;max-width:208px}
.hero-art{position:absolute;right:-7px;top:140px;width:171px;height:210px;z-index:1;opacity:.96}
.hero-art img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 17px 15px #16090555)}
.hero-bottom{margin-top:74px;position:relative;z-index:3}
.hero-values{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:15px}
.hero-values span{border:1px solid #ebd0b43f;border-radius:30px;color:#ddbeaa;padding:4px 8px;font-size:9px;font-weight:650;background:#ffffff08}
.hero-cta{min-height:55px;background:#f3e5d2;border-radius:12px;color:#2c1c14;box-shadow:0 9px 21px #11070426;padding:0 17px;margin:0;font-size:14px;font-weight:800;letter-spacing:-.02em}
.hero-cta:hover{background:#fff4e5}.hero-cta-arrow{display:grid;place-items:center;width:31px;height:31px;background:#dccaaf;border-radius:9px;font-size:19px}
.section-head{margin:29px 0 14px;align-items:end}.section-head h2{font-size:23px;letter-spacing:-.04em;font-weight:850;line-height:1.16}
.section-kicker{display:block;font-weight:820;color:#98775d;font-size:9px;letter-spacing:.13em;margin-bottom:6px}
.section-head small{font-size:10px;color:#998879;text-align:right;padding-bottom:2px}
.actions-row{display:grid;grid-template-columns:1fr;gap:10px;margin-top:0}
.action-card{min-height:160px;background:#fffdfa;border:1px solid #e5d9cc;border-radius:18px;box-shadow:0 5px 16px #301c0c06;text-align:left;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;padding:18px 17px 16px;isolation:isolate;overflow:hidden}
.action-card-index{display:block;color:#91745f;font-size:9px;font-weight:800;letter-spacing:.1em;position:relative;z-index:2}
.action-card-content{position:relative;z-index:2;display:block;max-width:230px}
.action-card strong{font-size:23px;line-height:1.06;letter-spacing:-.045em;font-weight:820;max-width:240px;color:#2d1c13}
.action-card small{font-size:11px;display:block;margin-top:9px;max-width:200px;line-height:1.4;color:#746455}
.action-card img{position:absolute;right:13px;bottom:14px;width:115px;height:125px;margin:0;z-index:1;filter:drop-shadow(0 7px 10px #2d1a1517);object-fit:contain}
.action-card-content{max-width:210px}.action-arrow{position:absolute;top:13px;right:15px;font-weight:680;font-size:18px;color:#9b7356}
.card-help{background:#f3e8dc;border-color:#e2cbb8}
.card-help:after{content:"";position:absolute;right:-80px;top:-60px;width:200px;height:200px;border:1px solid #bf936642;border-radius:50%;z-index:0}
.secondary-section-head{margin-top:35px}.utility-list{gap:9px}
.utility-card{background:#fffdf9;border-color:#e9dfd4;border-radius:15px;padding:12px;min-height:76px;gap:12px}
.utility-art{height:54px;width:58px;border-radius:12px;background:#f4ece2;display:grid;place-items:center;flex-shrink:0}
.utility-card .utility-art img{width:54px;height:51px;object-fit:contain}
.utility-card strong{font-size:14px;color:#2c1b13;letter-spacing:-.02em}.utility-card span:not(.utility-art){font-size:11px;color:#746357;line-height:1.4}
.utility-card .chev{border:1px solid #e0cebd;width:27px;height:27px;border-radius:9px;text-align:center;font-size:18px;line-height:24px;flex-shrink:0;font-style:normal;color:#6f503e}
.urgent-note{display:flex;align-items:flex-start;gap:12px;border-radius:17px;border:1px solid #dbc3b1;background:#eee0d3;margin-top:24px;padding:17px}
.urgent-note strong{font-size:12px;font-weight:820;color:#513122}.urgent-note p{font-size:11px;line-height:1.55;color:#745b4c;margin:7px 0 0}
.urgent-symbol{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#f8ebdf;border:1px solid #c9a58d;color:#7d5139;font-weight:800;flex-shrink:0}
.home-foot{margin-top:28px;font-size:9px;letter-spacing:.09em;font-weight:700;color:#9e8e7f}
.bottom-nav{height:calc(78px + env(safe-area-inset-bottom));background:#fffdfa;box-shadow:0 -12px 30px #27170f12;border-top-color:#e8ded3;padding:8px 8px calc(9px + env(safe-area-inset-bottom));gap:5px;max-width:485px}
.nav-item{border-radius:13px;gap:4px;font-size:10px;color:#827267;font-weight:730;letter-spacing:-.015em}.nav-item.active{color:#322016;background:#f1e7dc}
.nav-item .nav-ico{height:24px}.nav-item svg{width:22px;height:22px}.nav-main{background:#332016;color:#fff7ee}.nav-main.active{background:#332016}.nav-main .nav-ico svg{width:23px;height:23px}
/* all secondary screens */
.page-title{font-size:32px;line-height:1.08;font-weight:850;letter-spacing:-.06em;color:#291a13;margin:11px 0 12px}
.page-lead{font-size:13px;line-height:1.62;color:#746254;margin-bottom:21px}
.eyebrow{font-size:10px;color:#946d53;font-weight:810;letter-spacing:.1em}
.back-link{font-size:12px;font-weight:750;color:#644838;margin-bottom:25px}
.select-hero{background:#f0e4d6;border:1px solid #e3d2c0;border-radius:19px;padding:23px 22px 23px;margin-bottom:18px}
.select-hero .page-title{font-size:33px}.select-hero p{color:#745f50;font-size:12px;line-height:1.55;margin:0}
.choice-list{gap:11px}.choice{border-radius:18px;min-height:194px;padding:20px 14px 20px 19px;background:#fffdfa;gap:4px;border-color:#e5d9cc;align-items:center}
.choice h3{font-size:23px;line-height:1.1;font-weight:840;color:#2d1b12;letter-spacing:-.045em}.choice-copy{align-self:stretch;display:flex;flex-direction:column;align-items:start;justify-content:center;position:relative;z-index:2}
.choice-copy .eyebrow{font-size:9px;margin-bottom:14px;color:#957156}.choice p{font-size:11px;line-height:1.55;max-width:190px;color:#746357}.choice img{width:125px;height:130px;object-fit:contain;margin-right:-5px;align-self:flex-end}
.choice-inline{font-size:11px;margin-top:13px;color:#805a42;font-weight:830}.choice.dark{background:linear-gradient(125deg,#40271b,#2c1b13);border-color:#3f271b;color:white}.choice.dark h3{color:#fff7ea}.choice.dark .choice-inline{color:#eac3a5}.choice.dark .eyebrow{color:#d3a887}.choice.dark p{color:#d9bdab}
.choice.selected{box-shadow:inset 0 0 0 2px #ab805a}
.note{background:#eee2d6;border-color:#e3d3c4;border-radius:15px;padding:15px 16px;font-size:12px;color:#694f40;line-height:1.56}
/* Forms: accessible contrast and comfortable finger targets */
.step-overline{margin-top:2px;font-size:11px;font-weight:800;color:#705544}.progress{gap:6px;margin:10px 0 22px}.progress span{height:5px;background:#e4d9cb;border-radius:10px}.progress span.current,.progress span.done{background:#76503a}
.field{gap:8px;margin:20px 0}.field label,.field>span{font-size:13px;font-weight:790;color:#3b2a20}.field small{font-size:11px;line-height:1.5;color:#746459}.mini-heading{font-size:14px;margin:25px 0 10px;color:#2d1c13}
.input,.select,.textarea{background:#fffefa;border-color:#d9cabc;border-radius:12px;min-height:53px;padding:14px 15px;font-size:14px;color:#352216;box-shadow:0 1px 1px #21140704}
.input::placeholder,.textarea::placeholder{color:#9d9086}.textarea{min-height:139px}
.category-list{gap:10px}.cat{min-height:83px;padding:12px 11px;background:#fffdfa;border-color:#e2d6ca;border-radius:14px;font-size:12px;line-height:1.45;color:#35241c;font-weight:740}
.cat i{width:33px;height:33px;background:#f1e4d5;color:#80583d;border-radius:10px}.cat.active{background:#f3e4d3;border-color:#986b50}
.radio-row{min-height:53px;background:#fffefa;border-radius:12px;font-size:13px}
.wizard-footer{margin-top:28px;gap:9px}.btn{min-height:54px;font-size:13px;border-radius:12px;font-weight:800}.btn.primary{background:#382418;color:#fff9f2}.btn.primary:hover{background:#5a3a28}.btn.secondary{background:#eadfd3}
.review-card{border-radius:16px;background:#fffefa}.review-row{padding:14px}.review-row strong{color:#3a271c;font-weight:690}.review-row span{color:#786758;font-size:11px}.review-row button{font-weight:750}
.file-drop{border-radius:14px;background:#f5ece2;padding:22px 16px}.file-drop strong{font-weight:820}.file-drop p{font-size:12px}
/* knowledge screens */
.article-item{min-height:93px;background:#fffefa;border-radius:15px;padding:11px 14px}.article-item strong{font-weight:820;font-size:14px}.article-item img{width:67px;height:67px}.article-body{font-size:14px;border-radius:17px;background:#fffcf7;color:#513d30;line-height:1.73;padding:21px}
.faq-search .input{height:54px}.faq-list{gap:10px}details.faq{border-radius:14px;background:#fffefa}details.faq summary{font-weight:800;font-size:13px;line-height:1.55;padding:17px 24px 17px 0}details.faq p{color:#695648;font-size:13px}
.empty{background:#fffcf7;border-radius:18px}.report-card{border-radius:16px;background:#fffefa;padding:18px}.report-card h3{font-size:17px;font-weight:800}.success-screen h1{font:850 31px/1.1 var(--sans)}
@media(max-width:360px){.page{padding:18px 16px 30px}.app-header{padding:8px 16px}.hero{min-height:440px;padding:24px 19px 18px}.hero-title{font-size:39px}.hero-art{width:142px;height:181px;top:160px;right:-12px}.hero-lead{max-width:170px}.hero-bottom{margin-top:76px}.hero-values span{font-size:8px;padding:4px 6px}.hero .eyebrow{font-size:8px}.action-card img{width:100px;right:5px}.action-card-content{max-width:200px}.section-head small{max-width:110px}.brand-copy strong{font-size:18px}.brand-copy small{font-size:9px}.choice{min-height:185px;padding-left:15px}.choice img{width:94px;height:113px}.choice h3{font-size:21px}.choice p{max-width:166px}.bottom-nav{gap:1px}}
@media(min-width:750px){.page{padding-left:24px;padding-right:24px}.home-page{padding-top:23px}.hero{min-height:460px}.hero-art{width:202px;height:218px;right:1px;top:126px}}
@media(prefers-reduced-motion:reduce){.page{animation:none}html{scroll-behavior:auto}}
/* Final optical adjustment: image never sits behind hero copy on 320–430 px. */
.hero-lead{max-width:166px}
@media(max-width:360px){.hero-lead{max-width:142px}}
.bottom-nav .nav-item.nav-main,.bottom-nav .nav-item.nav-main.active{color:#fff7ec;background:#332016}


/* ========================================================================
   LAPY PROCH — V4 / Color contrast & optical grid audit (2026-10-20)
   Dark ink for EVERY light block; light ink exclusively on dark panels.
   ======================================================================== */
:root { color-scheme: light; --ui-ink:#2b1b13; --ui-copy:#614e40; --ui-muted:#766559; --ui-paper:#f8f5f0; --ui-white:#fffefa; }
html,body { color:var(--ui-ink); }
/* Consistent readable headings on all light surfaces, including AJAX-rendered screens. */
.page-title,.section-head h2,.mini-heading,.select-hero .page-title,
.action-card strong,.choice:not(.dark) h3,.utility-card strong,.article-item strong,
.article-body h3,.report-card h3,.empty h3,.success-screen h1,
.review-row strong,details.faq summary,.file-drop strong { color:var(--ui-ink); }
.page-lead,.choice:not(.dark) p,.action-card small,.article-item small,
.utility-card span:not(.utility-art),.empty p,.success-screen p,
.footer-policy,.muted { color:var(--ui-copy); }
/* Explicit inverse colors only on dark, intentionally contrasting areas. */
.hero,.hero .hero-title,.hero .hero-title em,.hero .hero-intro,
.choice.dark,.choice.dark h3,.detail-hero,.detail-hero strong { color:#fff6ec; }
.hero .hero-title em { color:#e9c2a4; }
.choice.dark .eyebrow,.detail-hero small { color:#ead1bc; }
.choice.dark p { color:#f0ddca; }
.choice.dark .choice-inline { color:#ffe1c5; }
.hero-cta,.hero-cta span {color:#302015;}
.nav-main,.nav-main span,.nav-main.active,.nav-main.active span {color:#fff8f0;}
/* Optically consistent columns / spacing, no accidental text/image overlap. */
.page{width:100%;min-width:0;}
.page :is(h1,h2,h3,p,small,strong,span){overflow-wrap:break-word;}
.page-title {margin-block:11px 13px;max-width:100%;text-wrap:balance;}
.section-head{align-items:end;gap:12px;min-width:0;}
.section-head > div:first-child{min-width:0;flex:1;}
.section-head h2{margin:0;max-width:100%;text-wrap:balance;}
.section-head > small{flex:0 0 auto;max-width:36%;line-height:1.4;}
.action-card{min-width:0;min-height:171px;padding:19px 17px 17px;}
.action-card-index{max-width:calc(100% - 27px);line-height:1.35;}
.action-card-content{max-width:calc(100% - 115px);min-width:0;}
.action-card strong {font-size:clamp(20px,5.85vw,23px);line-height:1.12;}
.action-card small{max-width:100%;line-height:1.5;}
.action-card img{width:108px;height:116px;right:9px;bottom:11px;}
.action-arrow{right:15px;top:14px;}
.choice{min-width:0;gap:10px;min-height:190px;}
.choice-copy{flex:1;min-width:0;align-items:stretch;}
.choice h3{max-width:100%;text-wrap:balance;line-height:1.12;}
.choice img{flex:0 0 auto;width:clamp(93px,29vw,122px);height:126px;margin:0 -4px 0 0;}
.choice p{max-width:100%;} 
.choice .choice-inline{display:block;line-height:1.4;}
.utility-card{gap:12px;}
.utility-card > div:not(.utility-art){min-width:0;flex:1;}
.utility-card .chev{margin-left:auto;}
.article-item > span{min-width:0;flex:1;}
.article-item > .chev{color:#7c5c46;}
.article-item,.utility-card,.report-card,.choice,.action-card{transition:transform .12s,border-color .12s;}
/* Form rows and review controls align reliably at 320px widths. */
.category-list{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;}
.cat{min-width:0;align-items:center;word-break:normal;}
.review-row{align-items:center;min-width:0;gap:12px;}
.review-row .review-value{flex:1;min-width:0;}
.review-row button{flex:0 0 auto;white-space:nowrap;min-height:35px;padding-inline:11px;}
.wizard-footer{width:100%;align-items:stretch;}
.wizard-footer .btn{min-width:0;min-height:54px;}
.wizard-footer .btn.primary{flex:1;gap:7px;}
.report-card .meta{flex-wrap:wrap;}
.file-row{min-width:0;}
.file-row > span{min-width:0;}
/* Header, logo, nav and content all share the same horizontal rhythm. */
.app-header{padding-inline:21px;}
.brand-copy{min-width:0;}
.brand-copy strong{color:var(--ui-ink);}
.brand-copy small{color:#685748;}
.nav-ico{width:25px;align-items:center;justify-content:center;}
.bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;}
.nav-item{min-width:0;padding-inline:2px;align-items:center;text-align:center;}
.note,.urgent-note{align-items:flex-start;}
/* Keep typed content and control text readable even with Telegram dark theme. */
input,select,textarea{color-scheme:light;}
.input,.select,.textarea{color:var(--ui-ink);}
.input::placeholder,.textarea::placeholder{color:#837064;opacity:1;}
@media(max-width:360px){
 .app-header{padding-inline:16px;}
 .page{padding-inline:16px;}
 .section-head h2{font-size:21px;}
 .section-head>small{max-width:92px;}
 .action-card{min-height:185px;padding:17px 14px 15px;}
 .action-card-content{max-width:calc(100% - 94px);}
 .action-card img{width:91px;height:101px;right:4px;bottom:10px;}
 .action-card strong{font-size:20px;line-height:1.12;}
 .action-card small{font-size:11px;}
 .choice{padding:17px 13px 17px 15px;min-height:184px;gap:8px;}
 .choice img{width:92px;height:106px;align-self:center;}
 .choice h3{font-size:20px;}
 .choice p{font-size:11px;}
 .review-row{padding:12px 11px;}
 .review-row button{font-size:11px;}
 .bottom-nav{gap:1px;}
}
@media(prefers-reduced-motion:reduce){.article-item,.utility-card,.report-card,.choice,.action-card{transition:none;}}
/* Small metadata must remain legible on the cream canvas. */
.section-kicker,.eyebrow,.choice-copy .eyebrow,.action-card-index{color:#78543c;}
.section-head small,.section-tiny{color:#695747;}
.home-foot{color:#735d4b;}
.choice.dark .eyebrow{color:#e8bd9d;}
.hero .eyebrow{color:#f0ceac;}
/* No initial 50% opacity on screen changes: content must always have full contrast. */
.page{animation:none;}

/* Non-blocking requests: keep feedback visible without a blank screen. */
.reports-loading,.reports-error{padding:18px;margin:14px 0;border:1px solid #e5d9cc;border-radius:14px;background:#fffdfa;color:#614e40;font-size:13px;line-height:1.55}
.reports-error .btn{display:block;margin-top:12px}

/* Legal templates – public reading surface */
.lp-template-promo {display:flex;align-items:center;text-align:left;gap:15px;padding:17px 16px;border:1px solid #d7c4b4;border-radius:17px;background:#efe1d2;color:#342116;width:100%;margin-bottom:22px;cursor:pointer}
.lp-template-promo span:nth-child(2){flex:1;display:grid;gap:5px}
.lp-template-promo strong{font-size:17px;line-height:1.22;font-weight:750}
.lp-template-promo small{font-size:12px;line-height:1.5;opacity:.78}
.lp-template-icon{display:grid;place-items:center;flex:0 0 46px;height:48px;border-radius:12px;background:#3c261b;color:#f6e9dc;font-size:25px}
.lp-template-list{display:grid;gap:10px;margin:15px 0}
.lp-template-list .article-item .lp-template-icon{width:48px;height:50px}
.lp-template-body{display:block;width:100%;min-height:460px;padding:19px;border:1px solid #d8c6b8;border-radius:15px;background:#fffdfa;color:#322018;line-height:1.7;font-size:14px;white-space:pre-wrap;resize:vertical;box-sizing:border-box}

.lp-template-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0 18px}.lp-template-filters .select{font-size:13px;min-width:0}
@media(max-width:400px){.lp-template-filters{grid-template-columns:1fr}}
