*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--primary: #4f46e5;--primary-hover: #4338ca;--primary-light: #eef2ff;--accent: #06b6d4;--success: #10b981;--error: #ef4444;--bg: #f8fafc;--surface: #ffffff;--surface-2: #f1f5f9;--border: #e2e8f0;--text: #1e293b;--text-muted: #4b5563;--shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);--shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);--shadow-lg: 0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.05);--radius: 12px;--radius-sm: 8px;font-family:Inter,system-ui,-apple-system,sans-serif;font-size:16px;line-height:1.6;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}body{min-height:100vh;background:var(--bg)}#root{min-height:100vh;display:flex;flex-direction:column}h1,h2,h3{font-weight:700;line-height:1.2}code{font-family:Fira Code,Cascadia Code,Consolas,monospace;font-size:.9em}.app{display:flex;flex-direction:column;min-height:100vh}.header{background:var(--surface);border-bottom:1px solid var(--border);box-shadow:var(--shadow-sm);position:sticky;top:0;z-index:100}.header-inner{max-width:900px;margin:0 auto;padding:.875rem 1.25rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}.logo{display:flex;align-items:center;gap:.625rem;text-decoration:none;color:var(--primary)}.logo-icon{width:28px;height:28px;flex-shrink:0}.logo-text{font-size:1.1rem;font-weight:700;color:var(--text);white-space:nowrap}.lang-switcher{display:flex;gap:.25rem;background:var(--surface-2);padding:.25rem;border-radius:999px;border:1px solid var(--border)}.lang-btn{display:flex;align-items:center;gap:.3rem;padding:.3rem .65rem;border:none;background:transparent;border-radius:999px;cursor:pointer;font-size:.78rem;font-weight:600;color:var(--text-muted);transition:all .18s ease;line-height:1}.lang-btn:hover{background:var(--surface);color:var(--text)}.lang-btn--active{background:var(--primary);color:#fff;box-shadow:var(--shadow-sm)}.lang-btn--active:hover{background:var(--primary-hover);color:#fff}.lang-flag{font-size:1rem;line-height:1}.lang-code{letter-spacing:.04em}.main{flex:1;max-width:900px;width:100%;margin:0 auto;padding:1.5rem 1.25rem 3rem;display:flex;flex-direction:column;gap:1.75rem}.ad-banner{width:100%;border-radius:var(--radius-sm);overflow:hidden}.ad-banner--placeholder{background:var(--surface-2);border:2px dashed var(--border);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;min-height:90px;padding:.75rem}.ad-banner--top.ad-banner--placeholder{min-height:90px}.ad-banner--bottom.ad-banner--placeholder{min-height:90px;margin-top:.5rem}.ad-label{font-size:.7rem;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.1em}.ad-setup-note{font-size:.75rem;color:var(--text-muted);text-align:center}.ad-setup-note code{color:var(--primary);background:var(--primary-light);padding:.1em .35em;border-radius:4px}.hero{text-align:center;padding:1rem 0 .5rem}.hero-title{font-size:clamp(1.75rem,5vw,2.5rem);font-weight:800;background:linear-gradient(135deg,var(--primary) 0%,var(--accent) 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;margin-bottom:.5rem}.hero-subtitle{font-size:1rem;color:var(--text-muted);max-width:480px;margin:0 auto}.calculator-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-lg);padding:2rem;display:flex;flex-direction:column;gap:1.25rem}.input-group{display:flex;flex-direction:column;gap:.5rem}.input-label{font-size:.875rem;font-weight:600;color:var(--text);letter-spacing:.01em}.input-field{width:100%;padding:.75rem 1rem;border:1.5px solid var(--border);border-radius:var(--radius-sm);font-size:1rem;font-family:inherit;color:var(--text);background:var(--surface);transition:border-color .18s,box-shadow .18s;outline:none}.input-field:focus{border-color:var(--primary);box-shadow:0 0 0 3px #4f46e51f}.input-field::placeholder{color:#94a3b8}.input-field::-webkit-outer-spin-button,.input-field::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.input-field[type=number]{-moz-appearance:textfield}.unit-toggle{display:flex;gap:.25rem;background:var(--surface-2);border:1.5px solid var(--border);border-radius:var(--radius-sm);padding:.25rem;flex-wrap:wrap}.unit-btn{flex:1;min-width:0;padding:.35rem .5rem;border:none;background:transparent;border-radius:6px;font-size:.82rem;font-weight:600;font-family:inherit;color:var(--text-muted);cursor:pointer;transition:all .15s ease;white-space:nowrap;text-align:center}.unit-btn:hover{background:var(--surface);color:var(--text)}.unit-btn--active{background:var(--primary);color:#fff;box-shadow:0 1px 3px #4f46e559}.button-row{display:flex;gap:.75rem;flex-wrap:wrap}.btn{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;padding:.75rem 1.5rem;border:none;border-radius:var(--radius-sm);font-size:1rem;font-weight:600;font-family:inherit;cursor:pointer;transition:all .18s ease;text-decoration:none}.btn--primary{background:var(--primary);color:#fff;flex:1;box-shadow:0 1px 4px #4f46e54d}.btn--primary:hover{background:var(--primary-hover);box-shadow:0 4px 12px #4f46e559;transform:translateY(-1px)}.btn--primary:active{transform:translateY(0)}.btn--secondary{background:var(--surface-2);color:var(--text-muted);border:1.5px solid var(--border)}.btn--secondary:hover{background:var(--border);color:var(--text)}.error-msg{color:var(--error);font-size:.875rem;font-weight:500;background:#fff5f5;border:1px solid #fecaca;border-radius:var(--radius-sm);padding:.625rem .875rem}.result-card{display:flex;align-items:flex-start;gap:1rem;background:linear-gradient(135deg,#f0fdf4,#ecfdf5);border:1.5px solid #86efac;border-radius:var(--radius-sm);padding:1.25rem 1.375rem;animation:fadeSlideIn .3s ease}@keyframes fadeSlideIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.result-icon{width:36px;height:36px;background:var(--success);border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:#fff}.result-icon svg{width:18px;height:18px}.result-content{flex:1}.result-label{font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:#166534;margin-bottom:.25rem}.result-value{font-size:1.5rem;font-weight:800;color:#14532d;line-height:1.2}.result-total{font-size:.8rem;color:#166534;margin-top:.25rem;opacity:.75}.speed-tip{display:flex;align-items:flex-start;gap:.5rem;font-size:.8rem;color:var(--text-muted);background:#fffbeb;border:1px solid #fde68a;border-radius:var(--radius-sm);padding:.625rem .875rem;line-height:1.4}.speed-tip svg{flex-shrink:0;margin-top:1px;color:#d97706}.info-section{display:flex;flex-direction:column;gap:1rem}.info-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.info-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.375rem 1.5rem;box-shadow:var(--shadow-sm)}.info-card--full{grid-column:1 / -1}.info-title{font-size:1rem;font-weight:700;color:var(--text);margin-bottom:.625rem;display:flex;align-items:center;gap:.4rem}.info-text{font-size:.9rem;color:var(--text-muted);line-height:1.65}.hiw-steps{display:flex;flex-direction:column}.hiw-step{display:flex;gap:.875rem;align-items:flex-start}.hiw-step-left{display:flex;flex-direction:column;align-items:center;flex-shrink:0}.hiw-badge{width:28px;height:28px;border-radius:50%;background:var(--primary);color:#fff;font-size:.8rem;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 2px 6px #4f46e559}.hiw-connector{width:2px;flex:1;min-height:20px;background:linear-gradient(to bottom,var(--primary),#c7d2fe);border-radius:2px;margin:4px 0}.hiw-step-body{display:flex;align-items:flex-start;gap:.625rem;padding-bottom:1.1rem;flex:1}.hiw-step:last-child .hiw-step-body{padding-bottom:0}.hiw-step-icon{width:32px;height:32px;border-radius:var(--radius-sm);background:var(--primary-light);border:1px solid #c7d2fe;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--primary)}.hiw-step-icon svg{width:16px;height:16px}.hiw-step-title{font-size:.875rem;font-weight:700;color:var(--text);margin-bottom:.2rem;line-height:1.3}.hiw-step-desc{font-size:.8rem;color:var(--text-muted);line-height:1.55}.formula-visual{display:flex;flex-direction:column;gap:1rem}.formula-equation{display:flex;align-items:center;justify-content:center;gap:1rem;background:linear-gradient(135deg,#f0f4ff,#f5f0ff);border:1.5px solid #c7d2fe;border-radius:var(--radius-sm);padding:1.25rem 1rem}.fml-var{font-family:Georgia,Times New Roman,serif;font-style:italic;font-size:1.5rem;font-weight:700;color:var(--primary);line-height:1}.fml-var--result{color:#7c3aed}.fml-var--sm{font-size:1rem}.fml-eq{font-size:1.4rem;color:var(--text-muted);font-weight:300}.fml-fraction{display:flex;flex-direction:column;align-items:center;gap:.2rem}.fml-num,.fml-den{display:flex;align-items:baseline;gap:.2rem;line-height:1.2}.fml-unit{font-size:.72rem;font-weight:500;color:var(--text-muted);font-style:normal;font-family:inherit}.fml-divider{display:block;width:100%;height:2px;background:linear-gradient(to right,var(--primary),#7c3aed);border-radius:2px;min-width:120px}.formula-legend{display:flex;flex-direction:column;gap:.3rem;padding:0 .25rem}.formula-legend-item{display:flex;align-items:baseline;gap:.5rem;font-size:.8rem}.formula-legend-item dt{min-width:18px}.formula-legend-item dd{color:var(--text-muted);list-style:none}.examples-table-wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:var(--radius-sm);border:1px solid var(--border)}.examples-table{width:100%;border-collapse:collapse;font-size:.875rem}.examples-table th{background:var(--surface-2);padding:.65rem 1rem;text-align:left;font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);border-bottom:1px solid var(--border)}.examples-table td{padding:.7rem 1rem;color:var(--text);border-bottom:1px solid var(--border)}.examples-table tr:last-child td{border-bottom:none}.examples-table tr:hover td{background:var(--primary-light)}.footer{text-align:center;padding:1.25rem;font-size:.8rem;color:var(--text-muted);border-top:1px solid var(--border);background:var(--surface);display:flex;flex-direction:column;gap:.4rem;align-items:center}.footer-link{background:none;border:none;color:var(--primary);font-size:.8rem;cursor:pointer;padding:0;text-decoration:underline;font-family:inherit}.footer-link:hover{color:var(--primary-hover)}.modal-overlay{position:fixed;inset:0;background:#0f172a8c;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;z-index:1000;padding:1rem;animation:overlayIn .18s ease}@keyframes overlayIn{0%{opacity:0}to{opacity:1}}.modal-box{background:var(--surface);border-radius:var(--radius);box-shadow:0 20px 60px #0003;width:100%;max-width:600px;max-height:85vh;display:flex;flex-direction:column;animation:modalIn .2s ease}@keyframes modalIn{0%{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1.25rem 1.5rem .75rem;border-bottom:1px solid var(--border);flex-shrink:0}.modal-title{font-size:1.1rem;font-weight:700;color:var(--text)}.modal-close{background:var(--surface-2);border:1px solid var(--border);border-radius:50%;width:32px;height:32px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text-muted);transition:all .15s;flex-shrink:0}.modal-close:hover{background:var(--border);color:var(--text)}.modal-updated{font-size:.75rem;color:var(--text-muted);padding:.5rem 1.5rem 0;flex-shrink:0}.modal-body{overflow-y:auto;padding:.75rem 1.5rem 1.5rem;display:flex;flex-direction:column;gap:1rem}.modal-section-title{font-size:.875rem;font-weight:700;color:var(--text);margin-bottom:.3rem}.modal-section-text{font-size:.85rem;color:var(--text-muted);line-height:1.65}@media(max-width:640px){.main{padding:1rem 1rem 2rem;gap:1.25rem}.header-inner{padding:.75rem 1rem}.logo-text{font-size:.95rem}.calculator-card{padding:1.25rem 1rem}.info-grid{grid-template-columns:1fr}.info-card--full{grid-column:auto}.result-value{font-size:1.2rem}.btn--primary{font-size:.95rem;padding:.7rem 1.25rem}.examples-table th,.examples-table td{padding:.6rem .75rem}}@media(max-width:400px){.lang-code{display:none}.lang-btn{padding:.3rem .45rem}}
