/* Blog: shares tokens, nav, buttons and footer with styles.css */
:root {
  --line: rgba(255, 255, 255, 0.075);
  --tint: rgba(255, 255, 255, 0.04);
  --blue: #2383e2;
  --green: #5f9a74;
  --purple: #8c73b8;
  --orange: #bd7a4a;
  --up: #b6d8c0;
}

.page {
  padding: 64px 0 120px;
  overflow-x: clip;
}

/* Listing */
.blog__head {
  margin-bottom: 32px;
}

.blog__title {
  font-family: var(--font-brand);
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.blog__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 32px;
}

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

.views {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.view {
  display: grid;
  place-items: center;
  width: 32px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.view:hover {
  color: var(--text);
}

.view[aria-pressed="true"] {
  background: rgba(237, 237, 234, 0.1);
  color: var(--text);
}

.view svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.filter {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.filter:hover {
  color: var(--text);
}

.filter[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.posts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.posts--list {
  grid-template-columns: 1fr;
  gap: 0;
}

.posts--list li {
  border-top: 1px solid var(--line);
}

.posts--list .card {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  gap: 6px 24px;
  padding: 16px 0;
}

.posts--list .card__photo {
  grid-row: 1 / -1;
  border-radius: 10px;
}

.posts--list .card__title {
  font-size: 22px;
}

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

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
}

.card__photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: opacity 0.15s ease;
}

.card:hover .card__photo {
  opacity: 0.85;
}

.card__meta,
.post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Hidden for now; remove display: none to show authors again. */
.card__author {
  display: none;
  margin-left: auto;
}

.chip {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--tint);
  color: #c8c8cf;
}

.card__title {
  margin: 0;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.card__preview {
  color: var(--muted);
  font-size: 15px;
}

/* Post */
.post__narrow {
  max-width: 720px;
  margin: 0 auto;
}

.faq--post {
  max-width: 720px;
  margin: 72px auto 0;
}

.faq--post .faq__title {
  margin-bottom: 24px;
  font-size: 21px;
}

.post__back {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.post__back:hover {
  color: var(--text);
}

.post__title {
  margin-top: 16px;
  font-family: var(--font-brand);
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.post__byline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  font-size: 14px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1f1f23;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
}

img.avatar {
  object-fit: cover;
}

.post__byline small {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.post__cover {
  max-width: 1100px;
  margin: 40px auto 56px;
}

.post__cover img,
.figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: cover;
}

.post__cover img {
  aspect-ratio: 16 / 8;
}

/* Article body */
.prose {
  color: #d4d4d8;
  font-size: 17px;
  line-height: 1.75;
}

.prose p,
.prose ul {
  margin: 0 0 20px;
}

.prose h1,
.prose h2 {
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.prose h1 {
  margin: 56px 0 16px;
  font-size: 30px;
  line-height: 1.2;
}

.prose h2 {
  margin: 40px 0 12px;
  font-size: 21px;
  line-height: 1.3;
}

.prose a {
  color: var(--text);
  text-decoration-color: rgba(237, 237, 234, 0.35);
  text-underline-offset: 3px;
}

.prose blockquote {
  margin: 32px 0;
  padding-left: 20px;
  border-left: 2px solid #2383e2;
  color: var(--text);
  font-size: 19px;
}

/* Breaks out of the 720px column */
.wide {
  position: relative;
  left: 50%;
  width: min(960px, 100vw - 48px);
  margin: 40px 0;
  transform: translateX(-50%);
}

.figure {
  margin: 40px 0;
}

.figure img {
  aspect-ratio: 16 / 9;
}

.figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: start;
}

.columns > div > p:last-child {
  margin-bottom: 0;
}

.figure--half {
  margin: 6px 0 0;
}

.figure--half img {
  aspect-ratio: 4 / 3;
}

/* Metric cards and charts, matching the app's Analytics page */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.panel {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101012;
  font-size: 12px;
  line-height: 1.4;
}

.prose .panel p {
  margin: 0;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  aspect-ratio: 1;
}

.metric__label,
.chart__title,
.chart__note,
.muted {
  color: var(--muted);
}

.metric__value {
  margin-top: 2px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.metric__value span {
  color: var(--muted);
  font-size: 16px;
}

.metric__delta {
  margin-top: 2px;
  font-size: 11px;
}

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

.panel.metric .metric__foot {
  margin-top: auto;
}

.minibars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 56px;
}

.minibars span,
.streak span {
  flex: 1;
  border-radius: 2px;
}

.streak {
  display: flex;
  gap: 4px;
}

.streak span {
  aspect-ratio: 1;
  min-width: 0;
  background: var(--line);
}

.streak .on {
  background: var(--blue);
}

.split {
  display: flex;
  gap: 1px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.chart {
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
}

.chart__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.chart__title {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
}

.chart__note {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chart__body {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
}

.chart__axis,
.chart__plot {
  position: relative;
  height: 160px;
}

.chart__axis span {
  position: absolute;
  right: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  transform: translateY(-50%);
}

.chart__grid {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.chart__grid--base {
  border-top-style: solid;
  border-color: var(--line);
}

.chart__bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.chart__bars--wide {
  gap: 6px;
}

.bar {
  display: flex;
  flex: 1;
  flex-direction: column-reverse;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
  border-radius: 3px 3px 0 0;
}

.bar span {
  flex: none;
}

.chart__labels {
  display: flex;
  gap: 3px;
  padding-top: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.chart__labels span {
  flex: 1;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

.prose .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 12px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  list-style: none;
}

.legend li,
.swatch {
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.bar-value {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
  min-width: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.bar-value i {
  width: 100%;
  max-width: 32px;
  border-radius: 3px 3px 0 0;
  background: var(--blue);
  opacity: 0.5;
}

.bar-value.best i {
  opacity: 1;
}

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

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

@media (max-width: 720px) {
  .page {
    padding: 40px 0 88px;
  }

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

  .posts--list .card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 6px 16px;
  }

  .posts--list .card__title {
    font-size: 18px;
  }

  .posts--list .card__preview {
    display: none;
  }

  .post__cover {
    margin: 32px auto 40px;
  }

  .columns {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.prose h3 {
  margin: 32px 0 8px;
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
}

.prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.prose li + li {
  margin-top: 6px;
}

.prose blockquote {
  font-size: 17px;
  line-height: 1.7;
}

/* Comparison covers: title set on the shared blurred backgrounds */
.cover {
  display: grid;
  place-items: center;
  background: var(--cover) center / cover no-repeat;
}

.cover__text {
  color: var(--text);
  font-family: var(--font-brand);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.cover__text span {
  color: rgba(237, 237, 234, 0.7);
}

.posts--list .cover__text {
  font-size: 16px;
}

.post__cover-art {
  aspect-ratio: 21 / 9;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.post__cover-art .cover__text {
  font-size: clamp(36px, 6vw, 72px);
}
