/* Farben und Komponenten: bewusst ohne CSS-Framework. */
:root {
  --paper:#f4f3ef;
  --white:#fff;
  --ink:#23332e;
  --muted:#6c7771;
  --line:#e3e5df;
  --green:#285446;
  --lime:#d7efac;
  --red:#ca614e;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  color:var(--ink);
  background:var(--paper);
}

button,input,textarea {
  font:inherit;
}

button {
  cursor:pointer;
}

button:disabled {
  cursor:default;
  opacity:.45;
}

.shell {
  display:grid;
  grid-template-columns:260px 1fr;
  min-height:100vh;
}

.sidebar {
  background:#e9ede5;
  padding:38px 24px;
  display:flex;
  flex-direction:column;
  border-right:1px solid #dce1d7;
}

.brand {
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--ink);
  text-decoration:none;
  font-size:22px;
  font-weight:750;
  letter-spacing:-1px;
}

.brand-icon {
  display:grid;
  place-items:center;
  background:var(--green);
  color:var(--lime);
  border-radius:12px;
  width:40px;
  height:40px;
  font-size:31px;
}

.light {
  font-weight:400;
}

.eyebrow {
  font-size:10px;
  font-weight:700;
  letter-spacing:1.5px;
  color:var(--muted);
}

.sidebar>.eyebrow {
  margin-top:55px;
  font-size:9px;
}

.intro {
  font-size:24px;
  line-height:1.35;
  letter-spacing:-.6px;
  margin:20px 0 35px;
}

.room {
  width:100%;
  display:flex;
  align-items:center;
  gap:12px;
  background:transparent;
  border:1px solid transparent;
  padding:16px 10px;
  border-radius:12px;
  text-align:left;
  color:var(--ink);
  margin-bottom:8px;
}

.room.active {
  background:var(--white);
  border-color:#dce4d8;
  box-shadow:0 4px 12px #203e2e05;
}

.room-icon {
  font-size:24px;
  width:26px;
  text-align:center;
  color:var(--green);
}

.room strong {
  display:block;
  font-size:13px;
}

.room small {
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-top:5px;
}

.arrow {
  margin-left:auto;
  color:var(--muted);
}

.sidebar-bottom {
  margin-top:auto;
  color:var(--green);
  font-size:12px;
  line-height:2;
  padding-top:40px;
}

.sidebar-bottom small {
  font-size:9px;
  color:var(--muted);
}

.tiny-dot {
  display:inline-block;
  width:6px;
  height:6px;
  background:var(--green);
  border-radius:50%;
  margin-right:6px;
}

main {
  padding:38px 38px 20px;
  min-width:0;
}

.topbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:28px;
}

h1 {
  font-size:38px;
  font-weight:550;
  letter-spacing:-1.5px;
  margin:10px 0 0;
}

.status {
  font-size:11px;
  background:#e4e9de;
  color:var(--green);
  border-radius:30px;
  padding:10px 14px;
}

.workspace {
  display:grid;
  grid-template-columns:minmax(280px,1fr) 290px;
  gap:22px;
}

.chat-panel {
  background:var(--white);
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  height:calc(100vh - 185px);
  min-height:510px;
  max-height:900px;
}

.chat-heading {
  padding:22px 24px;
  display:flex;
  align-items:center;
  gap:10px;
  border-bottom:1px solid var(--line);
}

.pill {
  font-size:9px;
  letter-spacing:1.2px;
  font-weight:750;
  border-radius:5px;
  padding:6px 9px;
  background:#edf2e8;
  color:var(--green);
  display:inline-block;
}

.chat-heading p {
  font-size:11px;
  color:var(--muted);
  margin:10px 0 0;
  line-height:1.6;
}

.secondary {
  background:transparent;
  border:1px solid var(--line);
  border-radius:8px;
  font-size:10px;
  white-space:nowrap;
  padding:9px 11px;
  margin-left:auto;
}

.messages {
  overflow:auto;
  flex:1;
  padding:24px;
  scroll-behavior:smooth;
}

.empty {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:100%;
  text-align:center;
}

.empty-symbol {
  display:grid;
  place-items:center;
  background:var(--paper);
  width:70px;
  height:70px;
  border-radius:22px;
  font-size:38px;
  color:#789268;
}

.empty h2 {
  font-size:24px;
  font-weight:500;
  line-height:1.3;
  letter-spacing:-.7px;
}

.empty p {
  font-size:11px;
  color:var(--muted);
  line-height:1.7;
}

.message {
  display:flex;
  gap:10px;
  margin-bottom:22px;
}

.avatar {
  flex-shrink:0;
  width:30px;
  height:30px;
  background:#e8eddc;
  border-radius:10px;
  display:grid;
  place-items:center;
  font-size:12px;
  font-weight:700;
}

.message.mine .avatar {
  background:var(--lime);
}

.message-body {
  min-width:0;
  max-width:95%;
}

.message-meta {
  font-size:11px;
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:6px;
}

.message-meta time {
  font-size:9px;
  color:var(--muted);
}

.bubble {
  font-size:13px;
  line-height:1.6;
  padding:11px 14px;
  background:#f3f5f0;
  border-radius:0 12px 12px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.mine .bubble {
  background:#e7f1d8;
}

.stream-id {
  font:9px monospace;
  color:#859182;
  margin-top:5px;
}

.composer {
  display:flex;
  gap:12px;
  background:#f7f8f5;
  border:1px solid var(--line);
  border-radius:12px;
  margin:0 24px;
  padding:10px;
  align-items:flex-end;
}

.composer textarea {
  background:transparent;
  border:0;
  outline:0;
  resize:vertical;
  flex:1;
  min-width:0;
  max-height:130px;
  padding:8px;
  font-size:12px;
  line-height:1.5;
}

.composer button {
  background:var(--green);
  color:white;
  border:0;
  border-radius:9px;
  width:36px;
  height:36px;
  font-size:23px;
}

.composer-note {
  display:flex;
  justify-content:space-between;
  font-size:9px;
  color:var(--muted);
  padding:12px 25px 20px;
  gap:8px;
}

#feedback {
  padding:0 24px;
  min-height:15px;
  color:var(--red);
  font-size:11px;
}

