:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --ink: #172026;
  --muted: #62717f;
  --line: #dce4ed;
  --primary: #126f6a;
  --primary-2: #0f5753;
  --accent: #f3b23c;
  --coral: #d95d4e;
  --violet: #6856c9;
  --green: #2d9b73;
  --shadow: 0 22px 60px rgba(29, 45, 62, 0.12);
  --radius: 8px;
}

[data-bs-theme="dark"] {
  --bg: #15181a;
  --surface: #202529;
  --surface-2: #292f34;
  --ink: #f5f7f9;
  --muted: #a8b3bd;
  --line: #3a444d;
  --primary: #36b9ad;
  --primary-2: #70d5ca;
  --accent: #f2c14e;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(18, 111, 106, 0.08), rgba(18, 111, 106, 0) 340px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.site-header {
  margin-bottom: 24px;
}

.navbar {
  padding: 0 0 22px;
}

.navbar-brand {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 26px rgba(18, 111, 106, 0.25);
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.btn {
  --bs-btn-border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  font-weight: 700;
}

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-2);
  --bs-btn-hover-border-color: var(--primary-2);
  --bs-btn-active-bg: var(--primary-2);
  --bs-btn-active-border-color: var(--primary-2);
}

.btn-outline-dark {
  --bs-btn-color: var(--ink);
  --bs-btn-border-color: var(--line);
  --bs-btn-hover-bg: var(--ink);
  --bs-btn-hover-border-color: var(--ink);
  --bs-btn-hover-color: var(--surface);
  --bs-btn-active-bg: var(--ink);
  --bs-btn-active-border-color: var(--ink);
  --bs-btn-active-color: var(--surface);
}

.btn-icon {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.btn-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: 24px;
  align-items: stretch;
}

.intro-grid > div:first-child,
.entropy-card,
.metric,
.tool-panel,
.output-panel,
.mini-tool {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.intro-grid > div:first-child {
  padding: clamp(28px, 4vw, 56px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: clamp(1.7rem, 2.8vw, 2.75rem);
  line-height: 1.16;
  letter-spacing: 0;
  text-wrap: balance;
}

.intro-copy {
  max-width: 740px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.65;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.entropy-card {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(47, 155, 115, 0.22), transparent 30%),
    linear-gradient(145deg, var(--surface), var(--surface-2));
}

#entropyCanvas {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: block;
}

.entropy-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(12px);
  color: var(--muted);
}

.entropy-caption strong {
  color: var(--primary);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.metric {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  box-shadow: none;
}

.metric strong,
.metric span {
  display: block;
}

.metric strong {
  color: var(--ink);
}

.metric div > span {
  color: var(--muted);
  font-size: 0.92rem;
}

.metric-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: #fff;
  overflow: hidden;
}

.brand-mark i,
.btn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25em;
  height: 1.25em;
  line-height: 1;
  text-align: center;
}

.brand-mark i::before,
.panel-title > i::before,
.mini-title > i::before,
.btn i::before {
  display: block;
  line-height: 1;
}

.metric-icon i {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  line-height: 1;
  text-align: center;
}

.metric-icon i::before {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  font-size: 18px;
  line-height: 1 !important;
  vertical-align: 0 !important;
}

.metric-icon.jwt { background: var(--primary); }
.metric-icon.pass { background: var(--coral); }
.metric-icon.hash { background: var(--violet); }
.metric-icon.key { background: var(--green); }

.tool-tabs {
  gap: 8px;
  margin-bottom: 18px;
}

.tool-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.tool-tabs .nav-link.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(360px, 1.02fr);
  gap: 18px;
}

.stacked-tool {
  margin-top: 18px;
}

.tool-panel,
.output-panel,
.mini-tool {
  padding: 22px;
  box-shadow: none;
}

.panel-title,
.mini-title,
.output-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-title h2,
.mini-title h2,
.output-header h3 {
  margin-bottom: 4px;
  font-size: 1.22rem;
  font-weight: 850;
}

