@import url("https://fonts.googleapis.com/css2?family=Azeret+Mono:wght@500;600;700&display=swap");

:root {
  /* Chart Nebula Copper (aligned with output-assets/html/edgestate-shared.css) */
  --bg: #060918;
  --bg-soft: #0f0824;
  --panel: rgba(14, 18, 42, 0.82);
  --panel-strong: rgba(22, 26, 54, 0.94);
  --panel-muted: rgba(14, 18, 42, 0.62);
  --panel-line: rgba(147, 197, 253, 0.14);
  --panel-line-strong: rgba(147, 197, 253, 0.22);
  --text: #f1f5ff;
  --text-muted: rgba(148, 163, 200, 0.88);
  --text-dim: rgba(148, 163, 200, 0.55);
  --copper: #c77b47;
  --copper-bright: #ffc48a;
  --gold: #ffc48a;
  --emerald: #2dd4bf;
  --amber: #d89f53;
  --red: #d96561;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --sidebar-width: 296px;
  --sidebar-width-tablet: 92px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  max-width: 100%;
  background:
    radial-gradient(circle at 18% 18%, rgba(45, 212, 191, 0.2), transparent 32%),
    radial-gradient(circle at 82% 10%, rgba(139, 92, 246, 0.17), transparent 30%),
    radial-gradient(circle at 50% 115%, rgba(59, 130, 246, 0.14), transparent 38%),
    radial-gradient(circle at 45% 35%, rgba(236, 72, 153, 0.07), transparent 45%),
    linear-gradient(180deg, #060918 0%, #040818 56%, #0f0824 100%);
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: clip;
  color: var(--text);
  font-family: "Sora", sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #060918 0%, #040818 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.portal-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008)),
    rgba(6, 9, 24, 0.94);
  backdrop-filter: blur(18px);
}

.portal-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(220, 184, 138, 0.08), rgba(220, 184, 138, 0.02));
  border: 1px solid var(--panel-line);
}

.portal-tablet-toggle {
  display: none;
  margin-top: 14px;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.portal-mark-badge {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-family: "Oxanium", sans-serif;
  font-size: 1.1rem;
  color: var(--gold);
  background: radial-gradient(circle at 30% 30%, rgba(220, 184, 138, 0.22), rgba(191, 123, 82, 0.06));
  border: 1px solid rgba(220, 184, 138, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.portal-mark-copy {
  min-width: 0;
}

.portal-eyebrow {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.66rem;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper-bright);
}

.portal-brand {
  margin: 0;
  font-family: "Oxanium", sans-serif;
  font-size: 1.16rem;
  line-height: 1.1;
}

.portal-brand-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text-dim);
}

.portal-nav {
  margin-top: 28px;
  display: grid;
  gap: 8px;
}

.portal-nav-label {
  margin: 18px 0 6px;
  padding: 0 12px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.portal-nav-link,
.portal-nav-sublink {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border-radius: 16px;
  border: 1px solid transparent;
  color: var(--text-muted);
  transition: 160ms ease;
}

.portal-nav-link {
  padding: 13px 14px;
}

.portal-nav-link:hover,
.portal-nav-sublink:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.05);
}

.portal-nav-link.is-active,
.portal-nav-sublink.is-active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(191, 123, 82, 0.16), rgba(191, 123, 82, 0.08));
  border-color: rgba(220, 184, 138, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.portal-nav-text {
  min-width: 0;
}

.portal-nav-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.97rem;
  font-weight: 600;
}

.portal-nav-status {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.76rem;
  color: var(--text-dim);
}

.portal-nav-link.is-active .portal-nav-status {
  color: rgba(243, 235, 229, 0.68);
}

.portal-nav-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.portal-sidebar-section {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.portal-sublinks {
  display: grid;
  gap: 4px;
}

.portal-nav-sublink {
  padding: 10px 12px;
  font-size: 0.9rem;
}

.portal-sidebar-footer {
  margin-top: auto;
  padding-top: 28px;
}

.portal-context-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(220, 184, 138, 0.08), rgba(220, 184, 138, 0.02));
  border: 1px solid var(--panel-line);
}

.portal-context-title {
  margin: 0;
  font-family: "Oxanium", sans-serif;
  font-size: 1rem;
}

.portal-context-copy {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.portal-main {
  min-width: 0;
  padding: 28px 28px 120px;
}

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.portal-page-title {
  margin: 0;
  font-family: "Oxanium", sans-serif;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.02;
}

.portal-page-copy {
  margin: 0.6rem 0 0;
  max-width: 58ch;
  color: var(--text-muted);
  line-height: 1.7;
}

.portal-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-chip,
.portal-pill,
.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
}

.portal-chip {
  padding: 0.72rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.portal-pill {
  padding: 0.45rem 0.78rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-pill.is-dialed_in {
  background: rgba(34, 197, 94, 0.16);
  color: #7ae39b;
}

.portal-pill.is-sharp {
  background: rgba(20, 184, 166, 0.16);
  color: #74e3d6;
}

.portal-pill.is-building {
  background: rgba(234, 179, 8, 0.16);
  color: #f4d45b;
}

.portal-pill.is-exposed {
  background: rgba(249, 115, 22, 0.16);
  color: #ffbb7a;
}

.portal-pill.is-in_the_red {
  background: rgba(239, 68, 68, 0.16);
  color: #ff9c95;
}

.portal-pill.is-blown {
  background: rgba(220, 38, 38, 0.16);
  color: #ff7d7d;
}

.portal-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-flag.is-healthy {
  background: rgba(87, 179, 159, 0.14);
  color: #8de0cf;
}

.portal-flag.is-attention {
  background: rgba(216, 159, 83, 0.16);
  color: #f3c47f;
}

.portal-flag.is-critical {
  background: rgba(217, 101, 97, 0.16);
  color: #ff9c95;
}

.portal-button,
.portal-button-ghost,
.portal-button-muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: 160ms ease;
}

.portal-button {
  color: #140f10;
  background: linear-gradient(180deg, var(--gold), var(--copper-bright));
  box-shadow: 0 12px 24px rgba(191, 123, 82, 0.22);
}

.portal-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(191, 123, 82, 0.28);
}

.portal-button-ghost,
.portal-button-muted {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.05);
}

.portal-button-muted {
  color: var(--text-muted);
}

.portal-button.is-danger,
.portal-button-ghost.is-danger {
  background: rgba(217, 101, 97, 0.16);
  border-color: rgba(217, 101, 97, 0.24);
  color: #ffaca7;
  box-shadow: none;
}

.portal-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.portal-subnav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.portal-subnav-link.is-active {
  color: var(--text);
  border-color: rgba(220, 184, 138, 0.14);
  background: rgba(191, 123, 82, 0.1);
}

.portal-grid,
.portal-grid-2,
.portal-grid-3 {
  display: grid;
  gap: 20px;
}

.portal-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.portal-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    var(--panel);
  border: 1px solid var(--panel-line);
  box-shadow: var(--shadow);
}

.portal-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent 58%);
  pointer-events: none;
}

.portal-card.is-clickable {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.portal-card.is-clickable:hover {
  transform: translateY(-2px);
  border-color: var(--panel-line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--panel-strong);
}

.portal-card-title {
  margin: 0;
  font-family: "Oxanium", sans-serif;
  font-size: 1.2rem;
  line-height: 1.18;
}

.portal-card-copy {
  margin: 0.8rem 0 0;
  line-height: 1.7;
  color: var(--text-muted);
}

.portal-progress {
  height: 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.portal-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--copper-bright));
}

