:root {
  --blog-column: 56rem;
  --blog-gutter: clamp(1.25rem, 4vw, 2rem);
  --blog-title: clamp(1.8rem, 4vw, 2.6rem);
  --blog-list-title: clamp(2rem, 4.5vw, 3rem);
  --blog-h2: clamp(1.3rem, 2.5vw, 1.6rem);
  --blog-h3: 1.3rem;
  --blog-body: 1rem;
  --blog-small: 0.875rem;
  --blog-line: 1.9;
  --blog-card-pad: clamp(1.25rem, 3vw, 1.75rem);
  --blog-rule: 4px;
  --blog-focus: 3px;
  --blog-space: clamp(2rem, 5vw, 3.5rem);
  --blog-ink: var(--text);
  --blog-ink-paper: var(--panel);
  --blog-rule-gradient: linear-gradient(90deg, var(--accent) 0%, var(--accent) 65%, var(--sea) 65%, var(--sea) 100%);
  --blog-promo-gradient: linear-gradient(125deg, var(--accent-dark), color-mix(in srgb, var(--accent-dark) 80%, var(--sea)));
  --blog-warning-tint: color-mix(in srgb, var(--warn) 11%, var(--panel));
  --blog-success-tint: color-mix(in srgb, var(--success) 10%, var(--panel));
}

