:root{--leg-green:#07552d;--leg-green-2:#0f6a3a;--leg-ink:#153523;--leg-muted:#64766b;--leg-line:#d3e2d7;--leg-mint:#eaf5ed;--leg-cream:#fff8e7;--leg-white:#fff;--leg-shadow:0 18px 46px rgba(19,62,35,.11)}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body.leg-page{margin:0;background:#eef5ef;color:var(--leg-ink);font-family:'Plus Jakarta Sans',Arial,sans-serif;-webkit-font-smoothing:antialiased}
body.leg-page::before{position:fixed;z-index:-1;inset:0;background:radial-gradient(circle at 8% 10%,rgba(99,180,116,.17),transparent 28%),radial-gradient(circle at 92% 28%,rgba(233,185,70,.11),transparent 25%),linear-gradient(135deg,#f7fbf8,#eaf3ec);content:""}
a{color:inherit}
button,input,textarea{font:inherit}
button,a{-webkit-tap-highlight-color:transparent}
.leg-shell{width:min(1120px,calc(100% - 40px));margin-inline:auto}
.leg-site-header{position:sticky;z-index:40;top:0;border-bottom:1px solid rgba(19,66,36,.1);background:rgba(255,255,255,.92);backdrop-filter:blur(16px)}
.leg-site-header__inner{display:flex;min-height:64px;align-items:center;justify-content:space-between;gap:18px}
.leg-brand{display:flex;min-height:44px;align-items:center;gap:10px;text-decoration:none}
.leg-brand img{width:36px;height:36px;object-fit:contain}
.leg-brand span,.leg-brand strong,.leg-brand small{display:block}
.leg-brand strong{font-size:14px;font-weight:800;line-height:1.2}
.leg-brand small{margin-top:2px;color:var(--leg-muted);font-size:8px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.leg-header-actions{display:flex;align-items:center;gap:8px}
.leg-header-actions a{display:inline-flex;min-height:42px;align-items:center;gap:7px;padding:0 12px;border:1px solid var(--leg-line);border-radius:13px;background:#fff;color:#244a32;font-size:9px;font-weight:800;text-decoration:none;transition:border-color .18s ease,background-color .18s ease,transform .18s ease}
.leg-header-actions a:hover,.leg-header-actions a:focus-visible{border-color:#9ec9a8;background:var(--leg-mint);transform:translateY(-1px)}
.leg-header-actions svg{width:17px;height:17px}
.leg-main{padding:24px 0 36px}
.leg-hero{position:relative;display:grid;grid-template-columns:52px minmax(0,1fr) auto auto;align-items:center;gap:15px;overflow:hidden;padding:20px 22px;border:1px solid rgba(255,255,255,.3);border-radius:24px;background:linear-gradient(135deg,#063c22,#0b6034);box-shadow:var(--leg-shadow);color:#fff}
.leg-hero::after{position:absolute;right:-44px;top:-88px;width:220px;height:220px;border:38px solid rgba(255,255,255,.055);border-radius:50%;content:"";pointer-events:none}
.leg-hero__mark{display:grid;width:52px;height:52px;place-items:center;border:1px solid rgba(255,255,255,.18);border-radius:15px;background:rgba(255,255,255,.1)}
.leg-hero__mark svg{width:25px;height:25px}
.leg-hero__copy{position:relative;z-index:1;min-width:0}
.leg-hero__copy small{display:block;color:#9fe0b1;font-size:8px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.leg-hero h1{margin:3px 0 4px;font-size:28px;font-weight:800;letter-spacing:-.045em;line-height:1.05}
.leg-hero p{max-width:670px;margin:0;color:#d4e7d9;font-size:10px;line-height:1.55}
.leg-hero__meta{position:relative;z-index:1;display:grid;min-width:76px;min-height:58px;place-content:center;border:1px solid rgba(255,255,255,.2);border-radius:15px;background:rgba(255,255,255,.08);text-align:center}
.leg-hero__meta strong{font-size:20px;line-height:1}.leg-hero__meta span{margin-top:4px;color:#cde1d2;font-size:7px;font-weight:800;text-transform:uppercase}
.leg-add{position:relative;z-index:1;display:inline-flex;min-height:46px;align-items:center;gap:8px;padding:0 16px;border:0;border-radius:14px;background:#fff;color:var(--leg-green);font-size:10px;font-weight:800;cursor:pointer;box-shadow:0 8px 22px rgba(0,0,0,.14);transition:transform .18s ease,box-shadow .18s ease}
.leg-add:hover,.leg-add:focus-visible{transform:translateY(-1px);box-shadow:0 12px 26px rgba(0,0,0,.18)}
.leg-add svg{width:18px;height:18px}
.leg-alert{display:flex;align-items:center;gap:10px;margin-top:14px;padding:11px 13px;border:1px solid;border-radius:14px;font-size:10px;font-weight:700}
.leg-alert svg{width:20px;height:20px;flex:0 0 auto}.leg-alert.is-success{border-color:#acd4b6;background:#eff9f2;color:#0a6331}.leg-alert.is-error{border-color:#e5b5ad;background:#fff2ef;color:#9f3629}
.leg-library{margin-top:16px;padding:20px;border:1px solid rgba(25,76,41,.13);border-radius:24px;background:rgba(255,255,255,.9);box-shadow:0 12px 34px rgba(30,70,41,.07)}
.leg-library__head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px}
.leg-library__head small{color:var(--leg-green-2);font-size:8px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}
.leg-library__head h2{margin:3px 0 0;font-size:22px;letter-spacing:-.04em}
.leg-search{display:flex;width:min(290px,100%);min-height:44px;align-items:center;gap:9px;padding:0 12px;border:1px solid var(--leg-line);border-radius:13px;background:#f9fcfa;color:#64786a;transition:border-color .18s ease,box-shadow .18s ease}
.leg-search:focus-within{border-color:#7fb88d;box-shadow:0 0 0 3px rgba(22,133,72,.1)}
.leg-search svg{width:18px;height:18px;flex:0 0 auto}.leg-search input{width:100%;border:0;outline:0;background:transparent;color:var(--leg-ink);font-size:10px}
.leg-filters{display:flex;gap:7px;margin-top:16px;padding-bottom:2px;overflow-x:auto;scrollbar-width:none}.leg-filters::-webkit-scrollbar{display:none}
.leg-filters button{display:inline-flex;min-height:38px;flex:0 0 auto;align-items:center;gap:7px;padding:0 12px;border:1px solid var(--leg-line);border-radius:12px;background:#fff;color:#486254;font-size:9px;font-weight:800;cursor:pointer;transition:background-color .18s ease,color .18s ease,border-color .18s ease}
.leg-filters button span{display:grid;min-width:20px;height:20px;place-items:center;border-radius:7px;background:#eef4ef;font-size:7px}
.leg-filters button.is-active{border-color:var(--leg-green);background:var(--leg-green);color:#fff}.leg-filters button.is-active span{background:rgba(255,255,255,.16)}
.leg-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:15px}
.leg-card{display:flex;min-width:0;min-height:246px;flex-direction:column;padding:15px;border:1px solid var(--leg-line);border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(35,73,45,.055);animation:leg-card-in .38s cubic-bezier(.16,.95,.24,1) both;animation-delay:calc(var(--leg-index) * 35ms);transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.leg-card:hover{border-color:#9fc9aa;box-shadow:0 13px 30px rgba(35,73,45,.1);transform:translateY(-2px)}
.leg-card[hidden]{display:none!important}
.leg-card>header{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px}
.leg-card__file{display:grid;width:42px;height:42px;place-items:center;border-radius:13px;background:var(--leg-mint);color:var(--leg-green)}
.leg-card__file[data-type="pdf"]{background:#fff0ec;color:#b14433}.leg-card__file[data-type="jpeg"],.leg-card__file[data-type="jpg"],.leg-card__file[data-type="png"]{background:#edf1ff;color:#3755a4}
.leg-card__file svg{width:21px;height:21px}
.leg-card__badges{display:flex;min-width:0;align-items:center;gap:5px;flex-wrap:wrap}.leg-card__badges i{padding:4px 6px;border-radius:7px;background:#edf6ef;color:#13703d;font-size:7px;font-style:normal;font-weight:800}.leg-card__badges i.is-support{background:#fff1ca;color:#8a5d16}
.leg-card__number{color:#aec0b4;font-size:10px;font-weight:800}
.leg-card__copy{margin-top:13px}.leg-card__copy h3{margin:0;color:#163824;font-size:14px;font-weight:800;line-height:1.35;letter-spacing:-.02em}.leg-card__copy p{display:-webkit-box;overflow:hidden;margin:7px 0 0;color:var(--leg-muted);font-size:9px;line-height:1.6;-webkit-box-orient:vertical;-webkit-line-clamp:3}
.leg-card__meta{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;padding-top:13px;color:#738078;font-size:8px}.leg-card__meta span{overflow:hidden;min-width:0;text-overflow:ellipsis;white-space:nowrap}.leg-card__meta strong{flex:0 0 auto;color:#365541;font-size:8px}
.leg-card>footer{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:11px;padding-top:11px;border-top:1px solid #e4ece6}
.leg-button{display:inline-flex;min-height:44px;align-items:center;justify-content:center;gap:7px;padding:0 12px;border:1px solid #b9d2c0;border-radius:12px;background:#fff;color:var(--leg-green);font-size:9px;font-weight:800;text-decoration:none;transition:background-color .18s ease,border-color .18s ease,transform .18s ease}
.leg-button:hover,.leg-button:focus-visible{border-color:#83b590;background:#edf7f0;transform:translateY(-1px)}.leg-button.is-primary{border-color:var(--leg-green);background:var(--leg-green);color:#fff}.leg-button.is-primary:hover{background:#0a6937}.leg-button svg{width:17px;height:17px}
.leg-empty{padding:48px 20px;text-align:center}.leg-empty svg{width:40px;height:40px;color:#7e9b86}.leg-empty h3{margin:12px 0 5px;font-size:16px}.leg-empty p{margin:0;color:var(--leg-muted);font-size:10px}
.leg-footer{padding:0 0 24px}.leg-footer>div{display:flex;min-height:76px;align-items:center;justify-content:space-between;gap:20px;padding:14px 18px;border-radius:20px;background:#073c22;color:#fff}.leg-footer>div>span{display:flex;align-items:center;gap:10px}.leg-footer img{width:36px;height:36px;object-fit:contain}.leg-footer strong,.leg-footer small{display:block}.leg-footer strong{font-size:12px}.leg-footer small{margin-top:2px;color:#acd0b6;font-size:7px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.leg-footer p{margin:0;color:#c9ded0;font-size:8px}
body.leg-modal-open{overflow:hidden}
.leg-modal{position:fixed;z-index:100;inset:0;display:flex;align-items:center;justify-content:center;padding:18px;visibility:hidden;opacity:0;transition:visibility 0s linear .22s,opacity .2s ease}
.leg-modal.is-open{visibility:visible;opacity:1;transition-delay:0s}.leg-modal.is-closing{visibility:visible}
.leg-modal__scrim{position:absolute;inset:0;border:0;background:rgba(6,26,14,.62);backdrop-filter:blur(7px);cursor:pointer}
.leg-modal__panel{position:relative;width:min(540px,100%);max-height:min(88dvh,720px);overflow:auto;border:1px solid rgba(255,255,255,.55);border-radius:23px;background:#fff;box-shadow:0 28px 80px rgba(0,0,0,.25);transform:translateY(14px) scale(.985);transition:transform .24s cubic-bezier(.16,.95,.24,1)}
.leg-modal.is-open .leg-modal__panel{transform:none}.leg-modal.is-closing .leg-modal__panel{transform:translateY(10px) scale(.99)}
.leg-modal__panel>header{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:11px;padding:16px 17px;border-bottom:1px solid var(--leg-line);background:#f5faf6}
.leg-modal__mark{display:grid;width:44px;height:44px;place-items:center;border-radius:13px;background:var(--leg-green);color:#fff}.leg-modal__mark svg{width:21px;height:21px}.leg-modal__panel>header small{display:block;color:#168548;font-size:7px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}.leg-modal__panel>header h2{margin:2px 0 0;font-size:19px;letter-spacing:-.035em}.leg-modal__panel>header>button{display:grid;width:44px;height:44px;place-items:center;border:1px solid var(--leg-line);border-radius:12px;background:#fff;color:#30563d;cursor:pointer}.leg-modal__panel>header>button svg{width:19px;height:19px}
.leg-modal form{display:grid;gap:14px;padding:17px}
.leg-field{display:grid;gap:7px}.leg-field>span{color:#254b32;font-size:9px;font-weight:800}.leg-field>span b{color:#b33f31}.leg-field>span i{margin-left:5px;color:#7b8980;font-size:7px;font-style:normal;font-weight:700}.leg-field input,.leg-field textarea{width:100%;border:1px solid var(--leg-line);border-radius:12px;background:#fbfdfb;color:var(--leg-ink);font-size:10px;outline:none;transition:border-color .18s ease,box-shadow .18s ease}.leg-field input{min-height:44px;padding:0 12px}.leg-field textarea{resize:vertical;padding:11px 12px;line-height:1.55}.leg-field input:focus,.leg-field textarea:focus{border-color:#7bb389;box-shadow:0 0 0 3px rgba(22,133,72,.1)}.leg-field>small{color:#738178;font-size:8px;line-height:1.45}
.leg-upload{display:flex;min-height:86px;align-items:center;gap:12px;padding:13px;border:1px dashed #9fc5a8;border-radius:15px;background:#f2f9f4;color:var(--leg-green);cursor:pointer;transition:border-color .18s ease,background-color .18s ease}.leg-upload:hover,.leg-upload:focus-within,.leg-upload.has-file{border-color:#168548;background:#eaf6ed}.leg-upload input{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.leg-upload>svg{width:29px;height:29px;flex:0 0 auto}.leg-upload>span{min-width:0}.leg-upload strong,.leg-upload small{display:block}.leg-upload strong{overflow:hidden;color:#153d25;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.leg-upload small{margin-top:5px;color:#607468;font-size:8px;line-height:1.45}
.leg-upload-status{padding:10px 11px;border-radius:12px;background:#edf6ef}.leg-upload-status>span{display:block;overflow:hidden;height:6px;border-radius:999px;background:#d5e6d9}.leg-upload-status i{display:block;width:0;height:100%;border-radius:inherit;background:#168548;transition:width .2s ease}.leg-upload-status p{margin:7px 0 0;color:#456050;font-size:8px;font-weight:700}
.leg-modal form>footer{display:flex;justify-content:flex-end;gap:8px;padding-top:3px}.leg-cancel,.leg-submit{display:inline-flex;min-height:44px;align-items:center;justify-content:center;border-radius:12px;font-size:9px;font-weight:800;cursor:pointer}.leg-cancel{padding:0 16px;border:1px solid var(--leg-line);background:#fff;color:#4d6254}.leg-submit{gap:8px;padding:0 17px;border:0;background:var(--leg-green);color:#fff}.leg-submit svg{width:17px;height:17px}.leg-submit:disabled{cursor:wait;opacity:.68}
.leg-detail-hero{display:grid;grid-template-columns:52px minmax(0,1fr) minmax(260px,auto);gap:16px;padding:20px;border:1px solid var(--leg-line);border-radius:22px;background:#fff;box-shadow:var(--leg-shadow)}
.leg-detail-hero__icon{display:grid;width:52px;height:52px;place-items:center;border-radius:15px;background:var(--leg-mint);color:var(--leg-green)}.leg-detail-hero__icon svg{width:25px;height:25px}.leg-detail-badge{display:inline-flex;padding:5px 8px;border-radius:8px;background:#e8f5ec;color:#13703d;font-size:7px;font-weight:800;text-transform:uppercase}.leg-detail-hero h1{margin:7px 0 5px;font-size:24px;line-height:1.2;letter-spacing:-.04em}.leg-detail-hero p{margin:0;color:var(--leg-muted);font-size:9px;line-height:1.6}.leg-detail-hero dl{display:grid;gap:7px;margin:0}.leg-detail-hero dl div{display:grid;grid-template-columns:62px minmax(0,1fr);gap:8px;padding-bottom:7px;border-bottom:1px solid #e4ece6}.leg-detail-hero dt{color:#76877c;font-size:8px}.leg-detail-hero dd{overflow:hidden;margin:0;color:#2b4f37;font-size:8px;font-weight:800;text-overflow:ellipsis;white-space:nowrap}.leg-detail-hero__actions{grid-column:2/-1;display:flex;gap:8px}.leg-preview{margin-top:14px;overflow:hidden;border:1px solid var(--leg-line);border-radius:22px;background:#fff;box-shadow:0 12px 34px rgba(30,70,41,.07)}.leg-preview>header{display:flex;min-height:68px;align-items:center;justify-content:space-between;gap:16px;padding:13px 17px;border-bottom:1px solid var(--leg-line);background:#f6faf7}.leg-preview>header small{color:#168548;font-size:7px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.leg-preview>header h2{margin:2px 0 0;font-size:17px}.leg-preview>header>span{padding:5px 8px;border-radius:8px;background:#e8f5ec;color:#13703d;font-size:8px;font-weight:800}.leg-preview iframe{display:block;width:100%;height:calc(100vh - 240px);min-height:560px;border:0;background:#e8eee9}.leg-preview__image{display:grid;min-height:520px;place-items:center;padding:20px;background:#eef3ef}.leg-preview__image img{max-width:100%;max-height:760px;border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.14)}.leg-preview__fallback{display:grid;min-height:360px;place-items:center;align-content:center;padding:30px;text-align:center}.leg-preview__fallback>svg{width:48px;height:48px;color:#6b8b74}.leg-preview__fallback h3{margin:13px 0 5px;font-size:17px}.leg-preview__fallback p{margin:0 0 16px;color:var(--leg-muted);font-size:10px}
@keyframes leg-card-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media(max-width:760px){
  .leg-shell{width:calc(100% - 24px)}.leg-site-header__inner{min-height:58px}.leg-brand img{width:32px;height:32px}.leg-header-actions a{width:44px;min-height:44px;justify-content:center;padding:0}.leg-header-actions a span{display:none}
  .leg-main{padding:12px 0 24px}.leg-hero{grid-template-columns:44px minmax(0,1fr) auto;padding:15px;border-radius:19px}.leg-hero__mark{width:44px;height:44px;border-radius:13px}.leg-hero h1{font-size:22px}.leg-hero p{font-size:9px}.leg-hero__meta{min-width:58px;min-height:50px}.leg-hero__meta strong{font-size:17px}.leg-add{grid-column:2/-1;width:100%;min-height:42px;margin-top:-3px;justify-content:center}
  .leg-library{margin-top:12px;padding:13px;border-radius:19px}.leg-library__head{align-items:stretch;flex-direction:column;gap:11px}.leg-library__head h2{font-size:19px}.leg-search{width:100%}.leg-filters{margin-top:11px}.leg-grid{grid-template-columns:1fr;gap:9px;margin-top:11px}.leg-card{min-height:0;padding:13px;border-radius:16px}.leg-card__copy h3{font-size:13px}.leg-card__copy p{-webkit-line-clamp:2}.leg-card>footer{margin-top:10px}.leg-footer>div{align-items:flex-start;flex-direction:column;gap:8px;min-height:0;padding:14px}.leg-footer p{line-height:1.5}
  .leg-modal{align-items:flex-end;padding:8px 8px max(8px,env(safe-area-inset-bottom))}.leg-modal__panel{width:100%;max-height:calc(100dvh - max(16px,env(safe-area-inset-top)));border-radius:22px 22px 16px 16px}.leg-modal__panel::before{display:block;width:38px;height:4px;margin:8px auto 0;border-radius:999px;background:#c7d7cb;content:""}.leg-modal__panel>header{padding:11px 13px 13px}.leg-modal form{gap:12px;padding:14px}.leg-upload{min-height:78px}.leg-modal form>footer{position:sticky;bottom:0;margin:0 -14px -14px;padding:10px 14px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--leg-line);background:#fff}.leg-cancel,.leg-submit{flex:1}
  .leg-detail-hero{grid-template-columns:44px minmax(0,1fr);gap:12px;padding:14px;border-radius:18px}.leg-detail-hero__icon{width:44px;height:44px;border-radius:13px}.leg-detail-hero h1{font-size:19px}.leg-detail-hero dl{grid-column:1/-1}.leg-detail-hero__actions{grid-column:1/-1}.leg-detail-hero__actions .leg-button{flex:1}.leg-preview{border-radius:18px}.leg-preview iframe{height:68dvh;min-height:440px}.leg-preview__image{min-height:360px;padding:12px}
}
@media(max-width:380px){.leg-shell{width:calc(100% - 18px)}.leg-hero{grid-template-columns:40px minmax(0,1fr) 52px;gap:9px;padding:12px}.leg-hero__mark{width:40px;height:40px}.leg-hero h1{font-size:20px}.leg-hero p{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.leg-card__copy h3{font-size:12px}.leg-modal form{padding:12px}.leg-modal form>footer{margin-inline:-12px;margin-bottom:-12px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.leg-card,.leg-modal,.leg-modal__panel,.leg-button,.leg-add,.leg-header-actions a{animation:none!important;transition:none!important}}

/* Visual-scale alignment with the public SD, TK ABA, Profile PRM and
   e-Dokufile pages. Legal documents remain efficient to scan without using
   utility-sized typography that weakens readability. */
.leg-site-header__inner{min-height:72px}
.leg-brand{gap:12px}
.leg-brand img{width:40px;height:40px}
.leg-brand strong{font-size:16px}
.leg-brand small{font-size:10px}
.leg-header-actions a{min-height:44px;padding-inline:15px;font-size:11px}
.leg-main{padding:32px 0 0}
.leg-hero{grid-template-columns:64px minmax(0,1fr) auto auto;gap:20px;padding:28px 30px;border-radius:28px}
.leg-hero__mark{width:64px;height:64px;border-radius:18px}
.leg-hero__mark svg{width:30px;height:30px}
.leg-hero__copy small{font-size:10px}
.leg-hero h1{margin:5px 0 7px;font-size:43px;line-height:1.08}
.leg-hero p{font-size:14px;line-height:1.7}
.leg-hero__meta{min-width:88px;min-height:68px;border-radius:17px}
.leg-hero__meta strong{font-size:26px}
.leg-hero__meta span{font-size:9px}
.leg-add{min-height:48px;padding-inline:18px;font-size:12px}
.leg-alert{gap:12px;margin-top:18px;padding:14px 16px;font-size:12px;line-height:1.55}
.leg-library{margin-top:24px;padding:28px;border-radius:28px}
.leg-library__head{gap:24px}
.leg-library__head small{font-size:10px}
.leg-library__head h2{margin-top:5px;font-size:30px}
.leg-search{width:min(330px,100%);min-height:48px;padding-inline:15px}
.leg-search input{font-size:13px}
.leg-filters{gap:9px;margin-top:20px}
.leg-filters button{min-height:44px;padding-inline:15px;font-size:11px}
.leg-filters button span{min-width:24px;height:24px;font-size:9px}
.leg-grid{gap:18px;margin-top:20px}
.leg-card{min-height:318px;padding:22px;border-radius:22px}
.leg-card>header{grid-template-columns:48px minmax(0,1fr) auto;gap:13px}
.leg-card__file{width:48px;height:48px;border-radius:14px}
.leg-card__file svg{width:23px;height:23px}
.leg-card__badges{gap:7px}
.leg-card__badges i{padding:5px 8px;font-size:9px}
.leg-card__number{font-size:12px}
.leg-card__copy{margin-top:18px}
.leg-card__copy h3{font-size:18px;line-height:1.4}
.leg-card__copy p{display:block;overflow:visible;margin-top:9px;font-size:14px;line-height:1.65;-webkit-line-clamp:unset}
.leg-card__meta{gap:13px;padding-top:17px;font-size:11px;line-height:1.5}
.leg-card__meta strong{font-size:11px}
.leg-card>footer{gap:10px;margin-top:15px;padding-top:15px}
.leg-button{min-height:48px;padding-inline:15px;font-size:12px}
.leg-button svg{width:18px;height:18px}
.leg-empty h3{font-size:20px}
.leg-empty p{font-size:13px;line-height:1.6}

/* The same footer structure and visual rhythm used by the other public pages. */
.leg-footer{margin-top:48px;padding:0;border-top:1px solid var(--leg-line);background:#fff}
.leg-footer>.leg-footer__inner{display:grid;grid-template-columns:1fr auto;align-items:center;gap:24px;min-height:0;padding:28px 0;border-radius:0;background:transparent;color:var(--leg-ink)}
.leg-footer__brand{display:flex;align-items:center;gap:12px}
.leg-footer__brand img{width:36px;height:36px;object-fit:contain}
.leg-footer__brand>span,.leg-footer__brand strong,.leg-footer__brand small{display:block}
.leg-footer__brand strong{font-size:16px;font-weight:800}
.leg-footer__brand small{margin-top:3px;color:var(--leg-muted);font-size:13px;font-weight:400;letter-spacing:0;text-transform:none}
.leg-footer__credit{color:var(--leg-muted);font-size:13px;line-height:1.7;text-align:right}
.leg-footer__credit a{color:var(--leg-green);font-weight:800;text-decoration:underline;text-decoration-color:rgba(7,85,45,.25);text-underline-offset:3px}
.leg-footer__credit a:hover,.leg-footer__credit a:focus-visible{text-decoration-color:currentColor}

/* Admin form follows the same readable type scale as the document cards. */
.leg-modal__panel{width:min(580px,100%)}
.leg-modal__panel>header{grid-template-columns:48px minmax(0,1fr) 44px;gap:13px;padding:19px 21px}
.leg-modal__mark{width:48px;height:48px}
.leg-modal__panel>header small{font-size:9px}
.leg-modal__panel>header h2{font-size:22px}
.leg-modal form{gap:18px;padding:22px}
.leg-field{gap:9px}
.leg-field>span{font-size:11px}
.leg-field>span i{font-size:9px}
.leg-field input,.leg-field textarea{font-size:13px}
.leg-field input{min-height:48px;padding-inline:14px}
.leg-field textarea{padding:13px 14px}
.leg-field>small{font-size:10px;line-height:1.55}
.leg-upload{min-height:104px;gap:15px;padding:17px}
.leg-upload>svg{width:34px;height:34px}
.leg-upload strong{font-size:13px}
.leg-upload small{font-size:10px;line-height:1.55}
.leg-upload-status{padding:12px 14px}
.leg-upload-status p{font-size:10px}
.leg-cancel,.leg-submit{min-height:48px;font-size:12px}

/* Detail view uses the same heading/body/meta hierarchy as the listing. */
.leg-detail-hero{grid-template-columns:60px minmax(0,1fr) minmax(280px,auto);gap:20px;padding:26px;border-radius:26px}
.leg-detail-hero__icon{width:60px;height:60px;border-radius:17px}
.leg-detail-hero__icon svg{width:28px;height:28px}
.leg-detail-badge{padding:6px 9px;font-size:9px}
.leg-detail-hero h1{margin:9px 0 7px;font-size:34px;line-height:1.25}
.leg-detail-hero p{font-size:14px;line-height:1.7}
.leg-detail-hero dl{gap:9px}
.leg-detail-hero dl div{grid-template-columns:74px minmax(0,1fr);gap:10px;padding-bottom:9px}
.leg-detail-hero dt,.leg-detail-hero dd{font-size:11px;line-height:1.5}
.leg-detail-hero__actions{gap:10px;margin-top:2px}
.leg-preview{margin-top:20px;border-radius:26px}
.leg-preview>header{min-height:80px;padding:16px 22px}
.leg-preview>header small{font-size:9px}
.leg-preview>header h2{margin-top:4px;font-size:22px}
.leg-preview>header>span{padding:6px 9px;font-size:10px}
.leg-preview__fallback h3{font-size:20px}
.leg-preview__fallback p{font-size:13px;line-height:1.65}

@media(max-width:760px){
  .leg-shell{width:calc(100% - 28px)}
  .leg-site-header__inner{min-height:64px}
  .leg-brand{gap:10px}
  .leg-brand img{width:36px;height:36px}
  .leg-brand strong{font-size:14px}
  .leg-brand small{font-size:9px}
  .leg-main{padding:16px 0 0}
  .leg-hero{grid-template-columns:50px minmax(0,1fr) auto;gap:13px;padding:20px;border-radius:22px}
  .leg-hero__mark{width:50px;height:50px;border-radius:14px}
  .leg-hero__mark svg{width:24px;height:24px}
  .leg-hero__copy small{font-size:9px}
  .leg-hero h1{margin:4px 0 6px;font-size:30px}
  .leg-hero p{font-size:13px;line-height:1.6}
  .leg-hero__meta{min-width:64px;min-height:58px}
  .leg-hero__meta strong{font-size:21px}
  .leg-hero__meta span{font-size:8px}
  .leg-add{min-height:46px;font-size:12px}
  .leg-library{margin-top:16px;padding:18px;border-radius:22px}
  .leg-library__head{gap:14px}
  .leg-library__head small{font-size:9px}
  .leg-library__head h2{font-size:25px}
  .leg-search{min-height:48px}
  .leg-search input{font-size:13px}
  .leg-filters{gap:8px;margin-top:14px}
  .leg-filters button{min-height:44px;padding-inline:14px;font-size:11px}
  .leg-grid{gap:14px;margin-top:15px}
  .leg-card{min-height:0;padding:18px;border-radius:19px}
  .leg-card>header{grid-template-columns:46px minmax(0,1fr) auto;gap:11px}
  .leg-card__file{width:46px;height:46px}
  .leg-card__badges i{font-size:9px}
  .leg-card__number{font-size:11px}
  .leg-card__copy{margin-top:15px}
  .leg-card__copy h3{font-size:18px;line-height:1.42}
  .leg-card__copy p{margin-top:8px;font-size:14px;line-height:1.65;-webkit-line-clamp:unset}
  .leg-card__meta{padding-top:15px;font-size:11px}
  .leg-card__meta strong{font-size:11px}
  .leg-card>footer{gap:9px;margin-top:14px;padding-top:14px}
  .leg-button{min-height:46px;font-size:12px}
  .leg-footer{margin-top:32px}
  .leg-footer>.leg-footer__inner{grid-template-columns:1fr;align-items:start;gap:14px;padding:24px 0}
  .leg-footer__brand strong{font-size:16px}
  .leg-footer__brand small{font-size:12px}
  .leg-footer__credit{font-size:13px;line-height:1.7;text-align:left}
  .leg-modal__panel>header{padding:15px 16px 16px}
  .leg-modal__panel>header h2{font-size:20px}
  .leg-modal form{gap:15px;padding:17px}
  .leg-field>span{font-size:11px}
  .leg-field input,.leg-field textarea{font-size:13px}
  .leg-upload{min-height:94px;padding:15px}
  .leg-upload strong{font-size:12px}
  .leg-upload small{font-size:10px}
  .leg-modal form>footer{margin:0 -17px -17px;padding:12px 17px calc(12px + env(safe-area-inset-bottom))}
  .leg-detail-hero{grid-template-columns:50px minmax(0,1fr);gap:14px;padding:18px;border-radius:21px}
  .leg-detail-hero__icon{width:50px;height:50px}
  .leg-detail-hero h1{font-size:25px;line-height:1.3}
  .leg-detail-hero p{font-size:14px}
  .leg-detail-hero dl{gap:9px}
  .leg-detail-hero dt,.leg-detail-hero dd{font-size:11px}
  .leg-preview{margin-top:16px;border-radius:21px}
  .leg-preview>header{min-height:72px;padding:14px 17px}
  .leg-preview>header h2{font-size:20px}
}

@media(max-width:380px){
  .leg-shell{width:calc(100% - 22px)}
  .leg-hero{grid-template-columns:46px minmax(0,1fr) 58px;gap:10px;padding:16px}
  .leg-hero__mark{width:46px;height:46px}
  .leg-hero h1{font-size:28px}
  .leg-hero p{font-size:12.5px;-webkit-line-clamp:3}
  .leg-card__copy h3{font-size:18px}
  .leg-modal form{padding:15px}
  .leg-modal form>footer{margin-inline:-15px;margin-bottom:-15px}
}
