/* Harvest Lane Mercantile — farmhouse home-goods theme
   Cream paper, olive bands, bookish letterspaced serif, botanical sprigs. */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Karla:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Caveat:wght@500;600&display=swap');

:root {
  /* two-part lockup: display line over a rule-flanked descriptor */
  --brand-name: "Harvest Lane Mercantile";
  --brand-name-1: "Harvest Lane";
  --brand-name-2: "Mercantile";

  --color-bg: #F6F2E9;
  --color-surface: #FDFBF4;
  --color-surface-alt: #EDE5D2;
  --color-ink: #2F2B20;
  --color-ink-muted: #71695A;
  --color-brand: #4F5D2F;
  --color-on-brand: #F7F4EA;
  --color-accent: #B9912F;
  --color-border: #DED4BD;
  --color-link: #4F5D2F;

  /* theme-internal extensions */
  --color-brand-deep: #39441F;
  --color-tan: #E7D9B8;
  --color-sage: #8A9668;

  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Karla", "Helvetica Neue", Arial, sans-serif;
  --font-accent: "Caveat", "Comic Sans MS", cursive;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-pill: 2px;
  --shadow-sm: 0 1px 3px rgba(47, 43, 32, 0.08);
  --shadow-md: 0 10px 28px -12px rgba(47, 43, 32, 0.22);

  --container-max: 1120px;
  --section-pad: 4.75rem;

  /* painted still-life placeholder, kept as the fallback layer under real photos */
  --media-paint:
    radial-gradient(circle at 24% 30%, rgba(138, 150, 104, 0.55) 0 18%, transparent 42%),
    radial-gradient(circle at 72% 24%, rgba(231, 217, 184, 0.9) 0 16%, transparent 40%),
    radial-gradient(circle at 62% 74%, rgba(122, 96, 58, 0.35) 0 20%, transparent 46%),
    radial-gradient(circle at 18% 82%, rgba(79, 93, 47, 0.3) 0 14%, transparent 38%),
    linear-gradient(160deg, #EFE7D2 0%, #DFD2B2 48%, #C9B98F 100%);

  /* subtle olive-to-umber wash that grades pack photos into the palette */
  --photo-grade: linear-gradient(rgba(79, 93, 47, 0.13), rgba(122, 96, 58, 0.10));

  /* utility nav glyphs (search / account / bag) — lucide search / user /
     shopping-bag, verbatim path data, ink stroke. Used only where the shared
     HTML gives no markup hook; the landing page inlines the same icons. */
  --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F2B20' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 21-4.34-4.34'/%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3C/svg%3E");
  --icon-account: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F2B20' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  --icon-bag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F2B20' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3Cpath d='M3.103 6.034h17.794'/%3E%3Cpath d='M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z'/%3E%3C/svg%3E");

  /* botanical artwork traced from the mockup (assets/extracted/harvest-lane).
     The brand sprig ships in two fills of the same traced geometry so the
     shared pages — which give no markup hook to recolour — can paint it
     olive-on-cream in the header and cream-on-olive in the footer. The
     landing page inlines the same trace and drives it from currentColor. */
  --sprig-mark: url("../../assets/img/harvest-lane/brand-mark-sprig.svg");
  --sprig-mark-cream: url("../../assets/img/harvest-lane/brand-mark-sprig-cream.svg");
  --sprig-ribbon: url("../../assets/img/harvest-lane/icon-sprig-small.svg");
  --flourish-spring: url("../../assets/img/harvest-lane/flourish-botanical-spring.svg");
  --flourish-corner: url("../../assets/img/harvest-lane/flourish-botanical-corner.svg");
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

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

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

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

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

img { max-width: 100%; }

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

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

/* ---------- header chrome ---------- */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

/* olive announcement ribbon — part of the brand chrome on every page.
   The leading glyph is the traced ribbon sprig, sized by the file's own
   width/height so it can ride inside the pseudo-element's content. */
.site-header::before {
  content: var(--sprig-ribbon) "\00a0 Free local delivery on orders $75+  \00b7  Curbside pickup available";
  display: block;
  background: var(--color-brand);
  color: var(--color-on-brand);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.55rem 1rem;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--color-ink);
}

.brand-mark {
  display: inline-block;
  flex: 0 0 auto;
  width: 36px;
  height: 52px;
  background: var(--sprig-mark) center / contain no-repeat;
}

.site-footer .brand-mark { background-image: var(--sprig-mark-cream); }

/* two-part lockup: "HARVEST LANE" over a rule-flanked "MERCANTILE" */
.brand-name {
  font-family: var(--font-display);
  text-align: center;
  line-height: 1.1;
}

.brand-name::before {
  content: var(--brand-name-1);
  display: block;
  font-size: 1.34rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-indent: 0.2em;
  white-space: nowrap;
}

/* descriptor line, flanked left and right by short 1px rules */
.brand-name::after {
  content: var(--brand-name-2);
  display: block;
  margin-top: 0.3em;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-indent: 0.3em;
  white-space: nowrap;
  color: var(--color-ink-muted);
  padding-inline: 2.4em;
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-size: 1.7em 1px;
  background-position: left center, right center;
  background-repeat: no-repeat;
}

.site-footer .brand-name::after { color: rgba(247, 244, 234, 0.78); }

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

/* utility icons at the far right of the nav (search / account / bag).
   Shared pages have no markup hook for them, so the nav paints them. */
.site-nav::after {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 106px;
  height: 22px;
  margin-left: 0.5rem;
  background:
    var(--icon-search) left center / 21px 21px no-repeat,
    var(--icon-account) center center / 21px 21px no-repeat,
    var(--icon-bag) right center / 21px 21px no-repeat;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-ink);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
}

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

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

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  padding: 0.8rem 1.6rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary:hover { background: var(--color-brand-deep); border-color: 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 1rem; font-size: 0.72rem; }

