/* ============================================================
   BowTied Jungle — stylesheet
   ============================================================ */

:root {
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #f5f2e9;
  --bg-2: #efeade;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.95);
  --surface-solid: #ffffff;
  --border: rgba(20, 40, 30, 0.1);
  --border-strong: rgba(20, 40, 30, 0.22);
  --text: #15211b;
  --text-2: #33443b;
  --muted: #62736a;
  --gold: #a4771b;
  --gold-2: #7f5b12;
  --gold-soft: rgba(164, 119, 27, 0.12);
  --leaf: #1f8f52;
  --leaf-soft: rgba(31, 143, 82, 0.12);
  --shadow: 0 1px 2px rgba(20, 40, 30, 0.05), 0 10px 30px -14px rgba(20, 40, 30, 0.25);
  --shadow-hover: 0 2px 4px rgba(20, 40, 30, 0.06), 0 24px 50px -20px rgba(20, 40, 30, 0.35);
  --glow-1: rgba(31, 143, 82, 0.18);
  --glow-2: rgba(164, 119, 27, 0.16);

  --c-money: #a4771b;
  --c-crypto: #6d4fd1;
  --c-wifi: #1f8f52;
  --c-tech: #1f6fd1;
  --c-health: #d1365b;
  --c-life: #d1651f;
  --c-travel: #148f83;
  --c-friends: #a21caf;

  --radius: 18px;
  --radius-sm: 10px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a1210;
  --bg-2: #0e1813;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.065);
  --surface-solid: #121d17;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9efe9;
  --text-2: #c2cec5;
  --muted: #8ea396;
  --gold: #e2b85f;
  --gold-2: #f2d48a;
  --gold-soft: rgba(226, 184, 95, 0.14);
  --leaf: #4fd38a;
  --leaf-soft: rgba(79, 211, 138, 0.14);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 24px 50px -20px rgba(0, 0, 0, 0.75);
  --glow-1: rgba(38, 120, 78, 0.35);
  --glow-2: rgba(226, 184, 95, 0.16);
  --c-money: #e2b85f;
  --c-crypto: #b39cf7;
  --c-wifi: #4fd38a;
  --c-tech: #6fb6ff;
  --c-health: #ff7d95;
  --c-life: #ff9d5c;
  --c-travel: #38d6c5;
  --c-friends: #e879f9;

  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; }

/* ---------- background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% -10%, var(--glow-1), transparent 65%),
    radial-gradient(700px 460px at 92% -5%, var(--glow-2), transparent 65%),
    radial-gradient(1000px 700px at 50% 120%, var(--glow-1), transparent 60%),
    var(--bg);
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] .bg::after { opacity: 0.045; mix-blend-mode: overlay; }

.container { width: min(1240px, 100% - 40px); margin-inline: auto; }
@media (max-width: 600px) { .container { width: min(1240px, 100% - 32px); } }

/* ---------- header ---------- */
.segs, .filters { display: contents; }
.filters-btn { display: none; }
.stats .credit a { color: var(--gold); font-weight: 600; }
.stats .credit a:hover { color: var(--gold-2); }
.site-header {
  position: static;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(1240px, 100% - 40px);
  margin: 14px auto 0;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.bowtie { width: 30px; height: 19px; fill: var(--gold); }
.bowtie rect { fill: var(--gold-2); }
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.wordmark em { font-style: italic; color: var(--gold); font-weight: 500; }

.views {
  display: flex;
  gap: 2px;
  margin-left: auto;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.view-btn {
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  font-size: 13.5px;
  transition: background 0.2s, color 0.2s;
}
.view-btn:hover { color: var(--text); }
.view-btn.active {
  background: var(--gold);
  color: #16120a;
  font-weight: 600;
}
.header-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: block; }
:root[data-theme="dark"] .icon-btn .moon { display: none; }

@media (max-width: 720px) {
  .site-header { flex-wrap: wrap; border-radius: 22px; gap: 10px; }
  .views { order: 3; width: 100%; margin-left: 0; }
  .view-btn { flex: 1; text-align: center; }
  .header-actions { margin-left: auto; }
}

/* ---------- hero ---------- */
.hero {
  width: min(1240px, 100% - 40px);
  margin: 0 auto;
  padding: 34px 0 14px;
  text-align: center;
}
.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144;
}
.hero h1 span {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(100deg, var(--gold-2), var(--gold) 45%, var(--leaf));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  max-width: 520px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 15px;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.stats b { color: var(--text); font-weight: 600; }
.stats .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--leaf); display: inline-block; margin-right: 8px; box-shadow: 0 0 0 4px var(--leaf-soft); vertical-align: 1px; }