.portal-metric {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.portal-score {
  font-family: "Oxanium", sans-serif;
  font-size: clamp(2.7rem, 7vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.portal-mini-score {
  font-family: "Oxanium", sans-serif;
  font-size: 1.5rem;
  line-height: 1;
}

.portal-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem 0.78rem;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.portal-trend.is-up {
  color: #8de0cf;
}

.portal-trend.is-down {
  color: #ffb0aa;
}

.portal-trend.is-flat {
  color: var(--text-muted);
}

.portal-direction-badge {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.portal-direction-badge.is-up {
  color: #7ae39b;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.18);
}

.portal-direction-badge.is-down {
  color: #ff9c95;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.18);
}

.portal-direction-badge.is-maintained {
  color: #f4d45b;
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(234, 179, 8, 0.18);
}

.portal-transition-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.portal-transition-subheading {
  margin: 0.65rem 0 0;
  color: var(--text-dim);
  line-height: 1.65;
}

.portal-transition-score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 1.1rem;
}

.portal-transition-score-row.is-large {
  gap: 18px;
}

.portal-transition-score-card {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
}

.portal-transition-score-label {
  width: 100%;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.portal-transition-score-arrow,
.portal-transition-inline-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-weight: 700;
}

.portal-transition-score-arrow {
  align-self: center;
  font-size: 1.25rem;
}

.portal-transition-pill-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 0.95rem;
}

.portal-history-controls {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-history-comparing {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-weight: 600;
}

.portal-history-transition-copy {
  min-width: 0;
}

.portal-history-arena-header {
  padding-bottom: 8px;
}

.portal-history-table-label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.portal-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.portal-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.portal-list-copy {
  min-width: 0;
}

.portal-list-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
}

.portal-list-description {
  margin: 0.35rem 0 0;
  color: var(--text-dim);
  font-size: 0.84rem;
  line-height: 1.55;
}

.portal-list-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.portal-icon-chip {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(220, 184, 138, 0.12), rgba(191, 123, 82, 0.06));
  border: 1px solid rgba(220, 184, 138, 0.14);
  color: var(--gold);
}

.portal-icon-chip.is-small {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.portal-stack {
  display: grid;
  gap: 16px;
}

.portal-kpi-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-kpi {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.portal-kpi-title {
  margin: 0;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.portal-kpi-value {
  margin: 0.75rem 0 0;
  font-family: "Oxanium", sans-serif;
  font-size: 2rem;
  line-height: 1;
}

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

.portal-dim {
  color: var(--text-dim);
}

.portal-section {
  display: grid;
  gap: 18px;
}

.portal-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.portal-section-title {
  margin: 0;
  font-family: "Oxanium", sans-serif;
  font-size: 1.35rem;
}

.portal-section-copy {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.portal-table-wrap {
  overflow: auto;
  border-radius: 24px;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.portal-table th,
.portal-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.portal-table th {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
}

.portal-table tr:last-child td {
  border-bottom: 0;
}

.portal-badge {
  padding: 0.35rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-badge.is-strength {
  color: #8de0cf;
  background: rgba(87, 179, 159, 0.14);
  border-color: rgba(87, 179, 159, 0.16);
}

.portal-badge.is-priority {
  color: #f3c47f;
  background: rgba(216, 159, 83, 0.16);
  border-color: rgba(216, 159, 83, 0.16);
}

.portal-badge.is-critical {
  color: #ffaca7;
  background: rgba(217, 101, 97, 0.16);
  border-color: rgba(217, 101, 97, 0.18);
}

.portal-details {
  border-radius: 24px;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.portal-details + .portal-details {
  margin-top: 16px;
}

.portal-details summary {
  list-style: none;
  cursor: pointer;
}

.portal-details summary::-webkit-details-marker {
  display: none;
}

.portal-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
}

.portal-details-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-details-copy {
  padding: 0 22px 22px;
}

.portal-arena-domain-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.portal-arena-domain {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.portal-arena-domain-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.portal-note {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  line-height: 1.7;
}

.portal-note.is-critical {
  background: rgba(217, 101, 97, 0.12);
  border-color: rgba(217, 101, 97, 0.18);
}

.portal-history-empty {
  min-height: 320px;
}

.portal-empty {
  display: grid;
  gap: 20px;
  place-items: center;
  padding: 44px 24px;
  text-align: center;
}

.portal-empty-title {
  margin: 0;
  font-family: "Oxanium", sans-serif;
  font-size: 2rem;
  line-height: 1.1;
}

.portal-empty-copy {
  max-width: 42ch;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.portal-preview-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.portal-preview-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(255, 255, 255, 0.09);
  opacity: 0.56;
}

.portal-preview-card strong {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
}

.portal-preview-card span {
  display: block;
  width: 70%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.portal-form {
  display: grid;
  gap: 18px;
}

.portal-form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-field {
  display: grid;
  gap: 0.6rem;
}

.portal-field label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.portal-field input,
.portal-field select,
.portal-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.92rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  outline: none;
  transition: 140ms ease;
}

.portal-field textarea {
  min-height: 108px;
  resize: vertical;
}

.portal-field input:focus,
.portal-field select:focus,
.portal-field textarea:focus {
  border-color: rgba(220, 184, 138, 0.22);
  box-shadow: 0 0 0 3px rgba(191, 123, 82, 0.12);
}

.portal-helper {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.6;
}

.portal-inline-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-message {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.portal-message.is-success {
  background: rgba(87, 179, 159, 0.14);
  color: #a7ebdc;
}

.portal-message.is-warning {
  background: rgba(216, 159, 83, 0.16);
  color: #f4c889;
}

.portal-message.is-danger {
  background: rgba(217, 101, 97, 0.16);
  color: #ffb8b2;
}

.portal-chart {
  display: grid;
  gap: 18px;
}

.portal-chart-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 14px;
  align-items: end;
  min-height: 220px;
}

.portal-chart-bar {
  position: relative;
  display: grid;
  gap: 10px;
  align-items: end;
}

.portal-chart-fill {
  border-radius: 18px 18px 10px 10px;
  background: linear-gradient(180deg, rgba(220, 184, 138, 0.9), rgba(191, 123, 82, 0.72));
  border: 1px solid rgba(220, 184, 138, 0.2);
  min-height: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.portal-chart-meta {
  display: grid;
  gap: 0.3rem;
}

.portal-chart-date {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.portal-chart-score {
  font-family: "Oxanium", sans-serif;
  font-size: 1.2rem;
}

.portal-dual {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-route-stack {
  display: grid;
  gap: 26px;
}

.portal-coming-soon {
  min-height: calc(100vh - 216px);
  display: grid;
  place-items: center;
}

.portal-coming-soon-card {
  max-width: 640px;
  width: 100%;
  text-align: center;
}

.portal-response-list {
  display: grid;
  gap: 14px;
}

.portal-response-item {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.portal-response-item.is-low {
  border-color: rgba(216, 159, 83, 0.18);
  background: rgba(216, 159, 83, 0.08);
}

.portal-response-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.portal-response-question {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.72;
}

.portal-response-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.portal-response-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.portal-link-line {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--gold);
  font-weight: 700;
}

.portal-account-meta {
  display: grid;
  gap: 16px;
}

.portal-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 5, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 30;
}

.portal-modal {
  width: min(520px, 100%);
  border-radius: 28px;
  padding: 24px;
  background: var(--panel-strong);
  border: 1px solid var(--panel-line-strong);
  box-shadow: var(--shadow);
}

.portal-hidden {
  display: none !important;
}

.portal-mobile-tabbar {
  display: none;
}

.portal-nav-icon.is-size-small {
  width: 20px;
  height: 20px;
}

.portal-nav-icon.is-size-card {
  width: 32px;
  height: 32px;
}

.portal-nav-icon.is-size-nav {
  width: 24px;
  height: 24px;
}

.portal-nav-icon.is-size-section {
  width: 80px;
  height: 80px;
}

.portal-rich-list {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.portal-rich-list li + li {
  margin-top: 0.7rem;
}

.portal-library-layout {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.portal-library-sidebar {
  position: sticky;
  top: 24px;
}

.portal-library-nav-shell {
  border-radius: 24px;
  border: 1px solid var(--panel-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    var(--panel);
  box-shadow: var(--shadow);
  padding: 12px;
}

.portal-library-nav-list {
  display: grid;
  gap: 10px;
}

.portal-library-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-muted);
  transition: 160ms ease;
}

.portal-library-nav-item:hover {
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
  transform: translateY(-1px);
}

.portal-library-nav-item.is-primary,
.portal-library-nav-item.is-secondary {
  border-color: color-mix(in srgb, var(--library-accent) 30%, rgba(255, 255, 255, 0.06));
  background: linear-gradient(180deg, color-mix(in srgb, var(--library-accent) 16%, transparent), rgba(255, 255, 255, 0.02));
}

.portal-library-nav-item.is-primary {
  color: #fffaf3;
  font-weight: 700;
}

.portal-library-nav-item.is-secondary {
  color: var(--text);
}

.portal-library-nav-icon-wrap {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--library-accent) 18%, transparent), rgba(255, 255, 255, 0.03));
  border: 1px solid color-mix(in srgb, var(--library-accent) 18%, rgba(255, 255, 255, 0.05));
  color: var(--library-accent);
}

.portal-library-sections {
  display: grid;
  gap: 22px;
}

.portal-library-section {
  position: relative;
}

.portal-library-section::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--library-accent), transparent 80%);
  opacity: 0.92;
}

.portal-library-section-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 6px;
}

.portal-library-section-mark {
  width: 112px;
  height: 112px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--library-accent) 20%, transparent), rgba(255, 255, 255, 0.03));
  border: 1px solid color-mix(in srgb, var(--library-accent) 24%, rgba(255, 255, 255, 0.06));
  color: var(--library-accent);
}

.portal-library-section-copy {
  min-width: 0;
}

.portal-library-section-title {
  margin: 0;
  font-family: "Oxanium", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.04;
}

.portal-library-tagline,
.portal-library-quote {
  margin: 0.6rem 0 0;
  color: color-mix(in srgb, var(--library-accent) 70%, var(--text) 30%);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.65;
}

.portal-library-content-block {
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-library-content-block h3 {
  margin: 0;
  font-family: "Oxanium", sans-serif;
  font-size: 1.14rem;
  line-height: 1.2;
}

.portal-library-subtext {
  margin: 0.75rem 0 0;
  color: var(--text-dim);
  line-height: 1.7;
}

.portal-library-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--panel-line);
  background: linear-gradient(180deg, rgba(220, 184, 138, 0.08), rgba(255, 255, 255, 0.02));
}

.portal-library-match {
  margin-top: 1rem;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
}

.portal-library-match p {
  margin: 0;
  font-weight: 700;
}

.portal-library-match.is-primary {
  border-color: color-mix(in srgb, var(--library-accent) 36%, rgba(255, 255, 255, 0.06));
  background: linear-gradient(180deg, color-mix(in srgb, var(--library-accent) 18%, transparent), rgba(255, 255, 255, 0.03));
  color: #fff8ef;
}

.portal-library-match.is-secondary {
  border-color: color-mix(in srgb, var(--library-accent) 20%, rgba(255, 255, 255, 0.06));
  background: linear-gradient(180deg, color-mix(in srgb, var(--library-accent) 10%, transparent), rgba(255, 255, 255, 0.03));
  color: var(--text);
}

.portal-library-personal-link {
  font-weight: 700;
}

.portal-library-footer .portal-card {
  overflow: visible;
}