/* ---------- sections ---------- */

.section { padding-block: var(--section-pad); }

.section-alt {
  background: var(--color-surface-alt);
  border-block: 1px solid var(--color-border);
}

.section-head {
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
  margin-bottom: 2.75rem;
}

.eyebrow {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.7rem;
}

.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

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

/* ---------- 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;
  box-shadow: var(--shadow-sm);
}

.card-media { display: block; }

.card-media .media-ph { border-radius: 0; border: 0; }

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

.card-title { font-size: 1.15rem; margin: 0; }

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

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

.card-link:hover { color: var(--color-accent); }

/* CSS-painted photography stand-ins: shelf-lit still-life mood */
.media-ph {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--media-paint);
}

.media-ph::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(247, 244, 234, 0.55);
  border-radius: inherit;
  pointer-events: none;
}

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

/* ---------- footer ---------- */

.site-footer {
  background: var(--color-brand-deep);
  color: var(--color-on-brand);
  margin-top: var(--section-pad);
}

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

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

/* footer lockup carries the brand at display size, not as a small caption */
.footer-about .brand {
  color: var(--color-on-brand);
  margin-bottom: 0.9rem;
  gap: 1rem;
}

.footer-about .brand-mark { width: 46px; height: 66px; }

.footer-about .brand-name::before { font-size: 1.5rem; }

.footer-about .brand-name::after { font-size: 0.72rem; margin-top: 0.4em; }

.footer-tagline { color: rgba(247, 244, 234, 0.72); margin: 0; font-size: 0.95rem; }

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

.footer-link {
  color: rgba(247, 244, 234, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-link:hover { color: var(--color-on-brand); text-decoration: underline; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.3rem;
  border-top: 1px solid rgba(247, 244, 234, 0.18);
  font-size: 0.85rem;
  color: rgba(247, 244, 234, 0.66);
}

/* ---------- dashboard ---------- */

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

.dash-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  position: sticky;
  top: 1.5rem;
}

.dash-nav { display: flex; flex-direction: column; gap: 0.15rem; }

.dash-nav-link {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-ink-muted);
  padding: 0.65rem 0.9rem;
  border-left: 2px solid transparent;
  border-radius: var(--radius-sm);
}

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

.dash-nav-link.is-active {
  color: var(--color-brand);
  background: var(--color-bg);
  border-left-color: var(--color-accent);
}

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

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

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

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

.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.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  box-shadow: var(--shadow-sm);
}

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

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

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

.stat-delta.is-up { color: var(--color-brand); }
.stat-delta.is-down { color: #9C5A2D; }
.stat-delta.is-info { color: var(--color-accent); }

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.75rem;
  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: linear-gradient(0deg, rgba(231, 217, 184, 0.22), rgba(231, 217, 184, 0.22));
}

.panel-title { font-size: 1.2rem; margin: 0; }

.panel-body { padding: 1.5rem; }

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

.table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  text-align: left;
  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:nth-child(even) { background: rgba(231, 217, 184, 0.2); }

.table tbody tr:hover { background: rgba(138, 150, 104, 0.14); }

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-ink-muted);
}

