:root {
  --bg: #ecf3f8;
  --bg-gradient-start: #f3f8fc;
  --bg-gradient-mid: #e7f1f9;
  --bg-gradient-end: #fef5ea;
  --grid: rgba(255, 255, 255, 0.32);
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.78);
  --surface-muted: rgba(245, 251, 255, 0.92);
  --surface-terminal: #0f1722;
  --surface-terminal-muted: rgba(148, 163, 184, 0.12);
  --ink: #0f2130;
  --muted: #5d7486;
  --subtle: #7f94a4;
  --primary: #0d9b8a;
  --primary-ink: #0b4f57;
  --accent: #ff8d3a;
  --border: rgba(15, 33, 48, 0.12);
  --border-strong: rgba(15, 33, 48, 0.18);
  --line-soft: rgba(15, 33, 48, 0.08);
  --shadow: 0 18px 44px rgba(15, 33, 48, 0.12);
  --shadow-lg: 0 24px 70px rgba(15, 33, 48, 0.24);
  --backdrop: rgba(15, 33, 48, 0.42);
  --good-bg: rgba(28, 164, 96, 0.16);
  --good-border: rgba(28, 164, 96, 0.35);
  --good-ink: #0b6a3a;
  --bad-bg: rgba(213, 65, 65, 0.14);
  --bad-border: rgba(213, 65, 65, 0.35);
  --bad-ink: #8a1f1f;
  --warn-ink: #9a6200;
  --radius: 18px;
}

html[data-theme="dark"] {
  --bg: #081019;
  --bg-gradient-start: #081019;
  --bg-gradient-mid: #0b1725;
  --bg-gradient-end: #101c2d;
  --grid: rgba(255, 255, 255, 0.04);
  --surface: rgba(11, 23, 37, 0.86);
  --surface-strong: rgba(15, 28, 45, 0.96);
  --surface-soft: rgba(18, 31, 48, 0.82);
  --surface-muted: rgba(14, 25, 39, 0.92);
  --surface-terminal: #020812;
  --surface-terminal-muted: rgba(148, 163, 184, 0.12);
  --ink: #edf5fb;
  --muted: #a6bac8;
  --subtle: #7f94a4;
  --primary: #2cd5c4;
  --primary-ink: #8ff1e8;
  --accent: #ffb15f;
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(148, 163, 184, 0.24);
  --line-soft: rgba(148, 163, 184, 0.12);
  --shadow: 0 22px 54px rgba(2, 8, 18, 0.48);
  --shadow-lg: 0 28px 84px rgba(2, 8, 18, 0.62);
  --backdrop: rgba(2, 8, 18, 0.68);
  --good-bg: rgba(34, 197, 94, 0.15);
  --good-border: rgba(34, 197, 94, 0.32);
  --good-ink: #6de2a1;
  --bad-bg: rgba(248, 113, 113, 0.14);
  --bad-border: rgba(248, 113, 113, 0.26);
  --bad-ink: #ffb2b2;
  --warn-ink: #ffd07a;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
}

html.tour-open {
  scroll-behavior: auto;
}

body {
  position: relative;
  font-family: Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(145deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 42%, var(--bg-gradient-end) 100%);
  transition: background 0.24s ease, color 0.24s ease;
}

body.modal-open {
  overflow: hidden;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 35;
  background: var(--backdrop);
}

.mobile-menu-head,
.mobile-menu-foot {
  display: none;
}

body.menu-open .product-header {
  z-index: 70;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.bg-orb {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(88px);
  opacity: 0.34;
  pointer-events: none;
  z-index: -2;
}

.orb-a {
  background: #66e6d8;
  top: -220px;
  left: -140px;
}

.orb-b {
  background: #ffce75;
  bottom: -240px;
  right: -120px;
}

html[data-theme="dark"] .orb-a {
  background: rgba(26, 188, 156, 0.5);
}

html[data-theme="dark"] .orb-b {
  background: rgba(255, 177, 95, 0.42);
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.42;
  z-index: -3;
  pointer-events: none;
}

.app-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 22px 22px 44px;
}

.product-header {
  position: sticky;
  top: 10px;
  z-index: 15;
  margin-bottom: 12px;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
}

.brand-logo-image {
  display: block;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 5px 12px rgba(3, 35, 45, 0.2));
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  flex-shrink: 0;
}

