/* =========================================================
   Northern Timber Review — editorial stylesheet
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600;9..144,700&family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap');

:root {
  --paper:       #f4eee1;
  --paper-soft:  #ebe3d0;
  --paper-card:  #faf6ec;
  --ink:         #1c1a16;
  --ink-soft:    #3f3b33;
  --ink-mute:    #7a746a;
  --rule:        #cfc5b0;
  --rule-soft:   #ded5bf;
  --accent:      #2e4a38;
  --accent-deep: #1e3326;
  --hot:         #a84a28;
  --gold:        #8b6f3e;
  --max:         1200px;
  --gutter:      32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.62;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(circle at 20% 30%, transparent 0, rgba(60, 40, 10, 0.015) 100%),
    radial-gradient(circle at 80% 70%, transparent 0, rgba(60, 40, 10, 0.02) 100%);
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(46, 74, 56, 0.35);
  transition: color 0.2s, text-decoration-color 0.2s;
}
a:hover {
  color: var(--hot);
  text-decoration-color: currentColor;
}

/* =================== TYPOGRAPHY =================== */

h1, h2, h3, h4, h5 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.015em;
  line-height: 1.12;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.4em;
}
h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  margin: 2.2em 0 0.7em;
  font-weight: 400;
}
h3 {
  font-size: 1.3rem;
  margin: 1.8em 0 0.5em;
  font-weight: 500;
  font-variation-settings: "opsz" 24;
  letter-spacing: -0.005em;
}
h4 {
  font-size: 1.05rem;
  margin: 1.4em 0 0.4em;
  font-weight: 500;
  font-variation-settings: "opsz" 14;
}

p { margin-bottom: 1.15em; }
p + p { text-indent: 0; }

blockquote {
  margin: 1.8em 0;
  padding: 0 0 0 1.2em;
  border-left: 3px solid var(--hot);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.2em;
  font-variation-settings: "opsz" 36;
  color: var(--accent);
  line-height: 1.4;
}

.eyebrow {
  font-family: 'Fraunces', serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--hot);
  font-weight: 500;
  display: inline-block;
}

.deck {
  font-family: 'Newsreader', serif;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0.8em 0 1.8em;
  max-width: 42ch;
}

.small-caps {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* =================== LAYOUT =================== */

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}
.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

/* =================== MASTHEAD =================== */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: relative;
  z-index: 10;
}
.masthead-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Fraunces', serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--rule-soft);
  font-weight: 500;
}
.masthead-meta span + span { margin-left: 16px; }

.masthead-main {
  padding: 22px var(--gutter) 18px;
  text-align: center;
  position: relative;
}
.brand {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.01em;
  line-height: 1;
  font-variation-settings: "opsz" 144;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}
.brand:hover { color: var(--ink); }
.brand-tag {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--hot);
  margin-top: 8px;
  font-weight: 500;
}

