:root {
  --bg: #f4f1ea;
  --paper: #fffdf8;
  --paper-2: #f9f5ec;
  --paper-3: #eee7da;
  --ink: #161411;
  --muted: #766f64;
  --line: #ded4c2;
  --brand: #171411;
  --accent: #b42318;
  --soft-accent: #fff0ec;
  --radius: 22px;
  --shadow: 0 22px 70px rgba(42, 31, 15, .10);
  --glass: rgba(255, 253, 248, .62);
  --glass-strong: rgba(255, 253, 248, .82);
  --liquid-red: rgba(180, 35, 24, .08);
  --liquid-gold: rgba(219, 170, 95, .10);
  --liquid-ink: rgba(23, 20, 17, .08);
  --halftone-red: rgba(180, 35, 24, .052);
  --halftone-ink: rgba(23, 20, 17, .04);
  --code-bg: #1c1814;
  --code-bg-soft: #efe6d6;
  --code-border: rgba(180, 35, 24, .16);
  --code-ink: #fff7e8;
  --motion-fast: 160ms;
  --motion-med: 320ms;
  --motion-slow: 760ms;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 1px 1px, var(--halftone-red) 1px, transparent 1.75px) 0 0 / 13px 13px fixed,
    radial-gradient(circle at 1px 1px, var(--halftone-ink) 1px, transparent 1.65px) 6px 6px / 18px 18px fixed,
    linear-gradient(180deg, #fbf7ef 0, var(--bg) 34rem);
  color: var(--ink);
  line-height: 1.58;
  overflow-x: hidden;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: -1;
  filter: blur(.5px);
  opacity: .42;
}
body::before {
  width: 38rem;
  height: 38rem;
  left: -18rem;
  top: 9rem;
  border-radius: 47% 53% 61% 39% / 45% 38% 62% 55%;
  background:
    radial-gradient(circle at 1px 1px, rgba(180,35,24,.115) 1px, transparent 1.85px) 0 0 / 11px 11px,
    radial-gradient(circle at center, rgba(255,255,255,.28), transparent 68%);
  -webkit-mask-image: radial-gradient(circle, #000 0 58%, transparent 74%);
  mask-image: radial-gradient(circle, #000 0 58%, transparent 74%);
  animation: liquid-drift 18s ease-in-out infinite alternate;
}
body::after {
  width: 32rem;
  height: 32rem;
  right: -16rem;
  bottom: 2rem;
  border-radius: 61% 39% 43% 57% / 42% 55% 45% 58%;
  background:
    radial-gradient(circle at 1px 1px, rgba(219,170,95,.13) 1px, transparent 1.85px) 0 0 / 12px 12px,
    radial-gradient(circle at center, rgba(255,255,255,.18), transparent 68%);
  -webkit-mask-image: radial-gradient(circle, #000 0 58%, transparent 74%);
  mask-image: radial-gradient(circle, #000 0 58%, transparent 74%);
  animation: liquid-drift 22s ease-in-out infinite alternate-reverse;
}
a { color: inherit; text-decoration: none; transition: color var(--motion-fast) ease, opacity var(--motion-fast) ease; }
a:hover { color: var(--accent); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.site-header {
  background:
    linear-gradient(180deg, rgba(255,255,255,.42), transparent),
    rgba(255, 253, 248, .82);
  border-bottom: 1px solid rgba(222, 212, 194, .74);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px) saturate(135%);
  box-shadow: 0 10px 36px rgba(42, 31, 15, .045);
}
.utility-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 9px 0;
  font-size: .84rem;
  color: var(--muted);
  border-bottom: 1px solid rgba(222, 212, 194, .7);
}
.utility-bar nav { display: flex; gap: 14px; align-items: center; }
.link-button { border: 0; background: transparent; padding: 0; color: inherit; }
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 20px;
}
.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: max-content;
}
.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.17) 1px, transparent 1.7px) 0 0 / 9px 9px,
    radial-gradient(circle at 70% 20%, rgba(180,35,24,.24), transparent 42%),
    #171411;
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: -.08em;
  box-shadow: 0 12px 28px rgba(0,0,0,.15);
  position: relative;
  overflow: hidden;
  animation: mark-breathe 7s ease-in-out infinite;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: -60% -35%;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.34), transparent 62%);
  transform: translateX(-45%) rotate(12deg);
  animation: glass-sheen 5.5s ease-in-out infinite;
}
.brand strong { display: block; font-size: clamp(1.9rem, 4vw, 3.15rem); letter-spacing: -.09em; line-height: .9; }
.brand small { color: var(--muted); font-size: .9rem; }
.search-box {
  display: flex;
  position: relative;
  z-index: 20;
  width: min(520px, 100%);
  border: 1px solid rgba(222, 212, 194, .9);
  border-radius: 999px;
  overflow: visible;
  background: var(--glass-strong);
  box-shadow: 0 10px 30px rgba(42,31,15,.06), inset 0 1px 0 rgba(255,255,255,.68);
  backdrop-filter: blur(14px) saturate(120%);
  transition: transform var(--motion-med) ease, box-shadow var(--motion-med) ease, border-color var(--motion-med) ease;
}
.search-box:focus-within {
  transform: translateY(-1px);
  border-color: rgba(180,35,24,.32);
  box-shadow: 0 16px 44px rgba(42,31,15,.10), 0 0 0 4px rgba(180,35,24,.08), inset 0 1px 0 rgba(255,255,255,.78);
}
.search-box input {
  flex: 1;
  border: 0;
  border-radius: 999px 0 0 999px;
  background: transparent;
  padding: 13px 17px;
  min-width: 0;
  outline: none;
}
.search-box button,
.editor-form button,
.stacked-form button,
#newPostButton,
.secondary-button {
  border: 0;
  background: var(--brand);
  color: white;
  padding: 12px 18px;
  font-weight: 800;
  position: relative;
  overflow: hidden;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, filter var(--motion-fast) ease;
}
.search-box button:hover,
.editor-form button:hover,
.stacked-form button:hover,
#newPostButton:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(42,31,15,.14);
  filter: brightness(1.03);
}
.search-box button:active,
.editor-form button:active,
.stacked-form button:active,
#newPostButton:active,
.secondary-button:active { transform: translateY(0) scale(.99); }
.search-box > button { border-radius: 0 999px 999px 0; }
.secondary-button {
  border-radius: 999px;
  background: var(--paper-3);
  color: var(--ink);
  border: 1px solid var(--line);
}
.section-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 14px;
}
.section-nav button,
.filter-pill {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: transform var(--motion-fast) ease, color var(--motion-fast) ease, background var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
.section-nav button:hover,
.filter-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(180,35,24,.28);
  box-shadow: 0 8px 20px rgba(42,31,15,.06);
}
.section-nav button.active,
.filter-pill.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  padding: 34px 0 66px;
}
.main-column { min-width: 0; }
.side-column {
  display: grid;
  gap: 18px;
  align-content: start;
  position: sticky;
  top: 178px;
}
.status { margin-bottom: 14px; color: var(--accent); font-weight: 700; }
.hero-strip { margin-bottom: 34px; }
.eyebrow,
.panel-kicker {
  color: var(--accent);
  text-transform: uppercase;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .1em;
  margin: 0 0 10px;
}
.featured-card {
  background: var(--glass-strong);
  border: 1px solid rgba(222, 212, 194, .88);
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  position: relative;
  isolation: isolate;
  backdrop-filter: blur(14px) saturate(115%);
  animation: enter-soft .72s ease both;
}
.featured-card::before {
  content: "";
  position: absolute;
  width: 18rem;
  height: 18rem;
  right: 42%;
  top: -9rem;
  z-index: -1;
  border-radius: 48% 52% 38% 62% / 52% 41% 59% 48%;
  background:
    radial-gradient(circle at 1px 1px, rgba(219,170,95,.16) 1px, transparent 1.8px) 0 0 / 18px 18px;
  filter: blur(0);
  -webkit-mask-image: radial-gradient(circle, #000 0 58%, transparent 74%);
  mask-image: radial-gradient(circle, #000 0 58%, transparent 74%);
  opacity: .62;
  animation: liquid-pulse 9s ease-in-out infinite alternate;
}
.featured-visual {
  min-height: 345px;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.13) 1px, transparent 1.8px) 0 0 / 18px 18px,
    radial-gradient(circle at 1px 1px, rgba(180,35,24,.20) 1px, transparent 1.9px) 9px 9px / 24px 24px,
    #1d1a16;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
}
.featured-visual::before,
.featured-visual::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.featured-visual::before {
  width: 13rem;
  height: 13rem;
  right: 9%;
  top: 12%;
  border-radius: 48% 52% 44% 56% / 54% 43% 57% 46%;
  background: radial-gradient(circle at 1px 1px, rgba(255,255,255,.17) 1px, transparent 1.8px) 0 0 / 16px 16px;
  -webkit-mask-image: radial-gradient(circle, #000 0 58%, transparent 74%);
  mask-image: radial-gradient(circle, #000 0 58%, transparent 74%);
  animation: liquid-float 10s ease-in-out infinite alternate;
}
.featured-visual::after {
  inset: 0;
  background: linear-gradient(115deg, transparent 0 42%, rgba(255,255,255,.07) 48%, transparent 55% 100%);
  transform: translateX(-80%);
  animation: wide-sheen 7s ease-in-out infinite;
}
.featured-visual span {
  display: inline-block;
  position: relative;
  z-index: 3;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  padding: 8px 12px;
  backdrop-filter: blur(4px);
  background: rgba(0,0,0,.14);
}
.featured-visual .thumb-media,
.card-thumb .thumb-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.featured-visual.has-media { background: #171411; }
.featured-visual.has-media::before {
  inset: 0;
  width: auto;
  height: auto;
  right: auto;
  top: auto;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.04) 0%, rgba(0,0,0,.10) 45%, rgba(0,0,0,.58) 100%);
  mask-image: none;
  animation: none;
  z-index: 1;
}
.featured-visual.has-media::after { z-index: 2; opacity: .55; }
.featured-visual.has-media .thumb-media {
  transform: scale(1.015);
  transition: transform 900ms cubic-bezier(.2,.8,.2,1), filter 900ms ease;
}
.featured-card:hover .featured-visual.has-media .thumb-media { transform: scale(1.045); filter: saturate(1.03) contrast(1.02); }
.featured-visual .media-chip {
  margin-left: 8px;
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.30);
}
.card-thumb {
  display: block;
  z-index: 1;
  min-height: 156px;
  margin: -7px -7px 14px;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.14) 1px, transparent 1.8px) 0 0 / 16px 16px,
    radial-gradient(circle at 1px 1px, rgba(180,35,24,.18) 1px, transparent 1.8px) 8px 8px / 22px 22px,
    #1d1a16;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(0,0,0,.44) 100%);
  z-index: 1;
}
.card-thumb .thumb-media {
  transform: scale(1.01);
  transition: transform 640ms cubic-bezier(.2,.8,.2,1), filter 640ms ease;
}
.post-card:hover .card-thumb .thumb-media,
.curated-card:hover .card-thumb .thumb-media { transform: scale(1.055); filter: saturate(1.04) contrast(1.02); }
.card-thumb .thumb-chip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  color: white;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .78rem;
  font-weight: 900;
  background: rgba(0,0,0,.24);
  backdrop-filter: blur(7px);
}
.card-thumb.is-video .thumb-chip::before,
.featured-visual.is-video .media-chip::before { content: "▶ "; }
.featured-card.no-visual {
  grid-template-columns: 1fr;
}
.featured-card.no-visual .featured-body {
  min-height: 285px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 1px 1px, rgba(180,35,24,.06) 1px, transparent 1.7px) 0 0 / 13px 13px,
    radial-gradient(circle at 1px 1px, rgba(219,170,95,.08) 1px, transparent 1.7px) 6px 6px / 18px 18px,
    rgba(255,253,248,.72);
}
.compact-featured.no-visual .featured-body {
  min-height: 210px;
}
.featured-body { padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; justify-content: center; }
.featured-body h1 { font-size: clamp(2.15rem, 5vw, 3.55rem); line-height: .98; letter-spacing: -.08em; margin: 14px 0; }
.featured-body p { color: var(--muted); font-size: 1.08rem; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .86rem; align-items: center; }
.badge { background: var(--soft-accent); color: var(--accent); border-radius: 999px; padding: 4px 9px; font-weight: 900; }
.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}
.section-title-row h1,
.section-title-row h2 { margin: 0; letter-spacing: -.06em; line-height: 1; }
.section-title-row h1 { font-size: clamp(2rem, 4vw, 3rem); }
.section-title-row p { color: var(--muted); margin: 0; }
.compact-title-row { align-items: center; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.post-card {
  background: var(--glass-strong);
  border: 1px solid rgba(222, 212, 194, .86);
  border-radius: var(--radius);
  padding: 19px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px) saturate(115%);
  box-shadow: 0 12px 32px rgba(42,31,15,.045), inset 0 1px 0 rgba(255,255,255,.62);
  transition: transform var(--motion-med) cubic-bezier(.2,.8,.2,1), box-shadow var(--motion-med) ease, border-color var(--motion-med) ease, background var(--motion-med) ease;
}
.post-card::before {
  content: "";
  position: absolute;
  inset: -1px auto auto -1px;
  width: 9rem;
  height: 9rem;
  border-radius: 999px;
  background: radial-gradient(circle at 1px 1px, rgba(180,35,24,.12) 1px, transparent 1.8px) 0 0 / 14px 14px;
  -webkit-mask-image: radial-gradient(circle, #000 0 56%, transparent 75%);
  mask-image: radial-gradient(circle, #000 0 56%, transparent 75%);
  opacity: 0;
  transform: scale(.8);
  transition: opacity var(--motion-med) ease, transform var(--motion-med) ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: 0 24px 58px rgba(42,31,15,.12); border-color: rgba(180,35,24,.24); background: rgba(255,253,248,.94); }
.post-card:hover::before { opacity: 1; transform: scale(1); }
.post-card.has-thumb { padding: 18px; }
.post-card.has-thumb::before { opacity: .16; transform: scale(1); }
.post-card > .meta,
.post-card > h2,
.post-card > p {
  position: relative;
  z-index: 1;
}
.post-card h2 { font-size: 1.42rem; line-height: 1.13; letter-spacing: -.045em; margin: 10px 0; }
.post-card p { color: var(--muted); margin: 0 0 16px; }
.curated-sections {
  margin: 0 0 34px;
}
.curated-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.curated-card {
  background:
    radial-gradient(circle at 1px 1px, rgba(180,35,24,.055) 1px, transparent 1.7px) 0 0 / 12px 12px,
    var(--glass-strong);
  border: 1px solid rgba(222, 212, 194, .88);
  border-radius: var(--radius);
  padding: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 34px rgba(42,31,15,.05), inset 0 1px 0 rgba(255,255,255,.60);
  backdrop-filter: blur(12px) saturate(115%);
  transition: transform var(--motion-med) cubic-bezier(.2,.8,.2,1), box-shadow var(--motion-med) ease, border-color var(--motion-med) ease;
}
.curated-card:hover {
  transform: translateY(-4px);
  border-color: rgba(180,35,24,.24);
  box-shadow: 0 22px 52px rgba(42,31,15,.11);
}
.curated-card .card-thumb { min-height: 128px; margin: 10px 0 14px; }
.curated-card h2 {
  font-size: 1.28rem;
  line-height: 1.1;
  letter-spacing: -.05em;
  margin: 9px 0;
}
.curated-card p { color: var(--muted); margin: 0; }
.curated-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--accent);
  font-weight: 950;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.curated-label em {
  font-style: normal;
  color: rgba(22,20,17,.22);
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -.08em;
}
.article-after {
  margin-top: 28px;
  display: grid;
  gap: 26px;
}
.article-after > .section-title-row {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.article-after .section-title-row a {
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}
.after-pick,
.article-archive {
  min-width: 0;
}
.compact-featured {
  grid-template-columns: .82fr 1fr;
}
.compact-featured .featured-visual { min-height: 235px; }
.compact-featured .featured-body { padding: clamp(20px, 3vw, 30px); }
.compact-featured .featured-body h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compact-card { padding: 16px; }
.compact-card .card-thumb { min-height: 118px; }
.compact-card h2 { font-size: 1.18rem; }

.panel {
  background: var(--glass-strong);
  border: 1px solid rgba(222, 212, 194, .88);
  border-radius: var(--radius);
  padding: 19px;
  box-shadow: 0 12px 36px rgba(42,31,15,.05), inset 0 1px 0 rgba(255,255,255,.64);
  backdrop-filter: blur(12px) saturate(115%);
}
.panel h2 { margin: 0 0 12px; font-size: 1.1rem; letter-spacing: -.04em; }
.panel p { color: var(--muted); margin: 0 0 12px; }
.panel-link { color: var(--accent); font-weight: 900; }
.tag-panel {
  background:
    radial-gradient(circle at 1px 1px, rgba(180,35,24,.06) 1px, transparent 1.7px) 0 0 / 14px 14px,
    var(--glass-strong);
}
.tag-nav {
  width: 100%;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  overflow: visible;
}
.tag-nav button {
  font-size: .82rem;
  padding: 7px 10px;
  background: rgba(255,253,248,.76);
}
.tag-nav button.active {
  background: var(--ink);
  color: white;
}
.tag-empty {
  color: var(--muted);
  font-size: .9rem;
}
.ad-panel {
  overflow: hidden;
}
.ad-slot {
  min-height: 280px;
  border: 1px dashed rgba(180,35,24,.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 1px 1px, rgba(180,35,24,.055) 1px, transparent 1.7px) 0 0 / 16px 16px,
    linear-gradient(135deg, rgba(255,253,248,.78), rgba(249,245,236,.78));
  color: var(--muted);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
}
.ad-slot span {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .14em;
}
.ad-slot p {
  margin: 0;
  font-size: .92rem;
  font-weight: 800;
}
.ad-slot .adsbygoogle {
  display: block;
  width: 100%;
  min-height: 250px;
}
.ranking-list { margin: 0; padding-left: 26px; }
.ranking-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.ranking-list li:last-child { border-bottom: 0; }
.ranking-list a { font-weight: 900; display: block; line-height: 1.25; transition: transform var(--motion-fast) ease, color var(--motion-fast) ease; }
.ranking-list a:hover { transform: translateX(3px); }
.ranking-list span { display: block; color: var(--muted); font-size: .83rem; margin-top: 4px; }
.article {
  background: var(--glass-strong);
  border: 1px solid rgba(222, 212, 194, .88);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(24px, 5vw, 56px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.64);
  backdrop-filter: blur(12px) saturate(115%);
  animation: enter-soft .62s ease both;
}
.article > a:first-child { color: var(--muted); font-weight: 800; }
.article h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: .96; letter-spacing: -.09em; margin: 16px 0; }
.article .deck { color: var(--muted); font-size: 1.25rem; }
.article-content { margin-top: 30px; font-size: 1.08rem; }
.article-content h2, .article-content h3 { letter-spacing: -.05em; margin-top: 1.8em; line-height: 1.1; }
.article-content p { margin: 1em 0; }
.article-content ul { padding-left: 1.4em; }
.article-content blockquote { border-left: 4px solid var(--accent); padding-left: 14px; color: var(--muted); }
.article-content code, code {
  background:
    linear-gradient(180deg, rgba(255,255,255,.46), rgba(255,255,255,0)),
    var(--code-bg-soft);
  border: 1px solid var(--code-border);
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.52);
  color: #532018;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .9em;
  font-weight: 700;
  padding: .12em .42em;
}
.article-content hr,
.article-content .markdown-rule {
  border: 0;
  height: 1px;
  margin: clamp(30px, 6vw, 56px) 0;
  overflow: visible;
  position: relative;
  background: linear-gradient(90deg, transparent, rgba(180,35,24,.18), rgba(180,35,24,.68), rgba(180,35,24,.18), transparent);
}
.article-content hr::after,
.article-content .markdown-rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(180,35,24,.52);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 7px rgba(244,241,234,.92), 0 8px 20px rgba(42,31,15,.12);
  transform: translate(-50%, -50%);
}

