.cedears-implicit-card {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

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

.cedears-implicit-box {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 18px;
}

.cedears-implicit-box span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-bottom: 3px;
}

.cedears-implicit-box strong {
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
  color: var(--text);
}

.cedears-implicit-note {
  margin-top: 8px;
  padding: 0 2px;
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.cedears-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.cedears-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--card-bg);
  padding: 2px;
  flex-shrink: 0;
}

.cedears-view-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}

.cedears-view-btn.active {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.cedears-search-wrap {
  flex: 1;
  max-width: 340px;
}

.cedears-search {
  width: 100%;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  padding: 0 12px;
  outline: none;
}

.cedears-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.cedears-loading {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.cedears-error {
  padding: 18px 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--red-bg);
  color: var(--red);
  font-weight: 600;
}

.cedears-table-wrap {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.cedears-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
}

.cedears-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--card-bg);
  color: var(--text-tertiary);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  white-space: nowrap;
}

.cedears-table .col-right {
  text-align: right;
}

.cedear-row td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.cedears-empty-cell {
  padding: 22px 12px !important;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.cedear-row:last-child td {
  border-bottom: none;
}

.cedear-row:hover td {
  background: color-mix(in srgb, var(--accent-light) 26%, transparent);
}

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

.cedear-logo-shell {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.cedear-logo {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  z-index: 2;
}

.cedear-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.62rem;
  text-transform: uppercase;
}

.cedear-meta {
  min-width: 0;
}

.cedear-symbol {
  font-weight: 650;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
}

.cedear-name {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.cedear-price,
.cedear-ratio {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
}

.cedear-price.muted {
  color: var(--text-tertiary);
  font-weight: 600;
}

.cedears-chart-wrap {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  padding: 14px;
}

.cedears-chart-inner {
  height: 520px;
}

.cedears-chart-empty {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 28px 16px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

@media (max-width: 880px) {
  .cedears-implicit-values {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cedears-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .cedears-search-wrap {
    max-width: none;
  }

  .cedears-chart-inner {
    height: 380px;
  }
}

/* Terminal skin: keep the standalone route visually consistent with the
   main Stats application without changing its data flow. */
body.cedears-page {
  --bg: #000000;
  --bg-subtle: #070707;
  --card-bg: #070707;
  --text: #e6ebf2;
  --text-secondary: #9aa3b5;
  --text-tertiary: #5a6478;
  --text-faint: #36415a;
  --accent: #7dd3fc;
  --accent-light: #101010;
  --accent-dark: #b8ecff;
  --green: #7ee2a8;
  --green-bg: #0d2b1d;
  --red: #ff7a70;
  --red-bg: #2e1b25;
  --border: #2d2d2d;
  --border-light: #1a1a1a;
  --highlight: #ffd86b;
  --radius: 0px;
  --radius-sm: 0px;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 18px 60px rgb(0 0 0 / 0.38);
  --display: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --font: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --tracking-display: 0;
  --tracking-body: 0;
  --tracking-mono: 0.04em;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
  font-feature-settings: normal;
  overflow-x: hidden;
}

body.cedears-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgb(0 0 0 / 0) 0,
    rgb(0 0 0 / 0) 2px,
    rgb(0 0 0 / 0.22) 2px,
    rgb(0 0 0 / 0.22) 3px
  );
  opacity: 0.22;
  mix-blend-mode: multiply;
}

body.cedears-page::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9001;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgb(0 0 0 / 0) 60%, rgb(0 0 0 / 0.58) 100%);
  opacity: 0.42;
}

body.cedears-page .header {
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  box-shadow: none;
}

body.cedears-page .header-inner {
  max-width: 1180px;
  padding: 10px 24px 8px;
  gap: 16px;
}

body.cedears-page .header-left,
body.cedears-page .header-right {
  flex: 0 0 auto;
}