.badge.is-success { background: #E4E9D4; border-color: #B9C495; color: #3D4A21; }
.badge.is-warning { background: #F3E3C3; border-color: #D9BC7F; color: #7A5A17; }
.badge.is-info { background: #E4E4D2; border-color: #B9B995; color: #4F5D2F; }

.activity-list { list-style: none; margin: 0; padding: 0; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-block: 0.9rem;
  border-bottom: 1px dashed var(--color-border);
}

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

.activity-item > span:nth-child(2) { flex: 1; }

.activity-time {
  font-size: 0.8rem;
  color: var(--color-ink-muted);
  white-space: nowrap;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--color-sage);
  color: #FDFBF4;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.form-field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.1rem; }

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

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

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(79, 93, 47, 0.15);
}

.profile-form { max-width: 26rem; }

.form-actions { margin-top: 0.5rem; margin-bottom: 0; }

/* ---------- blog post ---------- */

.post { padding-top: 3rem; }

.post-header {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
  margin-bottom: 2.5rem;
}

.post-title {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  margin: 0.9rem 0 0.7rem;
}

.post-excerpt {
  font-size: 1.12rem;
  color: var(--color-ink-muted);
  margin: 0 0 1.4rem;
}

.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; flex-basis: 34px; font-size: 0.72rem; }

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

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

.post-hero { max-width: 56rem; margin-inline: auto; margin-bottom: 3rem; }

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

.tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-brand);
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.7rem;
  background: transparent;
}

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

.prose {
  max-width: 42rem;
  margin-inline: auto;
  font-size: 1.05rem;
}

.prose h2 {
  font-size: 1.7rem;
  margin: 2.2em 0 0.6em;
}

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

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

.prose a { color: var(--color-link); 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-accent); }

.prose blockquote {
  margin: 1.8em 0;
  padding: 1.2em 1.6em;
  background: var(--color-surface-alt);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
}

.prose blockquote p { margin: 0; }

.prose figure { margin: 2em 0; }

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

.prose code {
  font-family: "Courier New", monospace;
  font-size: 0.92em;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.4em;
}

.prose pre {
  background: var(--color-brand-deep);
  color: var(--color-on-brand);
  border-radius: var(--radius-md);
  padding: 1.2em 1.4em;
  overflow-x: auto;
  margin: 1.8em 0;
}

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

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

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

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

.prose tbody tr:nth-child(even) { background: rgba(231, 217, 184, 0.2); }

.prose hr {
  border: 0;
  height: 46px;
  margin: 2.5em auto;
  width: 30px;
  background: var(--sprig-mark) center / contain no-repeat;
  opacity: 0.7;
}

.prose .media-ph { margin: 0; }

/* real blog photography, graded into the palette, over the painted fallback */

.post-hero .media-ph {
  background:
    var(--photo-grade),
    url("../../assets/img/pack/blog-hero.webp") center / cover no-repeat,
    var(--media-paint);
}

.prose figure .media-ph {
  background:
    var(--photo-grade),
    url("../../assets/img/pack/blog-figure.webp") center / cover no-repeat,
    var(--media-paint);
}

.related-grid .card:nth-child(1) .media-ph {
  background:
    var(--photo-grade),
    url("../../assets/img/pack/blog-rel-1.webp") center / cover no-repeat,
    var(--media-paint);
}

.related-grid .card:nth-child(2) .media-ph {
  background:
    var(--photo-grade),
    url("../../assets/img/pack/blog-rel-2.webp") center / cover no-repeat,
    var(--media-paint);
}

.related-grid .card:nth-child(3) .media-ph {
  background:
    var(--photo-grade),
    url("../../assets/img/pack/blog-rel-3.webp") center / cover no-repeat,
    var(--media-paint);
}

.author-card {
  max-width: 42rem;
  margin: 3rem auto 0;
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.7rem;
  box-shadow: var(--shadow-sm);
}

.author-card .avatar { width: 52px; height: 52px; flex-basis: 52px; font-size: 1rem; }

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

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

.related-posts { border-top: 1px solid var(--color-border); margin-top: 4rem; }

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

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; }
  .dash-nav { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  :root { --section-pad: 3rem; }
  .site-header-inner { justify-content: center; text-align: center; }
  /* the lockup stays one line, so it scales instead of wrapping */
  .brand-mark { width: 26px; height: 38px; }
  .brand { gap: 0.6rem; }
  .brand-name::before { font-size: 1.02rem; letter-spacing: 0.13em; }
  .brand-name::after { font-size: 0.56rem; letter-spacing: 0.2em; }
  .footer-about .brand-mark { width: 34px; height: 50px; }
  .footer-about .brand-name::before { font-size: 1.18rem; }
  .footer-about .brand-name::after { font-size: 0.62rem; }
  .site-nav { justify-content: center; gap: 0.9rem 1.2rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .panel-body { padding: 1.1rem; }
  .panel-body:has(.table) { overflow-x: auto; }
  .activity-item { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