.portal-pretrade-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.portal-pretrade-item {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.portal-pretrade-legend {
  margin: 0;
  padding: 0;
}

.portal-pretrade-legend h3 {
  margin: 0.55rem 0 0;
  font-family: "Oxanium", sans-serif;
  font-size: 1.02rem;
  line-height: 1.22;
}

.portal-pretrade-legend p {
  margin: 0.7rem 0 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.portal-pretrade-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 1rem;
}

.portal-pretrade-options.is-boolean {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-pretrade-option {
  position: relative;
  min-width: 0;
}

.portal-pretrade-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.portal-pretrade-option-body {
  min-height: 100%;
  display: grid;
  gap: 0.5rem;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  transition: 160ms ease;
}

.portal-pretrade-option:hover .portal-pretrade-option-body {
  border-color: rgba(220, 184, 138, 0.18);
  transform: translateY(-1px);
}

.portal-pretrade-option input:checked + .portal-pretrade-option-body {
  border-color: rgba(220, 184, 138, 0.35);
  background: linear-gradient(180deg, rgba(220, 184, 138, 0.14), rgba(255, 255, 255, 0.03));
  box-shadow: 0 12px 24px rgba(11, 10, 12, 0.22);
}

.portal-pretrade-option-value {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.portal-pretrade-option-label {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.portal-pretrade-option.is-boolean .portal-pretrade-option-body {
  align-content: center;
}

.portal-pretrade-hero {
  overflow: visible;
}

.portal-pretrade-signal {
  margin-top: 1rem;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--pretrade-accent) 30%, rgba(255, 255, 255, 0.06));
  background: linear-gradient(180deg, color-mix(in srgb, var(--pretrade-accent) 16%, transparent), rgba(255, 255, 255, 0.03));
}

.portal-pretrade-signal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pretrade-accent);
  background: color-mix(in srgb, var(--pretrade-accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--pretrade-accent) 28%, rgba(255, 255, 255, 0.06));
}

.portal-pretrade-dot {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.03);
}

.portal-pretrade-subscore .portal-note {
  margin-top: 1rem;
}

.portal-pretrade-driver-card strong {
  color: var(--text);
}

.portal-pretrade-patterns summary {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  cursor: pointer;
}

.portal-pretrade-patterns summary::-webkit-details-marker {
  display: none;
}

.portal-pretrade-summary-title {
  font-family: "Oxanium", sans-serif;
  font-size: 1.16rem;
  line-height: 1.18;
}

.portal-pretrade-pattern-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-pretrade-pattern-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.portal-pretrade-pattern-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 16px;
  min-width: min(340px, 100%);
}

.portal-weekly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.portal-weekly-item {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(62, 148, 138, 0.1), rgba(255, 255, 255, 0.025));
}

.portal-weekly-item.is-text {
  grid-column: 1 / -1;
}

.portal-weekly-legend {
  margin: 0;
  padding: 0;
}

.portal-weekly-legend h3 {
  margin: 0.55rem 0 0;
  font-family: "Oxanium", sans-serif;
  font-size: 1.02rem;
  line-height: 1.22;
}

.portal-weekly-legend p {
  margin: 0.7rem 0 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.portal-weekly-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 1rem;
}

.portal-weekly-option {
  position: relative;
  min-width: 0;
}

.portal-weekly-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.portal-weekly-option-body {
  min-height: 100%;
  display: grid;
  gap: 0.5rem;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  transition: 160ms ease;
}

.portal-weekly-option:hover .portal-weekly-option-body {
  border-color: rgba(62, 148, 138, 0.32);
  transform: translateY(-1px);
}

.portal-weekly-option input:checked + .portal-weekly-option-body {
  border-color: rgba(62, 148, 138, 0.45);
  background: linear-gradient(180deg, rgba(62, 148, 138, 0.22), rgba(255, 255, 255, 0.03));
  box-shadow: 0 12px 24px rgba(11, 10, 12, 0.22);
}

.portal-weekly-option-value {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.portal-weekly-option-label {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.portal-weekly-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 1rem;
}

.portal-weekly-check {
  position: relative;
  min-width: 0;
}

.portal-weekly-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.portal-weekly-check-body {
  min-height: 100%;
  display: grid;
  gap: 0.35rem;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  transition: 160ms ease;
}

.portal-weekly-check:hover .portal-weekly-check-body {
  border-color: rgba(62, 148, 138, 0.32);
  transform: translateY(-1px);
}

.portal-weekly-check input:checked + .portal-weekly-check-body {
  border-color: rgba(62, 148, 138, 0.45);
  background: linear-gradient(180deg, rgba(62, 148, 138, 0.22), rgba(255, 255, 255, 0.03));
  box-shadow: 0 12px 24px rgba(11, 10, 12, 0.22);
}

.portal-weekly-check-title {
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
}

.portal-weekly-check-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.portal-weekly-hero,
.portal-weekly-summary {
  overflow: visible;
}

.portal-weekly-summary summary,
.portal-weekly-history-summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  cursor: pointer;
}

.portal-weekly-summary summary::-webkit-details-marker,
.portal-weekly-history-summary::-webkit-details-marker {
  display: none;
}

.portal-weekly-chart {
  overflow: hidden;
}

.portal-weekly-chart-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 1rem;
}

.portal-weekly-chart-grid {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.portal-weekly-chart-line {
  fill: none;
  stroke: #22c55e;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-weekly-chart-point {
  fill: #f6efe4;
  stroke: #22c55e;
  stroke-width: 2;
}

.portal-weekly-chart-labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 10px;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.portal-scorecard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.portal-scorecard-item {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(191, 123, 82, 0.08), rgba(255, 255, 255, 0.025));
}

.portal-scorecard-item.is-text {
  grid-column: 1 / -1;
}

.portal-scorecard-legend {
  margin: 0;
  padding: 0;
}

.portal-scorecard-legend h3 {
  margin: 0.55rem 0 0;
  font-family: "Oxanium", sans-serif;
  font-size: 1.02rem;
  line-height: 1.22;
}

.portal-scorecard-legend p {
  margin: 0.7rem 0 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.portal-scorecard-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 1rem;
}

.portal-scorecard-options.is-choice {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-scorecard-options.is-boolean {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-scorecard-option {
  position: relative;
  min-width: 0;
}

.portal-scorecard-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.portal-scorecard-option-body {
  min-height: 100%;
  display: grid;
  gap: 0.5rem;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  transition: 160ms ease;
}

.portal-scorecard-option:hover .portal-scorecard-option-body {
  border-color: rgba(191, 123, 82, 0.28);
  transform: translateY(-1px);
}

.portal-scorecard-option input:checked + .portal-scorecard-option-body {
  border-color: rgba(191, 123, 82, 0.4);
  background: linear-gradient(180deg, rgba(191, 123, 82, 0.2), rgba(255, 255, 255, 0.03));
  box-shadow: 0 12px 24px rgba(11, 10, 12, 0.22);
}

.portal-scorecard-option-value {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.portal-scorecard-option-label {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.portal-scorecard-option.is-choice .portal-scorecard-option-body,
.portal-scorecard-option.is-boolean .portal-scorecard-option-body {
  align-content: center;
}

.portal-scorecard-hero {
  overflow: visible;
}

.portal-scorecard-subscore .portal-note {
  margin-top: 1rem;
}

.portal-scorecard-echo-card strong {
  color: var(--text);
}

.portal-scorecard-summary summary {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  cursor: pointer;
}

.portal-scorecard-summary summary::-webkit-details-marker {
  display: none;
}

.portal-field-full {
  grid-column: 1 / -1;
}

.portal-button-small {
  min-height: 38px;
  padding: 0 0.95rem;
  font-size: 0.78rem;
}

.portal-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-check-pill {
  position: relative;
  display: inline-flex;
  min-width: 0;
}

.portal-check-pill input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.portal-check-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-muted);
  transition: 160ms ease;
}

.portal-check-pill:hover span {
  border-color: rgba(220, 184, 138, 0.22);
  transform: translateY(-1px);
}

.portal-check-pill input:checked + span {
  border-color: rgba(220, 184, 138, 0.34);
  background: linear-gradient(180deg, rgba(220, 184, 138, 0.18), rgba(255, 255, 255, 0.03));
  color: var(--text);
}

.portal-domain-list-item {
  align-items: flex-start;
  flex-wrap: wrap;
}

.portal-domain-inline-actions {
  width: 100%;
  justify-content: flex-start;
}

.portal-edge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-height: 38px;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 76, 0.28);
  background: rgba(201, 168, 76, 0.12);
  color: #f5de8d;
  font-size: 0.82rem;
  font-weight: 700;
  transition: 160ms ease;
}

.portal-edge-link:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 168, 76, 0.42);
}

.portal-edge-link.is-compact {
  min-height: 36px;
  padding-inline: 0.82rem;
  font-size: 0.78rem;
}

.portal-edge-link.is-dialogue {
  border-color: rgba(93, 182, 217, 0.28);
  background: rgba(93, 182, 217, 0.12);
  color: #a5e8ff;
}

.portal-edge-hero {
  overflow: visible;
  border-color: rgba(201, 168, 76, 0.16);
  background: linear-gradient(180deg, rgba(201, 168, 76, 0.08), rgba(255, 255, 255, 0.03));
}

.portal-edge-consent-overlay {
  z-index: 40;
}

.portal-edge-consent-modal {
  width: min(680px, 100%);
}

.portal-edge-thread {
  display: grid;
  gap: 14px;
}

.portal-edge-message {
  display: grid;
  gap: 0.55rem;
}

.portal-edge-message.is-user {
  justify-items: end;
}

.portal-edge-message.is-user .portal-edge-message-meta {
  justify-content: flex-end;
}

.portal-edge-message-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.portal-edge-bubble {
  width: min(760px, 100%);
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.035);
}

.portal-edge-message.is-user .portal-edge-bubble {
  border-color: rgba(220, 184, 138, 0.2);
  background: linear-gradient(180deg, rgba(220, 184, 138, 0.12), rgba(255, 255, 255, 0.03));
}

.portal-edge-history-item summary {
  list-style: none;
  cursor: pointer;
}

.portal-edge-history-item summary::-webkit-details-marker {
  display: none;
}

.portal-edge-history-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.portal-session-route {
  min-height: 520px;
  padding-right: 332px;
}

.portal-session-info-card {
  max-width: 760px;
}

.portal-session-panel {
  position: fixed;
  top: 108px;
  right: 28px;
  z-index: 32;
  width: min(300px, calc(100vw - 40px));
  display: grid;
  gap: 0.85rem;
  padding: 16px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 18, 24, 0.96), rgba(8, 10, 16, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
}

