/* GENERATED FILE — edit src/styles/*.css, then run scripts/build-styles.mjs. */

/* ===== 00-foundation.css ===== */
/* Design tokens, reset and global element rules. */
:root{
  font-family:Inter,"Segoe UI Variable",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#172033;background:#edf1f7;font-synthesis:none;
  --ink:#172033;--muted:#667085;--line:#d7deea;--card:#ffffff;--soft:#f4f7fb;--soft-2:#eaf0f8;
  --accent:#1457e6;--accent-2:#0e3fbd;--accent-soft:#e8f0ff;--danger:#b42318;--ok:#067647;
  --shadow:0 22px 60px rgba(32,52,89,.10);--radius:22px;
}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden!important;overscroll-behavior:none}html{position:fixed;inset:0}body{position:fixed;inset:0;min-width:320px;overflow:hidden!important;background:radial-gradient(circle at 50% -20%,#fff 0,#edf2f8 42%,#e8edf5 100%)}
button,input,select,textarea{font:inherit}button,select{touch-action:manipulation}button{cursor:pointer}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ===== 10-shell.css ===== */
/* Application shell, header, advertising slot and workspace navigation. */
:root{--ad-slot-width:728px;--ad-slot-height:90px;--ad-rail-height:102px}
.app-shell{position:fixed;inset:0;width:100%;height:auto;min-height:0;max-height:none;display:grid;grid-template-rows:56px auto minmax(0,1fr) 34px;overflow:hidden}
.topbar{display:flex;align-items:center;justify-content:space-between;padding:0 max(18px,calc((100vw - 1180px)/2));background:rgba(255,255,255,.88);border-bottom:1px solid rgba(205,214,227,.85);backdrop-filter:blur(18px);z-index:20}
.brand{display:flex;gap:10px;align-items:center;color:inherit;text-decoration:none;min-width:0}.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:linear-gradient(145deg,#1d63ed,#0e3fae);color:#fff;box-shadow:0 8px 20px rgba(20,87,230,.28);font-size:20px}.brand-copy{display:flex;flex-direction:column;line-height:1.05}.brand-copy strong{font-size:15px;letter-spacing:-.01em}.brand-copy small{font-size:8px;letter-spacing:.14em;color:var(--muted);margin-top:3px;font-weight:800}.top-actions{display:flex;align-items:center;gap:9px}.local-badge{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 11px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--muted);font-size:12px;font-weight:700}.status-dot{width:7px;height:7px;border-radius:50%;background:#12b76a;box-shadow:0 0 0 4px #d1fadf}.icon-button{height:36px;min-width:36px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);font-weight:750;padding:0 12px;display:inline-flex;align-items:center;gap:7px}.icon-button:hover{border-color:#b5c4dc;background:#f8faff}
.ad-rail{display:grid;place-items:center;height:var(--ad-rail-height);padding:6px 16px;background:linear-gradient(180deg,rgba(255,255,255,.62),rgba(238,243,250,.38))}.ad-slot{width:min(var(--ad-slot-width),calc(100vw - 32px));height:var(--ad-slot-height);display:grid;place-items:center;position:relative;overflow:hidden;border:1px dashed #b9c5d6;border-radius:14px;background:linear-gradient(135deg,rgba(255,255,255,.78),rgba(235,241,250,.82));color:#8792a7}.ad-slot:before,.ad-slot:after{content:"";position:absolute;width:260px;height:1px;background:#d5deeb;transform:rotate(-14deg)}.ad-slot:before{left:-55px}.ad-slot:after{right:-55px}.ad-label{font-size:10px;font-weight:900;letter-spacing:.18em;z-index:1}.ad-size{position:absolute;right:12px;bottom:8px;font-size:9px;font-weight:800;letter-spacing:.08em;opacity:.72}.ad-mobile{display:none}
.workspace-shell{width:min(1180px,calc(100% - 28px));min-height:0;margin:0 auto;padding:0 0 10px;display:grid;grid-template-rows:64px minmax(0,1fr);gap:10px;overflow:hidden}.workspace-head{display:flex;align-items:center;justify-content:space-between;gap:20px;min-width:0}.workspace-title{display:flex;align-items:center;gap:18px;min-width:0}.workspace-title .eyebrow{writing-mode:vertical-rl;transform:rotate(180deg);margin:0;font-size:8px;font-weight:900;letter-spacing:.15em;color:#8a94a6;white-space:nowrap}.workspace-title h1{margin:0;font-size:28px;line-height:1;letter-spacing:-.04em}.lede{margin:4px 0 0;font-size:12px;color:var(--muted)}
.mode-tabs{display:inline-flex;flex:0 0 auto;padding:4px;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.75);box-shadow:0 4px 16px rgba(44,62,98,.04)}.mode-tabs button{height:36px;border:0;border-radius:9px;background:transparent;color:var(--muted);padding:0 16px;font-weight:800;font-size:12px}.mode-tabs button[aria-selected="true"]{background:var(--ink);color:#fff;box-shadow:0 7px 18px rgba(23,32,51,.18)}

@media(max-width:640px),(max-height:620px){:root{--ad-slot-width:320px;--ad-slot-height:50px;--ad-rail-height:60px}.ad-slot{width:min(var(--ad-slot-width),calc(100vw - 20px))}.ad-desktop{display:none}.ad-mobile{display:inline}}

/* ===== 20-single.css ===== */
/* Single-measure workspace and shared form/result components. */
.workspace-card{min-height:0;height:100%;background:rgba(255,255,255,.96);border:1px solid rgba(205,214,228,.92);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}.workspace-card[hidden]{display:none!important}.single-workspace{display:grid;grid-template-columns:minmax(310px,.86fr) minmax(390px,1.14fr)}.single-compose{min-height:0;padding:24px 26px;display:flex;flex-direction:column;min-width:0;background:linear-gradient(180deg,#fff,#f9fbfe);border-right:1px solid var(--line)}.compose-heading{display:flex;align-items:flex-start;gap:11px;margin-bottom:16px}.compose-heading h2{font-size:14px;margin:1px 0 3px}.compose-heading p{font-size:11px;color:var(--muted);margin:0}.step-number{display:grid;place-items:center;width:28px;height:28px;flex:0 0 28px;border-radius:9px;background:var(--accent-soft);color:var(--accent);font-size:10px;font-weight:900;letter-spacing:.06em}.measure-field{display:block}.measure-field input{height:62px;font-size:25px;font-weight:700;letter-spacing:-.025em;border-radius:15px;background:#fff}.measure-field input::placeholder{font-weight:500;color:#9ba5b6;font-size:16px;letter-spacing:0}.unit-flow{display:grid;grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr);gap:9px;align-items:end;margin-top:14px}.unit-field,.wide-select,.destination-field,.settings-grid label{display:grid;gap:6px;font-size:10px;font-weight:850;letter-spacing:.025em;color:var(--muted);text-transform:uppercase}.swap-button{width:38px;height:42px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--accent);font-size:18px;display:grid;place-items:center;padding:0;box-shadow:0 5px 14px rgba(28,52,91,.06)}
input,select,textarea{width:100%;border:1px solid #c8d2e1;border-radius:11px;background:#fff;color:var(--ink);padding:10px 12px;outline:none;transition:border-color .15s,box-shadow .15s,background .15s}select{height:42px;font-size:12px;font-weight:650;text-overflow:ellipsis}textarea{resize:none;line-height:1.4}input:focus,select:focus,textarea:focus,button:focus-visible,.table-wrap:focus,summary:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(20,87,230,.13)}.compose-status{margin-top:16px;padding:11px 13px;border-radius:11px;background:#f2f5f9;color:#566174;font-size:12px;line-height:1.35;display:flex;gap:8px;min-height:40px}.status-label{font-weight:800;color:#344054;white-space:nowrap}.error{color:var(--danger);font-weight:700;font-size:11px;min-height:16px;margin:8px 0 0}.result-pane{padding:24px 28px;min-width:0;min-height:0;overflow:hidden;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:12px;background:linear-gradient(150deg,#f8fbff 0,#eef5ff 55%,#f8fbff 100%)}.result-topline{display:flex;justify-content:space-between;align-items:center;gap:12px}.section-kicker{font-size:9px;text-transform:uppercase;letter-spacing:.16em;font-weight:900;color:#61708a}.result-accent{display:inline-block;width:28px;height:2px;margin-left:8px;vertical-align:middle;background:var(--accent);border-radius:2px}.result-actions{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--ok)}button{min-height:40px;padding:0 15px;border:0;border-radius:10px;background:var(--ink);color:#fff;font-weight:800;font-size:12px}.copy-button{height:36px;min-height:36px;padding:0 14px;background:var(--accent)}button.secondary{background:#fff;color:var(--ink);border:1px solid var(--line)}button.ghost{background:transparent;color:var(--muted);border:1px solid transparent}button:disabled{opacity:.36;cursor:not-allowed}.result-value{display:block;font-variant-numeric:tabular-nums;font-size:clamp(44px,5vw,68px);line-height:.92;letter-spacing:-.055em;overflow-wrap:anywhere;color:#102044}.support-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:10px;min-height:0}.support-card{min-height:0;border:1px solid rgba(197,210,229,.9);border-radius:15px;padding:13px 14px;background:rgba(255,255,255,.68);overflow:hidden}.support-title{display:flex;align-items:center;gap:7px;color:#61708a}.support-title>span{color:var(--accent);font-weight:900}.support-title h2{font-size:10px;text-transform:uppercase;letter-spacing:.06em;margin:0}.plain-list{margin:10px 0 0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.plain-list li{padding:6px 8px;border-radius:8px;background:#fff;font-size:11px;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fraction-result{display:flex;flex-direction:column;gap:3px;margin-top:9px}.fraction-result strong{font-size:22px;line-height:1}.fraction-result span,.fine-print{font-size:10px;color:var(--muted)}.fine-print{margin:6px 0 0;line-height:1.25}.source-panel{border-top:1px solid rgba(199,210,226,.8);padding-top:8px;font-size:11px;min-height:26px}.source-panel summary{cursor:pointer;font-weight:800;color:#526077}.source-panel div{display:flex;gap:7px;flex-wrap:wrap;margin-top:7px;max-height:68px;overflow:auto}.source-panel p{margin:0;color:var(--muted)}.source-panel a{color:var(--accent);overflow-wrap:anywhere}

/* ===== 30-batch.css ===== */
/* Batch workspace, table and export controls. */
.batch-workspace{display:grid;grid-template-columns:minmax(300px,.82fr) minmax(430px,1.18fr)}.batch-compose{position:relative;min-width:0;padding:20px 22px;display:grid;grid-template-rows:auto minmax(96px,1fr) auto auto auto auto;gap:9px;background:linear-gradient(180deg,#fff,#f9fbfe);border-right:1px solid var(--line);overflow:hidden}.compact-heading{margin-bottom:0}.compact-heading p{max-width:390px}.batch-textarea{min-height:0}.batch-textarea textarea{height:100%;min-height:96px}.wide-select{margin:0}.destination-panel{font-size:11px;position:relative}.destination-panel summary{cursor:pointer;font-weight:800;color:#526077;padding:5px 0}.destination-panel[open]{overflow:auto;max-height:180px;padding-right:4px}.destination-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:7px}.destination-field select{height:36px;font-size:10px}.batch-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.batch-actions button{min-height:36px;height:36px}.batch-compose progress{width:100%;height:5px}.batch-results{min-width:0;min-height:0;overflow:hidden;padding:20px 22px;display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:8px;background:linear-gradient(150deg,#f8fbff,#f0f6ff)}.batch-result-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.summary-line{font-weight:760;font-size:11px;margin:4px 0 0;color:#4e5b70}.export-actions{justify-content:flex-end}.notice{color:#875300;font-size:10px;min-height:13px;margin:0}.table-wrap{min-height:0;overflow:auto;border:1px solid var(--line);border-radius:13px;background:#fff}.table-wrap::-webkit-scrollbar{width:9px;height:9px}.table-wrap::-webkit-scrollbar-thumb{background:#c7d1df;border-radius:9px;border:2px solid #fff}table{width:100%;border-collapse:collapse;min-width:640px;font-size:10px}th,td{text-align:left;padding:8px 9px;border-bottom:1px solid #edf0f5;vertical-align:top}th{position:sticky;top:0;background:#f4f7fb;z-index:1;color:#596579;text-transform:uppercase;letter-spacing:.04em;font-size:8px}tr[data-status="converted"] td:last-child{color:var(--ok)}tr:not([data-status="converted"]) td:last-child{color:var(--danger);font-weight:800}

/* ===== 35-batch-planner.css ===== */
/* Batch planner: one source for layout and type. Shared field dimensions stay in the shell. */
.batch-planner{min-height:0;max-height:250px;overflow:hidden;border:1px solid var(--line);border-radius:13px;background:var(--soft);padding:9px 10px;display:flex;flex-direction:column;gap:6px}
.batch-detection-line{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;flex-wrap:wrap;flex-shrink:0}
.batch-detection-line strong{font-size:15px;line-height:1.3;color:var(--ink)}
.batch-detection-hint{margin:0;color:var(--muted);font-size:14px;line-height:1.3;flex-shrink:0}
.batch-target-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--muted);font-size:14px;font-weight:750;min-width:0;flex-shrink:0}
.batch-plan{color:var(--accent);font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}
.batch-target-grid{margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));align-content:start;gap:6px;min-height:0;overflow:auto;flex:1 1 auto;padding:0 2px 2px 0}
.batch-target-field{display:grid;gap:3px;padding:6px 7px;border:1px solid var(--line);border-radius:10px;background:var(--card);text-transform:none;letter-spacing:0;min-width:0}
.batch-target-label{font-size:15px;font-weight:850;color:var(--ink);line-height:1.3}
.batch-source-preview{font-size:14px;color:var(--muted)}
.batch-target-field select{height:36px;min-height:36px;padding:4px 7px;font-size:16px}
.batch-common-field:not([hidden]){display:flex;align-items:center;gap:6px;font-size:14px;flex-shrink:0;min-width:0}
.batch-common-field span{flex:0 1 auto;line-height:1.2}
.batch-common-field select{min-width:0;flex:1;height:36px;min-height:36px;font-size:16px;padding:3px 6px}
.batch-actions #batch-run{background:var(--accent);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.batch-results table{min-width:720px}.batch-results th:nth-child(3),.batch-results td:nth-child(3){max-width:190px}.batch-results td:nth-child(3){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.batch-results th:nth-child(4),.batch-results td:nth-child(4){width:70px;font-weight:850;color:var(--accent)}
@media(max-width:640px){
 .batch-planner{min-height:100px;max-height:280px;padding:7px 8px;gap:4px}
 .batch-detection-line .section-kicker{display:none}
 .batch-detection-hint{font-size:14px}
 .batch-target-grid{grid-template-columns:1fr}
 .batch-plan{display:none}
 .batch-compose > .batch-actions{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:5px}
 .batch-target-field{grid-template-columns:minmax(104px,.9fr) minmax(0,1.1fr);align-items:center;padding:4px 6px;gap:5px}
 .batch-target-field select{grid-column:2;grid-row:1}.batch-source-preview{display:none}
}
@media(max-height:620px){.batch-planner{max-height:260px}.batch-target-grid{max-height:200px}}
@media(prefers-contrast:more){.batch-planner,.batch-target-field{border-width:2px}}

.batch-results:not(.has-results) table{visibility:hidden}
.batch-results .batch-empty-state{font-size:13px;line-height:1.4}

/* ===== 40-secondary.css ===== */
/* Footer, settings dialog and informational pages. */
.app-footer{display:flex;align-items:center;justify-content:space-between;width:min(1180px,calc(100% - 28px));margin:auto;color:#7b8799;font-size:9px;overflow:hidden}.app-footer nav{display:flex;gap:14px;white-space:nowrap}.app-footer a{color:inherit;text-decoration:none;font-weight:700}.app-footer a:hover{color:var(--accent)}.footer-status{display:flex;gap:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.footer-status>span:first-child:before{content:"●";color:#12b76a;margin-right:6px;font-size:7px}
.settings-dialog{width:min(620px,calc(100% - 28px));max-height:min(620px,calc(100dvh - 40px));border:0;padding:0;border-radius:22px;background:transparent;color:var(--ink);box-shadow:0 30px 90px rgba(14,30,59,.28)}.settings-dialog::backdrop{background:rgba(14,24,42,.38);backdrop-filter:blur(5px)}.settings-surface{background:#fff;border:1px solid #dfe5ef;border-radius:22px;padding:24px}.settings-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:20px}.settings-head h2{font-size:25px;letter-spacing:-.035em;margin:4px 0 0}.dialog-close{width:38px;height:38px;min-height:38px;padding:0;border-radius:50%;background:#f1f4f8;color:#344054;font-size:22px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.settings-footer{display:flex;align-items:center;gap:10px;margin-top:18px;font-size:11px;color:var(--muted)}
.topic-intro,.info-page{max-width:780px;margin:0 auto 28px}.topic-intro a,.info-page a{color:var(--accent)}.topic-intro h1,.info-page h1{font-size:clamp(34px,6vw,58px);letter-spacing:-.04em;line-height:1;margin:18px 0 14px}.topic-intro p,.info-page p{font-size:17px;line-height:1.6;color:var(--muted)}.topic-definition{padding:13px 15px;border-left:3px solid var(--accent);background:var(--soft)}.compact-hero h2{font-size:28px;margin:0}.compact-hero .lede{font-size:16px}.info-page{background:var(--card);padding:28px;border:1px solid var(--line);border-radius:20px}.info-page li{margin:8px 0}

/* Tool directory stays in a dialog: no extra page height or hidden footer overflow. */
.footer-tools{border:0;padding:0;min-height:24px;height:24px;background:none;color:inherit;font:inherit;font-weight:700;box-shadow:none}
.tools-content{overflow:auto;padding:16px 24px;max-height:65dvh}
.tools-content nav:not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tools-content a{display:block;padding:10px;border:1px solid var(--line);border-radius:8px;color:var(--accent);font-size:16px;line-height:1.4}
.convention-button{background:var(--card);color:var(--ink);border:1px solid var(--line);font-size:13px;min-height:34px;height:34px;padding:0 8px;white-space:nowrap}
.ad-preview-content{font-size:14px;font-weight:750;text-align:center;padding:4px;z-index:1}
.ad-slot[data-preview="filled"]{background:var(--ink);color:var(--card);border-style:solid}
.ad-slot[data-preview="empty"]::before,.ad-slot[data-preview="empty"]::after{visibility:hidden}
@media(max-width:640px){.tools-content nav{grid-template-columns:1fr}.tools-content{padding:12px}.footer-status{display:none}.app-footer>nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:0 10px}.app-footer a{line-height:24px}}

/* ===== 45-graphics-reference.css ===== */
:root{--radius:18px;--instrument-tick:rgba(20,87,230,.72)}

.result-pane,.batch-results{position:relative}
.result-pane::before,.batch-results::before{content:"";position:absolute;z-index:2;left:0;top:20px;bottom:20px;width:3px;pointer-events:none;background:repeating-linear-gradient(to bottom,var(--instrument-tick) 0 2px,transparent 2px 9px)}
.result-accent{width:32px;height:3px;background:repeating-linear-gradient(90deg,var(--accent) 0 3px,transparent 3px 8px)}
.brand-mark{position:relative;border-radius:9px;background:var(--accent);box-shadow:0 7px 16px rgba(20,87,230,.22)}
.brand-mark::after{content:"";position:absolute;left:8px;right:8px;bottom:6px;height:2px;background:repeating-linear-gradient(90deg,rgba(255,255,255,.88) 0 2px,transparent 2px 5px);opacity:.8}

.result-pane{grid-template-rows:auto auto auto auto;align-content:start}
.support-grid{align-items:start}
.support-card{min-height:auto;align-self:start;border-radius:12px}
.plain-list{align-content:start}
.single-compose,.batch-compose{align-content:start}

.result-empty-state{margin:2px 0 0;max-width:460px;color:#5d6a7f;font-size:13px;line-height:1.45;font-weight:650}
.result-pane.has-result .result-empty-state{display:none}
.result-pane:not(.has-result) .support-grid,.result-pane:not(.has-result) .source-panel{display:none}
.result-pane:not(.has-result) .result-value{color:#93a1b6;font-size:clamp(40px,4.2vw,58px)}
.table-wrap{position:relative}
.batch-empty-state{position:absolute;z-index:2;left:18px;right:18px;top:52%;transform:translateY(-50%);margin:0 auto;max-width:430px;color:#68758a;font-size:12px;line-height:1.45;font-weight:650;text-align:center;pointer-events:none}
.batch-results.has-results .batch-empty-state{display:none}
.batch-results:not(.has-results) tbody{visibility:hidden}

button,.icon-button,.swap-button,.copy-button,.mode-tabs button{transition:transform .09s ease,background-color .12s ease,border-color .12s ease,color .12s ease,box-shadow .12s ease}
button:active:not(:disabled),.icon-button:active:not(:disabled),.swap-button:active:not(:disabled){transform:translateY(1px)}
input,select,textarea{transition:border-color .12s ease,box-shadow .12s ease,background-color .12s ease}
.mode-tabs button[aria-selected="true"]{box-shadow:0 5px 12px rgba(23,32,51,.16)}

@keyframes result-set{from{opacity:.72;transform:translateY(2px)}to{opacity:1;transform:none}}
@keyframes table-set{from{opacity:.82;transform:translateY(1px)}to{opacity:1;transform:none}}
.result-pane.result-updated .result-value{animation:result-set .15s cubic-bezier(.2,.7,.2,1)}
.batch-results.batch-updated .table-wrap{animation:table-set .14s cubic-bezier(.2,.7,.2,1)}

th{font-size:9px;letter-spacing:.055em}
td{font-size:10.5px;line-height:1.35}
.summary-line{font-size:11.5px}
.notice{font-size:10.5px}
.app-footer{font-size:10px}
.section-kicker{font-size:9.5px}
.support-title h2{font-size:10.5px}
.source-panel{font-size:11px}

@media(min-width:861px) and (min-height:720px){
  .workspace-card{height:min(600px,100%);align-self:start}
  .single-compose,.result-pane{padding-top:22px;padding-bottom:22px}
  .batch-compose,.batch-results{padding-top:18px;padding-bottom:18px}
}
.ui-icon{width:16px;height:16px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}.brand-mark .ui-icon{width:20px;height:20px}.swap-button .ui-icon{width:18px;height:18px}.support-title .ui-icon{width:14px;height:14px;color:var(--accent);flex:0 0 auto}.icon-button .ui-icon{width:15px;height:15px}

/* ===== 50-topic-pages.css ===== */
/* Public topic-page integration. */
/* RC4 page-content and tool-page integration */
.shell{height:100dvh;overflow:auto;padding:28px 16px}.workspace-head{position:relative}.topic-workspace-title{min-width:0}.topic-workspace-title>div{min-width:0}.topic-workspace-title h1{max-width:min(560px,46vw);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topic-workspace-title .lede{max-width:min(620px,50vw);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topic-info-popover{position:absolute;right:0;top:50px;z-index:12;font-size:10px}.topic-info-popover>summary{list-style:none;cursor:pointer;height:28px;display:flex;align-items:center;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:var(--card);font-weight:800;color:var(--muted);box-shadow:0 5px 14px rgba(28,52,91,.06)}.topic-info-popover>summary::-webkit-details-marker{display:none}.topic-info-popover[open]>div{position:absolute;right:0;top:34px;width:min(440px,calc(100vw - 28px));max-height:240px;overflow:auto;padding:14px;border:1px solid var(--line);border-radius:13px;background:var(--card);box-shadow:var(--shadow);color:var(--muted);line-height:1.45}.topic-info-popover p{margin:0 0 8px}.topic-info-popover p:last-child{margin:0}
@media(max-width:640px){.app-footer{justify-content:center}.footer-status{display:none}.topic-workspace-title h1{max-width:140px;font-size:17px}.topic-workspace-title .lede{display:none}.topic-info-popover{top:43px}.shell{padding:14px 10px}.info-page{margin:0;max-height:calc(100dvh - 28px)}}


/* RC13 SEO guide: useful, crawlable route-specific content without turning the
   converter into a long article page. It lives in the existing Guide popover. */
.topic-info-popover[open]>div.topic-guide{width:min(620px,calc(100vw - 28px));max-height:min(68vh,560px);padding:18px;font-size:12px;line-height:1.55}.topic-guide-section+.topic-guide-section{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}.topic-guide h2{margin:0 0 7px;font-size:13px;color:var(--ink)}.topic-guide p{margin:0 0 8px}.topic-formula{font-size:14px;font-weight:850;color:var(--ink);letter-spacing:.005em}.topic-note{padding:9px 10px;border-radius:10px;background:var(--soft);color:var(--muted)}.topic-guide-table{overflow:auto;border:1px solid var(--line);border-radius:10px}.topic-guide-table table{width:100%;min-width:0;border-collapse:collapse;font-size:11px}.topic-guide-table th,.topic-guide-table td{padding:7px 9px;text-align:right;border-bottom:1px solid var(--line)}.topic-guide-table th:first-child,.topic-guide-table td:first-child{text-align:left}.topic-guide-table tbody tr:last-child td{border-bottom:0}.topic-related-links,.topic-source-links{margin:0;padding-left:18px;display:grid;gap:5px}.topic-related-links a,.topic-source-links a{color:var(--accent);font-weight:750;text-decoration:none}.topic-related-links a:hover,.topic-source-links a:hover{text-decoration:underline}
@media(max-width:640px){.topic-info-popover[open]>div.topic-guide{width:min(520px,calc(100vw - 20px));max-height:70vh;padding:14px;font-size:12px}.topic-guide h2{font-size:13px}.topic-formula{font-size:13px}.topic-guide-table table{font-size:11px}}

/* ===== 80-responsive.css ===== */
/* Core responsive, reduced-motion and dark-mode behavior. */
@media(max-width:860px){.single-workspace{grid-template-columns:.92fr 1.08fr}.single-compose,.result-pane{padding:18px}.result-value{font-size:48px}.support-grid{grid-template-columns:1fr}.fraction-card{display:none}.batch-workspace{grid-template-columns:.88fr 1.12fr}.batch-compose,.batch-results{padding:16px}.workspace-shell{grid-template-rows:58px minmax(0,1fr)}}
@media(max-width:640px){
  .app-shell{grid-template-rows:50px var(--ad-rail-height) minmax(0,1fr) 48px}.topbar{padding:0 10px}.brand-mark{width:31px;height:31px}.brand-copy small,.local-badge,.settings-label{display:none}.icon-button{padding:0;width:36px}.ad-rail{padding:5px 10px;}.ad-slot{border-radius:10px;}.ad-desktop{display:none}.ad-mobile{display:inline}.workspace-shell{width:calc(100% - 16px);padding-bottom:6px;grid-template-rows:50px minmax(0,1fr);gap:6px}.workspace-head{gap:8px}.workspace-title{gap:0}.workspace-title .eyebrow,.workspace-title .lede{display:none}.workspace-title h1{font-size:20px}.mode-tabs{padding:3px;border-radius:11px}.mode-tabs button{height:32px;padding:0 11px;font-size:10px}.workspace-card{border-radius:16px}.single-workspace{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}.single-compose{padding:12px;border-right:0;border-bottom:1px solid var(--line)}.compose-heading{display:none}.measure-field input{height:46px;font-size:20px;border-radius:11px}.measure-field input::placeholder{font-size:13px}.unit-flow{grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr);gap:5px;margin-top:8px}.unit-field{font-size:8px}.unit-field select{height:36px;padding:7px;font-size:10px}.swap-button{width:34px;height:36px;border-radius:9px}.compose-status{margin-top:8px;padding:7px 9px;min-height:30px;font-size:10px}.status-label{display:none}.error{font-size:9px;min-height:11px;margin-top:3px}.result-pane{padding:12px;gap:6px;grid-template-rows:auto auto minmax(0,1fr) auto}.result-value{font-size:38px;line-height:.95}.copy-button{height:30px;min-height:30px;font-size:10px}.support-grid{grid-template-columns:1.15fr .85fr;gap:6px}.support-card{padding:9px;border-radius:11px}.support-title h2{font-size:8px}.plain-list{margin-top:6px;gap:3px}.plain-list li{font-size:9px;padding:4px 5px}.fraction-card{display:block}.fraction-result{margin-top:6px}.fraction-result strong{font-size:17px}.fraction-result span,.fine-print{font-size:8px}.fine-print{display:none}.source-panel{padding-top:5px;font-size:9px}.source-panel div{max-height:48px}.batch-workspace{grid-template-columns:1fr;grid-template-rows:minmax(190px,42%) minmax(0,58%)}.batch-compose{border-right:0;border-bottom:1px solid var(--line);padding:10px;grid-template-rows:minmax(74px,1fr) auto auto auto auto;gap:5px}.batch-compose .compose-heading{display:none}.batch-textarea textarea{min-height:74px;font-size:11px;padding:8px}.wide-select{font-size:8px}.wide-select select{height:32px;padding:5px;font-size:9px}.destination-panel{font-size:9px}.destination-panel[open]{position:absolute;left:10px;right:10px;top:auto;bottom:46px;z-index:8;max-height:230px;padding:9px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}.destination-grid{grid-template-columns:1fr 1fr}.batch-actions button{height:30px;min-height:30px;padding:0 10px;font-size:9px}.batch-results{padding:9px 10px;gap:5px}.batch-result-head{align-items:flex-start}.summary-line{font-size:9px}.export-actions button{height:28px;min-height:28px}.table-wrap{border-radius:9px}table{font-size:9px;min-width:570px}th,td{padding:6px 7px}.app-footer{width:calc(100% - 16px);font-size:8px}.app-footer nav{gap:0 10px}.footer-status>span:first-child{display:none}.settings-dialog{width:calc(100% - 20px);max-height:calc(100dvh - 20px)}.settings-surface{padding:16px;border-radius:16px}.settings-grid{grid-template-columns:1fr}.settings-head{margin-bottom:12px}.settings-grid label{font-size:9px}.settings-footer{margin-top:12px}.settings-footer button{font-size:10px}.topic-intro,.info-page{max-width:none;margin:20px}.topic-intro{overflow:auto}.info-page{overflow:auto;max-height:calc(100dvh - 40px)}
}
@media(max-height:740px) and (min-width:641px){.app-shell{grid-template-rows:50px var(--ad-rail-height) minmax(0,1fr) 28px}.ad-rail{}.ad-slot{}.workspace-shell{grid-template-rows:52px minmax(0,1fr)}.result-value{font-size:44px}.single-compose,.result-pane{padding-top:14px;padding-bottom:14px}.compose-heading{margin-bottom:10px}.measure-field input{height:50px}.support-card{padding:10px}.source-panel{font-size:9px}}
@media(max-height:650px){
  .app-shell{grid-template-rows:44px var(--ad-rail-height) minmax(0,1fr) 24px}
  .topbar{min-height:0}.brand-mark{width:30px;height:30px}.local-badge{height:28px}.icon-button{height:32px;min-height:32px}
  .ad-rail{padding:3px 10px;}.ad-slot{}.ad-size{bottom:4px}
  .workspace-shell{padding-bottom:4px;grid-template-rows:42px minmax(0,1fr);gap:4px}.workspace-title h1{font-size:20px}.workspace-title .lede{display:none}.workspace-title .eyebrow{display:none}
  .mode-tabs button{height:30px;min-height:30px;padding:0 11px}.workspace-card{border-radius:14px}
  .single-compose,.result-pane{padding:9px 12px}.compose-heading{display:none}.measure-field input{height:40px;font-size:18px}.measure-field input::placeholder{font-size:12px}.unit-flow{margin-top:6px;gap:5px;grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr)}.unit-field{font-size:8px}.unit-field select{height:32px;padding:5px 7px;font-size:10px}.swap-button{width:32px;height:32px;min-height:32px}.compose-status{margin-top:6px;padding:5px 8px;min-height:24px;font-size:9px}.error{margin-top:2px;min-height:9px;font-size:8px}
  .result-pane{gap:4px;grid-template-rows:auto auto minmax(0,1fr) auto}.result-value{font-size:clamp(30px,4.3vw,42px)}.copy-button{height:28px;min-height:28px;padding:0 10px;font-size:9px}.support-grid{gap:4px}.support-card{padding:6px 8px;border-radius:9px}.support-title h2{font-size:7px}.plain-list{margin-top:4px;gap:2px}.plain-list li{font-size:8px;padding:2px 4px}.fraction-result{margin-top:3px}.fraction-result strong{font-size:14px}.fraction-result span{font-size:7px}.fine-print{display:none}.source-panel{padding-top:3px;font-size:8px;min-height:16px}.source-panel div{max-height:36px;margin-top:3px}
  .batch-compose{padding:7px 9px;gap:3px;grid-template-rows:minmax(54px,1fr) auto auto auto auto}.batch-textarea textarea{min-height:54px;padding:6px;font-size:9px}.wide-select select{height:28px}.batch-actions button{height:27px;min-height:27px;padding:0 8px;font-size:8px}.batch-results{padding:7px 9px;gap:3px}.export-actions button{height:26px;min-height:26px}.summary-line,.notice{font-size:8px}.table-wrap{border-radius:7px}table{font-size:8px}th,td{padding:4px 5px}
  .app-footer{font-size:7px}.app-footer nav{gap:0 10px}
}
@media(max-width:640px) and (max-height:650px){
  .app-shell{grid-template-rows:42px var(--ad-rail-height) minmax(0,1fr) 22px}.ad-rail{}.ad-slot{}.workspace-shell{grid-template-rows:38px minmax(0,1fr)}.workspace-title h1{font-size:17px}.mode-tabs button{height:28px;min-height:28px;padding:0 8px;font-size:9px}
  .single-workspace{grid-template-rows:108px minmax(0,1fr)}.single-compose{padding:7px 9px}.measure-field input{height:36px;font-size:16px}.unit-flow{margin-top:4px}.unit-field select{height:29px}.swap-button{height:29px;min-height:29px}.compose-status{margin-top:4px;padding:4px 6px;min-height:20px}.result-pane{padding:7px 9px}.result-value{font-size:29px}.support-card{padding:5px 6px}.plain-list li{font-size:7px;padding:2px 3px}.fraction-result strong{font-size:12px}.source-panel{font-size:7px}.batch-workspace{grid-template-rows:minmax(138px,40%) minmax(0,60%)}.batch-compose{padding:6px 8px}.app-footer{width:calc(100% - 12px)}
}
@media(max-width:640px) and (max-height:560px){
  .app-shell{grid-template-rows:38px var(--ad-rail-height) minmax(0,1fr) 20px}.brand-copy strong{font-size:12px}.brand-mark{width:27px;height:27px}.ad-rail{padding:2px 8px;}.ad-slot{}.workspace-shell{grid-template-rows:34px minmax(0,1fr)}.workspace-title h1{font-size:15px}.mode-tabs button{height:25px;min-height:25px;font-size:8px}.single-workspace{grid-template-rows:96px minmax(0,1fr)}.single-compose{padding:5px 7px}.measure-field input{height:32px;font-size:14px}.unit-field select,.swap-button{height:26px;min-height:26px}.unit-flow{grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr)}.swap-button{width:28px}.compose-status{font-size:8px;min-height:17px}.error{display:none}.result-pane{padding:5px 7px}.result-value{font-size:25px}.support-title h2{font-size:6px}.plain-list{grid-template-columns:1fr 1fr}.source-panel{padding-top:2px}.app-footer{font-size:6px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media(prefers-color-scheme:dark){
  :root{color:#edf2fb;background:#0f1420;--ink:#edf2fb;--muted:#9ca8bb;--line:#303a4a;--card:#171e2a;--soft:#202938;--soft-2:#263143;--accent:#79a5ff;--accent-2:#9cbcff;--accent-soft:#1f3154;--danger:#ff8b82;--ok:#75e0aa;--shadow:0 22px 60px rgba(0,0,0,.28)}
  body{background:radial-gradient(circle at 50% -20%,#202c40 0,#111824 45%,#0d121b 100%)}.topbar{background:rgba(18,25,36,.88);border-color:#293445}.brand-mark{color:#fff}.local-badge,.icon-button,input,select,textarea,.swap-button,button.secondary,.support-card,.plain-list li,.settings-surface{background:#171e2a;color:var(--ink);border-color:#344052}.ad-rail{background:rgba(14,20,31,.45);}.ad-slot{background:linear-gradient(135deg,#161e2b,#1d2736);border-color:#40506a;color:#7f8ba0;}.workspace-card{background:#151c27;border-color:#303b4d}.single-compose,.batch-compose{background:linear-gradient(180deg,#171e2a,#131a24);border-color:#303a4a}.result-pane,.batch-results{background:linear-gradient(150deg,#15223a,#13213a)}.measure-field input{background:#111822}.compose-status{background:#202a3a;color:#aab5c6}.status-label{color:#d6deea}.result-value{color:#eaf1ff}.support-card{background:rgba(22,30,43,.8)}.table-wrap{background:#141b26}.table-wrap::-webkit-scrollbar-thumb{background:#46536a;border-color:#141b26}th{background:#202938}.source-panel{border-color:#334055}.dialog-close{background:#273244;color:#e8eef8}.app-footer{color:#8f9aab}
}

/* ===== 85-graphics-responsive.css ===== */
@media(max-width:640px){
  .result-pane::before,.batch-results::before{left:18px;right:18px;top:0;bottom:auto;width:auto;height:3px;background:repeating-linear-gradient(90deg,var(--instrument-tick) 0 3px,transparent 3px 9px)}
  .result-empty-state{font-size:11px;line-height:1.35}
  .batch-empty-state{font-size:10px;left:12px;right:12px}
  th{font-size:9px!important}
  td{font-size:10px}
  .summary-line{font-size:10px}
  .notice{font-size:9.5px}
}
@media(max-width:640px) and (min-height:561px){
  .app-footer{font-size:10px!important}
  .source-panel,.support-title h2{font-size:10px!important}
}
@media(prefers-reduced-motion:reduce){
  *{animation:none!important}
}
@media(min-width:861px) and (min-height:720px){.single-workspace{height:380px}}
@media(min-width:641px) and (max-width:860px) and (min-height:720px){.single-workspace{height:470px}}
@media(max-width:640px) and (min-height:640px){.single-workspace{height:430px}}

/* ===== 90-accessibility.css ===== */
/* Accessibility, traceability and high-zoom reflow guarantees. */
/* RC8 excellence pass — readable defaults, explicit corrections, robust keyboard focus,
   and accessibility reflow at high zoom/very short CSS viewports. */
.skip-link{position:fixed;left:12px;top:8px;z-index:200;transform:translateY(-160%);padding:9px 12px;border-radius:9px;background:#0b3ea8;color:#fff;font-weight:850;font-size:13px;text-decoration:none;box-shadow:0 8px 24px rgba(0,0,0,.22)}
.skip-link:focus{transform:none;outline:3px solid #fff;outline-offset:2px}
:where(button,input,select,textarea,summary,a):focus-visible{outline:3px solid #0b57d0!important;outline-offset:2px!important;box-shadow:0 0 0 2px #fff!important}
.correction-note{display:inline-flex;align-items:center;max-width:100%;padding:2px 7px;border-radius:999px;background:#fff4d7;color:#7a4b00;font-weight:850;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.correction-note[hidden]{display:none}
.traceability-details{display:grid!important;gap:8px!important;max-height:150px!important;overflow:auto!important;padding-right:3px}.trace-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px!important;margin:0!important}.trace-card{display:grid;gap:3px;padding:8px 9px;border:1px solid var(--line);border-radius:10px;background:var(--card)}.trace-card strong{font-size:10px;color:var(--ink)}.trace-card span{font-size:10px;color:var(--ink);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.trace-card small{font-size:9px;color:var(--muted)}.trace-rounding{font-size:10px!important;line-height:1.35!important;color:var(--muted)!important}.trace-links{display:grid!important;gap:4px!important;margin:0!important}.trace-links a{font-size:10px;line-height:1.3}
/* Never shrink actionable controls below WCAG 2.2's 24 CSS px target floor. */
.mode-tabs button,.swap-button,.copy-button,.dialog-close{min-height:28px!important}
@media(max-width:640px){
  .brand-copy small{font-size:9px}.workspace-title .eyebrow{font-size:9px}.section-kicker{font-size:9px}.compose-heading p,.lede{font-size:10px}.unit-field,.wide-select,.destination-field,.settings-grid label{font-size:9px}.compose-status{font-size:10px}.error{font-size:10px}.support-title h2{font-size:9px}.plain-list li{font-size:10px}.fraction-result span,.fine-print{font-size:9px}.source-panel{font-size:10px}.app-footer{font-size:9px}
  
  .correction-note{font-size:9px}.trace-grid{grid-template-columns:1fr}.trace-card strong,.trace-card span,.trace-rounding,.trace-links a{font-size:9px}.trace-card small{font-size:8px}
}
@media(max-width:640px) and (max-height:650px){
  .mode-tabs button{font-size:9px}.plain-list li{font-size:9px}.source-panel{font-size:9px}.support-title h2{font-size:8px}.app-footer{font-size:8px}
}
@media(max-width:640px) and (max-height:560px){
  .mode-tabs button{height:28px!important;min-height:28px!important;font-size:9px}.unit-field select,.swap-button{height:28px!important;min-height:28px!important}.compose-status{font-size:9px;min-height:19px}.error{display:block;font-size:9px;min-height:11px;margin-top:2px}.support-title h2{font-size:8px}.plain-list li{font-size:9px}.source-panel{font-size:9px}.app-footer{font-size:8px}
}
/* At high browser zoom the CSS viewport becomes very short. Do not miniaturise or clip:
   switch to a vertical reflow mode. Normal-size screens remain strictly no-page-scroll. */
@media(max-height:430px){
  html,body{position:static!important;height:auto!important;min-height:100%!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior-y:auto!important}
  body{min-width:0!important}.app-shell{position:relative!important;inset:auto!important;height:auto!important;min-height:100vh!important;overflow:visible!important;grid-template-rows:48px var(--ad-rail-height) auto 34px!important}.topbar{position:sticky;top:0;height:48px;z-index:60}.ad-rail{padding:4px 8px!important;}.ad-slot{}.ad-desktop{display:none!important}.ad-mobile{display:inline!important}.workspace-shell{height:auto!important;min-height:520px!important;overflow:visible!important;grid-template-rows:auto auto!important;padding-bottom:12px!important}.workspace-head{min-height:48px}.workspace-card{height:auto!important;min-height:430px!important;overflow:visible!important}.single-workspace,.batch-workspace{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto auto!important}.single-compose,.batch-compose{border-right:0!important;border-bottom:1px solid var(--line);overflow:visible!important}.result-pane,.batch-results{min-height:330px!important;overflow:visible!important}.batch-results{padding-bottom:12px}.table-wrap{max-height:280px!important}.app-footer{position:relative!important;min-height:34px!important;height:auto!important}.workspace-title .eyebrow{display:none}.workspace-title h1{font-size:20px!important}.lede{font-size:12px!important}.mode-tabs button{font-size:12px!important;min-height:36px!important}.compose-heading h2{font-size:14px!important}.compose-heading p,.unit-field,.compose-status,.error,.source-panel,.plain-list li,.fraction-result span,.fine-print,.app-footer{font-size:12px!important}.measure-field input{font-size:20px!important;min-height:46px!important}.unit-field select,.swap-button{min-height:40px!important}.support-title h2,.section-kicker{font-size:11px!important}.result-value{font-size:40px!important}.correction-note{font-size:11px!important;white-space:normal}.traceability-details{max-height:260px!important}.trace-card strong,.trace-card span,.trace-card small,.trace-rounding,.trace-links a{font-size:11px!important}
}
@media(prefers-contrast:more){:root{--muted:#465267;--line:#9aa8bd;--accent:#063fbd}.workspace-card,.support-card,input,select,textarea{border-width:2px}.local-badge{border-width:2px}}
/* RC8 readability floor on ordinary mobile viewports. */
@media(max-width:640px) and (min-height:561px){
  .brand-copy small,.workspace-title .eyebrow,.section-kicker,.unit-field,.wide-select,.destination-field,.settings-grid label,.support-title h2,.fraction-result span,.fine-print,.source-panel,.app-footer{font-size:10px!important}
  .compose-heading p,.lede,.compose-status,.error,.plain-list li{font-size:11px!important}
  .mode-tabs button,.copy-button{font-size:11px!important}
}
/* RC8 contrast floor for instructional/placeholder text. */
.ad-slot{color:#68758a;}input::placeholder,textarea::placeholder{color:#68758a!important;opacity:1}
@media(max-width:640px) and (min-height:561px){.trace-card strong,.trace-card span,.trace-card small,.trace-rounding,.trace-links a{font-size:10px!important}}
/* RC8 extreme-normal-height readability: keep the user's no-scroll contract down to 431px,
   but never collapse informative typography below 9px. At <=430px the accessible reflow
   mode above takes over with larger 11–12px text instead of further miniaturisation. */
@media(max-width:640px) and (min-height:431px) and (max-height:560px){
  .brand-copy small,.workspace-title .eyebrow,.section-kicker,.unit-field,.wide-select,.destination-field,.settings-grid label,.support-title h2,.fraction-result span,.fine-print,.source-panel,.app-footer,.summary-line,.notice,table,.batch-actions button{font-size:9px!important}
  .compose-status,.error,.plain-list li,.correction-note{font-size:9px!important}
  
}
@media(max-width:640px) and (min-height:431px) and (max-height:560px){
  .trace-card strong,.trace-card span,.trace-card small,.trace-rounding,.trace-links a{font-size:9px!important}
}
.clipboard-fallback{position:fixed;inset:0 auto auto -10000px;width:1px;height:1px;opacity:0;pointer-events:none}
.noscript-notice{position:fixed;z-index:1000;inset:12px 12px auto;padding:12px 16px;border:2px solid #9b1c1c;border-radius:10px;background:#fff;color:#571515;font-size:14px;line-height:1.4}

/* ===== 95-readability.css ===== */
/* RC11 readability pass: larger ordinary text, compact spacing, and traceability in a dedicated dialog. */
:root{--reading-body:16px;--reading-small:14px;--reading-label:13px}

.brand-copy strong{font-size:19px}.brand-copy small{font-size:12px}.local-badge{font-size:14px}.icon-button{font-size:15px}
.workspace-title .eyebrow{font-size:12px}.workspace-title h1{font-size:34px}.lede{font-size:16px;line-height:1.35}
.mode-tabs button{font-size:15px;min-height:40px}
.compose-heading h2{font-size:20px}.compose-heading p{font-size:16px;line-height:1.35}.step-number{font-size:13px}
.unit-field,.wide-select,.destination-field,.settings-grid label{font-size:14px;letter-spacing:.015em}.measure-field input{font-size:28px}.measure-field input::placeholder{font-size:17px}.unit-field select,select{font-size:16px}.swap-button{font-size:20px}
.compose-status{font-size:16px;line-height:1.4}.error{font-size:15px;line-height:1.35}.correction-note{font-size:14px;line-height:1.3}
.section-kicker{font-size:13px}.result-actions{font-size:14px}.copy-button,button{font-size:15px}.result-value{font-size:clamp(52px,5vw,76px)}.result-empty-state{font-size:16px}
.support-title h2{font-size:14px}.plain-list li{font-size:15px;line-height:1.35}.fraction-result strong{font-size:26px}.fraction-result span,.fine-print{font-size:14px;line-height:1.35}
.summary-line{font-size:16px}.notice{font-size:14px;line-height:1.35}.batch-textarea textarea{font-size:16px;line-height:1.45}.destination-panel{font-size:15px}.destination-field select{font-size:14px}
table{font-size:15px}th{font-size:13px;line-height:1.25}td{font-size:15px;line-height:1.4}
.app-footer{font-size:13px}.settings-footer{font-size:14px}.settings-grid label{font-size:14px}.settings-grid select{font-size:16px}

/* Traceability is no longer squeezed into the bottom of the result card. */
.source-panel-button{width:100%;min-height:44px;padding:0 4px 0 0;border:0;border-top:1px solid rgba(199,210,226,.9);border-radius:0;background:transparent;color:#3f506c;text-align:left;font-size:15px;font-weight:850;display:flex;align-items:center;justify-content:space-between;box-shadow:none}
.source-panel-button::after{content:"↗";font-size:17px;color:var(--accent);font-weight:900}.source-panel-button:hover:not(:disabled){background:rgba(255,255,255,.42);color:var(--accent)}.source-panel-button:disabled{opacity:.42}
.definition-dialog{width:min(820px,calc(100vw - 32px));max-width:820px;max-height:calc(100dvh - 32px);border:0;padding:0;border-radius:20px;background:transparent;color:var(--ink);box-shadow:0 30px 100px rgba(14,30,59,.32)}
.definition-dialog::backdrop{background:rgba(14,24,42,.46);backdrop-filter:blur(5px)}
.definition-surface{display:grid;grid-template-rows:auto minmax(0,1fr);max-height:calc(100dvh - 32px);background:var(--card);border:1px solid var(--line);border-radius:20px;overflow:hidden}
.definition-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:22px 24px 18px;border-bottom:1px solid var(--line);background:var(--card)}.definition-head h2{font-size:26px;line-height:1.15;letter-spacing:-.025em;margin:4px 0 0}.definition-head .section-kicker{font-size:12px}
.definition-dialog .traceability-details{display:grid!important;gap:14px!important;max-height:none!important;overflow:auto!important;padding:20px 24px 24px!important;margin:0!important;overscroll-behavior:contain;scrollbar-gutter:stable}
.definition-dialog .trace-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px!important;margin:0!important}
.definition-dialog .trace-card{display:grid;gap:6px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
.definition-dialog .trace-card strong{font-size:16px!important;line-height:1.3}.definition-dialog .trace-card span{font-size:16px!important;line-height:1.45}.definition-dialog .trace-card small{font-size:14px!important;line-height:1.4}.definition-dialog .trace-rounding{font-size:15px!important;line-height:1.5!important}.definition-dialog .trace-links{gap:8px!important}.definition-dialog .trace-links a{font-size:15px!important;line-height:1.45}

/* Larger type gets room by using the available work area, not by miniaturising text. */
@media(min-width:861px) and (min-height:720px){.single-workspace{height:min(500px,100%)}.single-compose,.result-pane{padding:20px 24px}.support-card{padding:12px 13px}.plain-list{gap:5px}.plain-list li{padding:5px 7px}.source-panel-button{min-height:42px}}

@media(max-width:860px){
  .workspace-title h1{font-size:30px}.lede{font-size:15px}.single-compose,.result-pane{padding:16px}.compose-heading h2{font-size:18px}.compose-heading p{font-size:15px}.support-title h2{font-size:13px}
  .batch-compose,.batch-results{padding:15px}
}

@media(max-width:640px){
  .brand-copy strong{font-size:17px}.workspace-title h1{font-size:24px!important}.mode-tabs button{font-size:14px!important;height:36px!important;min-height:36px!important;padding:0 12px}
  .single-workspace{height:100%!important;grid-template-rows:auto minmax(0,1fr)}.single-compose{padding:10px 12px}.measure-field input{height:48px;font-size:23px!important}.measure-field input::placeholder{font-size:15px}.unit-flow{margin-top:7px;grid-template-columns:minmax(0,1fr) 36px minmax(0,1fr);gap:6px}.unit-field,.wide-select,.destination-field,.settings-grid label{font-size:13px!important}.unit-field select,.swap-button{height:38px!important;min-height:38px!important;font-size:14px!important}.swap-button{width:36px}.compose-status{margin-top:7px;padding:7px 9px;min-height:32px;font-size:14px!important}.error{display:block;font-size:13px!important;min-height:14px;margin-top:3px}.correction-note{font-size:13px!important;white-space:normal}
  .result-pane{padding:10px 12px;gap:6px}.section-kicker{font-size:12px!important}.copy-button{height:34px;min-height:34px;font-size:13px!important}.result-value{font-size:44px!important}.result-empty-state{font-size:14px}.support-grid{gap:6px}.support-card{padding:8px 9px}.support-title h2{font-size:12px!important}.plain-list{margin-top:5px;gap:3px}.plain-list li{font-size:13px!important;padding:4px 5px}.fraction-result strong{font-size:20px}.fraction-result span,.fine-print{font-size:12px!important}.fine-print{display:none}.source-panel-button{min-height:38px;font-size:13px}
  .batch-textarea textarea{font-size:14px!important;line-height:1.4}.batch-actions button{font-size:13px!important;min-height:34px!important;height:34px!important}.summary-line{font-size:13px!important}.notice{font-size:12px!important}.table-wrap table{font-size:14px!important}.table-wrap th{font-size:12px!important}.table-wrap td{font-size:14px!important;padding:7px 8px}.app-footer{font-size:12px!important}
  .definition-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:16px}.definition-surface{max-height:calc(100dvh - 16px);border-radius:16px}.definition-head{padding:16px 16px 13px}.definition-head h2{font-size:21px}.definition-dialog .traceability-details{padding:14px 14px 18px!important;gap:10px!important}.definition-dialog .trace-grid{grid-template-columns:1fr;gap:9px!important}.definition-dialog .trace-card{padding:11px 12px}.definition-dialog .trace-card strong,.definition-dialog .trace-card span{font-size:15px!important}.definition-dialog .trace-card small{font-size:13px!important}.definition-dialog .trace-rounding,.definition-dialog .trace-links a{font-size:14px!important}
}

/* Very short CSS viewports usually mean browser zoom or split-screen. Preserve readable type and reflow instead of shrinking. */
@media(max-height:620px){
  html,body{position:static!important;height:auto!important;min-height:100%!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior-y:auto!important}
  .app-shell{position:relative!important;inset:auto!important;height:auto!important;min-height:100vh!important;overflow:visible!important;grid-template-rows:48px var(--ad-rail-height) auto auto!important}.topbar{position:sticky;top:0;height:48px;z-index:60}.ad-rail{padding:4px 8px!important;}.ad-slot{}.workspace-shell{height:auto!important;min-height:560px!important;overflow:visible!important;grid-template-rows:auto auto!important;padding-bottom:12px!important}.workspace-card{height:auto!important;min-height:460px!important;overflow:visible!important}.single-workspace,.batch-workspace{grid-template-columns:1fr!important;grid-template-rows:auto auto!important}.single-compose,.batch-compose{border-right:0!important;border-bottom:1px solid var(--line);overflow:visible!important}.result-pane,.batch-results{min-height:350px!important;overflow:visible!important}.app-footer{position:relative!important;min-height:36px!important;height:auto!important}.measure-field input{font-size:23px!important}.unit-field,.wide-select,.destination-field,.settings-grid label,.section-kicker,.support-title h2{font-size:13px!important}.unit-field select,.mode-tabs button,.copy-button,.batch-actions button{font-size:14px!important;min-height:38px!important}.compose-status,.error,.plain-list li,.fraction-result span,.fine-print,.summary-line,.notice,.app-footer{font-size:14px!important}.result-value{font-size:46px!important}.source-panel-button{font-size:14px!important;min-height:42px!important}.table-wrap{max-height:300px!important}.table-wrap th{font-size:13px!important}.table-wrap td{font-size:15px!important}
}

@media(prefers-color-scheme:dark){.source-panel-button{color:#c7d3e5;border-color:#334055}.source-panel-button:hover:not(:disabled){background:rgba(255,255,255,.04)}.definition-head{background:#171e2a}.definition-dialog .trace-card{background:#202938}}
.ad-label{font-size:13px}.ad-size{font-size:11px}
/* Mobile list editor expands for the visible planner; results retain an internal scroll area. */
@media(max-width:640px){
 .batch-workspace{grid-template-rows:minmax(0,auto) minmax(120px,1fr)!important}
 .batch-compose{grid-template-rows:74px auto auto!important;gap:5px;overflow-y:auto}
 .plain-list li{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.25}
}
/* Second readability calibration: target roughly +50% versus RC10 on ordinary working text. */
.brand-copy strong{font-size:20px}.local-badge{font-size:15px}.icon-button{font-size:16px}.workspace-title h1{font-size:38px}.lede{font-size:18px}.mode-tabs button{font-size:17px}.compose-heading h2{font-size:21px}.compose-heading p{font-size:17px}.step-number{font-size:14px}
.unit-field,.wide-select,.destination-field,.settings-grid label{font-size:15px}.measure-field input{font-size:30px}.measure-field input::placeholder{font-size:18px}.unit-field select,select{font-size:18px}.compose-status{font-size:18px}.error{font-size:16px}.correction-note{font-size:15px}.section-kicker{font-size:14px}.result-actions{font-size:15px}.copy-button,button{font-size:17px}.support-title h2{font-size:16px}.plain-list li{font-size:16.5px}.fraction-result span,.fine-print{font-size:15px}.summary-line{font-size:17px}.notice{font-size:15px}.batch-textarea textarea{font-size:17px}table{font-size:15px}th{font-size:13px}td{font-size:15px}.app-footer{font-size:15px}.settings-footer{font-size:15px}
@media(max-width:640px){
  .brand-copy strong{font-size:18px}.workspace-title h1{font-size:28px!important}.mode-tabs button{font-size:16px!important}.measure-field input{font-size:25px!important}.unit-field,.wide-select,.destination-field,.settings-grid label{font-size:15px!important}.unit-field select,.swap-button{font-size:16px!important}.compose-status{font-size:16px!important}.error{font-size:15px!important}.correction-note{font-size:14px!important}.section-kicker{font-size:14px!important}.copy-button{font-size:15px!important}.support-title h2{font-size:14px!important}.plain-list li{font-size:15px!important}.fraction-result span,.fine-print{font-size:14px!important}.source-panel-button{font-size:15px}.batch-textarea textarea{font-size:16px!important}.batch-actions button{font-size:15px!important}.summary-line{font-size:15px!important}.notice{font-size:14px!important}.table-wrap th{font-size:13px!important}.table-wrap td{font-size:15px!important}.app-footer{font-size:14px!important}
}
@media(max-width:640px){.workspace-title h1{font-size:26px!important}.workspace-head{gap:6px}.mode-tabs button{padding:0 9px!important}}
@media(max-width:640px){.mode-tabs button{padding:0 6px!important}}
.settings-dialog[open],.definition-dialog[open]{position:fixed;z-index:120;left:50%;top:50%;transform:translate(-50%,-50%)}
.settings-dialog[open],.definition-dialog[open]{margin:0}

/* ===== 96-result-tools.css ===== */
/* RC14 result actions and expandable precision controls. */
.result-pane{display:flex;flex-direction:column;overflow-y:auto}
.single-compose{overflow-y:auto}
.support-grid{flex-shrink:0}
.support-card{overflow:visible}
.fixed-examples,.secondary-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.fixed-examples{margin-top:10px;font-size:14px}
.fixed-examples button{background:transparent;color:var(--accent);border:1px solid var(--line);padding:4px 10px;font-size:14px;min-height:36px}
.secondary-actions button{font-size:14px;min-height:36px}
#share-notice:empty{display:none}
#share-notice{font-size:14px;line-height:1.4}
#share-panel{padding:12px;border:1px solid var(--line);border-radius:12px;font-size:14px}
#share-link{resize:vertical;font-size:14px;margin:8px 0}
#fraction-options{border-top:1px solid var(--line);padding-top:10px;font-size:15px;flex-shrink:0}
#fraction-options summary{cursor:pointer;font-weight:750;padding:6px 0}
#fraction-options label{display:block;margin:10px 0 5px}
#fraction-limit{max-width:260px;font-size:16px}
.fraction-table-wrap{overflow-x:auto}
#fraction-options table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
#fraction-options th,#fraction-options td{font-size:14px;padding:8px 5px;text-align:left;white-space:nowrap}
#fraction-options p{font-size:14px;line-height:1.4}
#print-sheet{display:none}
.fraction-card .fine-print{display:block;line-height:1.4}
.fraction-card:not([hidden]){display:block}
#fraction-options td:last-child{color:var(--ink);font-weight:600}
#print-references{margin:12px;font-size:14px}
@media(max-width:640px){
 .workspace-shell{grid-template-rows:auto minmax(0,1fr)}
 .workspace-head{display:grid;grid-template-columns:1fr;gap:8px;padding:5px 0}
 .mode-tabs{justify-self:start}
 .workspace-title h1{max-width:none;white-space:normal;overflow:visible}
 .topic-info-popover{position:relative;top:auto;right:auto;justify-self:start}
 .topic-info-popover[open]>div.topic-guide{left:0;right:auto}
 .single-workspace{overflow-y:auto;display:block!important}
 .batch-workspace{overflow-y:auto;grid-template-rows:auto minmax(260px,1fr)!important}
 .batch-results{min-height:260px}
 .single-compose,.result-pane{overflow:visible}
 .result-pane{min-height:360px}
 .brand-copy strong{max-width:180px;white-space:normal}
 .support-grid{grid-template-columns:1fr}
 .fraction-card .fine-print{font-size:14px!important}
}

/* ===== 99-print.css ===== */
@media print{
 @page{margin:15mm}
 html,body{height:auto!important;min-height:0!important;overflow:visible!important;position:static!important;background:white!important;color:black!important}
 .app-shell{display:none!important}
 #print-sheet{display:block!important;font:11pt/1.45 system-ui,sans-serif;color:black}
 #print-sheet:empty{display:none!important}
 #print-sheet *{color:black!important;background:transparent!important;box-shadow:none!important;text-shadow:none!important;max-height:none!important;overflow:visible!important}
 #print-sheet h1{font-size:20pt}
 #print-sheet .result-value{font-size:24pt!important;line-height:1.4;letter-spacing:normal}
 #print-sheet .topic-guide{position:static!important;display:block!important;width:auto!important;padding:0!important}
 #print-sheet table{width:100%;border-collapse:collapse;table-layout:auto}
 #print-sheet th,#print-sheet td{font-size:10pt!important;padding:5pt!important;white-space:nowrap!important;border-bottom:1px solid #bbb}
 #print-sheet tr,#print-sheet p,#print-sheet .fraction-result{break-inside:avoid}
 #print-sheet thead{display:table-header-group}
 #print-sheet h2,#print-sheet summary{break-after:avoid}
 #print-sheet summary{display:block;font-weight:bold}
 #print-sheet p{overflow-wrap:anywhere}
 #print-sheet button,#print-sheet input,#print-sheet label,#print-sheet .error:empty{display:none!important}
 .info-page{max-width:none;margin:0;box-shadow:none}
}
