@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/assets/fraunces-latin.woff2") format("woff2");
}

:root {
  --color-primary: #156B7A;
  --color-ink: #0B3A44;
  --color-cta: #E8743B;
  --color-cta-hover: #CF5F2C;
  --color-bg: #FBF7F0;
  --color-surface: #FFFFFF;
  --color-border: #E7DFD3;
  --color-muted: #5C6B70;
  --verdict-green: #3A9D6B;
  --verdict-amber: #E0A13A;
  --verdict-red: #D2583E;
  --shadow-soft: 0 12px 32px rgba(11, 58, 68, 0.08);
}

html {
  color-scheme: light;
  background: var(--color-bg);
}

body.blog-themed {
  margin: 0;
  color: var(--color-ink);
  background: var(--color-bg);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.blog-themed h1,
.blog-themed h2,
.blog-themed h3,
.blog-themed h4,
.blog-themed .brand {
  color: var(--color-ink);
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: 0;
}

.blog-themed a {
  color: var(--color-primary);
  text-underline-offset: 0.18em;
}

.blog-themed .prose a,
.blog-themed .source a {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.blog-themed header {
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.96);
}

.blog-themed header nav {
  min-height: 64px;
}

.blog-themed header nav > div {
  align-items: center;
  gap: 1.1rem;
}

.blog-themed header a {
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: none;
}

.blog-themed header a:hover {
  color: var(--color-primary);
}

.blog-themed main.wrap {
  align-items: start;
}

.blog-themed article.prose {
  min-width: 0;
}

.article-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: linear-gradient(125deg, #FFF8ED 0%, #F2E9DC 58%, #E3F0ED 100%);
}

.article-hero::after {
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 160px;
  height: 120px;
  border: 18px solid rgba(21, 107, 122, 0.08);
  border-radius: 50%;
  content: "";
}

.article-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0.75rem 0 0;
  font-size: 2.35rem;
  line-height: 1.08;
}

.article-hero-icon,
.blog-card-banner {
  display: grid;
  place-items: center;
}

.article-hero-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 0.8rem;
  border-radius: 8px;
  color: var(--color-surface);
  background: var(--color-primary);
}

.article-hero-icon svg,
.blog-card-banner svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(21, 107, 122, 0.22);
  border-radius: 6px;
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.citation-ready.tldr {
  margin: 1.5rem 0;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-primary);
  border-radius: 0 8px 8px 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.citation-ready h2 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
}

.citation-ready p {
  margin: 0;
  color: var(--color-ink);
  font-size: 1.08rem;
  line-height: 1.65;
}

.citation-ready.key-takeaways ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--color-ink);
  font-size: 1.04rem;
  line-height: 1.65;
}

.citation-ready.key-takeaways li + li {
  margin-top: 0.35rem;
}

.blog-themed .table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 0 6px 20px rgba(11, 58, 68, 0.05);
  -webkit-overflow-scrolling: touch;
}

.blog-themed table {
  width: 100%;
  min-width: 620px;
  margin: 0;
  border-collapse: collapse;
  background: transparent;
}

