:root {
  --navy: #0b1220;
  --navy-2: #121c2e;
  --navy-3: #1a2740;
  --ink: #f4efe6;
  --muted: rgba(244, 239, 230, 0.62);
  --faint: rgba(244, 239, 230, 0.38);
  --gold: #c4a484;
  --gold-bright: #e0c4a8;
  --gold-dim: rgba(196, 164, 132, 0.16);
  --line: rgba(196, 164, 132, 0.22);
  --good: #8fbf9f;
  --watch: #d4a574;
  --amber: #d4a574;
  --rose: #c98989;
  --teal: #7eb0a6;
  --rail: 240px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-ui: "Outfit", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--navy);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.portal {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  min-height: 100vh;
}

/* Rail */
.rail {
  background:
    linear-gradient(180deg, rgba(196, 164, 132, 0.08), transparent 30%),
    var(--navy-2);
  border-right: 1px solid var(--line);
  padding: 1.35rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.mark {
  display: block;
  font-family: var(--font-display);
  letter-spacing: 0.28em;
  font-size: 0.95rem;
  color: var(--gold-bright);
  font-weight: 600;
}

.mark-sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.role-switch {
  display: grid;
  gap: 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.role-switch select {
  appearance: none;
  background: var(--navy-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.85rem;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  text-align: left;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-item:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
}

.nav-item.is-on {
  color: var(--gold-bright);
  background: var(--gold-dim);
}

.nav-item.consult-nav {
  margin-top: 0.5rem;
  border: 1px solid var(--line);
}

.rail-foot {
  margin-top: auto;
  display: grid;
  gap: 0.85rem;
}

.prac-chip {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.65rem;
  border-radius: 12px;
  background: rgba(11, 18, 32, 0.55);
  border: 1px solid rgba(196, 164, 132, 0.12);
}

.prac-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  background: var(--gold-dim);
  color: var(--gold-bright);
  font-family: var(--font-display);
}

.prac-chip strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
}

.prac-chip span {
  font-size: 0.72rem;
  color: var(--muted);
}

.member-link {
  color: var(--gold);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0 0.35rem;
}

.member-link:hover {
  color: var(--gold-bright);
}

/* Workspace */
.workspace {
  padding: 1.35rem 1.5rem 2rem;
  background:
    radial-gradient(ellipse 50% 30% at 100% 0%, rgba(196, 164, 132, 0.08), transparent 55%),
    var(--navy);
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.35rem;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.topbar h1,
.panel-head h2,
.chart-head h2,
.chat-head h2 {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: 0.02em;
}

.panel-head h2,
.chart-head h2,
.chat-head h2 {
  font-size: 1.35rem;
}

.topbar-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.search input {
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  min-width: 200px;
  outline: none;
}

.search input:focus {
  border-color: rgba(196, 164, 132, 0.5);
}

.btn {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold-bright);
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  border-color: rgba(196, 164, 132, 0.5);
  background: rgba(196, 164, 132, 0.08);
}

.btn.solid {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  font-weight: 500;
}

.btn.solid:hover {
  background: var(--gold-bright);
}

.btn.ghost {
  background: transparent;
}

.btn.tiny {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
}

.btn.full {
  width: 100%;
  margin-top: 0.85rem;
}

.text-btn {
  border: none;
  background: none;
  color: var(--gold);
  cursor: pointer;
  padding: 0;
  font-size: 0.8rem;
}

/* Views */
.view {
  display: none;
  animation: rise 0.4s ease both;
}

.view.is-active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.stat {
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(18, 28, 46, 0.75);
}

.stat.warn {
  border-color: rgba(212, 165, 116, 0.45);
  background: rgba(212, 165, 116, 0.08);
}

.stat-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--gold-bright);
  line-height: 1;
}

.stat-meta {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--faint);
  font-weight: 300;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(18, 28, 46, 0.65);
  padding: 1rem 1.1rem 1.15rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.panel-head.tight {
  margin-bottom: 0.55rem;
}

.consult-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: center;
  text-align: left;
  padding: 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(196, 164, 132, 0.14), transparent 55%);
  cursor: pointer;
  margin-bottom: 0.65rem;
}

.consult-when {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 4rem;
}

.consult-when span:first-child {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold-bright);
}

.consult-when span:last-child,
.consult-who span,
.row span:last-child,
.row div span {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 300;
}

.consult-who {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.consult-who strong,
.row strong,
.attention strong {
  font-weight: 500;
}

.pill {
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--gold-bright);
}