.kicker {
  margin: 0 0 8px;
  color: var(--primary-ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

html[data-theme="dark"] .kicker {
  color: var(--primary-ink);
}

.brand h1,
.detail-hero-copy h2,
.section-copy h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.brand h1 {
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.04;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead,
.section-text,
.feature-card p,
.about-point p,
.footer-copy,
.status-log {
  color: var(--muted);
}

.lead {
  margin: 8px 0 0;
  max-width: 760px;
  font-size: 13px;
  line-height: 1.6;
}

.menu-toggle {
  display: none;
  min-height: 44px;
  min-width: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  cursor: pointer;
}

.product-nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
}

.product-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-link,
.footer-link {
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  font-size: 14px;
  font-weight: 600;
}

.nav-link:hover,
.footer-link:hover {
  background: rgba(13, 155, 138, 0.1);
  color: var(--primary-ink);
}

.top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.guest-login-button {
  min-height: 38px;
  padding: 8px 15px;
}

#features,
#about,
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: 1px 620px;
}

.switch-cluster {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.language-switch,
.theme-switch {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.lang-btn,
.theme-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 10px;
  min-height: 34px;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
}

.lang-btn.active,
.theme-btn.active {
  background: linear-gradient(140deg, var(--primary), var(--primary-ink));
  color: #ffffff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  min-height: 34px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-soft));
  color: var(--primary-ink);
}

.status-pill.muted {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--muted);
}

.status-pill.good {
  border-color: var(--good-border);
  background: var(--good-bg);
  color: var(--good-ink);
}

.status-pill.bad {
  border-color: var(--bad-border);
  background: var(--bad-bg);
  color: var(--bad-ink);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
}

.status-strip {
  margin-bottom: 16px;
  padding: 12px;
}

.status-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.status-stat {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.status-stat-label {
  color: var(--muted);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 11px;
}

.status-stat strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.feature-section {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.section-copy {
  display: grid;
  gap: 8px;
}

.section-copy h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-text {
  margin: 0;
  max-width: 840px;
  font-size: 14px;
  line-height: 1.7;
}

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

.feature-card {
  min-height: 220px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.feature-card h3,
.footer-col h3 {
  margin: 0;
  font-size: 18px;
}

.feature-card p,
.about-point p,
.footer-copy {
  margin: 0;
  line-height: 1.7;
  font-size: 13px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary) 14%, var(--surface-soft));
  color: var(--primary-ink);
  font-weight: 800;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.panel h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.muted-text,
.inline-note {
  color: var(--muted);
  font-size: 12px;
}

.accordion-panel {
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
}

.accordion-title-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.accordion-title {
  font-size: 18px;
  font-weight: 700;
}

.accordion-side {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.accordion-summary {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accordion-icon {
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.accordion-panel.collapsed .accordion-icon {
  transform: rotate(-180deg);
}

.filter-panel {
  margin-bottom: 16px;
  position: relative;
  z-index: 25;
  overflow: visible;
}

.filter-panel .accordion-content,
.filter-panel .filter-grid,
.filter-panel .field {
  overflow: visible;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.field select,
.field input {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 10px 11px;
  min-height: 44px;
  font-size: 13px;
}

.field input:focus,
.field select:focus,
.ticker-suggestion:focus,
.lang-btn:focus,
.theme-btn:focus,
.nav-link:focus,
.footer-link:focus,
.segmented-btn:focus,
.btn-primary:focus,
.btn-ghost:focus,
.menu-toggle:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 68%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

.ticker-combobox {
  position: relative;
  z-index: 35;
}

.ticker-combobox:focus-within {
  z-index: 80;
}

.ticker-suggestions {
  position: absolute;
  inset: calc(100% + 8px) 0 auto 0;
  z-index: 999;
  min-width: min(360px, 86vw);
  max-height: 284px;
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-lg);
  padding: 8px;
}

.ticker-suggestion-title {
  padding: 6px 8px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ticker-suggestion {
  width: 100%;
  min-height: 42px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.ticker-suggestion:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.ticker-suggestion small {
  color: var(--primary-ink);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.action-cell {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.btn-primary,
.btn-ghost {
  border-radius: 12px;
  border: none;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: linear-gradient(140deg, var(--primary), var(--primary-ink));
  color: #ffffff;
  padding: 11px 14px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(11, 79, 87, 0.28);
}

.btn-ghost {
  background: var(--surface-soft);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 9px 13px;
}

.btn-ghost:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.btn-primary:disabled,
.btn-ghost:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-strong);
  padding: 14px;
}

.metric-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.metric-value {
  margin-top: 8px;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.layout,
.detail-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-view {
  display: grid;
  gap: 14px;
}

.detail-hero {
  display: grid;
  gap: 14px;
}

.detail-back-row {
  display: flex;
  justify-content: flex-start;
}

.detail-hero-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.detail-hero-copy {
  flex: 1;
  min-width: 0;
}

.detail-hero-copy h2 {
  font-size: clamp(24px, 3.2vw, 34px);
}

.detail-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.btn-back-apple {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary-ink);
  font-weight: 700;
  cursor: pointer;
}

.btn-back-apple::before {
  content: "‹";
  font-size: 24px;
  line-height: 1;
  transform: translateY(-1px);
}

.btn-back-apple:hover {
  color: var(--primary);
}

.detail-panel {
  min-height: 620px;
}

.history-panel,
.forecast-panel {
  min-height: 320px;
}

.history-panel.collapsed,
.forecast-panel.collapsed {
  min-height: 0;
}

.data-surface .table-wrap {
  margin-top: 10px;
}

.table-wrap {
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  overflow: auto;
  max-height: 420px;
  background: var(--surface-strong);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

thead th {
  position: sticky;
  top: 0;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  padding: 10px;
  text-align: left;
  color: var(--subtle);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody td {
  border-bottom: 1px solid var(--line-soft);
  padding: 9px 10px;
  white-space: nowrap;
}

tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--primary) 4%, transparent);
}

tbody tr:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

tbody tr.is-clickable-row {
  cursor: pointer;
}

tbody tr.is-clickable-row:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 42%, transparent);
  outline-offset: -2px;
}

.mini-chart {
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface-strong), color-mix(in srgb, var(--surface-soft) 88%, transparent));
  height: 190px;
  padding: 10px;
  margin-top: 10px;
}

.mini-chart svg {
  width: 100%;
  height: 100%;
}

.mini-chart path.line {
  fill: none;
  stroke-width: 2.4;
}

.mini-chart path.area {
  opacity: 0.18;
}

.mini-chart circle {
  r: 2.4;
}

.chart-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.forecast-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.forecast-pill,
.metric-chip {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
}

.chart-ticker-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface-strong));
  color: var(--primary-ink);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.metric-chip.strong {
  color: var(--primary-ink);
}

.segmented-control {
  display: none;
  gap: 8px;
  margin-bottom: 12px;
}

.segmented-btn {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.segmented-btn.active {
  background: linear-gradient(140deg, var(--primary), var(--primary-ink));
  color: #ffffff;
  border-color: transparent;
}

.card-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.data-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-strong);
  padding: 12px;
  box-shadow: 0 8px 24px rgba(15, 33, 48, 0.06);
}