.nav-primary {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 32px;
  padding: 14px var(--gutter);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 2px solid var(--ink);
  font-family: 'Fraunces', serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav-primary a {
  color: var(--ink);
  text-decoration: none;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav-primary a:hover,
.nav-primary a.is-active {
  color: var(--hot);
  border-bottom-color: var(--hot);
}

/* =================== HERO / ARTICLE HEADER =================== */

.article-header {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
.article-header .eyebrow { margin-bottom: 20px; }
.article-header h1 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.article-header .deck { margin-left: auto; margin-right: auto; text-align: center; }
.article-header .byline {
  display: inline-flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: 'Fraunces', serif;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  margin-top: 24px;
}
.article-header .byline strong { color: var(--ink); font-weight: 500; }
.article-header .byline .sep { color: var(--rule); }

/* =================== ARTICLE BODY =================== */

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 64px;
  padding: 56px 0 96px;
}
.article-body {
  max-width: 680px;
  font-size: 1.05rem;
  line-height: 1.68;
}
.article-body > p:first-of-type::first-letter {
  font-family: 'Fraunces', serif;
  font-size: 5.2em;
  float: left;
  line-height: 0.82;
  margin: 0.06em 0.08em 0 -0.04em;
  font-weight: 500;
  color: var(--accent);
  font-variation-settings: "opsz" 144;
}

/* =================== METRICS ROW =================== */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 2.8em 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.metric {
  padding: 24px 20px 20px;
  border-right: 1px solid var(--rule);
  position: relative;
}
.metric:last-child { border-right: 0; }
.metric-value {
  font-family: 'Fraunces', serif;
  font-size: 2.4rem;
  display: block;
  line-height: 1;
  color: var(--accent);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.metric-label {
  font-family: 'Fraunces', serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  line-height: 1.4;
}

/* =================== TABLE =================== */

.editorial-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 15px;
  font-family: 'Fraunces', serif;
}
.editorial-table th {
  text-align: left;
  padding: 12px 14px 10px;
  border-bottom: 2px solid var(--ink);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
}
.editorial-table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.45;
}
.editorial-table tr:hover td { background: rgba(168, 74, 40, 0.04); }
.editorial-table .rank-cell {
  font-family: 'Fraunces', serif;
  font-variant-numeric: oldstyle-nums;
  font-size: 1.6rem;
  color: var(--hot);
  font-weight: 400;
  padding-top: 12px;
}
.editorial-table .co-name {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 500;
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
}
.editorial-table .co-name a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.editorial-table .co-name a:hover { color: var(--hot); border-bottom-color: currentColor; }

/* =================== SIDEBAR =================== */

.sidebar {
  font-size: 14px;
  line-height: 1.55;
  align-self: start;
  position: sticky;
  top: 24px;
}
.sidebar-block {
  border-top: 2px solid var(--ink);
  padding-top: 14px;
  margin-bottom: 36px;
}
.sidebar-block h4 {
  font-family: 'Fraunces', serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0 0 12px;
  color: var(--ink);
}
.sidebar-block p { font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.sidebar-block ul { list-style: none; }
.sidebar-block ul li {
  padding: 7px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-family: 'Fraunces', serif;
  font-size: 14px;
}
.sidebar-block ul li:last-child { border-bottom: 0; }
.sidebar-block a { color: var(--ink); text-decoration: none; display: flex; justify-content: space-between; gap: 10px; }
.sidebar-block a:hover { color: var(--hot); }

/* =================== SOURCES =================== */

.sources {
  border-top: 2px solid var(--ink);
  padding-top: 28px;
  margin-top: 64px;
  font-size: 14px;
}
.sources h2 {
  font-family: 'Fraunces', serif;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin: 0 0 18px;
  font-weight: 500;
}
.sources ol {
  list-style: none;
  counter-reset: src;
}
.sources ol li {
  counter-increment: src;
  position: relative;
  padding-left: 34px;
  margin-bottom: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.sources ol li::before {
  content: counter(src);
  position: absolute;
  left: 0;
  top: 0;
  font-family: 'Fraunces', serif;
  font-variant-numeric: oldstyle-nums;
  color: var(--hot);
  font-weight: 500;
  font-size: 1rem;
}
.sources a { color: var(--ink); }

/* Inline citation number */
sup.cite {
  font-family: 'Fraunces', serif;
  font-variant-numeric: oldstyle-nums;
  font-size: 0.7em;
  color: var(--hot);
  font-weight: 500;
  padding-left: 1px;
}
sup.cite a { color: inherit; text-decoration: none; }
sup.cite a:hover { text-decoration: underline; }

/* =================== CARDS / GRID =================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 36px 32px;
  margin: 2em 0;
}
.card {
  border-top: 2px solid var(--ink);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
}
.card .card-kicker {
  font-family: 'Fraunces', serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hot);
  margin-bottom: 8px;
  font-weight: 500;
}
.card h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 8px;
  line-height: 1.2;
}
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--hot); }
.card p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.card .card-meta {
  font-family: 'Fraunces', serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: auto;
}

/* =================== AUTHOR CARDS =================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 40px 32px;
  margin: 2em 0;
}
.team-member {
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 72;
}
.avatar.mono-2 { background: var(--hot); }
.avatar.mono-3 { background: var(--gold); }
.avatar.mono-4 { background: var(--accent-deep); }
.team-member h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  margin: 0 0 4px;
  font-weight: 500;
}
.team-member .role {
  font-family: 'Fraunces', serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hot);
  margin-bottom: 12px;
  font-weight: 500;
}
.team-member p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); margin-bottom: 8px; }

/* =================== INFO BOXES =================== */

.infobox {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  padding: 22px 24px;
  margin: 2em 0;
  font-size: 15px;
  line-height: 1.55;
}
.infobox h4 {
  font-family: 'Fraunces', serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
  font-weight: 500;
}
.infobox.warn { border-left-color: var(--hot); }
.infobox.warn h4 { color: var(--hot); }

/* Disclosure banner */
.disclosure {
  background: var(--paper-soft);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 10px var(--gutter);
  font-size: 12px;
  font-family: 'Fraunces', serif;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.disclosure strong {
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--hot);
  margin-right: 8px;
}

/* =================== FAQ =================== */

.faq-list details {
  border-top: 1px solid var(--rule);
  padding: 18px 0;
}
.faq-list details:last-child { border-bottom: 1px solid var(--rule); }
.faq-list summary {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  color: var(--ink);
  padding-right: 6px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  color: var(--hot);
  font-weight: 300;
  line-height: 0.9;
  transition: transform 0.25s;
  flex-shrink: 0;
}
.faq-list details[open] summary::after {
  content: '−';
  color: var(--hot);
}
.faq-list details > *:not(summary) {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* =================== BREADCRUMBS =================== */

.breadcrumbs {
  font-family: 'Fraunces', serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 18px 0 0;
  font-weight: 500;
}
.breadcrumbs a { color: var(--ink-mute); text-decoration: none; }
.breadcrumbs a:hover { color: var(--hot); }
.breadcrumbs .sep { margin: 0 8px; color: var(--rule); }

/* =================== FOOTER =================== */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  margin-top: 120px;
  padding: 80px 0 28px;
  position: relative;
  z-index: 2;
}
.site-footer::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--hot) 0 25%, var(--accent) 25% 55%, var(--gold) 55% 75%, var(--accent-deep) 75% 100%);
  position: absolute;
  top: 0; left: 0; right: 0;
}
.site-footer .brand {
  color: var(--paper);
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}
.site-footer .brand-tag { color: var(--hot); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(244, 238, 225, 0.15);
}
.footer-grid h4 {
  font-family: 'Fraunces', serif;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hot);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 8px; font-size: 14px; }
