/* ─────────────────────────────────────────────
   Design system: Stripe-inspired (DESIGN.md)
   Font: DM Sans + Source Code Pro (self-hosted)
   ───────────────────────────────────────────── */

/* ── Self-hosted fonts ── */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/source-code-pro-500-latin.woff2') format('woff2');
}

/* ── CSS Custom Properties ── */
:root {
  /* Backgrounds */
  --color-bg:      #0F1720;
  --color-bg-dark: #080e14;

  /* Text */
  --color-heading: #F9E1C4;
  --color-label:   #c9b8a4;
  --color-body:    #DFDFDF;

  /* Brand */
  --color-purple:       #E36426;
  --color-purple-hover: #c85520;
  --color-purple-light: #f5a878;
  --color-purple-mid:   #eb7a3f;

  /* Accent — decorative only, NOT buttons/links */
  --color-ruby:          #ea2261;
  --color-magenta:       #f96bee;
  --color-magenta-light: #3a1a2a;

  /* Borders */
  --color-border:        #1e2c3a;
  --color-border-purple: #7a3a18;

  /* Status */
  --color-success:      #15be53;
  --color-success-text: #4ade80;

  /* Shadows */
  --shadow-ambient:  rgba(0,0,0,0.2) 0px 3px 6px;
  --shadow-standard: rgba(0,0,0,0.3) 0px 15px 35px;
  --shadow-elevated: rgba(0,0,0,0.4) 0px 30px 45px -30px, rgba(0,0,0,0.2) 0px 18px 36px -18px;
  --shadow-deep:     rgba(0,0,0,0.4) 0px 14px 21px -14px, rgba(0,0,0,0.2) 0px 8px 17px -8px;

  /* Layout */
  --container-max: 1080px;
  --header-height: 56px;
  --filter-height: 96px; /* two filter rows */
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', 'SF Pro Display', system-ui, sans-serif;
  font-weight: 300;
  background: var(--color-bg);
  color: var(--color-body);
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'DM Sans', 'SF Pro Display', system-ui, sans-serif;
  font-weight: 300;
  color: var(--color-heading);
  letter-spacing: -0.64px;
  line-height: 1.1;
}

h1 { font-size: 48px; letter-spacing: -0.96px; line-height: 1.15; }
h2 { font-size: 32px; letter-spacing: -0.64px; }
h3 { font-size: 22px; letter-spacing: -0.22px; }

p, span, li {
  font-weight: 300;
  color: var(--color-body);
  line-height: 1.4;
}

button, a, select, label {
  font-family: inherit;
  font-weight: 400;
}

a {
  color: var(--color-purple);
  text-decoration: none;
}
a:hover { color: var(--color-purple-hover); }

