/* Klipper-Assistent – Layout (dunkel, mobil zuerst) */
:root {
  --bg: #0f1419; --bg2: #161d25; --card: #1b232d; --line: #2a3542; --text: #e6edf3; --muted: #8b98a8;
  --acc: #ff6b2c; --acc2: #ff8f5c; --ok: #3fb950; --warn: #d29922; --err: #f85149; --info: #3b82f6;
  --r: 14px; --safe-top: env(safe-area-inset-top, 0px); --safe-bot: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--acc2); }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: #0b1016; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .9em; word-break: break-word; }
h1 { font-size: 1.7rem; line-height: 1.25; margin: .2em 0 .5em; }
h2 { font-size: 1.25rem; margin: .1em 0 .6em; }
h3 { font-size: 1.05rem; margin: 1.2em 0 .5em; color: #cfd8e3; }
.muted, small { color: var(--muted); }
.accent { color: var(--acc); }
.hint { color: var(--muted); font-size: .92rem; margin: .6em 0; }
.warnc { color: var(--warn); }

/* Kopf */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: calc(10px + var(--safe-top)) 18px 10px; background: rgba(15, 20, 25, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.top nav a:hover, .top nav a.on { color: var(--text); background: var(--card); }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 22px 16px 40px; flex: 1; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.foot { text-align: center; padding: 20px 16px calc(20px + var(--safe-bot)); border-top: 1px solid var(--line); font-size: .9rem; }
.foot .muted { font-size: .8rem; margin-top: 4px; }

/* Karten */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin: 0 0 16px; }
.card.highlight { border-color: var(--acc); background: linear-gradient(135deg, rgba(255, 107, 44, .10), var(--card) 60%); }
.card.empty { text-align: center; padding: 40px 18px; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cards.two { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.cards .card { margin: 0; }
.head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 44px; }
.btn:hover { border-color: #3a4757; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.primary:hover { background: var(--acc2); }
.btn.danger { color: var(--err); }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: .9rem; }
.btn.big { padding: 14px 22px; font-size: 1.05rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btnrow form { margin: 0; }
form.inline { display: inline; margin: 0; }

/* Formulare */
.form { display: grid; gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; color: #cfd8e3; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--text); background: #0b1016; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--acc); outline-offset: 0; border-color: var(--acc); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--acc); flex: none; }
label.chk, label.radio { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; }
.grid2, .grid3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid3 { grid-template-columns: 1fr 1fr 1fr; } }
.hp { position: absolute; left: -9999px; }
.checks { list-style: none; padding: 0; }
.checks .ok { color: var(--ok); } .checks .bad { color: var(--err); }
.checks-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; }

/* Hinweise */
.alert { border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; border: 1px solid; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert.ok { background: rgba(63, 185, 80, .1); border-color: rgba(63, 185, 80, .4); }
.alert.err { background: rgba(248, 81, 73, .1); border-color: rgba(248, 81, 73, .45); }
.alert.warn { background: rgba(210, 153, 34, .1); border-color: rgba(210, 153, 34, .45); }
.alert.info { background: rgba(59, 130, 246, .08); border-color: rgba(59, 130, 246, .35); }

/* Startseite */
.hero { display: grid; gap: 24px; align-items: center; padding: 20px 0 30px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.4fr 1fr; } }
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); }
.lead { font-size: 1.1rem; color: #c2ccd8; }
.hero-steps { display: grid; gap: 12px; }
.hero-steps div { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.hero-steps span { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; background: var(--acc); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 16px; }
.features .card { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; font-size: .9rem; }

/* Assistent */
.wiz-head h1 { margin-bottom: 10px; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0 0 8px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.steps::-webkit-scrollbar { display: none; }
.steps li button { white-space: nowrap; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); border-radius: 20px; padding: 6px 12px 6px 6px; font: inherit; font-size: .88rem; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.steps li button span { width: 22px; height: 22px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-size: .78rem; color: var(--text); }
.steps li.done button { color: #cfd8e3; } .steps li.done button span { background: var(--ok); }
.steps li.on button { color: var(--text); border-color: var(--acc); } .steps li.on button span { background: var(--acc); }
.wiz-nav { display: flex; gap: 10px; align-items: center; position: sticky; bottom: 0; padding: 12px 0 calc(12px + var(--safe-bot)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.grow { flex: 1; }
.picks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 8px; }
.picks.two { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pick { text-align: left; display: flex; flex-direction: column; gap: 4px; background: var(--bg2); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text); font: inherit; cursor: pointer; min-height: 64px; }
.pick small { font-size: .84rem; line-height: 1.35; }
.pick:hover { border-color: #3a4757; }
.pick.sel { border-color: var(--acc); background: rgba(255, 107, 44, .08); }
.pick:disabled { opacity: .45; cursor: not-allowed; }
fieldset.axis { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin: 0 0 12px; }
fieldset.axis legend { padding: 0 6px; font-weight: 700; color: var(--acc2); }
label small { font-size: .8rem; }

/* Ergebnis */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 6px 0 14px; scrollbar-width: none; }
.tabs button { background: var(--bg2); border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: #fff; background: var(--acc); border-color: var(--acc); }
.tab { display: none; } .tab.on { display: block; }
.cmd { display: flex; align-items: stretch; gap: 0; margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0b1016; }
.cmd code { flex: 1; border: 0; border-radius: 0; padding: 12px 14px; background: transparent; overflow-x: auto; white-space: pre; word-break: normal; font-size: .9rem; }
.cmd .copy { border: 0; border-left: 1px solid var(--line); background: var(--bg2); color: var(--acc2); font: inherit; font-weight: 600; padding: 0 14px; cursor: pointer; }
.cmd .copy.done { color: var(--ok); }
pre { background: #0b1016; border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow: auto; max-height: 460px; font-size: .84rem; line-height: 1.45; margin: 8px 0 0; }
.file-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-head h3 { margin: 0; font-family: ui-monospace, Menlo, monospace; }
table.sum, table.list { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.sum th, table.sum td, table.list th, table.list td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.sum th { color: var(--muted); font-weight: 600; width: 34%; }
.tablewrap { overflow-x: auto; }
ul.mono li { font-size: .9rem; }
details summary { cursor: pointer; font-weight: 600; }
details.card summary { display: flex; align-items: center; gap: 10px; list-style: none; }
details.card summary::-webkit-details-marker { display: none; }
details.calib .num { width: 26px; height: 26px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-size: .85rem; flex: none; }
details.calib.done { opacity: .7; } details.calib.done .num { background: var(--ok); }
details.calib[open] summary { margin-bottom: 10px; }
.progress { height: 10px; border-radius: 6px; background: var(--bg2); overflow: hidden; border: 1px solid var(--line); }
.progress .bar { height: 100%; width: 0; background: var(--ok); transition: width .3s; }
.calc { display: grid; gap: 10px; grid-template-columns: 1fr; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; }
@media (min-width: 640px) { .calc { grid-template-columns: 1fr 1fr; } }
.calc output { grid-column: 1 / -1; font-size: 1.05rem; font-weight: 700; color: var(--acc2); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-bottom: 16px; }
.stat { margin: 0; display: flex; flex-direction: column; } .stat b { font-size: 1.8rem; } .stat span { color: var(--muted); }
.printer h3 { margin-top: 0; }
