/* PSM Magazine Theme — v08 Saffron Column — do not hand-edit; regenerate via PSM */
@import url("https://fonts.googleapis.com/css2?family=Lora:wght@500;600;700&family=Nunito+Sans:opsz,wght@6..12,400;600;700&display=swap");

:root {
  --psm-bg: #f6f0e4;
  --psm-bg-alt: #eadfcb;
  --psm-ink: #2a1f14;
  --psm-muted: #7a6550;
  --psm-accent: #d97706;
  --psm-accent-2: #0f766e;
  --psm-line: #dccbb0;
  --psm-paper: #fffbf4;
  --psm-sidebar-bg: #faf4e8;
  --psm-display: "Lora", Georgia, serif;
  --psm-body: "Nunito Sans", system-ui, sans-serif;
  --psm-max: 1110px;
  --psm-radius: 2px;
  --psm-hue: 6deg;
  --psm-density: 0.76;
  --psm-scale: 0.9199999999999999;
}

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

html { scroll-behavior: smooth; }

body.psm-magazine {
  margin: 0;
  min-height: 100vh;
  color: var(--psm-ink);
  font-family: var(--psm-body);
  font-size: calc(1.02rem * var(--psm-scale));
  line-height: calc(1.65 * var(--psm-density));
  background:
    radial-gradient(1200px 600px at 8% -10%, color-mix(in srgb, var(--psm-accent) 16%, transparent), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--psm-accent-2) 12%, transparent), transparent 55%),
    linear-gradient(180deg, var(--psm-bg), var(--psm-bg-alt) 48%, var(--psm-bg));
  filter: hue-rotate(var(--psm-hue));
}

body.psm-magazine a {
  color: var(--psm-accent);
  text-decoration: none;
  text-underline-offset: 0.18em;
}
body.psm-magazine a:hover { color: var(--psm-accent-2); }
body.psm-magazine .psm-content p a,
body.psm-magazine .psm-content li a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.psm-shell {
  width: min(100% - 2rem, var(--psm-max));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

/* —— Header variants —— */
.psm-header {
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--psm-line);
  padding-bottom: 1rem;
}

.psm-brand {
  font-family: var(--psm-display);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  color: var(--psm-ink);
}
.psm-brand a { color: inherit; text-decoration: none; }

.psm-tagline {
  margin: 0.45rem 0 0;
  color: var(--psm-muted);
  font-size: 0.98rem;
  max-width: 42ch;
}

.psm-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.psm-nav a { color: var(--psm-ink); text-decoration: none; }
.psm-nav a:hover { color: var(--psm-accent); }

.psm-header--masthead .psm-brand {
  text-align: center;
}
.psm-header--masthead .psm-tagline,
.psm-header--masthead .psm-nav {
  justify-content: center;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.psm-header--masthead {
  border-bottom-width: 3px;
  border-bottom-color: var(--psm-ink);
}

.psm-header--split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem 2rem;
  align-items: end;
}
.psm-header--split .psm-nav { margin-top: 0; justify-content: flex-end; }

.psm-header--stacked .psm-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--psm-accent);
  margin-bottom: 0.35rem;
}

.psm-header--band {
  background: color-mix(in srgb, var(--psm-ink) 92%, var(--psm-accent));
  color: var(--psm-paper);
  padding: 1.35rem 1.25rem 1.1rem;
  border-bottom: 0;
  border-radius: var(--psm-radius);
  margin-left: -0.25rem;
  margin-right: -0.25rem;
}
.psm-header--band .psm-brand,
.psm-header--band .psm-tagline,
.psm-header--band .psm-nav a { color: var(--psm-paper); }
.psm-header--band .psm-tagline { opacity: 0.82; }
.psm-header--band .psm-nav a:hover { color: var(--psm-accent); }

/* —— Layout with required sidebar —— */
.psm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(220px, 0.75fr);
  gap: 2rem 2.25rem;
  align-items: start;
}

.psm-main { order: 2; min-width: 0; }
.psm-sidebar-col { order: 1; min-width: 0; }

.psm-layout { grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.75fr); }

.psm-main-panel {
  background: color-mix(in srgb, var(--psm-paper) 92%, transparent);
  border: 1px solid var(--psm-line);
  border-radius: var(--psm-radius);
  padding: 1.35rem 1.5rem 1.75rem;
}

