/* FloorMatReview — static theme
   Structure: tokens -> base -> header/nav -> hero -> cards -> article -> product UI -> footer -> responsive */

:root {
  --ink: #0f1b2d;
  --ink-soft: #22334a;
  --brand: #17b4c9;
  --brand-dark: #0d8fa1;
  --accent: #ff7a18;
  --bg: #ffffff;
  --bg-soft: #f4f7fa;
  --bg-tint: #eaf7fa;
  --border: #e2e8f0;
  --text: #1c2733;
  --muted: #5c6b7a;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.06), 0 1px 3px rgba(15, 27, 45, 0.08);
  --shadow-md: 0 12px 32px rgba(15, 27, 45, 0.09);
  --wrap: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand em {
  font-style: normal;
  color: var(--brand-dark);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), #0f4c81 70%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
  position: relative;
  flex: none;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px 7px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0 2px, transparent 2px 5px);
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.site-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--bg-tint);
  color: var(--brand-dark);
  text-decoration: none;
}

/* Mobile nav toggle: hidden on desktop, enabled at the 860px breakpoint */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 11px 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}


/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(23, 180, 201, 0.18), transparent 60%),
    radial-gradient(700px 380px at 88% 0%, rgba(15, 76, 129, 0.14), transparent 60%),
    linear-gradient(180deg, #f8fbfd, #ffffff);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  padding: 64px 20px 56px;
}

.hero-kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  max-width: 18ch;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-text {
  margin: 0 0 26px;
  max-width: 62ch;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  margin: 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
}

.hero-stats strong {
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--ink);
}

.hero-stats span {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-note {
  margin: 16px 0 0;
  max-width: 62ch;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: #16283f;
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.btn-amazon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffb347, var(--accent));
  color: #2a1500 !important;
  font-weight: 800;
  font-size: 0.94rem;
  border: 1px solid #e96a00;
  box-shadow: 0 6px 14px rgba(255, 122, 24, 0.25);
}

.btn-amazon:hover {
  filter: brightness(1.04);
  text-decoration: none;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.85rem;
  width: 100%;
}

/* ---------- Sections ---------- */

.section {
  padding: 52px 0 8px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.section-link {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  text-decoration: none;
}

.section-link:hover {
  text-decoration: underline;
}

.trust {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  margin: 56px auto 64px;
  max-width: calc(var(--wrap) - 40px);
}

.trust h2 {
  margin: 0 0 20px;
  font-size: 1.35rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.trust-grid h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--brand-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.trust-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* ---------- Article cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cfe0e6;
}

.card-media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 20px;
}

.card-cat {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-dark);
}

.card-title {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.card-title a {
  color: var(--ink);
}

.card-excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Listing pages ---------- */

.listing-main {
  padding-top: 40px;
  padding-bottom: 64px;
}

.listing-header {
  margin-bottom: 28px;
  max-width: 70ch;
}

.listing-header h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.listing-intro {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.listing-count {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 44px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  background: #fff;
}

.pagination a:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  text-decoration: none;
}

.pagination .is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.pagination .page-prev {
  margin-right: auto;
}

.pagination .page-next {
  margin-left: auto;
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: #b8c4d0;
}

/* ---------- Article ---------- */

.post-main {
  padding-top: 28px;
  padding-bottom: 64px;
}

.post-header {
  margin-bottom: 26px;
}

.post-header h1 {
  margin: 10px 0 14px;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.13;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.eyebrow {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--brand-dark) !important;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.post-meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.post-hero {
  margin: 0 0 28px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.post-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-disclosure {
  margin: 0 0 26px;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 44px;
  align-items: start;
}

.post-aside {
  position: sticky;
  top: 92px;
  font-size: 0.9rem;
}

/* ---------- Prose ---------- */

.post-body {
  min-width: 0;
  font-size: 1.02rem;
  color: var(--ink-soft);
}

.post-body > *:first-child {
  margin-top: 0;
}

.post-body p {
  margin: 0 0 20px;
}

.post-body h2 {
  margin: 44px 0 14px;
  font-size: 1.55rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.post-body h3 {
  margin: 32px 0 10px;
  font-size: 1.2rem;
  line-height: 1.35;
  color: var(--ink);
}

.post-body h4 {
  margin: 26px 0 8px;
  font-size: 1.02rem;
  color: var(--ink);
}

.post-body ul,
.post-body ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.post-body li {
  margin: 0 0 8px;
}

.post-body li::marker {
  color: var(--brand);
}

.post-body a {
  text-decoration: underline;
  text-decoration-color: rgba(13, 143, 161, 0.35);
  text-underline-offset: 3px;
}

.post-body a:hover {
  text-decoration-color: currentColor;
}

.post-body a.btn-amazon,
.post-body a.pcard-title,
.post-body a.pcard-media,
.post-body a.cmp-name,
.post-body a.cmp-thumb {
  text-decoration: none;
}

.post-body img {
  border-radius: var(--radius-sm);
}

.post-body figure {
  margin: 26px 0;
}

.post-body figcaption {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.post-body blockquote {
  margin: 26px 0;
  padding: 14px 20px;
  border-left: 4px solid var(--brand);
  background: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.94rem;
}

.post-body table th,
.post-body table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.post-body table th {
  background: var(--bg-soft);
  color: var(--ink);
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

.post-body iframe {
  max-width: 100%;
  border: 0;
}

.cta-row {
  margin: 26px 0;
  text-align: center;
}

.cta-wrap {
  display: inline-flex;
}

/* ---------- Table of contents ---------- */

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.toc-aside {
  max-height: calc(100vh - 140px);
  overflow: auto;
}

.toc-title {
  margin: 0 0 10px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  line-height: 1.45;
}

.toc-list li {
  margin: 0;
}

.toc-list a {
  display: block;
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--ink-soft);
}

.toc-list a:hover {
  background: #fff;
  color: var(--brand-dark);
  text-decoration: none;
}

.toc-h3 a {
  padding-left: 20px;
  font-size: 0.84rem;
  color: var(--muted);
}

.toc-mobile {
  display: none;
  margin: 0 0 26px;
}

.toc-mobile summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.toc-mobile .toc-list {
  margin-top: 10px;
}

/* ---------- Product cards (AzonPress replacement) ---------- */

.pcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin: 28px 0;
  padding: 0;
}

.pcard-single {
  display: grid;
  grid-template-columns: minmax(0, 330px);
  justify-content: center;
  margin: 28px 0;
  padding: 0;
}

.pcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 20px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.pcard:hover {
  box-shadow: var(--shadow-md);
  border-color: #cfe0e6;
}

.pcard-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.pcard-media img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 0;
}

.pcard-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 0;
}

.pcard-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-dark);
  line-height: 1.35;
}