html[data-theme="dark"] .data-card {
  box-shadow: 0 8px 24px rgba(2, 8, 18, 0.24);
}

.data-card-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.data-card-head {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}

.data-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.data-card-grid span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.data-card-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.overview-trust-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.overview-card-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.overview-card-ticker {
  font-size: 21px;
  letter-spacing: -0.025em;
}

.overview-card-action {
  color: var(--primary-ink);
  font-size: 20px;
  font-weight: 800;
}

.overview-probability {
  display: grid;
  gap: 3px;
}

.overview-probability span,
.overview-card-facts span,
.overview-card-facts small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.overview-probability strong {
  color: var(--primary-ink);
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.overview-card-facts {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 10px;
}

.overview-card-facts > div {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
}

.overview-card-facts strong,
.overview-card-facts small {
  display: block;
  overflow-wrap: anywhere;
}

.overview-card-facts strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.overview-card-facts small {
  margin-top: 4px;
}

.overview-volume-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
}

.overview-volume-strip > div {
  min-width: 0;
}

.overview-volume-strip span,
.overview-volume-strip strong {
  display: block;
  overflow-wrap: anywhere;
}

.overview-volume-strip span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.overview-volume-strip strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.ticker-badge {
  border-radius: 999px;
  padding: 4px 8px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary-ink);
  font-size: 11px;
  font-weight: 700;
}

.empty-state {
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
}

.dashboard-error-state .btn-ghost {
  justify-self: start;
  margin-top: 8px;
}

.about-panel {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: clamp(24px, 4vw, 46px);
  background:
    radial-gradient(circle at 88% 8%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 32%),
    var(--surface-strong);
}

.about-copy {
  max-width: 980px;
}