.psm-main-panel h1,
.psm-main-panel h2,
.psm-main-panel h3 {
  font-family: var(--psm-display);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.psm-main-panel img {
  max-width: 100%;
  height: auto;
}

/* Preserve existing article/post bodies inside chrome */
.psm-content :is(p, li) { max-width: 68ch; }

/* —— Homepage feed / listing cards (legacy classnames from site HTML) ——
   Original sites relied on their own CSS for .meta/.thumb/.sep; magazine
   apply swaps that for psm-magazine.css, so these rules restore a polished
   editorial listing without rewriting paid post bodies. */
.psm-content .topbar {
  display: none;
}

.psm-content .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.psm-content .layout {
  display: block;
  width: 100%;
}

.psm-content main.feed,
.psm-content .feed {
  display: block;
  width: 100%;
  min-width: 0;
}

.psm-content .eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--psm-muted);
  margin: 0 0 1.1rem;
}

.psm-content .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1.6rem 1.4rem;
  align-items: start;
}

/* Cards sitting in the grid are self-contained, so drop the stacked-list divider. */
.psm-content .grid > article.card {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

/* Classes carried over from the old listing markup. */
.psm-content .thumbwrap {
  display: block;
  overflow: hidden;
  border-radius: calc(var(--psm-radius) + 2px);
}

.psm-content .catlabel {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--psm-accent);
  margin: 0 0 0.35rem;
}

.psm-content .cardbody {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.psm-content .cardbody h2,
.psm-content .cardbody h3 {
  margin: 0;
  font-family: var(--psm-display);
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.2rem);
  line-height: 1.25;
}

.psm-content .rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.5rem;
}

.psm-content article.card,
.psm-content article.row {
  display: grid;
  gap: 0.85rem 1.35rem;
  padding: 0 0 1.85rem;
  margin: 0 0 1.85rem;
  border-bottom: 1px solid color-mix(in srgb, var(--psm-line) 85%, transparent);
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.psm-content article.card:last-child,
.psm-content article.row:last-child {
  border-bottom: 0;
  margin-bottom: 0.5rem;
}

.psm-content article.row {
  grid-template-columns: minmax(112px, 28%) minmax(0, 1fr);
  align-items: start;
}

.psm-content article.card > a:has(.thumb),
.psm-content article.row > a:has(.thumb) {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Gradient / image banners: keep atmosphere, hide smashed overlay copy */
.psm-content .thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: calc(var(--psm-radius) + 2px);
  isolation: isolate;
  background-size: cover;
  background-position: center;
}

.psm-content article.row .thumb {
  aspect-ratio: 1 / 1;
  min-height: 112px;
}

.psm-content .thumb .mono,
.psm-content .thumb .ttl,
.psm-content .thumb .tcat {
  display: none !important;
}

.psm-content .thumb .pat,
.psm-content .thumb .sh,
.psm-content .thumb .gl {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.psm-content .thumb .gl {
  opacity: 0.35;
  color: rgba(255, 255, 255, 0.85);
  mix-blend-mode: soft-light;
  font-weight: 700;
  line-height: 1;
}

.psm-content .thumb .sh {
  border-radius: 50%;
  filter: blur(0.5px);
}

.psm-content .thumb .sh.sq { border-radius: 18%; }
.psm-content .thumb .sh.ring {
  border-radius: 50%;
  box-shadow: inset 0 0 0 14px rgba(255, 255, 255, 0.12);
  background: transparent !important;
}

.psm-content .pad2 {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.15rem 0 0;
}

.psm-content .kicker,
.psm-content .tcat:not(.thumb .tcat) {
  display: inline-flex;
  align-self: flex-start;
  width: fit-content;
  margin: 0;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--psm-accent);
  background: color-mix(in srgb, var(--psm-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--psm-accent) 22%, transparent);
}

.psm-content article.card h3,
.psm-content article.row h3,
.psm-content .hero h2 {
  font-family: var(--psm-display);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0.15rem 0 0.2rem;
  color: var(--psm-ink);
}

.psm-content article.card h3 a,
.psm-content article.row h3 a,
.psm-content .hero h2,
.psm-content a.hero {
  color: var(--psm-ink);
  text-decoration: none;
  text-underline-offset: 0.12em;
}

.psm-content article.card h3 a:hover,
.psm-content article.row h3 a:hover,
.psm-content a.hero:hover h2 {
  color: var(--psm-accent);
  text-decoration: none;
}

.psm-content .ex,
.psm-content .hbody > p {
  margin: 0.15rem 0 0.35rem;
  color: var(--psm-muted);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 62ch;
}

/* Meta row: avatar | author · date · read time */
.psm-content .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin-top: 0.45rem;
  color: var(--psm-muted);
  font-size: 0.86rem;
  line-height: 1.3;
}