.portal-session-collapsed-center {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.portal-session-focus-strip {
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 6px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(250, 250, 249, 0.92);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-session-focus-strip.is-heartbeat {
  animation: portal-session-focus-heartbeat 0.65s ease-out;
}

@keyframes portal-session-focus-heartbeat {
  0%,
  100% {
    transform: scale(1);
    box-shadow: none;
  }
  45% {
    transform: scale(1.03);
    box-shadow: 0 0 14px rgba(201, 168, 76, 0.28);
  }
}

.portal-session-focus-text {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.portal-session-focus-text.is-static {
  cursor: default;
}

.portal-char-count {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: rgba(160, 174, 192, 0.95);
}

.portal-session-panel.is-collapsed {
  width: min(292px, calc(100vw - 40px));
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 12px 14px;
}

.portal-session-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.portal-session-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: grab;
}

.portal-session-metrics,
.portal-session-collapsed-metrics {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.portal-session-collapsed-metrics {
  justify-content: space-between;
}

.portal-session-timer {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  color: var(--text);
}

.portal-session-emotion-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.04);
}

.portal-session-main {
  display: grid;
  gap: 0.7rem;
  transition: opacity 160ms ease;
}

.portal-session-main.is-dimmed {
  opacity: 0.5;
}

.portal-session-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 50px;
  padding: 0 1rem;
  border-radius: 18px;
  border: 1px solid rgba(93, 182, 217, 0.24);
  background: linear-gradient(180deg, rgba(93, 182, 217, 0.2), rgba(93, 182, 217, 0.1));
  color: #eef8ff;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.portal-session-footer {
  padding-top: 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-session-subpanel {
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.035);
}

.portal-session-trade-grid {
  display: grid;
  gap: 0.9rem;
}

.portal-session-trade-head {
  display: grid;
  grid-template-columns: 44px 48px 40px minmax(0, 1fr) 72px;
  gap: 0.75rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-session-trade-row {
  display: grid;
  gap: 0.7rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-session-trade-row:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.portal-session-trade-meta {
  display: grid;
  grid-template-columns: 44px 48px 40px minmax(0, 1fr) 72px;
  gap: 0.75rem;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.portal-session-trade-number {
  color: var(--text);
  font-weight: 800;
}

.portal-session-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-height: 28px;
  border-radius: 999px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.portal-session-status.is-on-plan {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.14);
}

.portal-session-status.is-off-plan {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
}

.portal-session-status.is-untagged {
  color: #a0aec0;
  background: rgba(160, 174, 192, 0.14);
}

.portal-session-tos-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-height: 26px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  justify-self: start;
}
.portal-session-tos-mark.is-clean {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
}
.portal-session-tos-mark.is-dirty {
  color: #f97316;
  background: rgba(249, 115, 22, 0.14);
}
.portal-session-tos-mark.is-pending {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
}

.portal-session-note-form textarea {
  min-height: 74px;
  resize: vertical;
}

.portal-session-overlay {
  display: grid;
  gap: 0.8rem;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(220, 184, 138, 0.14);
  background: linear-gradient(180deg, rgba(220, 184, 138, 0.12), rgba(255, 255, 255, 0.03));
}

.portal-session-overlay.is-sos {
  border-color: rgba(249, 115, 22, 0.24);
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.14), rgba(255, 255, 255, 0.03));
}

.portal-session-overlay.is-end-confirm {
  border-color: rgba(234, 179, 8, 0.22);
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.12), rgba(255, 255, 255, 0.03));
}

.portal-session-panel .portal-session-overlay.is-focus-flash,
.portal-session-panel .portal-session-overlay.is-focus-prominent {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  text-align: center;
  justify-items: center;
}

.portal-session-focus-flash-body,
.portal-session-focus-prominent-body {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fafaf9;
}

.portal-session-overlay.is-focus-prominent .portal-session-focus-prominent-body {
  font-size: 1.12rem;
}

.portal-session-overlay-title {
  margin: 0;
  font-family: "Oxanium", sans-serif;
  font-size: 1.02rem;
  line-height: 1.25;
}

.portal-session-pulse-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.portal-session-pulse-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
}

.portal-session-pulse-button.is-red {
  border-color: rgba(239, 68, 68, 0.18);
  background: rgba(239, 68, 68, 0.1);
}

.portal-session-pulse-button.is-yellow {
  border-color: rgba(234, 179, 8, 0.18);
  background: rgba(234, 179, 8, 0.1);
}

.portal-session-pulse-button.is-green {
  border-color: rgba(34, 197, 94, 0.18);
  background: rgba(34, 197, 94, 0.1);
}

.portal-session-pulse-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.portal-session-sos-grid {
  display: grid;
  gap: 10px;
}

.portal-session-alert-stack {
  display: grid;
  gap: 0.6rem;
}

.portal-session-alert {
  text-align: left;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(234, 179, 8, 0.2);
  background: rgba(234, 179, 8, 0.12);
  color: #f8ebb4;
  font-size: 0.84rem;
  line-height: 1.5;
}

.portal-session-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 1rem;
}

.portal-session-stat {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.portal-session-stat span {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-session-stat strong {
  font-size: 0.98rem;
  line-height: 1.4;
}

.portal-session-timeline {
  display: grid;
  gap: 1rem;
  margin-top: 1.15rem;
}

.portal-session-track {
  display: grid;
  gap: 0.55rem;
}

.portal-session-track-line {
  position: relative;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
}

.portal-session-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  color: #0b0a0c;
  background: #f6efe4;
  box-shadow: 0 0 0 4px rgba(11, 10, 12, 0.2);
}

.portal-session-marker.is-on-plan {
  background: #22c55e;
}

.portal-session-marker.is-off-plan {
  background: #ef4444;
}

.portal-session-marker.is-untagged {
  background: #94a3b8;
}

.portal-session-marker.is-emotion {
  width: 14px;
  height: 14px;
}

.portal-session-marker.is-red {
  background: #ef4444;
}

.portal-session-marker.is-yellow {
  background: #eab308;
}

.portal-session-marker.is-green {
  background: #22c55e;
}

.portal-session-marker.is-skipped {
  background: #718096;
}

.portal-session-marker.is-alert,
.portal-session-marker.is-sos {
  width: 22px;
  height: 22px;
  color: #0b0a0c;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.portal-session-marker.is-alert {
  background: #eab308;
}

.portal-session-marker.is-sos {
  background: #f97316;
}

@media (max-width: 1199px) {
  .portal-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-session-route {
    padding-right: 304px;
  }

  .portal-session-panel {
    right: 20px;
    width: min(280px, calc(100vw - 32px));
  }

  .portal-session-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .portal-shell {
    grid-template-columns: var(--sidebar-width-tablet) minmax(0, 1fr);
  }

  .portal-tablet-toggle {
    display: inline-flex;
  }

  .portal-sidebar {
    padding-inline: 16px;
  }

  .portal-mark {
    justify-content: center;
    padding: 12px 10px;
  }

  .portal-mark-copy,
  .portal-nav-text,
  .portal-context-card {
    display: none;
  }

  .portal-nav-link {
    justify-content: center;
    padding: 14px;
  }

  .portal-sidebar-section {
    padding: 10px;
  }

  .portal-sublinks {
    display: none;
  }

  .portal-sidebar-footer {
    display: none;
  }

  .portal-shell.is-sidebar-open {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .portal-shell.is-sidebar-open .portal-mark {
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .portal-shell.is-sidebar-open .portal-mark-copy,
  .portal-shell.is-sidebar-open .portal-nav-text,
  .portal-shell.is-sidebar-open .portal-context-card {
    display: block;
  }

  .portal-shell.is-sidebar-open .portal-sublinks {
    display: grid;
  }

  .portal-shell.is-sidebar-open .portal-sidebar-footer {
    display: block;
  }

  .portal-shell.is-sidebar-open .portal-nav-link {
    justify-content: flex-start;
    padding: 13px 14px;
  }

  .portal-session-route {
    padding-right: 0;
    padding-bottom: 360px;
  }

  .portal-session-panel {
    top: auto;
    right: 20px;
    bottom: 20px;
  }
}

@media (max-width: 767px) {
  .portal-shell {
    display: block;
  }

  .portal-sidebar {
    display: none;
  }

  .portal-main {
    padding: 20px 16px 116px;
  }

  .portal-topbar {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 18px;
  }

  .portal-topbar-actions {
    width: 100%;
  }

  .portal-subnav {
    gap: 8px;
    overflow: auto;
    padding-bottom: 4px;
  }

  .portal-grid,
  .portal-grid-2,
  .portal-grid-3,
  .portal-dual,
  .portal-library-layout,
  .portal-form-grid,
  .portal-preview-grid,
  .portal-kpi-grid {
    grid-template-columns: 1fr;
  }

  .portal-pretrade-grid,
  .portal-pretrade-options,
  .portal-weekly-grid,
  .portal-weekly-options,
  .portal-weekly-checklist,
  .portal-scorecard-grid,
  .portal-scorecard-options,
  .portal-scorecard-options.is-choice {
    grid-template-columns: 1fr;
  }

  .portal-pretrade-options.is-boolean,
  .portal-pretrade-pattern-metrics,
  .portal-scorecard-options.is-boolean {
    grid-template-columns: 1fr;
  }

  .portal-pretrade-pattern-row {
    flex-direction: column;
  }

  .portal-weekly-summary summary,
  .portal-weekly-history-summary {
    flex-direction: column;
  }

  .portal-library-sidebar {
    position: static;
  }

  .portal-library-nav-shell {
    padding: 0;
    overflow: hidden;
  }

  .portal-library-nav-list {
    display: flex;
    gap: 0;
    overflow: auto;
    padding: 10px;
    scroll-snap-type: x proximity;
  }

  .portal-library-nav-item {
    min-width: max-content;
    scroll-snap-align: start;
    margin-right: 10px;
  }

  .portal-library-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-edge-history-summary,
  .portal-edge-message-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-session-route {
    padding-bottom: 166px;
    min-height: auto;
  }

  .portal-session-panel {
    left: 12px;
    right: 12px;
    bottom: 84px;
    top: auto;
    width: auto;
    max-width: none;
    border-radius: 24px;
  }

  .portal-session-panel.is-collapsed {
    grid-template-columns: auto 1fr auto;
    padding: 10px 12px;
  }

  .portal-session-topbar,
  .portal-session-collapsed-metrics,
  .portal-session-footer .portal-inline-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-session-main,
  .portal-session-pulse-options,
  .portal-session-sos-grid,
  .portal-session-stats {
    grid-template-columns: 1fr;
  }

  .portal-session-trade-head {
    display: none;
  }

  .portal-session-trade-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-session-overlay {
    padding: 12px;
  }

  .portal-session-track-line {
    min-height: 38px;
  }

  .portal-transition-top {
    flex-direction: column;
  }

  .portal-transition-score-row,
  .portal-history-controls {
    grid-template-columns: 1fr;
  }

  .portal-library-section-mark {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }

  .portal-card,
  .portal-details,
  .portal-table-wrap {
    border-radius: 22px;
  }

  .portal-edge-consent-overlay {
    padding: 0;
  }

  .portal-edge-consent-modal {
    min-height: 100vh;
    width: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .portal-mobile-tabbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 24px;
    background: rgba(10, 9, 11, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
  }

  .portal-mobile-link {
    display: grid;
    place-items: center;
    gap: 6px;
    min-height: 62px;
    border-radius: 18px;
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
  }

  .portal-mobile-link.is-active {
    color: var(--text);
    background: rgba(191, 123, 82, 0.14);
  }

  .portal-mobile-link svg {
    width: 19px;
    height: 19px;
  }

  /* Regulate: edge-to-edge tool carousel, no clipped breath ring, readable stacks */
  .portal-regulate-scroll {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    scroll-padding-left: 16px;
    scroll-padding-right: 16px;
  }

  .portal-regulate-card {
    flex: 0 0 min(168px, 78vw);
  }

  .portal-regulate-recent-item {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }

  .portal-regulate-recent-item > span:not(.portal-regulate-card-dur) {
    flex: 1 1 9rem;
    min-width: 0;
    line-height: 1.35;
  }

  .portal-regulate-recent-item .portal-regulate-card-dur {
    margin-left: auto;
  }

  .portal-card.portal-regulate-player {
    overflow: visible;
  }

  .portal-regulate-phase-ring {
    width: min(9.5rem, 48vw);
    height: min(9.5rem, 48vw);
    margin-top: 1rem;
    margin-bottom: 1rem;
    animation-name: regulate-pulse-mobile;
  }

  .portal-regulate-phase-label {
    font-size: 1rem;
  }

  .portal-regulate-phase-count {
    font-size: 1.65rem;
  }

  .portal-regulate-script-text {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    font-size: 0.95rem;
    box-sizing: border-box;
  }

  .portal-regulate-timer {
    font-size: 1.35rem;
  }

  #regulate-detail-card .portal-inline-actions,
  .portal-regulate-player .portal-inline-actions,
  #regulate-complete .portal-inline-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  #regulate-detail-card .portal-inline-actions .portal-button-primary,
  .portal-regulate-player .portal-inline-actions .portal-button-ghost,
  #regulate-complete .portal-inline-actions .portal-button-ghost {
    width: 100%;
    justify-content: center;
  }

  .portal-regulate-suggest {
    border-left: none;
    border-top: 3px solid rgba(96, 165, 250, 0.4);
    padding-left: 0;
    padding-top: 0.85rem;
  }

  #regulate-feedback-grid.portal-check-grid {
    flex-direction: column;
  }

  #regulate-feedback-grid .portal-check-pill {
    width: 100%;
    justify-content: center;
  }

  .portal-regulate-suggest-link {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 0.35rem;
  }
}

.portal-daily-chronology {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.portal-daily-flow-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-line);
  background: var(--panel-muted);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.portal-daily-flow-row:hover {
  border-color: var(--panel-line-strong);
}

.portal-daily-flow-row.is-primary {
  border-color: rgba(191, 123, 82, 0.35);
  box-shadow: 0 0 0 1px rgba(191, 123, 82, 0.12);
}

.portal-daily-flow-row.is-done {
  opacity: 0.88;
}

.portal-daily-flow-row.is-live {
  border-color: rgba(87, 179, 159, 0.45);
  animation: portal-daily-flow-pulse 1.8s ease-in-out infinite;
}

@keyframes portal-daily-flow-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(87, 179, 159, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(87, 179, 159, 0.12);
  }
}

