/* Pine Valley Accounting — theme.css
   Classic professional CPA firm: white ground, deep forest green,
   transitional serif display + clean sans body. */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&family=Public+Sans:wght@400;500;600;700&family=Great+Vibes&display=swap');

/* ---------- Tokens ---------- */

:root {
  --brand-name: "Pine Valley Accounting";
  --brand-name-1: "Pine Valley";
  --brand-name-2: "Accounting";

  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-alt: #f2f5f0;
  --color-ink: #1c2a21;
  --color-ink-muted: #5c6b60;
  --color-brand: #1e3d2f;
  --color-brand-deep: #16291f;
  --color-on-brand: #ffffff;
  --color-accent: #7c9a82;
  --color-border: #dde4dc;
  --color-link: #1e3d2f;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --font-accent: "Great Vibes", cursive;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  /* Squared theme: the mockup's pills/tags are crisp rectangles, not capsules. */
  --radius-pill: 2px;
  --shadow-sm: 0 1px 2px rgba(28, 42, 33, 0.06);
  --shadow-md: 0 8px 24px rgba(28, 42, 33, 0.10);

  --container-max: 1120px;
  --section-pad: 5.5rem;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-ink);
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }

a { color: var(--color-link); }

img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-pad); }
.section-alt { background: var(--color-surface-alt); }

.section-head { max-width: 42rem; margin-bottom: 2.75rem; }

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: clamp(1.65rem, 3.2vw, 2.25rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--color-ink-muted);
  font-size: 1.05rem;
  margin: 0;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: 10;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.05rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

/* Tiered conifer mark extracted from the mockup (assets/extracted/pine-valley/
   brand-mark-pine.svg), inlined as a mask so one copy of the artwork recolors
   for the dark header lockup and the reversed footer lockup. */