.psm-content .meta .av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--psm-paper);
  background: color-mix(in srgb, var(--psm-ink) 82%, var(--psm-accent));
}

.psm-content .meta .sep {
  display: inline-block;
  width: auto;
  color: color-mix(in srgb, var(--psm-muted) 70%, transparent);
  user-select: none;
}

.psm-content .meta .sep::before {
  content: none;
}

.psm-content .meta > span:not(.av):not(.sep) {
  white-space: nowrap;
}

/* Featured hero teaser */
.psm-content a.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
  gap: 1.25rem 1.75rem;
  align-items: stretch;
  margin: 0 0 2.25rem;
  padding: 0 0 2rem;
  border-bottom: 1px solid var(--psm-line);
  text-decoration: none;
  color: inherit;
}

.psm-content a.hero .hsplit {
  display: block;
  min-height: 200px;
  border-radius: calc(var(--psm-radius) + 2px);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--psm-accent) 55%, var(--psm-ink)),
      color-mix(in srgb, var(--psm-accent-2) 45%, var(--psm-accent)));
  position: relative;
  overflow: hidden;
}

.psm-content a.hero .hsplit::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.22), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.18), transparent 50%);
}

.psm-content a.hero > .mono {
  display: none;
}

.psm-content a.hero .hbody {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
}

.psm-content a.hero .rm {
  margin-top: 0.55rem;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--psm-accent);
}

@media (max-width: 720px) {
  .psm-content article.row {
    grid-template-columns: 1fr;
  }
  .psm-content article.row .thumb {
    aspect-ratio: 16 / 9;
  }
  .psm-content a.hero {
    grid-template-columns: 1fr;
  }
  .psm-content a.hero .hsplit {
    min-height: 160px;
  }
}

.psm-sidebar,
aside.psm-sidebar,
#psm-sidebar,
.psm-sidebar-col aside {
  background: var(--psm-sidebar-bg);
  border: 1px solid var(--psm-line);
  border-radius: var(--psm-radius);
  padding: 1rem 1.1rem 1.25rem;
  position: sticky;
  top: 1rem;
}

.psm-sidebar-title {
  font-family: var(--psm-display);
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--psm-accent);
}

.psm-links,
.psm-sidebar ul,
#psm-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.psm-links li,
.psm-sidebar li,
#psm-sidebar li {
  margin: 0;
  padding: 0.45rem 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--psm-line) 80%, transparent);
  font-size: 0.95rem;
  line-height: 1.35;
}
.psm-links a,
.psm-sidebar a { text-decoration: none; font-weight: 550; }

.psm-related-links { margin-top: 1rem; }
.psm-related-links.psm-blogroll-hidden { display: none; }
.psm-related-links__title {
  font-family: var(--psm-display);
  font-size: 0.95rem;
  margin: 0 0 0.55rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--psm-accent);
}
.psm-related-links__scroll {
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
}
.psm-related-links__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.psm-related-links__list li {
  margin: 0;
  padding: 0.45rem 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--psm-line) 80%, transparent);
  font-size: 0.95rem;
  line-height: 1.35;
}
.psm-related-links__list a { text-decoration: none; font-weight: 550; }

.psm-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--psm-line);
  color: var(--psm-muted);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
}

@media (max-width: 860px) {
  .psm-layout {
    grid-template-columns: 1fr !important;
  }
  .psm-main,
  .psm-sidebar-col { order: initial; }
  .psm-sidebar,
  aside.psm-sidebar,
  #psm-sidebar {
    position: static;
  }
  .psm-header--split {
    grid-template-columns: 1fr;
  }
  .psm-header--split .psm-nav { justify-content: flex-start; }
}

/* Motion: presence, not noise */
@keyframes psm-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.psm-header { animation: psm-rise 0.55s ease-out both; }
.psm-main-panel { animation: psm-rise 0.7s ease-out 0.08s both; }
.psm-sidebar-col { animation: psm-rise 0.75s ease-out 0.16s both; }

@media (prefers-reduced-motion: reduce) {
  .psm-header,
  .psm-main-panel,
  .psm-sidebar-col { animation: none; }
}
