/* ==========================================================================
   SolvaHub — Art & Drawing Studio
   Design system + layout. No external fonts, no external CSS, no trackers
   other than the AdSense loader. Mobile-first.
   ========================================================================== */

/* ------------------------------------------------------------- tokens -- */
:root {
  --ink: #1c1a22;
  --ink-2: #35323d;
  --body: #55515e;
  --muted: #8a8593;
  --line: #e4e1ea;
  --line-soft: #f0eef4;
  --bg: #faf9fc;
  --surface: #ffffff;
  --surface-2: #f4f2f8;

  --accent: #3b5b9b;
  --accent-ink: #2f4880;
  --accent-soft: #e9eef8;
  --sage: #5f7355;
  --sage-soft: #edf1ea;
  --gold: #b07f2e;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(33, 30, 27, 0.05), 0 2px 10px rgba(33, 30, 27, 0.04);
  --shadow: 0 6px 18px rgba(33, 30, 27, 0.07), 0 18px 44px rgba(33, 30, 27, 0.06);
  --shadow-lg: 0 12px 34px rgba(33, 30, 27, 0.1), 0 30px 70px rgba(33, 30, 27, 0.08);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --maxw: 1200px;
  --gutter: 20px;
  --header-h: 66px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --header-h: 76px;
  }
}

/* --------------------------------------------------------------- reset -- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.22;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.012em;
}

p {
  margin: 0 0 1.15em;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

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

::selection {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* -------------------------------------------------------------- header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 246, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 12px rgba(33, 30, 27, 0.05);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--accent) 0%, #2f4880 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.03em;
  box-shadow: 0 3px 10px rgba(164, 85, 58, 0.28);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.brand-tag {
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.main-nav {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 4px;
}

.main-nav > a,
.nav-item > .nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav > a:hover,
.nav-item > .nav-trigger:hover,
.nav-item.is-open > .nav-trigger {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}

.nav-trigger svg {
  width: 11px;
  height: 11px;
  transition: transform 0.2s ease;
}

.nav-item.is-open .nav-trigger svg {
  transform: rotate(180deg);
}

.nav-item {
  position: relative;
}

.nav-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 8px);
  min-width: 560px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.nav-item:hover .nav-panel,
.nav-item:focus-within .nav-panel,
.nav-item.is-open .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.nav-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.14s ease;
}

.nav-panel a:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
  text-decoration: none;
}

.nav-panel a span {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: #d5d1e0;
  color: var(--ink);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.menu-toggle {
  display: grid;
}

@media (min-width: 980px) {
  .main-nav {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
  .header-actions {
    margin-left: 0;
  }
}

/* --------------------------------------------------------- mobile menu -- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(33, 30, 27, 0.42);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s;
  z-index: 150;
}

.drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 88vw);
  background: var(--bg);
  z-index: 160;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
}

.drawer-body {
  padding: 20px var(--gutter) 40px;
}

.drawer-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 8px;
  font-weight: 600;
}

.drawer-label:first-child {
  margin-top: 0;
}

.drawer-body a {
  display: block;
  padding: 11px 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid var(--line-soft);
}

.drawer-body a:hover {
  color: var(--accent-ink);
  text-decoration: none;
}

.drawer-body a:last-child {
  border-bottom: 0;
}

/* -------------------------------------------------------------- search -- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(33, 30, 27, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
  padding: 12vh 16px 16px;
  overflow-y: auto;
}

.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.search-box {
  max-width: 680px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(-14px);
  transition: transform 0.24s ease;
}

.search-overlay.is-open .search-box {
  transform: translateY(0);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.search-field svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex-shrink: 0;
}

.search-field input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 17px;
  font-family: inherit;
  background: transparent;
  color: var(--ink);
  min-width: 0;
}

.search-results {
  max-height: 52vh;
  overflow-y: auto;
  padding: 6px;
}

.search-result {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
}

.search-result:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.search-result img {
  width: 72px;
  height: 46px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.search-result strong {
  display: block;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
}

.search-result small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.search-empty {
  padding: 26px 20px;
  color: var(--muted);
  font-size: 14.5px;
  text-align: center;
}

.search-hint {
  padding: 11px 20px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
}

/* ------------------------------------------------------------- hero ---- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 420px at 12% -10%, rgba(164, 85, 58, 0.1), transparent 62%),
    radial-gradient(900px 380px at 92% 0%, rgba(95, 115, 96, 0.12), transparent 60%),
    var(--surface);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-inner {
  padding: 44px 0 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.hero h1 {
  font-size: clamp(30px, 6.4vw, 52px);
  line-height: 1.1;
  max-width: 15ch;
  margin-bottom: 18px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-lede {
  font-size: clamp(16px, 2.2vw, 18.5px);
  max-width: 58ch;
  color: var(--ink-2);
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat b {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  line-height: 1.1;
}

.hero-stat span {
  font-size: 12.5px;
  color: var(--muted);
}

@media (min-width: 900px) {
  .hero-inner {
    padding: 76px 0 66px;
  }
}

/* ------------------------------------------------------------ buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(164, 85, 58, 0.26);
}

.btn-primary:hover {
  background: var(--accent-ink);
  box-shadow: 0 6px 20px rgba(164, 85, 58, 0.34);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: #d1cdde;
  background: var(--surface-2);
}

/* ---------------------------------------------------------- topic bar -- */
.topic-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topic-bar-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.topic-bar-inner::-webkit-scrollbar {
  height: 4px;
}