.notice {
  display: inline-block;
  margin-top: 16px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- toolbar ---------- */
.toolbar {
  width: min(1240px, 100% - 40px);
  margin: 12px auto 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.search {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14.5px; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
}
.chip:hover { border-color: var(--border-strong); background: var(--surface-2); }
.chip .sw { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); }
.chip .n { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.active .n { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.chip.pub-chip { border-style: dashed; }
.chip.pub-chip img { width: 18px; height: 18px; border-radius: 5px; object-fit: cover; }
.chip .x { margin-left: 2px; opacity: 0.7; }

/* ---------- free / paid toggle ---------- */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  flex-shrink: 0;
}
.seg-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--text); color: var(--bg); font-weight: 600; }
.seg-btn:focus-visible, .chip:focus-visible, .view-btn:focus-visible, .more:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lock { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.badge.free { background: var(--leaf-soft); color: var(--leaf); }
.badge.paid { background: var(--gold-soft); color: var(--gold); }
.badge .lock { width: 10px; height: 10px; }
.stats .sub { color: var(--muted); font-weight: 400; }

/* ---------- section headers ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 8px 0 16px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.015em;
}
.section-head .meta { color: var(--muted); font-size: 13px; }
.section-head .bar { width: 10px; height: 26px; border-radius: 3px; background: var(--c, var(--gold)); align-self: center; }

/* ---------- post grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.post {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1), border-color 0.25s, box-shadow 0.25s;
}
.post:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-hover); }
.post .cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.post .cover img.real { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.post:hover .cover img.real { transform: scale(1.04); }
/* placeholder: category-tinted ground, bow-tie pattern, publication logo */
.post .cover .ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 90% at 20% 0%, color-mix(in srgb, var(--c) 34%, var(--surface-solid)), transparent 60%),
    radial-gradient(90% 80% at 100% 100%, color-mix(in srgb, var(--c) 22%, var(--surface-solid)), transparent 60%),
    color-mix(in srgb, var(--c) 10%, var(--surface-solid));
}
.post .cover .ph::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--c);
  opacity: 0.13;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='48' viewBox='0 0 72 48'%3E%3Cpath d='M12 12l18 8v4l-18 8zM60 12l-18 8v4l18 8z'/%3E%3Crect x='33' y='17' width='6' height='10' rx='2'/%3E%3C/svg%3E") 0 0 / 72px 48px repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='48' viewBox='0 0 72 48'%3E%3Cpath d='M12 12l18 8v4l-18 8zM60 12l-18 8v4l18 8z'/%3E%3Crect x='33' y='17' width='6' height='10' rx='2'/%3E%3C/svg%3E") 0 0 / 72px 48px repeat;
  transform: rotate(-8deg) scale(1.3);
}
.post .cover .ph .ph-logo {
  position: relative;
  width: 72px; height: 72px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.45), 0 0 0 4px color-mix(in srgb, var(--surface-solid) 70%, transparent);
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.post .cover .ph .ph-logo.logo-fallback { font-size: 26px; }
.post:hover .cover .ph .ph-logo { transform: scale(1.06); }
.post .body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 16px; flex: 1; }
.post .publine { display: flex; align-items: center; gap: 9px; min-width: 0; position: relative; z-index: 1; }
.post .publine .logo { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; }
.post .publine .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.post .publine .pubname { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post .publine .pubname:hover { color: var(--gold); }
.post .publine .author { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post .publine .cat { margin-left: auto; flex-shrink: 0; }
.post h3 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-variation-settings: "opsz" 40;
}
.post h3 a::after { content: ""; position: absolute; inset: 0; }
.post h3 a:hover { color: var(--gold-2); }
.post .excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post .foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.post .foot { position: relative; }
.post .foot .likes { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.post .foot .likes svg { width: 12px; height: 12px; fill: currentColor; opacity: 0.8; }
.post .foot .read { margin-left: auto; color: var(--gold); font-weight: 600; }
.post .foot .read::after { content: " →"; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.6;
}
.badge.new { background: var(--leaf-soft); color: var(--leaf); }
.badge.cat { background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.badge.warn { background: var(--gold-soft); color: var(--gold); }
.badge.off { background: var(--surface-2); color: var(--muted); }

.logo-fallback {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: #16120a;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  user-select: none;
}

/* ---------- publication grid ---------- */
.pubgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 44px;
}
.pub {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1), border-color 0.25s, box-shadow 0.25s;
}
.pub:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-hover); }
.pub.dormant { opacity: 0.72; }
.pub.dormant:hover { opacity: 1; }
.pub .top { display: flex; gap: 14px; align-items: flex-start; }
.pub .logo { width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; object-fit: cover; box-shadow: 0 6px 18px -8px rgba(0,0,0,.6); }
.pub .logo.logo-fallback { font-size: 22px; }
.pub .who { min-width: 0; flex: 1; }
.pub .who h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 1.2; letter-spacing: -0.012em; }
.pub .who h3 a:hover { color: var(--gold-2); }
.pub .who .author { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.pub .who .subs { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.pub .who .subs b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pub .who .subs .sep { opacity: 0.5; margin: 0 2px; }
.pub .latest a .lock { width: 11px; height: 11px; align-self: center; color: var(--gold); }
.pub .actions .mix { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pub .tagline { margin: 0; font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pub .latest { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--border); }
.pub .latest a { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; line-height: 1.35; }
.pub .latest a .t { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pub .latest a:hover .t { color: var(--gold-2); }
.pub .latest a .d { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pub .latest a.first .t { font-weight: 600; }
.pub .latest .none { color: var(--muted); font-size: 13px; }
.pub .actions { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 4px; font-size: 12.5px; }
.pub .actions .btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  font-weight: 600; font-size: 12.5px;
  transition: border-color .2s, color .2s;
}
.pub .actions .btn:hover { border-color: var(--gold); color: var(--gold); }
.pub .actions .btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pub .actions .visit { margin-left: auto; color: var(--muted); }
.pub .actions .visit:hover { color: var(--text); }

/* ---------- misc ---------- */
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.empty b { color: var(--text); }
.more-wrap { display: flex; justify-content: center; margin: 28px 0 10px; }
.more {
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-weight: 600;
  transition: border-color .2s, background .2s;
}
.more:hover { border-color: var(--gold); background: var(--surface-2); }

.site-footer {
  margin-top: 70px;
  padding: 36px 0 44px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.site-footer .foot-brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; color: var(--text); font-size: 16px; margin-bottom: 10px; }
.site-footer .foot-brand .bowtie { width: 24px; height: 15px; }
.site-footer p { max-width: 640px; margin: 6px 0; }
.site-footer .foot-links { display: flex; flex-wrap: wrap; gap: 10px; }
.site-footer a:hover { color: var(--gold); }

.site-footer .foot-credit { margin-top: 14px; font-size: 13px; color: var(--muted); }
.site-footer .foot-credit a { color: var(--gold); font-weight: 600; }
.site-footer .foot-credit a:hover { color: var(--gold-2); }

/* ---------- hero credit, read state, static pages ---------- */
.hero-credit { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.hero-credit a { color: var(--gold); font-weight: 600; border-bottom: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.hero-credit a:hover { color: var(--gold-2); border-color: var(--gold-2); }
.post.is-read { opacity: 0.62; }
.post.is-read:hover { opacity: 1; }
.post.is-read h3 a::before { content: "✓ "; color: var(--leaf); font-family: var(--font-body); font-weight: 700; }
.pub .latest a.is-read .t { color: var(--muted); }
.pub .latest a.is-read .t::before { content: "✓ "; color: var(--leaf); font-weight: 700; }
.linkbtn { margin-left: auto; border: 0; background: none; color: var(--gold); font-size: 13px; font-weight: 600; padding: 4px 0; }
.linkbtn:hover { color: var(--gold-2); text-decoration: underline; }
.site-footer .foot-cats { margin-bottom: 8px; }
.static { padding-top: 34px; }
.static-head { margin-bottom: 30px; }
.static-head h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 4.6vw, 48px); letter-spacing: -0.02em; line-height: 1.05; }
.static-head .lede { margin: 12px 0 0; max-width: 640px; }
.static-head .eyebrow a:hover { color: var(--gold-2); }
.pubhead { display: flex; gap: 24px; align-items: flex-start; }
.pubhead .biglogo { width: 96px; height: 96px; border-radius: 24px; flex-shrink: 0; object-fit: cover; box-shadow: var(--shadow); }
.pubhead .biglogo.logo-fallback { font-size: 34px; }
@media (max-width: 600px) { .pubhead { flex-direction: column; } }
.btn-primary { display: inline-block; margin-top: 6px; padding: 10px 18px; border-radius: 999px; background: var(--gold); color: #16120a; font-weight: 600; font-size: 14px; }
.btn-primary:hover { background: var(--gold-2); }
.static .grid, .static .pubgrid { margin-bottom: 40px; }
.static .post h3 a::after { content: none; }
.post .publine .cat a.badge:hover { filter: brightness(1.15); }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 40px 0; }
.notfound h1 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 6vw, 64px); letter-spacing: -0.02em; }
.notfound p { margin: 0 0 18px; color: var(--muted); }

/* ---------- status page ---------- */
.badge.bad { background: color-mix(in srgb, var(--c-health) 16%, transparent); color: var(--c-health); }
.status { padding-top: 34px; }
.status section { margin-bottom: 40px; }
.status-head h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.02em; }
.status-head .lede { margin: 10px 0 0; max-width: 620px; }
.status .hint { margin: -6px 0 14px; color: var(--muted); font-size: 13.5px; max-width: 760px; }
.status .hint b { color: var(--text-2); }
.hint-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; max-width: 760px; }
.hint-list li { margin: 6px 0; }
.hint-list b { color: var(--text-2); }
.hint-list code, .status .hint code { font-size: 12.5px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.tile { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); border-left-width: 4px; }
.tile.tone-good { border-left-color: var(--leaf); }
.tile.tone-bad { border-left-color: var(--c-health); }
.tile.tone-off { border-left-color: var(--border-strong); }
.tile-label { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.tile-value { margin-top: 6px; font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.tile-sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.status-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.status-table th { text-align: left; padding: 12px 14px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.status-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.status-table tr:last-child td { border-bottom: 0; }
.status-table td a:hover { color: var(--gold); }
.status-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.status-table .muted { color: var(--muted); font-size: 12px; }
.status-table .small { max-width: 360px; }
.status-table .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; color: var(--text-2); word-break: break-all; }
.status-table tr.row-error td:first-child, .status-table tr.row-stale td:first-child { box-shadow: inset 3px 0 0 var(--c-health); }
.status-table tr.row-stale td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.status-table tr.row-ok td:first-child { box-shadow: inset 3px 0 0 var(--leaf); }
.views a.view-btn { display: inline-block; }

/* ============================================================
   Phones: less chrome, more posts per screen
   ============================================================ */
@media (max-width: 640px) {
  .container, .site-header, .hero, .toolbar { width: min(1240px, 100% - 28px); }

  /* header: plain two rows, no floating pill */
  .site-header {
    margin: 10px auto 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    gap: 8px 10px;
  }
  .bowtie { width: 26px; height: 16px; }
  .wordmark { font-size: 19px; }
  .icon-btn { width: 34px; height: 34px; }
  .views { order: 3; width: 100%; margin: 2px 0 0; padding: 3px; }
  .view-btn { padding: 7px 10px; font-size: 13px; }

  /* hero: one line, essentials only */
  .hero { padding: 16px 0 6px; }
  .eyebrow, .lede { display: none; }
  .hero h1 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.15; }
  .hero h1 br { display: none; }
  .hero h1 span { margin-left: 0.2em; }
  .stats { margin-top: 10px; gap: 4px 12px; font-size: 12px; }
  .stats .sub { display: none; }
  .hero-credit { margin-top: 8px; font-size: 11.5px; }
  .notice { margin-top: 10px; font-size: 12px; padding: 7px 12px; }

  /* toolbar: search + a Filters button; the controls live in a panel it opens */
  .toolbar { margin: 10px auto 14px; gap: 8px; flex-wrap: wrap; }
  .search { flex: 1 1 0; min-width: 0; height: 40px; padding: 0 12px; }
  .search input { font-size: 14px; }
  .filters-btn {
    display: inline-flex; align-items: center; gap: 6px;
    flex-shrink: 0;
    height: 40px; padding: 0 14px;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); color: var(--text-2);
    font-size: 13.5px; font-weight: 600;
  }
  .filters-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .filters-btn .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #16120a; font-size: 11px; line-height: 18px; text-align: center; }
  .filters-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }
  .filters {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
  }
  .filters.open { display: flex; }
  .segs { display: flex; flex-wrap: wrap; gap: 6px; }
  .chips { gap: 6px; }
  .seg { height: 34px; }
  .seg-btn { padding: 0 11px; font-size: 12.5px; }
  .chip { height: 31px; padding: 0 11px; font-size: 12.5px; }
  .chip .n { display: none; }
  .filters .chips { padding-top: 10px; border-top: 1px dashed var(--border); }

  /* sections and cards */
  .section-head { margin: 4px 0 10px; gap: 10px; flex-wrap: wrap; }
  .section-head h2 { font-size: 18px; }
  .section-head .bar { display: none; }
  .section-head .meta { font-size: 12px; }
  .grid, .pubgrid { gap: 10px; }
  .pubgrid { margin-bottom: 28px; }

  /* post card becomes a compact row with a square thumbnail on the right */
  .post {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px;
    border-radius: 14px;
    animation: none;
  }
  .post:hover { transform: none; }
  .post .cover {
    grid-column: 2;
    grid-row: 1;
    aspect-ratio: 1;
    width: 84px;
    height: 84px;
    margin: 12px 12px 0 0;
    border: 0;
    border-radius: 12px;
    align-self: start;
  }
  .post .cover .ph::before { transform: rotate(-8deg) scale(1.6); }
  .post .cover .ph .ph-logo { width: 40px; height: 40px; border-radius: 12px; box-shadow: none; }
  .post .cover .ph .ph-logo.logo-fallback { font-size: 15px; }
  .post .body { grid-column: 1; grid-row: 1; padding: 12px 10px 12px 12px; gap: 6px; }
  .post .publine .logo { width: 22px; height: 22px; border-radius: 6px; }
  .post .publine .pubname { font-size: 12.5px; }
  .post .publine .author { display: none; }
  .post .publine .cat .badge.cat { display: none; }
  .post h3 { font-size: 16px; line-height: 1.25; }
  .post .excerpt { font-size: 12.5px; -webkit-line-clamp: 2; }
  .post .foot { padding-top: 6px; font-size: 12px; gap: 8px; }
  .post .foot .read { display: none; }
  .more-wrap { margin: 18px 0 6px; }

  /* publication cards */
  .pub { padding: 14px; gap: 10px; border-radius: 14px; animation: none; }
  .pub:hover { transform: none; }
  .pub .logo { width: 48px; height: 48px; border-radius: 12px; }
  .pub .who h3 { font-size: 17px; }
  .pub .tagline { font-size: 13px; }
  .pub .latest { gap: 6px; padding-top: 10px; }
  .pub .latest a { font-size: 13px; }

  .site-footer { margin-top: 40px; padding: 24px 0 32px; }
  .status { padding-top: 16px; }
}

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.post, .pub { animation: rise 0.45s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce) { .post, .pub { animation: none; } * { transition: none !important; } }
