:root {
  --orange: #ff6b2c;
  --orange-deep: #d9481e;
  --orange-soft: #fff0e8;
  --ink: #151515;
  --muted: #73716e;
  --line: #e7e1da;
  --paper: #fffdf9;
  --cream: #f7f2eb;
  --white: #ffffff;
  --lime: #d9f26f;
  --shadow: 0 20px 60px rgba(35, 24, 15, .09);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --display: "Trebuchet MS", "Arial Rounded MT Bold", sans-serif;
  --body: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Tahoma, sans-serif;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }

.site-header {
  position: relative;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  max-width: var(--max);
  margin: auto;
  min-height: 82px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font: 800 1.15rem var(--display);
  letter-spacing: -.04em;
  white-space: nowrap;
}
.brand-mark {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--orange);
  font: 800 1rem var(--sans);
  transform: rotate(-9deg);
}
.main-nav { display: flex; align-items: center; gap: 7px; }
.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font: 700 .76rem var(--sans);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--orange-soft); color: var(--orange-deep); }
.nav-cta {
  padding: 12px 17px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font: 800 .75rem var(--sans);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.menu-toggle { display: none; border: 0; background: none; font-size: 1.5rem; }

.page-shell { max-width: var(--max); margin: auto; padding: 0 28px 70px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange-deep);
  font: 800 .7rem var(--sans);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 24px; height: 3px; border-radius: 4px; background: var(--orange); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.06em; line-height: .98; overflow-wrap: anywhere; }
h1 { font-size: clamp(3.3rem, 8vw, 7.6rem); max-width: 900px; margin: 20px 0 25px; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: 14px; }
h3 { font-size: clamp(1.25rem, 2vw, 1.65rem); }
.lede { max-width: 600px; color: #57534f; font-size: 1.18rem; line-height: 1.55; }
.text-link { font: 800 .76rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--orange-deep); }
.text-link::after { content: "  ↗"; }

.hero {
  position: relative;
  margin: 36px 0 68px;
  min-height: 530px;
  padding: clamp(30px, 6vw, 76px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--ink);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -2;
  background: linear-gradient(115deg, rgba(21,21,21,.98) 20%, rgba(21,21,21,.35) 75%), url("https://picsum.photos/seed/sunlit-panels/1400/900") center/cover;
}
.hero::after {
  content: "NORTHLINE / VOL. 01";
  position: absolute; top: 28px; right: 30px;
  color: rgba(255,255,255,.7);
  font: 800 .67rem var(--sans); letter-spacing: .14em;
}
.hero-copy { max-width: 720px; color: var(--white); }
.hero h1 { color: var(--white); margin-bottom: 22px; }
.hero .lede { color: rgba(255,255,255,.78); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 30px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 47px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--orange); color: var(--ink);
  font: 800 .78rem var(--sans); text-transform: uppercase; letter-spacing: .06em;
}
.button:hover { background: var(--lime); transform: translateY(-2px); }
.button.dark { background: var(--ink); color: var(--white); }
.button.light { background: var(--white); color: var(--ink); }

