/* Original styles: Tabler's table hierarchy, daisyUI's soft cards,
   and shadcn/ui's restrained lists are visual references only. */
html{--bg:#f5f6f8;--ink:#202a39;--muted:#657183;--line:#e2e6ec;--accent:#2766cb;--soft:#edf3fd;--danger:#985319}
html[data-theme=dark]{--bg:#13171e;--surface:#1c222b;--ink:#edf0f5;--muted:#a9b3c2;--line:#343d4a;--soft:#25334a;--danger:#f2b56f}
body{line-height:1.5;letter-spacing:-.2px}
.top{max-width:1240px;padding:18px 32px;flex-wrap:nowrap}
.brand{font-size:19px;letter-spacing:-.5px;gap:10px;white-space:nowrap}
.mark{width:32px;height:32px;border-radius:9px;font-size:21px}
.tools button{font-size:13px;background:transparent;min-height:36px;padding:6px 12px}
main{max-width:1240px;padding:36px 32px 48px;min-height:65vh}
.intro{margin-bottom:24px}.intro h1{font-size:27px;font-weight:750;letter-spacing:-.9px}
h2{font-size:18px}h3{font-weight:700}
button,.button{border-radius:8px;min-height:40px;font-weight:600;transition:background .12s,border-color .12s}
button:hover,.button:hover{background:var(--soft)}
.primary:hover{background:var(--accent);filter:brightness(.94)}
input,select,textarea{border-radius:7px;min-height:42px;padding:9px 12px}
input:hover,select:hover,textarea:hover{border-color:var(--muted)}
label{font-size:13px;font-weight:600}label input,label select,label textarea{margin-top:7px}
.tabs{gap:4px;margin:0 0 24px;border-bottom:1px solid var(--line);padding-bottom:8px}
.tabs button{padding:8px 16px;color:var(--muted)}
.tabs button.active{background:var(--soft);border-color:transparent;color:var(--accent)}
.panel,.card{border-radius:12px;box-shadow:0 1px 2px #10182803}
.panel{padding:24px}.card{padding:22px}
.section-head{margin-bottom:16px}.badge{font-size:12px;font-weight:600;border-radius:5px;padding:4px 8px}
.best{border-top:1px solid var(--line);box-shadow:inset 0 3px var(--accent)}
.warning{background:transparent;padding:0;font-size:13px;margin-top:14px}
.metric{font-size:29px;letter-spacing:-1px;margin:14px 0 4px}
.notice{border:0;color:var(--muted);font-size:13px;padding:0;margin-top:16px}
footer{border-top:0;font-size:12px;padding:10px 16px 28px;margin-top:0}
.empty{background:var(--surface);padding:56px 24px}.empty h2{font-size:20px}.empty p{font-size:14px;margin-bottom:20px}
.back{font-size:13px;background:transparent}
.split>aside .stack{display:flex;flex-direction:column;align-items:stretch;gap:10px}.split>aside .stack>*{margin:0}
/* Quote: compact summary and a clear, stable comparison grid. */
.quote #totals{gap:14px}.quote #totals .card{padding:20px}.quote #totals .section-head{margin:0;min-height:26px}
.quote #totals small{font-size:12px}.quote #totals p{margin-bottom:0}
.quote .quote-sheet{padding:0;overflow:hidden}.quote-sheet>.section-head{padding:22px 24px 0}.quote-sheet>p{padding:0 24px;font-size:13px;margin:0 0 20px}
.quote .comparison th,.quote .comparison td{padding:14px 18px;border-right:1px solid var(--line)}
.quote .comparison tr>*:last-child{border-right:0}.quote .comparison tbody tr:last-child>*{border-bottom:0}
.quote .comparison thead{background:var(--bg)}.quote .comparison th:first-child{width:180px;position:sticky;left:0;background:var(--surface);z-index:1}
.quote .comparison thead th:first-child{background:var(--bg)}.quote .comparison tbody th{vertical-align:middle;color:var(--ink);font-size:13px}
.quote .comparison th label{display:block}.quote .comparison th input{margin:0;background:var(--surface);font-weight:650}
.quote .comparison th button{background:transparent;border:0;min-height:28px;padding:4px 0;color:var(--muted);font-size:12px}
.quote .comparison select{min-height:38px}.quote .comparison td.uncertain{background:color-mix(in srgb,var(--danger) 3%,var(--surface))}
.quote .comparison td input[type=number]{text-align:right}.quote .comparison textarea{min-height:64px}
/* Wallet: soft surface, readable measurements, quiet secondary actions. */
.wallet{--bg:#f4f7f5;--accent:#247766;--soft:#e5f1ea}
.wallet main{max-width:1140px}.wallet .mark{border-radius:11px}
.wallet .wallet-filters{padding:20px 24px;border-radius:16px;margin-bottom:28px}
.wallet-filters .field-grid{grid-template-columns:minmax(0,2fr) minmax(100px,1fr) minmax(120px,1fr)}
.wallet-filters .tabs{margin:18px 0 0;border:0;padding:0;gap:6px}
.wallet .tabs button{border-radius:999px;padding:7px 14px;min-height:36px}
.wallet .tabs button.active{background:var(--accent);color:white}
.wallet .grid{gap:20px;align-items:start}.wallet .measure-card{border-radius:18px;padding:24px}
.measure-card .section-head{margin-bottom:16px}.measure-card .section-head button{font-size:21px;border:0;min-height:36px;padding:0 8px;background:transparent;color:var(--accent)}
.measure-card h3{font-size:21px;margin-bottom:20px}.measure-card dl{gap:12px;align-items:baseline;margin-bottom:24px}
.measure-card dd{font-size:20px;letter-spacing:-.5px}.measure-card dt{font-size:13px}
.measure-card .card-actions{border-top:1px solid var(--line);padding-top:16px;justify-content:space-between}
.measure-card .card-actions button:first-child{background:var(--soft);border-color:transparent;color:var(--accent)}
.measure-card .card-actions button:last-child{border-color:transparent;color:var(--muted)}
.card-photo{height:140px;margin-bottom:20px}.card-photo img{height:100%;object-fit:cover}
/* Vault: single-column records with optional chart, one primary action. */
.vault{--bg:#fafafa;--accent:#6352be;--soft:#f0ecfa;--ink:#25232b;--muted:#716d7b;--line:#e6e3eb}
.vault .mark{border-radius:8px}.vault main{max-width:1160px}.vault .panel,.vault .card{border-radius:10px;box-shadow:none}
.vault-toolbar{align-items:end;border-bottom:1px solid var(--line);padding-bottom:24px;gap:12px}.vault-toolbar label{min-width:220px}
.vault-toolbar button{border-color:transparent;color:var(--muted)}
.vault .split{grid-template-columns:minmax(0,1fr) 290px;gap:28px}
.record-list{display:grid;gap:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface)}
.record-list:empty{display:none}.vault .record-card{border:0;border-bottom:1px solid var(--line);border-radius:0;padding:22px 24px}
.record-card:last-child{border-bottom:0}.record-card h3{font-size:18px;margin-bottom:7px}.record-card .section-head{margin-bottom:12px}
.record-card .settings-summary{min-height:0;font-size:13px;margin-bottom:5px}.record-card p.muted{font-size:13px;margin:4px 0 12px}
.record-card .card-actions{margin-top:14px;gap:8px}.record-card .card-actions button{font-size:13px;min-height:34px;padding:5px 11px}
.vault .best{box-shadow:inset 0 3px var(--accent)}.vault .best p.muted{font-size:13px}.vault .score{font-size:40px}
.chart-panel summary{cursor:pointer;font-size:15px;font-weight:650;list-style-position:inside}.chart-panel[open] summary{margin-bottom:18px}
html[data-theme=dark] .wallet,html[data-theme=dark] .vault{--bg:#13171e;--ink:#edf0f5;--muted:#a9b3c2;--line:#343d4a;--soft:#25334a}
@media(max-width:950px){.vault .split{grid-template-columns:1fr}.vault .split>aside{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}}
@media(max-width:600px){.top{padding:16px;gap:8px}.brand{font-size:17px}.tools{width:auto}.tools button{font-size:12px;padding:6px 9px}.mark{width:28px;height:28px;font-size:18px}main{padding:24px 16px 36px}.intro{display:flex;align-items:center;gap:12px}.intro h1{font-size:24px}.intro>button,.intro>.row{margin-top:0}.intro button{font-size:13px;padding:8px 11px}.tabs{gap:2px;margin-bottom:20px}.tabs button{font-size:13px;padding:7px 10px}.panel{padding:18px}.quote #totals{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.quote #totals .card{padding:14px}.quote #totals .section-head{gap:5px;flex-direction:column}.quote #totals .metric{font-size:22px;overflow-wrap:anywhere}.quote #totals small{font-size:11px}.quote #totals .warning{font-size:12px}.quote .comparison{min-width:620px}.quote .comparison th:first-child{width:130px}.quote .comparison td,.quote .comparison th{padding:12px}.quote-sheet>.section-head{padding:18px 16px 0}.quote-sheet>p{padding:0 16px}.wallet .wallet-filters{padding:16px}.wallet-filters .field-grid{grid-template-columns:1fr 1fr;gap:14px}.wallet-filters .field-grid>label:first-child{grid-column:1/-1}.wallet .grid{gap:14px}.wallet .measure-card{padding:22px}.vault .split>aside{display:block}.vault-toolbar label{min-width:0;flex:1}.vault-toolbar button{font-size:12px;padding:8px}.vault .split .section-head{gap:10px}.vault .split .section-head>button{font-size:12px}.vault .record-card{padding:20px}.vault .brand{font-size:16px}}
@media print{body,.wallet,.vault{--bg:#fff;--surface:#fff;--ink:#000;--muted:#444;--line:#bbb}.quote .quote-sheet{overflow:visible}.quote .comparison{min-width:0}.quote .comparison th:first-child{position:static;width:120px}.quote .comparison th,.quote .comparison td{padding:6px}.quote #totals{grid-template-columns:repeat(4,1fr)}.best,.vault .best{box-shadow:none}main{padding:0;min-height:0}.top{padding:8px 0}.wallet .measure-card{break-inside:avoid}}

.vault-toolbar .experiment-tabs{margin:0;border:0;padding:0;gap:6px}.vault-toolbar .experiment-tabs button{color:var(--muted)}.vault-toolbar .experiment-tabs button.active{background:var(--soft);color:var(--accent)}.vault-toolbar .experiment-tabs button[data-template]{border:1px dashed var(--line)}

/* Optional visual usage guide; images are fetched on expansion only. */
.usage-guide{border:1px solid var(--line);border-radius:10px;background:var(--surface);margin-bottom:26px;overflow:hidden}
.usage-guide summary{cursor:pointer;font-size:14px;font-weight:650;padding:16px 20px;min-height:48px;list-style-position:inside}
.usage-guide summary:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
.guide-hint{color:var(--muted);font-size:12px;font-weight:400;margin-left:12px}
.guide-groups{padding:0 18px 16px}.guide-group{border-top:1px solid var(--line)}
.guide-group>summary{padding:15px 4px;color:var(--muted)}.guide-group[open]>summary{color:var(--ink)}
.guide-content{padding:0 4px 20px}.guide-content img{display:block;width:100%;height:auto;max-width:660px;margin:0 auto 20px;border-radius:10px;background:#f7f5f1}
.guide-examples{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.guide-examples h3{font-size:16px}.guide-examples p{font-size:14px;line-height:1.7}.guide-examples small{display:block;font-size:12px;line-height:1.6}
@media(max-width:600px){.usage-guide summary{padding:14px}.guide-hint{margin-left:7px}.guide-groups{padding:0 12px 12px}.guide-group>summary{padding:14px 2px;font-size:13px}.guide-examples{grid-template-columns:1fr;gap:18px}.guide-examples h3{margin-bottom:4px}}

.tool-guide-content{display:grid;grid-template-columns:minmax(220px, .7fr) minmax(0,1.3fr);gap:28px;align-items:start}.guide-steps{padding-left:22px;margin:8px 0;line-height:1.85;font-size:14px}.guide-steps li{padding-left:5px;margin-bottom:18px}.guide-steps li::marker{color:var(--accent);font-weight:700}.tool-guide-content figure{margin:0;min-width:0}.tool-guide-content img{max-width:100%;margin:0;border:1px solid var(--line);border-radius:6px}.tool-guide-content figcaption{font-size:12px;color:var(--muted);margin-top:10px;line-height:1.6}.tool-guide-content figcaption span{display:block}@media(max-width:760px){.tool-guide-content{grid-template-columns:1fr;gap:8px}.guide-steps{font-size:14px}}
