:root,
html[data-theme="dark"] {
  --bg: #0b0f14;
  --bg-elevated: #121820;
  --bg-card: #161d27;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #e8eef6;
  --text-muted: #8b9bb0;
  --text-dim: #5c6b7f;
  --accent: #3dffa8;
  --accent-dim: rgba(61, 255, 168, 0.14);
  --accent-2: #5b8cff;
  --accent-2-dim: rgba(91, 140, 255, 0.14);
  --danger: #ff6b7a;
  --danger-dim: rgba(255, 107, 122, 0.14);
  --warn: #ffc857;
  --hyper: #a78bfa;
  --bull: #3dffa8;
  --base: #5b8cff;
  --bear: #ff6b7a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  --list-text: #c8d2de;
  --hyper-title: #ddd6fe;
  --glow: rgba(61, 255, 168, 0.08);
  --grid-line: rgba(148, 163, 184, 0.04);
}

html[data-theme="light"] {
  --bg: #f4f6fa;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --accent: #059669;
  --accent-dim: rgba(5, 150, 105, 0.12);
  --accent-2: #2563eb;
  --accent-2-dim: rgba(37, 99, 235, 0.1);
  --danger: #dc2626;
  --danger-dim: rgba(220, 38, 38, 0.1);
  --warn: #d97706;
  --hyper: #7c3aed;
  --bull: #059669;
  --base: #2563eb;
  --bear: #dc2626;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  --list-text: #334155;
  --hyper-title: #5b21b6;
  --glow: rgba(37, 99, 235, 0.08);
  --grid-line: rgba(15, 23, 42, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  overflow-x: hidden;
}

.bg-grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
  z-index: 0;
}

.bg-glow {
  pointer-events: none;
  position: fixed;
  top: -18%;
  left: 50%;
  width: 70vw;
  height: 48vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, var(--glow), transparent 70%);
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent-dim), var(--accent-2-dim));
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-size: 20px;
}

.brand h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}

.status-pill.ok .dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.status-pill.err .dot {
  background: var(--danger);
}

