:root{color-scheme:light;--bg:#f5f6f8;--surface:#fff;--raised:#fff;--nav:#ecf0f1;--text:#182b32;--muted:#66747a;--line:#dfe5e7;--accent:#176b64;--tint:#e5f1ed;--blue:#347aab;--danger:#b83c45;--warn:#8e5416;--shadow:0 8px 32px #20373b06;--radius:20px;--sidebar:220px;font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',sans-serif;font-size:16px;line-height:1.45;font-synthesis:none;-webkit-text-size-adjust:100%}
:root[data-theme=dark]{color-scheme:dark;--bg:#121b20;--surface:#1b282f;--raised:#24343b;--nav:#162329;--text:#eaf0f2;--muted:#a7b7bf;--line:#34444d;--accent:#8acdbb;--tint:#243f3a;--blue:#8eb8da;--danger:#ff9ba4;--warn:#ffd298;--shadow:0 8px 32px #0002}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}[hidden]{display:none!important}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:12px;min-height:44px;padding:10px 15px;font-weight:550;touch-action:manipulation;display:inline-flex;align-items:center;justify-content:center;gap:8px}button:hover{background:var(--tint);border-color:var(--accent)}button:disabled{opacity:.4;cursor:default}button.primary{background:var(--accent);border-color:var(--accent);color:var(--surface)}button.danger{color:var(--danger)}button.quiet{background:transparent;border-color:transparent}a{color:var(--accent);text-decoration:none}input,select,textarea{width:100%;min-height:46px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--text);padding:11px 12px;font-size:16px;outline-offset:3px}input[inputmode=decimal]{font-variant-numeric:tabular-nums}input[type=checkbox]{width:21px;min-height:21px;accent-color:var(--accent)}input[aria-invalid=true]{border:2px solid var(--danger)}textarea{resize:vertical;min-height:84px}button:focus-visible,a:focus-visible{outline:3px solid var(--blue);outline-offset:3px}h1,h2,h3,p{margin-top:0}h1{font-size:34px;line-height:1.12;letter-spacing:-1px;margin-bottom:12px;font-weight:700}h2{font-size:21px;letter-spacing:-.45px;margin-bottom:8px}h3{font-size:16px;margin-bottom:8px}p{color:var(--muted);margin-bottom:16px}small,.help{font-size:13px;color:var(--muted);line-height:1.45}svg.icon{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}.icon-button{width:44px;height:44px;padding:10px;flex:none}.eyebrow{font-size:11px;font-weight:700;letter-spacing:1.8px;color:var(--accent);margin-bottom:12px}.sidebar{width:var(--sidebar);position:fixed;inset:0 auto 0 0;padding:30px 16px 20px;background:var(--nav);border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:20}.brand{display:flex;gap:11px;align-items:center;padding:0 10px 38px;color:var(--text);font-size:25px;font-weight:680;letter-spacing:-.7px}.brand img{border-radius:11px}.brand small{display:block;font-size:11px;font-weight:400;letter-spacing:.2px;margin-top:1px}.sidebar nav{display:grid;gap:8px}.nav-link{min-height:48px;padding:12px 14px;border-radius:12px;display:flex;align-items:center;gap:13px;color:var(--muted);font-size:16px;font-weight:550}.nav-link[aria-current=page]{background:var(--surface);color:var(--accent);box-shadow:0 2px 6px #102b2a06}.sidebar-bottom{margin-top:auto;display:grid;gap:7px;padding:16px 12px;color:var(--muted);font-size:12px}.connection:before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent);margin-right:8px}.version{opacity:.6;font-size:11px}.workspace{margin-left:var(--sidebar)}.topbar{height:76px;position:sticky;top:0;z-index:15;display:flex;align-items:center;gap:12px;justify-content:space-between;padding:12px 32px;background:var(--bg);border-bottom:1px solid var(--line)}.status{font-size:12px;color:var(--muted)}.commands{display:flex;gap:5px;align-items:center}.commands button{background:transparent;border-color:transparent}.commands .divider{height:24px;border-left:1px solid var(--line);margin:0 6px}#main{max-width:1580px;margin:auto;padding:38px 36px 64px;min-height:calc(100dvh - 76px);outline:none}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:28px}.page-head p{max-width:650px;margin:0}.page-head .eyebrow{margin-bottom:12px}.page-head .actions{flex-shrink:0}.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:24px;box-shadow:var(--shadow);min-width:0}.card p:last-child{margin-bottom:0}.card-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:20px}.card-head h2{margin:0}.card+.card{margin-top:20px}.split{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:24px;align-items:start}.inspector{position:sticky;top:100px}.stack{display:grid;gap:20px}.stack>.card{margin:0}.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 18px}.field{display:grid;align-content:start;gap:7px;min-width:0}.field label,.field-label{font-size:14px;font-weight:600}.field .help{font-size:12px;min-height:0}.field.wide{grid-column:1/-1}.input-wrap{position:relative}.input-wrap input{padding-right:48px}.suffix{position:absolute;right:12px;top:12px;font-size:13px;color:var(--muted);pointer-events:none}.check{display:flex;align-items:center;gap:9px;min-height:44px;font-size:14px}.hint{padding:14px 16px;border-radius:12px;background:var(--tint);color:var(--accent);font-size:13px;line-height:1.5}.warning{background:color-mix(in srgb,var(--warn) 10%,var(--surface));color:var(--warn);padding:14px 18px;font-size:14px;border-radius:12px}.warning:not([hidden]){margin:12px 24px}.section-title{margin:24px 0 12px}.stat{padding:16px 0;border-bottom:1px solid var(--line)}.stat:first-child{padding-top:0}.stat:last-child{border:0;padding-bottom:0}.stat label{display:block;font-size:13px;color:var(--muted);margin-bottom:4px}.stat strong{font-size:26px;font-weight:640;letter-spacing:-.6px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.stat .help{display:block;margin-top:6px;font-size:12px}.stat.hero strong{font-size:37px;color:var(--accent)}.stat.negative strong{color:var(--danger)}.result-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.result-grid .stat{border:0;padding:0}.result-grid .stat strong{font-size:23px}.result-grid .stat:first-child{grid-column:1/-1;padding-bottom:18px;border-bottom:1px solid var(--line)}.result-grid .stat:first-child strong{font-size:34px}.total-footer{display:flex;align-items:center;justify-content:space-between;margin-top:18px;gap:15px}.hero-panel{position:relative;overflow:hidden;padding:32px;background:var(--tint);border:1px solid color-mix(in srgb,var(--accent) 20%,var(--line));border-radius:24px;margin-bottom:26px}.hero-panel h2{font-size:30px;max-width:570px;margin-bottom:10px;letter-spacing:-.9px}.hero-panel p{max-width:530px}.hero-panel .actions{margin-top:24px}.dash-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:0 0 30px}.dash-grid .card{margin:0;padding:23px}.feature-icon{color:var(--accent);background:var(--tint);display:inline-flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:13px;margin-bottom:18px}.dash-grid h3{font-size:17px}.dash-grid p{font-size:13px}.dash-grid a{font-size:14px;font-weight:600}.archive-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:16px}.search{max-width:300px}.archive-row{display:flex;gap:14px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}.archive-row:last-child{border:0}.archive-main{flex:1;min-width:0}.archive-name{font-size:15px;font-weight:600;overflow-wrap:anywhere}.archive-meta{font-size:12px;color:var(--muted);margin-top:4px}.empty{text-align:center;padding:36px 20px;color:var(--muted)}.empty .icon{width:34px;height:34px;margin-bottom:10px}.pill{font-size:11px;padding:4px 8px;background:var(--tint);color:var(--accent);border-radius:6px;white-space:nowrap}.row-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.row-top h3{margin:0}.row-summary{display:flex;flex-wrap:wrap;gap:10px 24px;border-top:1px solid var(--line);padding-top:16px;margin-top:18px;font-size:13px;color:var(--muted)}.row-summary strong{display:block;color:var(--text);font-size:17px;font-variant-numeric:tabular-nums}.position-list{display:grid;gap:16px}.position-list>.card{margin:0}.row-number{color:var(--accent);font-size:12px;font-weight:650;letter-spacing:.5px}.position-row .fields{grid-template-columns:repeat(4,minmax(0,1fr))}.position-row .article-field{grid-column:span 3}.position-row .field .help{display:none}.position-row.optional{border-style:dashed}.position-row .row-commands{display:flex;gap:3px}.position-row .row-commands button{width:40px;height:40px;min-height:40px;padding:8px}.position-row .row-commands .icon{width:19px;height:19px}.position-settings{margin-bottom:20px}.position-settings summary{cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between;font-size:15px;font-weight:600}.position-settings[open] summary{margin-bottom:20px}.chips{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 20px}.chip{font-size:13px;min-height:40px;padding:8px 12px;background:var(--surface)}.tools-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:24px}.tool-nav{display:grid;gap:6px;align-content:start;position:sticky;top:100px;max-height:calc(100dvh - 125px);overflow:auto;padding:3px}.tool-nav button{text-align:left;justify-content:start;border-color:transparent;background:transparent;padding:11px 12px;gap:11px;font-size:14px;font-weight:500}.tool-nav button.active{background:var(--surface);color:var(--accent);border-color:var(--line)}.tool-nav .icon{width:20px;height:20px}.tool-catalog{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.tool-tile{text-align:left;display:block;min-height:170px;padding:22px;border-radius:18px;background:var(--surface);white-space:normal}.tool-tile .feature-icon{margin-bottom:13px}.tool-tile strong{display:block;font-size:16px;margin-bottom:5px}.tool-tile small{display:block;font-size:12px;font-weight:400}.tool-content{min-width:0}.tool-content .split{grid-template-columns:minmax(0,1.1fr) minmax(260px,1fr);gap:20px}.tool-intro{margin-bottom:20px}.tool-intro h2{font-size:26px}.tool-intro p{font-size:14px;max-width:760px}.back-tools{display:none;margin-bottom:18px}.tool-content .fields{grid-template-columns:1fr 1fr}.data-table{overflow-x:auto;max-width:100%;border:1px solid var(--line);border-radius:12px;margin-top:16px;overscroll-behavior-x:contain}.data-table table{border-collapse:collapse;width:100%;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}.data-table th,.data-table td{text-align:right;padding:12px 15px;border-bottom:1px solid var(--line)}.data-table th{background:var(--bg);font-size:12px;color:var(--muted);font-weight:550}.data-table th:first-child,.data-table td:first-child{text-align:left}.data-table tr:last-child td{border:0}.table-note{font-size:12px;margin-top:8px}.channel-row{display:grid;grid-template-columns:1fr auto;gap:8px;padding:15px 0;border-bottom:1px solid var(--line)}.channel-row:last-child{border:0}.channel-row strong{font-size:16px}.channel-row .help{display:block}.channel-row button{grid-column:1/-1;font-size:13px}.payment{display:grid;grid-template-columns:1.4fr 1fr 1fr 44px;gap:10px;align-items:end;margin-bottom:16px}.payment .help{display:none}.mobile-nav{display:none}.mobile-summary{display:none}.gate{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:24px;background:radial-gradient(ellipse at top,var(--tint),var(--bg) 70%)}.gate-card{width:100%;max-width:450px;text-align:center}.gate-card img{border-radius:18px;margin-bottom:28px}.gate-card h1{font-size:34px}.gate-card label{display:block;text-align:left;font-size:14px;margin:25px 0 8px}.gate-card .primary{width:100%;margin-top:14px}.gate-card #gate-error{font-size:14px;color:var(--danger);margin-top:16px}.toast{position:fixed;bottom:28px;left:calc(50% + 60px);transform:translate(-50%,20px);background:var(--text);color:var(--surface);border-radius:14px;padding:14px 22px;font-size:14px;max-width:90vw;box-shadow:0 8px 28px #0002;z-index:80;opacity:0;pointer-events:none;transition:transform .2s,opacity .2s}.toast.show{opacity:1;transform:translate(-50%,0)}dialog{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:24px;padding:26px;width:min(640px,calc(100% - 36px));max-height:90dvh;box-shadow:0 24px 120px #0004}dialog::backdrop{background:#10202d66;backdrop-filter:blur(5px)}.sheet-header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}.sheet-header h2{margin:0;font-size:22px}.menu-actions{display:grid;gap:8px}.menu-actions button{justify-content:flex-start;padding:13px 16px}.menu-actions button small{margin-left:auto;font-size:11px}.sheet-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}.notes{margin-top:20px}.tape-entry{width:100%;justify-content:space-between;font-variant-numeric:tabular-nums;font-size:14px;margin-top:8px}.tape-entry strong{color:var(--accent)}.rates-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.print-only,#print-report{display:none}.lock-body{overflow:hidden}@media(min-width:1500px){.position-row .fields{grid-template-columns:2.5fr 1fr repeat(4,1fr)}.position-row .article-field{grid-column:auto}.tool-content .split{grid-template-columns:1.3fr 1fr}}
/* iPad portrait: a stable navigation rail and one full-width editing surface. */
@media(min-width:700px) and (max-width:1100px){:root{--sidebar:86px}.sidebar{padding:22px 9px}.brand{padding:0 14px 28px}.brand span,.nav-link span,.sidebar-bottom{display:none}.nav-link{justify-content:center;padding:13px}.nav-link .icon{width:25px;height:25px}.topbar{padding:12px 24px}#main{padding:30px 24px 54px}.split{grid-template-columns:1fr}.inspector{position:static}.inspector>.card>.stat{display:inline-block;width:49%;vertical-align:top;border:0;padding:12px}.tool-content .split{grid-template-columns:1fr}.tools-layout{grid-template-columns:200px minmax(0,1fr);gap:18px}.tool-catalog{grid-template-columns:repeat(2,minmax(0,1fr))}.dash-grid{gap:12px}.dash-grid .card{padding:18px}.tool-content .result-grid{grid-template-columns:1fr 1fr}.page-head{align-items:start}.page-head h1{font-size:31px}.payment{grid-template-columns:1fr 1fr 1fr 44px}.position-split .inspector{order:-1}.position-split .inspector .card{padding:18px}.position-split .inspector .result-grid{grid-template-columns:repeat(4,1fr)}.position-split .inspector .stat:first-child{grid-column:auto;border:0;padding:0}.position-split .inspector .stat strong{font-size:23px}}
/* iPhone portrait: persistent bottom destinations, cards, full-width sheets. */
@media(max-width:699px){:root{font-size:16px;--sidebar:0px;--radius:18px}.sidebar{display:none}.workspace{margin-left:0}.topbar{height:auto;min-height:66px;padding:calc(8px + env(safe-area-inset-top)) 14px 8px;gap:6px}.status{font-size:10px;max-width:105px;line-height:1.35}.commands{gap:0}.commands .divider{margin:0 2px}.commands .icon-button{width:44px;height:44px;padding:10px}.commands .desktop-action{display:none}.commands .icon{width:22px;height:22px}#main{padding:27px 18px calc(108px + env(safe-area-inset-bottom));min-height:calc(100dvh - 140px)}.page-head{display:block;margin-bottom:23px}.page-head h1{font-size:31px;letter-spacing:-.9px}.page-head p{font-size:14px;line-height:1.5}.page-head .actions{margin-top:19px}.page-head .eyebrow{font-size:10px}.mobile-nav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;bottom:0;left:0;right:0;z-index:30;background:var(--surface);border-top:1px solid var(--line);padding:7px 5px calc(6px + env(safe-area-inset-bottom));min-height:76px}.mobile-nav .nav-link{display:flex;flex-direction:column;justify-content:center;gap:4px;padding:6px 2px;min-height:57px;border-radius:12px;font-size:10px;line-height:1.2}.mobile-nav .nav-link .icon{width:23px;height:23px}.mobile-nav .nav-link[aria-current=page]{background:var(--tint);box-shadow:none}.card{padding:20px}.fields{gap:17px 14px}.field .help{font-size:12px}.field label{font-size:13px}.split,.tool-content .split{grid-template-columns:1fr;gap:18px}.inspector{position:static}.hero-panel{padding:25px 22px;border-radius:22px}.hero-panel h2{font-size:28px;max-width:300px}.hero-panel p{font-size:14px}.hero-panel .actions button{flex:1}.dash-grid{grid-template-columns:1fr;gap:12px;margin-bottom:28px}.dash-grid .card{position:relative;padding:18px 18px 18px 77px}.dash-grid .feature-icon{position:absolute;left:17px;top:20px;width:43px;height:43px}.dash-grid h3{margin:0 0 5px}.dash-grid p{margin:0 0 8px;font-size:13px}.archive-head{align-items:stretch;flex-direction:column;gap:10px}.search{max-width:none}.archive-row{flex-wrap:wrap;gap:10px}.archive-row .actions{margin-left:auto}.archive-name{font-size:14px}.position-row .fields{grid-template-columns:1fr 1fr}.position-row .article-field{grid-column:1/-1}.position-row .sku-field{grid-column:1/-1}.position-row .row-commands button{width:44px;height:44px;min-height:44px}.row-top{gap:4px}.row-number{font-size:11px}.row-summary{gap:12px 20px}.row-summary>span{flex:1;min-width:100px}.row-summary strong{font-size:19px}.position-split .inspector{order:-1}.position-split .inspector .card{padding:20px}.position-split .inspector .stat:nth-child(n+4){display:none}.position-split .inspector .stat strong{font-size:23px}.position-split .inspector .stat:first-child strong{font-size:30px}.position-split .inspector .stat .help{display:none}.position-settings summary{font-size:14px}.position-settings .fields{grid-template-columns:1fr}.position-settings .actions button{flex:1}.tool-catalog{grid-template-columns:1fr 1fr;gap:12px}.tool-tile{padding:18px 15px;min-height:184px}.tool-tile strong{font-size:15px}.tool-tile small{font-size:12px}.tool-tile .feature-icon{width:42px;height:42px}.tools-layout{display:block}.tool-nav{display:none}.back-tools{display:inline-flex}.tool-intro h2{font-size:25px}.tool-intro p{font-size:14px}.tool-content .fields{grid-template-columns:1fr 1fr}.tool-content .field:has(select){grid-column:1/-1}.tool-content .result-grid{gap:18px 12px}.result-grid .stat strong{font-size:22px}.result-grid .stat:first-child strong{font-size:31px}.chips{gap:7px}.chip{min-height:44px;font-size:12px}.payment{grid-template-columns:1fr 1fr 44px;gap:10px}.payment .field:first-child{grid-column:1/-1}.payment .field label{font-size:12px}.toast{bottom:calc(92px + env(safe-area-inset-bottom));left:50%;width:max-content;max-width:calc(100vw - 30px);text-align:center;font-size:13px}.warning:not([hidden]){margin:10px 15px}dialog{width:100%;max-width:none;margin:auto 0 0;border-radius:24px 24px 0 0;padding:22px 20px calc(24px + env(safe-area-inset-bottom));max-height:92dvh;border-bottom:0}.sheet-header{position:sticky;top:-22px;background:var(--surface);padding-top:4px;z-index:1}.sheet-footer button{flex:1}.menu-actions button{min-height:52px}.data-table th,.data-table td{padding:12px}.actions.full button{flex:1}.settings-card .fields{grid-template-columns:1fr}.notes .field{grid-column:1/-1}.stat strong{font-size:25px}.gate-card h1{font-size:30px}}
/* iPhone landscape uses a left touch rail; content keeps the entire usable height. */
@media(max-height:520px) and (orientation:landscape) and (pointer:coarse){:root{--sidebar:78px}.sidebar{display:none}.workspace{margin-left:calc(78px + env(safe-area-inset-left))}.mobile-nav{display:flex;position:fixed;inset:0 auto 0 0;width:calc(78px + env(safe-area-inset-left));flex-direction:column;justify-content:center;border:0;border-right:1px solid var(--line);padding:6px 5px 6px calc(5px + env(safe-area-inset-left));background:var(--surface);z-index:30;gap:2px}.mobile-nav .nav-link{flex-direction:column;justify-content:center;gap:2px;min-height:55px;font-size:10px;padding:5px 0}.mobile-nav .nav-link .icon{width:21px;height:21px}.mobile-nav .nav-link[aria-current=page]{background:var(--tint)}.topbar{min-height:54px;height:54px;padding:5px calc(14px + env(safe-area-inset-right)) 5px 18px}.topbar .status{max-width:none;font-size:11px}.commands .desktop-action{display:none}#main{padding:20px calc(20px + env(safe-area-inset-right)) 32px 20px;min-height:calc(100dvh - 54px)}.page-head{margin-bottom:18px}.page-head h1{font-size:27px}.page-head .eyebrow{display:none}.page-head p{font-size:13px}.split,.tool-content .split{grid-template-columns:minmax(0,1.25fr) minmax(240px,1fr);gap:16px}.inspector{position:static}.position-split{grid-template-columns:1fr}.position-split .inspector{order:-1}.position-split .inspector .result-grid{grid-template-columns:repeat(3,1fr)}.position-split .inspector .stat:first-child{grid-column:auto;border:0;padding:0}.position-split .inspector .stat strong{font-size:23px}.position-split .inspector .stat:nth-child(n+4){display:none}.tools-layout{display:block}.tool-nav{display:none}.back-tools{display:inline-flex}.tool-catalog{grid-template-columns:repeat(3,1fr)}.tool-tile{min-height:158px;padding:16px}.tool-tile .feature-icon{margin-bottom:10px}.tool-content .fields{grid-template-columns:1fr 1fr}.tool-content .field:has(select){grid-column:1/-1}.tool-intro p{font-size:13px}.card{padding:18px}.hero-panel{padding:24px}.dash-grid{grid-template-columns:repeat(3,1fr)}.dash-grid .card{padding:18px}.dash-grid .feature-icon{position:static}.toast{left:55%;bottom:16px}.position-row .fields{grid-template-columns:repeat(4,1fr)}.position-row .article-field{grid-column:span 3}.position-row .sku-field{grid-column:auto}dialog{margin:auto;width:min(620px,90vw);border-radius:20px;max-height:92dvh}.tool-content .result-grid{grid-template-columns:1fr}.tool-content .result-grid .stat:first-child{font-size:26px}.tool-content .result-grid .stat strong{font-size:22px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media print{body{background:white;color:#111;font-size:10pt}body>*{display:none!important}#print-report{display:block!important;padding:15px}#print-report h1{font-size:23pt}#print-report p{color:#444}#print-report table{border-collapse:collapse;width:100%;font-size:9pt}#print-report td,#print-report th{border-bottom:1px solid #ddd;padding:7px;text-align:left}#print-report thead{display:table-header-group}#print-report tr{break-inside:avoid}#print-report .report-totals{font-size:12pt;margin:20px 0}#print-report .report-note{white-space:pre-wrap}#print-report .report-position{page-break-inside:avoid;border:1px solid #ddd;padding:12px;margin:10px 0}#print-report .report-position h2{font-size:13pt}#print-report .report-position .detail{display:flex;justify-content:space-between;gap:12px}#print-report .report-position .detail span{font-size:10pt}}
@media(max-width:699px){.position-row .row-top{flex-wrap:wrap}.position-row .row-commands{margin-left:auto}.position-settings summary>span{flex-shrink:0}.desktop-guidance{display:none}}
.tool-tile{min-width:0;overflow-wrap:anywhere}.tool-tile strong{hyphens:auto}
@media(max-width:360px){.tool-catalog{grid-template-columns:1fr}.tool-tile{min-height:108px;position:relative;padding:18px 16px 18px 76px}.tool-tile .feature-icon{position:absolute;left:17px;top:20px}.tool-tile strong{hyphens:none}}
.card-head{flex-wrap:wrap}.card-head h2{min-width:0}.tool-content .field label{overflow-wrap:anywhere}
select{appearance:none;-webkit-appearance:none;height:48px;padding-right:34px;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 18px) 21px,calc(100% - 13px) 21px;background-size:5px 5px;background-repeat:no-repeat}
@media(pointer:coarse){button{min-height:46px}.position-row .row-commands button{width:44px;height:44px;min-height:44px}.chip{min-height:44px}}
@media(max-width:699px){body.keyboard-open .mobile-nav{display:none}body.keyboard-open #main{padding-bottom:32px}}
.field{position:relative}.sign-button{position:absolute;right:5px;top:-8px;border:0;background:transparent;padding:0;width:32px;min-height:32px;height:32px;font-size:20px;color:var(--accent)}.field:has(.sign-button)>label{padding-right:34px}.field:has(.sign-button){padding-top:0}
@media(pointer:coarse){.sign-button{top:-10px;width:44px;min-height:44px;height:44px}.field:has(.sign-button)>label{padding-right:44px}}
.signed-control{display:flex;gap:6px;align-items:stretch;min-width:0}.signed-control>.input-wrap,.signed-control>input{flex:1;min-width:0}.signed-control .sign-button{position:static;flex:0 0 44px;width:44px;min-height:46px;height:46px;border:1px solid var(--line);border-radius:10px;background:var(--tint);padding:0}.field:has(.sign-button)>label{padding-right:0}

/* The calculation stays together; explanations and examples follow its answer. */
.tool-heading{display:flex;align-items:center;gap:12px;margin-bottom:16px;min-height:44px}
.tool-heading h2{font-size:26px;letter-spacing:-.6px;margin:0}
.tool-heading .back-tools{margin:0;display:none}
.tool-explanation{font-size:13px;line-height:1.5;margin:16px 2px;color:var(--muted);max-width:850px}
.tool-examples h3{font-size:13px;color:var(--muted);margin:18px 0 0}
.tool-examples .chips{margin:9px 0 20px}
.tool-workbench{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(240px,.85fr);gap:24px;align-items:start}
.tool-inputs{min-width:0}
.tool-workbench .tool-answer{border-left:1px solid var(--line);padding-left:24px;min-width:0}
.tool-workbench .fields{gap:16px}
.tool-workbench .fields .choice-field{grid-column:1/-1}
.tool-answer .result-grid{gap:16px}
.tool-options{margin-top:16px;border-top:1px solid var(--line)}
.tool-options summary{cursor:pointer;min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 0;font-size:13px;font-weight:550;list-style:none}
.tool-options summary::-webkit-details-marker{display:none}
.tool-options summary .icon{width:18px;height:18px;flex-shrink:0}
.tool-options[open] summary .icon{transform:rotate(180deg)}
.tool-options summary small{display:block;font-size:11px;font-weight:400;line-height:1.4;margin-top:3px}
.tool-options[open] .fields{padding:8px 0 4px}
.calculator-actions{grid-column:1/-1;margin-top:0;justify-content:flex-end}
.converter-card{max-width:680px;padding:22px}
.conversion-pair{display:grid;grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);align-items:end;gap:12px}
.conversion-pair .field{min-width:0}
.conversion-pair .icon-button{height:48px;min-height:48px;margin:0}
.conversion-pair select{font-size:17px;font-weight:600}
.converter-family{margin-bottom:16px}
.rate-refresh{display:flex;align-items:center;flex-wrap:wrap;gap:2px 12px;margin:3px 0 7px}
.compact-action{font-size:13px;font-weight:500;min-height:44px;padding:8px 2px;background:transparent;border-color:transparent;justify-content:flex-start}
.compact-action .icon{width:18px;height:18px}
.rate-refresh .help{font-size:11px}
.conversion-value{margin-top:10px}
.conversion-value input{font-size:21px;font-weight:550}
.converter-card .tool-answer{margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.converter-card .stat:first-child{border:0;padding:0}
.converter-card .stat:first-child strong{font-size:32px;color:var(--accent)}
.converter-card .stat .help{font-size:12px;line-height:1.4;margin-top:4px}
.trade-quick-result{display:none}
#trade-results{scroll-margin-top:160px}
@media(max-width:1300px){.tool-workbench{grid-template-columns:1fr;gap:20px}.tool-workbench .tool-answer{border-left:0;border-top:1px solid var(--line);padding:20px 0 0}}
@media(max-width:1100px){
  .trade-quick-result{display:flex;align-items:center;gap:16px;position:sticky;top:80px;z-index:15;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px 16px;margin:0 0 18px;box-shadow:var(--shadow)}
  .trade-quick-result span{flex:1;font-size:11px;color:var(--muted)}
  .trade-quick-result strong{display:block;font-size:20px;line-height:1.3;color:var(--text);font-variant-numeric:tabular-nums}
  .trade-quick-result a{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;border-radius:10px;background:var(--tint)}
  .trade-split>.stack,.trade-split>.inspector{display:contents}
  .trade-split>.stack>.card:nth-child(1){order:0}
  .trade-split>.inspector>.card:nth-child(1){order:1}
  .trade-split>.stack>.card:nth-child(2){order:2}
  .trade-split>.stack>.card:nth-child(3){order:3}
  .trade-split>.inspector>.card:nth-child(2){order:4}
}
@media(max-width:699px){
  #main:has(.tool-heading){padding-top:14px}
  .tool-heading{gap:10px;margin-bottom:10px}
  .tool-heading h2{font-size:23px}
  .tool-heading .back-tools{display:inline-flex}
  .tool-workbench{padding:18px;gap:16px}
  .tool-workbench .fields{gap:13px 12px}
  .tool-workbench .field .help{font-size:11px;line-height:1.35}
  .tool-workbench .tool-answer{padding-top:16px}
  .tool-workbench .tool-answer .result-grid{gap:14px}
  .tool-workbench .stat:first-child{padding-bottom:12px}
  .tool-options{margin-top:12px}
  .converter-card{padding:16px}
  .conversion-pair{gap:8px}
  .conversion-pair select{padding-left:10px}
  .rate-refresh{gap:0 8px;margin:2px 0 3px}
  .rate-refresh .help{font-size:10px}
  .conversion-value{margin-top:6px}
  .converter-card .tool-answer{margin-top:12px;padding-top:12px}
  .converter-card .stat:first-child strong{font-size:30px}
  .trade-quick-result{top:66px;gap:10px;padding:8px 12px}
}
@media(max-height:520px) and (orientation:landscape) and (pointer:coarse){
  #main:has(.tool-heading){padding-top:8px}
  .tool-heading{min-height:36px;margin-bottom:6px;gap:10px}
  .tool-heading h2{font-size:21px}
  .tool-heading .back-tools{display:inline-flex;width:44px;height:36px;min-height:36px;padding:6px 10px}
  .converter-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 18px;max-width:850px;padding:12px 16px}
  .conversion-pair{grid-column:1/-1;gap:10px}
  .converter-family{grid-column:1/-1;margin:0}
  .rate-refresh{grid-column:1/-1;margin:-3px 0;flex-wrap:nowrap;min-height:44px}
  .conversion-value{margin:0}
  .converter-card .tool-answer{margin:0;padding:0 0 0 16px;border-top:0;border-left:1px solid var(--line);align-self:center}
  .converter-card .stat:first-child strong{font-size:27px}
  .converter-card .stat .help{font-size:11px;margin-top:2px}
  .converter-card .stat label{font-size:12px;margin-bottom:2px}
  .tool-workbench{grid-template-columns:minmax(0,1.1fr) minmax(180px,.9fr);gap:16px;padding:16px}
  .tool-workbench .tool-answer{border-left:1px solid var(--line);border-top:0;padding:0 0 0 16px;position:sticky;top:66px}
  .tool-workbench .tool-answer .result-grid{grid-template-columns:1fr}
  .trade-quick-result{top:54px}
}
@media(max-width:360px){
  .converter-card{padding:14px}
  .rate-refresh .help{display:none}
  .converter-card .stat:first-child strong{font-size:27px}
}
/* Selector pairs stay on one line, including mobile rules for other selects. */
.tool-content .conversion-pair .field{grid-column:auto}
@media(max-height:520px) and (orientation:landscape) and (pointer:coarse){
  .tool-heading .back-tools{height:44px;min-height:44px}
  .converter-units{grid-template-columns:minmax(110px,.8fr) minmax(0,1.2fr)}
  .converter-units .converter-family,.converter-units .conversion-pair{grid-column:auto;align-self:end}
  .converter-units .conversion-pair{gap:6px}
}
@media(max-height:340px) and (orientation:landscape) and (pointer:coarse){
  .topbar{height:48px;min-height:48px;padding-top:2px;padding-bottom:2px}
  #main:has(.tool-heading){padding-top:2px}
  .tool-heading{margin-bottom:2px}
  .converter-card{padding-top:8px;padding-bottom:8px;row-gap:4px}
  .trade-quick-result{top:48px}
}
.tool-heading .manage-currencies{margin-left:auto}
.converter-content .tool-heading{max-width:680px}
.currency-sheet{width:min(560px,calc(100% - 32px));padding:22px;overflow:hidden;max-height:90dvh}
.currency-sheet .sheet-header{margin-bottom:12px;position:static}
.currency-manager{display:flex;flex-direction:column;min-height:0}
.currency-manager>p{margin-bottom:12px}
.currency-filter{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0;font-size:13px}
.currency-filter .check{margin:0;min-height:44px;font-size:13px}
.currency-list{height:min(340px,40dvh);overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:12px;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch}
.currency-option{display:flex;align-items:center;gap:12px;min-height:52px;padding:10px 12px;cursor:pointer;border-bottom:1px solid var(--line)}
.currency-option:last-child{border-bottom:0}.currency-option:hover{background:var(--tint)}
.currency-option input{flex:0 0 21px;width:21px;min-height:21px;margin:0}
.currency-option strong{min-width:36px;font-size:15px}
.currency-option span{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.currency-selection-help{margin:12px 0 0!important;font-size:12px}
.currency-sheet .sheet-footer{margin-top:14px}
@media(max-width:699px){.currency-sheet{width:100%;max-width:none;max-height:94dvh;padding:18px 18px calc(18px + env(safe-area-inset-bottom))}.currency-sheet .sheet-header h2{font-size:20px}.currency-option{gap:10px}}
@media(max-height:600px){.currency-sheet{max-height:96dvh;overflow-y:auto}.currency-sheet .currency-list{height:200px;flex-shrink:0}.currency-sheet .sheet-header{padding:0}}