.portal-daily-flow-row-copy {
  min-width: 0;
}

.portal-daily-flow-row-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.portal-daily-flow-row-desc {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.portal-daily-flow-row-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.portal-correlates-form,
.portal-correlates-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-correlates-row:last-child,
.portal-correlates-form .portal-correlates-row:last-child {
  border-bottom: 0;
}

.portal-correlates-row-text {
  flex: 1 1 220px;
  min-width: 0;
}

.portal-correlates-row-label {
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.portal-correlates-row-q {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.portal-correlates-row-control {
  flex: 0 1 auto;
  min-width: min(100%, 280px);
}

.portal-correlates-segment {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.portal-correlates-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.88rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.portal-correlates-chip:hover {
  border-color: rgba(201, 168, 76, 0.45);
}

.portal-correlates-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.portal-correlates-chip input:checked + span,
.portal-correlates-chip:has(input:checked) {
  border-color: rgba(201, 168, 76, 0.85);
  background: rgba(201, 168, 76, 0.12);
}

.portal-correlates-chip span {
  pointer-events: none;
}

.portal-correlates-order-list {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0.75rem 0 0;
}

.portal-correlates-order-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-correlates-order-label {
  flex: 1 1 160px;
  font-weight: 500;
}

.portal-correlates-order-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  flex: 1 1 120px;
}

.portal-correlates-custom-row {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-correlates-nudge.portal-card,
.portal-correlates-banner {
  border-color: rgba(201, 168, 76, 0.25);
}

/* Streaks & Challenges */
.portal-streak-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.2);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
  margin-bottom: 0.5rem;
}

.portal-streak-indicator:hover {
  border-color: rgba(201, 168, 76, 0.45);
  background: rgba(201, 168, 76, 0.12);
}

.portal-streak-fire {
  font-size: 1rem;
  font-weight: 600;
}

.portal-streak-milestone-toast {
  padding: 0.65rem 1rem;
  border-radius: 10px;
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.25);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  animation: streakToastIn 0.4s ease;
}

@keyframes streakToastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.portal-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.portal-cal-header {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  padding: 0.35rem 0;
}

.portal-cal-empty {
  padding: 0.35rem;
}

.portal-cal-day {
  text-align: center;
  padding: 0.45rem 0.25rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
}

.portal-cal-day.is-clean {
  background: rgba(34, 197, 94, 0.18);
  color: #22c55e;
}

.portal-cal-day.is-not-clean {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.portal-cal-day.is-no-trade {
  color: var(--text-dim);
  opacity: 0.5;
}

.portal-cal-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.portal-cal-dot.is-clean { background: rgba(34, 197, 94, 0.5); }
.portal-cal-dot.is-not-clean { background: rgba(239, 68, 68, 0.4); }
.portal-cal-dot.is-no-trade { background: rgba(255, 255, 255, 0.15); }

.portal-progress-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.portal-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(201, 168, 76, 0.7), rgba(201, 168, 76, 1));
  transition: width 0.3s ease;
}

.portal-challenge-card {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.portal-challenge-header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.portal-challenge-available {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-challenge-available:last-child {
  border-bottom: none;
}

.portal-table {
  border-collapse: collapse;
}

.portal-table th,
.portal-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.88rem;
}

.portal-table thead th {
  font-weight: 600;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.portal-table tbody tr:last-child {
  border-bottom: none;
}

/* ─── In-App Notifications ─────────────────────────────── */

.portal-in-app-notif {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  margin-bottom: 0.6rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 0.65rem;
  animation: notifSlideIn 0.25s ease-out;
}

@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.portal-in-app-notif-content {
  flex: 1;
  min-width: 0;
}

.portal-in-app-notif-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary, #fafaf9);
  margin: 0 0 0.15rem;
}

.portal-in-app-notif-body {
  font-size: 0.82rem;
  color: var(--text-dim, #a8a29e);
  margin: 0;
  line-height: 1.35;
}

.portal-in-app-notif-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.portal-in-app-notif-tap {
  background: rgba(99, 102, 241, 0.25);
  color: var(--text-primary, #fafaf9);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 0.4rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.portal-in-app-notif-tap:hover {
  background: rgba(99, 102, 241, 0.4);
}

.portal-in-app-notif-dismiss {
  background: transparent;
  border: none;
  color: var(--text-dim, #a8a29e);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
}

.portal-in-app-notif-dismiss:hover {
  color: var(--text-primary, #fafaf9);
}

/* ─── Notification Settings ────────────────────────────── */

.portal-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.portal-check-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.portal-check-pill:has(input:checked),
.portal-check-pill.is-active {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.45);
}

.portal-check-pill input[type="checkbox"] {
  display: none;
}

/* Radio pills (Regulate, routines, etc.): keep focusable but hide the native control */
.portal-check-pill input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button.portal-check-pill {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.035);
}

@media print {
  .portal-sidebar,
  .portal-topbar,
  .portal-secondary-nav,
  .portal-mobile-nav,
  #correlates-report-print {
    display: none !important;
  }

  #correlates-report-print-root {
    display: block;
  }

  .portal-shell .portal-main {
    padding: 0;
    margin: 0;
  }
}

/* ─── GROUNDING TOOLS LIBRARY ──────────────────────── */

.portal-regulate-cat {
  margin-bottom: 1.5rem;
}
.portal-regulate-cat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--portal-text-primary, #e7e5e4);
  margin-bottom: 0.75rem;
}
.portal-regulate-cat-icon {
  width: 1.1rem;
  height: 1.1rem;
  opacity: 0.7;
}
.portal-regulate-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.portal-regulate-scroll::-webkit-scrollbar {
  height: 4px;
}
.portal-regulate-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
}