/* Tabular numerals for rank, price, score */
.rank, .price, .score {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.36px;
}

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Layout ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,23,32,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.22px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.logo-img {
  height: 50px;
  width: auto;
  display: block;
}
.logo-ember {
  color: var(--color-purple);
  line-height: 1;
}
.logo-picks {
  color: var(--color-heading);
  line-height: 1;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-nav-link {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.header-nav-link:hover {
  color: var(--color-purple);
}

.header-nav-link.active {
  color: var(--color-purple);
}

/* Market select */
.market-select {
  appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748d' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-heading);
  cursor: pointer;
  transition: border-color 0.15s;
}
.market-select:hover { border-color: var(--color-purple-light); }
.market-select:focus {
  outline: 2px solid var(--color-purple);
  outline-offset: 1px;
  border-color: var(--color-purple);
}

/* ── Filter bar ── */
.filter-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background: rgba(15,23,32,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
}

.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Toggle groups (store, type) ── */
.toggle-group {
  display: flex;
  border: 1px solid var(--color-border-purple);
  border-radius: 4px;
  overflow: hidden;
}

.toggle-btn {
  background: transparent;
  color: var(--color-purple);
  border: none;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.toggle-btn + .toggle-btn {
  border-left: 1px solid var(--color-border-purple);
}
.toggle-btn:hover {
  background: rgba(227,100,38,0.08);
}
.toggle-btn.active {
  background: var(--color-purple);
  color: #ffffff;
}
.toggle-btn:focus-visible {
  outline: 2px solid var(--color-purple);
  outline-offset: 1px;
}


/* ── Category select ── */
.category-select {
  appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748d' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-heading);
  cursor: pointer;
  min-width: 160px;
  transition: border-color 0.15s;
}
.category-select:hover { border-color: var(--color-purple-light); }
.category-select:focus {
  outline: 2px solid var(--color-purple);
  outline-offset: 1px;
  border-color: var(--color-purple);
}

/* ── View description (SEO text) ── */
.view-description {
  font-size: 13px;
  font-weight: 300;
  color: var(--color-body);
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}
.view-description:empty { display: none; }

.list-intro {
  font-size: 14px;
  font-weight: 300;
  color: var(--color-body);
  line-height: 1.6;
  padding: 10px 16px 14px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

/* ── Info bar ── */
.info-bar {
  font-size: 13px;
  font-weight: 300;
  color: var(--color-body);
  padding: 12px 0 8px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

/* ── Buttons ── */
.btn-primary {
  background: var(--color-purple);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--color-purple-hover); color: #ffffff; }
.btn-primary:focus-visible {
  outline: 2px solid var(--color-purple);
  outline-offset: 2px;
}

/* ── Loading spinner ── */
.spinner-wrap {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}
.spinner-wrap[hidden] { display: none; }

.spinner-ring {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-purple);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error state ── */
.error-msg {
  text-align: center;
  padding: 48px 24px;
}
.error-msg[hidden] { display: none; }
.error-msg p {
  font-size: 15px;
  color: var(--color-body);
  margin-bottom: 16px;
}

/* ── List card (lista- ja trending-sivut) ── */
.list-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  margin: 16px 0 40px;
}
.list-card .info-bar {
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}
.list-card .view-description {
  padding: 6px 16px 10px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}
.list-card .app-row {
  padding-left: 16px;
}
.list-card .trending-section {
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}
.list-card .trending-section:last-child {
  border-bottom: none;
}
.list-card .trending-section-title {
  padding: 12px 16px 8px;
  margin-bottom: 0;
}
.list-card .trending-row {
  padding: 10px 16px;
}
.list-card .trending-empty {
  padding: 32px 16px;
}

/* ── App list ── */
#app-list {
  padding-bottom: 8px;
}

/* ── App row ── */
.app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.15s;
}
.app-row:last-child { border-bottom: none; }

.rank {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-body);
  min-width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  background: #f8fafc;
  object-fit: cover;
}

.info {
  flex: 1;
  min-width: 0;
}

.title {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.developer {
  font-size: 12px;
  font-weight: 300;
  color: var(--color-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  min-width: 68px;
}

.price {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-heading);
}
.price.free { color: var(--color-success-text); }

.score {
  font-size: 12px;
  font-weight: 300;
  color: var(--color-body);
}
.score.no-score { display: none; }

.meta-view {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 400;
  color: var(--color-purple);
  text-decoration: none;
  border: 1px solid var(--color-border-purple);
  border-radius: 3px;
  padding: 2px 7px;
  white-space: nowrap;
  transition: background 0.15s;
}
.meta-view:hover {
  background: rgba(227,100,38,0.08);
}
.meta-view:focus-visible {
  outline: 2px solid var(--color-purple);
  outline-offset: 1px;
}

/* ── Content slots ── */
.slot {
  background: var(--color-bg-dark);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-purple);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 8px 0;
}

.slot-label {
  display: block;
  font-size: 10px;
  font-weight: 300;
  color: var(--color-body);
  text-transform: uppercase;
  letter-spacing: 0.1px;
  margin-bottom: 8px;
}

/* AdSense slot */
.slot-adsense {
  min-height: 80px;
}
.slot-adsense .ad-placeholder {
  background: var(--color-border);
  border-radius: 4px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--color-body);
}