.brand-mark {
  display: inline-block;
  width: 26px;
  height: 32px;
  flex: none;
  background: var(--color-brand);
  --brand-mark-src: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22288%22 height=%22400%22 viewBox=%220 0 288.000000 400.000000%22 preserveAspectRatio=%22xMidYMid meet%22%3E %3Cg transform=%22translate(0.000000,400.000000) scale(0.100000,-0.100000)%22 fill=%22%23000%22 stroke=%22none%22%3E %3Cpath d=%22M1421 3729 c-11 -18 -27 -63 -37 -102 -14 -58 -22 -72 -46 -86 -97 -53 -102 -83 -24 -155 58 -54 65 -67 52 -104 -9 -26 -1 -25 -129 -6 -44 7 -67 -9 -98 -66 -11 -19 -31 -50 -45 -69 -30 -43 -25 -62 31 -121 48 -50 64 -92 45 -116 -11 -12 -26 -14 -82 -8 -58 6 -72 4 -88 -11 -25 -23 -25 -36 0 -68 13 -16 38 -29 72 -37 96 -23 118 -35 118 -69 0 -81 -34 -107 -118 -91 -49 9 -60 8 -81 -8 -13 -9 -29 -33 -35 -52 -8 -26 -17 -36 -36 -38 -83 -10 -121 -48 -98 -97 6 -13 48 -54 94 -91 66 -53 86 -76 97 -108 13 -38 19 -43 73 -61 73 -25 88 -54 58 -106 -39 -66 -101 -43 -123 47 l-11 44 -49 0 c-32 0 -64 -8 -95 -25 -26 -14 -59 -25 -74 -25 -68 -1 -152 -69 -152 -123 0 -37 42 -64 114 -72 61 -6 73 -11 111 -46 23 -21 48 -39 56 -39 7 0 32 19 55 41 55 54 78 49 125 -23 48 -75 76 -77 125 -8 38 52 57 59 62 22 5 -29 -22 -77 -58 -102 -45 -32 -98 -36 -146 -12 -21 11 -63 27 -92 35 -51 16 -55 15 -93 -5 -35 -18 -51 -20 -125 -15 -106 8 -134 -3 -134 -49 0 -68 55 -91 231 -99 127 -6 145 -9 153 -30 16 -42 -26 -68 -138 -85 -44 -6 -106 -20 -139 -31 -72 -23 -97 -24 -144 -4 -56 24 -119 20 -148 -10 -56 -55 -20 -113 93 -149 42 -13 97 -32 122 -41 60 -22 192 -23 244 -1 72 30 125 17 141 -35 9 -28 -10 -47 -59 -59 -50 -13 -145 -48 -286 -105 -168 -68 -242 -87 -314 -80 -77 7 -110 -7 -114 -51 -2 -25 3 -37 27 -57 59 -49 178 -57 426 -28 88 10 204 58 285 116 25 18 59 35 75 39 17 4 56 23 88 42 79 49 118 54 151 21 30 -30 33 -66 9 -96 -16 -19 -97 -60 -218 -108 -22 -9 -58 -29 -80 -45 -29 -20 -79 -38 -165 -59 -195 -47 -198 -48 -205 -70 -16 -49 53 -79 192 -87 112 -5 183 5 311 45 95 29 132 25 164 -17 21 -29 24 -72 13 -187 -8 -80 -7 -82 19 -108 25 -25 32 -27 88 -23 52 4 65 9 85 33 24 27 24 31 18 145 -7 105 -5 121 13 163 27 60 55 69 114 34 127 -73 445 -131 523 -95 14 6 28 22 32 36 9 38 -22 60 -109 77 -105 20 -210 58 -288 104 -36 21 -97 48 -135 59 -82 25 -123 60 -132 116 -6 41 16 76 49 76 11 0 47 -26 81 -58 38 -36 100 -79 161 -112 l100 -53 180 -9 c202 -11 242 -8 355 22 93 25 121 47 121 94 0 61 -22 70 -157 62 -142 -8 -340 7 -382 29 -31 15 -46 47 -39 81 5 27 46 44 105 44 49 0 54 2 88 45 32 38 47 48 109 66 75 21 106 46 106 84 0 13 -8 32 -17 43 -22 26 -122 52 -197 52 -36 0 -74 8 -109 24 -29 13 -71 29 -92 36 -51 16 -75 37 -75 66 0 33 29 45 97 38 71 -7 217 33 246 67 23 28 22 81 -2 110 -16 20 -29 24 -83 26 -34 1 -121 6 -193 12 -138 11 -155 19 -155 66 0 29 -19 52 -65 78 -23 13 -49 40 -65 67 -18 32 -39 51 -72 67 -43 21 -47 27 -57 73 -29 134 -3 144 94 35 39 -44 75 -75 87 -75 10 0 34 -6 52 -14 32 -13 34 -17 38 -76 5 -71 21 -90 76 -90 27 0 42 8 71 40 27 30 44 40 66 40 41 0 97 17 107 32 31 49 -18 107 -118 137 -38 12 -85 33 -105 46 -20 13 -63 31 -95 41 -67 19 -114 60 -114 98 0 36 31 47 157 55 116 8 143 22 143 75 0 63 -51 96 -149 96 -36 0 -48 5 -70 31 -14 17 -49 56 -77 87 l-52 56 -36 -32 c-38 -33 -82 -42 -104 -20 -17 17 -15 84 4 102 22 23 66 20 106 -8 34 -23 35 -23 69 -6 19 10 55 20 81 24 63 9 98 38 98 80 0 36 -34 76 -64 76 -9 0 -34 -9 -55 -20 -32 -16 -45 -17 -75 -9 -24 7 -48 7 -73 0 -61 -17 -91 -14 -108 13 -19 29 -7 68 30 92 19 12 36 15 69 10 77 -12 151 34 144 90 -4 39 -62 78 -103 70 -16 -3 -53 -9 -81 -12 -47 -6 -52 -4 -72 21 -12 15 -22 38 -22 51 0 23 42 64 65 64 24 0 65 41 65 66 0 38 -15 59 -64 88 -47 27 -68 65 -81 146 -14 92 -66 121 -104 59z m-136 -593 c38 -16 55 -42 55 -84 0 -44 -22 -58 -70 -43 -66 20 -91 80 -50 121 24 24 22 24 65 6z m69 -298 c13 -36 -8 -105 -34 -113 -31 -10 -110 30 -110 55 0 50 50 92 105 87 22 -1 32 -9 39 -29z m362 -286 c31 -20 45 -91 22 -109 -26 -20 -70 -24 -94 -9 -32 22 -42 80 -19 106 18 20 69 27 91 12z m-643 -89 c57 -35 97 -73 97 -93 0 -37 -71 -71 -108 -51 -33 18 -92 106 -92 138 0 16 3 33 7 37 11 11 49 -2 96 -31z m242 -19 c22 -34 30 -86 16 -113 -26 -48 -121 -3 -107 51 9 36 44 88 60 88 7 0 21 -12 31 -26z m12 -272 c20 -12 25 -55 10 -77 -13 -16 -17 -17 -31 -6 -9 7 -16 28 -16 46 0 42 11 54 37 37z m393 -297 c36 -30 84 -62 107 -71 43 -17 69 -57 57 -89 -8 -21 -27 -19 -116 11 -87 29 -129 66 -149 134 -9 31 -9 43 1 55 20 24 31 19 100 -40z m12 -422 c49 -30 71 -38 113 -38 42 -1 59 -7 86 -29 l33 -28 111 7 c97 6 114 5 128 -10 20 -20 22 -48 4 -63 -7 -6 -51 -14 -97 -17 -83 -7 -86 -6 -134 25 -40 26 -56 31 -85 26 -114 -18 -116 -18 -194 9 -44 16 -84 37 -92 49 -20 27 -19 71 1 90 25 25 61 19 126 -21z m-444 11 c32 -22 30 -76 -3 -102 -34 -27 -93 -36 -143 -23 -84 23 -80 66 10 110 68 35 103 38 136 15z m626 -297 c24 -17 17 -48 -13 -64 -46 -22 -88 21 -56 57 21 23 44 25 69 7z%22/%3E %3C/g%3E %3C/svg%3E");
  -webkit-mask: var(--brand-mark-src) center / contain no-repeat;
  mask: var(--brand-mark-src) center / contain no-repeat;
}