.inspector {
  background:#eeefe8;
  border:1px solid var(--line);
  border-radius:18px;
  padding:24px;
}

.inspector h2 {
  font-size:22px;
  letter-spacing:-.6px;
  font-weight:550;
  margin:12px 0 22px;
}

.accent {
  color:#89a064;
}

.metric-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:24px;
}

.metric-grid>div {
  padding:14px;
  background:#fafbf6;
  border-radius:10px;
}

.metric-grid strong {
  display:block;
  font-size:27px;
  font-weight:500;
}

.metric-grid span {
  font-size:9px;
  color:var(--muted);
  display:block;
  margin-top:6px;
}

.fact {
  display:flex;
  gap:12px;
  border-top:1px solid #dfe3d8;
  padding:18px 0;
}

.fact-icon {
  font-size:9px;
  color:var(--green);
  border:1px solid #cdd8c3;
  border-radius:50%;
  height:23px;
  width:23px;
  flex-shrink:0;
  display:grid;
  place-items:center;
}

.fact strong {
  font-size:11px;
}

.fact p,.lab-note {
  font-size:10px;
  line-height:1.8;
  color:var(--muted);
  margin:8px 0 0;
}

.ttl-label {
  font:10px monospace;
  color:var(--green);
}

.online {
  border-top:1px solid #dfe3d8;
  padding-top:15px;
}

.online h3 {
  font-size:11px;
  font-weight:600;
}

.online h3 span {
  float:right;
  background:#dce7d0;
  padding:2px 6px;
  border-radius:4px;
}

.online ul {
  list-style:none;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.online li {
  font-size:10px;
  background:#fafbf6;
  padding:6px 9px;
  border-radius:6px;
}

.online li:before {
  content:' ';
  display:inline-block;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#77985d;
  margin-right:7px;
}

.lab-note {
  margin-top:24px;
  font-size:9px;
}

footer {
  display:flex;
  justify-content:space-between;
  font-size:9px;
  color:var(--muted);
  margin-top:20px;
  gap:10px;
}

footer span:last-child {
  font-size:8px;
  letter-spacing:.5px;
}

dialog {
  border:1px solid var(--line);
  border-radius:20px;
  padding:36px;
  max-width:420px;
  width:calc(100% - 30px);
  box-shadow:0 20px 80px #14291b30;
}

dialog::backdrop {
  background:#19372955;
  backdrop-filter:blur(4px);
}

dialog h2 {
  font-size:32px;
  font-weight:500;
  letter-spacing:-1px;
}

dialog p {
  font-size:12px;
  color:var(--muted);
  line-height:1.6;
}

dialog label {
  display:block;
  font-size:11px;
  margin-top:18px;
  margin-bottom:8px;
}

dialog input {
  width:100%;
  border:1px solid #cdd5c6;
  border-radius:8px;
  padding:12px;
  background:#f8faf5;
}

dialog small {
  color:var(--muted);
}

.primary {
  width:100%;
  background:var(--green);
  color:white;
  border:0;
  border-radius:9px;
  padding:13px;
  text-align:left;
  margin-top:15px;
  font-size:12px;
}

.primary span {
  float:right;
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
}

button:focus-visible,input:focus-visible,textarea:focus-visible {
  outline:2px solid #658649;
  outline-offset:3px;
}

@media(max-width:1150px) {
  .shell {
    grid-template-columns:210px 1fr;
  }
  .sidebar {
    padding:30px 18px;
  }
  main {
    padding:28px 24px;
  }
  .workspace {
    grid-template-columns:minmax(250px,1fr) 240px;
  }
  .inspector {
    padding:20px;
  }
  .chat-heading {
    flex-wrap:wrap;
  }
  .secondary {
    margin-left:0;
  }
}

@media(max-width:900px) {
  .workspace {
    grid-template-columns:1fr;
  }
  .inspector {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px 20px;
  }
  .chat-panel {
    height:620px;
  }
  .lab-note {
    margin:0;
  }
  .shell {
    grid-template-columns:190px 1fr;
  }
  footer {
    flex-wrap:wrap;
  }
}

@media(max-width:600px) {
  .shell {
    display:block;
  }
  .sidebar {
    padding:20px;
    border-right:0;
  }
  .sidebar>.eyebrow,.intro,.sidebar-bottom {
    display:none;
  }
  .brand {
    font-size:19px;
  }
  .sidebar nav {
    display:flex;
    gap:10px;
    margin-top:20px;
  }
  .room {
    margin:0;
    padding:10px;
  }
  .room-icon,.arrow {
    display:none;
  }
  main {
    padding:22px 14px;
  }
  .topbar {
    align-items:flex-start;
    gap:12px;
  }
  h1 {
    font-size:29px;
  }
  .topbar .eyebrow {
    font-size:8px;
  }
  .status {
    font-size:9px;
    padding:8px;
  }
  .chat-panel {
    min-height:450px;
    height:560px;
  }
  .chat-heading,.messages {
    padding:18px;
  }
  .composer {
    margin:0 16px;
  }
  .composer-note {
    padding:12px 18px;
    font-size:8px;
  }
  .inspector {
    padding:18px;
  }
  .fact {
    grid-column:1/-1;
  }
  .inspector-title,.metric-grid,.online,.lab-note {
    grid-column:1/-1;
  }
}

