/* Gazette custom tweaks on top of Pico */

/* Inter variable font (local files in src/static/css) */
@font-face {
  font-family: 'Inter';
  src: url('/static/css/Inter-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/static/css/Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --pico-font-family: 'Inter', var(--pico-font-family-sans-serif);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Header should scroll away with the page (not sticky/fixed) */
.gazette-header {
  border-bottom: 1px solid var(--pico-muted-border-color);
  background: var(--pico-background-color);
}

/* Keep header content compact */
.gazette-header nav {
  padding-block: 0.5rem;

  /* Pico's nav layout is flex-based; center the single list */
  justify-content: center;
}

/* Market indicators row */
.gazette-tickers {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;

  /* Let tickers wrap instead of scrolling */
  flex-wrap: wrap;
  overflow: hidden;
  white-space: normal;

  /* Override Pico nav list defaults */
  margin: 0;
  padding: 0;
  list-style: none;
}

.gazette-ticker {
  display: flex;
  flex: 1 1 140px;
  max-width: 220px;

  flex-direction: column;
  align-items: center;
  gap: 0.1rem;

  padding: 0.35rem 0.55rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: calc(var(--pico-border-radius) * 2);
  background: var(--pico-card-background-color, var(--pico-background-color));
}

.gazette-ticker-name {
  opacity: 0.75;
}

.gazette-ticker-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Variations */
.gazette-var {
  font-variant-numeric: tabular-nums;
}

.gazette-var.is-up {
  color: var(--pico-del-color);
}

.gazette-var.is-down {
  color: var(--pico-ins-color);
}

.gazette-var.is-flat {
  color: var(--pico-primary);
}

/* Home list */
.gazette-item {
  margin-bottom: 1rem;
}

.gazette-item-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.gazette-item-link:hover {
  text-decoration: none;
}

.gazette-title {
  margin-bottom: 0;

  /* Pico's default h2 is quite large; keep titles compact on the home feed */
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 600;
}

.gazette-item-link:hover .gazette-title {
  text-decoration: underline;
}

.gazette-meta {
  display: block;
  opacity: 0.7;
  margin-bottom: 0.25rem;
}

.gazette-empty {
  text-align: center;
  opacity: 0.8;
}

/* Article page */
.gazette-article-image {
  display: block;
  max-width: 100%;
  height: auto;

  border-radius: var(--pico-border-radius);
  margin-block: 1rem;
  margin-inline: auto;
}

.gazette-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 2000;
  background: var(--pico-primary);
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--pico-muted-color), transparent 35%);
  border-radius: 8px;
}