.pill.live {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.pill.soft {
  background: var(--gold-dim);
}

.list-rows .row {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(196, 164, 132, 0.1);
  align-items: start;
}

.list-rows .row > span {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1rem;
}

.list-rows .row div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.attention-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.attention {
  padding: 0.85rem 0 0.85rem;
  border-top: 1px solid rgba(196, 164, 132, 0.12);
}

.attention:first-child {
  border-top: none;
  padding-top: 0;
}

.attention p {
  margin: 0.35rem 0 0.65rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 300;
  line-height: 1.4;
}

.attention-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.tag {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}

.tag.amber { color: var(--amber); background: rgba(212, 165, 116, 0.12); }
.tag.rose { color: var(--rose); background: rgba(201, 137, 137, 0.12); }
.tag.teal { color: var(--teal); background: rgba(126, 176, 166, 0.12); }
.tag.good { color: var(--good); background: rgba(143, 191, 159, 0.12); }
.tag.watch { color: var(--watch); background: rgba(212, 165, 116, 0.12); }

/* Members table */
.toolbar {
  margin-bottom: 0.85rem;
}

.chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-size: 0.8rem;
}

.chip.is-on {
  border-color: var(--line);
  color: var(--gold-bright);
  background: var(--gold-dim);
}

.table {
  padding: 0.35rem 0.5rem 0.5rem;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 1.4fr 0.7fr 0.7fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 0.75rem;
}

.table-head {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid rgba(196, 164, 132, 0.15);
}

.table-row {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  border-bottom: 1px solid rgba(196, 164, 132, 0.1);
  cursor: pointer;
  color: inherit;
  font-size: 0.88rem;
}

.table-row:hover {
  background: rgba(196, 164, 132, 0.06);
}

.member-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 500;
}

.dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  border: 1px solid var(--line);
  color: var(--gold);
  background: var(--gold-dim);
}

.risk.low { color: var(--good); }
.risk.mid { color: var(--watch); }
.risk.high { color: var(--rose); }

.row-cta {
  color: var(--gold);
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Plans */
.grid-plans {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr;
  gap: 1rem;
}

.plan-types {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.plan-type {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 0.78rem;
}

.plan-type.is-on {
  border-color: var(--line);
  color: var(--gold-bright);
  background: var(--gold-dim);
}

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.plan-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: rgba(11, 18, 32, 0.35);
  border-radius: 12px;
  padding: 0.8rem 0.85rem;
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
}

.plan-item.is-on,
.plan-item:hover {
  border-color: var(--line);
  background: rgba(196, 164, 132, 0.08);
}

.plan-item strong {
  font-weight: 500;
  font-size: 0.92rem;
}

.plan-item span {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 300;
}

.editor-lead {
  margin: -0.35rem 0 1rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 300;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field.full {
  grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea,
.compose select,
.compose textarea,
.note-box textarea,
.chat-compose input {
  border: 1px solid var(--line);
  background: var(--navy);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.9rem;
  color: var(--ink);
  outline: none;
  width: 100%;
  resize: vertical;
}

.subhead {
  margin: 1.15rem 0 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.structure,
.nudge-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.structure-item {
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(196, 164, 132, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.structure-item strong {
  font-weight: 500;
  font-size: 0.9rem;
}

.structure-item span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 300;
}

.check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.86rem;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 300;
}

.check input {
  margin-top: 0.2rem;
  accent-color: var(--gold);
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

/* Nudges */
.rule-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rule {
  padding: 0.85rem 0;
  border-top: 1px solid rgba(196, 164, 132, 0.12);
}

.rule:first-child {
  border-top: none;
  padding-top: 0;
}

.rule-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.rule p {
  margin: 0.4rem 0 0.55rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 300;
  line-height: 1.4;
}

.rule em {
  color: var(--gold-bright);
  font-style: normal;
}

.rule-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--faint);
}

.toggle {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.15);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s ease, background 0.2s ease;
}

.toggle.on {
  background: rgba(196, 164, 132, 0.35);
}

.toggle.on::after {
  transform: translateX(18px);
  background: var(--gold-bright);
}

.compose {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.preview {
  grid-column: 1 / -1;
}

.preview-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.push-preview {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.7);
  padding: 0.85rem 1rem;
}

.push-preview strong {
  font-size: 0.78rem;
  color: var(--gold);
}

.push-preview p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.4;
}

.compose .editor-actions {
  grid-column: 1 / -1;
}

/* Messages */
.messages-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  min-height: 620px;
}

