:root{color:#211f1b;background:#f8f6f1;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;--bg: #f8f6f1;--surface: #ffffff;--surface-strong: #fffaf2;--text: #211f1b;--muted: #756f64;--border: #ded8cd;--accent: #c4482f;--accent-soft: #fae5da;--success: #23775b;--success-soft: #dff0e9;--shadow: 0 16px 40px rgb(68 55 35 / .08);--keyboard-inset: 0px}*{box-sizing:border-box}html{min-height:100%;background:var(--bg)}body{min-width:320px;min-height:100%;margin:0;background:linear-gradient(180deg,#ffffffd6,#f8f6f100 260px),var(--bg)}button,input{font:inherit}button{-webkit-tap-highlight-color:transparent;touch-action:manipulation;user-select:none}.app-shell{width:min(100%,520px);margin:0 auto;padding:max(18px,env(safe-area-inset-top)) 16px max(28px,env(safe-area-inset-bottom))}.app-header{display:flex;align-items:center;gap:12px;padding:6px 0 16px}.mode-toggle{min-height:36px;padding:0 11px;margin-left:auto;color:var(--accent);background:#fffaf4;border:1px solid #e7c8b9;border-radius:6px;font-size:12px;font-weight:760}.mode-toggle.is-active,.mode-toggle:hover{color:#fff;background:var(--accent);border-color:var(--accent)}.mode-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.minimal-calculator-credit{margin:18px 4px 0;color:var(--muted);font-size:13px;font-style:italic;line-height:1.4;text-align:center}.brand-mark{display:grid;width:42px;height:42px;place-items:center;color:#fff;background:#211f1b;border-radius:8px;box-shadow:0 8px 18px #211f1b2e}.brand-mark .icon{width:26px;height:26px;stroke-width:1.8}.app-header p,.section-label{margin:0;color:var(--muted);font-size:12px;font-weight:700;line-height:1.2;text-transform:uppercase}.app-header h1{margin:2px 0 0;color:var(--text);font-size:24px;font-weight:780;line-height:1.06}.summary-panel,.form-section{margin-bottom:14px;padding:14px;background:var(--surface);border:1px solid var(--border);border-radius:8px;box-shadow:var(--shadow)}.summary-panel{padding:12px 14px;background:linear-gradient(135deg,#fffaf2,#fff 62%),var(--surface)}.summary-value{display:flex;align-items:baseline;gap:9px;margin-top:2px}.summary-value strong{color:var(--accent);font-size:42px;font-weight:820;line-height:.96;letter-spacing:0;font-variant-numeric:tabular-nums}.summary-value span{color:var(--muted);font-size:15px;font-weight:700}.summary-subtitle{margin:2px 0 0;color:var(--muted);font-size:15px;line-height:1.35}.form-section h2{margin:0 0 8px;color:var(--text);font-size:17px;font-weight:780;line-height:1.2}.section-heading{display:flex;align-items:center;gap:10px;margin-bottom:8px}.section-heading h2{margin:0}.profile-actions{display:flex;align-items:center;gap:8px;margin-left:auto}.section-action{min-height:32px;padding:5px 2px;color:var(--accent);background:transparent;border:0;border-radius:6px;font-size:12px;font-weight:760}.section-action:hover{color:#9f3422}.section-action:focus-visible,.dialog-button:focus-visible,.saved-profile-choice:focus-visible,.saved-profile-delete:focus-visible,.dialog-close:focus-visible,.profile-name-field input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.section-reset{min-height:32px;padding:5px 10px;color:var(--accent);background:#fffaf4;border:1px solid #e7c8b9;border-radius:6px;font-size:12px;font-weight:760}.section-reset:hover{background:#fff1e8}.section-reset:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.profile-dialog-backdrop{position:fixed;z-index:10;inset:0;display:grid;align-items:center;justify-items:center;padding:20px 20px calc(20px + var(--keyboard-inset));background:#211f1b61;animation:profile-fade-in .16s ease-out}.profile-dialog{width:min(100%,400px);min-width:0;max-width:100%;padding:22px;background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:0 24px 72px #211f1b3d;animation:profile-dialog-in .18s ease-out}.profile-dialog form{min-width:0}.profile-dialog h2{margin:0;font-size:21px;line-height:1.2}.profile-dialog-description{margin:8px 0 0;color:var(--muted);font-size:14px;line-height:1.4}.profile-name-field{display:grid;gap:6px;margin-top:20px;color:var(--text);font-size:13px;font-weight:720}.profile-name-field input{width:100%;min-height:44px;padding:0 12px;color:var(--text);background:#fbfaf7;border:1px solid var(--border);border-radius:8px}.profile-dialog-error{margin:12px 0 0;color:var(--accent);font-size:13px;font-weight:650;overflow-wrap:anywhere}.profile-dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin-top:22px}.dialog-button{min-height:40px;padding:0 16px;border-radius:8px;font-size:14px;font-weight:760}.dialog-button--secondary{color:var(--text);background:#fbfaf7;border:1px solid var(--border)}.dialog-button--primary{color:#fff;background:var(--accent);border:1px solid var(--accent)}.dialog-button:disabled{opacity:.65}.profile-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.profile-dialog-heading .section-label{margin-bottom:3px}.dialog-close{width:32px;height:32px;padding:0;color:var(--muted);background:transparent;border:0;border-radius:6px;font-size:28px;font-weight:400;line-height:1}.saved-profile-list{display:grid;gap:8px;max-height:min(48vh,420px);padding:0;margin:20px 0 0;overflow-y:auto;list-style:none}.saved-profile-list li{display:flex;gap:8px}.saved-profile-choice{display:grid;flex:1;gap:3px;min-width:0;padding:12px;color:var(--text);text-align:left;background:#fbfaf7;border:1px solid var(--border);border-radius:8px}.saved-profile-choice span{overflow:hidden;font-size:15px;font-weight:720;text-overflow:ellipsis;white-space:nowrap}.saved-profile-choice small{color:var(--muted);font-size:12px}.saved-profile-delete{align-self:stretch;min-width:58px;padding:0 8px;color:var(--accent);background:transparent;border:0;border-radius:8px;font-size:12px;font-weight:720}@keyframes profile-fade-in{0%{opacity:0}to{opacity:1}}@keyframes profile-dialog-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.stat-stepper,.rule-selector,.toggle-field,.result-row{display:flex;min-height:48px;align-items:center;justify-content:space-between;gap:14px;padding:10px 0;border-top:1px solid #ece7de}.stat-stepper:first-of-type,.rule-selector:first-of-type,.toggle-field:first-of-type,.result-row:first-of-type{border-top:0}.field-title{display:flex;min-width:0;align-items:center;gap:10px;color:var(--text);font-size:15px;font-weight:650;line-height:1.2}.icon{display:block;width:21px;height:21px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.9}.icon circle{fill:currentColor;stroke:none}.field-title .icon{color:var(--accent)}.stepper-controls{display:grid;grid-template-columns:36px minmax(48px,auto) 36px;height:36px;align-items:center;overflow:hidden;border:1px solid var(--border);border-radius:8px;background:#fbfaf7;touch-action:manipulation}.stepper-controls button{width:36px;height:34px;padding:0;color:var(--text);background:transparent;border:0;font-size:21px;font-weight:720;line-height:1}.stepper-controls button:disabled{color:#c1b9ad}.stepper-controls output{min-width:48px;padding:0 8px;color:var(--text);font-size:15px;font-weight:780;text-align:center;font-variant-numeric:tabular-nums}.segmented-control{display:grid;grid-template-columns:repeat(2,minmax(54px,1fr));min-width:190px;padding:3px;background:#eee8dd;border-radius:8px;touch-action:manipulation}.segmented-control--4{grid-template-columns:repeat(4,minmax(40px,1fr))}.segmented-control button{height:32px;padding:0 9px;color:var(--muted);background:transparent;border:0;border-radius:6px;font-size:13px;font-weight:720}.segmented-control button.is-selected{color:var(--text);background:var(--surface);box-shadow:0 3px 8px #2a23181a}.toggle-field{position:relative;color:var(--text);font-size:15px;font-weight:650;touch-action:manipulation;user-select:none}.toggle-field input{position:absolute;width:1px;height:1px;opacity:0}.toggle-control{position:relative;width:48px;height:28px;flex:0 0 auto;background:#d5cec2;border-radius:999px;transition:background .16s ease}.toggle-control:after{position:absolute;top:3px;left:3px;width:22px;height:22px;content:"";background:#fff;border-radius:50%;box-shadow:0 2px 8px #1d191438;transition:transform .16s ease}.toggle-field input:checked+.toggle-control{background:var(--success)}.toggle-field input:checked+.toggle-control:after{transform:translate(20px)}.result-row{min-height:39px;padding:8px 0}.result-row span{color:var(--muted);font-size:14px;line-height:1.25}.result-row strong{color:var(--text);font-size:14px;font-weight:760;line-height:1.25;text-align:right;font-variant-numeric:tabular-nums}@media(max-width:759px){.profile-name-field input{font-size:16px}.section-heading{flex-wrap:wrap;gap:4px 10px}.section-heading h2{flex:1 0 100%}.section-reset{margin-left:auto}.profile-dialog-backdrop{align-items:end;padding:0 0 var(--keyboard-inset)}.profile-dialog{width:100%;max-height:min(75dvh,calc(100dvh - var(--keyboard-inset)));padding:22px 20px max(22px,env(safe-area-inset-bottom));overflow-y:auto;border-right:0;border-bottom:0;border-left:0;border-radius:18px 18px 0 0;animation-name:profile-sheet-in}.profile-dialog--chooser{min-height:min(340px,75dvh)}.profile-dialog-actions{justify-content:stretch}.dialog-button{flex:1 1 120px}.saved-profile-list{max-height:none}.stat-stepper{min-height:58px;gap:10px}.stepper-controls{grid-template-columns:48px minmax(52px,auto) 48px;height:46px}.stepper-controls button{width:48px;height:44px;font-size:24px}.stepper-controls output{min-width:52px}}@keyframes profile-sheet-in{0%{opacity:0;transform:translateY(28px)}to{opacity:1;transform:translateY(0)}}@media(min-width:760px){body{background:radial-gradient(circle at 20% 0%,rgb(196 72 47 / .09),transparent 300px),linear-gradient(180deg,#ffffff,var(--bg) 360px)}.app-shell{padding-top:32px}.summary-panel{grid-template-columns:1.1fr 1fr;align-items:center}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
