:root{
  --bg:#ffffff;
  --fg:#111827;
  --muted:#4b5563;
  --border:#e5e7eb;
  --soft:#f3f4f6;
  --brand:#0f766e;
  --brand2:#0ea5a4;
  --link:#0f766e;
  --danger:#b91c1c;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 16px rgba(0,0,0,.06);
  --radius:14px;
  --max:1100px;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg:#0b1220;
    --fg:#e5e7eb;
    --muted:#9ca3af;
    --border:#1f2937;
    --soft:#0f172a;
    --link:#2dd4bf;
    --brand:#2dd4bf;
    --brand2:#22c55e;
    --shadow: 0 1px 2px rgba(0,0,0,.25), 0 8px 22px rgba(0,0,0,.35);
  }
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:var(--bg);
  color:var(--fg);
  line-height:1.55;
}
a{color:var(--link); text-decoration:none}
a:hover{text-decoration:underline}
.container{max-width:var(--max); margin:0 auto; padding:0 18px}
.skip{position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden}
.skip:focus{left:12px; top:12px; width:auto; height:auto; padding:10px 12px; background:var(--bg); border:1px solid var(--border); border-radius:10px; z-index:9999}
header{
  position:sticky; top:0; z-index:20;
  background:rgba(255,255,255,.84);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
@media (prefers-color-scheme: dark){
  header{background:rgba(11,18,32,.82)}
}
.header-inner{display:flex; align-items:center; justify-content:space-between; padding:14px 0; gap:14px}
.brand{display:flex; align-items:center; gap:10px}
.logo{
  width:34px; height:34px; border-radius:10px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: var(--shadow);
}
.brand-title{font-weight:800; letter-spacing:.2px}
.brand-sub{color:var(--muted); font-size:.9rem}
nav{display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:flex-end}
nav a{
  padding:8px 10px; border-radius:10px;
  color:var(--fg);
  border:1px solid transparent;
}
nav a:hover{background:var(--soft); border-color:var(--border); text-decoration:none}
main{padding:26px 0 56px}
.hero{
  padding:22px; border:1px solid var(--border); border-radius:var(--radius);
  background: linear-gradient(180deg, var(--soft), rgba(0,0,0,0));
  box-shadow: var(--shadow);
}
.hero h1{margin:0 0 10px; font-size:1.8rem; line-height:1.2}
.hero p{margin:0; color:var(--muted); max-width:72ch}
.grid{
  display:grid; gap:14px;
}
.grid.cols-2{grid-template-columns:repeat(2, minmax(0,1fr))}
.grid.cols-3{grid-template-columns:repeat(3, minmax(0,1fr))}
@media (max-width: 860px){
  .grid.cols-2,.grid.cols-3{grid-template-columns:1fr}
}
.card{
  border:1px solid var(--border); border-radius:var(--radius);
  padding:16px;
  background:var(--bg);
  box-shadow: var(--shadow);
}
.card h2,.card h3{margin:0 0 6px}
.card p{margin:0 0 10px; color:var(--muted)}
.badge{
  display:inline-block; padding:4px 10px; border-radius:999px;
  background:var(--soft); border:1px solid var(--border); color:var(--muted);
  font-size:.82rem; margin-right:6px;
}
.kbd{
  display:inline-block; padding:2px 8px; border-radius:8px;
  border:1px solid var(--border); background:var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:.85rem;
}
.table{
  width:100%; border-collapse:collapse; overflow:hidden;
  border:1px solid var(--border); border-radius:12px;
}
.table th, .table td{
  padding:10px 12px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top;
}
.table th{background:var(--soft); font-weight:700}
.table tr:last-child td{border-bottom:none}
.note{
  margin-top:12px; padding:12px 14px; border:1px solid var(--border); border-radius:12px;
  background:var(--soft); color:var(--muted);
}
.small{font-size:.93rem}
.muted{color:var(--muted)}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:10px 14px; border-radius:12px;
  border:1px solid var(--border);
  background:var(--bg);
  color:var(--fg);
  cursor:pointer;
}
.btn.primary{
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #071213;
  font-weight:800;
}
.btn:hover{filter:brightness(0.98)}
.btn.primary:hover{filter:brightness(0.98)}
.input, select{
  width:100%;
  padding:10px 12px; border-radius:12px;
  border:1px solid var(--border);
  background:var(--bg);
  color:var(--fg);
}
.controls{display:grid; gap:10px}
.controls.inline{grid-template-columns: repeat(3, minmax(0,1fr))}
@media (max-width: 860px){ .controls.inline{grid-template-columns:1fr} }
.calc-wrap{
  border:1px solid var(--border); border-radius:var(--radius);
  padding:14px; background:var(--soft);
}
.calc-grid{display:grid; grid-template-columns: 1.2fr .8fr; gap:14px; align-items:start}
@media (max-width: 860px){ .calc-grid{grid-template-columns:1fr} }
.result{
  border:1px solid var(--border); border-radius:var(--radius);
  padding:14px; background:var(--bg);
  box-shadow: var(--shadow);
}
.result h3{margin:0 0 8px}
.money{
  font-size:1.55rem; font-weight:900;
}
.money span{font-size:1rem; font-weight:700; color:var(--muted)}
.toggles{display:flex; flex-wrap:wrap; gap:10px; margin-top:10px}
.toggle{
  display:flex; gap:8px; align-items:flex-start;
  padding:10px 12px; border:1px solid var(--border); border-radius:12px;
  background:var(--bg);
  flex:1 1 220px;
}
.toggle input{margin-top:3px}
hr{border:none; border-top:1px solid var(--border); margin:22px 0}
footer{
  border-top:1px solid var(--border);
  padding:22px 0;
  color:var(--muted);
}
.footer-links{display:flex; flex-wrap:wrap; gap:12px; margin-top:10px}
.footer-links a{color:var(--muted)}
.breadcrumbs{font-size:.9rem; color:var(--muted); margin-bottom:10px}
.breadcrumbs a{color:var(--muted)}
.tagline{margin-top:8px}
.search{
  display:flex; gap:10px; flex-wrap:wrap; margin-top:14px
}
.search .input{flex:1 1 280px}
.list{
  display:grid; gap:10px;
}
.list a{
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 14px; border:1px solid var(--border); border-radius:12px;
  background:var(--bg);
}
.list a:hover{background:var(--soft); text-decoration:none}
.pill{
  font-size:.85rem; padding:3px 8px; border-radius:999px;
  border:1px solid var(--border); background:var(--soft); color:var(--muted)
}
.disclosure{
  border:1px dashed var(--border);
  border-radius:12px;
  padding:10px 12px;
  background:rgba(14,165,164,.08);
  color:var(--muted);
  font-size:.92rem;
}