:root{
  --bg:#f4f7f8; --surface:#ffffff; --ink:#1d2b33; --muted:#5c6f78;
  --line:#d9e2e6; --accent:#0e6c77; --accent-soft:#e3f0f2;
  --radius:10px; --focus:0 0 0 3px rgba(14,108,119,.28);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--ink);
  font:15px/1.45 "Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
header.app{
  max-width:720px; margin:0 auto; padding:22px 16px 6px;
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
}
header.app h1{
  font-size:26px; font-weight:600; letter-spacing:.2px; margin:0;
  display:flex; align-items:center; gap:10px;
}
header.app h1 .logo{
  width:32px; height:32px; display:block;
  border-radius:7px; box-shadow:0 1px 3px rgba(29,43,51,.25);
}
main{max-width:720px; margin:0 auto; padding:10px 16px 30px}

.card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:14px 16px 16px; box-shadow:0 1px 2px rgba(29,43,51,.05); overflow:hidden;
}
.card h2{
  margin:-14px -16px 12px; padding:8px 16px 7px;
  font-size:13px; font-weight:700; letter-spacing:.6px; text-transform:uppercase;
  background:var(--accent-soft); color:var(--accent); border-bottom:1px solid var(--line);
}
.stack>.card+.card{margin-top:14px}

/* collapsible introduction */
.intro{margin-bottom:16px}
.intro h2{
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center;
  cursor:pointer; user-select:none;
}
.intro h2 > span{grid-column:1; grid-row:1; justify-self:start}
#btnInstall{
  grid-column:2; grid-row:1; justify-self:center;
  appearance:none; cursor:pointer; font:inherit;
  font-size:13px; font-weight:600; letter-spacing:normal; text-transform:none;
  color:var(--ink); background:var(--surface);
  border:1px solid var(--line); border-radius:6px; padding:3px 10px; line-height:1.3;
}
#btnInstall:hover{border-color:var(--accent); color:var(--accent)}
#btnInstall:focus-visible{outline:none; box-shadow:var(--focus)}
#introToggle {
  grid-column: 3; 
  grid-row: 1; 
  justify-self: end;
  appearance: none; 
  border: 0; 
  background: transparent; 
  cursor: pointer;
  color: inherit; 
  font-size: 32px; 
  padding: 0 4px;
  transition: transform .15s;
  
  /* Anpassungen für die korrekte Höhe: */
  height: 16px;          /* Begrenzt die Höhe des Buttons */
  line-height: 0;        /* Verhindert, dass die Schriftgröße die Box aufspannt */
  display: flex;         /* Ermöglicht die saubere Zentrierung des Pfeils */
  align-items: center; 
}
.intro.collapsed #introToggle{transform:rotate(-90deg)}
.intro.collapsed #introBody{display:none}
.intro.collapsed h2{margin-bottom:-16px; border-bottom:0}
#introToggle:focus-visible{outline:none; box-shadow:var(--focus); border-radius:4px}
.intro p{margin:0 0 8px; font-size:14.5px}
.intro p:last-child{margin-bottom:0}
.intro a{color:var(--accent)}
.intro p.hint{
  margin-top:10px; padding-top:9px; border-top:1px solid var(--line);
  color:var(--muted); font-size:13.5px;
}

/* two-column layout */
.cols{display:grid; grid-template-columns:minmax(280px,330px) minmax(0,1fr); gap:16px; align-items:start}
@media (max-width:660px){ .cols{grid-template-columns:1fr} }

.row{display:flex; align-items:center; gap:10px; margin:8px 0; flex-wrap:wrap}
.row>.lbl{min-width:72px; color:var(--muted); font-size:14px}
.note{color:var(--muted); font-size:13px; margin:10px 0 0}

/* numeric year field with steppers */
.num{display:inline-flex; align-items:stretch; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:var(--surface)}
.num input{
  width:74px; border:0; padding:6px 8px; font:inherit; font-variant-numeric:tabular-nums;
  text-align:right; background:transparent; color:var(--ink);
}
.num input:focus{outline:none}
.num:focus-within{box-shadow:var(--focus); border-color:var(--accent)}
.num select{
  display:none; border:0; padding:6px 4px 6px 8px; font:inherit;
  font-variant-numeric:tabular-nums; background:transparent; color:var(--ink);
  width:82px; text-align:right; appearance:none; -webkit-appearance:none;
}
.num select:focus{outline:none}
@media (pointer:coarse){
  .num input{display:none}
  .num select{display:block}
}
.num .btns{display:flex; flex-direction:column; border-left:1px solid var(--line)}
.num .btns button{
  appearance:none; border:0; background:var(--accent-soft); color:var(--accent);
  width:26px; flex:1; cursor:pointer; font-size:10px; line-height:1; padding:0;
}
.num .btns button:first-child{border-bottom:1px solid var(--line)}
.num .btns button:active{background:var(--accent); color:#fff}

/* checkbox list */
.checks{list-style:none; margin:0; padding:0}
.checks li+li{margin-top:6px}
.checks label{display:flex; align-items:baseline; gap:9px; cursor:pointer; line-height:1.35}
.checks input{
  width:17px; height:17px; accent-color:var(--accent); cursor:pointer;
  flex:none; position:relative; top:3px;
}
.checks span{font-weight:600; white-space:nowrap}
.checks i{color:var(--muted); font-style:normal; font-size:12.5px}

/* result table */
.result .tablewrap{max-height:532px; overflow:auto; margin:0 -4px; padding:0 4px}
table{border-collapse:collapse; width:100%; font-variant-numeric:tabular-nums}
th{
  text-align:left; font-size:12.5px; letter-spacing:.4px; text-transform:uppercase;
  color:var(--muted); border-bottom:2px solid var(--line); padding:4px 8px 6px;
  position:sticky; top:0; background:var(--surface);
}
td{border-bottom:1px solid var(--line); padding:5px 8px; font-size:14.5px}
td .wd{color:var(--muted); font-size:12.5px; margin-right:6px}
tr.yearsep td{border-top:2px solid var(--line)}

/* toolbar */
.toolbar{display:flex; gap:10px; margin-top:16px; flex-wrap:wrap}
.toolbar button{
  appearance:none; font:inherit; font-weight:600; cursor:pointer;
  color:var(--ink); border:1px solid #b3c2c9; border-radius:8px; padding:9px 18px;
  background:linear-gradient(#ffffff, #e9eff2);
  box-shadow:0 1px 2px rgba(29,43,51,.18), inset 0 1px 0 #fff;
}
.toolbar button:hover:enabled{
  border-color:var(--accent); color:var(--accent);
  background:linear-gradient(#ffffff, #e0edef);
}
.toolbar button:active:enabled{
  transform:translateY(1px); background:#e4ebee;
  box-shadow:inset 0 1px 3px rgba(29,43,51,.22);
}
.toolbar button:disabled{opacity:.5; cursor:default}
.toolbar button:focus-visible{outline:none; box-shadow:var(--focus)}

footer{
  max-width:720px; margin:0 auto; padding:8px 16px 26px; color:var(--muted); font-size:13px;
  display:flex; gap:8px; flex-wrap:wrap; align-items:center;
}
footer a{color:var(--accent); text-decoration:none}
footer a:hover{text-decoration:underline}

#toast{
  position:fixed; left:50%; bottom:26px; transform:translateX(-50%) translateY(20px);
  background:var(--ink); color:#fff; padding:9px 16px; border-radius:8px; font-size:14px;
  opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; max-width:90vw;
}
#toast.show{opacity:1; transform:translateX(-50%) translateY(0)}
@media (prefers-reduced-motion:reduce){ #toast{transition:none} }