.topic-bar-inner::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

.topic-bar a {
  white-space: nowrap;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.topic-bar a:hover {
  background: var(--accent-soft);
  border-color: #d3dcef;
  color: var(--accent-ink);
  text-decoration: none;
}

.topic-bar a svg {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
  margin-left: 3px;
}

/* ------------------------------------------------------------ layout -- */
.section {
  padding: 46px 0;
}

.section-tight {
  padding: 34px 0;
}

@media (min-width: 900px) {
  .section {
    padding: 68px 0;
  }
  .section-tight {
    padding: 48px 0;
  }
}

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

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(23px, 3.6vw, 31px);
  margin: 0;
  max-width: 22ch;
}

.section-head p {
  color: var(--muted);
  font-size: 14.5px;
  margin: 6px 0 0;
  max-width: 62ch;
}

.section-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-ink);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section-more:hover {
  text-decoration: none;
  gap: 10px;
}

.section-more svg {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.section-more:hover svg {
  transform: translateX(3px);
}

/* ------------------------------------------------------------- cards -- */
.grid {
  display: grid;
  gap: 22px;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #dad6e6;
}

.card-media {
  position: relative;
  aspect-ratio: 900 / 502;
  overflow: hidden;
  background: var(--surface-2);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.3, 0, 0.2, 1);
}

.card:hover .card-media img {
  transform: scale(1.045);
}

.card-chip {
  position: absolute;
  left: 12px;
  top: 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  color: var(--accent-ink);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(33, 30, 27, 0.08);
}

.card-body {
  padding: 18px 19px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 {
  font-size: 18.5px;
  line-height: 1.3;
  margin: 0 0 9px;
}

.card-body h3 a {
  color: var(--ink);
}

.card-body h3 a:hover {
  color: var(--accent-ink);
  text-decoration: none;
}

.card-body p {
  font-size: 14.5px;
  color: var(--body);
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 4px;
}

.card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #cbc7db;
}

/* -------------------------------------------------------- featured row -- */
.feature-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .feature-grid {
    grid-template-columns: 1.35fr 1fr;
    gap: 26px;
  }
}

.feature-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 340px;
  display: flex;
  align-items: flex-end;
}

@media (min-width: 860px) {
  .feature-card {
    min-height: 460px;
  }
}

.feature-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(24, 21, 18, 0.9) 0%,
    rgba(24, 21, 18, 0.55) 42%,
    rgba(24, 21, 18, 0.12) 78%
  );
}

.feature-card-content {
  position: relative;
  z-index: 1;
  padding: 26px 24px;
  color: #fff;
}

@media (min-width: 860px) {
  .feature-card-content {
    padding: 34px 32px;
  }
}

.feature-card .chip {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  backdrop-filter: blur(4px);
}

.feature-card h3 {
  color: #fff;
  font-size: clamp(21px, 3.4vw, 30px);
  line-height: 1.2;
  margin: 0 0 10px;
}

.feature-card h3 a {
  color: #fff;
}

.feature-card h3 a:hover {
  text-decoration: none;
  color: #fff;
  opacity: 0.9;
}

.feature-card p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.86);
  margin: 0 0 14px;
  max-width: 56ch;
}

.feature-card .meta {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  gap: 9px;
  align-items: center;
}

.feature-side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.mini-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  border-color: #dad6e6;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.mini-card img {
  width: 104px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.mini-card h4 {
  font-size: 15.5px;
  line-height: 1.32;
  margin: 0 0 5px;
}