/* Affiliate card */
.affiliate-card,
.blog-card {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.affiliate-card:hover .affiliate-title,
.blog-card:hover .blog-title {
  color: var(--color-purple);
}

.affiliate-card img,
.blog-card img {
  width: 64px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.affiliate-title,
.blog-title {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-heading);
  margin-bottom: 2px;
  transition: color 0.15s;
}

.affiliate-desc,
.blog-excerpt {
  font-size: 12px;
  font-weight: 300;
  color: var(--color-body);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── 404 page ── */
.not-found-page {
  display: flex;
  justify-content: center;
  padding: 80px 16px;
}
.not-found-inner {
  text-align: center;
  max-width: 400px;
}
.not-found-code {
  font-size: 72px;
  font-weight: 700;
  color: var(--color-purple);
  line-height: 1;
  margin: 0 0 16px;
}
.not-found-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 12px;
}
.not-found-desc {
  color: var(--color-text-secondary);
  margin: 0 0 28px;
}

/* ── Footer ── */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.9);
  padding: 24px 0;
  margin-top: auto;
}

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

.footer-copy {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
}

.footer-note {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
}

/* ── noscript bar ── */
.noscript-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.9);
  text-align: center;
  padding: 12px 24px;
  font-size: 14px;
  z-index: 9999;
}

/* ── Breadcrumb ── */
.breadcrumb { padding: 16px 0 0; }
.breadcrumb-link {
  font-size: 13px;
  color: var(--color-body);
  text-decoration: none;
}
.breadcrumb-link:hover { color: var(--color-purple); }


/* ── Pre-rendered filter bar: toggle-btn as <a> links ── */
.toggle-group a.toggle-btn {
  display: inline-block;
  text-decoration: none;
}

/* ── Dropdown (details/summary) for market and category ── */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  appearance: none;
  list-style: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748d' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-heading);
  cursor: pointer;
  transition: border-color 0.15s;
  white-space: nowrap;
}
.dropdown-toggle::-webkit-details-marker { display: none; }
.dropdown-toggle::marker { display: none; }
.dropdown-toggle:hover { border-color: var(--color-purple-light); }

.dropdown[open] .dropdown-toggle {
  border-color: var(--color-purple);
  outline: 2px solid var(--color-purple);
  outline-offset: 1px;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  box-shadow: var(--shadow-standard);
  min-width: 180px;
  z-index: 200;
  padding: 4px 0;
  max-height: 320px;
  overflow-y: auto;
}

.dropdown-menu-categories {
  min-width: 200px;
}

.dropdown-item {
  display: block;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-heading);
  text-decoration: none;
  transition: background 0.1s;
  white-space: nowrap;
}
.dropdown-item:hover {
  background: rgba(227,100,38,0.08);
  color: var(--color-purple);
}
.dropdown-item.active {
  color: var(--color-purple);
  font-weight: 400;
  background: rgba(227,100,38,0.12);
}


/* ── Header strip ── */
.header-strip {
  background: var(--color-purple);
  color: #fff;
  text-align: center;
  padding: 6px 24px;
  font-size: 13px;
}
.header-strip a { color: #fff; text-decoration: underline; }
.header-strip-label {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 11px;
  margin-right: 6px;
}

/* ── Dev link in app-row ── */
.dev-link {
  color: var(--color-body);
  text-decoration: none;
}
.dev-link:hover { color: var(--color-purple); }

/* ── Footer nav ── */
.footer-nav { display: flex; gap: 16px; }
.footer-nav a { color: rgba(255,255,255,0.7); font-size: 13px; }
.footer-nav a:hover { color: #fff; }

/* ── Per-app page ── */
.per-app-page { padding-top: 32px; padding-bottom: 48px; }

.per-app-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 32px;
}

.per-app-icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
  object-fit: cover;
}

.per-app-meta { flex: 1; }

.per-app-title {
  font-size: 28px;
  font-weight: 300;
  color: var(--color-heading);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.per-app-developer { font-size: 14px; color: var(--color-body); margin-bottom: 12px; }
.per-app-developer a { color: var(--color-purple); }

.per-app-details {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  background: rgba(227,100,38,0.12);
  color: var(--color-purple);
  border: 1px solid var(--color-border-purple);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 400;
}

.chart-section { margin: 32px 0; }
.chart-section h2 { margin-bottom: 4px; }
.chart-caption { font-size: 13px; color: var(--color-body); margin-bottom: 12px; }

.chart-svg {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: block;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fafcff;
}

.presence-section, .best-ranks-section { margin: 32px 0; }
.presence-section h2, .best-ranks-section h2 { margin-bottom: 12px; }

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.history-table th {
  text-align: left;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 400;
  color: var(--color-body);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--color-border);
}
.history-table td {
  padding: 8px 10px;
  color: var(--color-heading);
  border-bottom: 1px solid var(--color-border);
}
.history-table td a { color: var(--color-purple); }
.history-table tr:last-child td { border-bottom: none; }