.status-pill.loading .dot {
  background: var(--warn);
  animation: pulse 1s ease infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section {
  padding: 20px 22px 24px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-head.inline {
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.section-sub {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
}

.search-bar {
  padding: 16px 18px;
}

.search-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.search-field {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

input[type="text"] {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
  text-transform: uppercase;
  outline: none;
}

input[type="text"]:focus {
  border-color: rgba(61, 255, 168, 0.45);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.hint {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
}

.btn:hover:not(:disabled) {
  border-color: var(--border-strong);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(165deg, #2dff9a, #1ecf7a);
  color: #06140e;
  border-color: transparent;
}

.btn.ghost {
  background: transparent;
}

.linkish {
  background: none;
  border: none;
  color: var(--accent-2);
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 6px;
}

.error-banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--danger-dim);
  border: 1px solid rgba(255, 107, 122, 0.35);
  color: #ffb3bb;
  font-size: 0.9rem;
}

.loading-state {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px 24px;
}

.loading-state p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table th {
  background: var(--bg-elevated);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}

.data-table tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}

.data-table tbody tr:hover {
  background: rgba(61, 255, 168, 0.05);
}

.data-table tbody tr.active {
  background: var(--accent-dim);
}

.data-table.compact tbody tr {
  cursor: default;
}

.data-table.compact tbody tr:hover {
  background: transparent;
}

.data-table td.mono,
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.up {
  color: var(--bull);
}

.down {
  color: var(--bear);
}

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

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: rgba(61, 255, 168, 0.35);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.card-ticker {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 8px;
  border-radius: 6px;
}

.card-method {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.card-theme {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-price {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.mini-scenarios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mini-sc {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 8px;
  border: 1px solid var(--border);
}

.mini-sc .lbl {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.mini-sc .val {
  font-family: var(--mono);
  font-size: 0.82rem;
}

.mini-sc.hyper .lbl {
  color: var(--hyper);
}
.mini-sc.bull .lbl {
  color: var(--bull);
}
.mini-sc.base .lbl {
  color: var(--base);
}
.mini-sc.bear .lbl {
  color: var(--bear);
}

.detail-price-block {
  text-align: right;
}

.detail-price {
  display: block;
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 500;
}

.detail-mcap {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.overview-text {
  color: #c8d2de;
  margin: 0 0 14px;
  max-width: 90ch;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pill {
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.pill.hot {
  border-color: rgba(167, 139, 250, 0.4);
  color: #c4b5fd;
  background: rgba(167, 139, 250, 0.1);
}

.jv-banner {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-2-dim);
  border: 1px solid rgba(91, 140, 255, 0.3);
  color: #c5d6ff;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.subhead {
  margin: 22px 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 0;
}

.stat-grid > div {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.stat-grid dt {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-dim);
}

.stat-grid dd {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.scenario-card {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 14px;
  border-top: 3px solid var(--base);
}

.scenario-card.hyper_bull {
  border-top-color: var(--hyper);
}
.scenario-card.bull {
  border-top-color: var(--bull);
}
.scenario-card.base {
  border-top-color: var(--base);
}
.scenario-card.bear {
  border-top-color: var(--bear);
}

.scenario-card h4 {
  margin: 0 0 8px;
  font-size: 0.85rem;
}

.scenario-card .pt {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.scenario-card .upside {
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.scenario-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.scenario-card .assumps {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 720px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.bullet-list {
  margin: 0;
  padding-left: 1.2em;
  color: var(--list-text);
  font-size: 0.9rem;
}

.bullet-list li {
  margin: 0.35em 0;
}

.hyper-box {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.12), rgba(61, 255, 168, 0.06));
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.hyper-box h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-family: var(--serif);
  font-weight: 400;
  color: var(--hyper-title);
}

.hyper-box p {
  margin: 0;
  color: var(--list-text);
  font-size: 0.9rem;
  line-height: 1.55;
}

.clusters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.cluster {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.cluster strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.cluster .tickers {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 6px;
}

.cluster p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rank-list {
  margin: 0 0 8px;
  padding-left: 1.3em;
  color: var(--list-text);
}

.rank-list li {
  margin: 0.4em 0;
}

.rank-list strong {
  font-family: var(--mono);
  color: var(--accent);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 4px 2px 0;
}

/* Multi-user additions */
.brand-link {
  text-decoration: none;
  color: inherit;
}

.auth-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-user {
  font-size: 0.8rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.hero {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 0 0 16px;
  color: var(--text-muted);
  max-width: 56ch;
  line-height: 1.55;
}

.hero-disclaimer {
  margin: 0;
}

.auth-app {
  max-width: 520px;
}

.auth-panel {
  padding: 28px 24px;
}

.auth-panel h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.auth-form input,
.auth-form select,
.add-form input,
.add-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
}

.auth-form input:focus,
.add-form input:focus,
.add-form select:focus {
  outline: 2px solid var(--accent-2-dim);
  border-color: var(--accent-2);
}

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

.auth-foot a {
  color: var(--accent-2);
}

.toolbar-panel {
  padding: 16px 18px;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
}

.add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  flex: 1;
}

.add-form .search-field {
  min-width: 120px;
  flex: 1;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-state {
  padding: 36px 24px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
}

.remove-btn {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .top-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .add-form {
    width: 100%;
  }

  .toolbar-actions {
    width: 100%;
  }
}

/* Analytics v3.1 */
.mos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
}

.mos-chip {
  flex: 1 1 140px;
  min-width: 130px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.mos-chip.hot {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-dim);
}

.mos-chip .lbl {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mos-chip .val {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  display: block;
}

.mos-chip .mos-sub {
  display: block;
  font-size: 0.72rem;
  margin-top: 6px;
  line-height: 1.35;
  font-family: var(--mono);
}

.mos-explain {
  width: 100%;
  flex-basis: 100%;
  margin: 0 0 4px;
}

.mos-chip.stance-overvalued {
  border-color: rgba(255, 107, 122, 0.35);
}

.mos-chip.stance-undervalued {
  border-color: rgba(61, 255, 168, 0.35);
}

tr.mos-primary td,
.mos-primary-cell {
  background: var(--accent-dim) !important;
  font-weight: 600;
}

.drivers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.driver-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.driver-card h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.driver-card p {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.driver-cases {
  font-size: 0.78rem;
  color: var(--list-text);
  margin: 4px 0;
}

.driver-metrics {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 8px 0 20px;
}

.chart-card {
  padding: 12px 14px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.chart-card h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.chart-wrap {
  position: relative;
  height: 200px;
}

.chart-wrap.chart-tall {
  height: 240px;
}

.heatmap {
  margin-bottom: 12px;
  overflow-x: auto;
}

.heat-table {
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.78rem;
  width: 100%;
}

.heat-table th,
.heat-table td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: center;
}

.heat-table th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 500;
}

.changelog {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--accent-2-dim);
  font-size: 0.85rem;
}

.changelog ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
}

.ark-panel,
.compare-panel {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.ark-source {
  font-size: 0.88rem;
  margin: 0 0 10px;
}

.ark-source a {
  color: var(--accent-2);
}

.ark-summary {
  margin: 0 0 14px;
  line-height: 1.55;
  color: var(--list-text);
}

.ark-outputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.ark-output-chip {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
}

.ark-output-chip .lbl {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ark-output-chip .val {
  display: block;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
}

.ark-h4 {
  margin: 16px 0 8px;
  font-size: 0.95rem;
}

.ark-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.ark-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
}

.ark-section summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.ark-section summary:hover {
  background: var(--accent-2-dim);
}

.ark-sec-num {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.ark-section-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
}

.ark-section-body p {
  margin: 10px 0 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--list-text);
}

.ark-keys {
  margin-top: 10px;
  font-size: 0.84rem;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.detail-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.panel-inset {
  /* already styled via .changelog */
}

@media (max-width: 720px) {
  .chart-wrap,
  .chart-wrap.chart-tall {
    height: 220px;
  }

  .detail-price-block {
    align-items: flex-start;
    width: 100%;
  }
}