.mini-card h4 a {
  color: var(--ink);
}

.mini-card h4 a:hover {
  color: var(--accent-ink);
  text-decoration: none;
}

.mini-card span {
  font-size: 12px;
  color: var(--muted);
}

/* -------------------------------------------------------- category grid */
.cat-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #dad6e6;
  text-decoration: none;
}

.cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  margin-bottom: 2px;
}

.cat-icon svg {
  width: 20px;
  height: 20px;
}

.cat-card h3 {
  font-size: 17.5px;
  margin: 0;
}

.cat-card p {
  font-size: 13.8px;
  color: var(--body);
  margin: 0;
  line-height: 1.55;
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: auto;
  padding-top: 4px;
}

/* ---------------------------------------------------------- list rows -- */
.list-rows {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.list-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

@media (min-width: 720px) {
  .list-row {
    grid-template-columns: 210px 1fr auto;
    gap: 24px;
  }
}

.list-row img {
  width: 100%;
  aspect-ratio: 900 / 502;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.list-row h3 {
  font-size: 18.5px;
  margin: 0 0 6px;
  line-height: 1.3;
}

.list-row h3 a {
  color: var(--ink);
}

.list-row h3 a:hover {
  color: var(--accent-ink);
  text-decoration: none;
}

.list-row p {
  font-size: 14.5px;
  margin: 0 0 8px;
  color: var(--body);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-row .card-meta {
  margin: 0;
}

.list-row .go {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-ink);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.list-row .go svg {
  width: 14px;
  height: 14px;
}

/* ------------------------------------------------------------- article -- */
.article-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 30px 0 34px;
}

@media (min-width: 900px) {
  .article-hero {
    padding: 46px 0 44px;
  }
}

.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--accent-ink);
}

.breadcrumbs .sep {
  color: #c9c5d8;
}

.article-hero h1 {
  font-size: clamp(27px, 5vw, 44px);
  max-width: 21ch;
  margin-bottom: 14px;
}

.article-hero .lede {
  font-size: clamp(15.5px, 2vw, 18px);
  color: var(--ink-2);
  max-width: 62ch;
  margin-bottom: 18px;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 18px;
  font-size: 13.5px;
  color: var(--muted);
}

.byline-author {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-2);
  font-weight: 600;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--sage), #4d6046);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--sans);
}

.article-figure {
  margin: 0 0 34px;
}

.article-figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.article-figure figcaption {
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 9px;
  text-align: center;
}

.article-layout {
  display: grid;
  gap: 38px;
  grid-template-columns: 1fr;
  padding-bottom: 56px;
}

@media (min-width: 1040px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 312px;
    gap: 52px;
    align-items: start;
  }
}

.prose {
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.78;
  color: #33303a;
  max-width: 72ch;
}

.prose > *:first-child {
  margin-top: 0;
}

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

.prose h2 {
  font-size: clamp(21px, 3vw, 26px);
  margin: 2em 0 0.65em;
  color: var(--ink);
  line-height: 1.25;
}

.prose h3 {
  font-size: 19.5px;
  margin: 1.7em 0 0.5em;
  color: var(--ink);
}

.prose ul,
.prose ol {
  margin: 0 0 1.4em;
  padding-left: 1.35em;
}

.prose li {
  margin-bottom: 0.65em;
}

.prose li::marker {
  color: var(--accent);
}

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

.prose blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--accent);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
  font-style: italic;
}

.prose a {
  border-bottom: 1px solid rgba(164, 85, 58, 0.35);
}

.prose a:hover {
  text-decoration: none;
  border-bottom-color: var(--accent);
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 0;
  z-index: 130;
  transition: width 0.1s linear;
}

/* --------------------------------------------------------- article aside */
.aside-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}

.aside-block h3 {
  font-size: 15px;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
}

.aside-block ol,
.aside-block ul {
  margin: 0;
  padding-left: 18px;
}

.aside-block li {
  font-size: 14.5px;
  line-height: 1.5;
  margin-bottom: 11px;
}

.aside-block li:last-child {
  margin-bottom: 0;
}

.aside-block a {
  color: var(--ink);
}

.aside-block a:hover {
  color: var(--accent-ink);
}

