:root {
  color-scheme: light;
  --navy: #14253d;
  --teal: #0f766e;
  --cream: #f7f1e5;
  --paper: #fffdf8;
  --line: #d9d0bf;
  --text: #1d2939;
  --muted: #667085;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

[hidden] { display: none !important; }
.link-button { display: inline-block; padding: .65rem 1rem; border: 1px solid var(--navy); border-radius: .6rem; color: var(--navy); text-decoration: none; text-align: center; }
.link-button:hover, .link-button:focus-visible { background: rgba(15,118,110,.12); }
.live-section { margin: clamp(1rem,4vw,3rem) clamp(1rem,4vw,3rem) 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.section-heading h2 { margin-bottom: 0; }
.feed-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit,minmax(min(100%,18rem),1fr)); }
.feed-item { border: 1px solid var(--line); border-radius: .75rem; padding: 1rem; }
.feed-item p { overflow-wrap: anywhere; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; }
#live-detail { margin-top: 1rem; }
.access-layout { display: grid; gap: 1.25rem; max-width: 900px; margin: 0 auto; padding: clamp(1rem,4vw,3rem); }
.access-layout input { display: block; width: 100%; border: 1px solid var(--line); padding: .8rem; border-radius: .5rem; font: inherit; margin: .5rem 0 1rem; }
.access-layout label { display: block; margin-top: 1rem; }
.access-layout pre { overflow-x: auto; padding: 1rem; background: #faf7ef; border-radius: .75rem; font-size: .9rem; line-height: 1.6; }
.key-result, .key-row { border: 1px solid var(--line); border-radius: .75rem; margin-top: 1rem; padding: 1rem; }
.key-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.member-row { border: 1px solid var(--line); border-radius: .75rem; margin-top: 1rem; padding: 1rem; }
.top-actions { flex-wrap: wrap; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button {
  border: 1px solid var(--navy);
  border-radius: 0.6rem;
  background: var(--navy);
  color: white;
  cursor: pointer;
  font: inherit;
  padding: 0.65rem 1rem;
}

button:hover,
button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.35);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.topbar {
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
}

h1,
h2,
h3 {
  color: var(--navy);
  margin-top: 0;
}

h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

.badge {
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(15, 118, 110, 0.3);
  border-radius: 999px;
  color: var(--teal);
  display: inline-block;
  font-weight: 700;
  margin: 0;
  padding: 0.3rem 0.7rem;
}

.top-actions {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.status {
  color: var(--muted);
}

.dashboard {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.8fr);
  padding: clamp(1rem, 4vw, 3rem);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(20, 37, 61, 0.08);
  padding: 1.25rem;
}

.muted {
  color: var(--muted);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tabs button {
  background: transparent;
  color: var(--navy);
}

.tabs button:hover,
.tabs button:focus-visible {
  background: rgba(15, 118, 110, 0.12);
}

.viewer-content,
.panel-text {
  background: #faf7ef;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  min-height: 8rem;
  padding: 1rem;
}

.empty {
  color: var(--muted);
}

.steps {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.25rem;
}

.alert {
  color: var(--danger);
  min-height: 1.5rem;
}

.inbox {
  margin-top: 1rem;
}

.note {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
}

@media (max-width: 800px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }
}
