:root {
  /* Boots Bot brand colors */
  --primary: #ff9f43;          /* light orange: buttons, header accent, highlights */
  --primary-hover: #f28c28;
  --primary-strong: #b45309;   /* orange as text on light backgrounds (AA) */
  --primary-soft: #fff3e6;
  --on-primary: #3b1f00;       /* text on orange */
  --secondary: #38bdf8;        /* sky blue: info, badges, charts */
  --secondary-hover: #0ea5e9;
  --secondary-strong: #0369a1; /* blue as text / links on light backgrounds (AA) */
  --secondary-soft: #e0f2fe;
  --on-secondary: #0b2a3d;     /* text on sky blue */
  --header-bg: #1d2330;
  --header-text: #e5e7eb;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1d2330;
  --muted: #5f6675;
  --border: #e3e6eb;
  --input-border: #cfd4dc;
  --row-hover: #fafafb;
  --accent: var(--primary);
  --accent-dark: var(--primary-strong);
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --off: #6b7280;
  --off-bg: #eceef1;
  --warn: #92400e;
  --warn-bg: #fef3c7;
  --err: #b91c1c;
  --err-bg: #fee2e2;
  --live: #be123c;
  --live-bg: #ffe4e6;
  /* usage bar colors, one per feature (in FEATURES order) */
  --c-f0: var(--secondary);
  --c-f1: var(--primary);
  --c-f2: var(--secondary-strong);
  --c-f3: #14b8a6;
  --c-f4: var(--primary-strong);
  --c-f5: #9ca3af;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--secondary-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 .75rem; word-break: break-word; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 0 0 .6rem; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.topbar { background: var(--header-bg); color: #fff; margin-bottom: 1.5rem; border-bottom: 3px solid var(--primary); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; min-height: 56px; }
.brand { color: #fff; font-weight: 700; font-size: 1.1rem; }
.brand span { color: var(--primary); font-weight: 400; }
.topbar nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topbar nav a { color: var(--header-text); }
.topbar nav a:hover { color: var(--primary); }
.topbar nav a.active, .topbar nav a[aria-current="page"] { color: var(--primary); font-weight: 600; }
.footer { color: var(--muted); font-size: .85rem; padding-top: 1rem; padding-bottom: 2rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.card.narrow, .card.login { max-width: 520px; }
.card.login { margin: 3rem auto; }
.page-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; margin-right: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.tile { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: .9rem 1rem; display: flex; flex-direction: column; }
.tile-num { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile-num.tile-small { font-size: 1.05rem; padding: .35rem 0; }
.tile-label { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; white-space: nowrap; }
tbody tr:hover { background: var(--row-hover); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
td.note { max-width: 280px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-off { background: var(--off-bg); color: var(--off); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-live { background: var(--live-bg); color: var(--live); }
.badge-feature { background: var(--secondary-soft); color: var(--secondary-strong); }
.badge-preview { background: var(--primary-soft); color: var(--primary-strong); }
/* Feature status: segmented radio group (Aktiv / Nur Doku / Deaktiviert) */
.segmented { display: inline-flex; border: 1px solid var(--input-border); border-radius: 7px; overflow: hidden; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.segmented label { margin: 0; padding: .3rem .7rem; font-size: .85rem; font-weight: 600; color: var(--muted); background: var(--card); cursor: pointer; white-space: nowrap; }
.segmented label + input + label { border-left: 1px solid var(--input-border); }
.segmented label:hover { background: var(--row-hover); color: var(--text); }
.segmented input:focus-visible + label { outline: 2px solid var(--primary); outline-offset: -2px; }
.segmented input:checked + label.opt-enabled { background: var(--ok-bg); color: var(--ok); }
.segmented input:checked + label.opt-preview { background: var(--primary-soft); color: var(--primary-strong); }
.segmented input:checked + label.opt-disabled { background: var(--off-bg); color: var(--off); }
.status-help { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .3rem; }
.status-help .badge { min-width: 6.5rem; text-align: center; margin-right: .4rem; }
.features-table td { vertical-align: top; }
fieldset.features-pick { border: 1px solid var(--border); border-radius: 8px; margin: 1rem 0 0; padding: .4rem .9rem .8rem; }
fieldset.features-pick legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.feature-pick { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; padding: .5rem 0; border-bottom: 1px solid var(--border); }
fieldset.features-pick .status-help { margin: .6rem 0 0; }
h3.feature-sub .badge { margin-left: .4rem; vertical-align: middle; }
.feature-head .badge { vertical-align: middle; font-size: .8rem; }
.feature { margin-top: 2rem; }
.feature-head { font-size: 1.25rem; margin: 0 0 .25rem; padding-bottom: .4rem; border-bottom: 2px solid var(--primary); }
.feature > p.small { margin: .4rem 0 1rem; }
.card.legacy { border-style: dashed; }
.cmd .badge { margin-left: .4rem; font-weight: 600; }
h3.feature-sub { margin-top: 1.25rem; padding-bottom: .3rem; border-bottom: 1px solid var(--border); }
.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid transparent; }
.flash-ok { background: var(--ok-bg); color: var(--ok); border-color: #bbf7d0; }
.flash-warn { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }
.flash-error { background: var(--err-bg); color: var(--err); border-color: #fecaca; }
label { display: block; font-weight: 600; margin: .75rem 0 .3rem; font-size: .9rem; }
input[type=text], input[type=password], textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--input-border); border-radius: 7px; font: inherit; background: var(--card); color: var(--text);
}
textarea { resize: vertical; }
textarea.mono, input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
input:focus, textarea:focus { outline: 2px solid var(--primary); border-color: var(--primary-strong); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn {
  display: inline-block; border: 1px solid var(--primary); background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 600;
  padding: .5rem 1rem; border-radius: 7px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); text-decoration: none; }
form > .btn { margin-top: 1rem; }
.btn-ghost { background: var(--card); color: var(--secondary-strong); border-color: var(--secondary); }
.btn-ghost:hover { background: var(--secondary-soft); }
.topbar .btn-ghost { background: transparent; color: var(--header-text); border-color: #4b5563; }
.topbar .btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--card); color: var(--err); border-color: #fca5a5; }
.btn-danger:hover { background: var(--err); color: #fff; }
.btn-small { padding: .25rem .6rem; font-size: .85rem; }
form.inline { display: inline; margin: 0; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; }
.row input { flex: 1 1 240px; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.actions form { margin: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }
.copy-row { display: flex; gap: .5rem; align-items: flex-start; }
.copy-row input, .copy-row textarea { flex: 1; min-width: 0; }
.cmd label { margin-top: .9rem; }
.legend { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-top: -.25rem; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: .5rem; }
.seg-f0 { background: var(--c-f0); }
.seg-f1 { background: var(--c-f1); }
.seg-f2 { background: var(--c-f2); }
.seg-f3 { background: var(--c-f3); }
.seg-f4 { background: var(--c-f4); }
.seg-f5 { background: var(--c-f5); }
table.usage th.group { text-align: center; border-bottom-color: var(--border); }
table.usage tfoot th, table.usage tfoot td { border-top: 2px solid var(--border); border-bottom: 0; }
table.usage td { padding-top: .3rem; padding-bottom: .3rem; }
table.usage tr.zero td { color: #9aa1ad; }
.bar-col { width: 45%; min-width: 120px; }
.bar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: transparent; }
.seg { display: block; height: 100%; }
@media (max-width: 640px) {
  body { font-size: 14px; }
  .card { padding: .9rem; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dd { margin-bottom: .5rem; }
  .copy-row { flex-direction: column; align-items: stretch; }
  .bar-col { min-width: 80px; }
}
