:root{
  --bg:#f4f7fb;--surface:rgba(255,255,255,.86);--surface-solid:#fff;--surface-2:#f7f9fc;
  --text:#172033;--muted:#6e7a91;--line:#dfe5ef;--line-strong:#cad3e2;
  --accent:#5a67f2;--accent-2:#7457e8;--accent-soft:rgba(90,103,242,.11);
  --green:#0b9f77;--green-soft:rgba(11,159,119,.1);--orange:#ec8b2c;--red:#e14f5a;
  --shadow:0 24px 70px rgba(27,39,68,.12),0 2px 8px rgba(27,39,68,.05);
  --radius:24px;--font:Inter,"SF Pro Display","PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif
}
html[data-theme="dark"]{
  --bg:#181818;--surface:rgba(36,36,36,.94);--surface-solid:#242424;--surface-2:#1e1e1e;
  --text:#f2f2f2;--muted:#a0a0a0;--line:#363636;--line-strong:#4a4a4a;
  --accent:#8290ff;--accent-2:#a07afa;--accent-soft:rgba(130,144,255,.13);
  --green:#36d5aa;--green-soft:rgba(54,213,170,.1);--orange:#ffae4e;--red:#ff6d79;
  --shadow:0 34px 80px rgba(0,0,0,.35),0 0 0 1px rgba(255,255,255,.025)
}
html[data-theme="dark"] .ambient,html[data-theme="dark"] .grid-noise{display:none}
html[data-theme="dark"] dialog::backdrop{background:rgba(0,0,0,.78)}
*{box-sizing:border-box}html{color-scheme:light}html[data-theme="dark"]{color-scheme:dark}body{margin:0;min-height:100vh;background:var(--bg);color:var(--text);font-family:var(--font);font-feature-settings:"tnum" 1,"ss01" 1;overflow-x:hidden;transition:background .25s,color .25s}button,input,select{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}svg{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.ambient{position:fixed;border-radius:50%;filter:blur(20px);pointer-events:none;opacity:.65}.ambient-one{width:520px;height:520px;top:-260px;right:-100px;background:radial-gradient(circle,rgba(112,93,255,.2),transparent 67%)}.ambient-two{width:460px;height:460px;bottom:-280px;left:-130px;background:radial-gradient(circle,rgba(42,197,157,.14),transparent 68%)}.grid-noise{position:fixed;inset:0;pointer-events:none;opacity:.25;background-image:linear-gradient(rgba(99,118,154,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(99,118,154,.05) 1px,transparent 1px);background-size:32px 32px;mask-image:linear-gradient(to bottom,#000,transparent 76%)}
.app-shell{width:min(1220px,calc(100% - 36px));margin:0 auto;padding:32px 0 26px;position:relative}.topbar{display:flex;align-items:center;justify-content:space-between;margin:0 4px 24px}.brand{display:flex;align-items:center;gap:13px;color:var(--text);text-decoration:none}.brand-mark{width:48px;height:48px;display:grid;place-items:center;border-radius:15px;color:white;background:linear-gradient(145deg,var(--accent),var(--accent-2));box-shadow:0 12px 28px rgba(90,103,242,.28)}.brand-mark svg{width:29px}.brand strong{display:block;font-size:20px;line-height:1.1;letter-spacing:-.03em}.brand small{display:block;color:var(--muted);font-size:11px;letter-spacing:.08em;margin-top:4px}.top-actions{display:flex;align-items:center;gap:10px}.icon-button,.theme-button{height:42px;border:1px solid var(--line);background:var(--surface);color:var(--muted);box-shadow:0 6px 18px rgba(20,32,58,.05)}.icon-button{width:42px;padding:0;line-height:0;appearance:none;border-radius:13px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.icon-button:hover{color:var(--accent);border-color:var(--accent)}.icon-button svg{display:block;width:18px;height:18px;flex:none}.theme-button{border-radius:999px;padding:4px;width:66px}.theme-track{display:block;position:relative;height:32px;border-radius:999px;background:var(--surface-2)}.theme-thumb{position:absolute;width:26px;height:26px;top:3px;left:3px;border-radius:50%;display:grid;place-items:center;background:var(--surface-solid);color:var(--orange);box-shadow:0 3px 10px rgba(0,0,0,.15);transition:transform .25s}.theme-thumb svg{grid-area:1/1;width:15px}.theme-thumb .moon{display:none}html[data-theme="dark"] .theme-thumb{transform:translateX(26px);color:var(--accent)}html[data-theme="dark"] .theme-thumb .sun{display:none}html[data-theme="dark"] .theme-thumb .moon{display:block}
.calculator{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(400px,.92fr);box-shadow:var(--shadow);border-radius:var(--radius);overflow:hidden;border:1px solid var(--line);background:var(--surface)}.panel{padding:34px}.input-panel{border-right:1px solid var(--line);background:var(--surface)}.result-panel{background:linear-gradient(145deg,var(--surface-solid),var(--surface-2));position:relative}.section-heading,.result-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}.eyebrow{display:block;font-size:10px;font-weight:800;letter-spacing:.18em;color:var(--accent);margin-bottom:5px}.section-heading h1,.result-head h2{font-size:24px;line-height:1.1;margin:0;letter-spacing:-.035em}.privacy-pill,.status-chip{display:inline-flex;align-items:center;border-radius:999px;font-size:11px;font-weight:700}.privacy-pill{gap:7px;color:var(--green);padding:7px 10px;background:var(--green-soft)}.privacy-pill i{width:6px;height:6px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px var(--green-soft)}.status-chip{padding:7px 11px;color:var(--accent);background:var(--accent-soft)}
.field-grid{display:grid;gap:16px}.field-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.field{margin-bottom:20px;min-width:0}.field.full{margin-bottom:20px}.field label,.cycle-field legend{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;color:var(--muted);font-size:12px;font-weight:750;letter-spacing:.01em}.field label[for="price"]{justify-content:flex-start;gap:5px;flex-wrap:wrap}.field label span{font-size:10px;font-weight:600;color:var(--muted)}.input-wrap{height:50px;border:1px solid var(--line);background:var(--surface-solid);border-radius:13px;display:flex;align-items:center;position:relative;transition:border-color .2s,box-shadow .2s,transform .2s}.input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}.input-wrap>svg{width:18px;margin-left:15px;color:var(--muted);flex:0 0 auto}.input-wrap input,.input-wrap select{width:100%;height:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--text);padding:0 14px;font-weight:650}.input-wrap input::placeholder{color:var(--muted);opacity:.55}.money-input b{margin-left:15px;color:var(--muted);font-size:18px}.money-input input{font-size:19px;padding-left:9px}.select-wrap select{appearance:none;padding-left:10px;padding-right:36px}.select-wrap:after{content:"";position:absolute;right:16px;width:7px;height:7px;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:rotate(45deg) translateY(-3px);pointer-events:none}.date-wrap{justify-content:center;gap:7px;padding:0 8px}.date-wrap>svg{margin:0;width:16px}.date-wrap input{flex:0 1 10em;width:10em;max-width:calc(100% - 23px);padding:0;font-size:clamp(11px,3vw,14px);text-align:center}.date-wrap input::-webkit-date-and-time-value{text-align:center;margin:0}.date-wrap input::-webkit-datetime-edit{padding:0}.cycle-field{border:0;padding:0;margin:1px 0 21px}.cycle-options{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}.cycle-options button{height:42px;border:1px solid var(--line);border-radius:11px;background:var(--surface-solid);color:var(--muted);font-size:12px;font-weight:700;transition:.2s}.cycle-options button:hover{border-color:var(--accent);color:var(--accent)}.cycle-options button.active{border-color:var(--accent);color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent)}
.rate-card{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:2px;padding:14px 15px;border:1px solid var(--line);border-radius:15px;background:var(--surface-2)}.rate-info{display:flex;align-items:center;gap:10px}.rate-icon{width:34px;height:34px;border-radius:10px;background:var(--green-soft);color:var(--green);display:grid;place-items:center}.rate-icon svg{width:18px}.rate-info label{display:block;font-size:12px;font-weight:750}.rate-info small{display:none;color:var(--muted);font-size:9px;margin-top:3px}.rate-controls{display:flex;align-items:center;justify-content:flex-end;gap:6px;color:var(--muted);font-size:11px;white-space:nowrap}.rate-controls input{width:82px;border:0;border-bottom:1px solid var(--line-strong);outline:0;background:transparent;text-align:center;color:var(--accent);font-weight:800;font-size:16px;padding:3px}.rate-controls button{width:30px;height:30px;padding:0;line-height:0;appearance:none;flex-shrink:0;border:0;border-radius:9px;background:var(--surface-solid);color:var(--muted);display:flex;align-items:center;justify-content:center}.rate-controls button:hover{color:var(--accent)}.rate-controls button.loading svg{animation:spin .8s linear infinite}.rate-controls svg{display:block;width:15px;height:15px;flex:none;transform-origin:center}@keyframes spin{to{transform:rotate(360deg)}}
.hero-value{text-align:center;padding:12px 0 24px;border-bottom:1px solid var(--line);position:relative}.hero-value .currency-mark{font-size:30px;color:var(--muted);vertical-align:17px;margin-right:5px}.hero-value strong{display:inline-block;padding-right:.08em;font-size:clamp(54px,6vw,76px);line-height:1;font-weight:760;letter-spacing:0;background:linear-gradient(125deg,var(--accent),var(--accent-2));-webkit-background-clip:text;background-clip:text;color:transparent}.hero-value>small{display:block;margin-top:9px;color:var(--muted);font-weight:700;font-size:12px}.hero-value button{position:absolute;right:2px;top:18px;border:0;background:transparent;color:var(--muted);padding:8px;border-radius:10px}.hero-value button:hover{background:var(--accent-soft);color:var(--accent)}.hero-value button svg{width:17px}.progress-block{padding:22px 0 20px;border-bottom:1px solid var(--line)}.progress-meta,.progress-caption{display:flex;justify-content:space-between;align-items:center}.progress-meta{font-size:12px;font-weight:750}.progress-meta span{color:var(--muted);display:flex;align-items:center;gap:7px}.progress-meta i{display:block;width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px var(--green-soft)}.progress-meta strong{color:var(--accent)}.progress-track{height:8px;border-radius:999px;background:var(--line);overflow:hidden;margin:11px 0 8px}.progress-track span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--green),var(--accent));transition:width .45s cubic-bezier(.2,.8,.2,1)}.progress-caption{font-size:10px;color:var(--muted)}.progress-caption b{color:var(--text);font-size:12px}.metric-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:20px 0}.metric-grid article{padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface);min-width:0}.metric-grid span,.metric-grid small{display:block;color:var(--muted);font-size:10px}.metric-grid strong{display:block;font-size:19px;margin:7px 0 4px;letter-spacing:-.025em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.deal-card{border-radius:16px;padding:15px;border:1px solid var(--line);background:var(--surface-2)}.deal-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:13px}.deal-heading span{display:block;font-size:12px;font-weight:800}.deal-heading small{display:block;font-size:9px;color:var(--muted);margin-top:3px}.deal-badge{padding:6px 9px!important;border-radius:999px;background:var(--green-soft);color:var(--green);font-size:9px!important}.deal-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.deal-fields label>span{display:block;color:var(--muted);font-size:10px;margin:0 0 6px 2px}.deal-fields label>div{height:40px;border:1px solid var(--line);border-radius:10px;display:flex;align-items:center;background:var(--surface-solid)}.deal-fields b{margin-left:11px;color:var(--muted)}.deal-fields input{width:100%;height:100%;border:0;outline:0;background:transparent;color:var(--text);padding:0 10px;font-weight:750}.action-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:16px}.button{height:42px;border-radius:12px;border:1px solid transparent;display:flex;align-items:center;justify-content:center;gap:7px;font-size:11px;font-weight:780;text-decoration:none}.button svg{width:16px}.button.secondary{border-color:var(--line);background:var(--surface-solid);color:var(--muted)}.button.secondary:hover{border-color:var(--accent);color:var(--accent)}.button.primary{color:white;background:linear-gradient(125deg,var(--accent),var(--accent-2));box-shadow:0 10px 22px rgba(90,103,242,.2)}.button.primary:hover{filter:brightness(1.06);transform:translateY(-1px)}footer{display:flex;align-items:center;justify-content:space-between;gap:20px;color:var(--muted);font-size:10px;padding:16px 5px 0}footer p{margin:0}footer a{color:inherit;text-decoration:none}footer a:hover{color:var(--accent)}.toast{position:fixed;left:50%;bottom:28px;z-index:100;transform:translate(-50%,20px);padding:10px 16px;border-radius:12px;background:#111827;color:white;font-size:12px;font-weight:700;box-shadow:0 10px 30px rgba(0,0,0,.25);opacity:0;pointer-events:none;transition:.25s}.toast.show{opacity:1;transform:translate(-50%,0)}dialog{width:min(920px,calc(100% - 28px));border:1px solid var(--line);border-radius:22px;padding:0;background:var(--surface-solid);color:var(--text);box-shadow:var(--shadow)}dialog::backdrop{background:rgba(2,7,16,.78);backdrop-filter:blur(9px)}.dialog-head{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid var(--line)}.dialog-head strong,.dialog-head small{display:block}.dialog-head small{color:var(--muted);font-size:10px;margin-top:4px}.dialog-head button{border:0;background:transparent;color:var(--muted);font-size:25px}.image-stage{min-height:220px;background:var(--surface-2);display:grid;place-items:center;padding:16px}.image-stage img{display:none;max-width:100%;max-height:65vh;border-radius:14px}.spinner{width:30px;height:30px;border:3px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}.dialog-actions{display:flex;justify-content:center;gap:10px;padding:16px}.dialog-actions .button{padding:0 24px}.capture-mode .topbar,.capture-mode footer{display:none}.capture-mode{padding:22px;background:var(--bg)}.capture-mode .calculator{box-shadow:none}
.date-wrap.has-date-display{gap:7px}.date-display{font-size:clamp(11px,3vw,14px);font-weight:650;white-space:nowrap;pointer-events:none}.date-wrap.has-date-display input{position:absolute;inset:0;width:100%;max-width:none;height:100%;opacity:0;cursor:pointer;font-size:16px}.date-wrap.has-date-display>svg{pointer-events:none;height:16px}.date-wrap.has-date-display input::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0}
@media(max-width:900px){.app-shell{width:min(700px,calc(100% - 26px));padding-top:22px}.calculator{grid-template-columns:1fr}.input-panel{border-right:0;border-bottom:1px solid var(--line)}footer{flex-direction:column;gap:5px}.hero-value strong{font-size:68px}}
@media(max-width:600px){.app-shell{width:calc(100% - 18px);padding:14px 0 18px}.topbar{margin-bottom:13px}.brand-mark{width:42px;height:42px;border-radius:13px}.brand strong{font-size:17px}.brand small{font-size:9px}.icon-button,.theme-button{height:38px}.icon-button{width:38px}.theme-button{width:60px}.theme-track{height:28px}.theme-thumb{width:22px;height:22px}html[data-theme="dark"] .theme-thumb{transform:translateX(24px)}.panel{padding:20px 16px}.section-heading,.result-head{margin-bottom:21px}.section-heading h1,.result-head h2{font-size:21px}.privacy-pill{display:none}.field-grid.two{gap:10px}.field{margin-bottom:17px}.input-wrap{height:47px}.cycle-options{grid-template-columns:repeat(3,1fr)}.cycle-options button{height:39px}.rate-card{align-items:center;justify-content:center;flex-direction:row;gap:12px;padding:12px 10px}.rate-icon{display:grid;width:26px;height:26px;border-radius:8px;flex:none}.rate-icon svg{width:16px;height:16px}.rate-info{min-width:0;flex:0 1 auto;gap:6px}.rate-info>div{min-width:0}.rate-info label{font-size:11px;white-space:nowrap}.rate-info small{font-size:8px;max-width:108px;white-space:normal}.rate-controls{width:auto;justify-content:flex-start;gap:4px;font-size:9px;flex:none}.rate-controls input{flex:none;width:58px;max-width:none;font-size:14px}.rate-controls button{width:26px;height:26px;margin-left:8px}.hero-value{padding-top:4px}.hero-value strong{font-size:55px}.hero-value .currency-mark{font-size:23px;vertical-align:12px}.metric-grid{gap:8px}.metric-grid article{padding:12px}.metric-grid strong{font-size:17px}.action-grid{grid-template-columns:1fr 1fr}.deal-fields{gap:8px}footer{text-align:center}.capture-mode{padding:8px}.capture-mode .calculator{border-radius:16px}}
@media(max-width:380px){.field-grid.two{grid-template-columns:1fr}.cycle-options{grid-template-columns:repeat(2,1fr)}.hero-value strong{font-size:48px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