.blog-skip {
  position: fixed;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--panel);
  color: var(--text);
  border-radius: var(--r-control);
  transform: translateY(-200%);
}
.blog-skip:focus {
  transform: none;
}
.deck-blog-list main,
.reading-wrap,
.article-hero,
.article-masthead,
.breadcrumbs,
.breadcrumb {
  min-width: 0;
}
.reading-wrap,
.article-hero,
.article-masthead,
.breadcrumbs,
.breadcrumb {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--blog-column) + var(--blog-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--blog-gutter);
}
.reading-wrap .article-hero,
.reading-wrap .article-masthead,
.reading-wrap .breadcrumbs,
.reading-wrap .breadcrumb,
.reading-wrap .reading-wrap {
  width: 100%;
  max-width: none;
  padding-inline: 0;
}
.breadcrumbs,
.breadcrumb {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: var(--blog-small);
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.breadcrumbs ol,
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.breadcrumbs a,
.breadcrumb a {
  color: var(--accent-dark);
  text-underline-offset: 0.2em;
}
.blog-list-hero {
  padding-block: var(--blog-space) 2rem;
}
.blog-list-hero::before {
  content: "";
  display: block;
  height: var(--blog-rule);
  margin-bottom: 1.5rem;
  background: var(--blog-rule-gradient);
}
.blog-list-hero h1,
.article-hero h1,
.article-masthead h1,
.article-card h2,
.article-card h3,
.prose h1,
.prose h2,
.prose h3,
.article-body h1,
.article-body h2,
.article-body h3,
#related-posts h2,
.promo-block h2 {
  display: block;
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.02em;
  text-wrap: pretty;
  overflow-wrap: break-word;
}
.blog-list-hero h1 {
  font-size: var(--blog-list-title);
  font-weight: var(--weight-display);
  line-height: 1.3;
  margin-block: 0.75rem 1rem;
}
.blog-list-hero > p:last-child {
  max-width: 45rem;
  color: var(--muted);
  font-size: var(--blog-body);
  line-height: var(--blog-line);
}
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-block: 1.25rem;
  border-block: 1px solid var(--border);
}
.blog-filter button {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--blog-small);
  font-weight: var(--weight-medium);
  border-radius: var(--r-pill);
  padding: 0.65rem 1rem;
  min-height: 2.75rem;
  cursor: pointer;
}
.blog-filter button:hover {
  border-color: var(--accent);
}
.blog-filter button[aria-pressed="true"] {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--on-accent);
}
.blog-results-status {
  margin-block: 1rem;
  color: var(--muted);
  font-size: var(--blog-small);
  min-height: 1.5rem;
}
.blog-card-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--blog-card-pad);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card), inset 0 1px 0 var(--hi);
  transition: border-color var(--motion-time), transform var(--motion-time);
}
.article-card:hover,
.article-card:focus-within {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  color: var(--muted);
  font-size: var(--blog-small);
  line-height: 1.6;
}
.article-meta .data-tag {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-tag);
  color: var(--on-accent);
  background: var(--accent-dark);
  font-weight: var(--weight-medium);
  white-space: normal;
}
.article-meta time,
.article-meta .read-time,
.article-meta .reading-time {
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-variant-numeric: tabular-nums;
}
.article-card h2,
.article-card h3 {
  font-size: var(--blog-h3);
  line-height: 1.55;
  font-weight: var(--weight-heavy);
  margin-block: 1rem 0.65rem;
}
.article-card h2 a,
.article-card h3 a {
  color: var(--text);
  text-decoration: none;
}
.article-card h2 a:hover,
.article-card h3 a:hover {
  color: var(--accent-dark);
}
.article-summary {
  color: var(--muted);
  font-size: var(--blog-body);
  line-height: 1.8;
  margin-block: 0 1.5rem;
}
.article-card > .btn-link {
  align-self: flex-start;
  margin-top: auto;
  color: var(--accent-dark);
  font-weight: var(--weight-semibold);
}
.blog-empty {
  grid-column: 1 / -1;
  padding: 2rem;
  margin: 0;
  border: 1px dashed var(--border);
  border-radius: var(--r-card);
  color: var(--muted);
  line-height: var(--blog-line);
}
.article-hero,
.article-masthead {
  position: relative;
  padding-block: 0 1.5rem;
  background: var(--clear);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.article-hero::before,
.article-masthead::before {
  content: "";
  display: block;
  height: var(--blog-rule);
  margin-bottom: 1.4rem;
  background: var(--blog-rule-gradient);
}
.article-hero::after,
.article-masthead::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 1.75rem;
  background: var(--border);
}
.article-hero h1,
.article-masthead h1,
.prose h1,
.article-body h1 {
  font-size: var(--blog-title);
  font-weight: var(--weight-display);
  line-height: 1.4;
  margin-block: 1.25rem 1rem;
}
.article-hero .article-summary,
.article-masthead .article-summary,
.article-hero > p,
.article-masthead > p {
  font-size: var(--blog-body);
  line-height: var(--blog-line);
  color: var(--muted);
  margin-bottom: 0;
}
.prose,
.article-body {
  font-family: var(--font-body);
  font-size: var(--blog-body);
  line-height: var(--blog-line);
  color: var(--text);
  overflow-wrap: break-word;
  counter-reset: deck-chapter;
}
.reading-wrap.prose.section,
.reading-wrap.article-body.section {
  padding-block: 0 1.5rem;
}
.prose p,
.article-body p {
  margin-block: 0 1.2rem;
}
.prose h2,
.article-body h2 {
  font-size: var(--blog-h2);
  font-weight: var(--weight-heavy);
  line-height: 1.55;
  margin-block: 2rem 1rem;
  scroll-margin-top: var(--anchor-offset);
}
.prose h2::before,
.article-body h2::before {
  counter-increment: deck-chapter;
  content: counter(deck-chapter, decimal-leading-zero);
  display: inline-block;
  vertical-align: 0.12em;
  margin-inline-end: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--r-tag);
  background: var(--panel-2);
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: var(--blog-small);
  font-weight: var(--weight-bold);
  letter-spacing: normal;
}
.prose > h2:first-child,
.article-body > h2:first-child,
.prose > section:first-child > h2:first-child,
.article-body > section:first-child > h2:first-child {
  margin-top: 0.5rem;
}
.prose h3,
.article-body h3 {
  font-size: var(--blog-h3);
  font-weight: var(--weight-bold);
  line-height: 1.6;
  margin-block: 1.5rem 0.75rem;
}
.prose ul,
.prose ol,
.article-body ul,
.article-body ol {
  padding-inline-start: 1.5rem;
  margin-block: 1rem 1.5rem;
}
.prose li,
.article-body li {
  margin-block: 0.5rem;
}
.prose a,
.article-body a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.prose img,
.article-body img,
.prose svg,
.article-body svg {
  max-width: 100%;
  height: auto;
}
.prose hr,
.article-body hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin-block: 2rem;
}
.prose .table-scroll,
.article-body .table-scroll {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  margin-block: 1.5rem;
}
.prose table,
.article-body table {
  border-collapse: collapse;
  width: 100%;
  margin-block: 1.5rem;
  font-size: var(--blog-small);
  line-height: 1.75;
}
.prose .table-scroll table,
.article-body .table-scroll table {
  margin: 0;
  min-width: 38rem;
}
.prose caption,
.article-body caption {
  padding: 0.8rem;
  text-align: left;
  font-weight: var(--weight-bold);
}
.prose th,
.prose td,
.article-body th,
.article-body td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  word-break: keep-all;
  overflow-wrap: normal;
}
.prose thead th,
.article-body thead th {
  color: var(--on-accent);
  background: var(--accent-dark);
  font-weight: var(--weight-bold);
}
.prose tbody th,
.article-body tbody th {
  color: var(--text);
  font-weight: var(--weight-semibold);
}
.prose tbody tr:nth-child(even),
.article-body tbody tr:nth-child(even) {
  background: var(--panel-2);
}
.prose tbody tr:nth-child(odd),
.article-body tbody tr:nth-child(odd) {
  background: var(--panel);
}
.prose tbody tr:hover,
.article-body tbody tr:hover {
  background: var(--accent-a10);
}
.prose pre,
.article-body pre {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
  padding: 2.75rem 1.25rem 1.25rem;
  margin-block: 1.5rem;
  border-radius: var(--r-control);
  background: var(--blog-ink);
  color: var(--blog-ink-paper);
  font-family: var(--font-mono);
  font-size: var(--blog-small);
  line-height: 1.8;
}
.prose pre::before,
.article-body pre::before {
  content: "LINE DECK / TEXT";
  position: absolute;
  inset-block-start: 0.75rem;
  inset-inline-start: 1.25rem;
  color: var(--blog-ink-paper);
  opacity: 0.75;
  font-family: var(--font-mono);
  font-size: var(--blog-small);
  letter-spacing: 0.08em;
}
.prose code,
.article-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: var(--r-tag);
  background: var(--panel-2);
  color: var(--text);
  overflow-wrap: anywhere;
}
.prose pre code,
.article-body pre code {
  padding: 0;
  border-radius: 0;
  background: var(--clear);
  color: inherit;
  overflow-wrap: normal;
  white-space: pre;
}
.callout,
.prose blockquote,
.article-body blockquote {
  position: relative;
  margin: 1.5rem 0;
  padding: 1.25rem 1.25rem 1.25rem 3.3rem;
  border: 0;
  border-inline-start: 4px solid var(--accent);
  border-radius: var(--r-control);
  background: var(--accent-a06);
  color: var(--text);
}
.callout::before,
.prose blockquote::before,
.article-body blockquote::before {
  content: "i";
  position: absolute;
  inset-block-start: 1.3rem;
  inset-inline-start: 1rem;
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  text-align: center;
  line-height: 1.5;
  border: 1px solid currentColor;
  border-radius: var(--r-circle);
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
}
.callout.warning,
.callout-warning {
  border-inline-start-color: var(--warn);
  background: var(--blog-warning-tint);
}
.callout.warning::before,
.callout-warning::before {
  content: "!";
  color: var(--text);
}
.callout.success,
.callout-success {
  border-inline-start-color: var(--success);
  background: var(--blog-success-tint);
}
.callout.success::before,
.callout-success::before {
  color: var(--text);
}
.callout > :last-child,
.prose blockquote > :last-child,
.article-body blockquote > :last-child {
  margin-bottom: 0;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1.5rem;
}
.stat-card {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--r-control);
  background: var(--panel);
}
.stat-card:nth-child(even) {
  border-top-color: var(--sea);
  background: var(--panel-2);
}
.stat-num {
  display: block;
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: var(--weight-bold);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.stat-label {
  display: block;
  margin-top: 0.5rem;
  color: var(--text);
  font-size: var(--blog-small);
  line-height: 1.8;
}
.prose .check-list,
.article-body .check-list,
.check-list {
  list-style: none;
  padding: 0;
  margin-block: 1.5rem;
}
.check-list li {
  padding: 0.85rem 1rem;
  margin-block: 0.6rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
}
.verdict {
  padding: 1.25rem;
  margin-block: 1.5rem;
  border-inline-start: 4px solid var(--accent);
  background: var(--accent-a10);
  border-radius: var(--r-control);
  color: var(--text);
}
.verdict strong {
  color: var(--accent-dark);
  font-weight: var(--weight-bold);
}
.verdict > :last-child {
  margin-bottom: 0;
}
.promo-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding: var(--blog-card-pad);
  margin-block: 2rem;
  border: 1px solid var(--accent-dark);
  border-radius: var(--r-card);
  background: var(--blog-promo-gradient);
  color: var(--on-accent);
}
.promo-copy {
  flex: 1 1 24rem;
  min-width: 0;
}
.promo-block h2,
.promo-block h3 {
  display: block;
  color: var(--on-accent);
  font-family: var(--font-display);
  font-size: var(--blog-h2);
  line-height: 1.5;
  margin-block: 0 0.6rem;
  text-wrap: pretty;
  letter-spacing: -0.02em;
}
.prose .promo-block h2::before,
.article-body .promo-block h2::before {
  content: none;
  counter-increment: none;
}
.promo-block p {
  color: var(--on-accent);
  font-size: var(--blog-body);
  line-height: 1.8;
  margin: 0;
}
.promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.promo-block .btn-primary,
.promo-block .btn-secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid var(--on-accent);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--blog-body);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  box-shadow: none;
}
.promo-block .btn-primary {
  background: var(--panel);
  color: var(--accent-dark);
}
.promo-block .btn-secondary {
  background: var(--clear);
  color: var(--on-accent);
}
.promo-block .btn-primary:hover {
  background: var(--panel-2);
}
.promo-block .btn-secondary:hover {
  background: var(--accent-dark-a30);
}
#related-posts,
#post-nav {
  margin-block: 0;
  padding-block: 1.5rem;
}
#related-posts:empty,
#post-nav:empty {
  display: none;
}
#related-posts > h2 {
  font-size: var(--blog-h2);
  line-height: 1.5;
  margin-block: 0 1rem;
}
.prose #related-posts > h2::before,
.article-body #related-posts > h2::before {
  content: none;
  counter-increment: none;
}
.related-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.related-grid .article-card h3 {
  font-size: 1.1rem;
}
#post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.post-nav-card {
  display: block;
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-top: 4px solid var(--border);
  border-radius: var(--r-control);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: border-color var(--motion-time), transform var(--motion-time);
}
.post-nav-card:hover,
.post-nav-card:focus-visible {
  border-top-color: var(--accent);
  transform: translateY(-3px);
}
.post-nav-next {
  grid-column: 2;
}
.post-nav-label,
.post-nav-title,
.post-nav-card time {
  display: block;
}
.post-nav-label {
  color: var(--accent-dark);
  font-size: var(--blog-small);
  font-weight: var(--weight-semibold);
}
.post-nav-title {
  margin-block: 0.5rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--blog-body);
  line-height: 1.65;
}
.post-nav-card time {
  color: var(--muted);
  font-size: var(--blog-small);
}
.float-cta {
  position: fixed;
  inset-inline-end: 1.25rem;
  inset-block-end: 1.25rem;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  max-width: calc(100vw - 2.5rem);
  min-height: 2.75rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid var(--accent-dark);
  border-radius: var(--r-pill);
  background: var(--accent-dark);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-size: var(--blog-body);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  box-shadow: var(--shadow-card);
}
.float-cta svg {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  color: currentColor;
}
.float-cta:hover {
  background: var(--accent);
}
.blog-filter button:focus-visible,
.article-card a:focus-visible,
.post-nav-card:focus-visible,
.promo-block a:focus-visible,
.float-cta:focus-visible,
.breadcrumbs a:focus-visible,
.breadcrumb a:focus-visible,
.blog-skip:focus-visible {
  outline: var(--blog-focus) solid var(--accent);
  outline-offset: 4px;
}
.promo-block a:focus-visible {
  outline-color: var(--on-accent);
}
@media (max-width: 860px) {
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .prose table,
  .article-body table {
    display: block;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
  }
  .prose .table-scroll table,
  .article-body .table-scroll table {
    display: table;
    width: 100%;
    max-width: none;
  }
}
@media (max-width: 640px) {
  .no-break {
    white-space: normal;
  }
  .blog-card-grid,
  .related-grid,
  #post-nav {
    grid-template-columns: minmax(0, 1fr);
  }
  .post-nav-next {
    grid-column: auto;
  }
  .blog-list-hero h1 {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }
  .article-hero h1,
  .article-masthead h1 {
    font-size: clamp(1.65rem, 6vw, 2.2rem);
  }
  .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .promo-copy {
    flex-basis: 100%;
  }
  .promo-actions {
    width: 100%;
  }
  .float-cta {
    position: sticky;
    inset-block-end: 0.75rem;
    inset-inline-end: auto;
    display: flex;
    width: fit-content;
    max-width: calc(100% - 2.5rem);
    margin: 1rem auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .article-card,
  .post-nav-card,
  .float-cta {
    transition: none;
  }
  .article-card:hover,
  .article-card:focus-within,
  .post-nav-card:hover,
  .post-nav-card:focus-visible {
    transform: none;
  }
}