
:root{
  --bg:#F4F7FB; --surface:#FFFFFF; --ink:#0B1F4D; --muted:#55627A; --rule:#D5DDE8;
  --brand:#1463E0; --brand-ink:#FFFFFF; --brand-soft:#E4EEFD; --accent:#0C9C74; --danger:#C42B1C;
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0D1320; --surface:#161E2E; --ink:#E8EEF8; --muted:#9AA8BF; --rule:#2C3850;
    --brand:#7FB0FF; --brand-ink:#0D1320; --brand-soft:#1B2A47; --accent:#4FD6A8; --danger:#FF8A7F;
  }
}
:root[data-theme="dark"]{
  --bg:#0D1320; --surface:#161E2E; --ink:#E8EEF8; --muted:#9AA8BF; --rule:#2C3850;
  --brand:#7FB0FF; --brand-ink:#0D1320; --brand-soft:#1B2A47; --accent:#4FD6A8; --danger:#FF8A7F;
}
*,*::before,*::after{box-sizing:inherit}
html{scroll-padding-top:env(safe-area-inset-top,0px)}
body{margin:0;background:var(--bg);color:var(--ink);
  font-family:"Atkinson Hyperlegible",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  font-size:1.0625rem;line-height:1.55}
a{color:var(--brand)}
.wrap{max-width:52rem;margin:0 auto;padding:0 1.25rem}

header.site{border-bottom:1px solid var(--rule);background:var(--surface)}
header.site .wrap{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-top:.7rem;padding-bottom:.7rem;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:.55rem;text-decoration:none;color:var(--ink);font-weight:700;font-size:1.35rem;letter-spacing:-.02em}
.brand img{width:40px;height:40px}
.brand .tld{color:var(--accent)}
header nav{display:flex;gap:1.1rem;font-size:.95rem}
header nav a{color:var(--muted);text-decoration:none}
header nav a:hover{color:var(--brand)}

.hero{padding:2rem 0 1.25rem}
h1{font-size:clamp(1.8rem,5.2vw,2.6rem);line-height:1.12;margin:0 0 .6rem;letter-spacing:-.015em}
.lede{color:var(--muted);margin:0;max-width:40em}
.trust{display:flex;flex-wrap:wrap;gap:.4rem 1.2rem;margin-top:.9rem;font-size:.92rem;color:var(--muted)}
.trust span::before{content:"✓ ";color:var(--accent);font-weight:700}

/* Tool card and tabs */
.tool{background:var(--surface);border:1px solid var(--rule);border-radius:10px;margin-bottom:2.5rem;overflow:hidden}
.tabs{display:flex;border-bottom:1px solid var(--rule);overflow-x:auto}
.tabs button{flex:1 1 0;min-width:0;line-height:1.25;background:none;border:0;border-bottom:3px solid transparent;padding:.95rem 1rem .8rem;
  font:inherit;font-weight:700;color:var(--muted);cursor:pointer}
@media (max-width:520px){.tabs button{font-size:.88rem;padding:.8rem .4rem .7rem}header nav{display:none}}
.tabs button[aria-selected="true"]{color:var(--brand);border-bottom-color:var(--brand)}
.panel{padding:1.4rem 1.25rem 1.6rem}
.panel[hidden]{display:none}
.panel h2{font-size:1.2rem;margin:0 0 .3rem}
.panel > p.sub{color:var(--muted);margin:0 0 1.1rem;font-size:.97rem}
.step{margin-top:1.6rem;padding-top:1.25rem;border-top:1px solid var(--rule)}
.step h3{font-size:1.05rem;margin:0 0 .8rem}
.num{display:inline-flex;width:1.6rem;height:1.6rem;border-radius:50%;background:var(--brand-soft);color:var(--brand);
  font-weight:700;font-size:.85rem;align-items:center;justify-content:center;margin-right:.45rem}

.drop{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:.3rem;
  border:2px dashed var(--brand);border-radius:8px;background:var(--brand-soft);color:var(--ink);
  min-height:8.5rem;padding:1rem;cursor:pointer;position:relative}
.drop strong{color:var(--brand);font-size:1.05rem}
.drop small{color:var(--muted)}
.drop.drag{outline:3px solid var(--brand);outline-offset:2px}
.drop input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.drop:focus-within{outline:3px solid var(--brand);outline-offset:2px}
.filechip{margin-top:.7rem;font-size:.93rem;color:var(--muted);word-break:break-all}

.presets{display:grid;gap:.5rem}
.opt{display:flex;gap:.7rem;align-items:flex-start;padding:.7rem .85rem;border:1px solid var(--rule);border-radius:6px;cursor:pointer;background:var(--surface)}
.opt input{margin-top:.3rem;accent-color:var(--brand)}
.opt:has(input:checked){border-color:var(--brand);box-shadow:inset 3px 0 0 var(--brand)}
.opt:has(input:focus-visible){outline:3px solid var(--brand);outline-offset:2px}
.opt b{display:block} .opt span{color:var(--muted);font-size:.9rem}
.chips{display:flex;flex-wrap:wrap;gap:.45rem}
.chip{font:inherit;font-size:.95rem;font-weight:700;padding:.45rem .85rem;border-radius:999px;border:1px solid var(--rule);
  background:var(--surface);color:var(--ink);cursor:pointer}