/* Two-part lockup: serif "PINE VALLEY" over a light, widely tracked sans
   "ACCOUNTING" — real text, no artwork. */
.brand-name::before {
  content: var(--brand-name-1);
  display: block;
}

.brand-name::after {
  content: var(--brand-name-2);
  display: block;
  font-family: var(--font-body);
  font-size: 0.52em;
  font-weight: 400;
  letter-spacing: 0.3em;
  margin-top: 0.12em;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-brand);
  line-height: 1.1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-ink);
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
}

.nav-link:hover { color: var(--color-brand); }

.nav-link.is-active {
  color: var(--color-brand);
  border-bottom-color: var(--color-brand);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  padding: 0.8rem 1.7rem;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.btn-primary:hover { background: var(--color-brand-deep); }

.btn-secondary {
  background: transparent;
  color: var(--color-brand);
  border-color: var(--color-brand);
}

.btn-secondary:hover {
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.btn-small {
  padding: 0.5rem 1.15rem;
  font-size: 0.74rem;
}

/* ---------- Cards & media ---------- */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.card-media { display: block; }

.card-body {
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.card-title {
  font-size: 1.18rem;
  font-weight: 600;
  margin: 0;
}

.card-text {
  color: var(--color-ink-muted);
  font-size: 0.94rem;
  margin: 0;
  flex: 1;
}

.card-link {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-brand);
  margin-top: 0.6rem;
}

.card-link::after { content: " \2192"; }
.card-link:hover { text-decoration: underline; }

/* Media placeholders: pine-forest / mountain-lake photographic mood */

.media-ph {
  display: block;
  width: 100%;
  border-radius: 0;
  background:
    radial-gradient(120% 90% at 20% 110%, rgba(22, 41, 31, 0.85) 0%, rgba(22, 41, 31, 0) 45%),
    radial-gradient(110% 80% at 85% 105%, rgba(30, 61, 47, 0.7) 0%, rgba(30, 61, 47, 0) 42%),
    linear-gradient(170deg, #d8e2da 0%, #b5c8b9 34%, #8aa694 58%, #4f6d59 82%, #27412f 100%);
}

.media-ph--wide { aspect-ratio: 16 / 9; }
.media-ph--square { aspect-ratio: 1 / 1; }
.media-ph--tall { aspect-ratio: 3 / 4; }

/* Standalone media placeholders (not flush inside a card) get soft corners */
.post-hero .media-ph,
.prose .media-ph { border-radius: var(--radius-lg); }

/* Blog imagery: real photos layered over the painted fallback gradients.
   Layer order: green tint (multiply grade) -> photo -> painted fallback. */

.post-hero .media-ph,
.prose figure .media-ph,
.related-grid .card .media-ph {
  background-size: auto, cover, auto, auto, auto;
  background-position: center, center, center, center, center;
  background-repeat: no-repeat;
  background-blend-mode: multiply, normal, normal, normal, normal;
  filter: saturate(0.9);
}

.post-hero .media-ph {
  background-image:
    linear-gradient(rgba(30, 61, 47, 0.10), rgba(30, 61, 47, 0.10)),
    url("../../assets/img/pack/blog-hero.webp"),
    radial-gradient(120% 90% at 20% 110%, rgba(22, 41, 31, 0.85) 0%, rgba(22, 41, 31, 0) 45%),
    radial-gradient(110% 80% at 85% 105%, rgba(30, 61, 47, 0.7) 0%, rgba(30, 61, 47, 0) 42%),
    linear-gradient(170deg, #d8e2da 0%, #b5c8b9 34%, #8aa694 58%, #4f6d59 82%, #27412f 100%);
}

.prose figure .media-ph {
  background-image:
    linear-gradient(rgba(30, 61, 47, 0.10), rgba(30, 61, 47, 0.10)),
    url("../../assets/img/pack/blog-figure.webp"),
    radial-gradient(120% 90% at 20% 110%, rgba(22, 41, 31, 0.85) 0%, rgba(22, 41, 31, 0) 45%),
    radial-gradient(110% 80% at 85% 105%, rgba(30, 61, 47, 0.7) 0%, rgba(30, 61, 47, 0) 42%),
    linear-gradient(170deg, #d8e2da 0%, #b5c8b9 34%, #8aa694 58%, #4f6d59 82%, #27412f 100%);
}

.related-grid .card:nth-child(1) .media-ph {
  background-image:
    linear-gradient(rgba(30, 61, 47, 0.10), rgba(30, 61, 47, 0.10)),
    url("../../assets/img/pack/blog-rel-1.webp"),
    radial-gradient(120% 90% at 20% 110%, rgba(22, 41, 31, 0.85) 0%, rgba(22, 41, 31, 0) 45%),
    radial-gradient(110% 80% at 85% 105%, rgba(30, 61, 47, 0.7) 0%, rgba(30, 61, 47, 0) 42%),
    linear-gradient(170deg, #d8e2da 0%, #b5c8b9 34%, #8aa694 58%, #4f6d59 82%, #27412f 100%);
}

.related-grid .card:nth-child(2) .media-ph {
  background-image:
    linear-gradient(rgba(30, 61, 47, 0.10), rgba(30, 61, 47, 0.10)),
    url("../../assets/img/pack/blog-rel-2.webp"),
    radial-gradient(120% 90% at 20% 110%, rgba(22, 41, 31, 0.85) 0%, rgba(22, 41, 31, 0) 45%),
    radial-gradient(110% 80% at 85% 105%, rgba(30, 61, 47, 0.7) 0%, rgba(30, 61, 47, 0) 42%),
    linear-gradient(170deg, #d8e2da 0%, #b5c8b9 34%, #8aa694 58%, #4f6d59 82%, #27412f 100%);
}

.related-grid .card:nth-child(3) .media-ph {
  background-image:
    linear-gradient(rgba(30, 61, 47, 0.10), rgba(30, 61, 47, 0.10)),
    url("../../assets/img/pack/blog-rel-3.webp"),
    radial-gradient(120% 90% at 20% 110%, rgba(22, 41, 31, 0.85) 0%, rgba(22, 41, 31, 0) 45%),
    radial-gradient(110% 80% at 85% 105%, rgba(30, 61, 47, 0.7) 0%, rgba(30, 61, 47, 0) 42%),
    linear-gradient(170deg, #d8e2da 0%, #b5c8b9 34%, #8aa694 58%, #4f6d59 82%, #27412f 100%);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-brand-deep);
  color: rgba(255, 255, 255, 0.78);
  margin-top: var(--section-pad);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-block: 4rem 2.5rem;
}

.footer-col { display: flex; flex-direction: column; gap: 0.55rem; align-items: flex-start; }

.footer-about .brand-mark { background: #ffffff; }
.footer-about .brand-name { color: #ffffff; }

.footer-tagline {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0.75rem 0 0;
  max-width: 22rem;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 0.5rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-link:hover { color: #ffffff; text-decoration: underline; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Dashboard ---------- */

.dash-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 2.5rem;
  align-items: start;
  padding-block: 3rem;
}

.dash-sidebar {
  position: sticky;
  top: 1.5rem;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.dash-nav-link {
  display: block;
  padding: 0.6rem 0.9rem;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-ink-muted);
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
}

.dash-nav-link:hover { color: var(--color-brand); background: rgba(30, 61, 47, 0.06); }

.dash-nav-link.is-active {
  color: var(--color-brand);
  background: #ffffff;
  border-left-color: var(--color-brand);
  box-shadow: var(--shadow-sm);
}

.dash-main {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-width: 0;
}

.dash-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.page-title {
  font-size: 1.9rem;
  margin: 0 0 0.25rem;
}

.page-sub {
  color: var(--color-ink-muted);
  margin: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-brand);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-brand);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.86rem;
  color: var(--color-ink-muted);
}

.stat-delta {
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.3rem;
}

.stat-delta.is-up { color: #2e6b45; }
.stat-delta.is-down { color: #9a5b2c; }
.stat-delta.is-info { color: var(--color-ink-muted); }

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-alt);
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.panel-body { padding: 1.5rem; }

/* Tables */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.table th {
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  padding: 0.6rem 0.9rem;
  border-bottom: 2px solid var(--color-brand);
}

.table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
}

.table tbody tr:hover { background: var(--color-surface-alt); }

/* Badges */

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  color: var(--color-ink-muted);
  background: var(--color-surface-alt);
}

.badge.is-success { color: #2e6b45; background: #e7f1e9; border-color: #c4dcc9; }
.badge.is-warning { color: #8a5420; background: #f7efe2; border-color: #e4d3b4; }
.badge.is-info    { color: #34566e; background: #e8eff4; border-color: #c8d8e2; }

/* Activity */

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.94rem;
}

.activity-item:last-child { border-bottom: none; }

.activity-time {
  margin-left: auto;
  flex: none;
  font-size: 0.8rem;
  color: var(--color-ink-muted);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--color-brand);
  color: var(--color-on-brand);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Forms */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
  max-width: 26rem;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
}

.form-input,
.form-select {
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--color-ink);
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.form-input:focus,
.form-select:focus {
  outline: 2px solid var(--color-brand);
  outline-offset: 0;
  border-color: var(--color-brand);
}

.form-actions { margin-top: 0.4rem; }

/* ---------- Blog post ---------- */

.post {
  max-width: 760px;
  margin-inline: auto;
  padding-top: 3.5rem;
}

.post-header { text-align: center; margin-bottom: 2.5rem; }

.tag-list {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-brand);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.9rem;
}

.tag:hover { border-color: var(--color-brand); }

.post-title {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  letter-spacing: -0.012em;
  margin-bottom: 0.75rem;
}

.post-excerpt {
  font-size: 1.15rem;
  color: var(--color-ink-muted);
  max-width: 36rem;
  margin: 0 auto 1.5rem;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--color-ink-muted);
}

.post-meta .avatar { width: 34px; height: 34px; font-size: 0.72rem; }

.post-meta-author { font-weight: 600; color: var(--color-ink); }

.post-meta-sep { color: var(--color-border); }

.post-hero { margin-bottom: 3rem; }

/* Prose */

.prose {
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose h2 {
  font-size: 1.6rem;
  margin: 2.25em 0 0.6em;
}

.prose h3 {
  font-size: 1.25rem;
  margin: 1.8em 0 0.5em;
}

.prose p { margin: 0 0 1.2em; }

.prose a {
  color: var(--color-link);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 3px;
}

.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--color-brand); }

.prose blockquote {
  margin: 2em 0;
  padding: 0.4em 0 0.4em 1.5em;
  border-left: 3px solid var(--color-brand);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--color-brand);
}

.prose blockquote p { margin: 0; }

.prose figure { margin: 2.25em 0; }

.prose figcaption {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  text-align: center;
  margin-top: 0.75em;
}

.prose code {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.12em 0.4em;
  color: var(--color-brand);
}

.prose pre {
  background: var(--color-brand-deep);
  color: #dfe9e1;
  border-radius: var(--radius-md);
  padding: 1.25em 1.5em;
  overflow-x: auto;
  margin: 0 0 1.2em;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  margin: 2em 0;
}

.prose table th {
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-on-brand);
  background: var(--color-brand);
  padding: 0.65rem 0.9rem;
}

.prose table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
}

.prose table tbody tr:nth-child(even) { background: var(--color-surface-alt); }

.prose hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5em 0;
}

/* Author card */

.author-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  margin-top: 3rem;
}

.author-card .avatar { width: 52px; height: 52px; }

.author-card-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.author-card-bio {
  font-size: 0.94rem;
  color: var(--color-ink-muted);
  margin: 0;
}

/* Related posts */

.related-posts .section-head { text-align: center; margin-inline: auto; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; }
  .dash-nav { flex-direction: row; flex-wrap: wrap; }
  .dash-nav-link { border-left: none; }
  .dash-nav-link.is-active { box-shadow: inset 0 -2px 0 var(--color-brand), var(--shadow-sm); }
}

@media (max-width: 640px) {
  :root { --section-pad: 3.5rem; }
  .site-header-inner { flex-direction: column; align-items: flex-start; gap: 0.85rem; }
  .site-nav { gap: 0.9rem 1.1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .activity-item { flex-wrap: wrap; }
  .activity-time { margin-left: 56px; width: 100%; }
  .post { padding-top: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