.portal-regulate-card {
  flex: 0 0 180px;
  scroll-snap-align: start;
  background: var(--portal-card-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--portal-card-border, rgba(255,255,255,0.06));
  border-radius: 0.75rem;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.portal-regulate-card:hover {
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.portal-regulate-card-icon {
  margin-bottom: 0.4rem;
}
.portal-regulate-icon {
  width: 1.3rem;
  height: 1.3rem;
}
.portal-regulate-card-name {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.3;
}
.portal-regulate-card-dur {
  font-size: 0.78rem;
  opacity: 0.55;
}
.portal-regulate-card-purpose {
  font-size: 0.8rem;
  opacity: 0.65;
  line-height: 1.35;
  margin-top: 0.15rem;
}

.portal-regulate-section {
  margin-top: 1.5rem;
}
.portal-regulate-recent-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--portal-card-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--portal-card-border, rgba(255,255,255,0.06));
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
  margin-top: 0.35rem;
}
.portal-regulate-recent-item:hover {
  border-color: rgba(255,255,255,0.15);
}
.portal-regulate-suggested {
  border-color: rgba(96, 165, 250, 0.25);
}

.portal-regulate-detail-icon {
  width: 2.5rem;
  height: 2.5rem;
}

/* Player */
.portal-regulate-player {
  text-align: center;
}
.portal-regulate-phase-ring {
  width: 160px;
  height: 160px;
  margin: 1.5rem auto;
  border-radius: 50%;
  border: 3px solid rgba(96,165,250,0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: regulate-pulse 4s ease-in-out infinite;
}
@keyframes regulate-pulse {
  0%, 100% { transform: scale(1); border-color: rgba(96,165,250,0.35); }
  50% { transform: scale(1.08); border-color: rgba(96,165,250,0.7); }
}

@keyframes regulate-pulse-mobile {
  0%, 100% { transform: scale(1); border-color: rgba(96, 165, 250, 0.35); }
  50% { transform: scale(1.035); border-color: rgba(96, 165, 250, 0.62); }
}

@media (prefers-reduced-motion: reduce) {
  .portal-regulate-phase-ring {
    animation: none;
  }
}
.portal-regulate-phase-label {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--portal-text-primary, #e7e5e4);
}
.portal-regulate-phase-count {
  font-size: 2rem;
  font-weight: 700;
  color: #60A5FA;
  margin-top: 0.25rem;
}

.portal-regulate-script-text {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.85;
  max-width: 440px;
  margin: 1rem auto;
  min-height: 3em;
  transition: opacity 0.3s;
}
.portal-regulate-timer {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--portal-text-primary, #e7e5e4);
  margin: 0.5rem 0;
}
.portal-regulate-progress {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.5rem;
}
.portal-regulate-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #60A5FA, #818CF8);
  border-radius: 2px;
  transition: width 1s linear;
}

/* Contextual suggestions */
.portal-regulate-suggest {
  border-left: 3px solid rgba(96,165,250,0.4);
  padding-left: 1rem;
}
.portal-regulate-suggest-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.portal-regulate-suggest-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(96,165,250,0.06);
  border: 1px solid rgba(96,165,250,0.15);
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s;
}
.portal-regulate-suggest-link:hover {
  border-color: rgba(96,165,250,0.4);
}

/* Dashboard widget */
.portal-regulate-dash-widget {
  border-top: 2px solid rgba(96,165,250,0.25);
}
.portal-regulate-dash-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  background: rgba(96,165,250,0.06);
  border: 1px solid rgba(96,165,250,0.15);
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  font-size: 0.88rem;
  transition: border-color 0.15s;
  margin-top: 0.35rem;
}
.portal-regulate-dash-link:hover {
  border-color: rgba(96,165,250,0.4);
}

/* Pro pill */
/* .portal-pro-pill removed -- single paid tier, no feature gating */

/* ─── ROUTINE BUILDER ──────────────────────────────── */

.portal-routine-card {
  border-left: 3px solid rgba(96,165,250,0.3);
}
.portal-routine-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.portal-routine-hero-icon {
  width: 2.5rem;
  height: 2.5rem;
}
.portal-routine-name-input {
  font-size: 1.15rem;
  font-weight: 700;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: inherit;
  width: 100%;
}
.portal-routine-name-input:focus {
  outline: none;
  border-color: rgba(96,165,250,0.5);
}

.portal-routine-template-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.portal-routine-template-btn {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem;
  background: var(--portal-card-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--portal-card-border, rgba(255,255,255,0.06));
  border-radius: 0.5rem;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s;
}
.portal-routine-template-btn:hover {
  border-color: rgba(96,165,250,0.3);
}

.portal-routine-type-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.portal-routine-type-option {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.75rem;
  background: var(--portal-card-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--portal-card-border, rgba(255,255,255,0.06));
  border-radius: 0.5rem;
  cursor: pointer;
  transition: border-color 0.15s;
}
.portal-routine-type-option:has(input:checked) {
  border-color: rgba(96,165,250,0.5);
  background: rgba(96,165,250,0.06);
}
.portal-routine-type-option input { margin-right: 0.5rem; }
.portal-routine-type-option span { font-size: 0.85rem; opacity: 0.65; }

.portal-routine-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.8;
}
.portal-routine-step-list li {
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.portal-routine-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.75rem;
  min-height: 2rem;
}
.portal-routine-empty-steps {
  padding: 1rem;
  text-align: center;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 0.5rem;
}

.portal-routine-step {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.4rem;
  background: var(--portal-card-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--portal-card-border, rgba(255,255,255,0.06));
  border-radius: 0.4rem;
  transition: border-color 0.15s, opacity 0.2s;
}
.portal-routine-step.is-dragging { opacity: 0.4; }
.portal-routine-step.is-drag-over { border-color: rgba(96,165,250,0.5); }
.portal-routine-step-handle {
  cursor: grab;
  opacity: 0.35;
  flex: 0 0 auto;
}
.portal-routine-step-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.portal-routine-step-num {
  flex: 0 0 1.3rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.45;
}
.portal-routine-step-name {
  flex: 1;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.portal-routine-step-dur {
  flex: 0 0 auto;
  font-size: 0.78rem;
  opacity: 0.55;
}
.portal-routine-step-actions {
  display: flex;
  gap: 0.15rem;
  flex: 0 0 auto;
}
.portal-button-icon {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.portal-button-icon:hover { opacity: 1; }

.portal-routine-comp-cats {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.portal-routine-cat-details {
  border: 1px solid var(--portal-card-border, rgba(255,255,255,0.06));
  border-radius: 0.5rem;
  overflow: hidden;
}
.portal-routine-cat-summary {
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}
.portal-routine-cat-summary:hover {
  background: rgba(255,255,255,0.03);
}
.portal-routine-comp-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 0.5rem 0.5rem;
}
.portal-routine-comp-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: none;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 0.4rem;
  color: inherit;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.15s;
  text-align: left;
}
.portal-routine-comp-btn:hover {
  border-color: rgba(96,165,250,0.3);
}
/* .is-locked removed -- all components accessible */

/* Modal */
.portal-routine-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.portal-routine-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}
.portal-routine-modal-content {
  position: relative;
  background: var(--portal-card-bg, #1c1917);
  border: 1px solid var(--portal-card-border, rgba(255,255,255,0.08));
  border-radius: 0.75rem;
  padding: 1.5rem;
  max-width: 400px;
  width: 90%;
}

/* Player */
.portal-routine-player {
  text-align: center;
}
.portal-routine-progress-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 0.5rem;
}
.portal-routine-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  flex: 0 0 auto;
}
.portal-routine-progress-dot.is-done {
  background: #22C55E;
}
.portal-routine-progress-dot.is-active {
  background: #60A5FA;
  box-shadow: 0 0 6px rgba(96,165,250,0.4);
}
.portal-routine-progress-line {
  width: 12px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  flex: 0 0 auto;
}

/* Dashboard widget */
.portal-routine-dash-widget {
  border-top: 2px solid rgba(167,139,250,0.25);
}

/* ─── YOUR WHY ─────────────────────────────────────── */

.portal-yourwhy-welcome .portal-yourwhy-intro {
  max-width: 540px;
  margin: 1.5rem auto 0;
  text-align: center;
}
.portal-yourwhy-welcome .portal-yourwhy-intro p {
  margin-bottom: 0.75rem;
  line-height: 1.65;
  color: rgba(250,250,249,0.8);
}

.portal-yourwhy-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.portal-yourwhy-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.2s;
}
.portal-yourwhy-progress-dot.is-done {
  background: #22C55E;
}
.portal-yourwhy-progress-dot.is-active {
  background: #A78BFA;
  box-shadow: 0 0 0 3px rgba(167,139,250,0.25);
}

.portal-yourwhy-section-title {
  text-align: center;
  letter-spacing: 0.06em;
  margin-top: 1rem;
}

.portal-yourwhy-step .portal-yourwhy-intro {
  max-width: 540px;
  margin: 1rem auto 0;
  text-align: center;
}
.portal-yourwhy-step .portal-yourwhy-intro p {
  margin-bottom: 0.65rem;
  line-height: 1.6;
  color: rgba(250,250,249,0.75);
}

.portal-yourwhy-prompt {
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.5;
  margin-top: 1rem;
}
.portal-yourwhy-sub {
  text-align: center;
  margin-top: 0.5rem;
  line-height: 1.5;
  opacity: 0.7;
}

.portal-yourwhy-input-area {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.portal-yourwhy-input-mode {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.35rem;
}
.portal-yourwhy-voice-indicator {
  text-align: center;
  color: #A78BFA;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  animation: yourwhy-pulse 1.5s ease-in-out infinite;
}
@keyframes yourwhy-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.portal-yourwhy-textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #fafaf9;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
}
.portal-yourwhy-textarea:focus {
  outline: none;
  border-color: rgba(167,139,250,0.5);
  box-shadow: 0 0 0 3px rgba(167,139,250,0.12);
}

