/* demand-under-a-personal-guarantee-template (build_demand_under_a_personal_guarantee_template.py). Every rule starts with .tg-pg.
   Centrepiece: the demand letter with a copy of the signed guarantee clipped behind it, the debt as a table of invoices and the date for payment as a blank. */
.tg-pg .tg-in{max-width:1220px;margin:0 auto;padding:0 28px}
.tg-pg .tg-in h2{font-size:clamp(1.55rem,2.3vw,2rem);font-weight:700;letter-spacing:-.028em;line-height:1.15;margin:0}
.tg-pg .tg-ln{display:block;height:7px;border-radius:2px;background:var(--line);margin-top:9px;width:92%}
.tg-pg .tg-ln.b{width:76%}
.tg-pg .tg-ln.c{width:58%}
.tg-pg .tg-ln.d{width:36%}
.tg-pg .tg-title{font-family:var(--head);font-weight:700;letter-spacing:-.02em;color:var(--ink)}
.tg-pg .tg-bl{font-size:.8rem;font-weight:700;color:var(--mute);line-height:1.2;padding:16px 0 5px;border-bottom:1.5px solid var(--ink)}
.tg-pg .tg-cap{font-size:.9rem;line-height:1.5;color:var(--mute)}

.tg-pg .tpl{border:2px solid var(--ink);border-radius:14px;margin:0;max-width:none}
.tg-pg .tplbar{display:none}
.tg-pg .tplgate h3,.tg-pg .tplgate>p{color:var(--ink)}
.tg-pg .tplgate>p{margin-left:0}
.tg-pg .tplgate .tplnote{color:var(--ink)}
.tg-pg .tplcta{justify-content:flex-start}
.tg-pg .tplcta .btn{background:var(--ink);color:#fff;border-color:var(--ink)}
.tg-pg .tplsignin,.tg-pg .tplplans{color:var(--ink);text-decoration:underline;font-weight:700;font-size:.95rem}
.tg-pg .tpldfy form{display:grid;grid-template-columns:1fr;gap:10px}

.tg-pg .tg-get{padding:0 0 68px}
.tg-pg .tplgate{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,440px);column-gap:56px;align-content:start;background:var(--cfield);text-align:left;padding:40px 44px}
.tg-pg .tplgate>*{grid-column:1}
.tg-pg .tplgate h3{font-size:1.6rem}
.tg-pg .tplgate>.tpldfy{grid-column:2;grid-row:1/span 6;align-self:center;margin:0;max-width:none;background:#fff;border:2px solid var(--ink);border-radius:12px;padding:26px 28px;text-align:left}
.tg-pg .tg-get:has(.tpldoc:not(.hidden-guide)) .tplbar{display:flex}
@media (max-width:980px){
.tg-pg .tplgate{grid-template-columns:1fr;padding:30px 24px}
.tg-pg .tplgate>.tpldfy{grid-column:1;grid-row:auto;margin-top:26px}
}

.tg-pg .tg-top{background:#fff0f4;padding:64px 0 76px;margin-bottom:68px}
.tg-pg .tg-top>.tg-in{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:64px;align-items:start}
.tg-pg .tg-stack{position:relative;padding:64px 70px 0 0}
.tg-pg .tg-guar{position:absolute;right:6px;top:4px;width:62%;height:420px;transform:rotate(4deg);background:#fff;border:2px solid var(--ink);border-radius:4px;padding:16px 22px}
.tg-pg .tg-guar .tg-title{font-size:.98rem;text-align:right;padding-right:64px}
.tg-pg .tg-guar .tg-ln{margin-left:auto;width:50%}
.tg-pg .tg-letter{position:relative;background:#fff;border:2px solid var(--ink);border-radius:4px;box-shadow:12px 12px 0 var(--cfield);padding:40px 44px 40px}
.tg-pg .tg-letter:before{content:"";position:absolute;right:54px;top:-24px;width:20px;height:62px;border:3px solid var(--ink);border-radius:12px;background:transparent}
.tg-pg .tg-letter:after{content:"";position:absolute;right:59px;top:-14px;width:10px;height:40px;border:3px solid var(--ink);border-top:0;border-radius:0 0 8px 8px}
.tg-pg .tg-to{width:200px;margin-bottom:28px}
.tg-pg .tg-letter>.tg-title{font-size:1.4rem;line-height:1.25}
.tg-pg .tg-secs{list-style:none;counter-reset:s;margin-top:12px}
.tg-pg .tg-secs>li{counter-increment:s;position:relative;padding:16px 0 10px 34px}
.tg-pg .tg-secs>li:before{content:counter(s) ".";position:absolute;left:0;top:16px;font-family:var(--head);font-weight:700;color:var(--cd)}
.tg-pg .tg-secs h3{font-size:1.04rem;font-weight:700}
.tg-pg .tg-two{display:grid;grid-template-columns:1fr 1fr;gap:30px}
.tg-pg .tg-letter table{width:100%;margin-top:12px;border-collapse:collapse;border:2px solid var(--ink)}
.tg-pg .tg-letter th{text-align:left;font-size:.9rem;font-weight:700;padding:10px 14px;background:var(--ink);color:#fff}
.tg-pg .tg-letter th+th,.tg-pg .tg-letter td+td{width:34%;border-left:2px solid var(--ink)}
.tg-pg .tg-letter th+th{border-left-color:#fff}
.tg-pg .tg-letter td{height:36px;border-top:1px solid var(--ink)}
.tg-pg .tg-letter tr:last-child td+td{background:var(--cfield)}
.tg-pg .tg-pay{max-width:240px;color:var(--cd);border-bottom:3px solid var(--cfield)}
.tg-pg .tg-sign{display:block;width:170px;height:40px;margin:14px 0 0 34px;border-bottom:1.5px solid var(--ink)}
.tg-pg .tg-side p{margin-top:10px;font-size:1.04rem;line-height:1.65;color:#3d3b41}
.tg-pg .tg-list{list-style:none;counter-reset:n;margin-top:14px;border-top:2px solid var(--ink)}
.tg-pg .tg-list li{counter-increment:n;display:flex;gap:16px;padding:12px 0;border-bottom:1px solid #e6c3cf;font-family:var(--head);font-weight:700;font-size:1.04rem}
.tg-pg .tg-list li:before{content:counter(n);color:var(--cd)}
.tg-pg .tg-fill{margin-top:44px}

.tg-pg .tg-law{padding:64px 0}
.tg-pg .tg-law>.tg-in{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:56px;align-items:start}
.tg-pg .tg-law p{font-size:1.02rem;line-height:1.68;color:#3d3b41}
.tg-pg .tg-lawtx>p{margin-top:12px;max-width:68ch}
.tg-pg .tg-before{border:2px solid var(--ink);border-radius:14px;padding:26px 26px 28px;background:#fff}
.tg-pg .tg-before h2{font-size:1.25rem}
.tg-pg .tg-before p{margin-top:10px}
@media (max-width:980px){
.tg-pg .tg-law>.tg-in{grid-template-columns:1fr;gap:32px}
}

.tg-pg .tg-law{padding-top:0}
.tg-pg .tg-lim{margin-top:30px;max-width:680px}
.tg-pg .tg-lim>div{padding:14px 18px 16px;border:2px solid var(--ink);border-radius:8px}
.tg-pg .tg-six{width:50%;background:#fff0f4}
.tg-pg .tg-twelve{margin-top:10px;background:var(--cfield)}
.tg-pg .tg-lim h3{font-size:1.2rem}
.tg-pg .tg-lim p{margin-top:3px;font-size:.92rem;line-height:1.45;color:var(--ink)}

.tg-pg .tg-faq{padding:64px 0 28px}
.tg-pg .tg-faq>.tg-in{display:grid;grid-template-columns:280px minmax(0,1fr);gap:40px;align-items:start}
.tg-pg .tg-faq .faqs{max-width:none;padding-block:0}
@media (max-width:980px){
.tg-pg .tg-faq>.tg-in{grid-template-columns:1fr;gap:20px}
}

.tg-pg .art-rel{padding-block:44px 68px}
.tg-pg .art-rel>h2{font-size:1.4rem;margin-bottom:14px}
.tg-pg .art-rel-grid{border-top:2px solid var(--ink)}
.tg-pg .art-rel-grid a{flex-direction:row;align-items:center;min-height:0;padding:15px 4px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;font-size:1.02rem;gap:16px}
.tg-pg .art-rel-grid a:first-child{background:none;border-color:var(--line)}
.tg-pg .art-rel-grid a:hover{transform:none;box-shadow:none;color:var(--c)}

.tg-pg .art-rel-grid{display:grid;grid-template-columns:1fr 1fr;column-gap:48px;row-gap:0}
@media (max-width:760px){
.tg-pg .art-rel-grid{grid-template-columns:1fr}
}

@media (max-width:980px){
.tg-pg .tg-top>.tg-in{grid-template-columns:1fr;gap:44px}
}
@media (max-width:600px){
.tg-pg .tg-stack{padding:58px 18px 0 0}
.tg-pg .tg-guar{width:78%;right:0}
.tg-pg .tg-letter{padding:28px 20px 30px}
.tg-pg .tg-letter:before{right:30px}
.tg-pg .tg-letter:after{right:35px}
.tg-pg .tg-two{grid-template-columns:1fr;gap:0}
.tg-pg .tg-six{width:72%}
}