.section { margin-top: 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.section-heading h2 { margin-bottom: 0; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.news-card { min-width: 0; }
.news-card .cover, .story-cover { display: block; position: relative; aspect-ratio: 1.3; overflow: hidden; border-radius: var(--radius-md); background: var(--cream); margin-bottom: 17px; }
.news-card .cover img, .story-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card:hover img { transform: scale(1.04); }
.meta { display: flex; flex-wrap: wrap; gap: 7px 12px; align-items: center; margin-bottom: 10px; color: var(--muted); font: 700 .68rem var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.meta .tag { color: var(--orange-deep); }
.news-card h3 { margin: 0 0 10px; }
.news-card p { color: var(--muted); line-height: 1.5; margin-bottom: 14px; }

.home-columns, .rail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 42px; align-items: start; }
.rail {
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--orange);
  border-radius: var(--radius-md);
  background: var(--white);
}
.rail h2 { font-size: 1.8rem; margin-bottom: 20px; }
.rail-story { display: block; padding: 17px 0; border-top: 1px solid var(--line); }
.rail-story:first-of-type { border-top: 0; padding-top: 0; }
.rail-story h3 { font: 700 1.02rem/1.2 var(--body); letter-spacing: -.02em; margin: 0 0 8px; }
.rail-story .meta { margin-bottom: 0; }

.side-links-slot { min-width: 0; }
.side-links-slot[hidden] { display: none; }
.side-links-card { padding: 22px; border-radius: var(--radius-md); background: var(--orange-soft); border: 1px solid #ffd7c3; }
.side-links-card h2 { font-size: 1.3rem; letter-spacing: -.04em; }
.side-links-list { list-style: none; padding: 0; margin: 0; }
.side-links-list li { border-top: 1px solid rgba(217, 72, 30, .18); }
.side-links-list a { display: flex; justify-content: space-between; gap: 10px; padding: 13px 0; font: 700 .82rem var(--sans); }
.side-links-list a::after { content: "↗"; color: var(--orange-deep); }

.feature-band { padding: 45px; border-radius: var(--radius-lg); background: var(--lime); }
.feature-band h2 { max-width: 570px; }
.feature-band p { max-width: 650px; color: #3e4428; font-size: 1.1rem; line-height: 1.55; }
.split-section { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: center; }
.photo-frame { position: relative; aspect-ratio: 1 / 1.05; overflow: hidden; border-radius: var(--radius-lg); background: var(--cream); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.numbered-list { display: grid; gap: 0; }
.numbered-item { display: grid; grid-template-columns: 50px 1fr; gap: 20px; padding: 23px 0; border-top: 1px solid var(--line); }
.numbered-item .num { color: var(--orange); font: 800 1.7rem var(--display); }
.numbered-item h3 { margin: 0 0 7px; }
.numbered-item p { color: var(--muted); line-height: 1.55; margin: 0; }

.page-intro { padding: 70px 0 42px; }
.page-intro h1 { max-width: 780px; font-size: clamp(3.2rem, 7vw, 6.7rem); }
.archive-tools { display: flex; gap: 15px; flex-wrap: wrap; align-items: center; padding: 17px; margin-bottom: 32px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.search-field { flex: 1 1 240px; min-height: 43px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); }
.filter-row { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; }
.filter-row button { padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); cursor: pointer; white-space: nowrap; font: 700 .72rem var(--sans); }
.filter-row button:hover, .filter-row button.is-active { border-color: var(--orange); background: var(--orange); color: var(--ink); }
.archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px 28px; align-items: start; }
.archive-grid .news-card .cover { aspect-ratio: 1.65; }
.results-fade { transition: opacity .2s ease; }
.results-fade.is-loading { opacity: .4; }

.calculator-card { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; padding: clamp(26px, 5vw, 60px); border-radius: var(--radius-lg); background: var(--ink); color: var(--white); }
.calculator-card h2 { color: var(--white); }
.calc-form { display: grid; gap: 17px; }
.calc-form label { display: grid; gap: 7px; color: rgba(255,255,255,.7); font: 700 .73rem var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.calc-form input, .calc-form select { width: 100%; min-height: 49px; padding: 0 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; background: #292929; color: var(--white); }
.calc-result { align-self: end; padding: 27px; border-radius: var(--radius-md); background: var(--orange); color: var(--ink); }
.calc-result .result-label { font: 800 .72rem var(--sans); text-transform: uppercase; letter-spacing: .1em; }
.result-value { display: block; margin: 12px 0 7px; font: 800 clamp(2.4rem, 6vw, 5rem) var(--display); letter-spacing: -.08em; }
.calc-result p { margin: 0; line-height: 1.45; }
.disclaimer { color: var(--muted); font: .75rem/1.5 var(--sans); }

.story-shell { display: grid; grid-template-columns: 190px minmax(0, 730px) 220px; justify-content: center; gap: 38px; padding-top: 63px; }
.story-kicker { position: sticky; top: 28px; align-self: start; }
.story-kicker .back { display: block; margin-bottom: 24px; color: var(--muted); font: 700 .7rem var(--sans); text-transform: uppercase; letter-spacing: .08em; }
.story-kicker .back::before { content: "←  "; color: var(--orange); }
.story-content h1 { font-size: clamp(3rem, 6vw, 6rem); margin-top: 17px; }
.story-deck { color: var(--muted); font-size: 1.27rem; line-height: 1.5; }
.story-content .story-cover { aspect-ratio: 1.8; margin: 31px 0; }
.story-body { font-size: 1.12rem; line-height: 1.78; }
.story-body p { margin-bottom: 1.3em; }
.story-body h2 { font-size: 2rem; margin-top: 1.7em; }
.story-rail { align-self: start; position: sticky; top: 28px; }

.site-footer { padding: 38px 28px; border-top: 1px solid var(--line); }
.footer-inner { max-width: var(--max); margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted); font: .73rem var(--sans); }
.footer-inner strong { color: var(--ink); font-size: .9rem; }

@media (max-width: 960px) {
  .home-columns, .rail-layout { grid-template-columns: 1fr; }
  .story-shell { grid-template-columns: 150px minmax(0, 1fr); }
  .story-rail { grid-column: 2; position: static; }
  .side-links-card { max-width: 420px; }
}
@media (max-width: 720px) {
  .nav-wrap { min-height: 67px; padding: 0 18px; }
  .menu-toggle { display: block; }
  .main-nav { position: absolute; top: 66px; left: 12px; right: 12px; display: grid; gap: 4px; padding: 9px; transform: translateY(-12px) scale(.98); opacity: 0; visibility: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); box-shadow: var(--shadow); transition: .22s ease; }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .main-nav a { padding: 13px 15px; }
  .nav-cta { display: none; }
  .page-shell { padding: 0 18px 50px; }
  .hero { min-height: 590px; margin-top: 22px; padding: 27px; }
  .hero::after { top: 22px; right: 21px; font-size: .55rem; }
  .news-grid, .archive-grid, .split-section, .calculator-card { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .feature-band { padding: 30px 24px; }
  .page-intro { padding-top: 46px; }
  .story-shell { display: block; padding-top: 40px; }
  .story-kicker, .story-rail { position: static; margin-bottom: 24px; }
  .story-content h1 { font-size: clamp(2.8rem, 13vw, 5rem); }
  .footer-inner { align-items: flex-start; flex-direction: column; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