.footer-grid ul li a {
  color: rgba(244, 238, 225, 0.8);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-grid ul li a:hover { color: var(--hot); }
.footer-grid .about-block p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(244, 238, 225, 0.72);
  margin-bottom: 10px;
}
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: 'Fraunces', serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 238, 225, 0.5);
}

/* =================== MISC =================== */

.section-rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3em 0;
}
.section-rule.thick {
  border-top: 2px solid var(--ink);
}

.ornament {
  text-align: center;
  font-family: 'Fraunces', serif;
  color: var(--hot);
  letter-spacing: 1em;
  font-size: 14px;
  margin: 2.4em 0;
  font-weight: 500;
}
.ornament::before { content: '❦'; }

.byline-inline {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 2em 0 2.4em;
  font-size: 14px;
}
.byline-inline .avatar { width: 44px; height: 44px; font-size: 16px; margin-bottom: 0; }
.byline-inline .byline-info strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-weight: 500;
  color: var(--ink);
  font-size: 15px;
}
.byline-inline .byline-info span {
  font-family: 'Fraunces', serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}

/* Hero woodcut decoration (SVG inline used as background) */
.hero-mark {
  width: 80px;
  height: 80px;
  margin: 0 auto 28px;
  color: var(--hot);
}

/* Two-column lead layout (used on editorial/methodology pages) */
.lead-split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  padding: 48px 0;
  border-bottom: 1px solid var(--rule);
  align-items: end;
}
.lead-split .eyebrow { margin-bottom: 20px; }
.lead-split h1 { margin: 0; }
.lead-split .deck { margin-top: 0.6em; }

/* Form (contact) */
.form-stack { display: grid; gap: 18px; max-width: 560px; }
.form-row label {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 6px;
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  background: var(--paper-card);
  font-family: 'Newsreader', serif;
  font-size: 16px;
  color: var(--ink);
  border-radius: 0;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.form-row textarea { min-height: 140px; resize: vertical; }
button.btn,
.btn {
  font-family: 'Fraunces', serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 14px 28px;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
}
button.btn:hover, .btn:hover { background: var(--hot); color: var(--paper); }

/* =================== RESPONSIVE =================== */

@media (max-width: 960px) {
  body { font-size: 17px; }
  .article-grid { grid-template-columns: 1fr; gap: 32px; padding: 40px 0 64px; }
  .sidebar { position: static; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(3), .metric:nth-child(4) { border-bottom: 0; }
  .metric:nth-child(4) { border-right: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .lead-split { grid-template-columns: 1fr; gap: 24px; padding: 36px 0; }
  .nav-primary { font-size: 11px; gap: 3px 18px; }
  .masthead-meta { font-size: 9px; }
  .masthead-meta span:nth-child(3) { display: none; }
}

@media (max-width: 560px) {
  .metrics { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--rule); }
  .metric:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .editorial-table { font-size: 14px; }
  .editorial-table th, .editorial-table td { padding: 10px 8px; }
  .nav-primary a { font-size: 10px; }
  h1 { font-size: 2rem; }
  .article-body > p:first-of-type::first-letter { font-size: 4em; }
}