body.cedears-page .logo {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

body.cedears-page .logo em {
  color: var(--accent);
  font-size: inherit;
  font-style: normal;
}

body.cedears-page .icon-logo,
body.cedears-page .currency-tab .flag {
  display: none;
}

body.cedears-page .currency-tabs {
  flex: 1 1 auto;
  justify-content: center;
  gap: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

body.cedears-page .currency-tab {
  position: relative;
  padding: 4px 10px 5px 0;
  margin-right: 12px;
  border-radius: 0;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.15s ease;
}

body.cedears-page .currency-tab:hover {
  color: var(--text-secondary);
}

body.cedears-page .currency-tab.active {
  background: transparent;
  box-shadow: none;
  color: var(--accent);
}

body.cedears-page .currency-tab.active::after {
  content: '';
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--accent);
}

body.cedears-page .theme-toggle {
  padding: 5px 7px;
  border: 1px solid var(--border-hi, var(--border));
  border-radius: 0;
  background: transparent;
  color: var(--text-tertiary);
}

body.cedears-page .theme-toggle:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

body.cedears-page .hero {
  max-width: 1180px;
  padding: 28px 24px 18px;
  border-bottom: 1px solid var(--border-light);
}

body.cedears-page .hero h1 {
  margin-bottom: 7px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.cedears-page .hero h1::before {
  content: '// ';
  color: var(--text-faint);
}

body.cedears-page .hero p {
  max-width: 680px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.55;
}

body.cedears-page .container {
  max-width: 1180px;
  padding: 0 24px 54px;
}

body.cedears-page .section {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

body.cedears-page .section h2 {
  margin-bottom: 4px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

body.cedears-page .section h2::before {
  content: '> ';
  color: var(--accent);
}

body.cedears-page .section-desc,
body.cedears-page .cedears-implicit-note {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
}

body.cedears-page .cedears-implicit-values {
  gap: 8px;
}

body.cedears-page .cedears-implicit-box {
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 0;
  background: var(--bg-subtle);
  box-shadow: none;
}

body.cedears-page .cedears-implicit-box span {
  margin-bottom: 4px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

body.cedears-page .cedears-implicit-box strong {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}

body.cedears-page .cedears-implicit-note {
  margin-top: 6px;
  padding-left: 0;
}

body.cedears-page .cedears-toolbar {
  align-items: flex-end;
  margin-bottom: 9px;
}

body.cedears-page .cedears-view-toggle {
  gap: 12px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border-light);
  border-radius: 0;
  background: transparent;
}

body.cedears-page .cedears-view-btn {
  padding: 5px 0 6px;
  border-radius: 0;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.cedears-page .cedears-view-btn.active {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 -1px 0 var(--accent);
}

body.cedears-page .cedears-search-wrap {
  max-width: 300px;
}

body.cedears-page .cedears-search {
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border-light);
  border-radius: 0;
  background: var(--bg-subtle);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
}

body.cedears-page .cedears-search:focus {
  border-color: var(--accent);
  box-shadow: none;
}

body.cedears-page .cedears-search::placeholder {
  color: var(--text-faint);
}

body.cedears-page .cedears-loading,
body.cedears-page .cedears-error,
body.cedears-page .cedears-table-wrap,
body.cedears-page .cedears-chart-wrap {
  border: 1px solid var(--border-light);
  border-radius: 0;
  background: var(--bg-subtle);
  box-shadow: none;
}

body.cedears-page .cedears-loading {
  color: var(--text-tertiary);
}

body.cedears-page .loading-spinner {
  border-color: var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
}

body.cedears-page .cedears-error {
  color: var(--red);
}

body.cedears-page .cedears-table-wrap {
  overflow-x: auto;
  scrollbar-color: var(--border) transparent;
  scrollbar-width: thin;
}

body.cedears-page .cedears-table {
  min-width: 980px;
}

body.cedears-page .cedears-table thead th {
  background: var(--bg-subtle);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.08em;
  padding: 8px 10px;
  border-bottom-color: var(--border);
}

body.cedears-page .cedear-row td {
  padding: 8px 10px;
  border-bottom-color: var(--border-light);
}

body.cedears-page .cedear-row:hover td {
  background: var(--accent-light);
}

body.cedears-page .cedear-logo-shell {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
}

body.cedears-page .cedear-logo-fallback {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 9px;
}

body.cedears-page .cedear-asset {
  gap: 8px;
}

body.cedears-page .cedear-symbol {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

body.cedears-page .cedear-name {
  max-width: 280px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 9px;
}

body.cedears-page .cedear-price,
body.cedears-page .cedear-ratio {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
}

body.cedears-page .cedear-price.muted {
  color: var(--text-faint);
}

body.cedears-page .cedears-chart-wrap {
  padding: 10px;
}

body.cedears-page .cedears-chart-inner {
  height: 460px;
}

body.cedears-page .cedears-chart-empty {
  border-color: var(--border);
  border-radius: 0;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
}

body.cedears-page .footer {
  max-width: 1180px;
  margin-top: 0;
  padding: 24px 24px 40px;
  border-top-color: var(--border-light);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
}

body.cedears-page .footer a {
  color: var(--text-secondary);
}

body.cedears-page .footer a:hover {
  color: var(--accent);
}

/* The shared terminal palette also controls this standalone page. Keep its
   editorial variables in sync so the light mode covers the table and chart. */
body.cedears-page[data-palette="light"] {
  --bg: #f4f7fb;
  --bg-subtle: #eef3f8;
  --card-bg: #ffffff;
  --text: #172033;
  --text-secondary: #4c5a70;
  --text-tertiary: #66758c;
  --text-faint: #8794a8;
  --accent: #2563eb;
  --accent-light: #e7eefc;
  --accent-dark: #1849b8;
  --green: #087f5b;
  --green-bg: #e4f5ef;
  --red: #c92a2a;
  --red-bg: #fbe9e9;
  --border: #b8c5d6;
  --border-light: #d8e0eb;
  --border-hi: #9eacc0;
  --highlight: #c98a00;
  --shadow-sm: 0 1px 0 rgb(23 32 51 / .06);
  --shadow: 0 1px 0 rgb(23 32 51 / .05), 0 4px 16px rgb(23 32 51 / .06);
  --shadow-lg: 0 18px 60px rgb(23 32 51 / .14);
}

body.cedears-page[data-palette="light"]::before { opacity: .08; }
body.cedears-page[data-palette="light"]::after { opacity: .12; }
body.cedears-page[data-palette="light"] .header,
body.cedears-page[data-palette="light"] .cedears-view-toggle,
body.cedears-page[data-palette="light"] .cedears-search,
body.cedears-page[data-palette="light"] .cedears-loading,
body.cedears-page[data-palette="light"] .cedears-table-wrap,
body.cedears-page[data-palette="light"] .cedears-chart-wrap {
  background: var(--card-bg);
}

@media (max-width: 880px) {
  body.cedears-page .header-inner {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  body.cedears-page .currency-tabs {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
  }

  body.cedears-page .hero,
  body.cedears-page .container,
  body.cedears-page .footer {
    padding-right: 14px;
    padding-left: 14px;
  }

  body.cedears-page .hero {
    padding-top: 20px;
  }

  body.cedears-page .cedears-toolbar {
    align-items: stretch;
  }

  body.cedears-page .cedears-search-wrap {
    max-width: none;
  }
}