.blog-themed th,
.blog-themed td {
  padding: 0.8rem 0.9rem;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.blog-themed th {
  color: var(--color-surface);
  background: var(--color-ink);
  font-size: 0.82rem;
  line-height: 1.35;
}

.blog-themed tbody tr:nth-child(even) {
  background: #F7F3EC;
}

.blog-themed tbody tr:last-child td {
  border-bottom: 0;
}

.verdict-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.verdict-pass,
.verdict-green {
  background: var(--verdict-green);
}

.verdict-review,
.verdict-yellow {
  color: var(--color-ink);
  background: var(--verdict-amber);
}

.verdict-flag,
.verdict-red {
  background: var(--verdict-red);
}

.stat-card {
  display: grid;
  gap: 0.25rem;
  margin: 1.5rem 0;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-cta);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.stat-card strong {
  color: var(--color-ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
}

.stat-card span {
  color: var(--color-ink);
  font-weight: 700;
}

.stat-card small {
  color: var(--color-muted);
}

.editorial-visual {
  display: grid;
  place-items: center;
  gap: 0.75rem;
  min-height: 220px;
  margin: 1.5rem 0;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-primary);
  background: linear-gradient(135deg, #E6F0EE, #FFF6E8);
  text-align: center;
}

.editorial-visual svg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.editorial-visual figcaption {
  max-width: 620px;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.editorial-photo,
.comparison-stat {
  margin: 1.5rem 0 2rem;
}

.editorial-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.comparison-stat svg {
  display: block;
  width: 100%;
  height: auto;
}

.comparison-stat text {
  fill: var(--color-ink);
  font-family: Inter, Arial, sans-serif;
  font-size: 17px;
  font-weight: 650;
}

.comparison-stat-review {
  fill: var(--color-primary);
}

.comparison-stat-overcharge {
  fill: var(--color-cta);
}

.editorial-photo figcaption,
.comparison-stat figcaption {
  margin-top: 0.55rem;
  color: var(--color-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.comparison-stat {
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.comparison-stat-row {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) auto;
  gap: 0.35rem 1rem;
  align-items: baseline;
}

.comparison-stat-row + .comparison-stat-row {
  margin-top: 1rem;
}

.comparison-stat-row strong {
  color: var(--color-ink);
  font-size: 1.15rem;
}

.comparison-stat-row i {
  grid-column: 1 / -1;
  display: block;
  width: var(--bar);
  min-width: 1rem;
  height: 0.75rem;
  border-radius: 3px;
  background: var(--color-primary);
}

.comparison-stat-row + .comparison-stat-row i {
  background: var(--color-cta);
}

.back-to-top {
  display: flex;
  justify-content: flex-end;
  margin: 1rem 0;
}

.back-to-top a {
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.author-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.author-card strong,
.author-card small {
  display: block;
}

.author-card strong {
  margin-bottom: 0.2rem;
  color: var(--color-ink);
}

.author-card small {
  color: var(--color-muted);
  line-height: 1.45;
}

.author-photo {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  color: var(--color-surface);
  background: var(--color-primary);
}

.author-photo svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.5rem 0 1rem;
  padding: 0.45rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.filter-button {
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--color-ink);
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-button:hover,
.filter-button.is-active {
  color: var(--color-surface);
  background: var(--color-primary);
}

.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.blog-index-card {
  display: grid;
  grid-template-rows: 76px 1fr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-ink);
  background: var(--color-surface);
  box-shadow: 0 5px 16px rgba(11, 58, 68, 0.05);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.blog-index-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.blog-card-banner {
  color: var(--color-surface);
  background: var(--color-primary);
}

.blog-index-card.category-costs .blog-card-banner {
  background: var(--color-cta);
}

.blog-index-card.category-templates .blog-card-banner {
  background: var(--color-ink);
}

.blog-index-card.category-calculators .blog-card-banner {
  color: var(--color-ink);
  background: var(--verdict-amber);
}

.blog-card-banner svg {
  width: 34px;
  height: 34px;
}

.blog-card-body {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: 1rem;
}

.blog-card-body strong {
  color: var(--color-ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.3;
}

.blog-card-excerpt {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 0.84rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.sticky-bid-cta {
  position: fixed;
  z-index: 50;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: var(--color-ink);
  box-shadow: 0 16px 40px rgba(11, 58, 68, 0.25);
}

.sticky-bid-cta a {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.6rem 0.8rem;
  color: var(--color-surface);
  text-align: center;
  text-decoration: none;
}

.sticky-bid-cta a span {
  color: #FFB38D;
  font-size: 1.2rem;
}

.sticky-bid-cta button {
  width: 38px;
  height: 38px;
  border: 0;
  color: var(--color-surface);
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
}

.sticky-bid-cta button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.blog-themed .cta {
  border-radius: 6px;
  color: var(--color-surface);
  background: var(--color-cta);
}

.blog-themed .cta:hover {
  background: var(--color-cta-hover);
}

.blog-themed aside.card,
.blog-themed article > footer {
  border-color: var(--color-border) !important;
  border-radius: 8px;
  background: var(--color-surface);
}

.blog-themed body > footer,
.blog-themed > footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

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

@media (max-width: 640px) {
  .blog-themed header nav {
    align-items: flex-start;
    gap: 0.65rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }

  .blog-themed header nav > div {
    flex-wrap: wrap;
    gap: 0.65rem 0.9rem;
  }

  .article-hero {
    padding: 1.15rem;
  }

  .article-hero h1 {
    font-size: 1.85rem;
  }

  .blog-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-themed .table-wrap {
    max-height: 70vh;
  }

  .blog-themed th {
    position: sticky;
    z-index: 2;
    top: 0;
  }

  .sticky-bid-cta {
    right: 0.65rem;
    bottom: 0.65rem;
    left: 0.65rem;
  }

  .sticky-bid-cta a {
    flex-wrap: wrap;
    justify-content: flex-start;
    font-size: 0.84rem;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-index-card {
    transition: none;
  }
}
