/* ==========================================================================
   Theme: PRESS — editorial / print-inspired
   Warm paper, Fraunces display serif, Newsreader body, hairline rules.
   ========================================================================== */

:root {
  --paper:      #fbf8f1;
  --paper-deep: #f4efe4;
  --ink:        #17140f;
  --ink-soft:   #3d372e;
  --muted:      #7a7264;
  --rule:       #ded5c4;
  --rule-strong:#2a251d;
  --accent:     #9a3016;
  --accent-soft:#c26a4a;
  --highlight:  #f6e7c9;

  --serif-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --serif-body:    "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono:          "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #14120e;
    --paper-deep: #1b1813;
    --ink:        #f0eade;
    --ink-soft:   #d6cdbd;
    --muted:      #9c9385;
    --rule:       #342e25;
    --rule-strong:#efe8da;
    --accent:     #e8825f;
    --accent-soft:#c96f4a;
    --highlight:  #3a2f1c;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 19px;
  line-height: 1.72;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle paper grain so the background is not flat white */
.paper {
  position: relative;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(154, 48, 22, 0.035), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(122, 114, 100, 0.05), transparent 38%);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------- masthead */

.masthead { padding-top: 40px; }

.masthead-rule {
  height: 4px;
  background: var(--rule-strong);
}
.masthead-rule.thin {
  height: 1px;
  background: var(--rule);
  margin-top: 18px;
}

.masthead-inner {
  text-align: center;
  padding: 34px 0 20px;
}

.masthead-kicker,
.lead-kicker,
.post-kicker,
.archive-kicker,
.rail-title,
.column-head span,
.share-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.masthead-title {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(3.4rem, 11vw, 6.2rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin: 14px 0 12px;
  font-variation-settings: "SOFT" 0, "WONK" 1;
}
.masthead-title a { color: var(--ink); text-decoration: none; }
.masthead-title a:hover { color: var(--accent); }

.masthead-sub {
  font-style: italic;
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0;
}

.masthead-nav {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.masthead-nav a { color: var(--ink-soft); }
.masthead-nav a:hover { color: var(--accent); }
.nav-dot { color: var(--rule); margin: 0 12px; }

.masthead-compact { padding-top: 28px; }
.masthead-compact .masthead-inner { padding: 22px 0 14px; }
.masthead-compact .masthead-title { font-size: clamp(2rem, 5vw, 2.6rem); }
.masthead-compact .masthead-sub,
.masthead-compact .masthead-kicker { display: none; }

/* ------------------------------------------------------------- lead story */

.lead {
  padding: 54px 0 46px;
  border-bottom: 1px solid var(--rule);
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.lead-title {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5.4vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.026em;
  margin: 16px 0 18px;
  text-wrap: balance;
}
.lead-title a { color: var(--ink); }
.lead-title a:hover { color: var(--accent); text-decoration: none; }

.lead-excerpt {
  font-size: 1.2rem;
  color: var(--ink-soft);
  line-height: 1.62;
  margin: 0 auto 20px;
  max-width: 34em;
  text-wrap: pretty;
}

.lead-meta,
.entry-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
}
.lead-meta a, .entry-meta a { color: var(--muted); }
.lead-meta a:hover, .entry-meta a:hover { color: var(--accent); }
.sep { margin: 0 8px; }

.lead-more {
  display: inline-block;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
}
.lead-more:hover { text-decoration: none; background: var(--highlight); }

/* --------------------------------------------------------- archive header */

.archive-head {
  text-align: center;
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--rule);
}
.archive-title {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  margin: 12px 0 8px;
}
.archive-count {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
}

/* ------------------------------------------------------------ sheet + rail */

.sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 64px;
  padding: 48px 0 70px;
  align-items: start;
}
.sheet-single { grid-template-columns: minmax(0, 1fr); max-width: 720px; margin: 0 auto; }

.column-head {
  margin: 0 0 26px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
}

.entries {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
}
.sheet-article .entries { grid-template-columns: minmax(0, 1fr); }

.entry {
  break-inside: avoid;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 0 0 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--rule);
}

.entry-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent-soft);
  padding-top: 8px;
  letter-spacing: 0.05em;
}

.entry-title {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 1.32rem;
  line-height: 1.22;
  letter-spacing: -0.014em;
  margin: 0 0 8px;
  text-wrap: balance;
}
.entry-title a { color: var(--ink); }
.entry-title a:hover { color: var(--accent); text-decoration: none; }

.entry-excerpt {
  font-size: 0.97rem;
  line-height: 1.58;
  color: var(--ink-soft);
  margin: 0 0 10px;
  text-wrap: pretty;
}

.entry-meta .tag {
  display: inline-block;
  margin-right: 8px;
  border-bottom: 1px dotted var(--rule);
}

.empty { color: var(--muted); font-style: italic; }

/* rail */
.rail {
  position: sticky;
  top: 32px;
  border-left: 1px solid var(--rule);
  padding-left: 22px;
}
.rail-section { margin-bottom: 32px; }
.rail-title { margin-bottom: 12px; }

