:root{font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:#0f172a;background:#f8fafc}*{box-sizing:border-box}body{margin:0}.topbar{background:#0f172a;color:white;padding:24px max(20px,calc((100% - 1100px)/2));display:flex;justify-content:space-between;gap:20px;align-items:center}.topbar h1{margin:0 0 5px;font-size:clamp(1.5rem,3vw,2.2rem)}.topbar p{margin:0;color:#cbd5e1}.container{max-width:1100px;margin:auto;padding:22px}.tabs{display:flex;gap:8px;overflow:auto;padding-bottom:10px}.tab,.secondary,button{border:0;border-radius:12px;padding:12px 16px;font-weight:700;cursor:pointer}.tab{background:#e2e8f0;white-space:nowrap}.tab.active{background:#2563eb;color:#fff}.panel{display:none;background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:22px;margin:8px 0 18px;box-shadow:0 8px 24px #0f172a0d}.panel.active{display:block}.panel h2{margin-top:0}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}label{display:flex;flex-direction:column;gap:7px;font-weight:650;color:#334155}input,select{width:100%;padding:12px;border:1px solid #cbd5e1;border-radius:10px;font:inherit;background:#fff}input:focus,select:focus{outline:2px solid #93c5fd;border-color:#2563eb}.check{flex-direction:row;align-items:center}.check input{width:auto}.panel>button{margin-top:16px;background:#2563eb;color:white}.secondary{background:#fff;color:#0f172a}.danger{background:#fee2e2;color:#991b1b}.result{margin-top:18px}.summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.metric{padding:14px;border-radius:14px;background:#f1f5f9}.metric b{display:block;font-size:1.15rem;margin-top:4px}.lines{margin-top:12px;border-top:1px solid #e2e8f0}.line{display:flex;justify-content:space-between;gap:15px;padding:9px 0;border-bottom:1px dashed #e2e8f0}.line.total{font-weight:800;font-size:1.05rem}.positive{color:#166534}.negative{color:#991b1b}.notice{background:#fff7ed;border:1px solid #fed7aa;border-radius:14px;padding:16px;color:#7c2d12}.history-head{display:flex;justify-content:space-between;align-items:center}.history-card{border:1px solid #e2e8f0;border-radius:12px;padding:12px;margin:10px 0}.history-card small{color:#64748b}footer{text-align:center;color:#64748b;padding:25px}@media(max-width:700px){.topbar{align-items:flex-start;flex-direction:column}.grid,.summary{grid-template-columns:1fr}.container{padding:14px}.panel{padding:16px}}

.print-btn{margin-top:14px}.tabs{scrollbar-width:thin}.panel h2{margin-top:0}@media(max-width:700px){.topbar{align-items:flex-start;gap:12px}.tabs{display:flex;overflow-x:auto;padding-bottom:6px}.tab{min-width:max-content}.summary{grid-template-columns:1fr!important}}
.userbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.linkbtn{display:inline-flex;text-decoration:none;align-items:center;justify-content:center}.auth-note{font-size:.9rem;opacity:.8}
@media(max-width:640px){.topbar{gap:12px}.userbar{width:100%;justify-content:flex-start}.userbar span{width:100%}}

.hero{background:linear-gradient(135deg,#eff6ff,#fff);border:1px solid #dbeafe;border-radius:20px;padding:26px;margin-bottom:16px}
.hero h2{font-size:clamp(1.7rem,4vw,2.6rem);margin:6px 0}.hero p{max-width:760px;color:#475569;font-size:1.05rem}
.eyebrow{font-size:.78rem;font-weight:900;letter-spacing:.08em;color:#1d4ed8}
.ad-slot{min-height:100px;border:1px dashed #cbd5e1;background:#f8fafc;border-radius:14px;margin:16px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#94a3b8;gap:5px;text-align:center;padding:15px}
.ad-slot small{font-size:.68rem;letter-spacing:.1em}.ad-bottom{min-height:120px}
.seo-content{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:22px;margin:18px 0}.seo-content p{color:#475569;line-height:1.7}
.seo-links{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.seo-links a,.primary-link{padding:12px 14px;background:#eff6ff;border-radius:10px;color:#1d4ed8;text-decoration:none;font-weight:700}
.empty-state{text-align:center;padding:24px;background:#f8fafc;border-radius:14px}.empty-state p{color:#64748b}
footer a{color:#475569}.content-page{max-width:850px;margin:auto;padding:24px}.content-page article{background:white;border:1px solid #e2e8f0;border-radius:18px;padding:26px;line-height:1.75}.content-page h1{line-height:1.15}
@media(max-width:700px){.seo-links{grid-template-columns:1fr}.hero{padding:20px}}

.brand-home{display:block;color:inherit;text-decoration:none}
.brand-home:hover h1{text-decoration:underline;text-underline-offset:4px}
.bottom-back{max-width:850px;margin:18px auto 28px;padding:0 24px}
.bottom-back .primary-link{display:inline-block}