/* ── Per-developer page ── */
.per-developer-page { padding-top: 32px; padding-bottom: 48px; }

.per-developer-header { margin-bottom: 24px; }
.per-developer-header h1 { margin-bottom: 4px; }
.per-developer-subtitle { font-size: 14px; color: var(--color-body); }

.developer-summary {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.summary-stat { display: flex; flex-direction: column; gap: 2px; }
.stat-number { font-size: 28px; font-weight: 300; color: var(--color-heading); letter-spacing: -0.5px; }
.stat-label  { font-size: 12px; color: var(--color-body); }

.developer-apps { display: flex; flex-direction: column; }

.developer-app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.developer-app-row:last-child { border-bottom: none; }

.app-markets {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.market-badge {
  background: rgba(227,100,38,0.12);
  color: var(--color-purple);
  border: 1px solid var(--color-border-purple);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 400;
}

/* ── Trending page ── */
.trending-page { padding-top: 32px; padding-bottom: 48px; }

.trending-header { margin-bottom: 24px; }
.trending-header h1 { margin-bottom: 4px; }
.trending-subtitle { font-size: 14px; color: var(--color-body); margin-bottom: 2px; }
.trending-desc { font-size: 13px; color: var(--color-body); }

.trending-section { margin-bottom: 32px; }
.trending-section-title { font-size: 20px; margin-bottom: 12px; }
.risers-title  { color: var(--color-success-text); }
.fallers-title { color: var(--color-ruby); }
.new-title     { color: var(--color-purple); }

.trending-list { display: flex; flex-direction: column; }

.trending-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.trending-row:last-child { border-bottom: none; }

.rank-change {
  font-size: 13px;
  font-weight: 400;
  min-width: 44px;
  text-align: center;
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.rank-up   { background: rgba(21,190,83,0.12); color: var(--color-success-text); }
.rank-down { background: rgba(234,34,97,0.10); color: var(--color-ruby); }
.rank-new  { background: rgba(227,100,38,0.12); color: var(--color-purple); font-size: 11px; }

.rank-now  { font-size: 14px; font-weight: 400; color: var(--color-heading); }
.rank-was  { font-size: 12px; color: var(--color-body); }

.trending-empty {
  padding: 48px 0;
  text-align: center;
}
.trending-empty p { font-size: 15px; color: var(--color-body); margin-bottom: 8px; }
.trending-empty-note { font-size: 13px; }

/* ── Own-app slot ── */
.slot-own-app { border-left-color: var(--color-ruby); padding: 10px 8px 4px; }
.own-app-card {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.own-app-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}
.own-app-info { flex: 1; }
.own-app-title    { font-size: 15px; font-weight: 400; color: var(--color-heading); }
.own-app-subtitle { font-size: 12px; color: var(--color-body); margin: 2px 0; }
.own-app-desc     { font-size: 13px; color: var(--color-body); margin-bottom: 6px; }
.own-app-cta {
  display: inline-block;
  background: var(--color-purple);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
}

.own-app-card--image-only { display: block; }
.own-app-banner {
  display: block;
  width: 100%;
  aspect-ratio: 6 / 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

/* ── Blog ── */
.blog-list { display: flex; flex-direction: column; gap: 20px; }
.blog-list-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 20px;
}
.blog-list-item:last-child { border-bottom: none; padding-bottom: 0; }
.blog-list-thumb {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}
.blog-list-info { flex: 1; }
.blog-list-title { font-size: 16px; font-weight: 600; color: var(--color-heading); margin-bottom: 4px; }
.blog-list-date  { font-size: 12px; color: var(--color-body); margin-bottom: 4px; }
.blog-list-excerpt { font-size: 13px; color: var(--color-body); }
.blog-list-item:hover .blog-list-title { text-decoration: underline; }

.blog-post-body p  { margin-bottom: 1em; line-height: 1.7; }
.blog-post-body h2 { font-size: 20px; margin: 1.5em 0 0.5em; }
.blog-post-body h3 { font-size: 17px; margin: 1.2em 0 0.4em; }
.blog-post-body ul, .blog-post-body ol { padding-left: 1.5em; margin-bottom: 1em; }
.blog-post-body li { margin-bottom: 0.3em; line-height: 1.6; }
.blog-post-body img { max-width: 100%; border-radius: 6px; margin: 1em 0; }

/* ── Responsive: Mobile ── */
@media (max-width: 640px) {
  :root {
    --header-height: 52px;
    --filter-height: 112px;
  }

  h1 { font-size: 32px; letter-spacing: -0.64px; }

  .container { padding: 0 16px; }

  .filter-row {
    gap: 8px;
  }

  .toggle-btn {
    padding: 6px 10px;
    font-size: 13px;
  }

  .icon {
    width: 40px;
    height: 40px;
  }

  .meta {
    min-width: 44px;
    padding-right: 16px;
  }

  .footer-inner { flex-direction: column; gap: 4px; text-align: center; }
}

/* ── Responsive: Tablet ── */
@media (min-width: 640px) and (max-width: 1024px) {
  h1 { font-size: 40px; }
}

/* ── Homepage ─────────────────────────────────────────────────────────────── */
.home-hero {
  padding: 48px 0 40px;
  text-align: center;
}
.home-hero h1 {
  font-size: 2.25rem;
  font-weight: 300;
  letter-spacing: -0.72px;
  color: var(--color-heading);
  margin: 0 0 12px;
}
.home-hero-sub {
  font-size: 1.0625rem;
  color: var(--color-body);
  font-weight: 300;
  margin: 0 0 8px;
}
.home-updated {
  font-size: 0.8125rem;
  color: var(--color-body);
  opacity: 0.7;
  margin: 0;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding-bottom: 48px;
}
@media (max-width: 640px) {
  .home-hero { padding: 32px 0 28px; }
  .home-grid { grid-template-columns: 1fr; }
}

.home-chart {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}
.home-chart-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--color-border);
}
.home-chart-header h2 {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--color-heading);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-chart-tab {
  font-weight: 300;
  color: var(--color-body);
}
.home-chart-empty {
  padding: 16px;
  text-align: center;
  color: var(--color-body);
  font-size: 0.875rem;
}
.home-chart-more {
  display: block;
  text-align: center;
  padding: 12px;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-primary);
  text-decoration: none;
}
.home-chart-more:hover { text-decoration: underline; }

