:root{color-scheme:light;--ink:#1d1d1f;--mut:#5f6368;--bd:#d6d9dd;--ground:#f2f2f2;--grn:#1f7a43;--grnh:#17663a;--deep:#13703f;--lime:#9cbf2a;--sun:#e6c619;--tint:#f4f8ec;--err:#b3261e}
*{box-sizing:border-box;min-width:0}
body{margin:0;background:var(--ground);color:var(--ink);font:16px/1.5 Roboto,"Segoe UI",Helvetica,Arial,sans-serif;overflow-x:clip}
.hero{background:linear-gradient(100deg,#13703f 0%,#3f9a3a 45%,#9cbf2a 75%,#e6c619 100%);color:#fff;padding:clamp(36px,6vw,64px) max(5vw,16px);position:relative;overflow:hidden;text-shadow:0 1px 2px rgba(0,0,0,.18)}
.hero canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.calc{position:absolute;z-index:1;right:max(7vw,32px);top:22px;width:clamp(150px,16vw,190px);height:auto;transform:rotate(9deg);transform-origin:top center;filter:drop-shadow(0 18px 24px rgba(0,0,0,.28))}
@media(max-width:820px){.calc{display:none}}
.hero>div{position:relative;z-index:1;max-width:1100px;margin:0 auto}
.hero h1{font-weight:400;font-size:clamp(34px,5vw,52px);line-height:1.05;margin:0 0 14px;text-wrap:balance}
.hero p{font-weight:300;font-size:18px;max-width:560px;margin:0}
.card{background:#fff;max-width:640px;margin:40px auto 56px;padding:clamp(24px,5vw,40px);box-shadow:0 1px 4px rgba(0,0,0,.14)}
.card h2{font-size:28px;font-weight:400;margin:0 0 24px;color:var(--ink)}
.card .sub{color:var(--mut);margin:0 0 24px;font-size:15px}
#drop{border:2px dashed #c9d8b8;padding:32px 16px;text-align:center;color:var(--mut);background:var(--tint) radial-gradient(rgba(31,122,67,.12) 1px,transparent 1.2px) 0 0/14px 14px;transition:border-color .15s,background-color .15s}
#drop.over{border-color:var(--grn);background-color:#fbf6d6}
#drop svg{display:block;margin:0 auto 10px}
#drop label{color:var(--grn);cursor:pointer;font-weight:500}#drop label:hover{text-decoration:underline}
#drop small{display:block;margin-top:6px;font-size:13px}
.bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 0;min-height:36px}
#status{font-size:14px;color:var(--mut);margin:0}
.bar:has(#status:empty):has(#clear[hidden]){display:none}
#list{list-style:none;margin:8px 0 0;padding:0}
#list li{padding:12px 0;border-top:1px solid #eceef0}
#list li:last-child{border-bottom:1px solid #eceef0}
.fn{flex:1 1 200px;font-size:15px;overflow-wrap:anywhere}
.fn small{display:block;color:var(--mut);font-size:13px}
.fn .bad{color:var(--err)}
/* Buttons: one primary (filled green), secondary (neutral grey), tertiary (text).
   Hover = one step darker, active = one more step, same text colour throughout; disabled is flat and not clickable. */
button{font:inherit}
[hidden]{display:none!important}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 20px;border-radius:4px;border:1px solid transparent;font-size:16px;font-weight:500;line-height:1;cursor:pointer;transition:background-color .12s,border-color .12s,box-shadow .12s}
.btn:disabled{cursor:not-allowed}
.pri{background:var(--grn);color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.12)}
.pri:hover:not(:disabled){background:var(--grnh)}
.pri:active:not(:disabled){background:#12502d;box-shadow:none}
.pri:disabled{background:#e3e6e8;color:#9aa0a6;box-shadow:none}
.sec{background:#f1f3f4;border-color:#d6d9dd;color:var(--ink)}
.sec:hover:not(:disabled){background:#e6e8ea;border-color:#c4c8cc}
.sec:active:not(:disabled){background:#dadde0}
.full{width:100%}
#convert{margin-top:24px}#all{margin-top:12px}
.sm{min-height:36px;padding:0 14px;font-size:14px}
.x{background:none;border:0;color:var(--mut);font-size:20px;line-height:1;cursor:pointer;width:36px;height:36px;border-radius:4px;transition:background-color .12s}
.x:hover{color:var(--ink);background:#f1f3f4}
.ghost{flex:none;min-height:36px;padding:0 10px;margin-right:-10px;background:none;border:0;border-radius:4px;color:var(--mut);font-size:14px;cursor:pointer;transition:background-color .12s}
.ghost:hover{color:var(--ink);background:#f1f3f4}
#note{font-size:13px;color:var(--err);margin:12px 0 0}#note:empty{display:none}
:focus-visible{outline:2px solid var(--grn);outline-offset:2px}
.info{max-width:640px;margin:0 auto 64px;padding:0 4px;color:#3c4043}
.info h2{font-size:22px;font-weight:500;color:var(--ink);margin:40px 0 12px}
.acc{border-bottom:1px solid #dcdfe3}
h2+.acc{border-top:1px solid #dcdfe3}
.acc summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:52px;padding:12px 4px;font-size:16px;font-weight:500;color:var(--ink);cursor:pointer;border-radius:4px}
.acc summary::-webkit-details-marker{display:none}
.acc summary::after{content:"";flex:none;width:8px;height:8px;border-right:2px solid var(--mut);border-bottom:2px solid var(--mut);transform:translateY(-2px) rotate(45deg);transition:transform .15s}
.acc[open] summary::after{transform:translateY(2px) rotate(-135deg)}
.acc summary:hover{background:#e9ecef}
.acc .body{padding:0 4px 16px}
.info table{border-collapse:collapse;width:100%;font-size:14px;margin-top:4px}
.info td,.info th{text-align:left;padding:8px 0;border-bottom:1px solid #e3e6e8}
.info tr:last-child td{border-bottom:0}
.info th{font-weight:500;color:var(--mut)}
.info p,.info li{font-size:15px;line-height:1.6;margin:0 0 8px}
.info ol{padding-left:20px;margin:0}
.info code{font-family:ui-monospace,Consolas,monospace;font-size:14px;background:#e9ecef;padding:1px 6px;border-radius:3px}
.more{margin:32px 0 0}.more a{color:var(--grn);font-weight:500;text-decoration:none}.more a:hover{text-decoration:underline}
@media(max-width:760px){.info{margin:0 16px 48px}}
@media(max-width:760px){.card{margin:24px 12px 40px}}
@media(prefers-reduced-motion:reduce){#drop,.acc summary::after{transition:none}}
/* shared additions for all tools */
.row{display:flex;align-items:center;gap:12px}
.out{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0 0;font-size:14px;overflow-wrap:anywhere}
.out small{color:var(--mut);font-size:13px}
.opts{display:flex;flex-wrap:wrap;gap:6px 24px;margin:16px 0 0;padding:0;border:0;font-size:15px}
.opts legend{font-weight:500;margin-bottom:6px;padding:0;width:100%}
.opts label{display:flex;align-items:center;gap:8px;min-height:32px;cursor:pointer}
.opts input{width:18px;height:18px;margin:0;accent-color:var(--grn)}
.view{margin-top:12px;font-size:14px}
.view dl{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 16px;margin:0 0 10px}
.view dt{color:var(--mut)}.view dd{margin:0;overflow-wrap:anywhere}
.view h4{font-size:15px;font-weight:500;margin:16px 0 6px}
.view pre{margin:0;max-height:320px;overflow:auto;background:#f6f7f8;border:1px solid #e3e6e8;border-radius:4px;padding:10px 12px;font:13px/1.5 ui-monospace,Consolas,monospace;white-space:pre-wrap}
.view .mx{overflow-x:auto}.view table{border-collapse:collapse;font:13px ui-monospace,Consolas,monospace}
.view td{border:1px solid #e3e6e8;padding:3px 8px;text-align:right}
.ok{color:var(--grn)}.warn{color:var(--err)}
.hero{padding-top:0}.logorow{display:flex;align-items:center;padding:16px 0;margin:0 0 clamp(28px,5vw,52px)}.brand{display:inline-block;border-radius:4px}.brand img{display:block;height:30px;width:auto}
.crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 14px;font-size:14px;color:rgba(255,255,255,.85)}
.crumbs a{color:#fff;text-decoration:none;font-weight:500}.crumbs a:hover{text-decoration:underline}
.crumbs span[aria-hidden]{opacity:.7}
canvas.pv{display:block;width:266px;max-width:100%;height:auto;image-rendering:pixelated;border:1px solid #e3e6e8;margin-top:10px;background:#fff}

/* top navigation, on every page */
.logorow{justify-content:space-between;gap:8px 16px;flex-wrap:wrap;position:relative;z-index:2}
.topnav{display:flex;gap:4px;flex-wrap:wrap}
.topnav a{color:#fff;text-decoration:none;font-size:15px;font-weight:500;padding:8px 12px;border-radius:4px}
.topnav a:hover{background:rgba(255,255,255,.16)}
.topnav a[aria-current]{background:rgba(255,255,255,.22)}
.calc{top:84px}
/* global footer, on every page */
footer.gfoot{border-top:1px solid #e6e8eb;background:#fff;color:var(--mut);font-size:13px;padding:18px max(4vw,16px);text-align:left}
footer.gfoot>div{max-width:1100px;margin:0 auto;display:flex;justify-content:space-between;gap:6px 24px;flex-wrap:wrap}
footer.gfoot a{color:var(--mut)}
footer.gfoot a:hover{color:var(--ink)}
/* keep the global footer at the bottom of the window on short pages, without changing the page layout */
body{min-height:100vh;min-height:100svh}
footer.gfoot{position:sticky;top:100vh}
/* tool pages show no header art (calculator / 3D graph) */
.hero.tool .calc{display:none}