.panel-title p,
.mini-title p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.panel-title > i,
.mini-title > i {
  display: inline-grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--primary);
  font-size: 1.25rem;
}

.mini-title {
  align-items: center;
}

.mini-title > i {
  flex-basis: 40px;
  width: 40px;
  height: 40px;
}

.form-label {
  color: var(--ink);
  font-weight: 760;
  font-size: 0.91rem;
}

.form-control,
.form-select {
  min-height: 44px;
  border-color: var(--line);
  border-radius: var(--radius);
  background-color: var(--surface);
  color: var(--ink);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary) 18%, transparent);
}

.form-check-input:checked {
  border-color: var(--primary);
  background-color: var(--primary);
}

.option-strip,
.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
}

.form-check .form-check-input {
  float: none;
  margin: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.output-header {
  align-items: center;
}

.output-header h3 {
  margin-bottom: 0;
}

.output-actions {
  display: flex;
  gap: 8px;
}

.output-box {
  width: 100%;
  min-height: calc(4lh + 24px);
  resize: vertical;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.55;
  overflow-y: auto;
  overflow-x: auto;
}

.output-box.compact {
  min-height: calc(4lh + 24px);
}

.code-input {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.55;
}

.qr-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.qr-wrap canvas {
  width: 96px;
  height: 96px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.strength-meter,
.hint-line,
.range-readout {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.strength-meter > div {
  width: 100%;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.strength-meter > div > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--accent), var(--green));
  transition: width 180ms ease;
}

.hint-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.mini-tool {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
}

.mini-tool .btn {
  margin-top: auto;
}

.mini-tool .mini-title {
  min-height: 82px;
  align-items: flex-start;
}

.mini-tool .form-control,
.mini-tool .form-select {
  flex: 0 0 auto;
}

.output-actions .btn-icon {
  flex: 0 0 42px;
}

.advanced-output {
  margin-top: 18px;
}

.toast {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  padding: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--primary);
  font-weight: 400;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.doc-link {
  min-height: 42px;
}

.docs-shell {
  max-width: 1280px;
}

.docs-header {
  margin-bottom: 20px;
}

.docs-hero {
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.docs-hero h1 {
  max-width: 920px;
}

.docs-content {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.docs-toc a {
  padding: 8px 10px;
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
}

.docs-toc a.active {
  border-left-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--primary);
}

.docs-toc a:hover {
  background: var(--surface-2);
  color: var(--primary);
}

.docs-sections {
  display: grid;
  gap: 14px;
}

.docs-section {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  border-radius: var(--radius);
  background: var(--surface);
  scroll-margin-top: 18px;
}

.docs-section:target {
  border-left-color: var(--primary);
  box-shadow: inset 4px 0 0 color-mix(in srgb, var(--primary) 22%, transparent);
}

.docs-section h2 {
  margin-bottom: 12px;
  font-size: 1.35rem;
  font-weight: 850;
}

.docs-section p {
  color: var(--muted);
  line-height: 1.65;
}

.docs-section ul {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.docs-section li {
  color: var(--muted);
  line-height: 1.55;
}

.docs-section strong {
  color: var(--ink);
}

.docs-section code {
  color: var(--primary);
}

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

  .tool-layout,
  .intro-grid {
    grid-template-columns: 1fr;
  }

  .docs-content {
    grid-template-columns: 1fr;
  }

  .docs-toc {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 1440px);
    padding-top: 12px;
  }

  .navbar .container-fluid {
    gap: 12px;
  }

  .navbar-brand span:last-child {
    max-width: 180px;
    white-space: normal;
    line-height: 1.1;
  }

  .local-badge {
    display: none;
  }

  .doc-link {
    width: 42px;
    min-width: 42px;
    padding: 0;
    font-size: 0;
  }

  .doc-link i {
    font-size: 1rem;
  }

  .intro-grid > div:first-child,
  .tool-panel,
  .output-panel,
  .mini-tool {
    padding: 16px;
  }

  h1 {
    font-size: clamp(1.55rem, 7.4vw, 2.15rem);
    line-height: 1.18;
  }

  .metrics-grid,
  .advanced-grid,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .tool-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tool-tabs .nav-link {
    width: 100%;
  }

  .docs-toc {
    grid-template-columns: 1fr;
  }

  .output-box {
    min-height: calc(4lh + 24px);
  }
}

/* ===== Blog ===== */

/* Category accent colors (default teal, overridden per card) */
.blog-card,
.article {
  --cat: var(--primary);
}

.docs-hero {
  position: relative;
  overflow: hidden;
}

.docs-hero::after {
  content: "";
  position: absolute;
  inset: auto -120px -160px auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%);
  pointer-events: none;
}

