*{box-sizing:border-box}html,body{height:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;color:#1a3f5c}.calculator{max-width:1100px;margin:16px auto;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);padding:22px;border-radius:22px;border:1px solid #d9e3ee;box-shadow:0 10px 30px rgba(26,75,95,.08);position:relative;overflow:hidden}.calculator::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at top right,rgba(107,158,158,.12),transparent 38%),radial-gradient(circle at bottom left,rgba(26,75,95,.08),transparent 35%);pointer-events:none}.top-row{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;position:relative;z-index:1}.subtitle{color:#5a6c7d;margin:6px 0 18px 0;position:relative;z-index:1}.tabs-field{width:100%;display:flex;align-items:center;padding:0 8px;margin-bottom:14px;position:relative;z-index:1}.type-tabs{margin-left:auto;display:flex;gap:8px;background:#f2f6fc;padding:6px;border-radius:14px;border:1px solid #d0ddee}.tab{padding:8px 12px;border-radius:10px;background:#fff;border:1px solid transparent;cursor:pointer;font-weight:700;transition:all .2s ease;box-shadow:0 2px 4px rgba(0,0,0,0.04);font-size:.95rem}.tab:hover{transform:translateY(-2px);border-color:#1a4b5f;box-shadow:0 6px 12px rgba(26,75,95,.12)}.tab.active{background:#1a4b5f;color:#fff;border-color:#1a4b5f;box-shadow:0 6px 18px rgba(26,75,95,.14)}.fields-row{display:flex;justify-content:center;gap:18px;flex-wrap:wrap;max-width:880px;margin:0 auto 20px;padding:18px;position:relative;z-index:1;background:#fefcf5;border:1px solid #ecdca8;border-radius:16px}.field{display:flex;flex-direction:column;flex:1 1 220px;min-width:180px;max-width:300px}label{font-weight:700;margin-bottom:8px;color:#1a4b5f;font-size:.95rem}.input{padding:12px 14px;border-radius:12px;border:1.5px solid #ecdca8;background:#fefcf5;font-size:1rem;color:#1a3f5c;width:100%;transition:border-color .2s ease,box-shadow .2s ease}.input:focus{outline:none;border-color:#1a4b5f;box-shadow:0 0 0 4px rgba(26,75,95,.08);background:#fff}.btn-row{display:flex;justify-content:center;margin-top:6px;position:relative;z-index:1}.calculate-btn{background:#1a4b5f;color:#fff;border:0;padding:10px 18px;border-radius:12px;font-weight:700;cursor:pointer;font-size:1rem;min-width:120px;max-width:260px;box-shadow:0 8px 18px rgba(26,75,95,.14);transition:transform .2s ease,box-shadow .2s ease}.calculate-btn:hover{transform:translateY(-2px);background:#1a3f5c;box-shadow:0 12px 22px rgba(26,75,95,.18)}.calculate-btn.loading{opacity:.85;cursor:wait;position:relative}.calculate-btn.loading::after{content:"";position:absolute;right:12px;width:16px;height:16px;border:2px solid #fff;border-top-color:transparent;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.results{margin-top:18px;background:#fefcf5;border-radius:12px;padding:14px;border:1px solid #ecdca8;border-right:6px solid #6b9e9e;display:none;box-shadow:0 6px 16px rgba(0,0,0,.04);position:relative;z-index:1}.results.show{display:block}.result-line{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px dashed #dce5ec}.result-line:last-child{border-bottom:none}.value{font-weight:800}.value.accent{color:#6b9e9e}.note{font-size:.92rem;color:#5a6c7d;margin-top:10px}@media(max-width:920px){.tabs-field{padding:0 8px}.type-tabs{margin-left:auto}.fields-row{display:flex;justify-content:center;gap:16px;flex-wrap:nowrap;max-width:100%;margin:0 auto 20px;padding:15px;overflow:hidden}.field{flex:1 1 30%;min-width:0;max-width:33%}.tab{padding:8px 10px}.calculate-btn{min-width:110px;max-width:220px}}@media(max-width:680px){.tabs-field{padding:0 6px}.type-tabs{margin-left:auto}.fields-row{display:flex;justify-content:center;gap:14px;flex-wrap:nowrap;max-width:100%;padding:12px;overflow:hidden}.field{flex:1 1 30%;min-width:0;max-width:33%}.tab{padding:7px 10px;font-size:.94rem}.calculate-btn{min-width:100px;max-width:200px}}@media(max-width:420px){.tabs-field{padding:0 6px}.type-tabs{margin-left:auto}.fields-row{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;max-width:100%;padding:12px}.field{flex:1 1 100%;min-width:0;max-width:100%}.tab{padding:6px 8px;font-size:.92rem}.calculate-btn{min-width:90px;max-width:180px}}