.posted-preview-section {
  margin: 22px 0 18px;
}
.preview-title-row {
  margin: 0 0 14px;
  padding: 0 4px;
}
.preview-state {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  padding: 7px 10px;
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}
.large-preview-notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid rgba(180,35,24,.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 1px 1px, rgba(180,35,24,.055) 1px, transparent 1.7px) 0 0 / 14px 14px,
    var(--soft-accent);
  color: var(--ink);
}
.large-preview-notice strong {
  display: block;
  font-size: .96rem;
}
.large-preview-notice p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .92rem;
}
.large-preview-notice .secondary-button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.post-preview {
  min-width: 0;
}
.post-preview.empty {
  background: var(--glass-strong);
  border: 1px dashed rgba(180, 35, 24, .26);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 20px;
}
.post-preview-article {
  overflow: hidden;
}
.post-preview-article .post-media video { max-height: 64vh; }

.admin-panel { max-width: 560px; }
.stacked-form, .editor-form { display: grid; gap: 14px; }
.editor-form {
  background: var(--glass-strong);
  border: 1px solid rgba(222, 212, 194, .88);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.62);
  backdrop-filter: blur(12px) saturate(115%);
}
.editor-form label, .stacked-form label { display: grid; gap: 7px; font-weight: 900; }
.editor-form input, .editor-form textarea, .editor-form select, .stacked-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background var(--motion-fast) ease;
}
.editor-form input:focus, .editor-form textarea:focus, .editor-form select:focus, .stacked-form input:focus {
  outline: none;
  border-color: rgba(180,35,24,.35);
  box-shadow: 0 0 0 4px rgba(180,35,24,.08);
  background: #fffefb;
}
.editor-form textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form-grid.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three-column { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.button-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.danger { background: #8a111b !important; }
.admin-post-list { display: grid; gap: 10px; }
.admin-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.admin-row:last-child { border-bottom: 0; }
.admin-row button { border: 1px solid var(--line); border-radius: 999px; background: var(--paper-2); padding: 7px 11px; }
.curation-summary { display: grid; gap: 10px; }
.curation-scope {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-2);
  padding: 14px;
}
.curation-scope select {
  width: min(100%, 360px);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 900;
}
.curation-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,253,248,.62);
  padding: 12px;
}
.curation-row strong { display: block; letter-spacing: -.03em; }
.curation-row-copy { display: block; min-width: 170px; }
.curation-row-copy > span { display: block; color: var(--muted); font-size: .86rem; margin-top: 3px; }
.curation-row select {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 800;
}
.curation-row select:focus,
.curation-scope select:focus {
  outline: none;
  border-color: rgba(180,35,24,.35);
  box-shadow: 0 0 0 4px rgba(180,35,24,.08);
}
.curation-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 2px; }
.panel-note { color: var(--muted); margin: -4px 0 14px; font-size: .92rem; }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--muted);
  background: var(--paper-2);
}
.legal-page h2 { margin-top: 28px; }
.legal-page p { color: var(--ink); }
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  padding: 18px;
  display: grid;
  gap: 6px;
  margin: 18px 0;
}
.contact-card a { color: var(--accent); font-weight: 900; overflow-wrap: anywhere; }
.site-footer {
  border-top: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.055) 1px, transparent 1.8px) 0 0 / 18px 18px,
    radial-gradient(circle at 1px 1px, rgba(180,35,24,.10) 1px, transparent 1.9px) 9px 9px / 26px 26px,
    #171411;
  color: rgba(255,255,255,.72);
  padding: 38px 0;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  width: 18rem;
  height: 18rem;
  right: 9%;
  top: -12rem;
  border-radius: 50% 44% 56% 48% / 46% 58% 42% 54%;
  background: radial-gradient(circle at 1px 1px, rgba(255,255,255,.11) 1px, transparent 1.8px) 0 0 / 18px 18px;
  -webkit-mask-image: radial-gradient(circle, #000 0 56%, transparent 74%);
  mask-image: radial-gradient(circle, #000 0 56%, transparent 74%);
  animation: liquid-pulse 12s ease-in-out infinite alternate;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.footer-grid h2 {
  color: white;
  font-size: .9rem;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.footer-grid p { margin: 0 0 8px; }
.footer-grid nav { display: grid; gap: 8px; }
.footer-grid a { color: rgba(255,255,255,.78); }
.footer-grid a:hover { color: white; }
.footer-logo { display: inline-block; color: white !important; font-size: 1.4rem; font-weight: 950; letter-spacing: -.06em; margin-bottom: 6px; }

.container,
.layout,
.main-column,
.side-column,
.panel,
.post-card,
.card-thumb,
.featured-card,
.featured-body,
.article,
.article-content,
.admin-row,
.editor-form,
.posted-preview-section,
.post-preview,
.post-preview-article,
.contact-card,
.site-footer {
  min-width: 0;
}
.article,
.article-content,
.post-card,
.featured-body,
.panel,
.ranking-list,
.admin-row,
.post-preview,
.post-preview-article,
.legal-page,
.footer-grid {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.article-content pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.7em 0;
  white-space: pre;
  word-break: normal;
  background:
    radial-gradient(circle at 24px 22px, rgba(255,255,255,.18) 0 2px, transparent 2.5px),
    linear-gradient(135deg, rgba(180,35,24,.20), transparent 38%),
    var(--code-bg);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(42,31,15,.18), inset 0 1px 0 rgba(255,255,255,.09);
  color: var(--code-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .92rem;
  line-height: 1.65;
  padding: 50px 18px 18px;
  position: relative;
  tab-size: 2;
}
.article-content pre::before {
  content: "CODE";
  position: absolute;
  top: 14px;
  left: 18px;
  color: rgba(255,247,232,.64);
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .16em;
}
.article-content pre::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 18px;
  width: 46px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,247,232,.24), rgba(255,247,232,.10));
}
.article-content pre code {
  display: block;
  min-width: max-content;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  font: inherit;
  font-weight: 500;
}
.article-content code,
code { overflow-wrap: anywhere; word-break: break-word; }
.article-content pre code {
  overflow-wrap: normal;
  word-break: normal;
  white-space: inherit;
}
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.card-thumb video::-webkit-media-controls { display: none !important; }
.card-thumb video { pointer-events: none; }

.post-media {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: 0 14px 34px rgba(42,31,15,.06);
  transition: transform var(--motion-med) ease, box-shadow var(--motion-med) ease;
}
.post-media:hover { transform: translateY(-2px); box-shadow: 0 20px 48px rgba(42,31,15,.10); }
.post-media img,
.post-media video { display: block; width: 100%; max-width: 100%; height: auto; }
.post-media video { background: #111; max-height: 76vh; }
.post-media figcaption { padding: 10px 14px; color: var(--muted); font-size: .92rem; border-top: 1px solid var(--line); }
.download-card { margin: 22px 0 !important; }
.download-card a {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
  padding: 15px 16px;
  text-decoration: none;
}
.download-card span { color: var(--muted); font-size: .88rem; }
.media-help { margin: -2px 0 4px; color: var(--muted); font-size: .9rem; }
.media-help code { display: inline-block; margin: 2px 0; }


.reveal-target {
  opacity: 0;
  transform: translateY(18px) scale(.992);
}
.reveal-target.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity var(--motion-slow) ease, transform var(--motion-slow) cubic-bezier(.2,.8,.2,1);
}
.post-card.reveal-target:nth-child(2) { transition-delay: 70ms; }
.post-card.reveal-target:nth-child(3) { transition-delay: 120ms; }
.post-card.reveal-target:nth-child(4) { transition-delay: 170ms; }
.post-card.reveal-target:nth-child(5) { transition-delay: 220ms; }

@keyframes enter-soft {
  from { opacity: 0; transform: translateY(14px) scale(.994); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes liquid-drift {
  0% { transform: translate3d(0,0,0) rotate(0deg) scale(1); border-radius: 47% 53% 61% 39% / 45% 38% 62% 55%; }
  50% { transform: translate3d(2rem,-1rem,0) rotate(8deg) scale(1.04); border-radius: 57% 43% 48% 52% / 54% 48% 52% 46%; }
  100% { transform: translate3d(1rem,1.4rem,0) rotate(-6deg) scale(.98); border-radius: 39% 61% 44% 56% / 52% 43% 57% 48%; }
}
@keyframes liquid-float {
  from { transform: translate3d(0,0,0) rotate(0deg) scale(1); }
  to { transform: translate3d(-1.5rem,1.1rem,0) rotate(10deg) scale(1.08); }
}
@keyframes liquid-pulse {
  from { transform: translate3d(0,0,0) rotate(0deg) scale(.96); opacity: .72; }
  to { transform: translate3d(.8rem,1.2rem,0) rotate(9deg) scale(1.08); opacity: .95; }
}
@keyframes glass-sheen {
  0%, 42% { transform: translateX(-55%) rotate(12deg); opacity: 0; }
  54% { opacity: .85; }
  70%, 100% { transform: translateX(65%) rotate(12deg); opacity: 0; }
}
@keyframes wide-sheen {
  0%, 54% { transform: translateX(-85%); opacity: 0; }
  66% { opacity: 1; }
  86%, 100% { transform: translateX(85%); opacity: 0; }
}
@keyframes mark-breathe {
  0%, 100% { border-radius: 16px; }
  50% { border-radius: 19px 15px 21px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
  .reveal-target { opacity: 1; transform: none; }
}

@media (max-width: 950px) {
  .masthead, .featured-card, .compact-featured { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; }
  .layout { grid-template-columns: 1fr; }
  .side-column { position: static; }
  .post-grid, .compact-grid, .curated-grid { grid-template-columns: 1fr; }
  .featured-visual { min-height: 210px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .large-preview-notice { align-items: stretch; flex-direction: column; }
  .large-preview-notice .secondary-button { width: 100%; }
  .form-grid.two-column, .form-grid.three-column { grid-template-columns: 1fr; }
  .curation-row,
  .curation-scope { align-items: stretch; flex-direction: column; }
  .curation-row select,
  .curation-scope select { width: 100%; }
  .utility-bar { align-items: flex-start; }
  .utility-bar nav { flex-wrap: wrap; justify-content: flex-end; }
  .search-box { border-radius: 18px; }
  .search-box button { padding-inline: 14px; }
}
.autosave-state {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}
.draft-recovery-panel {
  border-color: rgba(180,35,24,.22);
  background: linear-gradient(135deg, rgba(255,253,248,.92), rgba(255,246,232,.82));
}
.draft-recovery-list { display: grid; gap: 10px; }
.draft-recovery-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,253,248,.74);
  padding: 12px;
}
.draft-recovery-row strong { display: block; overflow-wrap: anywhere; }
.draft-recovery-row span {
  color: var(--muted);
  display: block;
  font-size: .86rem;
  margin-top: 3px;
}
@media (max-width: 720px) {
  .draft-recovery-row { align-items: stretch; flex-direction: column; }
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(222, 212, 194, .9);
  border-radius: 20px;
  background: rgba(255, 253, 248, .95);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.72);
  backdrop-filter: blur(18px) saturate(120%);
  max-height: min(430px, 70vh);
  overflow-y: auto;
}
.search-suggestion {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 15px;
  border: 1px solid transparent;
  transition: background var(--motion-fast) ease, border-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.search-suggestion:hover,
.search-suggestion.active {
  background: var(--soft-accent);
  border-color: rgba(180,35,24,.18);
  transform: translateY(-1px);
}
.search-suggestion strong {
  font-size: .97rem;
  letter-spacing: -.02em;
}
.search-suggestion span:last-child {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.35;
}
.suggestion-kicker {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.empty-suggestion {
  color: var(--muted);
  cursor: default;
}
.empty-suggestion:hover {
  background: transparent;
  border-color: transparent;
  transform: none;
}

@media (max-width: 700px) {
  .search-box input { border-radius: 18px 0 0 18px; }
  .search-box > button { border-radius: 0 18px 18px 0; }
  .search-suggestions { border-radius: 18px; }
}


/* Mobile header compaction: keep desktop header unchanged, but reduce sticky header height on phones. */
@media (max-width: 950px) {
  .masthead {
    gap: 14px;
    padding: 16px 0 14px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    flex: 0 0 auto;
  }

  .brand strong {
    font-size: clamp(1.55rem, 6vw, 2.35rem);
  }

  .section-nav {
    padding-bottom: 10px;
  }

  .layout {
    padding-top: 24px;
  }
}

@media (max-width: 700px) {
  .container {
    width: calc(100% - 20px);
  }

  .site-header {
    box-shadow: 0 6px 22px rgba(42, 31, 15, .045);
  }

  .utility-bar {
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: .74rem;
  }

  /* Keep the skip link accessible, but don't let it take visual header space on mobile. */
  .utility-bar > a[href="#content"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .utility-bar > a[href="#content"]:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .utility-bar nav {
    width: 100%;
    justify-content: flex-end;
    gap: 10px;
  }

  .masthead {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(165px, 1.2fr);
    align-items: center;
    gap: 8px;
    padding: 8px 0;
  }

  .brand {
    gap: 9px;
    min-width: 0;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: .82rem;
  }

  .brand strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(1.26rem, 7vw, 1.68rem);
    line-height: .96;
    letter-spacing: -.065em;
  }

  .brand small {
    display: none;
  }

  .search-box {
    min-width: 0;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(42,31,15,.05), inset 0 1px 0 rgba(255,255,255,.68);
  }

  .search-box input {
    padding: 9px 12px;
    font-size: .92rem;
  }

  .search-box button {
    padding: 9px 12px;
    font-size: .88rem;
  }

  .search-box input {
    border-radius: 16px 0 0 16px;
  }

  .search-box > button {
    border-radius: 0 16px 16px 0;
  }

  .search-suggestions {
    top: calc(100% + 6px);
    max-height: min(360px, 62vh);
    border-radius: 16px;
  }

  .section-nav {
    gap: 6px;
    padding-bottom: 7px;
  }

  .section-nav button,
  .filter-pill {
    padding: 6px 10px;
    font-size: .8rem;
  }

  .layout {
    padding: 18px 0 48px;
  }
}

@media (max-width: 420px) {
  .utility-bar {
    padding: 4px 0;
  }

  .masthead {
    grid-template-columns: minmax(0, .74fr) minmax(150px, 1.26fr);
    gap: 6px;
    padding: 6px 0;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    font-size: clamp(1.18rem, 7.2vw, 1.48rem);
  }

  .search-box button {
    min-width: 42px;
    padding-inline: 10px;
  }

  .section-nav button,
  .filter-pill {
    padding: 5px 9px;
  }
}


/* PageSpeed mobile pass: avoid costly off-screen paint/reflow and defer lower content rendering. */
.adsbygoogle { display: block; width: 100%; min-height: 250px; }
.post-card,
.curated-card,
.panel,
.post-media,
.article-after > section {
  content-visibility: auto;
  contain-intrinsic-size: 280px;
}

@media (max-width: 700px) {
  body {
    background: linear-gradient(180deg, #fbf7ef 0, var(--bg) 34rem);
  }

  body::before,
  body::after,
  .site-footer::before,
  .featured-card::before,
  .featured-visual::before,
  .featured-visual::after,
  .brand-mark::after {
    display: none;
  }

  .site-header,
  .search-box,
  .featured-card,
  .post-card,
  .curated-card,
  .panel,
  .article,
  .editor-form,
  .search-suggestions {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .brand-mark {
    animation: none;
  }

  .featured-card,
  .article {
    animation: none;
  }
}
