:root{--ink:#1b2328;--muted:#56636b;--line:#d9e0e3;--bg:#fbfcfc;--card:#fff;--accent:#1f4e5f;--accent2:#e9f2f4;--warn:#fff6e0;--warnline:#e7c56b;--max:46rem}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font:17px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--ink);background:var(--bg)}
.wrap{max-width:var(--max);margin:0 auto;padding:0 1rem}
a{color:var(--accent);text-underline-offset:2px}
a:hover{text-decoration-thickness:2px}
.skip{position:absolute;left:-999px}.skip:focus{left:1rem;top:1rem;background:#fff;padding:.5rem;z-index:9}
.site-header{background:var(--accent);color:#fff}
.site-header .wrap{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.25rem 1rem;padding:.7rem 1rem}
.brand{color:#fff;text-decoration:none;font-weight:700;font-size:1.05rem}
.logo{display:inline-block;margin-right:.2rem}
.site-header ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.2rem .9rem}
.site-header nav a{color:#fff;text-decoration:none;font-size:.95rem;opacity:.92}
.site-header nav a[aria-current]{text-decoration:underline;opacity:1}
main{padding:1rem 1rem 2.5rem}
.crumbs{font-size:.85rem;color:var(--muted);margin:.4rem 0 1rem}
.crumbs a{color:var(--muted)}
h1{font-size:1.75rem;line-height:1.2;margin:.6rem 0 .6rem}
h2{font-size:1.3rem;line-height:1.25;margin:2rem 0 .5rem}
h3{font-size:1.08rem;margin:1.4rem 0 .4rem}
.lede{font-size:1.08rem;color:#2c3a41}
.small,.stamp{font-size:.88rem;color:var(--muted)}
.stamp{border-top:1px solid var(--line);padding-top:.8rem;margin-top:2rem}
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:1rem 0;border:1px solid var(--line);border-radius:8px;background:var(--card)}
table{border-collapse:collapse;width:100%;font-size:.93rem;min-width:28rem}
caption{text-align:left;padding:.6rem .7rem;font-weight:600;font-size:.92rem;color:#2c3a41}
th,td{padding:.5rem .7rem;border-top:1px solid var(--line);text-align:left;vertical-align:top}
thead th{background:var(--accent2);font-weight:600}
.note,.disclosure,.answer,.warn{border-radius:8px;padding:.8rem 1rem;margin:1rem 0}
.answer{background:var(--accent2);border-left:4px solid var(--accent)}
.note{background:#f3f5f6;border-left:4px solid #9aa9b0}
.warn{background:var(--warn);border-left:4px solid var(--warnline)}
.disclosure{background:#f6f7f8;font-size:.88rem;color:#3c4a51;border:1px dashed #b9c4c9}
.cards{display:grid;grid-template-columns:1fr;gap:.8rem;margin:1rem 0;padding:0;list-style:none}
.cards li{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:.9rem 1rem}
.cards a{font-weight:600}
.cards p{margin:.3rem 0 0;font-size:.93rem;color:var(--muted)}
sup.cite{font-size:.72em;line-height:0}
sup.cite a{text-decoration:none}
.sources{margin-top:1.2rem;font-size:.9rem}
.sources ol{padding-left:1.3rem}
.sources li{margin:.35rem 0;word-break:break-word}
.loc{color:var(--muted)}
.checked{color:#3d6b3a;white-space:nowrap}
ol.steps>li{margin:.5rem 0}
form fieldset{border:1px solid var(--line);border-radius:10px;padding:1rem;background:var(--card)}
form label{display:block;font-weight:600;margin:.8rem 0 .25rem}
form input,form select,form textarea{width:100%;font:inherit;padding:.55rem;border:1px solid #b9c4c9;border-radius:6px;background:#fff}
form button{margin-top:1rem;font:inherit;font-weight:600;padding:.65rem 1.1rem;border:0;border-radius:8px;background:var(--accent);color:#fff}
fieldset[disabled]{opacity:.65}
fieldset[disabled] button{background:#7d8b91;cursor:not-allowed}
.badge{display:inline-block;background:var(--warn);border:1px solid var(--warnline);border-radius:99px;padding:.05rem .6rem;font-size:.8rem;font-weight:600}
.site-footer{border-top:1px solid var(--line);background:#f1f4f5;font-size:.88rem;color:var(--muted)}
.site-footer .wrap{padding:1.2rem 1rem 2rem}
.foot-links{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:.3rem 1rem}
@media (min-width:40rem){body{font-size:18px}h1{font-size:2.1rem}.cards{grid-template-columns:1fr 1fr}}
form label input[type=checkbox]{width:auto;margin-right:.4rem}
code{background:#eef2f3;padding:.05rem .3rem;border-radius:4px;font-size:.92em}
/* ---- home tool ---- */
.vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.hero{margin:-1rem -1rem 1.6rem;padding:1.3rem 1rem 1.4rem;background:linear-gradient(160deg,#1f4e5f 0%,#2a6a7d 100%);color:#fff;border-radius:0 0 18px 18px}
.hero h1{font-size:1.7rem;margin:0 0 .3rem;letter-spacing:-.01em}
.hero-sub{margin:0 0 1rem;font-size:.98rem;opacity:.92;line-height:1.45}
.search-box{display:flex;align-items:center;gap:.4rem;background:#fff;border-radius:14px;padding:.3rem .3rem .3rem .75rem;box-shadow:0 6px 22px rgba(0,0,0,.22);color:#56636b}
.search-box:focus-within{outline:3px solid #ffd76a;outline-offset:2px}
.search-box svg{flex:none}
.search-box input{flex:1;min-width:0;border:0;outline:0;font:inherit;font-size:16px;padding:.8rem .2rem;background:transparent;color:var(--ink);-webkit-appearance:none;appearance:none}
.search-box input::placeholder{color:#7d8b91}
.search-go{flex:none;font:inherit;font-weight:700;font-size:.92rem;padding:.7rem .8rem;border:0;border-radius:10px;background:var(--accent);color:#fff;cursor:pointer}
.results{margin-top:.7rem}
.results:empty{display:none}
.res-list{list-style:none;margin:0;padding:0;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 4px 16px rgba(0,0,0,.18)}
.res-list li+li{border-top:1px solid var(--line)}
.res-list a{display:block;padding:.7rem .9rem;text-decoration:none;color:var(--ink)}
.res-list a:hover,.res-list a:focus{background:var(--accent2);outline:0}
.res-kind{display:inline-block;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--accent);background:var(--accent2);border-radius:99px;padding:.05rem .5rem;margin-bottom:.2rem}
.res-title{display:block;font-weight:650;line-height:1.3}
.res-text{display:block;font-size:.88rem;color:var(--muted);line-height:1.4;margin-top:.15rem}
.res-src{display:block;font-size:.75rem;color:#3d6b3a;margin-top:.2rem}
mark{background:#ffe9a8;color:inherit;border-radius:3px;padding:0 .1em}
.res-note{background:rgba(255,255,255,.14);border-radius:10px;padding:.6rem .8rem;margin:.5rem 0;font-size:.93rem}
.res-note a{color:#fff}
.chips{list-style:none;display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0 0;padding:0}
.chip{display:inline-flex;align-items:center;gap:.35rem;min-height:44px;padding:.45rem 1.05rem;border-radius:99px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.4);color:#fff;font:inherit;font-weight:650;font-size:.95rem;text-decoration:none;cursor:pointer}
.chip:hover,.chip:focus{background:#fff;color:var(--accent)}
.chip-ghost{background:transparent;font-weight:500}
.chip .why{font-size:.72rem;font-weight:500;opacity:.75}
.photo-tool{margin-top:1rem;padding-top:1rem;border-top:1px solid rgba(255,255,255,.22)}
.btn{display:inline-flex;align-items:center;gap:.5rem;min-height:46px;padding:.6rem 1.1rem;border-radius:12px;font:inherit;font-weight:700;font-size:.98rem;cursor:pointer}
.btn-photo{background:#ffd76a;color:#1b2328;border:0}
.btn-photo:hover{background:#ffe39a}
#photo-input:focus+.photo-note,.btn-photo:focus-within{outline:3px solid #fff}
.btn-ghost{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.6);margin-top:.5rem}
.photo-note{color:#e6f1f4!important;margin:.5rem 0 0}
#ocr-status{color:#fff;margin-top:.35rem}
#ocr-status:empty{display:none}
#ocr-out label{display:block;font-weight:600;font-size:.92rem;margin:.6rem 0 .25rem}
#ocr-out textarea{width:100%;font:15px/1.4 ui-monospace,Menlo,monospace;padding:.55rem;border-radius:10px;border:0}
.ocr-picks .chip{margin:.25rem .35rem 0 0}
.helper{margin-top:1rem;background:#fff;color:var(--ink);border-radius:12px;padding:.1rem .9rem}
.helper summary{cursor:pointer;font-weight:700;padding:.75rem 0;list-style-position:inside}
.helper .dims{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}
.helper .dims label{font-size:.85rem;font-weight:600;margin:0}
.helper .dims input{margin-top:.2rem;font-size:17px}
.helper-out:empty{display:none}
.helper-out{background:var(--accent2);border-radius:10px;padding:.2rem .8rem;margin:.7rem 0}
.helper-answer{font-size:1.15rem}
.linkish{background:none;border:0;padding:0;font:inherit;color:var(--accent);text-decoration:underline;cursor:pointer}
#size-fallback{background:#fff;color:var(--ink);border-radius:12px;padding:.3rem .9rem;margin-top:.7rem;font-size:.93rem}
.hero sup.cite a{color:inherit}
.hero .helper sup.cite a,#size-fallback sup.cite a{color:var(--accent)}
.intro .lede{margin-top:0}
@media (min-width:40rem){.hero{margin:.8rem 0 2rem;border-radius:18px;padding:2rem 1.6rem}.hero h1{font-size:2.2rem}}
/* ---- measure callout ---- */
.callout-measure{margin:1rem 0}
.callout-measure a{display:flex;align-items:center;gap:.75rem;padding:.8rem .9rem;border-radius:14px;background:#fff7dc;border:2px solid #f0c94f;color:#1b2328;text-decoration:none;box-shadow:0 3px 12px rgba(0,0,0,.12)}
.callout-measure a:hover,.callout-measure a:focus{background:#fff0bf;outline:3px solid #1f4e5f;outline-offset:2px}
.cm-icon{flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:10px;background:#f0c94f;color:#1b2328}
.cm-text{flex:1;line-height:1.3}
.cm-text strong{display:block;font-size:1.02rem}
.cm-text span{display:block;font-size:.86rem;color:#4a5358;margin-top:.15rem}
.cm-go{flex:none;font-size:1.4rem;font-weight:700;color:#1f4e5f}
.hero .callout-measure{margin:.9rem 0 0}
#size-fallback .callout-measure,.results .callout-measure{margin:.6rem 0}
.quick-steps{background:var(--accent2);border-radius:12px;padding:.2rem 1rem .6rem;margin:1.2rem 0}
.quick-steps h2{margin-top:.8rem}
