/* Juan · Case Notes — palette A 墨纸, Investigative Edge structure.
   Serif masthead/titles · system sans UI/body. No Hermès orange, no Substack green. */

:root {
  --bg: #F7F4EF;
  --surface: #FFFFFF;
  --surface-2: #F3EDE3;
  --ink: #141414;
  --mute: #5C5C5C;
  --mute-2: #7A7A7A;
  --rule: #E5E0D8;
  --line: #E5E0D8;
  --line-soft: #E5E0D8;
  --subscribe-band: #EFEBE4;
  --cta: #1A1A1A;
  --accent: #1A1A1A;
  --accent-hover: #000000;
  --accent-soft: rgba(20, 20, 20, 0.06);
  --paused: #8A857C;
  --warn-bg: #F3EDE3;
  --radius: 8px;
  --serif: "Iowan Old Style", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    "Hiragino Sans", "PingFang SC", "Noto Sans SC", "Noto Sans JP", sans-serif;
  --max: 720px;
  --site: 1100px;
  --main: 740px;
  --aside: 290px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: var(--site);
  margin: 0 auto;
  padding: 0 32px;
}
.wrap.narrow { max-width: var(--max); }

/* ——— Nav ——— */
nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 244, 239, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  text-decoration: none;
  flex-shrink: 0;
}
.logo img { width: 28px; height: 28px; display: block; border-radius: 4px; }
.links {
  display: flex;
  gap: 22px;
  margin-left: 8px;
  flex: 1;
}
.links a {
  text-decoration: none;
  color: var(--mute);
  font-size: 14px;
  font-weight: 500;
}
.links a:hover { color: var(--ink); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--cta);
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 6px; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn.ghost:hover { border-color: var(--mute); color: var(--ink); }

/* ——— Type ——— */
.brand-name,
h1.brand-name,
.hero-brand .brand-name {
  font-family: var(--serif);
  font-size: clamp(40px, 6.5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
  max-width: 12ch;
}
h1 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.5vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}
h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 0;
}
h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.sub {
  font-size: 17px;
  color: var(--mute);
  margin: 16px 0 0;
  max-width: 36rem;
  line-height: 1.65;
}
.lead { color: var(--mute); max-width: 36rem; font-size: 17px; }
.fine { font-size: 13px; color: var(--mute-2); }
.empty-state {
  color: var(--mute);
  font-size: 16px;
  padding: 12px 0 4px;
}

/* ——— Hero ——— */
section.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.hero-meta {
  margin-top: 20px;
  font-size: 13px;
  color: var(--mute-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ——— Most Popular ——— */
section.popular {
  padding: 48px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  text-decoration: none;
  white-space: nowrap;
}
.view-all:hover { color: var(--ink); }
.popular-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 32px;
}
.pop-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  min-width: 0;
}
.pop-body { flex: 1; min-width: 0; }
.pop-title {
  font-size: 18px;
  margin-bottom: 8px;
}
.pop-title a {
  text-decoration: none;
  color: var(--ink);
}
.pop-title a:hover { text-decoration: underline; }
.pop-meta {
  font-size: 12px;
  color: var(--mute-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pop-cover {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-2);
}
.pop-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ——— Subscribe band ——— */
section.subscribe-band {
  background: var(--subscribe-band);
  border-bottom: 1px solid var(--rule);
  padding: 36px 0;
}
.subscribe-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.subscribe-lead {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  max-width: 28rem;
}
form.signup {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 320px;
  max-width: 420px;
  margin-left: auto;
}
form.signup input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: 15px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
}
form.signup input::placeholder { color: var(--mute-2); }
form.signup input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
form.signup .btn { border-radius: 6px; padding: 12px 18px; }

/* ——— Main split: Recent + Aside ——— */
section.main-split {
  padding: 56px 0 72px;
  border-bottom: 1px solid var(--rule);
}
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--main)) var(--aside);
  gap: 48px;
  align-items: start;
}
.recent-col h2 { margin-bottom: 24px; }
.recent-list { border-top: 1px solid var(--rule); }
.recent-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.recent-title {
  font-size: 20px;
  margin-bottom: 8px;
}
.recent-title a {
  text-decoration: none;
  color: var(--ink);
}
.recent-title a:hover { text-decoration: underline; }
.recent-summary {
  color: var(--mute);
  font-size: 15.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.recent-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--mute-2);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  color: var(--ink);
  border-radius: 999px;
  padding: 2px 8px;
  background: transparent;
}

