/* A quiet event exchange: precise lists, readable payloads, one green action color.
   Native system type; no build step, fonts, or remote assets. */
/* Theme tokens */
:root {
  color-scheme: light;
  --bg: oklch(0.975 0 0);
  --surface: oklch(1 0 0);
  --subtle: oklch(0.955 0 0);
  --ink: oklch(0.24 0.008 160);
  --muted: oklch(0.49 0.008 160);
  --line: oklch(0.875 0.003 160);
  --primary: oklch(0.42 0.09 160);
  --on-primary: oklch(1 0 0);
  --soft: oklch(0.94 0.025 160);
  --danger: oklch(0.49 0.17 25);
  --danger-soft: oklch(0.96 0.02 25);
  --amber: oklch(0.46 0.1 65);
  --violet: oklch(0.45 0.13 300);
  --violet-soft: oklch(0.95 0.02 300);
  --string: oklch(0.4 0.09 160);
  --number: oklch(0.46 0.13 40);
  --keyword: oklch(0.45 0.13 300);
  --backdrop: oklch(0.12 0 0 / 0.45);
  --font:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Microsoft YaHei', system-ui, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --z-menu: 20;
  --z-modal: 30;
  --z-toast: 40;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: oklch(0.16 0 0);
    --surface: oklch(0.205 0 0);
    --subtle: oklch(0.24 0 0);
    --ink: oklch(0.93 0.003 160);
    --muted: oklch(0.72 0.008 160);
    --line: oklch(0.33 0.003 160);
    --primary: oklch(0.77 0.1 160);
    --on-primary: oklch(0.18 0.015 160);
    --soft: oklch(0.285 0.035 160);
    --danger: oklch(0.78 0.115 25);
    --danger-soft: oklch(0.28 0.03 25);
    --amber: oklch(0.8 0.1 75);
    --violet: oklch(0.8 0.09 300);
    --violet-soft: oklch(0.28 0.03 300);
    --string: oklch(0.8 0.09 160);
    --number: oklch(0.8 0.1 65);
    --keyword: oklch(0.8 0.09 300);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: oklch(0.16 0 0);
  --surface: oklch(0.205 0 0);
  --subtle: oklch(0.24 0 0);
  --ink: oklch(0.93 0.003 160);
  --muted: oklch(0.72 0.008 160);
  --line: oklch(0.33 0.003 160);
  --primary: oklch(0.77 0.1 160);
  --on-primary: oklch(0.18 0.015 160);
  --soft: oklch(0.285 0.035 160);
  --danger: oklch(0.78 0.115 25);
  --danger-soft: oklch(0.28 0.03 25);
  --amber: oklch(0.8 0.1 75);
  --violet: oklch(0.8 0.09 300);
  --violet-soft: oklch(0.28 0.03 300);
  --string: oklch(0.8 0.09 160);
  --number: oklch(0.8 0.1 65);
  --keyword: oklch(0.8 0.09 300);
}
/* Base typography and focus */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
label,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.35;
  text-wrap: balance;
}
h1 {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.015em;
}
h3 {
  font-size: 15px;
  font-weight: 650;
}
p {
  text-wrap: pretty;
}
button {
  touch-action: manipulation;
}
.mono,
code,
pre {
  font-family: var(--mono);
  font-size: 12px;
}
.muted,
.hint {
  color: var(--muted);
}
.hint {
  font-size: 12px;
}
.break {
  overflow-wrap: anywhere;
}
/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  line-height: 1.4;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transition:
    background 0.15s ease-out,
    color 0.15s ease-out;
}
.button:hover:not(:disabled) {
  background: var(--subtle);
}
.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.button.primary:hover:not(:disabled) {
  filter: brightness(0.92);
}
.button.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.button.quiet:hover:not(:disabled) {
  background: var(--subtle);
  color: var(--ink);
}
.button.danger {
  color: var(--danger);
}
.button.danger.primary {
  color: var(--surface);
  background: var(--danger);
  border-color: var(--danger);
}
.button.small {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 12px;
}
.button.full {
  width: 100%;
  justify-content: space-between;
}
/* Application header */
.topbar {
  min-height: 66px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-sub {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 450;
  color: var(--muted);
  letter-spacing: 0;
}
.mark {
  display: inline-flex;
  width: 29px;
  height: 29px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 7px;
  background: var(--primary);
  color: var(--on-primary);
}
.mark i {
  display: block;
  width: 3px;
  height: 10px;
  border-radius: 1px;
  background: currentColor;
  transform: translateY(-3px);
}
.mark i:nth-child(2) {
  height: 17px;
  transform: none;
}
.mark i:nth-child(3) {
  transform: translateY(3px);
}
.top-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.version {
  font: 11px var(--mono);
  color: var(--muted);
  margin-right: 10px;
}
/* Workspace navigation */
.shell {
  display: flex;
  min-height: calc(100dvh - 66px);
}
.sidebar {
  width: 210px;
  flex-shrink: 0;
  padding: 32px 16px 24px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.nav-label {
  font-size: 11px;
  color: var(--muted);
  padding: 0 13px 12px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar nav a {
  padding: 10px 13px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
}
.sidebar nav a span {
  font-size: 19px;
  width: 19px;
  text-align: center;
  line-height: 1;
}
.sidebar nav a:hover {
  background: var(--subtle);
  color: var(--ink);
}
.sidebar nav a[aria-current='page'] {
  background: var(--soft);
  color: var(--primary);
  font-weight: 600;
}
.sidebar-note {
  margin: auto 12px 0;
  padding-top: 64px;
  color: var(--muted);
  font-size: 11px;
  line-height: 2;
}
.sidebar-note .mono {
  padding-left: 13px;
  font-size: 10px;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}
/* Page layout */
#main {
  padding: 42px 44px 64px;
  width: 100%;
  min-width: 0;
  max-width: 1400px;
  margin: 0 auto;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.page-head p {
  color: var(--muted);
  margin-top: 8px;
  max-width: 68ch;
  font-size: 13px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a:hover {
  color: var(--primary);
}
.section-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 12px;
  gap: 12px;
}
.list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: clip;
}
/* Identity list */
.identity-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.identity-row:last-child {
  border-bottom: 0;
}
.identity-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--primary);
  font: 16px var(--mono);
}
.identity-info {
  flex: 1;
  min-width: 0;
}
.identity-name {
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.identity-name:hover {
  color: var(--primary);
}
.identity-id {
  font: 11px var(--mono);
  color: var(--muted);
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.identity-stats {
  display: flex;
  gap: 28px;
  font-size: 12px;
  color: var(--muted);
}
.identity-stats b {
  color: var(--ink);
  font: 15px var(--mono);
  display: block;
}
.row-end {
  flex-shrink: 0;
}
.bottom-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 18px;
}
/* Detail tabs and resource rows */
.tabs {
  display: flex;
  flex-direction: row;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow: auto;
}
.tabs a {
  color: var(--muted);
  padding: 0 0 11px;
  white-space: nowrap;
  font-size: 13px;
  border-bottom: 2px solid transparent;
}
.tabs a[aria-current='page'] {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.resource {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.resource:last-child {
  border-bottom: 0;
}
.resource-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.resource-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.resource p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 7px;
  overflow-wrap: anywhere;
}
.resource-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 20px;
  font-size: 11px;
  color: var(--muted);
}
.badge {
  font: 11px/1.4 var(--mono);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--subtle);
  color: var(--muted);
  border-radius: 4px;
  padding: 3px 6px;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.badge.green {
  color: var(--primary);
  background: var(--soft);
}
.badge.purple {
  color: var(--violet);
  background: var(--violet-soft);
}
.badge.red {
  color: var(--danger);
  background: var(--danger-soft);
}
.copy-line {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px 6px 12px;
  margin-top: 16px;
}
.copy-line code {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
/* Loading, empty, and feedback states */
.empty {
  padding: 52px 24px;
  text-align: center;
}
.empty-symbol {
  font: 27px var(--mono);
  color: var(--muted);
  margin-bottom: 14px;
}
.empty h2 {
  font-size: 16px;
}
.empty p {
  color: var(--muted);
  font-size: 13px;
  margin: 8px auto 20px;
  max-width: 45ch;
}
.loading {
  padding: 45px 0;
  color: var(--muted);
  font-size: 13px;
}
.loading::before {
  content: '';
  display: inline-block;
  height: 7px;
  width: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 1s ease-out infinite alternate;
}
@keyframes pulse {
  to {
    opacity: 0.3;
  }
}
.error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.notice {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.75;
}
.notice.warning {
  background: var(--danger-soft);
}
.notice p + p {
  margin-top: 6px;
}
/* Forms, channel modes, and identifiers */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
  min-width: 0;
}
label,
.label {
  font-size: 13px;
  font-weight: 550;
}
input,
textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  outline-offset: 2px;
  line-height: 1.5;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
input[readonly] {
  background: var(--subtle);
  color: var(--muted);
}
.form-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 26px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  min-width: 0;
}
legend {
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 550;
}
.segmented {
  display: flex;
  gap: 6px;
}
.segmented label {
  flex: 1;
  cursor: pointer;
  position: relative;
}
.segmented input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.segmented span {
  display: block;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 450;
}
.segmented input:checked + span {
  background: var(--soft);
  color: var(--primary);
  border-color: var(--primary);
}
.segmented input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding-left: 8px;
  background: var(--subtle);
  border: 1px solid var(--line);
  font: 12px var(--mono);
}
.chip button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 6px 8px;
}
.inline-input {
  display: flex;
  gap: 8px;
}
.inline-input input {
  flex: 1;
}
/* Dialogs and one-time keys */
.dialog {
  color: var(--ink);
  background: var(--surface);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  width: min(570px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  z-index: var(--z-modal);
}
.dialog.wide {
  width: min(860px, calc(100vw - 32px));
}
.dialog::backdrop {
  background: var(--backdrop);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 17px;
}
.dialog-body {
  padding: 24px;
}
.dialog-body > p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}
.dialog .notice {
  margin-bottom: 18px;
}
.dialog h3 {
  margin: 22px 0 10px;
}
.secret {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--soft);
  padding: 12px;
}
.secret code {
  overflow-wrap: anywhere;
  flex: 1;
  font-size: 13px;
}
pre {
  padding: 15px 17px;
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: auto;
  line-height: 1.8;
  margin: 0;
  tab-size: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.syntax-string {
  color: var(--string);
}
.syntax-number {
  color: var(--number);
}
.syntax-key {
  color: var(--keyword);
  font-weight: 550;
}
.syntax-literal {
  color: var(--keyword);
}
/* Custom menus and notifications */
.menu {
  position: fixed;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px;
  background: var(--surface);
  color: var(--ink);
  z-index: var(--z-menu);
  min-width: 165px;
  max-width: calc(100vw - 24px);
  max-height: min(400px, 70dvh);
  overflow: auto;
}
.menu button {
  background: none;
  border: 0;
  color: inherit;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 4px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.menu button:hover,
.menu button:focus {
  background: var(--subtle);
  outline: 0;
}
.menu button[aria-checked='true'] {
  color: var(--primary);
  background: var(--soft);
}
.toasts {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  max-width: calc(100vw - 32px);
}
.toast {
  padding: 11px 18px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--surface);
  margin-top: 8px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
/* Event filters, history, and payloads */
.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filters form {
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 400px;
  min-width: 230px;
}
.filters input {
  padding: 7px 11px;
  font: 12px var(--mono);
}
.stream-state {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}
.stream-state[data-connected='true'] {
  color: var(--primary);
}
.event-labels {
  display: grid;
  grid-template-columns: 100px minmax(160px, 1fr) minmax(120px, 0.7fr) 110px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  gap: 16px;
}
.event-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
  text-align: left;
  display: grid;
  grid-template-columns: 100px minmax(160px, 1fr) minmax(120px, 0.7fr) 110px;
  gap: 16px;
  align-items: center;
  padding: 17px 20px;
}
.event-row:last-child {
  border-bottom: 0;
}
.event-row:hover {
  background: var(--subtle);
}
.event-row time {
  font: 12px var(--mono);
  color: var(--muted);
}
.event-row .event-identifier {
  font: 12px var(--mono);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.event-row .event-summary {
  display: block;
  color: var(--muted);
  font: 11px var(--font);
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.event-owner {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.event-row.system .event-identifier {
  color: var(--violet);
}
.load-more {
  display: flex;
  justify-content: center;
  padding: 22px;
}
.event-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 7px 18px;
  font-size: 12px;
  margin: 0 0 22px;
}
.event-details dt {
  color: var(--muted);
}
.event-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.payload-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
}
.payload-label h3 {
  margin: 0;
}
details {
  margin-top: 20px;
}
summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}
/* Broadcast composer */
.broadcast-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 42px;
  align-items: start;
  max-width: 980px;
}
.broadcast-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 26px;
}
.broadcast-aside {
  padding-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.broadcast-aside h3 {
  color: var(--ink);
  margin-bottom: 12px;
}
.broadcast-aside p {
  margin-bottom: 18px;
}
.flow-step {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 0;
  font: 12px var(--mono);
}
/* Login and OAuth consent */
.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 36px;
}
.auth-main {
  flex: 1;
  display: grid;
  place-content: center;
  padding: 40px 24px 70px;
}
.login-panel {
  max-width: 380px;
  width: 100%;
}
.login-panel h1 {
  font-size: 28px;
}
.intro {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 30px;
  max-width: 48ch;
}
.route-diagram {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 32px;
  color: var(--muted);
  font: 11px var(--mono);
}
.route-diagram span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.route-diagram span:nth-of-type(2) {
  color: var(--primary);
  background: var(--soft);
  border-color: transparent;
}
.auth-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 24px;
  text-align: center;
}
.auth-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 36px;
  font: 11px var(--mono);
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.consent-main {
  display: block;
  width: min(640px, 100%);
  margin: 0 auto;
  padding-top: 24px;
}
.consent-flow {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 9px;
  margin: 24px 0;
}
.consent-client {
  font-size: 23px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.consent-flow .flow-arrow {
  margin: 16px 0;
  color: var(--primary);
  font-size: 20px;
}
.consent-flow .target {
  font-size: 18px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.consent-host {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
  overflow-wrap: anywhere;
}
.consent-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.identity-option {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.identity-option:has(input:checked) {
  background: var(--soft);
  border-color: var(--primary);
}
.identity-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin: 0;
}
.identity-option span {
  flex: 1;
  overflow-wrap: anywhere;
}
.identity-option small {
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
  font-weight: 400;
}
.consent-permissions {
  margin: 22px 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}
.consent-permissions li {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}
.consent-permissions li::before {
  content: '✓';
  color: var(--primary);
}
.consent-expiry {
  margin: 18px 0;
  font-size: 11px;
  color: var(--muted);
}
.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: var(--z-toast);
  padding: 9px 15px;
  background: var(--surface);
}
.skip:focus {
  top: 8px;
}
/* Responsive layouts */
@media (min-width: 1600px) {
  #main {
    padding-top: 48px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 185px;
  }
  #main {
    padding: 30px 26px 48px;
  }
  .identity-stats {
    gap: 18px;
  }
  .event-labels,
  .event-row {
    grid-template-columns: 85px minmax(120px, 1fr) minmax(85px, 0.7fr) 85px;
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }
}
@media (max-width: 800px) {
  .brand-sub {
    display: none;
  }
  .topbar {
    padding: 12px 20px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    width: 100%;
    padding: 10px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-label,
  .sidebar-note {
    display: none;
  }
  .sidebar nav {
    flex-direction: row;
    gap: 6px;
  }
  .sidebar nav a {
    padding: 8px 12px;
  }
  .sidebar nav a span {
    display: none;
  }
  #main {
    padding: 28px 22px 48px;
  }
  .broadcast-layout {
    gap: 25px;
  }
  .identity-stats {
    gap: 18px;
  }
  .tabs {
    gap: 24px;
  }
  .identity-row {
    padding: 20px;
  }
}
@media (max-width: 600px) {
  .topbar {
    padding: 12px 14px;
    gap: 8px;
  }
  .top-actions {
    gap: 0;
  }
  .top-actions .version {
    font-size: 10px;
    margin-right: 4px;
  }
  .top-actions .button {
    padding: 6px 8px;
    font-size: 12px;
    min-height: 34px;
  }
  .brand {
    gap: 8px;
    font-size: 16px;
  }
  .brand .mark {
    width: 25px;
    height: 25px;
  }
  .sidebar {
    padding: 8px 12px;
  }
  .sidebar nav {
    gap: 2px;
  }
  .sidebar nav a {
    padding: 8px 10px;
    font-size: 12px;
  }
  #main {
    padding: 26px 16px 40px;
  }
  h1 {
    font-size: 23px;
  }
  .page-head {
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
  }
  .page-head p {
    font-size: 12px;
  }
  .identity-row {
    padding: 18px 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .identity-icon {
    width: 34px;
    height: 34px;
  }
  .identity-stats {
    padding-left: 46px;
    flex-basis: 100%;
    gap: 22px;
    order: 2;
  }
  .identity-stats > span {
    white-space: nowrap;
  }
  .identity-stats b {
    display: inline;
    font-size: 12px;
    margin-right: 4px;
  }
  .identity-row .row-end {
    margin-left: auto;
  }
  .resource {
    padding: 18px 16px;
  }
  .resource-head {
    flex-wrap: wrap;
    gap: 12px;
  }
  .resource-head .actions {
    margin-left: -6px;
  }
  .copy-line {
    padding-left: 9px;
  }
  .copy-line code {
    font-size: 10px;
  }
  .tabs {
    gap: 20px;
  }
  .tabs a {
    font-size: 12px;
  }
  .filters {
    gap: 9px;
  }
  .filters form {
    flex-basis: 100%;
    max-width: none;
    order: 3;
  }
  .stream-state {
    font-size: 11px;
  }
  .event-labels {
    display: none;
  }
  .event-row {
    grid-template-columns: 64px minmax(0, 1fr) 70px;
    padding: 15px 12px;
    gap: 10px;
  }
  .event-owner {
    grid-column: 2;
    font-size: 11px;
  }
  .event-type {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
  .event-row time {
    grid-row: 1 / span 2;
    font-size: 10px;
  }
  .event-row .event-identifier {
    font-size: 11px;
  }
  .event-row .event-summary {
    font-size: 10px;
  }
  .event-type .badge {
    font-size: 10px;
  }
  .broadcast-layout {
    display: block;
  }
  .broadcast-form {
    padding: 20px 16px;
  }
  .broadcast-aside {
    margin-top: 24px;
  }
  .dialog-head {
    padding: 16px 18px;
  }
  .dialog-body {
    padding: 20px 18px;
  }
  .dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }
  .dialog.wide {
    width: calc(100vw - 24px);
  }
  .dialog-head h2 {
    font-size: 16px;
  }
  .secret {
    flex-wrap: wrap;
  }
  .secret code {
    flex-basis: 100%;
  }
  .auth-top {
    padding: 20px 22px;
  }
  .auth-main {
    padding: 34px 24px 60px;
  }
  .auth-footer {
    padding: 18px 22px;
    flex-wrap: wrap;
    font-size: 10px;
  }
  .login-panel h1 {
    font-size: 26px;
  }
  .consent-main {
    padding: 20px 20px 40px;
  }
  .consent-flow {
    padding: 18px;
  }
  .consent-client {
    font-size: 21px;
  }
  .consent-main h1 {
    font-size: 23px;
  }
  .identity-option {
    padding: 12px;
    flex-wrap: wrap;
  }
  .identity-option small {
    margin-left: 27px;
  }
  .identity-option span {
    min-width: 150px;
  }
  .event-details {
    gap: 8px 12px;
    font-size: 11px;
  }
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.resource p.error {
  color: var(--danger);
}
/* User-provided names can be a single uninterrupted 64-character identifier. */
.page-head > div:first-child,
.resource-head > div:first-child {
  min-width: 0;
  max-width: 100%;
}
.page-head h1,
.resource-heading h3 {
  overflow-wrap: anywhere;
}
.breadcrumb {
  flex-wrap: wrap;
}
.breadcrumb > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
