:root{--linen:#f3ecdb;--card:#fffaf0;--ink:#1f2a44;--thread:#c23b2e;--teal:#2c6b66;--line:#d9cdb2;--soft:#5b6378}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--linen) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Ccircle cx='6' cy='6' r='1' fill='%23d9cdb2'/%3E%3C/svg%3E");color:var(--ink);font:17px/1.55 system-ui,-apple-system,"Segoe UI",sans-serif;overflow-wrap:anywhere}
.wrap{max-width:46rem;margin:0 auto;padding:0 1rem}
a{color:var(--teal)}
h1,h2,.brand{font-family:Georgia,"Iowan Old Style",serif;letter-spacing:-.01em}
.top{background:var(--ink);color:#fff}
.top .wrap{display:flex;flex-wrap:wrap;gap:.4rem 1rem;align-items:center;justify-content:space-between;padding-top:.6rem;padding-bottom:.6rem}
.brand{display:flex;align-items:center;gap:.5rem;color:#fff;text-decoration:none;font-size:1.15rem;font-weight:700}
.top nav{display:flex;flex-wrap:wrap;gap:.2rem .9rem;font-size:.9rem}
.top nav a{color:#e9dfc6;text-decoration:none;padding:.2rem 0;border-bottom:2px solid transparent}
.top nav a[aria-current]{color:#fff;border-color:var(--thread)}
.hero{background:var(--ink) url("/hero.svg") right center/auto 100% no-repeat;color:#fff;padding:1.4rem 0 1.8rem;border-bottom:5px solid var(--thread)}
.hero .wrap>div{max-width:30rem}
.hero h1{margin:0 0 .4rem;font-size:1.9rem;line-height:1.15}
.hero p{margin:0;color:#e9dfc6}
.tool{background:var(--card);border:1px solid var(--line);border-radius:10px;margin:-1px 0 1.5rem;box-shadow:0 2px 0 var(--line)}
.tool>h2{margin:0;padding:.7rem 1rem;font-size:1.15rem;border-bottom:1px dashed var(--line)}
.body{padding:1rem}
.row{display:flex;gap:.8rem;flex-wrap:wrap;margin-bottom:.9rem}
.grow{flex:1 1 7rem;min-width:0}
label.f,.lbl{display:block;font-size:.85rem;font-weight:600;margin-bottom:.25rem;color:var(--soft)}
input[type=number],select{width:100%;font:inherit;font-size:1.1rem;padding:.55rem .6rem;border:2px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);min-height:44px}
input:focus-visible,select:focus-visible,button:focus-visible,.seg input:focus-visible+span{outline:3px solid var(--thread);outline-offset:1px}
.units{border:0;padding:0;margin:0;display:flex;align-items:flex-end}
.seg{display:inline-block}
.seg input{position:absolute;opacity:0;width:1px;height:1px}
.seg span{display:inline-block;padding:.55rem .8rem;border:2px solid var(--line);background:#fff;min-height:44px;line-height:1.6;cursor:pointer}
.seg:first-child span{border-radius:7px 0 0 7px}.seg:last-child span{border-radius:0 7px 7px 0;border-left:0}
.seg input:checked+span{background:var(--ink);border-color:var(--ink);color:#fff}
.chips{display:flex;flex-wrap:wrap;gap:.4rem;margin:.4rem 0 0}
.chip,button.copy{font:inherit;border:2px solid var(--line);background:#fff;color:var(--ink);border-radius:999px;padding:.35rem .8rem;min-height:40px;cursor:pointer}
button.copy{background:var(--thread);border-color:var(--thread);color:#fff;font-weight:700;border-radius:7px;padding:.55rem 1rem;min-height:44px}
.hint{font-size:.85rem;color:var(--soft);margin:.4rem 0 0}
#out{margin-top:1rem}
table.list{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--line)}
table.list caption{text-align:left;font-size:.85rem;color:var(--soft);padding:.3rem 0}
table.list th,table.list td{text-align:left;padding:.55rem .6rem;border-top:1px solid var(--line);vertical-align:top}
table.list th{font-weight:600;font-size:.9rem;color:var(--soft);width:30%}
td.big{font-weight:700;font-size:1.15rem}
tr.key td.big{color:var(--thread)}
td.size{color:var(--soft)}
.empty{margin:.5rem 0;padding:.6rem .8rem;border-left:4px solid var(--teal);background:#eef4f2}
.empty.err{border-color:var(--thread);background:#fbeeea}
.work{margin:.8rem 0 0;padding:.6rem .8rem .6rem 1.8rem;font-size:.9rem;color:var(--soft);background:#fff;border:1px dashed var(--line)}
.actions{display:flex;gap:.8rem;align-items:center;margin-top:1rem;flex-wrap:wrap}
.copied{font-size:.9rem;color:var(--teal)}
textarea.fallback{width:100%;min-height:8rem;margin-top:.6rem;font:inherit}
article{margin:0 0 2rem}
article h2{font-size:1.3rem;margin:1.6rem 0 .4rem}
article table{border-collapse:collapse;width:100%;background:#fff;font-size:.95rem}
article th,article td{border:1px solid var(--line);padding:.4rem .5rem;text-align:left}
article th{background:#efe6cf}
footer{border-top:1px solid var(--line);padding:1rem 0 2rem;font-size:.85rem;color:var(--soft)}
footer p{margin:.3rem 0}
@media(max-width:480px){.hero{background-size:auto 55%;background-position:right bottom}.hero h1{font-size:1.6rem}body{font-size:16px}}