/* ——— About aside ——— */
.about-aside {
  position: sticky;
  top: 80px;
}
.aside-card {
  padding: 8px 0 0;
}
.aside-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--surface-2);
}
.aside-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.aside-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}
.aside-blurb {
  font-size: 14.5px;
  color: var(--mute);
  line-height: 1.6;
  margin-bottom: 14px;
}
.aside-more {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 16px;
}
.aside-more:hover { opacity: 0.7; }
.aside-disclaimer {
  font-size: 12.5px;
  color: var(--mute-2);
  line-height: 1.5;
  margin-bottom: 16px;
}
.aside-sub-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  text-decoration: none;
}
.aside-sub-link:hover { color: var(--ink); }

/* ——— About page ——— */
.about-page { padding: 64px 0 80px; }
.about-page-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 8px;
}
.photo {
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.points {
  list-style: none;
  margin: 24px 0 0;
  border-top: 1px solid var(--rule);
}
.points li {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  color: var(--mute);
}
.points strong { color: var(--ink); font-weight: 600; }
.disclaimer {
  margin-top: 24px;
  font-size: 13px;
  color: var(--mute-2);
  max-width: 36rem;
}
.about-page .lead { margin-top: 12px; }

/* ——— Writing / archive ——— */
.writing-page { padding: 64px 0 80px; }
.writing-page .lead { margin: 12px 0 36px; }
.archive-year { margin-bottom: 40px; }
.year-label {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--mute);
  margin-bottom: 12px;
  font-weight: 600;
}
.archive-list { list-style: none; border-top: 1px solid var(--rule); }
.archive-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.archive-item a {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.archive-item a:hover { text-decoration: underline; }
.archive-meta {
  font-size: 12px;
  color: var(--mute-2);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ——— Article template ——— */
.article-page { padding: 56px 0 80px; }
.article-meta {
  font-size: 13px;
  color: var(--mute-2);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.article-page h1 {
  font-size: clamp(28px, 4vw, 40px);
  max-width: 20ch;
  margin-bottom: 20px;
}
.article-body {
  max-width: 38rem;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.75;
}
.article-body p { margin: 0 0 1.1em; color: var(--mute); }
.article-body p:first-child { color: var(--ink); }

.article-body h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 2em 0 0.7em;
  color: var(--ink);
  line-height: 1.35;
}
.article-body ol {
  margin: 0 0 1.4em;
  padding-left: 1.35em;
  color: var(--mute);
}
.article-body ol li { margin-bottom: 0.75em; }
.article-body ol.sources { font-size: 0.92em; }
.article-body ol.sources a { color: var(--ink); word-break: break-all; }
.article-body figure {
  margin: 1.4em 0 1.6em;
}
.article-body figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius, 4px);
}
.article-body figcaption {
  margin-top: 0.55em;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--mute-2);
}

.article-back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--mute);
  text-decoration: none;
}
.article-back:hover { color: var(--ink); }

/* ——— Footer ——— */
footer {
  padding: 40px 0 64px;
  font-size: 13px;
  color: var(--mute-2);
}
footer .wrap {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}
footer a {
  color: var(--mute);
  text-decoration: none;
}
footer a:hover { color: var(--ink); }
footer .c { margin-right: auto; color: var(--mute-2); }

/* ——— Legal / doc pages ——— */
.doc { padding-top: 64px; padding-bottom: 80px; }
.doc h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  max-width: none;
  margin-bottom: 16px;
}
.doc .warn {
  border-left: 2px solid var(--paused);
  padding: 14px 18px;
  background: var(--warn-bg);
  margin: 28px 0 36px;
  font-size: 14.5px;
  color: var(--mute);
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.doc td, .doc th {
  border-top: 1px solid var(--rule);
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
  font-size: 14.5px;
}
.doc th {
  width: 32%;
  color: var(--mute);
  font-weight: 500;
  background: var(--surface-2);
}
.doc h2 { font-size: 20px; margin: 40px 0 12px; font-family: var(--serif); }
.doc p, .doc li { color: var(--mute); font-size: 15.5px; }
.doc ul { padding-left: 20px; margin: 8px 0 16px; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--ink); font-weight: 600; }
.ph {
  background: transparent;
  color: var(--mute);
  border-bottom: 1px dashed var(--mute-2);
  padding: 0 5px;
  border-radius: 4px;
  font-size: 0.95em;
}

