/* Cipher Check tool (/tools/cipher-check). Scoped to #cipher-check; typography comes from typography.css.
   Accent uses the site red; green/amber/red badge colours are status indicators for the ratings. */
#cipher-check{
--bg:#F3F2F2;--panel:#fff;--ink:#14110F;--mute:#605D5D;--line:#D8D3D1;--acc:#C8102E;
--g:#137a3e;--a:#8a5800;--r:#C8102E;--n:#4b5563;
--gb:#dcefe3;--ab:#f6e8c9;--rb:#f3dcdf;--nb:#e6e3e2;
color-scheme:light;background:var(--bg);color:var(--ink);overflow-x:clip}
#cipher-check *{box-sizing:border-box;min-width:0}
#cipher-check .band{padding:clamp(24px,4vw,56px) max(5vw,16px)}
#cipher-check .band+.band{padding-top:0}
#cipher-check .wrap{max-width:1240px;margin:0 auto}
#cipher-check .site-eyebrow{margin:0 0 8px;color:var(--acc)}
#cipher-check h1{margin:0 0 8px;text-wrap:balance}
#cipher-check h3{margin:0 0 14px}
#cipher-check .lede{color:var(--mute);margin:0 0 22px;max-width:68ch}
#cipher-check .field{display:flex;gap:10px;flex-wrap:wrap}
#cipher-check #q{flex:1 1 320px;font-size:1.25rem;font-weight:500;line-height:1.2;padding:16px 18px;border:2px solid var(--ink);background:var(--panel);color:var(--ink);border-radius:6px;min-height:60px}
#cipher-check #q:focus-visible{outline:3px solid var(--acc);outline-offset:2px}
#cipher-check button{font-size:var(--type-small);font-weight:600;cursor:pointer;color:var(--ink);background:var(--panel);border:1px solid var(--line);border-radius:999px;padding:9px 14px;min-height:44px}
#cipher-check button:hover{border-color:var(--ink)}
#cipher-check button:focus-visible{outline:3px solid var(--acc);outline-offset:2px}
#cipher-check #clr{border-radius:6px;padding:0 18px}
#cipher-check .chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
#cipher-check .chips span{color:var(--mute);font-size:var(--type-small);align-self:center;margin-right:4px}
#cipher-check .read{margin-top:30px;background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:clamp(18px,3vw,32px)}
#cipher-check .verdict{display:flex;gap:18px;align-items:flex-start;flex-wrap:wrap}
#cipher-check .dot{width:22px;height:22px;border-radius:50%;margin-top:12px;flex:none;background:var(--n)}
#cipher-check .vt{flex:1 1 300px}
#cipher-check .vt h2{margin:0 0 8px;text-wrap:balance}
#cipher-check .vt p{margin:0;color:var(--mute);max-width:72ch}
#cipher-check .hy{margin-top:12px;padding:10px 14px;border-left:3px solid var(--acc);background:var(--bg)}
#cipher-check .scale{position:relative;margin:34px 0 8px;height:86px}
#cipher-check .track{position:absolute;left:0;right:0;top:34px;height:14px;display:flex;border-radius:3px;overflow:hidden}
#cipher-check .track i{display:block;height:100%}
#cipher-check .ticks{position:absolute;left:0;right:0;top:52px;height:30px;font-size:var(--type-label);color:var(--mute)}
#cipher-check .ticks b{position:absolute;transform:translateX(-50%);font-weight:500;white-space:nowrap}
#cipher-check .ticks b::before{content:"";position:absolute;left:50%;top:-8px;height:6px;border-left:1px solid var(--mute)}
#cipher-check .seg{position:absolute;top:12px;font-size:var(--type-label);color:var(--mute);white-space:nowrap}
#cipher-check .ptr{position:absolute;top:0;transform:translateX(-50%);transition:left .5s cubic-bezier(.2,.8,.2,1);text-align:center}
#cipher-check .ptr svg{display:block;margin:20px auto 0}
#cipher-check .ptr span{position:absolute;bottom:58px;left:50%;transform:translateX(-50%);background:var(--acc);color:#fff;font-size:var(--type-label);font-weight:600;padding:2px 8px;border-radius:3px;white-space:nowrap}
#cipher-check .cap{color:var(--mute);margin:10px 0 0}
#cipher-check .parts{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:14px;margin-top:22px}
#cipher-check .card{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:18px 18px 16px;display:flex;flex-direction:column;gap:8px}
#cipher-check .card.x{opacity:.78}
#cipher-check .top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
#cipher-check .kind{font-size:var(--type-small);color:var(--mute)}
#cipher-check .nm{font-size:var(--type-h3);font-weight:600;line-height:1.3;overflow-wrap:anywhere}
#cipher-check .badge{flex:none;font-size:var(--type-label);font-weight:600;padding:3px 10px;border-radius:999px;white-space:nowrap}
#cipher-check .g{color:var(--g);background:var(--gb)}#cipher-check .a{color:var(--a);background:var(--ab)}#cipher-check .r{color:var(--r);background:var(--rb)}#cipher-check .n{color:var(--n);background:var(--nb)}
#cipher-check .dot.g{background:var(--g)}#cipher-check .dot.a{background:var(--a)}#cipher-check .dot.r{background:var(--r)}#cipher-check .dot.n{background:var(--n)}
#cipher-check .card p{margin:0}
#cipher-check dl{margin:4px 0 0;display:grid;grid-template-columns:7.2em 1fr;gap:4px 10px}
#cipher-check dt{color:var(--mute)}#cipher-check dd{margin:0}
#cipher-check .note{border-top:1px solid var(--line);padding-top:8px}
#cipher-check .left{margin-top:14px;color:var(--mute)}
#cipher-check .left code{background:var(--nb);padding:1px 6px;border-radius:3px}
#cipher-check .empty{color:var(--mute)}
#cipher-check .ck-head{display:flex;flex-wrap:wrap;gap:12px 24px;align-items:flex-end;justify-content:space-between;margin-bottom:14px}
#cipher-check .ck-head h3{margin:0}
#cipher-check .ck-head p{margin:4px 0 0;color:var(--mute);max-width:70ch}
#cipher-check .prog{flex:0 1 320px}
#cipher-check .prog small{display:block;font-size:var(--type-small);color:var(--mute);margin-bottom:6px}
#cipher-check .bar{height:10px;background:var(--nb);border-radius:5px;overflow:hidden}
#cipher-check .bar i{display:block;height:100%;width:0;background:var(--acc);transition:width .3s}
#cipher-check .ck-tools{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}
#cipher-check .ck-tools button[aria-pressed=true]{background:var(--ink);color:#fff;border-color:var(--ink)}
#cipher-check details.grp{background:var(--panel);border:1px solid var(--line);border-radius:8px;margin-bottom:10px}
#cipher-check details.grp>summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:12px;align-items:center;padding:14px 18px;font-weight:600;min-height:44px}
#cipher-check details.grp>summary::-webkit-details-marker{display:none}
#cipher-check details.grp>summary::before{content:"+";font-weight:500;color:var(--acc);width:1em;flex:none}
#cipher-check details.grp[open]>summary::before{content:"\2212"}
#cipher-check details.grp>summary span.t{flex:1}
#cipher-check details.grp>summary small{font-weight:500;color:var(--mute);font-size:var(--type-small);white-space:nowrap}
#cipher-check .items{border-top:1px solid var(--line)}
#cipher-check .it{display:grid;grid-template-columns:44px minmax(0,1fr);gap:0 10px;padding:14px 18px 14px 8px;border-bottom:1px solid var(--line)}
#cipher-check .it:last-child{border-bottom:0}
#cipher-check .it input{width:22px;height:22px;margin:3px auto 0;accent-color:var(--acc);cursor:pointer}
#cipher-check .it label{font-weight:600;cursor:pointer}
#cipher-check .it.done label{text-decoration:line-through;color:var(--mute)}
#cipher-check .qp{display:inline-block;margin-left:8px;font-size:var(--type-label);font-weight:600;color:var(--acc);border:1px solid var(--acc);border-radius:999px;padding:0 8px;vertical-align:2px;white-space:nowrap}
#cipher-check .it p{margin:4px 0 0}
#cipher-check .cmd{display:flex;gap:8px;align-items:flex-start;margin-top:8px}
#cipher-check .cmd pre{flex:1;margin:0;overflow-x:auto;background:var(--bg);border:1px solid var(--line);border-radius:4px;padding:8px 10px;font:13.5px/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre}
#cipher-check .cmd button{min-height:36px;padding:4px 12px;border-radius:4px;flex:none}
#cipher-check .hidden{display:none}
#cipher-check .cat{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:18px}
#cipher-check .cat h4{margin:0 0 8px;font-size:1rem;font-weight:600}
#cipher-check .cat div div{display:flex;flex-wrap:wrap;gap:6px}
#cipher-check .cat button{padding:6px 12px;min-height:36px}
#cipher-check .legend{display:flex;flex-wrap:wrap;gap:8px 18px;margin:0 0 16px}
#cipher-check .src{color:var(--mute);max-width:80ch}
#cipher-check .res{margin:0;padding:0;list-style:none;max-width:80ch}
#cipher-check .res li{padding:14px 0;border-top:1px solid var(--line)}
#cipher-check .res li:last-child{border-bottom:1px solid var(--line)}
#cipher-check .res a{font-weight:600;color:var(--acc);text-decoration:underline;text-underline-offset:3px}
#cipher-check .res p{margin:4px 0 0;color:var(--mute)}
#cipher-check .src a{color:var(--ink);text-decoration:underline}
@media(max-width:600px){#cipher-check .cmd{flex-direction:column;align-items:stretch}#cipher-check .cmd button{align-self:flex-start}#cipher-check .it{grid-template-columns:36px minmax(0,1fr);padding-right:12px}#cipher-check .seg{display:none}#cipher-check dl{grid-template-columns:1fr}#cipher-check dt{margin-top:4px}}
@media(prefers-reduced-motion:reduce){#cipher-check .ptr{transition:none}}