.portal-yourwhy-anchor-quote {
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.55;
  color: rgba(250,250,249,0.9);
  margin-top: 0.75rem;
}
.portal-yourwhy-anchor-confirm .portal-yourwhy-anchor-quote {
  font-size: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.portal-yourwhy-anchor-card {
  border-top: 2px solid rgba(167,139,250,0.3);
}

.portal-yourwhy-view-field {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.portal-yourwhy-view-field:first-child {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
}
.portal-yourwhy-view-prompt {
  font-size: 0.85rem;
  color: rgba(250,250,249,0.5);
  margin-bottom: 0.35rem;
}
.portal-yourwhy-view-response {
  line-height: 1.65;
  color: rgba(250,250,249,0.85);
  white-space: pre-wrap;
}

.portal-yourwhy-revisit {
  border-left: 3px solid #EAB308;
}

.portal-yourwhy-dash-widget {
  border-top: 2px solid rgba(167,139,250,0.25);
}

.portal-yourwhy-suggest {
  border-left: 3px solid rgba(167,139,250,0.4);
}
.portal-yourwhy-sos-suggest {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 0.75rem;
}
.portal-yourwhy-inline-anchor {
  margin-top: 0.5rem;
  text-align: center;
}

/* ─── CRISIS PROTOCOL ─────────────────────── */
.portal-crisis-welcome .portal-crisis-intro p {
  margin-top: 0.75rem;
  line-height: 1.7;
}
.portal-crisis-day-header {
  text-align: center;
}
.portal-crisis-progress {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.portal-crisis-progress-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--gray-700, #44403c);
  border: 2px solid var(--gray-600, #57534e);
}
.portal-crisis-progress-dot.is-active {
  background: var(--accent, #3b82f6);
  border-color: var(--accent, #3b82f6);
  box-shadow: 0 0 6px var(--accent, #3b82f6);
}
.portal-crisis-progress-dot.is-done {
  background: #22C55E;
  border-color: #22C55E;
}
.portal-crisis-intro p {
  margin-top: 0.6rem;
  line-height: 1.7;
}
.portal-crisis-slider {
  width: 100%;
  margin-top: 0.4rem;
}
.portal-crisis-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--gray-400, #a8a29e);
  margin-top: 0.15rem;
}
.portal-crisis-dashboard {
  border-left: 3px solid #EAB308;
}
.portal-crisis-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.portal-crisis-modal {
  background: var(--surface, #1c1917);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  border: 1px solid var(--gray-700, #44403c);
}
.portal-crisis-modal .portal-crisis-intro p {
  margin-top: 0.6rem;
  line-height: 1.65;
}

/* ─── Proactive Edge Insights ─── */

.portal-insight-dash-card {
  border-left: 4px solid #8B5CF6;
  background: linear-gradient(135deg, rgba(139,92,246,0.04), transparent);
}

.portal-insight-dash-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.portal-insight-dash-text {
  font-style: italic;
  line-height: 1.6;
}

.portal-insight-contextual {
  border-left: 4px solid #8B5CF6;
  background: linear-gradient(135deg, rgba(139,92,246,0.04), transparent);
}

.portal-insight-list-card {
  border-left: 3px solid var(--es-border, #E2E8F0);
  transition: border-color 0.2s;
}
.portal-insight-list-card:hover {
  border-left-color: #8B5CF6;
}

.portal-insight-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-insight-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.portal-insight-status {
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.portal-insight-status.is-surfaced {
  color: #22C55E;
}
.portal-insight-status.is-dismissed {
  color: #94A3B8;
}

#insight-settings .portal-field {
  margin-top: 0.75rem;
}
#insight-settings .portal-helper {
  font-size: 0.78rem;
  color: #94A3B8;
  margin-top: 0.25rem;
}

/* ─── EdgeState Foundations Course ─── */

.portal-course-progress-bar {
  display: flex;
  gap: 0.35rem;
}

.portal-course-dot {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--es-border, #E2E8F0);
  transition: background 0.2s;
}
.portal-course-dot.is-done {
  background: #22C55E;
}
.portal-course-dot.is-current {
  background: #3B82F6;
}

.portal-course-module-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.portal-course-module-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--es-border, #E2E8F0);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.portal-course-module-link:last-child {
  border-bottom: none;
}
.portal-course-module-link:hover {
  background: rgba(59, 130, 246, 0.04);
}
.portal-course-module-link.is-done {
  color: #22C55E;
}
.portal-course-module-link.is-current {
  font-weight: 600;
}

.portal-course-module-num {
  min-width: 1.6rem;
  font-weight: 600;
}

.portal-course-module-dur {
  margin-left: auto;
  font-size: 0.78rem;
  color: #94A3B8;
}

.portal-course-reader {
  position: relative;
}

.portal-course-reader-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #3B82F6, #8B5CF6);
  z-index: 100;
  transition: width 0.1s;
}

.portal-course-header {
  border-bottom: 3px solid #3B82F6;
}

.portal-course-content {
  line-height: 1.75;
}

.portal-course-section {
  margin-bottom: 1.5rem;
}

.portal-course-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.portal-course-para {
  margin-top: 0.65rem;
  line-height: 1.75;
}
.portal-course-para:first-child {
  margin-top: 0;
}

.portal-course-divider {
  border: none;
  border-top: 1px solid var(--es-border, #E2E8F0);
  margin: 2rem 0;
}

.portal-course-reflection {
  border-left: 4px solid #3B82F6;
  padding-left: 1rem;
}

.portal-course-action {
  border-left: 4px solid #22C55E;
  padding-left: 1rem;
}

.portal-course-deeper {
  cursor: pointer;
}
.portal-course-deeper-toggle {
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.portal-course-summary-list {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
}
.portal-course-summary-list li {
  margin-top: 0.35rem;
  font-size: 0.92rem;
}

.portal-course-complete-card {
  border: 2px dashed var(--es-border, #E2E8F0);
}

.portal-course-dash-widget {
  border-left: 4px solid #3B82F6;
}

/* ─── Partner & Family Resources ────────────────── */

.portal-support-recipient-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.portal-support-guide-link {
  display: block;
  text-decoration: none;
  transition: border-color 0.15s;
  cursor: pointer;
}
.portal-support-guide-link:hover {
  border-color: var(--es-accent, #3B82F6);
}

.portal-support-guides-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .portal-support-guides-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.portal-support-faq-item {
  border-bottom: 1px solid var(--es-border, #E2E8F0);
  padding: 0.75rem 0;
}
.portal-support-faq-item:last-child {
  border-bottom: none;
}
.portal-support-faq-q {
  cursor: pointer;
  list-style: none;
  font-size: 0.95rem;
}
.portal-support-faq-q::-webkit-details-marker {
  display: none;
}
.portal-support-faq-item[open] .portal-support-faq-q {
  margin-bottom: 0.25rem;
}

.portal-support-preview {
  background: var(--es-surface, #F8FAFC);
}

.portal-support-supporter-card {
  border-left: 3px solid var(--es-accent, #3B82F6);
}

.portal-support-dash-widget {
  border-left: 4px solid #8B5CF6;
}

.portal-support-invite-explainer {
  padding: 0.75rem;
  background: var(--es-surface, #F8FAFC);
  border-radius: 0.5rem;
  border: 1px solid var(--es-border, #E2E8F0);
}

/* Legal & signup */
.portal-signup-summary-wrap {
  max-height: 11rem;
  overflow-y: auto;
  padding: 0.75rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid var(--es-border, #E2E8F0);
  background: var(--es-surface, #F8FAFC);
  margin-top: 0.5rem;
}
.portal-signup-summary-list {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.9rem;
  color: var(--es-muted, #64748B);
}
.portal-legal-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 0.65rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.portal-legal-check input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}
.portal-legal-footer {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--es-muted, #64748B);
  text-align: left;
}
.portal-legal-footer--center {
  text-align: center;
}
.portal-legal-footer--muted {
  margin-top: 0.65rem;
}
.portal-legal-footer a {
  color: var(--es-accent, #3B82F6);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.portal-legal-footer-sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}
.portal-legal-iframe {
  width: 100%;
  min-height: 70vh;
  border: 1px solid var(--es-border, #E2E8F0);
  border-radius: 0.5rem;
  margin-top: 1rem;
  background: #fff;
}
.portal-legal-settings-link {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}
.portal-crisis-legal-gate .portal-card-copy strong {
  font-weight: 700;
}

/* Stats dashboard */
.portal-stats-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(5, 4, 5, 0.72);
  backdrop-filter: blur(6px);
}
.portal-stats-intro-card {
  max-width: 28rem;
  width: 100%;
}
.portal-stats-disclaimer-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--text-muted, #94a3b8);
  font-size: 0.9rem;
  line-height: 1.5;
}
.portal-stats-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.portal-stats-total {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md, 16px);
  border: 1px solid var(--panel-line, rgba(238, 183, 138, 0.12));
  background: var(--panel-muted, rgba(18, 14, 16, 0.72));
  text-align: center;
}
.portal-stats-total span:first-child {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim, rgba(233, 222, 215, 0.52));
}
.portal-stats-total strong {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.85rem;
  font-weight: 700;
}
.portal-stats-total.is-positive strong {
  color: #4ade80;
}
.portal-stats-total.is-negative strong {
  color: #f87171;
}
.portal-stats-pct {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted, #94a3b8);
}
.portal-stats-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.portal-stats-metric {
  padding: 1rem;
  border-radius: var(--radius-md, 16px);
  border: 1px solid var(--panel-line, rgba(238, 183, 138, 0.12));
  background: var(--bg-soft, #121013);
  text-align: center;
}
.portal-stats-metric span:first-child {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim, rgba(233, 222, 215, 0.52));
}
.portal-stats-metric strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.35rem;
}
.portal-stats-metric small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
}
.portal-stats-secondary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem 1rem;
  margin-top: 0.75rem;
}
.portal-stats-secondary-grid > div span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim, rgba(233, 222, 215, 0.52));
}
.portal-stats-secondary-grid > div strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1rem;
}
.portal-stats-period-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.portal-stats-period-toggles .is-active {
  border-color: var(--copper-bright, #e2a277);
  color: var(--copper-bright, #e2a277);
}
.portal-stats-chart-wrap {
  margin-top: 1rem;
}
.portal-stats-chart {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm, 12px);
  background: var(--bg-soft, #121013);
}
.portal-stats-chart-caption {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
}
.portal-stats-chart-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-dim, rgba(233, 222, 215, 0.52));
}
.portal-stats-dist > div {
  display: grid;
  grid-template-columns: 3.5rem 1fr 2.5rem;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
  font-size: 0.85rem;
}
.portal-stats-bar-track {
  height: 0.55rem;
  border-radius: 999px;
  background: var(--panel-line, rgba(238, 183, 138, 0.12));
  overflow: hidden;
}
.portal-stats-bar {
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
}
.portal-stats-bar.is-win {
  background: #22c55e;
}
.portal-stats-bar.is-loss {
  background: #f87171;
}
.portal-stats-bar.is-be {
  background: #94a3b8;
}
.portal-stats-monthly {
  margin-top: 0.75rem;
}
.portal-stats-month-row {
  display: grid;
  grid-template-columns: 5rem 1fr 5rem;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}
.portal-stats-insight {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm, 12px);
  border: 1px solid var(--panel-line, rgba(238, 183, 138, 0.12));
  background: var(--bg-soft, #121013);
}
.portal-stats-insight p {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.45;
}
.portal-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.portal-stats-table th,
.portal-stats-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--panel-line, rgba(238, 183, 138, 0.12));
}
.portal-stats-table .is-pos {
  color: #4ade80;
}
.portal-stats-table .is-neg {
  color: #f87171;
}
.portal-button-small.is-danger-text {
  color: #f87171;
}
.portal-stats-legal-footer {
  margin-top: 0.5rem;
}

.portal-stats-process-primary {
  border-color: rgba(226, 162, 119, 0.28);
}
.portal-stats-onplan-hero {
  margin-top: 1.25rem;
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius-md, 16px);
  border: 1px solid var(--panel-line-strong, rgba(238, 183, 138, 0.2));
  background: var(--panel, rgba(19, 15, 17, 0.92));
  text-align: center;
}
.portal-stats-onplan-hero > span:first-child {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim, rgba(233, 222, 215, 0.52));
}
.portal-stats-onplan-hero strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 2.35rem;
  font-weight: 700;
  color: var(--copper-bright, #e2a277);
  line-height: 1.1;
}
.portal-stats-onplan-sub {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.45;
}
.portal-stats-process-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.85rem;
  margin-top: 1.15rem;
}
.portal-stats-process-row > div {
  padding: 0.75rem 0.65rem;
  border-radius: var(--radius-sm, 12px);
  border: 1px solid var(--panel-line, rgba(238, 183, 138, 0.12));
  background: var(--bg-soft, #121013);
}
.portal-stats-process-row > div > span:first-child {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim, rgba(233, 222, 215, 0.52));
}
.portal-stats-process-row strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.05rem;
}
.portal-stats-process-row small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.35;
}
.portal-stats-inline-fire {
  font-style: normal;
}
.portal-stats-process-payoff .portal-card-title {
  font-size: 1.15rem;
}
.portal-stats-payoff-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.portal-stats-payoff-col {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md, 16px);
  border: 1px solid var(--panel-line, rgba(238, 183, 138, 0.12));
}
.portal-stats-payoff-col.is-on {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}
.portal-stats-payoff-col.is-off {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}
.portal-stats-payoff-col span:first-child {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
}
.portal-stats-payoff-col strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.35rem;
}
.portal-stats-financial-compact .portal-card-title {
  font-size: 1.05rem;
}
.portal-stats-financial-compact-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 0.65rem 0.85rem;
  margin-top: 0.85rem;
  font-size: 0.82rem;
}
.portal-stats-financial-compact-row > div > span:first-child {
  display: block;
  color: var(--text-dim, rgba(233, 222, 215, 0.52));
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.portal-stats-financial-compact-row strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.98rem;
}
.portal-stats-financial-pnl strong {
  font-size: 1.15rem;
}
.portal-stats-financial-pnl.is-positive strong {
  color: #4ade80;
}
.portal-stats-financial-pnl.is-negative strong {
  color: #f87171;
}
.portal-stats-financial-pnl .portal-stats-pct {
  margin-top: 0.25rem;
  font-size: 0.75rem;
}
.portal-stats-financial-detail .portal-stats-secondary-grid--compact {
  margin-top: 0.65rem;
}
.portal-stats-secondary-grid--compact > div strong {
  font-size: 0.92rem;
}
.portal-stats-tracked-meta {
  margin: 0.25rem 0 0.5rem;
  padding: 0 0.25rem;
  font-size: 0.8rem;
  color: var(--text-dim, rgba(233, 222, 215, 0.52));
}

