[hidden] { display: none !important; }
/* Second Brain: Ergänzungen zum Glas-Design (nur Tokens aus glas.css, keine festen Farben). */
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--ink-text); }
.skip:focus { left: 12px; }
.shell { height: 100dvh; }
.side { overflow: visible; }
.side .nav-btn { text-decoration: none; }
.side .nav-btn.sm { width: 40px; height: 40px; }
.topbar h1 { outline: none; }
.topbar .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.page > * + * { margin-top: var(--gap); }
.page a { color: var(--blue); }
.page a.btn, .page a.nav-btn, .page a.hit, .page a.tile { color: var(--text); text-decoration: none; }
.page a.btn.primary { color: var(--ink-text); } .page a.btn.accent { color: #fff; }
.lead { color: var(--muted); max-width: 70ch; margin: 0; }
.crumb { font-size: var(--fs-meta); }
.state { display: flex; align-items: center; gap: 10px; padding: 28px 8px; color: var(--muted); justify-content: center; text-align: center; flex-wrap: wrap; }
.state.left { justify-content: flex-start; padding: 14px 4px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--blue); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.view-in { animation: fade-in .18s ease-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--gap); }
.tile { display: block; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--hi); }
a.tile:hover { background: var(--raised); }
.tile .v { font: 700 28px/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; margin-top: 4px; }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--gap); align-items: start; }
.stack > * + * { margin-top: var(--gap-s); }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--gap-s); align-items: flex-end; }
.toolbar .field { min-width: 140px; }
.toolbar .grow { flex: 1 1 220px; }
.meter.prog i { background: var(--blue); }
.meter.warn i { background: var(--mid); } .meter.bad i { background: var(--off); } .meter.good i { background: var(--on); }
.meter { height: 10px; }

.hits { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.hit { display: block; padding: 10px 12px; border-radius: var(--r-m); border: 1px solid transparent; }
.hit:hover { background: var(--hover); } .hit:focus-visible { outline-offset: -2px; }
.hit .t { font-weight: 600; font-size: var(--fs-title); overflow-wrap: anywhere; }
.hit .meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 4px; font-size: var(--fs-meta); color: var(--muted); }
.hit .snip { margin-top: 6px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: var(--fs-meta); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rows > li:last-child { border-bottom: 0; }
.rows .grow { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.body-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
pre.code { margin: 0; padding: 10px 12px; border-radius: var(--r-s); background: var(--sunken); border: 1px solid var(--line); overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.copy { display: grid; gap: 4px; }
.copy .cr { display: flex; gap: 8px; align-items: flex-start; }
.copy pre { flex: 1; min-width: 0; }
.copy .label { font-size: var(--fs-meta); color: var(--muted); font-weight: 600; }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
details.d > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
details.d[open] > summary { margin-bottom: 6px; }
.form-grid { display: grid; gap: 12px; }
.form-grid .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: center; }
.field .req::after { content: " *"; color: var(--off); }

.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-text); }
th { text-align: left; font-size: var(--fs-meta); color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.r { text-align: right; font-variant-numeric: tabular-nums; }
td input[type=number], td input[type=text] { width: 100%; min-width: 80px; }

/* Chat */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 190px); min-height: 460px; }
.chat .log { flex: 1; overflow: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: min(760px, 92%); padding: 10px 14px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); overflow-wrap: anywhere; }
.bubble.user { align-self: flex-end; background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 30%, transparent); }
.bubble.err { background: var(--off-soft); border-color: color-mix(in srgb, var(--off) 35%, transparent); }
.bubble .who { font-size: var(--fs-meta); color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.bubble .txt { white-space: pre-wrap; line-height: 1.55; }
.bubble pre.code { margin: 6px 0; white-space: pre; }
.bubble code { font: 12.5px ui-monospace, Menlo, monospace; background: var(--sunken); padding: 1px 5px; border-radius: 6px; }
.bubble .src { margin-top: 8px; }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { flex: 1; min-height: 44px; max-height: 160px; resize: none; }

/* Gespräche */
.msg { padding: 10px 14px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); content-visibility: auto; contain-intrinsic-size: auto 90px; }
.msg.user { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 25%, transparent); }
.msg .who { font-size: var(--fs-meta); color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--gap); }
.pair > div { border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px; background: var(--sunken); }

/* Import */
.dropzone { display: grid; place-items: center; gap: 6px; text-align: center; padding: 28px 16px; border: 2px dashed var(--line-strong); border-radius: var(--r-l); background: var(--surface); cursor: pointer; transition: background-color .15s, border-color .15s; }
.dropzone:hover, .dropzone.over { background: var(--blue-soft); border-color: var(--blue); }
.dropzone svg { width: 28px; height: 28px; color: var(--muted); }

dialog.modal { padding: 0; color: var(--text); max-height: calc(100dvh - 40px); overflow: auto; margin: auto; }
dialog.modal.wide { width: min(720px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog.modal[open] { animation: fade-in .16s ease-out; }
.modal .m-foot { position: sticky; bottom: 0; background: var(--solid); }

.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; z-index: 40; }
.login .panel { width: min(400px, 100%); background: var(--solid); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.login h1 { margin-bottom: 4px; }

@media (max-height: 940px) { .side { gap: 2px; padding: 10px 0 8px; } .side .nav-btn { width: 38px; height: 38px; border-radius: 13px; } .brand-mark { display: none; } }
@media (max-height: 640px) { .side { overflow-y: auto; scrollbar-width: none; } }
@media (max-width: 760px) {
  .shell { padding: 8px; gap: 8px; height: 100dvh; grid-template-rows: auto minmax(0, 1fr); }
  .side { flex-wrap: wrap; justify-content: center; gap: 2px; padding: 6px; border-radius: 20px; }
  .side .nav-btn { width: 36px; height: 36px; flex: none; border-radius: 12px; } .side .nav-btn svg { width: 19px; height: 19px; } .side .spacer { display: none; }
  .brand-mark { display: none; }
  .content { height: auto; }
  .topbar { flex-wrap: wrap; padding-top: 12px; gap: 8px; }
  .chat { height: calc(100dvh - 250px); min-height: 380px; }
  .form-grid .two { grid-template-columns: 1fr; }
  .toolbar .field { flex: 1 1 100%; }
  .panel-head { flex-wrap: wrap; padding-block: 6px; } .panel-head .title { white-space: normal; }
  .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: 8px; }
}

.nojs { padding: 20px; }
.login .lead-in { margin: 6px 0 14px; }
#login-err { margin-top: 12px; }
#login-btn { width: 100%; margin-top: 16px; min-height: 40px; }

.hr { border: 0; border-top: 1px solid var(--line); width: 100%; }
.bad { color: var(--off); }
.big { font-size: 20px; font-weight: 700; }
.tiles.wide { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.mb { margin-bottom: 10px; } .mt { margin-top: 12px; } .mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; } .mt14 { margin-top: 14px; }
.pdesc { margin-top: 4px; min-height: 1.4em; } .mnote { margin: 10px 14px 0; } .mp0 { margin: 8px 0 0; }
.tbar { padding-block: 10px; border-bottom: 1px solid var(--line); }
.sr { position: absolute; left: -9999px; }
.nowrap { white-space: nowrap; }
.rows.scroll { max-height: 340px; overflow: auto; padding-right: 6px; }
#kp td { vertical-align: middle; }