/* ── Market landing page ── */
.market-trending-highlight { margin-top: 32px; }
.market-trending-title {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-heading);
  margin-bottom: 8px;
}

/* ── Privacy page ── */
.privacy-page { margin: 24px 0 48px; }
.privacy-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--color-border);
}
.privacy-header h1 { font-size: 1.75rem; font-weight: 300; letter-spacing: -0.5px; margin-bottom: 4px; }
.privacy-updated { font-size: 0.8125rem; color: var(--color-body); opacity: 0.7; }
.privacy-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.privacy-body h2 {
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--color-heading);
  margin-bottom: -12px;
}
.privacy-body h3 {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--color-label);
  margin-bottom: -12px;
}
.privacy-body p, .privacy-body ul { font-size: 0.9375rem; line-height: 1.65; color: var(--color-body); }
.privacy-body ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.privacy-body a { color: var(--color-purple); text-decoration: none; }
.privacy-body a:hover { text-decoration: underline; }

/* ── Cookie consent banner ── */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-bg-dark);
  border-top: 1px solid var(--color-border);
  padding: 16px 24px;
}
.consent-banner-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.consent-text {
  flex: 1;
  font-size: 13px;
  color: var(--color-body);
  line-height: 1.5;
  min-width: 200px;
}
.consent-text a {
  color: var(--color-purple);
  text-decoration: none;
}
.consent-text a:hover { text-decoration: underline; }
.consent-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.consent-btn {
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  border: none;
  transition: background 0.15s, color 0.15s;
}
.consent-btn-primary {
  background: var(--color-purple);
  color: #fff;
}
.consent-btn-primary:hover { background: var(--color-purple-hover); }
.consent-btn-secondary {
  background: transparent;
  color: var(--color-label);
  border: 1px solid var(--color-border);
}
.consent-btn-secondary:hover { border-color: var(--color-label); color: var(--color-body); }