.aside-sticky {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.toc {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  padding-left: 26px;
  position: relative;
  margin-bottom: 9px;
  font-size: 14px;
  line-height: 1.45;
}

.toc li::before {
  content: counter(toc);
  position: absolute;
  left: 0;
  top: 1px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-family: var(--sans);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-pill {
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.tag-pill:hover {
  background: var(--accent-soft);
  border-color: #d3dcef;
  color: var(--accent-ink);
  text-decoration: none;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.tag-list a {
  font-size: 13px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.tag-list a:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
  text-decoration: none;
}

.author-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 40px 0;
}

.author-box .avatar {
  width: 46px;
  height: 46px;
  font-size: 17px;
  flex-shrink: 0;
}

.author-box h4 {
  margin: 0 0 4px;
  font-size: 16.5px;
}

.author-box p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--body);
}

/* --------------------------------------------------------------- ads --- */
.ad-slot {
  margin: 32px 0;
  min-height: 0;
}

.ad-slot[hidden] {
  display: none;
}

.ad-slot-label {
  display: block;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b0abbd;
  margin-bottom: 8px;
  font-weight: 600;
}

.ad-slot.is-placeholder {
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 26px 16px;
  text-align: center;
  color: #b0abbd;
  font-size: 12.5px;
  background: var(--surface-2);
}

.ad-wrap {
  overflow: hidden;
}

@media (min-width: 780px) {
  .ad-wrap {
    display: flex;
    justify-content: center;
  }
}

.ad-side {
  margin: 0 0 22px;
}

/* ------------------------------------------------------------- footer -- */
.site-footer {
  background: var(--ink);
  color: #cbc7db;
  padding: 52px 0 30px;
  margin-top: 0;
}

.site-footer h4 {
  color: #fff;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin: 0 0 16px;
  font-weight: 700;
}

.footer-grid {
  display: grid;
  gap: 34px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .footer-grid {
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 44px;
  }
}

.footer-brand .brand-name {
  color: #fff;
}

.footer-brand .brand-tag {
  color: #8b8694;
}

.footer-brand p {
  font-size: 14.5px;
  line-height: 1.65;
  color: #a39eae;
  margin: 16px 0 0;
  max-width: 40ch;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 9px;
}

.site-footer a {
  color: #cbc7db;
  font-size: 14.5px;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #8b8694;
}

.footer-bottom p {
  margin: 0;
}

.footer-note {
  font-size: 12.5px;
  color: #7a7488;
  max-width: 62ch;
  margin: 14px 0 0;
  line-height: 1.6;
}

/* -------------------------------------------------------- static pages -- */
.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 38px 0 34px;
}

@media (min-width: 900px) {
  .page-head {
    padding: 58px 0 50px;
  }
}

.page-head h1 {
  font-size: clamp(27px, 5vw, 42px);
  max-width: 22ch;
  margin-bottom: 12px;
}

.page-head .lede {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 64ch;
  margin: 0;
}

.prose-page {
  padding: 42px 0 62px;
}

.prose-page .prose {
  max-width: 74ch;
}

.prose-page .prose h2 {
  margin-top: 1.8em;
}

.prose-page .prose ul,
.prose-page .prose ol {
  padding-left: 1.3em;
}

.prose-page .prose li {
  margin-bottom: 0.5em;
}

.callout {
  background: var(--accent-soft);
  border: 1px solid #e2def1;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 30px 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
}

.callout p:last-child {
  margin-bottom: 0;
}

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

/* ------------------------------------------------------------- forms --- */
.form-grid {
  display: grid;
  gap: 18px;
  margin-top: 26px;
  max-width: 620px;
}

.form-row {
  display: grid;
  gap: 7px;
}

.form-row label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.form-row input,
.form-row textarea,
.form-row select {
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  outline: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  width: 100%;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-row textarea {
  min-height: 148px;
  resize: vertical;
}

.form-note {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.form-status {
  font-size: 14.5px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--sage-soft);
  border: 1px solid #dde4d8;
  color: #4a5c42;
  display: none;
}

.form-status.is-visible {
  display: block;
}

/* ------------------------------------------------------------- misc ---- */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.pagination a:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
  text-decoration: none;
}

.pagination .is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.notice {
  background: var(--sage-soft);
  border: 1px solid #dde4d8;
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 14.5px;
  color: #4a5c42;
  margin: 26px 0;
}

.notice p:last-child {
  margin-bottom: 0;
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 90;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top svg {
  width: 18px;
  height: 18px;
}

.back-to-top-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
}

@media print {
  .site-header,
  .site-footer,
  .ad-slot,
  .to-top,
  .reading-progress,
  .search-overlay,
  .drawer {
    display: none !important;
  }
  body {
    background: #fff;
  }
}