.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list li { margin-bottom: 2px; }
.rail-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  padding: 3px 0;
  border-bottom: 1px dotted transparent;
}
.rail-list a:hover { color: var(--accent); text-decoration: none; border-bottom-color: var(--rule); }
.rail-list a.active { color: var(--accent); font-style: italic; }
.rail-list em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.68rem;
  color: var(--muted);
}

.rail-colophon p {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* ------------------------------------------------------------------ article */

.sheet-article .post { max-width: 100%; }

.post-head {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 26px;
  margin-bottom: 34px;
}

.post-title {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: -0.028em;
  margin: 14px 0 16px;
  text-wrap: balance;
}

.post-standfirst {
  font-size: 1.16rem;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.56;
  margin: 0 0 18px;
  max-width: 32em;
  text-wrap: pretty;
}

.post-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
}
.post-meta a { color: var(--muted); border-bottom: 1px dotted var(--rule); }
.post-meta a:hover { color: var(--accent); text-decoration: none; }
.byline { text-transform: uppercase; letter-spacing: 0.14em; }

/* body copy */
.post-content {
  max-width: var(--measure);
  font-size: 1.11rem;
  line-height: 1.78;
  color: var(--ink);
}
.post-content p { margin: 0 0 1.35em; text-wrap: pretty; }

/* drop cap on the opening paragraph */
.post-content > p:first-of-type::first-letter {
  float: left;
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 4.1em;
  line-height: 0.82;
  padding: 0.06em 0.09em 0 0;
  color: var(--accent);
}

.post-content h2 {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 1.68rem;
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin: 2.3em 0 0.6em;
  padding-top: 0.7em;
  border-top: 1px solid var(--rule);
}
.post-content h3 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.24rem;
  margin: 1.9em 0 0.5em;
}
.post-content h4 {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.8em 0 0.5em;
}

.post-content a {
  color: var(--ink);
  background-image: linear-gradient(var(--accent-soft), var(--accent-soft));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 1.08em;
  text-decoration: none;
}
.post-content a:hover { color: var(--accent); background-color: var(--highlight); }

.post-content ul, .post-content ol { margin: 0 0 1.35em; padding-left: 1.3em; }
.post-content li { margin-bottom: 0.5em; }
.post-content li::marker { color: var(--accent-soft); }

.post-content blockquote {
  margin: 1.8em 0;
  padding: 0 0 0 1.4em;
  border-left: 2px solid var(--accent);
  font-style: italic;
  font-size: 1.14rem;
  color: var(--ink-soft);
}
.post-content blockquote p:last-child { margin-bottom: 0; }

.post-content code {
  font-family: var(--mono);
  font-size: 0.84em;
  color: var(--accent);
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.1em 0.36em;
}
.post-content pre {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent-soft);
  border-radius: 2px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 1.7em 0;
  font-size: 0.87rem;
  line-height: 1.62;
}
.post-content pre code { background: none; border: none; padding: 0; font-size: 1em; }

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2em 0;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
  padding: 10px;
}

.post-content hr {
  border: none;
  text-align: center;
  margin: 2.6em 0;
}
.post-content hr::before {
  content: "\00A7";
  color: var(--muted);
  font-size: 1.1rem;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: 0.94rem;
}
.post-content th, .post-content td {
  border-bottom: 1px solid var(--rule);
  padding: 9px 12px;
  text-align: left;
}
.post-content th {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule-strong);
}

.post-content strong { font-weight: 600; }

.post-content .wide {
  width: min(46rem, 88vw);
  max-width: none;
  margin: 2.4em 0;
}
.post-content .wide img { width: 100%; margin: 0; }
.post-content .wide figcaption {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-align: center;
  margin-top: 0.9em;
}
@media (max-width: 900px) {
  .post-content .wide { width: 100%; }
}

.post-end {
  max-width: var(--measure);
  text-align: center;
  color: var(--accent-soft);
  margin: 2.4em 0 0;
  font-size: 1rem;
}

/* --------------------------------------------------------------- sharing */

.post-share {
  max-width: var(--measure);
  margin: 44px 0 30px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 18px;
}
.share-buttons { display: flex; gap: 10px; }
.share-btn {
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: all 0.18s ease;
}
.share-btn svg { width: 15px; height: 15px; }
.share-btn:hover {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.share-toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 14px);
  background: var(--rule-strong);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.76rem;
  padding: 10px 18px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 50;
}
.share-toast.show { opacity: 1; transform: translate(-50%, 0); }

.back-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.back-link:hover { color: var(--accent); }

.find-me {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.social-links { display: flex; gap: 22px; }
.social-links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
}
.social-links a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ---------------------------------------------------------------- footer */

.colophon {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px 64px;
  text-align: center;
}
.colophon-rule { height: 1px; background: var(--rule); margin-bottom: 26px; }
.footer-text {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.footer-quote {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0 0 14px;
}
.footer-meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .sheet { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .entries { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: static;
    border-left: none;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: 26px;
  }
}

@media (max-width: 620px) {
  body { font-size: 18px; }
  .container { padding: 0 20px; }
  .colophon { padding: 0 20px 48px; }
  .entry { grid-template-columns: 26px 1fr; gap: 8px; }
  .post-content { font-size: 1.06rem; }
}
