/* tools (build_tools.py). Every rule starts with .hb-tools.
   Centrepiece: each tool beside a drawing of the result it gives back, blank where an answer would be. */
.hb-tools .hbt-in{max-width:1220px;margin:0 auto;padding:0 28px}
.hb-tools section[class^="hbt-"]>.hbt-in>h2{font-size:clamp(1.7rem,2.6vw,2.3rem);font-weight:700;letter-spacing:-.03em;line-height:1.12;margin:0}
.hb-tools .hbt-ln{display:block;height:8px;border-radius:2px;background:var(--line);margin-top:9px}
.hb-tools .hbt-bl{display:inline-block;width:92px;height:0;border-bottom:2px solid var(--ink)}

/* the tools */
.hb-tools .hbt-bench{padding:56px 0 40px}
.hb-tools .hbt-tool{display:grid;grid-template-columns:minmax(0,1fr) 460px;gap:72px;align-items:center;padding:48px 0;border-bottom:2px solid var(--ink)}
.hb-tools .hbt-tool:last-child{border-bottom:0}
.hb-tools .hbt-tool:nth-child(odd):not(.hbt-lead) .hbt-out{order:-1}
.hb-tools .hbt-tool:nth-child(odd):not(.hbt-lead){grid-template-columns:460px minmax(0,1fr)}
.hb-tools .hbt-tx h2{font-size:clamp(1.5rem,2.3vw,2rem);font-weight:700;letter-spacing:-.03em;line-height:1.14}
.hb-tools .hbt-tx h2 a{color:var(--ink)}
.hb-tools .hbt-tx p{margin:14px 0 22px;font-size:1.08rem;line-height:1.65;color:#3d3b41;max-width:56ch}
.hb-tools .hbt-go{display:inline-block;background:var(--ink);color:#fff;font-family:var(--head);font-weight:700;font-size:.98rem;padding:13px 22px;border-radius:8px}
.hb-tools .hbt-go:hover{background:var(--cd)}
.hb-tools .hbt-out{background:#fff;border:2px solid var(--ink);border-radius:6px;box-shadow:12px 12px 0 var(--cfield);padding:26px 28px 28px;margin-right:12px;font-size:.95rem;color:var(--ink)}
.hb-tools .hbt-out b{font-family:var(--head);font-weight:700}

.hb-tools .hbt-lead{grid-template-columns:minmax(0,1fr) 520px;background:var(--cfield);border:0;border-radius:var(--r);padding:52px 56px 60px}
.hb-tools .hbt-lead .hbt-tx h2{font-size:clamp(1.9rem,3.2vw,2.7rem)}
.hb-tools .hbt-lead .hbt-tx p{color:var(--ink);font-size:1.14rem}
.hb-tools .hbt-lead .hbt-go:hover{background:#000}
.hb-tools .hbt-lead .hbt-out{box-shadow:12px 12px 0 var(--ink)}
.hb-tools .hbt-score{display:flex;align-items:flex-end;gap:14px;padding-bottom:18px;border-bottom:2px solid var(--ink)}
.hb-tools .hbt-score .hbt-bl{width:110px;margin-bottom:8px;border-bottom-width:3px}
.hb-tools .hbt-score span{font-family:var(--head);font-weight:700;font-size:1.7rem;letter-spacing:-.03em;line-height:1}
.hb-tools .hbt-areas{list-style:none;margin:6px 0 0;padding:0;display:grid;grid-template-columns:1fr 1fr;column-gap:36px}
.hb-tools .hbt-areas li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--line);font-weight:700}
.hb-tools .hbt-areas li:nth-last-child(-n+2){border-bottom:0;padding-bottom:0}
.hb-tools .hbt-areas i{flex:none;width:56px;height:14px;background:
  radial-gradient(circle at 7px 7px,#fff 0 4.5px,var(--ink) 5px 6.5px,transparent 7px),
  radial-gradient(circle at 28px 7px,#fff 0 4.5px,var(--ink) 5px 6.5px,transparent 7px),
  radial-gradient(circle at 49px 7px,#fff 0 4.5px,var(--ink) 5px 6.5px,transparent 7px)}

.hb-tools .hbt-row{display:flex;justify-content:space-between;align-items:baseline;gap:18px;padding:13px 0;border-bottom:1px solid var(--line)}
.hb-tools .hbt-row:first-child{padding-top:0}
.hb-tools .hbt-row:last-child{border-bottom:0;padding-bottom:0}
.hb-tools .hbt-row.hbt-tot{border-top:2px solid var(--ink);border-bottom:2px solid var(--ink);margin-top:-1px;font-family:var(--head);font-weight:700;font-size:1.1rem}
.hb-tools .hbt-row.hbt-tot .hbt-bl{border-bottom-color:var(--cfield);border-bottom-width:4px}

.hb-tools .hbt-o-lists{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.hb-tools .hbt-o-lists b{display:block;min-height:2.7em;font-size:.92rem;line-height:1.3;padding-bottom:8px;border-bottom:2px solid var(--ink);margin-bottom:6px}
.hb-tools .hbt-o-lists>div:first-child b{border-bottom:4px solid var(--cfield)}

.hb-tools .hbt-cl{position:relative;padding:0 0 14px 28px}
.hb-tools .hbt-cl:last-child{padding-bottom:0}
.hb-tools .hbt-cl:before{content:"";position:absolute;left:0;top:3px;width:14px;height:14px;border:2px solid var(--ink);border-radius:3px;box-sizing:border-box}
.hb-tools .hbt-cl b{display:block;font-size:.98rem}
.hb-tools .hbt-cl .hbt-ln+.hbt-ln{width:62%}

.hb-tools .hbt-th,.hb-tools .hbt-tr{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);column-gap:24px}
.hb-tools .hbt-th{padding-bottom:10px;border-bottom:2px solid var(--ink);font-size:.92rem;line-height:1.3}
.hb-tools .hbt-tr{padding:6px 0 14px;border-bottom:1px solid var(--line)}
.hb-tools .hbt-tr:last-child{border-bottom:0;padding-bottom:0}
.hb-tools .hbt-tr span:first-child .hbt-ln{background:#ffc9d6}
.hb-tools .hbt-tr span:last-child .hbt-ln+.hbt-ln{width:55%}

/* using the result (bl2.css lays #using and #figures out as a narrow two-column grid: undone here) */
.hb-tools #using.hbt-using,.hb-tools #figures.hbt-law{display:block;border-top:0;margin:0;width:auto;max-width:none!important}
.hb-tools #using.hbt-using{padding:80px 0 84px!important}
.hb-tools #figures.hbt-law{padding:84px 0 80px!important}
.hb-tools .hbt-using{background:#fff0f4;padding:80px 0 84px}
.hb-tools .hbt-uses{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr);gap:48px;margin-top:36px}
.hb-tools .hbt-uses>div{border-top:2px solid var(--ink);padding-top:18px}
.hb-tools .hbt-uses h3{font-size:1.12rem;font-weight:700;letter-spacing:-.014em;line-height:1.3;margin-bottom:10px}
.hb-tools .hbt-uses p{font-size:1.02rem;line-height:1.68;color:#2a2629}
.hb-tools .hbt-hand{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:48px;margin-top:48px;background:#fff;border:2px solid var(--ink);border-radius:var(--r);padding:30px 34px}
.hb-tools .hbt-hand p{font-size:1.02rem;line-height:1.68;color:#2a2629}
.hb-tools .hbt-hand a,.hb-tools .hbt-mail p a{color:var(--c);font-weight:700}

/* the law */
.hb-tools .hbt-law{background:var(--ink);color:#fff;padding:84px 0 80px}
.hb-tools section.hbt-law>.hbt-in>h2{margin-bottom:36px}
.hb-tools .hbt-act{display:grid;grid-template-columns:300px minmax(0,1fr);gap:64px;padding:30px 0 34px;border-top:1px solid rgba(255,255,255,.25)}
.hb-tools .hbt-act h3{font-size:1.16rem;font-weight:700;letter-spacing:-.014em;line-height:1.35;color:#fff}
.hb-tools .hbt-act p{font-size:1.06rem;line-height:1.72;color:#ece5e8;max-width:74ch}
.hb-tools .hbt-act mark.kf{background:none;color:#fff;font-weight:700}
.hb-tools .hbt-figs{display:grid;grid-template-columns:auto minmax(0,1fr);gap:20px 56px;align-items:stretch;margin-top:28px}
.hb-tools .hbt-rate{display:flex;align-items:center;gap:18px}
.hb-tools .hbt-rate span,.hb-tools .hbt-bands span{display:block;font-size:.88rem;color:#ece5e8;line-height:1.3}
.hb-tools .hbt-rate b,.hb-tools .hbt-bands b{display:block;font-family:var(--head);font-weight:700;font-size:1.7rem;letter-spacing:-.03em;line-height:1.1;color:#fff}
.hb-tools .hbt-rate i{font-style:normal;font-family:var(--head);font-weight:700;font-size:1.5rem;color:var(--cfield)}
.hb-tools .hbt-rate .hbt-res{background:var(--cfield);color:var(--ink);border-radius:8px;padding:10px 16px}
.hb-tools .hbt-rate .hbt-res b{color:var(--ink)}
.hb-tools .hbt-bands{display:grid;grid-template-columns:repeat(3,1fr);border-left:1px solid rgba(255,255,255,.25)}
.hb-tools .hbt-bands span{padding:6px 0 6px 24px;display:flex;flex-direction:column-reverse;justify-content:flex-end}
.hb-tools .hbt-note{margin-top:8px;padding-top:26px;border-top:1px solid rgba(255,255,255,.25);font-size:.92rem;line-height:1.65;color:#cfc6ca;max-width:104ch}
.hb-tools .hbt-note b{display:block;font-family:var(--head);font-size:1rem;color:#fff;margin-bottom:6px}

/* guides */
.hb-tools .hbt-guides{padding:80px 0 30px}
.hb-tools .hbt-glist{margin-top:28px;border-top:2px solid var(--ink)}
.hb-tools .hbt-glist a{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr) auto;column-gap:48px;align-items:baseline;padding:20px 0;border-bottom:1px solid var(--line);color:var(--ink)}
.hb-tools .hbt-glist b{font-family:var(--head);font-weight:700;font-size:1.14rem;letter-spacing:-.014em;line-height:1.3}
.hb-tools .hbt-glist span{font-size:1rem;line-height:1.6;color:#3d3b41}
.hb-tools .hbt-glist i{font-style:normal;font-weight:700;font-size:.9rem;white-space:nowrap;text-decoration:underline;text-decoration-color:var(--cfield);text-decoration-thickness:3px;text-underline-offset:4px}
.hb-tools .hbt-glist a:hover b{color:var(--cd)}
.hb-tools .hbt-all{margin-top:22px}
.hb-tools .hbt-all a{font-family:var(--head);font-weight:700;color:var(--ink);text-decoration:underline;text-decoration-color:var(--cfield);text-decoration-thickness:3px;text-underline-offset:4px}
.hb-tools .hbt-all a:after{content:" \2192"}

/* updates by email */
.hb-tools .hbt-mail{padding:50px 0 80px}
.hb-tools .hbt-mail .hbt-in{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:64px;align-items:center}
.hb-tools .hbt-mail .hbt-in>div{border-top:2px solid var(--ink);padding-top:26px}
.hb-tools .hbt-mail h3{font-size:1.5rem;font-weight:700;letter-spacing:-.025em;line-height:1.15;margin:0 0 10px}
.hb-tools .hbt-mail p{font-size:1.02rem;line-height:1.65;color:#3d3b41;max-width:52ch}
.hb-tools .hbt-mail form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
.hb-tools .hbt-mail form input[type=email]{min-width:0;width:100%;border:2px solid var(--ink);border-radius:8px;padding:15px 16px;font:inherit;font-size:1rem;background:#fff;color:var(--ink)}
.hb-tools .hbt-mail form button{border:0;border-radius:8px;background:var(--cfield);color:var(--ink);font-family:var(--head);font-weight:700;font-size:1rem;padding:15px 26px;cursor:pointer}
.hb-tools .hbt-mail form button:hover{background:var(--ink);color:#fff}
.hb-tools .hbt-mail form .msg{grid-column:1/-1;font-size:.88rem;color:var(--mute)}

@media(max-width:1100px){
  .hb-tools .hbt-tool,.hb-tools .hbt-tool:nth-child(odd):not(.hbt-lead){grid-template-columns:minmax(0,1fr) 400px;gap:44px}
  .hb-tools .hbt-tool:nth-child(odd):not(.hbt-lead){grid-template-columns:400px minmax(0,1fr)}
  .hb-tools .hbt-lead{grid-template-columns:1fr;padding:40px 36px 48px}
  .hb-tools .hbt-uses{grid-template-columns:1fr 1fr;gap:36px}
  .hb-tools .hbt-uses .hbt-wide{grid-column:1/-1;order:3}
  .hb-tools .hbt-act{grid-template-columns:220px minmax(0,1fr);gap:40px}
  .hb-tools .hbt-figs{grid-template-columns:1fr}
  .hb-tools .hbt-bands{border-left:0}
  .hb-tools .hbt-bands span:first-child{padding-left:0}
  .hb-tools .hbt-glist a{grid-template-columns:minmax(0,1fr) minmax(0,1fr);row-gap:8px}
  .hb-tools .hbt-glist i{grid-column:2}
}
@media(max-width:820px){
  .hb-tools .hbt-in{padding:0 16px}
  .hb-tools .hbt-bench{padding:28px 0 16px}
  .hb-tools .hbt-tool,.hb-tools .hbt-tool:nth-child(odd):not(.hbt-lead){grid-template-columns:1fr;gap:30px;padding:38px 0 44px}
  .hb-tools .hbt-tool:nth-child(odd):not(.hbt-lead) .hbt-out{order:0}
  .hb-tools .hbt-lead{padding:28px 20px 36px}
  .hb-tools .hbt-out{padding:20px 18px 22px;margin-right:10px;box-shadow:8px 8px 0 var(--cfield)}
  .hb-tools .hbt-lead .hbt-out{box-shadow:8px 8px 0 var(--ink)}
  .hb-tools #using.hbt-using,.hb-tools #figures.hbt-law{padding:52px 0 56px!important}
  .hb-tools .hbt-uses,.hb-tools .hbt-hand{grid-template-columns:1fr;gap:28px}
  .hb-tools .hbt-hand{padding:22px 20px;gap:14px;margin-top:36px}
  .hb-tools .hbt-act{grid-template-columns:1fr;gap:12px}
  .hb-tools .hbt-guides{padding:52px 0 20px}
  .hb-tools .hbt-glist a{grid-template-columns:1fr}
  .hb-tools .hbt-glist i{grid-column:1}
  .hb-tools .hbt-mail{padding:40px 0 56px}
  .hb-tools .hbt-mail .hbt-in{grid-template-columns:1fr;gap:26px}
}
@media(max-width:520px){
  .hb-tools .hbt-areas{grid-template-columns:1fr}
  .hb-tools .hbt-areas li:nth-last-child(2){border-bottom:1px solid var(--line);padding-bottom:11px}
  .hb-tools .hbt-o-lists{grid-template-columns:1fr;gap:18px}
  .hb-tools .hbt-o-lists b{min-height:0}
  .hb-tools .hbt-rate{flex-wrap:wrap;gap:12px}
  .hb-tools .hbt-bands{grid-template-columns:1fr;gap:6px}
  .hb-tools .hbt-bands span{padding-left:0;flex-direction:row-reverse;justify-content:space-between;align-items:baseline;border-bottom:1px solid rgba(255,255,255,.25)}
  .hb-tools .hbt-mail form{grid-template-columns:1fr}
}
