:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --paper: #fffefa;
  --paper-strong: #ffffff;
  --ink: #1c1a17;
  --muted: #6d6860;
  --soft: #9a948a;
  --line: rgba(28, 26, 23, 0.12);
  --line-strong: rgba(28, 26, 23, 0.22);
  --clay: #9a4d31;
  --olive: #5d6b3f;
  --amber: #b9822f;
  --wash: #f3efe6;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(rgba(28, 26, 23, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 26, 23, 0.02) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
}

body,
button,
input {
  font: inherit;
}

button,
input {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

.site-shell {
  width: min(1040px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
}

.nav-links a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(28, 26, 23, 0.055);
  text-decoration: none;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 42px;
  align-items: end;
  padding: 82px 0 48px;
  border-bottom: 1px solid var(--line-strong);
}

.hero-copy,
.page-hero,
.note-header,
.side-heading {
  display: grid;
  gap: 18px;
}

.page-hero {
  max-width: 790px;
  padding: 76px 0 42px;
  border-bottom: 1px solid var(--line-strong);
}

.eyebrow {
  width: fit-content;
  color: var(--clay);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 7vw, 82px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.04;
}

h3 {
  font-size: 22px;
  line-height: 1.22;
}

.hero-lede {
  max-width: 660px;
  color: #39352f;
  font-size: 20px;
  line-height: 1.62;
}

.hero-note {
  max-width: 620px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.search-panel {
  max-width: 660px;
  display: grid;
  gap: 9px;
  margin-top: 8px;
}

.search-panel label {
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search-panel div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: 0 16px 34px rgba(28, 26, 23, 0.06);
}

.search-panel input {
  min-width: 0;
  min-height: 46px;
  padding: 0 13px;
  outline: none;
  color: var(--ink);
  background: transparent;
}

.search-panel button,
.primary-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 0 17px;
  color: #fffefa;
  background: var(--ink);
  font-weight: 800;
}

.primary-link {
  width: fit-content;
  margin-top: 6px;
}

.notebook-card,
.note-card,
.side-card,
.build-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.92);
  box-shadow: 0 16px 34px rgba(28, 26, 23, 0.045);
}

.notebook-card {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.notebook-card p {
  color: var(--clay);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notebook-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.notebook-card div {
  min-height: 82px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbf7ee;
}

.notebook-card dt {
  color: var(--soft);
  font-size: 12px;
  font-weight: 760;
}

.notebook-card dd {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  align-items: start;
  padding-top: 44px;
}

.main-column,
.side-column,
.note-list,
.build-mini-list,
.build-grid {
  display: grid;
  gap: 14px;
}

.side-column {
  position: sticky;
  top: 22px;
}

.section-heading {
  display: grid;
  gap: 12px;
  margin-bottom: 10px;
}

.section-heading h2 {
  max-width: 650px;
}

.note-card,
.build-card {
  display: grid;
  gap: 12px;
  padding: 19px 20px;
}

.note-card {
  position: relative;
}

.note-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--clay);
}

.note-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.note-kicker span,
.note-kicker time,
.tag-pill,
.build-mini em {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.note-kicker span {
  color: #6a371f;
  border-color: rgba(154, 77, 49, 0.28);
  background: #fff2e8;
}

.note-card p,
.build-card p,
.side-card p,
.footer p,
.note-body p,
.note-body li {
  color: var(--muted);
  line-height: 1.64;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-pill:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--wash);
  text-decoration: none;
}

.side-card {
  display: grid;
  gap: 16px;
  padding: 17px;
}

.side-card h2 {
  font-size: 27px;
}

.build-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 780;
}

.build-mini:last-child {
  border-bottom: 0;
}

.build-mini em {
  color: var(--olive);
  border-color: rgba(93, 107, 63, 0.24);
  background: #f0f4e4;
}

.text-link,
.back-link,
.note-body a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.back-link {
  width: fit-content;
  color: var(--muted);
  font-size: 14px;
}

.page-list,
.build-grid {
  padding-top: 32px;
}

.empty-state {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 254, 250, 0.92);
  font-weight: 760;
}

.build-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.note-page {
  padding-top: 70px;
}

.note-header {
  max-width: 860px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-strong);
}

.note-body {
  width: min(760px, 100%);
  display: grid;
  gap: 32px;
  padding-top: 40px;
}

.note-body section {
  display: grid;
  gap: 11px;
}

.note-body h2 {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 24px;
  font-weight: 880;
  line-height: 1.18;
}

.note-body p,
.note-body li {
  color: #454039;
  font-size: 18px;
}

.note-body code {
  display: block;
  padding: 15px 16px;
  border: 1px solid rgba(154, 77, 49, 0.2);
  border-radius: 8px;
  color: #5b301c;
  background: #fff4ea;
  white-space: normal;
  line-height: 1.6;
}

.note-body ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 21px;
}

.note-body li span {
  color: var(--soft);
}

.ad-unit {
  min-height: 120px;
  margin: 8px 0 2px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

.build-page {
  min-height: 460px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 72px;
  padding-top: 26px;
  border-top: 1px solid var(--line-strong);
}

.footer strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.footer p {
  max-width: 560px;
}

.footer p:last-child {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .home-hero,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .side-column {
    position: static;
  }

  .build-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 24px, 1040px);
    padding-top: 12px;
  }

  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .home-hero {
    gap: 28px;
    padding: 52px 0 34px;
  }

  .page-hero {
    padding-top: 52px;
  }

  h1 {
    font-size: clamp(42px, 13vw, 62px);
  }

  h2 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .hero-lede,
  .note-body p,
  .note-body li {
    font-size: 17px;
  }

  .search-panel div {
    grid-template-columns: 1fr;
  }

  .notebook-card dl {
    grid-template-columns: 1fr;
  }

  .footer p:last-child {
    white-space: normal;
  }
}