.about-supporting-note {
  max-width: 920px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.about-actions,
.company-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.about-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.about-point {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: var(--surface-strong);
}

.about-point strong {
  display: block;
  margin-bottom: 8px;
}

.system-panel {
  margin-top: 14px;
}

.status-log {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.status-log.ok {
  color: var(--good-ink);
}

.status-log.warn {
  color: var(--warn-ink);
}

.status-log.err {
  color: var(--bad-ink);
}

.site-footer {
  margin-top: 18px;
  display: grid;
  gap: 24px;
  padding: clamp(24px, 4vw, 42px);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(150px, 1fr));
  gap: clamp(18px, 3vw, 42px);
}

.footer-brand,
.footer-col {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 999px;
}

.footer-brand h3,
.footer-col h3 {
  margin: 0;
  font-size: 15px;
}

.footer-link,
.footer-copy {
  padding-left: 0;
  justify-self: start;
  text-align: left;
  font-size: 13px;
  line-height: 1.65;
}

a.footer-link {
  color: var(--muted);
  text-decoration: none;
}

a.footer-link:hover,
a.footer-link:focus-visible,
.footer-link:hover,
.footer-link:focus-visible {
  color: var(--primary-ink);
}

.footer-legal-link {
  margin-top: 2px;
  color: var(--primary-ink);
  font-weight: 700;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.footer-bottom-block {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.footer-bottom-block strong {
  color: var(--ink);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--backdrop);
  backdrop-filter: blur(6px);
  /* Keep every dialog above the sticky header, filter and ticker suggestions. */
  z-index: 2000;
}

.modal-card {
  width: min(78vw, 1380px);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 22px;
}

.modal-wide {
  max-height: min(82vh, calc(100dvh - 40px));
  overflow: auto;
  overscroll-behavior: contain;
}

.modal-confirm {
  width: min(620px, 100%);
}

.company-modal-card,
.legal-modal-card {
  width: min(920px, 100%);
  max-height: min(84vh, calc(100dvh - 40px));
  overflow: auto;
  overscroll-behavior: contain;
}

.company-modal-hero {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.company-modal-hero > p,
.company-modal-section > p,
.company-capability-card p,
.legal-list p,
.legal-modal-intro {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.company-modal-statement {
  padding: 14px 16px;
  border-left: 3px solid var(--primary);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--ink) !important;
  font-weight: 650;
}

.company-capability-grid,
.legal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.company-capability-card,
.legal-list section,
.company-modal-section {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-strong) 90%, var(--primary) 10%);
}

.company-capability-card {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.company-capability-card h3,
.company-modal-section h3,
.legal-list h3 {
  margin: 0;
  font-size: 15px;
}

.company-capability-icon {
  color: var(--primary-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.company-modal-section {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 18px;
}

.company-contact-actions {
  margin-top: 18px;
}

.legal-modal-intro {
  margin: 14px 0;
}

.legal-list section {
  padding: 16px;
}

.legal-list {
  gap: 12px;
}

.legal-list section {
  display: grid;
  gap: 8px;
}

.modal-head {
  margin-bottom: 8px;
}

.modal-copy {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.modal-copy:last-child {
  margin-bottom: 0;
}

.modal-chart {
  height: 240px;
}

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

.modal-panel {
  padding: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.modal-primary-action {
  display: grid;
  gap: 6px;
}

.quick-view-more-note {
  max-width: 420px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.quick-waitlist-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: min(520px, 100%);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}

.quick-waitlist-consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: #7a4bc2;
}

.quick-waitlist-button {
  min-width: min(320px, 100%);
}

.quick-waitlist-message {
  max-width: 520px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.detail-chart {
  height: 320px;
}

@media (max-width: 1120px) {
  .feature-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 1024px) {
  .app-shell {
    padding: 18px 16px 34px;
  }

  .header-row {
    flex-wrap: wrap;
  }

  .product-nav-shell {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .layout,
  .detail-layout,
  .about-points,
  .footer-bottom {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 768px) {
  .app-shell {
    padding: 14px 10px 24px;
  }

  .product-header {
    top: 8px;
  }

  .header-row {
    align-items: center;
    gap: 12px;
    padding: 12px;
    flex-wrap: nowrap;
  }

  .brand {
    gap: 12px;
    width: auto;
    min-width: 0;
    flex: 1;
    order: 2;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .brand h1 {
    font-size: 20px;
  }

  .menu-toggle {
    order: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    font-size: 22px;
    position: relative;
    z-index: 65;
  }

  .product-nav-shell {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    align-content: start;
    width: 100vw;
    min-height: 100dvh;
    margin: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 18px) 22px calc(env(safe-area-inset-bottom, 0px) + 24px);
    border-top: none;
    background: var(--surface-strong);
    box-shadow: none;
    transform: translateY(-104%);
    transition: transform 0.26s cubic-bezier(0.2, 0.75, 0.2, 1);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .product-nav-shell.open {
    transform: translateY(0);
  }

  .mobile-menu-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0 28px;
  }

  .mobile-menu-head > div {
    display: grid;
    gap: 8px;
  }

  .mobile-menu-logo {
    width: 52px;
    height: 52px;
    margin-bottom: 4px;
    border-radius: 999px;
  }

  .mobile-menu-head strong {
    font-size: clamp(25px, 8vw, 36px);
    letter-spacing: -0.035em;
  }

  .mobile-menu-kicker {
    color: var(--primary-ink);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
  }

  .mobile-menu-close {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--ink);
    background: var(--surface-soft);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
  }

  .product-nav,
  .top-actions,
  .switch-cluster {
    width: 100%;
  }

  .product-nav {
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border);
  }

  .nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 62px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 14px 2px;
    background: transparent;
    color: var(--ink);
    font-size: clamp(21px, 6vw, 29px);
    font-weight: 700;
    letter-spacing: -0.025em;
  }

  .product-nav .nav-link::after {
    content: "→";
    color: var(--muted);
    font-size: 30px;
    font-weight: 400;
  }

  .top-actions {
    flex-direction: column;
    align-items: stretch;
    padding-top: 22px;
  }

  .status-pill,
  .language-switch,
  .theme-switch {
    width: 100%;
    justify-content: center;
  }

  .mobile-menu-foot {
    align-self: end;
    display: grid;
    gap: 7px;
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
  }

  .mobile-menu-foot strong {
    color: var(--ink);
    font-size: 15px;
  }

  .status-strip {
    padding: 10px;
  }

  .status-strip-grid {
    grid-template-columns: 1fr 1fr;
  }

  .panel {
    padding: 16px;
  }

  .accordion-trigger {
    cursor: pointer;
  }

  .accordion-content {
    padding-top: 12px;
  }

  .filter-grid {
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
  }

  .filter-grid > *,
  .filter-grid .field,
  .filter-grid .ticker-combobox,
  .filter-grid input,
  .filter-grid select,
  .filter-grid button,
  .filter-grid .status-pill {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .filter-grid input[type="date"] {
    display: block;
    -webkit-appearance: none;
    appearance: none;
  }

  .filter-grid input[type="date"]::-webkit-date-and-time-value {
    min-width: 0;
    text-align: left;
  }

  .action-cell {
    justify-content: stretch;
  }

  .action-cell .status-pill,
  .action-cell .btn-primary {
    width: 100%;
  }

  .mini-chart {
    height: 160px;
    padding: 8px;
  }

  .detail-hero-main {
    flex-direction: column;
  }

  .detail-hero-actions {
    width: 100%;
    justify-content: stretch;
  }

  .detail-hero-actions .btn-primary,
  .detail-hero-actions .btn-ghost {
    width: 100%;
  }

  .segmented-control {
    display: flex;
  }

  .data-card-grid,
  .feature-grid,
  .footer-grid,
  .about-points {
    grid-template-columns: 1fr;
  }

  .forecast-pill,
  .metric-chip {
    font-size: 10px;
    padding: 6px 9px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal-card {
    width: 100%;
    max-width: none;
    border-radius: 24px 24px 0 0;
    padding: 16px;
  }

  .modal-wide {
    height: min(100dvh, 100vh);
    max-height: none;
    overflow: auto;
  }

  .company-modal-card,
  .legal-modal-card {
    max-height: min(92dvh, 92vh);
  }

  .company-capability-grid,
  .legal-list {
    grid-template-columns: 1fr;
  }

  .about-actions,
  .company-contact-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .about-actions .btn-primary,
  .about-actions .btn-ghost,
  .company-contact-actions .btn-primary,
  .company-contact-actions .btn-ghost {
    width: 100%;
  }

  .modal-head,
  .modal-actions {
    position: sticky;
    background: var(--surface-strong);
    z-index: 1;
  }

  .modal-head {
    top: 0;
    padding-bottom: 10px;
  }

  .modal-actions {
    bottom: 0;
    margin-top: 18px;
    padding-top: 12px;
    flex-direction: column;
  }

  .modal-actions .btn-primary,
  .modal-actions .btn-ghost {
    width: 100%;
  }

  .modal-primary-action {
    width: 100%;
  }

  .modal-chart,
  .detail-chart {
    height: 200px;
  }

  .modal-panel,
  .detail-panel {
    min-height: auto;
    padding: 14px;
  }

  .site-footer {
    gap: 14px;
  }
}

@media (min-width: 769px) {
  .header-row {
    gap: 10px;
    padding: 8px 12px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .brand h1 {
    font-size: clamp(18px, 1.8vw, 23px);
    white-space: nowrap;
  }

  .brand-subtitle {
    margin-top: 2px;
    font-size: 9px;
  }

  .nav-link {
    padding: 7px 8px;
    font-size: 12px;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .btn-ghost,
  .top-actions .btn-primary,
  .top-actions .status-pill {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 11px;
  }
}

@media (min-width: 769px) and (max-width: 1120px) {
  .header-row {
    align-items: center;
    flex-wrap: wrap;
  }

  .brand {
    flex: 1 1 100%;
  }

  .product-nav-shell {
    width: 100%;
    flex-direction: row;
    align-items: center;
  }

  .product-nav,
  .top-actions {
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  html {
    scroll-padding-top: 92px;
  }

  .brand {
    width: auto;
    flex: 1;
  }

  .brand h1 {
    font-size: 22px;
  }

  .status-strip-grid,
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .metric-card,
  .status-stat {
    padding: 10px;
  }

  .metric-label {
    font-size: 11px;
  }

  .metric-value {
    font-size: 20px;
  }

  .theme-btn,
  .lang-btn {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* TOS v3.1 local authentication and entitlement UI */
body.auth-locked {
  overflow: hidden;
}

body.auth-locked .app-shell {
  filter: blur(8px);
  opacity: 0.3;
  pointer-events: none;
  user-select: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px);
}

.auth-gate[hidden] {
  display: none;
}

.auth-card {
  position: relative;
  width: min(620px, 100%);
  padding: 28px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.auth-card h1 {
  margin: 8px 0 10px;
  font-size: clamp(25px, 4vw, 34px);
}

.auth-brand-center {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.auth-brand-center .kicker,
.auth-brand-center h1 {
  margin: 0;
}

.auth-brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 999px;
}

.auth-copy-centered,
.auth-promo-note {
  text-align: center;
}

.auth-promo-note {
  margin: -2px auto 0;
  max-width: 480px;
  color: var(--primary-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.auth-text-button {
  justify-self: center;
  border: 0;
  padding: 6px 10px;
  color: var(--primary-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.auth-register-button {
  width: 100%;
}

.auth-register-view,
.auth-registration-success {
  margin-top: 16px;
}

.auth-register-view[hidden],
.auth-registration-success[hidden] {
  display: none;
}

.auth-register-head {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  text-align: center;
}

.auth-register-head h2,
.auth-register-head p {
  margin: 0;
}

.auth-register-head > p:last-child {
  color: var(--muted);
  font-size: 12px;
}

.auth-register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.plan-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.plan-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 800;
}

.plan-choice {
  position: relative;
  min-width: 0;
}

.plan-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-choice span {
  display: grid;
  gap: 5px;
  min-height: 98px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
  cursor: pointer;
}

.plan-choice small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.plan-choice input:checked + span {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
  background: color-mix(in srgb, var(--primary) 9%, var(--surface-strong));
}

.pro-waitlist-box {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, #8759d5 45%, var(--border));
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, #8759d5 12%, var(--surface-strong)), var(--surface-strong));
}

.pro-waitlist-box[hidden] {
  display: none;
}

.pro-waitlist-box h3,
.pro-waitlist-box p {
  margin: 0;
}

.waitlist-badge {
  color: #8759d5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.waitlist-consent-copy {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.waitlist-join-button {
  justify-self: start;
}

.waitlist-join-button[aria-pressed="true"] {
  color: #fff;
  border-color: #8759d5;
  background: #7440b5;
}

.auth-registration-success {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.auth-registration-success h2,
.auth-registration-success p,
.auth-registration-success small {
  margin: 0;
}

.auth-registration-success small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-registration-home {
  width: min(100%, 420px);
  margin-top: 6px;
}

.auth-success-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 50%;
  color: white;
  background: var(--primary);
  font-size: 28px;
  font-weight: 900;
}

.auth-copy,
.auth-consent-note,
.auth-local-note {
  color: var(--text-muted);
}

.auth-consent-note,
.auth-local-note {
  margin: 18px 0 0;
  font-size: 12px;
}

.auth-consent-note {
  line-height: 1.55;
}

.auth-login-options {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.auth-login-options[hidden] {
  display: none;
}

.auth-google-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 16px;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  background: var(--surface-strong);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.auth-google-button:hover {
  border-color: #4285f4;
  box-shadow: 0 8px 24px color-mix(in srgb, #4285f4 18%, transparent);
  transform: translateY(-1px);
}

.auth-google-button:focus-visible {
  outline: 3px solid color-mix(in srgb, #4285f4 32%, transparent);
  outline-offset: 2px;
}

.auth-google-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.auth-google-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}

.auth-divider[hidden],
.auth-form[hidden],
.auth-secondary-actions[hidden] {
  display: none;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}

.auth-form input,
.admin-users-table input,
.admin-users-table select {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--text);
  background: var(--surface-strong);
}

.auth-secondary-actions {
  display: flex;
  gap: 10px;
}

.auth-gate-logout {
  margin-top: 18px;
}

.auth-retry {
  margin-top: 16px;
}

.auth-message {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--text-muted);
}

.auth-message[data-tone="err"] {
  color: #e05252;
}

.auth-message[data-tone="ok"] {
  color: #0d9b8a;
}

.user-account {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-email {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-muted);
}

#user-plan-badge[data-plan="admin"] {
  color: #fff;
  border-color: #a56be8;
  background: #7440b5;
}

#user-plan-badge[data-plan="pro"] {
  color: #fff;
  border-color: #0d9b8a;
  background: #0d9b8a;
}

#user-plan-badge[data-plan="plus"] {
  color: #063d39;
  border-color: #61d8cb;
  background: #9cebe3;
}

.feature-lock-card {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: clamp(24px, 5vw, 48px);
  border: 1px dashed color-mix(in srgb, var(--primary) 44%, var(--border));
  border-radius: 18px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--primary) 13%, transparent), transparent 64%), var(--surface-soft);
}

.feature-lock-card[hidden] {
  display: none;
}

.feature-lock-card h3,
.feature-lock-card p {
  margin: 8px 0 0;
  max-width: 620px;
}

.feature-lock-card p {
  color: var(--muted);
  line-height: 1.6;
}

.feature-lock-card .btn-primary {
  margin-top: 18px;
}

.feature-lock-badge {
  color: var(--primary-ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.feature-lock-pro {
  border-color: color-mix(in srgb, #8759d5 50%, var(--border));
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, #8759d5 16%, transparent), transparent 64%), var(--surface-soft);
}

.journey-backdrop,
.product-tour {
  position: fixed;
  inset: 0;
  z-index: 5000;
}

.journey-backdrop[hidden],
.product-tour[hidden] {
  display: none;
}

.journey-backdrop {
  display: grid;
  place-items: center;
  padding: 5dvh 5vw;
  overflow: hidden;
  background: rgba(12, 27, 42, 0.58);
  backdrop-filter: blur(18px);
}

.journey-card {
  position: relative;
  display: grid;
  align-content: center;
  width: min(980px, 90vw);
  height: min(760px, 90dvh);
  max-height: 90dvh;
  overflow: hidden;
  padding: clamp(18px, 3.5vw, 42px);
  border: 1px solid rgba(90, 188, 174, 0.34);
  border-radius: clamp(22px, 3vw, 34px);
  color: #13243a;
  background:
    radial-gradient(circle at 8% 8%, rgba(116, 232, 197, 0.72), transparent 36%),
    radial-gradient(circle at 92% 12%, rgba(188, 157, 255, 0.62), transparent 40%),
    linear-gradient(145deg, #f5fffc 0%, #edf7ff 50%, #f7f1ff 100%);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.46);
}

.journey-card h2 {
  max-width: 760px;
  margin: clamp(7px, 1.2dvh, 12px) 0 clamp(9px, 1.8dvh, 18px);
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.journey-card > p:not(.kicker) {
  max-width: 760px;
  margin-block: clamp(5px, 1dvh, 10px);
  color: #435a70;
  font-size: clamp(13px, 1.5vw, 16px);
  line-height: 1.5;
}

.journey-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(8px, 1.5dvh, 14px);
}

.journey-tab-title {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(35, 123, 136, 0.24);
  border-radius: 999px;
  color: #0a5963;
  background: rgba(255, 255, 255, 0.62);
  font-size: clamp(12px, 1.6vw, 15px);
  font-weight: 900;
}

.journey-mark {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  margin: 0;
  border-radius: 999px;
}

.journey-principle {
  display: grid;
  grid-template-columns: 1fr auto 1.45fr auto 1fr;
  align-items: center;
  gap: clamp(7px, 1.2vw, 12px);
  margin: clamp(10px, 2dvh, 20px) 0;
  padding: clamp(11px, 1.7vw, 16px);
  border: 1px solid rgba(40, 132, 137, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.journey-principle span {
  font-weight: 800;
  font-size: clamp(12px, 1.5vw, 15px);
  line-height: 1.35;
}

.journey-principle b {
  color: #0a9c8d;
}

.journey-closing {
  font-weight: 700;
}

.journey-start {
  justify-self: start;
  min-height: clamp(44px, 6dvh, 52px);
  margin-top: clamp(6px, 1dvh, 10px);
  padding-inline: 24px;
}

.journey-skip {
  position: absolute;
  top: 22px;
  right: 22px;
  border: 0;
  color: #40596f;
  background: transparent;
  cursor: pointer;
}

.product-tour {
  pointer-events: none;
}

.tour-mask {
  position: fixed;
  z-index: 5000;
  pointer-events: auto;
  background: rgba(2, 15, 24, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: top 180ms ease, left 180ms ease, width 180ms ease, height 180ms ease;
}

.tour-spotlight {
  position: fixed;
  z-index: 5010;
  pointer-events: none;
  border: 3px solid #63e3d5;
  border-radius: 18px;
  box-shadow:
    0 0 0 4px rgba(99, 227, 213, 0.22),
    0 0 28px rgba(73, 226, 209, 0.52),
    inset 0 0 18px rgba(99, 227, 213, 0.12);
  transition: top 180ms ease, left 180ms ease, width 180ms ease, height 180ms ease, opacity 120ms ease;
}

.tour-target-active {
  scroll-margin-block: 150px;
}

.tour-card {
  position: fixed;
  z-index: 5020;
  width: min(380px, calc(100vw - 24px));
  max-height: min(340px, calc(100dvh - 20px));
  overflow: auto;
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
  transition: opacity 120ms ease;
  --tour-caret-offset: 50%;
}

.product-tour.is-positioning .tour-card {
  opacity: 0;
}

.tour-card::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--surface-strong);
}

.tour-card[data-placement="bottom"]::before {
  top: -8px;
  left: var(--tour-caret-offset);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  transform: translateX(-50%) rotate(45deg);
}

.tour-card[data-placement="top"]::before {
  bottom: -8px;
  left: var(--tour-caret-offset);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: translateX(-50%) rotate(45deg);
}

.tour-card[data-placement="right"]::before {
  top: var(--tour-caret-offset);
  left: -8px;
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: translateY(-50%) rotate(45deg);
}

.tour-card[data-placement="left"]::before {
  top: var(--tour-caret-offset);
  right: -8px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transform: translateY(-50%) rotate(45deg);
}

.tour-card h2,
.tour-card p {
  margin: 6px 0;
}

.tour-card h2 {
  font-size: clamp(20px, 2.6vw, 25px);
  line-height: 1.16;
}

.tour-card > p:not(.kicker) {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.tour-progress {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.tour-progress > div {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border);
}

.tour-progress i {
  display: block;
  width: 33.333%;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 180ms ease;
}

.tour-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.tour-actions #tour-next {
  margin-left: auto;
}

.admin-modal-card {
  width: min(1180px, calc(100vw - 30px));
  max-height: 88vh;
  overflow: auto;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1280px;
}

.admin-users-table th,
.admin-users-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.admin-users-table small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
}

.admin-phone-value {
  display: inline-block;
  min-width: 112px;
  white-space: nowrap;
  font-weight: 700;
}

.admin-source-badge,
.admin-provider-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  background: var(--surface-strong);
}

.admin-provider-badge[data-provider="google.com"] {
  color: #2b67c8;
  border-color: color-mix(in srgb, #4285f4 45%, var(--border));
}

.auth-access-notice {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 4000;
  max-width: 380px;
  padding: 14px 18px;
  border: 1px solid #d1a931;
  border-radius: 12px;
  color: #fff;
  background: #765b0d;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .user-account {
    width: 100%;
    flex-wrap: wrap;
  }

  .auth-card {
    width: 100%;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    padding: 20px 16px;
  }

  .auth-brand-mark {
    width: 64px;
    height: 64px;
  }

  .auth-card h1 {
    font-size: 26px;
  }

  .auth-register-grid,
  .plan-picker {
    grid-template-columns: 1fr;
  }

  .plan-choice span {
    min-height: 0;
  }

  .site-footer {
    padding: 24px 18px;
    gap: 22px;
  }

  .footer-grid {
    gap: 24px;
  }

  .footer-brand h3,
  .footer-col h3 {
    font-size: 17px;
  }

  .site-footer .footer-link,
  .site-footer .footer-copy {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 4px 0;
    border: 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.55;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .site-footer .footer-legal-link {
    color: var(--primary-ink);
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    font-size: 12px;
  }

  .feature-lock-card {
    min-height: 220px;
    padding: 24px 18px;
  }

  .journey-backdrop {
    place-items: center;
    padding: 5dvh 5vw;
  }

  .journey-card {
    width: 90vw;
    height: 90dvh;
    max-height: 90dvh;
    padding: clamp(16px, 4vw, 22px);
    border-radius: 24px;
  }

  .journey-card h2 {
    font-size: clamp(23px, 7vw, 32px);
  }

  .journey-principle {
    grid-template-columns: 1fr;
  }

  .journey-principle b {
    transform: rotate(90deg);
    justify-self: start;
  }

  .journey-start {
    width: 100%;
  }

  .journey-skip {
    top: 14px;
    right: 14px;
  }

  .tour-card {
    width: min(320px, calc(100vw - 20px));
    max-height: min(310px, calc(100dvh - 20px));
    padding: 14px;
    border-radius: 16px;
  }

  .tour-card h2 {
    font-size: clamp(19px, 5.6vw, 23px);
  }

  .tour-card > p:not(.kicker) {
    font-size: 13px;
  }

  .tour-actions {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }

  .tour-actions .btn-primary,
  .tour-actions .btn-ghost {
    min-height: 42px;
    padding: 9px 12px;
  }
}

@media (max-height: 700px) {
  .journey-card {
    padding-block: 14px;
  }

  .journey-heading {
    margin-bottom: 6px;
  }

  .journey-mark {
    width: 48px;
    height: 48px;
    border-radius: 999px;
  }

  .journey-card h2 {
    margin-block: 5px 7px;
    font-size: clamp(21px, 5.5vh, 29px);
  }

  .journey-card > p:not(.kicker),
  .journey-principle span {
    font-size: 12px;
    line-height: 1.35;
  }

  .journey-principle {
    margin-block: 7px;
    padding: 9px 11px;
    gap: 5px;
  }

  .journey-start {
    min-height: 40px;
    margin-top: 4px;
  }
}
