/* complaint-letter-template (build_complaint_letter_template.py). Every rule starts with .tf-complain.
   Centrepiece: the letter laid flat with its enclosures clipped on, purchase details boxed, remedies as tick boxes. */
.tf-complain .cp-in{max-width:1220px;margin:0 auto;padding:0 28px}
.tf-complain h2{font-size:clamp(1.55rem,2.4vw,2rem);font-weight:700;letter-spacing:-.03em;line-height:1.14;margin:0}

.tf-complain .cp-doc{padding:72px 0 84px;background:radial-gradient(circle at 1px 1px,#ffc9d6 1.5px,transparent 1.6px) 0 0/22px 22px,#fff}
.tf-complain .cp-doc-g{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:80px;align-items:center}
.tf-complain .cp-tx p{margin-top:12px;font-size:1.1rem;line-height:1.65;color:var(--ink);background:#fff}
.tf-complain .cp-tx h2{background:#fff;display:inline-block}
.tf-complain .cp-h-fill{margin-top:44px}
.tf-complain .cp-letter{position:relative;background:#fff;border:2px solid var(--ink);border-radius:3px;padding:44px 52px 48px;box-shadow:12px 12px 0 var(--ink);transform:rotate(.6deg)}
.tf-complain .cp-clip{position:absolute;top:-26px;right:34px;display:flex}
.tf-complain .cp-clip span{display:grid;place-items:end start;width:104px;height:92px;padding:8px 10px;background:#fff0f4;border:2px solid var(--ink);font-weight:700;font-size:.84rem}
.tf-complain .cp-clip span:first-child{transform:rotate(-6deg)}
.tf-complain .cp-clip span:last-child{margin-left:-30px;transform:rotate(5deg) translateY(8px);background:var(--cfield)}
.tf-complain .cp-clip:after{content:"";position:absolute;left:44px;top:-10px;width:16px;height:46px;border:3px solid var(--mute);border-radius:9px}
.tf-complain .cp-title{font-family:var(--head);font-weight:700;font-size:1.6rem;letter-spacing:-.025em}
.tf-complain .cp-ref{margin:24px 0 10px;display:grid;grid-template-columns:1fr 1fr;border:1.5px solid var(--ink)}
.tf-complain .cp-ref>div{padding:10px 14px 12px}
.tf-complain .cp-ref>div+div{border-left:1.5px solid var(--ink)}
.tf-complain .cp-ref dt{font-size:.86rem;font-weight:700;color:var(--cd)}
.tf-complain .cp-ref dd{margin:0;height:30px;border-bottom:1.5px dotted var(--mute)}
.tf-complain .cp-ps{list-style:none;margin:0;padding:0;counter-reset:cp}
.tf-complain .cp-ps li{counter-increment:cp;padding:20px 0 2px}
.tf-complain .cp-ps b{font-family:var(--head);font-size:1.06rem;letter-spacing:-.012em}
.tf-complain .cp-ps b:before{content:counter(cp) ". ";color:var(--c)}
.tf-complain .cp-ln{display:block;height:8px;border-radius:2px;background:var(--line);margin-top:10px}
.tf-complain .cp-ln.w70{width:70%}
.tf-complain .cp-ln.w45{width:45%}
.tf-complain .cp-want{display:flex;flex-wrap:wrap;gap:10px 26px;margin-top:12px}
.tf-complain .cp-want span{display:inline-flex;align-items:center;gap:9px;font-weight:700;font-size:.98rem}
.tf-complain .cp-want span:before{content:"";width:20px;height:20px;border:2px solid var(--ink);border-radius:4px;background:#fff0f4}
.tf-complain .cp-reply{display:flex;align-items:flex-end;gap:12px;margin-top:14px;font-weight:700;font-size:.98rem}
.tf-complain .cp-reply i{width:150px;height:26px;border-bottom:2px solid var(--cfield)}

.tf-complain .cp-law{background:#fff0f4;padding:80px 0 76px}
.tf-complain .cp-law-g{display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:72px;align-items:start}
.tf-complain .cp-law-tx>p{margin-top:14px;font-size:1.04rem;line-height:1.7;color:#3d3b41;max-width:64ch}
.tf-complain .cp-steps{margin-top:14px}
.tf-complain .cp-steps>p{margin-top:26px;font-weight:700;font-size:.95rem;color:var(--cd)}
.tf-complain .cp-steps ol{list-style:none;margin:10px 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
.tf-complain .cp-steps li{background:#fff;border:2px solid var(--ink);padding:14px 16px 16px;font-family:var(--head);font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.012em;min-height:104px}
.tf-complain .cp-steps li+li{margin-left:-2px}
.tf-complain .cp-steps li:nth-child(2){margin-top:22px}
.tf-complain .cp-steps li:nth-child(3){margin-top:44px}
.tf-complain .cp-steps li:first-child{background:var(--cfield);border-color:var(--ink)}
.tf-complain .cp-steps li b{display:block;font-family:var(--body);font-size:.84rem;font-weight:700;letter-spacing:0;margin-bottom:4px;color:var(--ink)}
.tf-complain .cp-steps .cp-two{grid-template-columns:repeat(2,minmax(0,1fr));max-width:66.6%}
.tf-complain .cp-steps .cp-two li{min-height:0}
.tf-complain .cp-steps .cp-two li:first-child{background:#fff}
.tf-complain .cp-range{display:flex;align-items:center;gap:14px;margin-top:12px;font-family:var(--head);font-weight:700;font-size:1.02rem}
.tf-complain .cp-range i{flex:1;height:14px;border-radius:999px;background:linear-gradient(to right,var(--cfield),var(--plum))}
.tf-complain .cp-h-before{margin-top:48px;font-size:1.3rem}
.tf-complain .cp-get{position:sticky;top:96px;min-width:0}
.tf-complain .tpl{border:0;border-radius:16px;margin:0;max-width:none;background:var(--plum)}
.tf-complain .tplbar{display:none}
.tf-complain .tplgate{background:var(--plum);text-align:left;padding:32px 30px 30px}
.tf-complain .tplgate h3{color:#fff}
.tf-complain .tplgate>p{color:#fbeef2;margin-left:0;max-width:none}
.tf-complain .tplcta{justify-content:flex-start}
.tf-complain .tplcta .btn{background:#fff;color:var(--ink);border-color:#fff;white-space:normal}
.tf-complain .tplsignin,.tf-complain .tplplans{color:#fff;text-decoration:underline}
.tf-complain .tpldfy{margin:26px 0 0;padding-top:24px;border-top:1px solid rgba(255,255,255,.4);text-align:left;max-width:none}
.tf-complain .tpldfy h4{color:#fff}
.tf-complain .tpldfy>p{color:#fbeef2;max-width:none}
.tf-complain .tpldfy .msg{color:#fbeef2}
.tf-complain .tpldfy form{display:grid;grid-template-columns:1fr;gap:10px}
.tf-complain .tpldfy button{background:var(--cfield);color:var(--ink)}
.tf-complain .cp-law-g:has(.tpldoc:not(.hidden-guide)){grid-template-columns:1fr}
.tf-complain .cp-law-g:has(.tpldoc:not(.hidden-guide)) .cp-get{position:static}
.tf-complain .cp-law-g:has(.tpldoc:not(.hidden-guide)) .tplbar{display:flex}
.tf-complain .cp-law-g:has(.tpldoc:not(.hidden-guide)) .tpl{background:#fff;border:2px solid var(--ink)}

.tf-complain .cp-ask{padding:72px 0 26px;color:var(--ink)}
.tf-complain .cp-ask-g{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:64px;align-items:start}
.tf-complain .cp-qs details.fq{border:2px solid var(--ink);border-radius:12px;padding:2px 22px;margin-bottom:12px}
.tf-complain .cp-qs details.fq[open]{background:#fff0f4}
.tf-complain .cp-qs .fqa{padding-bottom:18px}
.tf-complain .art-rel{padding-block:44px 76px}
.tf-complain .art-rel>h2{font-size:1.3rem;margin-bottom:16px}
.tf-complain .art-rel-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border-top:2px solid var(--ink);border-bottom:2px solid var(--ink)}
.tf-complain .art-rel-grid a,.tf-complain .art-rel-grid a:first-child{flex-direction:row;align-items:center;min-height:0;padding:20px 22px 20px 0;border:0;border-radius:0;background:none}
.tf-complain .art-rel-grid a+a{padding-left:22px;border-left:1px solid var(--ink)}
.tf-complain .art-rel-grid a:hover{transform:none;box-shadow:none;color:var(--c)}

@media(max-width:980px){
  .tf-complain .cp-doc-g,.tf-complain .cp-law-g,.tf-complain .cp-ask-g{grid-template-columns:1fr;gap:56px}
  .tf-complain .cp-ask-g{gap:22px}
  .tf-complain .cp-get{position:static}
}
@media(max-width:620px){
  .tf-complain .cp-doc{padding:44px 0 60px}
  .tf-complain .cp-letter{padding:54px 20px 30px;transform:none;box-shadow:6px 6px 0 var(--ink)}
  .tf-complain .cp-clip{right:14px}
  .tf-complain .cp-clip span{width:84px;height:72px}
  .tf-complain .cp-ref{grid-template-columns:1fr}
  .tf-complain .cp-ref>div+div{border-left:0;border-top:1.5px solid var(--ink)}
  .tf-complain .cp-steps ol,.tf-complain .cp-steps .cp-two{grid-template-columns:1fr;max-width:none}
  .tf-complain .cp-steps li{min-height:0}
  .tf-complain .cp-steps li+li{margin:-2px 0 0}
  .tf-complain .cp-steps li:nth-child(2){margin-left:14px}
  .tf-complain .cp-steps li:nth-child(3){margin-left:28px}
  .tf-complain .cp-law{padding:52px 0}
  .tf-complain .art-rel-grid{grid-template-columns:1fr}
  .tf-complain .art-rel-grid a+a{padding-left:0;border-left:0;border-top:1px solid var(--ink)}
}