.pcard-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.pcard-title:hover {
  color: var(--brand-dark);
}

.pcard .btn-amazon {
  margin-top: auto;
  width: 100%;
}

.pcard-grid:has(.pcard:only-child) {
  grid-template-columns: minmax(0, 330px);
}

/* Cards whose AzonPress record was stale link to an Amazon search instead of a
   specific (wrong) product, so they carry no product image. */
.pcard-text {
  align-items: flex-start;
  gap: 0;
  text-align: left;
}

.pcard-text .pcard-body {
  gap: 12px;
}

.pcard-text .pcard-title {
  font-size: 1.02rem;
}

/* ---------- Comparison table ---------- */

.cmp-scroll {
  margin: 30px 0 4px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.cmp-table {
  width: 100%;
  min-width: 660px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.cmp-table th,
.cmp-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.cmp-table tr > *:last-child {
  border-right: 0;
}

.cmp-table tbody tr:last-child > * {
  border-bottom: 0;
}

.cmp-table thead th {
  background: var(--bg-soft);
  vertical-align: top;
}

.cmp-table tbody th[scope="row"] {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 148px;
  text-align: left;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: #fbfdff;
}

.cmp-corner {
  width: 148px;
}

.cmp-product {
  min-width: 150px;
  font-weight: 400;
}

.cmp-thumb img {
  margin: 0 auto 10px;
  width: 75px;
  height: 75px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.cmp-name {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.cmp-name:hover {
  color: var(--brand-dark);
}

.cmp-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--brand-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cmp-badge-row td,
.cmp-badge-row th {
  font-weight: 700;
  color: var(--ink);
  background: #f7fbfd;
}

.cmp-buy {
  padding: 10px 8px;
}

.cmp-note {
  margin: 10px 0 28px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- Related ---------- */

.related {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.related h2 {
  margin: 0 0 22px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

/* ---------- Static pages, sitemap, 404 ---------- */

.page-main {
  padding-top: 28px;
  padding-bottom: 64px;
}

.page .post-body {
  max-width: 78ch;
}

.page-intro {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.sitemap-groups {
  display: grid;
  gap: 34px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 34px;
}

.sitemap-group {
  margin-bottom: 30px;
}

.sitemap-group h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.sitemap-count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--brand-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.sitemap-group ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.94rem;
  line-height: 1.8;
}

.error-page {
  text-align: center;
  max-width: 60ch;
  margin: 40px auto;
}

.error-code {
  margin: 0;
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--bg-tint);
  -webkit-text-stroke: 2px var(--brand);
}

.error-page h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 12px 0 10px;
}

.error-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.error-links a {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
}

.error-links a:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  text-decoration: none;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 40px;
  background: var(--ink);
  color: #c9d5e1;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 34px;
}

.footer-brand .brand {
  color: #fff;
}

.footer-brand p {
  margin: 14px 0 0;
  max-width: 40ch;
  color: #9fb1c3;
  line-height: 1.6;
}

.footer-col h2 {
  margin: 4px 0 12px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #7f93a7;
}

.footer-col a {
  display: block;
  padding: 5px 0;
  color: #dbe5ee;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  padding-bottom: 26px;
}

.footer-bottom .disclosure {
  margin: 0 0 8px;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #8fa3b7;
  max-width: 90ch;
}

.footer-bottom .copyright {
  margin: 0;
  font-size: 0.78rem;
  color: #7f93a7;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .post-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .post-aside {
    display: none;
  }

  .toc-mobile {
    display: block;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {

  .nav-toggle {
    display: flex;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 10px 20px 18px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 10px;
    border-radius: 10px;
    font-size: 1rem;
  }

  .header-inner {
    position: relative;
  }

  .hero-inner {
    padding: 44px 20px 38px;
  }

  .hero-stats {
    gap: 24px;
  }

  .trust-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .trust {
    padding: 26px 20px;
    margin-left: 12px;
    margin-right: 12px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pcard-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
  }

  .pcard {
    padding: 16px 12px;
  }

  .pcard-media img {
    width: 130px;
    height: 130px;
  }

  .post-body h2 {
    font-size: 1.34rem;
  }

  .pagination .page-prev,
  .pagination .page-next {
    margin: 0;
  }

  .sitemap-groups {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .post-aside,
  .toc-mobile,
  .related,
  .pagination {
    display: none !important;
  }

  body {
    font-size: 12pt;
  }

  .card,
  .pcard {
    box-shadow: none;
  }
}