.chip[aria-pressed="true"]{background:var(--brand);border-color:var(--brand);color:var(--brand-ink)}
.fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(8.5rem,1fr));gap:.65rem;margin-top:.8rem}
.fields label{font-size:.88rem;color:var(--muted);display:flex;flex-direction:column;gap:.25rem}
input[type=number],input[type=text],select{font:inherit;font-size:1rem;padding:.5rem .55rem;border:1px solid var(--rule);border-radius:6px;background:var(--surface);color:var(--ink);width:100%}
.check{display:flex;gap:.5rem;align-items:center;cursor:pointer;font-size:.97rem}
.check input{accent-color:var(--brand);width:1.1rem;height:1.1rem}
.hint{font-size:.88rem;color:var(--muted);margin:.35rem 0 0}
.note{font-size:.9rem;color:var(--muted);margin:.8rem 0 0}

.editor{display:grid;grid-template-columns:auto 1fr;gap:1.4rem;align-items:start}
@media (max-width:560px){.editor{grid-template-columns:1fr}}
.stage{background:repeating-conic-gradient(var(--rule) 0 25%,transparent 0 50%) 0 0/14px 14px;padding:.5rem;border:1px solid var(--rule);width:fit-content;max-width:100%;justify-self:start}
#exPreview{display:block;background:#fff;touch-action:none;cursor:grab;max-width:100%}
#exPreview:active{cursor:grabbing}
.controls{display:flex;flex-direction:column;gap:.9rem}
.controls label{font-size:.95rem}
input[type=range]{width:100%;accent-color:var(--brand)}

.result{border:1px solid var(--rule);border-radius:8px;padding:1rem 1.1rem;margin-bottom:1rem;background:var(--bg)}
.result dl{display:grid;grid-template-columns:auto 1fr;gap:.3rem 1rem;margin:0}
.result dt{color:var(--muted)} .result dd{margin:0;font-weight:700}
.status{margin:.7rem 0 0;font-weight:700}
.status.ok{color:var(--accent)} .status.bad{color:var(--danger)}
.thumb{max-width:100%;max-height:14rem;display:block;margin-top:.8rem;border:1px solid var(--rule);background:#fff}
.progress{height:6px;background:var(--rule);border-radius:3px;overflow:hidden;margin-top:.7rem}
.progress i{display:block;height:100%;width:0;background:var(--brand);transition:width .2s}
button.primary{font:inherit;font-weight:700;border:0;border-radius:6px;padding:.85rem 1.5rem;cursor:pointer;background:var(--brand);color:var(--brand-ink)}
button.primary:disabled{opacity:.45;cursor:not-allowed}
button.secondary{font:inherit;font-weight:700;border:1px solid var(--brand);border-radius:6px;padding:.5rem 1rem;cursor:pointer;background:transparent;color:var(--brand);font-size:.95rem}
button:focus-visible,.chip:focus-visible,.tabs button:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.row{display:flex;gap:.75rem;flex-wrap:wrap;align-items:center}
.error{color:var(--danger);font-weight:700;margin:.7rem 0 0}
.hidden{display:none!important}

/* Article content */
article{padding-bottom:1rem}
article h2{font-size:1.45rem;line-height:1.25;margin:2.4rem 0 .7rem;letter-spacing:-.01em}
article h3{font-size:1.1rem;margin:1.5rem 0 .4rem}
article p,article li{color:var(--ink);max-width:42em}
article p{margin:0 0 1rem}
article ol,article ul{padding-left:1.3rem;margin:0 0 1rem}
article li{margin-bottom:.35rem}
.tablewrap{overflow-x:auto;margin:0 0 1rem;border:1px solid var(--rule);border-radius:8px;background:var(--surface)}
table{border-collapse:collapse;width:100%;min-width:34rem;font-size:.95rem}
th,td{text-align:left;padding:.6rem .8rem;border-bottom:1px solid var(--rule)}
th{background:var(--brand-soft);color:var(--ink)}
tr:last-child td{border-bottom:0}
details{border:1px solid var(--rule);border-radius:8px;background:var(--surface);padding:.2rem 1rem;margin-bottom:.6rem}
summary{cursor:pointer;font-weight:700;padding:.7rem 0}
details p{color:var(--muted)}
footer.site{border-top:1px solid var(--rule);margin-top:2rem;padding:1.5rem 0 2.5rem;font-size:.9rem;color:var(--muted)}
footer.site .wrap{display:flex;flex-wrap:wrap;gap:.6rem 1.4rem;justify-content:space-between}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.crumbs{font-size:.9rem;color:var(--muted);padding-top:1.1rem}
.crumbs a{color:var(--muted)}
.links{display:grid;grid-template-columns:repeat(auto-fill,minmax(14rem,1fr));gap:.6rem;margin:0 0 1rem;padding:0;list-style:none}
.links a{display:block;padding:.8rem .95rem;border:1px solid var(--rule);border-radius:8px;background:var(--surface);text-decoration:none;color:var(--ink);font-weight:700;height:100%}
.links a span{display:block;font-weight:400;color:var(--muted);font-size:.9rem;margin-top:.15rem}
.links a:hover{border-color:var(--brand)}
.callout{border-left:4px solid var(--accent);background:var(--surface);padding:.85rem 1rem;border-radius:0 8px 8px 0;margin:0 0 1rem}
.callout p{margin:0}
footer.site nav{display:flex;flex-wrap:wrap;gap:.4rem 1rem}
footer.site nav a{color:var(--muted)}
