:root {
  --pb-paper: #f1efe8;
  --pb-paper-deep: #e5e1d7;
  --pb-white: #fffdf7;
  --pb-ink: #142a2d;
  --pb-muted: #526164;
  --pb-line: rgba(20, 42, 45, 0.2);
  --pb-teal: #2e7c7b;
  --pb-teal-soft: #dce9e5;
  --pb-orange: #d65a32;
  --pb-orange-soft: #f4ded3;
  --pb-stone: #c8cbc5;
  --pb-serif: Georgia, "Times New Roman", serif;
  --pb-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body {
  margin: 0;
  background: var(--pb-paper);
  color: var(--pb-ink);
  font-family: var(--pb-sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.topbar,
.top { background: var(--pb-ink); color: var(--pb-white); }
.topbar .shell,
.top .shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--pb-white);
  font-size: 0;
  font-weight: 700;
  letter-spacing: 0.045em;
  white-space: nowrap;
}
.brand::before {
  content: "";
  width: 142px;
  height: 32px;
  flex: 0 0 142px;
  background: url("/help/assets/project-book-wordmark-reversed.svg") left center / contain no-repeat;
}
.brand span { color: var(--pb-stone); font-size: 14px; font-weight: 500; letter-spacing: 0.03em; }
.back,
.top a { color: var(--pb-white); font-size: 14px; text-decoration: none; }
.back::after,
.top a::after { content: " →"; color: var(--pb-orange); }
.back:hover,
.top a:hover { color: var(--pb-stone); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 64px;
  background: var(--pb-paper);
  border-bottom: 1px solid var(--pb-line);
}
.hero .shell { position: relative; z-index: 1; }
.eyebrow,
.kicker {
  margin: 0 0 14px;
  color: var(--pb-orange);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 820px;
  margin: 0 0 20px;
  font-family: var(--pb-serif);
  font-size: clamp(50px, 7.2vw, 84px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.hero p { max-width: 740px; margin: 0 0 30px; color: var(--pb-muted); font-size: 18px; }
.search {
  max-width: 740px;
  padding: 0;
  background: var(--pb-white);
  border: 1px solid var(--pb-ink);
}
.search input {
  width: 100%;
  padding: 17px 19px;
  color: var(--pb-ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
  font: 16px var(--pb-sans);
}
.search:focus-within { outline: 3px solid rgba(46, 124, 123, 0.3); outline-offset: 2px; }
.help-routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; margin: 0 0 30px; gap: 1px; background: var(--pb-line); border: 1px solid var(--pb-line); }
.help-routes a { display: flex; min-height: 112px; flex-direction: column; gap: 4px; padding: 17px 20px; background: var(--pb-white); text-decoration: none; }
.help-routes a:hover { background: var(--pb-ink); color: var(--pb-white); }
.help-routes strong { font-family: var(--pb-serif); font-size: 21px; font-weight: 400; line-height: 1.2; }
.help-routes a > span:last-child { color: var(--pb-muted); font-size: 13px; line-height: 1.45; }
.help-routes a:hover > span:last-child { color: var(--pb-stone); }
.route-label { color: var(--pb-orange); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }

.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 54px; padding: 54px 0 92px; }
.side { position: sticky; top: 24px; align-self: start; }
.side h2 {
  margin: 0 0 11px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--pb-ink);
  color: var(--pb-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.side a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--pb-line);
  color: var(--pb-ink);
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}
.side a:hover { color: var(--pb-teal); padding-left: 6px; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 20px; }
.section-head h2,
.article h2 {
  margin: 0;
  font-family: var(--pb-serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.08;
}
.section-head h2 { font-size: 36px; }
.section-head p { max-width: 390px; margin: 0; color: var(--pb-muted); font-size: 14px; text-align: right; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-bottom: 54px; background: var(--pb-line); border: 1px solid var(--pb-line); }
.card {
  min-height: 210px;
  padding: 25px;
  background: var(--pb-white);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}
.card:hover { background: var(--pb-ink); color: var(--pb-white); }
.card .tag { color: var(--pb-orange); font-size: 11px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.card h3 { margin: 34px 0 8px; font-family: var(--pb-serif); font-size: 23px; font-weight: 400; line-height: 1.15; }
.card p { margin: 0; color: var(--pb-muted); font-size: 14px; line-height: 1.5; }
.card:hover p { color: var(--pb-stone); }

.article { padding: 46px 0 34px; border-top: 1px solid var(--pb-ink); }
.article:first-of-type { padding-top: 38px; }
.article h2 { max-width: 740px; font-size: clamp(34px, 5vw, 52px); }
.article h3 { margin: 30px 0 8px; font-family: var(--pb-serif); font-size: 25px; font-weight: 400; line-height: 1.15; }
.article p,
.article ul,
.article ol { max-width: 790px; }
.article li { margin: 8px 0; }
.lede { margin-top: 15px; color: var(--pb-muted); font-size: 18px; line-height: 1.55; }
.note,
.caution { max-width: 790px; margin: 24px 0; padding: 18px 20px; border-left: 4px solid; }
.note { background: var(--pb-teal-soft); border-color: var(--pb-teal); }
.caution { background: var(--pb-orange-soft); border-color: var(--pb-orange); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pill { padding: 5px 9px; color: var(--pb-muted); background: transparent; border: 1px solid var(--pb-line); border-radius: 0; font-size: 12px; }
.hero + main.shell:not(.layout) { max-width: 980px; padding-top: 28px; padding-bottom: 76px; }
.hero + main.shell:not(.layout) > article { padding: 32px 0 8px; }
.hero + main.shell:not(.layout) > article h2 {
  max-width: 780px;
  margin: 38px 0 10px;
  font-family: var(--pb-serif);
  font-size: clamp(27px, 4vw, 38px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.14;
}
.hero + main.shell:not(.layout) > article h2:first-child { margin-top: 0; }
.hero + main.shell:not(.layout) > article h3 { margin: 28px 0 8px; font-family: var(--pb-serif); font-size: 23px; font-weight: 400; }
.hero + main.shell:not(.layout) > article p,
.hero + main.shell:not(.layout) > article ul,
.hero + main.shell:not(.layout) > article ol { max-width: 790px; }
.source { color: var(--pb-muted); font-size: 13px; }
.steps { max-width: 800px; margin: 28px 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; min-height: 58px; margin: 0; padding: 14px 0 14px 60px; border-top: 1px solid var(--pb-line); counter-increment: step; }
.steps li:last-child { border-bottom: 1px solid var(--pb-line); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  color: var(--pb-orange);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.field-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; max-width: 850px; margin: 24px 0; padding: 1px; background: var(--pb-line); }
.field { padding: 16px 18px; background: var(--pb-white); }
.field strong { display: block; margin-bottom: 3px; color: var(--pb-ink); }
.field span { color: var(--pb-muted); font-size: 14px; }
.hidden { display: none !important; }
.empty { display: none; padding: 22px; background: var(--pb-white); border: 1px solid var(--pb-line); color: var(--pb-muted); }

footer { padding: 30px 0 44px; background: var(--pb-ink); color: var(--pb-stone); font-size: 13px; }
footer .shell { display: flex; justify-content: space-between; gap: 20px; }
footer a { color: var(--pb-white); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 30px; }
  .side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
  .side h2 { grid-column: 1 / -1; margin-top: 20px !important; }
}
@media (max-width: 650px) {
  .shell { width: min(100% - 32px, 1180px); }
  .help-routes { grid-template-columns: 1fr; }
  .topbar .shell,
  .top .shell { min-height: 68px; }
  .brand::before { width: 124px; height: 28px; flex-basis: 124px; }
  .brand span { font-size: 12px; }
  .back { font-size: 0; }
  .back::before { content: "Back"; font-size: 13px; }
  .back::after { font-size: 13px; }
  .hero { padding: 58px 0 44px; }
  .hero h1 { font-size: clamp(44px, 14vw, 62px); }
  .hero p { font-size: 16px; }
  .layout { padding: 36px 0 70px; }
  .side { grid-template-columns: 1fr; }
  .side h2 { grid-column: auto; }
  .section-head { display: block; }
  .section-head h2 { font-size: 32px; }
  .section-head p { margin-top: 6px; text-align: left; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .card h3 { margin-top: 24px; }
  .article { padding: 38px 0 26px; }
  .field-list { grid-template-columns: 1fr; }
  footer .shell { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}