.thread-list {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
}

.thread {
  text-align: left;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0.85rem 0.65rem;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
  position: relative;
}

.thread:hover,
.thread.is-on {
  background: rgba(196, 164, 132, 0.08);
}

.thread span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 300;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread time {
  position: absolute;
  top: 0.85rem;
  right: 0.65rem;
  font-size: 0.68rem;
  color: var(--faint);
}

.chat {
  display: flex;
  flex-direction: column;
  min-height: 620px;
}

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(196, 164, 132, 0.12);
}

.chat-head p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 300;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-log.compact {
  max-height: 180px;
  padding: 0.5rem 0;
}

.bubble {
  max-width: 75%;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
}

.bubble p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.4;
}

.bubble time {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  color: var(--faint);
}

.bubble.them {
  align-self: flex-start;
  background: rgba(244, 239, 230, 0.06);
  border: 1px solid rgba(196, 164, 132, 0.12);
}

.bubble.me {
  align-self: flex-end;
  background: var(--gold-dim);
  border: 1px solid var(--line);
}

.chat-compose {
  display: flex;
  gap: 0.55rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(196, 164, 132, 0.12);
}

/* Consult split */
.consult-stage {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 1rem;
  min-height: calc(100vh - 140px);
}

.consult-main {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.85rem;
  min-height: 0;
}

.video-pane {
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #070b14;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.video-member {
  flex: 1;
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(196, 164, 132, 0.12), transparent 40%),
    linear-gradient(160deg, #121c2e, #070b14);
}

.video-placeholder {
  text-align: center;
}

.video-initial {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 0.85rem;
  font-family: var(--font-display);
  font-size: 2.2rem;
  border: 1px solid var(--gold);
  background: var(--gold-dim);
  color: var(--gold-bright);
}

.video-placeholder strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
}

.video-placeholder span {
  color: var(--muted);
  font-size: 0.82rem;
}

.video-self {
  position: absolute;
  right: 1rem;
  bottom: 4.5rem;
  width: 140px;
  height: 96px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(18, 28, 46, 0.95);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.video-live-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(11, 18, 32, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
}

.video-controls {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem;
  background: rgba(7, 11, 20, 0.92);
  border-top: 1px solid rgba(196, 164, 132, 0.12);
}

.ctrl {
  border: 1px solid var(--line);
  background: rgba(18, 28, 46, 0.9);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-size: 0.8rem;
}

.ctrl.end {
  background: rgba(201, 137, 137, 0.2);
  border-color: rgba(201, 137, 137, 0.45);
  color: #efc4c4;
}

.consult-chat {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(18, 28, 46, 0.65);
  padding: 0.85rem 1rem;
}

.member-chart {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(18, 28, 46, 0.75);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.chart-tabs {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 0.95rem;
}

.chart-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font-size: 0.75rem;
}

.chart-tab.is-on {
  border-color: var(--line);
  color: var(--gold-bright);
  background: var(--gold-dim);
}

.chart-panel {
  display: none;
}

.chart-panel.is-on {
  display: block;
  animation: rise 0.3s ease both;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.mini-metrics div {
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(11, 18, 32, 0.55);
  border: 1px solid rgba(196, 164, 132, 0.1);
}

.mini-metrics strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--gold-bright);
  font-weight: 400;
}

.mini-metrics span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.note-box {
  margin-bottom: 0.85rem;
}

.note-box h3 {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.note-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.45;
}

.marker {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(196, 164, 132, 0.12);
}

.marker-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.marker > span {
  font-size: 0.82rem;
  color: var(--muted);
}

.chart-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.4;
}

.spark {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  height: 90px;
  margin: 0.5rem 0;
}

.spark span {
  flex: 1;
  height: var(--h);
  border-radius: 5px 5px 2px 2px;
  background: rgba(196, 164, 132, 0.25);
}

.spark span.today {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy-3);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  font-size: 0.86rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  z-index: 50;
  animation: rise 0.3s ease both;
}

@media (max-width: 1100px) {
  .stat-row,
  .grid-2,
  .grid-plans,
  .consult-stage,
  .messages-layout {
    grid-template-columns: 1fr;
  }

  .portal {
    grid-template-columns: 1fr;
  }

  .rail {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .rail-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .table-head {
    display: none;
  }

  .table-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}