/* Trading Operating System (TOS) */
.portal-tos-eyebrow,
.portal-tos-section-title {
  font-family: "Azeret Mono", ui-monospace, monospace;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.portal-tos-title {
  font-family: "Oxanium", sans-serif;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--text);
}
.portal-tos-section {
  margin-bottom: 1.25rem;
}
.portal-tos-section .portal-tos-section-title {
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
}
.portal-tos-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0;
}
.portal-tos-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  gap: 0.35rem;
  align-items: start;
}
@media (max-width: 640px) {
  .portal-tos-row {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  .portal-tos-row .portal-tos-drag {
    grid-row: 1 / span 2;
  }
  .portal-tos-row .portal-tos-textarea {
    grid-column: 2;
  }
  .portal-tos-row .portal-tos-row-btn {
    grid-column: 3 / -1;
  }
}
.portal-tos-textarea {
  min-height: 3.25rem;
  resize: vertical;
}
.portal-tos-drag {
  opacity: 0.45;
  padding: 0.35rem;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}
.portal-tos-row-btn.is-danger {
  color: #f87171;
}
.portal-tos-add {
  margin-top: 0.35rem;
}
.portal-tos-toggle-line {
  margin-top: 0.75rem;
}
.portal-tos-switch {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.portal-tos-switch input {
  margin-top: 0.2rem;
}
.portal-tos-mode-card {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
}
.portal-tos-mode-head label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.portal-tos-radio {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.portal-tos-money-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0;
}
.portal-tos-money-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.portal-tos-readonly-kicker {
  font-family: "Oxanium", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}
.portal-tos-readonly-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.portal-tos-readonly-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--panel-line);
}
.portal-tos-readonly-section ul {
  margin: 0.35rem 0 0 1.1rem;
  padding: 0;
}
.portal-tos-readonly-mode {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-line);
  background: rgba(255, 255, 255, 0.02);
}
.portal-tos-readonly-mode h4 {
  margin: 0 0 0.35rem;
  font-family: "Oxanium", sans-serif;
}
.portal-tos-legal {
  margin-top: 1.5rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-dim);
  max-width: 52rem;
}
.portal-tos-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.portal-tos-modal {
  max-width: 24rem;
  text-align: center;
}
.portal-tos-modal h3 {
  margin-top: 0;
}
.portal-tos-dash-banner strong {
  color: var(--gold);
}

.portal-session-mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-line);
  background: rgba(255, 255, 255, 0.02);
}
.portal-session-mode-pill {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-muted);
}
.portal-session-mode-switch {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}
.portal-session-mode-switch select {
  max-width: 11rem;
  font-size: 0.78rem;
}
.portal-pretrade-tos-mode-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.portal-pretrade-tos-mode {
  flex: 1 1 160px;
}
.portal-session-tos-criteria-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.portal-session-tos-cb {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.82rem;
  line-height: 1.35;
}
.portal-session-tos-cb input {
  margin-top: 0.2rem;
}

/* Locked feature preview + upgrade bottom sheet */
.portal-locked-route {
  position: relative;
  padding-bottom: 6rem;
}
.portal-locked-route-hero .portal-details-title {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.portal-bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(2px);
}
.portal-bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 141;
  max-height: min(78vh, 520px);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid var(--panel-line);
  border-bottom: none;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.55);
  padding: 0.35rem 1rem 1.25rem;
  animation: portal-sheet-in 0.28s ease-out;
}
@keyframes portal-sheet-in {
  from {
    transform: translateY(110%);
    opacity: 0.85;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.portal-bottom-sheet-grab {
  display: block;
  width: 2.5rem;
  height: 0.28rem;
  margin: 0.35rem auto 0.75rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}
.portal-bottom-sheet-inner {
  max-width: 32rem;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 0.5rem;
}
.portal-bottom-sheet-title {
  font-family: "Oxanium", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.35rem 0 0.5rem;
  line-height: 1.25;
}
.portal-bottom-sheet-copy {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0;
}
.portal-bottom-sheet-route {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0.65rem 0 0;
}
.portal-bottom-sheet-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  background: linear-gradient(135deg, var(--copper), #a65f2e);
  color: #0a0a0a;
  border: 1px solid rgba(255, 196, 138, 0.35);
  box-shadow: 0 8px 24px rgba(199, 123, 71, 0.35);
}
.portal-bottom-sheet-cta:hover {
  filter: brightness(1.06);
}
.portal-pro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Oxanium", sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  color: #0c0c0c;
  background: linear-gradient(135deg, var(--copper-bright), var(--copper));
  border: 1px solid rgba(255, 255, 255, 0.2);
  vertical-align: middle;
}
.portal-pro-badge--inline {
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.portal-pro-badge--nav {
  margin-left: 0;
  font-size: 0.58rem;
  padding: 0.15rem 0.32rem;
}
.portal-mobile-link span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.portal-pro-badge--tab {
  font-size: 0.55rem;
  padding: 0.12rem 0.28rem;
}
