/* Agent ONE – im Design der HIB-Website: Schwarz, Weiß, ein Hauch Bronze, Haarlinien, eckige Kanten. */
:root {
  --bg: #ffffff; --bg2: #f6f6f3; --ink: #0d0d0d; --muted: #66665f; --line: #e1e1db; --line2: #b9b9b1;
  --accent: #86683f; --tint: #ecebe6;
  --panel-bg: #0d0d0d; --panel-fg: #f4f4f0; --panel-muted: #a5a59d; --panel-line: #2d2d2a; --panel-accent: #c6a676;
  --glass: rgba(255, 255, 255, 0.9);
  --btn-bg: #0d0d0d; --btn-fg: #ffffff; --logo-filter: none;
  --font: Avenir, "Avenir Next", "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0a; --bg2: #141413; --ink: #f2f2ee; --muted: #9d9d95; --line: #272724; --line2: #43433f; --accent: #c6a676; --tint: #1c1c19;
    --panel-bg: #171715; --panel-line: #2f2f2b; --glass: rgba(11, 11, 10, 0.88);
    --btn-bg: #f2f2ee; --btn-fg: #0b0b0a; --logo-filter: invert(1); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; font-weight: 300; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 20px calc(110px + var(--safe-b)); }
.hidden { display: none !important; }

/* Kopfzeile */
.top { position: sticky; top: 0; z-index: 20; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; gap: 18px; }
.logo img { height: 34px; width: auto; display: block; filter: var(--logo-filter); }
.brand { font-size: 11px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.top-nav { display: none; gap: 28px; margin-left: auto; }
.top-nav a { font-size: 11.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: 8px 0; border-bottom: 1px solid transparent; }
.top-nav a:hover, .top-nav a.on { color: var(--ink); border-color: var(--accent); }
.icon-btn { margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); background: transparent; cursor: pointer; }
.icon-btn:hover, .icon-btn.on { border-color: var(--ink); }

/* Untere Leiste (Handy) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); padding: 0 4px var(--safe-b); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 0 8px; min-height: 52px; font-size: 9.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-top: 2px solid transparent; margin-top: -1px; }
.tabbar a.on { color: var(--ink); border-color: var(--accent); }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
@media (min-width: 900px) {
  .tabbar { display: none; }
  .top-nav { display: flex; }
  .icon-btn { margin-left: 8px; }
  .wrap { padding-top: 56px; padding-bottom: 80px; }
}

/* Typografie */
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--accent); }
.label { font-size: 11px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.h1 { font-size: clamp(40px, 7vw, 88px); font-weight: 700; letter-spacing: -0.035em; line-height: 0.98; margin-top: 12px; }
.h1 span { color: var(--accent); }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 52ch; margin-top: 14px; }
.head { margin-bottom: 28px; }
.section { margin-top: 34px; }
.section > .label { display: block; margin-bottom: 12px; }
.muted { color: var(--muted); }

/* Bausteine */
.rows { border-top: 1px solid var(--ink); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.row-title { font-size: 19px; font-weight: 400; letter-spacing: -0.015em; line-height: 1.3; }
.row-sub { font-size: 14px; color: var(--muted); }
.tag { font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.dash { display: inline-block; width: 22px; height: 1px; background: var(--accent); vertical-align: middle; margin-right: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 1px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); font-size: 11.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; cursor: pointer; transition: background .25s, color .25s; }
.btn:hover { background: transparent; color: var(--ink); }
.btn.line { background: transparent; color: var(--ink); border-color: var(--line2); }
.btn.line:hover { border-color: var(--ink); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 10.5px; }
.btn:disabled { opacity: .45; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.go { width: 40px; height: 40px; border: 1px solid var(--line2); display: grid; place-items: center; background: transparent; cursor: pointer; color: var(--ink); }
.go:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Dunkles Feld (Player, Meldungen) */
.panel { background: var(--panel-bg); color: var(--panel-fg); padding: 22px 20px; }
.panel .label { color: var(--panel-muted); }
.panel .muted { color: var(--panel-muted); }
.player { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.play { width: 58px; height: 58px; border: 1px solid var(--panel-fg); background: var(--panel-fg); color: #0d0d0d; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; padding: 0; }
.play svg { width: 20px; height: 20px; }
.player-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.speed { margin-left: auto; min-height: 36px; padding: 0 12px; border: 1px solid var(--panel-line); background: transparent; color: var(--panel-fg); font-size: 12px; font-weight: 600; cursor: pointer; }
.bar { height: 1px; background: var(--panel-line); position: relative; margin-top: 18px; }
.bar i { position: absolute; left: 0; top: -0.5px; height: 2px; background: var(--panel-accent); width: 0; transition: width .4s; }
.notice { margin-top: 14px; font-size: 13px; color: var(--panel-muted); }

.chapter { border-bottom: 1px solid var(--line); }
.chapter summary { list-style: none; display: grid; grid-template-columns: 34px minmax(0, 1fr) 40px; gap: 12px; align-items: center; padding: 16px 0; cursor: pointer; }
.chapter summary::-webkit-details-marker { display: none; }
.chapter .num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chapter.speaking .num, .chapter.speaking .row-title { color: var(--accent); }
.chapter .body { padding: 0 0 20px 46px; font-size: 17px; line-height: 1.65; max-width: 68ch; white-space: pre-line; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; column-gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab { background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 12px 0; min-height: 44px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 14px; min-height: 40vh; }
.msg { max-width: min(82%, 640px); padding: 12px 16px; font-size: 16px; line-height: 1.5; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--ink); color: var(--bg); font-weight: 400; }
.msg.assistant { align-self: flex-start; background: var(--bg2); }
.msg-tools { align-self: flex-start; margin-top: -6px; }
.composer { position: sticky; bottom: calc(60px + var(--safe-b)); background: var(--bg); border-top: 1px solid var(--line); padding: 12px 0; margin-top: 20px; display: flex; gap: 12px; align-items: flex-end; }
@media (min-width: 900px) { .composer { bottom: 0; } }
.listening { color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; margin-top: 8px; }
.mic { width: 52px; height: 52px; border: 1px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; padding: 0; }
.mic.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Formulare */
.field { display: grid; gap: 4px; border-bottom: 1px solid var(--line2); padding: 8px 0; margin-bottom: 14px; }
.field label { font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; background: transparent; border: 0; padding: 6px 0; border-radius: 0; font-size: 16px; font-weight: 300; outline-offset: 6px; }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.field select option { background: var(--bg); color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); margin-top: 2px; }
.grid2 { display: grid; gap: 0 40px; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.card-narrow { max-width: 460px; margin: 8vh auto 0; }
.err { color: #b3261e; font-size: 14px; margin-top: 10px; min-height: 1.4em; }
@media (prefers-color-scheme: dark) { .err { color: #f2b8b5; } }

/* Desktop: Briefing und News nebeneinander */
.split { display: grid; gap: 34px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: start; } }

#toast { position: fixed; left: 50%; bottom: calc(80px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 50; max-width: calc(100% - 40px); }
#toast.show { opacity: 1; }
.spin { display: inline-block; width: 14px; height: 14px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