.docs-hero > * {
  position: relative;
  z-index: 1;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(29, 45, 62, 0.06);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.blog-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cat), color-mix(in srgb, var(--cat) 30%, transparent));
  opacity: 0;
  transition: opacity 0.18s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--cat) 45%, var(--line));
  box-shadow: 0 18px 42px rgba(29, 45, 62, 0.14);
}

.blog-card:hover::before {
  opacity: 1;
}

.blog-card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--cat) 14%, var(--surface));
  color: var(--cat);
  font-size: 1.35rem;
}

.blog-tag {
  align-self: flex-start;
  padding: 3px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cat) 14%, var(--surface));
  color: var(--cat);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-card h2 {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink);
}

.blog-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.blog-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
}

.blog-readtime {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.blog-readmore {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--cat);
  font-weight: 800;
  font-size: 0.88rem;
}

.blog-card:hover .blog-readmore i {
  transform: translateX(3px);
}

.blog-readmore i {
  transition: transform 0.18s ease;
}

/* Pagination */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 8px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.page-btn:hover:not(:disabled):not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  cursor: default;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-ellipsis {
  min-width: 24px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.blog-pagecount {
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 28px;
  margin-bottom: 4px;
}

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--cat), var(--primary-2));
  z-index: 1080;
  transition: width 0.08s linear;
}

/* Article page */
.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.blog-back:hover {
  text-decoration: underline;
}

.article {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article-head {
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.article-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cat) 14%, var(--surface));
  color: var(--cat);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.article-head h1 {
  margin: 16px 0 14px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.blog-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.blog-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article > p:first-of-type,
.article-body > p:first-of-type {
  font-size: 1.08rem;
  color: var(--ink);
}

.article h2 {
  margin-top: 34px;
  margin-bottom: 12px;
  font-size: 1.4rem;
  font-weight: 850;
  letter-spacing: -0.01em;
  scroll-margin-top: 16px;
}

.article h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--cat);
  vertical-align: middle;
}

.article h3 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: 1.12rem;
  font-weight: 750;
}

.article p,
.article li {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}

.article ul,
.article ol {
  display: grid;
  gap: 8px;
  padding-left: 1.3rem;
  margin-bottom: 0;
}

.article li::marker {
  color: var(--cat);
}

.article strong {
  color: var(--ink);
}

.article p a,
.article li a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article p a:hover,
.article li a:hover {
  color: var(--primary-2);
}

.article code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--primary);
  font-size: 0.9em;
}

.article pre {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  overflow-x: auto;
}

.article pre code {
  padding: 0;
  background: none;
  color: var(--ink);
}

.article-cta {
  margin-top: 34px;
  padding: 22px 24px;
  border: 1px solid color-mix(in srgb, var(--cat) 30%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--cat) 9%, var(--surface));
}

.article-cta p {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 1.02rem;
}

/* Prev / next post navigation (post pagination) */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 800px;
  margin: 22px auto 0;
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.post-nav-link:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 14px 32px rgba(29, 45, 62, 0.12);
}

.post-nav-link.next {
  text-align: right;
}

.post-nav-dir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-nav-link.next .post-nav-dir {
  justify-content: flex-end;
}

.post-nav-title {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-link.next {
    text-align: left;
  }

  .post-nav-link.next .post-nav-dir {
    justify-content: flex-start;
  }
}