/* ——— Language switcher ——— */
.lang {
  display: flex;
  align-items: center;
  gap: 2px;
}
.lang button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--mute);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 8px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
}
.lang button:hover { color: var(--ink); }
.lang button.active {
  background: var(--ink);
  color: #FFFFFF;
}
.lang button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ——— Responsive ——— */
@media (max-width: 960px) {
  .split-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-aside { position: static; }
  .aside-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 8px 20px;
    align-items: start;
    padding: 24px 0 0;
    border-top: 1px solid var(--rule);
  }
  .aside-photo { grid-row: 1 / span 3; margin-bottom: 0; }
  .aside-name { margin-bottom: 0; }
  .aside-blurb { grid-column: 2; }
  .aside-more,
  .aside-disclaimer,
  .aside-sub-link { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .popular-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .brand-name { max-width: none; }
  section.hero { padding: 48px 0 40px; }
  section.popular { padding: 40px 0 44px; }
  .subscribe-inner { flex-direction: column; align-items: stretch; }
  form.signup { margin-left: 0; max-width: none; }
  .about-page-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-page-grid .photo { max-width: 160px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .links { display: none; }
  .nav-inner { gap: 12px; }
  form.signup .btn { flex: 1 1 100%; }
  form.signup input { flex: 1 1 100%; }
  footer .wrap { gap: 16px; }
  .aside-card {
    grid-template-columns: 1fr;
  }
  .aside-photo { grid-row: auto; width: 72px; height: 72px; }
}

/* nav subscribe jump: clear sticky header */
#subscribe { scroll-margin-top: 96px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ——— Weekly (home feature + list + issue) ——— */
section.weekly-home {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--rule);
}
.weekly-feature {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  max-width: 900px;
}
.weekly-cover {
  flex-shrink: 0;
  width: 160px;
  aspect-ratio: 1;
  border-radius: 0;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  display: block;
}
.weekly-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.weekly-copy { flex: 1; min-width: 0; }
.weekly-kicker {
  font-size: 12px;
  color: var(--mute-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.weekly-title {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.35;
  margin-bottom: 14px;
  font-weight: 600;
}
.weekly-title a { text-decoration: none; color: var(--ink); }
.weekly-title a:hover { text-decoration: underline; }
.weekly-bullets {
  margin: 0 0 18px 1.1em;
  color: var(--mute);
  font-size: 15.5px;
  line-height: 1.55;
}
.weekly-bullets li { margin-bottom: 6px; }
.weekly-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
}
.weekly-cta { text-decoration: none; color: var(--ink); }
.weekly-cta:hover { text-decoration: underline; }
.weekly-past {
  text-decoration: none;
  color: var(--mute);
  font-weight: 500;
  font-size: 13px;
}
.weekly-past:hover { color: var(--ink); }

.weekly-page { padding: 56px 0 80px; }
.weekly-page .lead { color: var(--mute); margin: 8px 0 32px; max-width: 40rem; }
.weekly-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.weekly-card:first-of-type { border-top: 1px solid var(--rule); }
.weekly-card-cover {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--surface-2);
  display: block;
}
.weekly-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.weekly-card-title {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.35;
  margin: 6px 0 8px;
  font-weight: 600;
}
.weekly-card-title a { text-decoration: none; color: var(--ink); }
.weekly-card-title a:hover { text-decoration: underline; }
.weekly-card-summary {
  color: var(--mute);
  font-size: 15px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.weekly-issue-hero {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin: 20px 0 36px;
}
.weekly-issue-cover {
  flex-shrink: 0;
  width: 180px;
  max-width: 40%;
  border: 1px solid var(--rule);
  background: var(--surface-2);
}
.weekly-issue-cover img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.weekly-issue-meta {
  font-size: 13px;
  color: var(--mute-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.weekly-brand-line {
  font-size: 13px;
  color: var(--mute);
  margin-top: 8px;
}
.weekly-edition-note {
  font-size: 13px;
  color: var(--mute);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  padding: 10px 14px;
  margin: 0 0 20px;
}
.weekly-nav-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}
.article-body h3 { font-size: 1.05em; margin: 1.4em 0 0.5em; color: var(--ink); }
.article-body ul {
  margin: 0 0 1.1em 1.2em;
  color: var(--mute);
}
.article-body ul li { margin-bottom: 0.4em; }
.article-body strong { color: var(--ink); font-weight: 600; }

@media (max-width: 720px) {
  .weekly-feature { flex-direction: column; gap: 18px; }
  .weekly-cover { width: 140px; }
  .weekly-issue-hero { flex-direction: column; }
  .weekly-issue-cover { width: 160px; max-width: 55%; }
  .weekly-title { font-size: 20px; }
  section.weekly-home { padding: 40px 0 44px; }
}

/* X follow / share row (article footer) */
.x-actions { display:flex; flex-wrap:wrap; gap:12px; margin:40px 0 8px; padding-top:24px; border-top:1px solid var(--rule); }
.x-btn { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 18px; border:1.5px solid var(--ink); border-radius:var(--radius); background:transparent; color:var(--ink); font-family:var(--sans); font-size:15px; font-weight:600; text-decoration:none; line-height:1.2; }
.x-btn:hover { background:var(--accent-soft); }
.x-btn-ink { background:var(--ink); color:var(--bg); }
.x-btn-ink:hover { background:var(--accent-hover); }
.x-btn:focus-visible { outline:3px solid var(--ink); outline-offset:3px; }
@media (max-width: 560px) { .x-actions { flex-direction:column; } .x-btn { width:100%; } }
