/* Witch of Design · the two free tools (print size, text size). Owner: C. Loaded only by /tools/* and their German twins.
   Inks keep their jobs: cyan measures, magenta is the cut, yellow is the safe area and the thing to press. Plex Mono only for numbers. */
.tl-app{display:none}
.js .tl-app{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s6)}
@media (min-width:900px){.js .tl-app{grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:var(--s7)}}
.tl-ctl{display:flex;flex-direction:column;gap:var(--s5);min-width:0}
.tl-f{border:0;margin:0;padding:0;min-width:0}
.tl-f > legend,.tl-lab{display:block;font:500 15px/1.3 var(--text);margin-bottom:var(--s2);padding:0}
.tl-note{font-size:15px;line-height:1.45;color:var(--k2);margin-top:var(--s2);max-width:34em}
.tl-sel,.tl-in{min-height:48px;border:2px solid var(--k);border-radius:0;background:#fff;color:var(--k);font:400 17px/1.2 var(--text);padding:0 var(--s3);max-width:100%}
.tl-sel{width:100%;appearance:none;-webkit-appearance:none;padding-right:44px;
  background-image:linear-gradient(45deg,transparent 50%,var(--k) 50%),linear-gradient(135deg,var(--k) 50%,transparent 50%);background-position:calc(100% - 22px) 21px,calc(100% - 16px) 21px;background-size:6px 6px;background-repeat:no-repeat}
.tl-in{width:6.5em;font-family:var(--num);font-variant-numeric:tabular-nums}
.tl-row{display:flex;flex-wrap:wrap;gap:var(--s2);align-items:center}
.tl-row .u{font:400 15px var(--text);color:var(--k2)}
.tl-chips{display:flex;flex-wrap:wrap;gap:0}
.tl-chips button{min-height:48px;min-width:56px;padding:0 var(--s3);border:2px solid var(--k);background:#fff;color:var(--k);font:400 16px var(--num);cursor:pointer;border-radius:0}
.tl-chips button + button{border-left:0}
.tl-chips button[aria-pressed="true"]{background:var(--k);color:#fff}
.tl-chips.words button{font-family:var(--text);font-weight:500}
.tl-chips + .tl-in{margin-left:var(--s2)}
.tl-turn{min-height:48px;padding:0 var(--s4);border:2px solid var(--k);background:#fff;font:500 16px var(--text);cursor:pointer;color:var(--k)}
.tl-range{width:100%;height:44px;accent-color:var(--c);margin:var(--s1) 0 0}

/* the drawing: a sheet with its bleed, cut line and safe area */
.tl-out{min-width:0;display:flex;flex-direction:column;gap:var(--s5)}
.tl-draw{background:#fff;border:2px solid var(--k);padding:var(--s3)}
.tl-draw svg{display:block;width:100%;height:auto;max-height:min(62vh,560px)}
.tl-draw text{font-family:var(--num);font-size:15px;fill:var(--k)}
.tl-draw .dim{stroke:var(--c);stroke-width:2;fill:none}
.tl-draw .dimt{fill:#00799F}
.tl-draw.go .dim{stroke-dasharray:600;stroke-dashoffset:600;animation:tl-meas .6s cubic-bezier(.2,0,0,1) forwards}
@keyframes tl-meas{to{stroke-dashoffset:0}}
.tl-key{display:flex;flex-wrap:wrap;gap:var(--s2) var(--s4);font-size:15px;margin-top:var(--s3)}
.tl-key span{display:inline-flex;align-items:center;gap:8px}
.tl-key i{display:inline-block;width:22px;height:14px;border:1px solid var(--k)}
.tl-key .k-b{background:repeating-linear-gradient(45deg,#fff 0 3px,rgba(229,0,126,.45) 3px 4px)}
.tl-key .k-c{border:0;border-top:3px solid var(--m);height:0;width:22px}
.tl-key .k-s{background:var(--y)}
.tl-key .k-d{border:0;border-top:2px solid var(--c);height:0;width:22px}
.tl-wide{font-size:14px;color:var(--k2);margin-top:var(--s2)}

/* results */
.tl-res{margin:0;display:grid;grid-template-columns:minmax(0,1fr);border-top:2px solid var(--k)}
.tl-res > div{display:grid;grid-template-columns:minmax(0,11em) minmax(0,1fr);gap:var(--s1) var(--s4);padding:var(--s3) 0;border-bottom:1px solid var(--k)}
.tl-res dt{font-size:15px;line-height:1.4;color:var(--k2)}
.tl-res dd{margin:0;font:400 17px/1.45 var(--text);overflow-wrap:anywhere}
.tl-res dd b{font-family:var(--num);font-variant-numeric:tabular-nums}
.tl-res dd b{font-weight:600;font-size:clamp(20px,2.2vw,26px);line-height:1.2;display:block}
.tl-res .hl{background:var(--y);padding-inline:var(--s2);margin-inline:calc(-1 * var(--s2))}
@media (max-width:480px){.tl-res > div{grid-template-columns:minmax(0,1fr)}}
.tl-acts{display:flex;flex-wrap:wrap;gap:var(--s3);align-items:center}
.tl-copy{min-height:56px;padding:0 var(--s5);background:var(--y);color:var(--k);border:3px solid var(--k);font:500 18px var(--text);cursor:pointer;border-radius:0}
.tl-copy.ghost{background:#fff}
.tl-said{font-size:15px;color:var(--k2);min-height:1.4em}
.tl-warn{border-left:4px solid var(--m);padding:var(--s2) var(--s3);font-size:15px}

/* the type sizes */
.tl-big{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--s2) var(--s4);border-top:2px solid var(--k);padding-top:var(--s4)}
.tl-big b{font:500 clamp(48px,7vw,88px)/.9 var(--num);letter-spacing:-.03em}
.tl-big span{font:400 17px var(--text);color:var(--k2)}
.tl-say{font-size:var(--t-lede,20px);line-height:1.45;max-width:30em}
.tl-sizes{width:100%}
.tl-sizes td,.tl-sizes th{padding-block:var(--s2)}
.tl-sizes tr.on td{background:var(--y)}
.tl-sizes tr.on td:first-child{padding-left:var(--s2)}
.tl-spec{border:2px solid var(--k);background:#fff;padding:var(--s4);overflow:hidden}
.tl-spec p{margin:0;font-family:var(--text);color:var(--k);white-space:nowrap;line-height:1.15}
.tl-spec .sh{font-weight:600}
.tl-spec .sb{margin-top:.5em}
.tl-spec .ss{margin-top:.6em}
.tl-spec .on{box-shadow:inset 4px 0 0 var(--y);padding-left:10px;margin-left:-10px}
.tl-truth{font-size:15px;color:var(--k2);margin-top:var(--s2)}
.tl-cal{border:2px dashed var(--c);padding:var(--s4);display:flex;flex-direction:column;gap:var(--s3)}
.tl-card{border:2px solid var(--c);border-radius:3mm;background:rgba(0,167,225,.08);flex:none;position:relative;left:50%;transform:translateX(-50%);align-self:flex-start;max-width:calc(100vw - 4px)}
.tl-cal .tl-row button{min-width:48px;min-height:48px;border:2px solid var(--k);background:#fff;font:500 20px var(--num);cursor:pointer;color:var(--k)}
.tl-src{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--s3)}
.tl-src li{border-top:1px solid var(--k);padding-top:var(--s3);font-size:16px;line-height:1.5}
.tl-src b{font-weight:500}
.tl-prose{max-width:31em;display:flex;flex-direction:column;gap:var(--s4)}   /* about 65 characters a line at 18 px */
.tl-prose p{font-size:18px;line-height:1.6}
.tl-tw{overflow-x:auto;margin-top:var(--s2);-webkit-overflow-scrolling:touch;
  /* scroll shadows: a dark edge appears on the side that still has columns (covers move with the table, shadows stay) */
  background:linear-gradient(to right,var(--y) 30%,rgba(255,230,0,0)) left center/40px 100% no-repeat local,
             linear-gradient(to left,var(--y) 30%,rgba(255,230,0,0)) right center/40px 100% no-repeat local,
             radial-gradient(farthest-side at 0 50%,rgba(16,18,20,.3),rgba(16,18,20,0)) left center/14px 100% no-repeat scroll,
             radial-gradient(farthest-side at 100% 50%,rgba(16,18,20,.3),rgba(16,18,20,0)) right center/14px 100% no-repeat scroll}
.tl-swipe{margin-top:var(--s4);font-size:15px;font-weight:500}
@media (min-width:1100px){html:not(.js) .tl-swipe{display:none}}
.tl-tw table{min-width:560px}
.tl-tw td{font-size:16px}
.tl-tw td.v{font-family:var(--num);font-variant-numeric:tabular-nums;white-space:nowrap}
.tl-print{display:none}
.tl-next{display:flex;flex-wrap:wrap;gap:var(--s3) var(--s5);margin-top:var(--s5)}

@media (prefers-reduced-motion:reduce){.tl-draw.go .dim{animation:none;stroke-dashoffset:0}}

/* the test sheet: only the sample, in real points, so paper shows the true size */
@media print{
  body.tl-printing > *:not(main){display:none!important}
  body.tl-printing main > *{display:none!important}
  body.tl-printing main > .tl-print{display:block!important;padding:12mm;color:#000;font-family:'IBM Plex Sans',Arial,sans-serif}
  .tl-print p{margin:0 0 6mm;line-height:1.1;overflow-wrap:anywhere}   /* a roll-up headline is wider than the paper: it wraps, the letters stay true size */
  .tl-print .cap{font:9pt/1.4 'IBM Plex Sans',Arial,sans-serif;margin-bottom:2mm;color:#000}
}
/* the number plate holds the live result; "10.5" is wider than "A5" */
body:has(#ts) .h-no,body:has(#ps) .h-no{font-size:clamp(48px,6.2vw,120px)}

/* round 4: Ms Gridzelda stands in the bottom right; from tablet width up, every sheet on a tool page keeps that corner free, so she never covers a result or a button */
@media (min-width:600px){body:has(.tl-app) main > .sheet > .wrap{padding-right:max(var(--g-margin),124px)}}

/* round 6: on a laptop (1280 × 800) the first control is on the first screen: a shorter header on the tool pages */
@media (min-width:900px){
  body:has(.tl-app) .p-hero.split:not(.compact) .h-a{padding-block:32px 28px}
  body:has(.tl-app) .p-hero h1{font-size:clamp(44px,4.6vw,72px);line-height:.98}
  body:has(.tl-app) .p-hero .p-lede{margin-top:16px;font-size:19px}
  body:has(.tl-app) #tool{padding-top:var(--s6)}
}

/* round 6: embedded on an approved partner's page (?embed=1): the tool alone, with one line that says where it comes from */
.tl-credit{display:none}
html.embed body > *:not(main):not(script):not(.tl-print){display:none!important}
html.embed main > *:not(#tool){display:none!important}
html.embed #tool{padding-block:16px 8px;border:0}
html.embed #tool .crop{display:none}
html.embed .tl-credit{display:block;margin-top:var(--s4);font-size:14px;color:var(--k2)}
html.embed .tl-credit a{color:var(--k)}
html.embed body{background:#fff}
@media print{html.embed body.tl-printing main > .tl-print{display:block!important}}
html.embed body:has(.tl-app) main > .sheet > .wrap{padding-right:var(--g-margin)}   /* no companion in a frame, so no corner to keep free */

/* round 12 (A): on phones her pen never covers the help under a field (Hanna, 412 px) */
@media (max-width:760px){.tl-note{position:relative;z-index:26;background:#fff;box-shadow:0 0 0 4px #fff}}
