/* ==========================================================================
   Built pages: help, guides, tools, section fronts and /about.
   Loaded after chalk.css, which supplies the tokens, nav, footer, buttons,
   the Caveat hand and the doodles. The hero stays on the board; the reading
   surface is paper in light mode and the board in dark mode, with the same
   token names in both so no rule is written twice.
   ========================================================================== */

.cpage { background: var(--board); }
@media (min-width: 961px) { .cpage .nav__links a[aria-current="page"] { color: var(--chalk); } }

/* ----------------------------------------------------------------- hero */
.chero {
  padding: 108px clamp(16px, 4vw, 44px) clamp(34px, 5vh, 52px);
  border-bottom: 1px solid rgba(244, 240, 230, 0.08);
}
.chero__inner { max-width: 1020px; margin: 0 auto; }
.chero .eyebrow { margin: 4px 0 6px; }
.chero h1 {
  font-size: clamp(32px, 5.2vw, 50px);
  line-height: 1.1;
  max-width: 24ch;
  overflow-wrap: break-word;
}
.chero__doodle { display: block; width: 168px; height: 14px; margin: 10px 0 0 -4px; }
.chero__doodle path { stroke: var(--accent-light); stroke-width: 4; }
.chero__lede { margin-top: 16px; font-size: 18px; line-height: 1.55; color: var(--chalk-dim); max-width: 60ch; }
.chero__meta { margin-top: 14px; font-size: 14px; color: var(--chalk-quiet); }
.chero__meta a { color: var(--chalk-dim); text-underline-offset: 3px; }
.chero__meta a:hover { color: var(--chalk); }

/* The byline on guides and tools: who wrote it, and when it was last checked. */
.cbyline { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.cbyline__img {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(244, 240, 230, 0.18);
}
.cbyline__text { display: flex; flex-direction: column; font-size: 14px; line-height: 1.35; color: var(--chalk-quiet); min-width: 0; }
.cbyline__name { position: relative; color: var(--chalk); font-weight: 650; font-size: 15px; text-decoration: none; align-self: flex-start; }
/* A 44px tap target without moving the lines around it. */
.cbyline__name::after { content: ""; position: absolute; inset: -12px -6px; }
.cbyline__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.cbyline__role { color: var(--chalk-dim); }

/* Breadcrumbs: tall enough to tap, quiet enough to ignore. */
.ccrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  column-gap: 6px;
  font-size: 14px;
  color: var(--chalk-quiet);
}
/* One line always: each separator stays with the link after it, and a long
   page title gives way with an ellipsis instead of wrapping under an orphan "›". */
.ccrumbs li { display: inline-flex; align-items: center; min-height: 44px; flex: 0 0 auto; white-space: nowrap; }
.ccrumbs li + li::before { content: "\203A"; flex: none; margin-right: 6px; color: var(--chalk-faint); }
.ccrumbs li:last-child { flex: 0 1 auto; min-width: 0; }
.ccrumbs li:last-child [aria-current] { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--chalk-dim);
  text-decoration: none;
}
.ccrumbs a:hover { color: var(--chalk); text-decoration: underline; text-underline-offset: 3px; }
.ccrumbs [aria-current] { color: var(--chalk-quiet); }

/* ------------------------------------------------------- reading surface */
.cwrap {
  --c-bg: var(--paper);
  --c-ink: var(--ink);
  --c-soft: var(--ink-soft);
  --c-muted: var(--accent);
  --c-link: var(--accent);
  --c-eyebrow: var(--accent);
  --c-line: rgba(28, 28, 28, 0.12);
  --c-dash: rgba(28, 28, 28, 0.2);
  --c-card: #fbf9f3;
  --c-card-line: rgba(60, 52, 38, 0.14);
  --c-card-hover: rgba(111, 98, 82, 0.55);
  --c-code: rgba(28, 28, 28, 0.06);
  --c-field: #fffdf8;
  --c-shadow: 0 1px 2px rgba(28, 24, 18, 0.04), 0 4px 16px rgba(28, 24, 18, 0.05);
  --col: 720px;
  background: var(--c-bg);
  color: var(--c-ink);
  padding: clamp(28px, 5vh, 52px) clamp(16px, 4vw, 44px) clamp(56px, 9vh, 96px);
}
@media (prefers-color-scheme: dark) {
  .cwrap {
    --c-bg: var(--board);
    --c-ink: var(--chalk);
    --c-soft: var(--chalk-dim);
    --c-muted: var(--chalk-quiet);
    --c-link: var(--accent-light);
    --c-eyebrow: var(--accent-light);
    --c-line: rgba(244, 240, 230, 0.12);
    --c-dash: rgba(244, 240, 230, 0.2);
    --c-card: rgba(244, 240, 230, 0.04);
    --c-card-line: rgba(244, 240, 230, 0.13);
    --c-card-hover: rgba(179, 162, 142, 0.6);
    --c-code: rgba(244, 240, 230, 0.09);
    --c-field: rgba(0, 0, 0, 0.22);
    --c-shadow: none;
  }
}
.cwrap > * { max-width: 1020px; margin-left: auto; margin-right: auto; }
/* Narrow blocks keep the text column's left edge instead of centering. */
.cwrap > .ctool, .cwrap > .csearch, .cwrap > .cjump, .cwrap > .cempty, .cwrap > .chub__intro {
  max-width: var(--col);
  margin-left: max(0px, calc((100% - 1020px) / 2));
}

.cgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
@media (min-width: 1180px) {
  .cgrid--toc { grid-template-columns: minmax(0, var(--col)) 240px; column-gap: 56px; }
  .cgrid--toc .ctoc { grid-column: 2; grid-row: 1; position: sticky; top: 92px; align-self: start; }
  .cgrid--toc .prose { grid-column: 1; grid-row: 1; }
  .cgrid--toc .ctoc__title::after { display: none; }
}

/* On this page */
.ctoc {
  max-width: var(--col);
  border: 1px solid var(--c-card-line);
  border-radius: 14px;
  background: var(--c-card);
  padding: 2px 18px;
}
.ctoc[open] { padding-bottom: 8px; }
.ctoc__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-family: var(--hand);
  font-size: 21px;
  color: var(--c-eyebrow);
  line-height: 1.2;
}
.ctoc__title::-webkit-details-marker { display: none; }
.ctoc__title::after {
  content: "+";
  font: 400 22px/1 var(--sans);
  color: var(--c-eyebrow);
  transition: transform 0.2s;
}
.ctoc[open] .ctoc__title::after { transform: rotate(45deg); }
.ctoc[open] .ctoc__title { margin-bottom: 2px; }
.ctoc ol { list-style: none; }
.ctoc li + li { border-top: 1px dashed var(--c-line); }
.ctoc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
  font-size: 15px;
  line-height: 1.35;
  color: var(--c-soft);
  text-decoration: none;
}
.ctoc a:hover { color: var(--c-ink); }

/* ------------------------------------------------------------------ prose */
.prose { max-width: var(--col); font-size: 17px; line-height: 1.7; color: var(--c-soft); overflow-wrap: break-word; }
.prose > * + * { margin-top: 16px; }
.prose h2 {
  font-size: clamp(23px, 3vw, 27px);
  line-height: 1.25;
  font-weight: 720;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  margin-top: 46px;
  scroll-margin-top: 92px;
}
.prose h3 { font-size: 19px; line-height: 1.35; font-weight: 680; color: var(--c-ink); margin-top: 30px; scroll-margin-top: 92px; }
.prose h4 { font-size: 17px; font-weight: 680; color: var(--c-ink); margin-top: 24px; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 8px; }
.prose > :first-child { margin-top: 0; }
.prose strong { color: var(--c-ink); font-weight: 650; }
.prose a { color: var(--c-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--c-ink); }

.prose ul, .prose ol { padding-left: 0; list-style: none; }
.prose li { position: relative; }
.prose li + li { margin-top: 8px; }
.prose ul > li { padding-left: 24px; }
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.78em;
  width: 9px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-link);
}
/* Numbered steps: the hand writes the number, as on the home page. */
.prose ol { counter-reset: step; }
.prose ol > li { counter-increment: step; padding-left: 40px; }
.prose ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.12em;
  width: 28px;
  text-align: center;
  font-family: var(--hand);
  font-size: 26px;
  font-weight: 650;
  line-height: 1.4;
  color: var(--c-eyebrow);
}
.prose li > ul, .prose li > ol { margin-top: 8px; }

.prose blockquote {
  border-left: 3px solid var(--c-dash);
  padding: 2px 0 2px 18px;
  color: var(--c-soft);
}
.prose blockquote > * + * { margin-top: 6px; }

.callout {
  border: 1px solid var(--c-card-line);
  border-left: 3px solid var(--accent-light);
  border-radius: 4px 14px 14px 4px;
  background: var(--c-card);
  padding: 12px 18px 14px;
}
.callout > * + * { margin-top: 8px; }
.callout__label { font-family: var(--hand); font-size: 21px; line-height: 1.2; color: var(--c-eyebrow); }
.callout--warning { border-left-color: #b0604f; }
/* "From Superior's jobs": what the author's own company does, with a photo. */
.callout--jobs { border-left-color: var(--good); }
.callout--jobs figure { margin: 10px 0 2px; }
.callout--jobs img { max-height: 340px; object-fit: cover; }
@media (min-width: 700px) {
  .callout--jobs:has(> figure) { display: grid; grid-template-columns: minmax(0, 1fr) 220px; column-gap: 20px; align-items: start; }
  .callout--jobs:has(> figure) > * { grid-column: 1; margin-top: 8px; }
  .callout--jobs:has(> figure) > .callout__label { margin-top: 0; }
  .callout--jobs:has(> figure) > figure { grid-column: 2; grid-row: 1 / span 20; margin: 4px 0 0; }
  .callout--jobs:has(> figure) img { max-height: none; aspect-ratio: 1 / 1; }
}

.prose code {
  font: 0.88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--c-code);
  border-radius: 6px;
  padding: 2px 6px;
}
.prose pre {
  background: var(--c-code);
  border-radius: 12px;
  padding: 14px 16px;
  /* Never wrap: aligned figures stay aligned. A long line scrolls sideways,
     with the same right-edge fade as a wide table (chalk.js adds --more). */
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
  font-size: 14.5px;
  line-height: 1.55;
}
.prose pre:focus-visible { outline: 2px solid var(--c-link); outline-offset: 2px; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose kbd {
  font: 600 0.86em/1 var(--sans);
  border: 1px solid var(--c-card-line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 2px 6px;
  background: var(--c-card);
  color: var(--c-ink);
}
.prose hr { border: 0; border-top: 1px dashed var(--c-dash); margin: 36px 0; }

.prose figure { margin-top: 26px; margin-bottom: 26px; }
.prose img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--c-card-line);
  background: var(--c-card);
}
.prose figcaption { margin-top: 8px; font-size: 14.5px; color: var(--c-muted); }

/* A table (or code block) wider than the screen scrolls inside its box. chalk.js adds
   --more only while there is more to the right, and the edge fades out so
   it reads as "keep swiping". No class, no fade: a table that fits is plain. */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-card-line); border-radius: 12px; }
.table-wrap--more, .prose pre.table-wrap--more {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
}
.table-wrap:focus-visible { outline: 2px solid var(--c-link); outline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose th { color: var(--c-ink); font-weight: 650; font-size: 13.5px; letter-spacing: 0.03em; text-transform: uppercase; background: var(--c-card); }

/* -------------------------------------------------------- after the text */
.cafter > * { max-width: var(--col); margin-top: 40px; }
.cafter > .crel { max-width: 1020px; }

.chelp, .cauthor {
  border: 1px solid var(--c-card-line);
  border-radius: 16px;
  background: var(--c-card);
  padding: 18px 20px;
  color: var(--c-soft);
  font-size: 16px;
}
.chelp__title, .cauthor__eyebrow {
  font-family: var(--hand);
  font-size: 22px;
  line-height: 1.2;
  color: var(--c-eyebrow);
  margin-bottom: 4px;
}
.chelp a, .cauthor a { color: var(--c-link); text-underline-offset: 3px; }
.cauthor__name { font-size: 18px; font-weight: 700; color: var(--c-ink); }
.cauthor__name a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; }
.cauthor__name a:hover { text-decoration: underline; }
.cauthor__bio { margin-top: 4px; line-height: 1.6; }
.cauthor { display: flex; gap: 16px; align-items: flex-start; }
.cauthor__img { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-top: 6px; }
.cauthor__text { min-width: 0; }
.cauthor__more { margin-top: 6px; }
.cauthor__more a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 480px) { .cauthor__img { width: 56px; height: 56px; } }

/* The author's own page and the /about card. */
.cprofile { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 24px; align-items: start; margin: 4px 0 30px; }
.cprofile--small { grid-template-columns: 140px minmax(0, 1fr); margin: 14px 0 22px; }
.prose .cprofile__img { border-radius: 18px; aspect-ratio: 4 / 5; object-fit: cover; }
.cprofile__facts > * + * { margin-top: 10px; }
.cprofile__lead { font-size: 18px; line-height: 1.55; color: var(--c-ink); }
.cprofile__facts ul { padding-left: 0; list-style: none; }
.prose .cprofile__facts ul > li { padding: 8px 0; border-top: 1px solid var(--c-line); margin: 0; }
.prose .cprofile__facts ul > li::before { content: none; }
.prose .cprofile__facts ul > li:first-child { border-top: 0; }
@media (max-width: 640px) {
  .cprofile { grid-template-columns: 1fr; }
  .cprofile > .cprofile__img { max-width: 260px; }
  .cprofile--small { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
}
.prose .cprofile__fig img { max-height: 380px; object-fit: cover; }
.cgallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 14px; margin: 18px 0; }
.cgallery figure { margin: 0; }
.prose .cgallery img { aspect-ratio: 4 / 3; object-fit: cover; }
.cgallery figcaption { margin-top: 6px; font-size: 14px; }

.crel__head {
  font-family: var(--hand);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--c-eyebrow);
  margin-bottom: 12px;
}
.crel__list, .ccards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 14px;
}
.crel__card, .ccard {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  min-height: 44px;
  padding: 16px 18px;
  border: 1px solid var(--c-card-line);
  border-radius: 16px;
  background: var(--c-card);
  box-shadow: var(--c-shadow);
  color: var(--c-ink);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.crel__card:hover, .ccard:hover { border-color: var(--c-card-hover); transform: translateY(-1px); }
.crel__card:focus-visible, .ccard:focus-visible { outline: 2px solid var(--c-link); outline-offset: 2px; }
.crel__kind { font-family: var(--hand); font-size: 18px; line-height: 1.1; color: var(--c-eyebrow); }
.crel__title, .ccard__title { font-size: 17px; font-weight: 650; line-height: 1.35; }
.crel__desc, .ccard__desc { font-size: 15px; line-height: 1.5; color: var(--c-soft); }
.ccard__meta { margin-top: auto; padding-top: 6px; font-size: 13.5px; color: var(--c-muted); }

/* The one push to sign up: a piece of board on the page. */
.ctrial {
  background: var(--board);
  color: var(--chalk);
  border-radius: 18px;
  padding: 24px clamp(18px, 3vw, 28px) 26px;
  box-shadow: 0 18px 40px rgba(28, 24, 18, 0.14);
}
@media (prefers-color-scheme: dark) {
  .ctrial { background: var(--board-deep); border: 1.6px dashed rgba(244, 240, 230, 0.22); box-shadow: none; }
}
.ctrial__title { font-size: 22px; font-weight: 720; line-height: 1.25; }
.ctrial p:not(.ctrial__title) { margin: 6px 0 18px; color: var(--chalk-dim); font-size: 16px; }

/* ---------------------------------------------------------- section fronts */
.csearch { max-width: var(--col); }
.csearch__input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px 0 46px;
  font: 400 17px var(--sans);
  color: var(--c-ink);
  background: var(--c-field) no-repeat 16px 50% / 20px 20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a8872' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 L21 21'/%3E%3C/svg%3E");
  border: 1.6px solid var(--c-card-line);
  border-radius: 14px;
  -webkit-appearance: none;
  appearance: none;
}
.csearch__input::placeholder { color: var(--c-muted); opacity: 1; }
.csearch__input:focus { outline: 2px solid var(--c-link); outline-offset: 2px; border-color: transparent; }
.csearch__count { min-height: 22px; margin-top: 8px; font-size: 14px; color: var(--c-muted); }
/* The browser's own clear "x" is a grey circle that ignores the brand. This one
   is a chalk-brown cross in a tap-sized box, drawn the same way as the magnifier. */
.csearch__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 36px;
  height: 36px;
  margin: 0 -8px 0 4px;
  cursor: pointer;
  background: no-repeat 50% 50% / 16px 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a8872' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6 L18 18 M18 6 L6 18'/%3E%3C/svg%3E");
  border-radius: 50%;
}
.csearch__input::-webkit-search-cancel-button:hover { background-color: var(--c-code); }
.csearch__input::-webkit-search-decoration, .csearch__input::-webkit-search-results-button { -webkit-appearance: none; display: none; }
/* No script, no search: the full list is right there anyway. */
html:not(.js) .csearch { display: none; }

/* Topic jump row: one chip per topic group, right under the search box, so a
   long front is a tap away from any topic instead of a long scroll. */
.cjump { max-width: var(--col); margin-top: 14px; }
.cjump__label { font-family: var(--hand); font-size: 20px; line-height: 1.2; color: var(--c-eyebrow); margin-bottom: 4px; }
.cjump ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.cjump a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--c-card-line);
  border-radius: 999px;
  background: var(--c-card);
  color: var(--c-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 0.15s;
}
/* The chip is compact; the tap area around it is still 44px tall. */
.cjump a::after { content: ""; position: absolute; inset: -4px -2px; }
.cjump a:hover { border-color: var(--c-card-hover); }
.cjump a:focus-visible { outline: 2px solid var(--c-link); outline-offset: 2px; }
.cjump[hidden], .cjump li[hidden] { display: none; }
html:not(.js) .cjump__label { margin-bottom: 6px; }
/* While searching, results are one flat list ranked by where the words match. */
.ccards[data-search-results] { margin-top: 18px; }
.ccards[data-search-results][hidden] { display: none; }

.cgroup { margin-top: 30px; }
.cgroup:first-child { margin-top: 0; }
.csearch + .cgroup { margin-top: 18px; }
.cjump + .cgroup { margin-top: 26px; }
.cgroup__head {
  font-family: var(--hand);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--c-eyebrow);
  margin-bottom: 10px;
  scroll-margin-top: 92px;
}
.cgroup[hidden], [data-search-item][hidden] { display: none; }
.cgroup__intro { max-width: var(--col); margin: -4px 0 12px; color: var(--c-soft); line-height: 1.55; }
.cgroup__more { margin: -6px 0 12px; font-size: 15px; color: var(--c-muted); }
.cgroup__more a { display: inline-flex; align-items: center; min-height: 44px; color: var(--c-link); text-underline-offset: 3px; }

/* /guides: the topic hubs, first thing on the page. */
.chubs { margin-bottom: 34px; }
.chubs__head {
  font-family: var(--hand);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--c-eyebrow);
  margin-bottom: 10px;
}
.chubs__list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.chubs__card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--c-card-line);
  border-radius: 16px;
  background: var(--c-card);
  box-shadow: var(--c-shadow);
  color: var(--c-ink);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.chubs__card:hover { border-color: var(--c-card-hover); transform: translateY(-1px); }
.chubs__card:focus-visible { outline: 2px solid var(--c-link); outline-offset: 2px; }
.chubs__name { font-size: 17px; font-weight: 700; line-height: 1.3; }
.chubs__blurb { font-size: 14.5px; line-height: 1.45; color: var(--c-soft); }
.chubs__count { margin-top: auto; padding-top: 4px; font-family: var(--hand); font-size: 18px; line-height: 1.1; color: var(--c-eyebrow); }

/* A guide hub (/guides/pricing): an intro, then the guides on the topic. */
.chub__intro { max-width: var(--col); margin-bottom: 26px; }
.chub__intro p { font-size: 17px; }
.cgroup + .cjump { margin-top: 36px; }
/* Hub copy (site/content/hubs): a row of picked cards, a line under a
   stage's heading, and the FAQ at the foot of the page. */
.chub__start { margin-bottom: 34px; }
.chub__head {
  font-family: var(--hand);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--c-eyebrow);
  margin-bottom: 10px;
  scroll-margin-top: 92px;
}
.chub__lead { max-width: var(--col); margin: -4px 0 12px; color: var(--c-soft); line-height: 1.55; }
div.cgroup__intro p + p, .chub__lead p + p { margin-top: 8px; }
.cwrap > .chub__faq { max-width: var(--col); margin-top: 44px; margin-left: max(0px, calc((100% - 1020px) / 2)); }
.chub__faq h2 { scroll-margin-top: 92px; }
.chub__faq + .cjump { margin-top: 36px; }

.cempty {
  max-width: var(--col);
  border: 1.6px dashed var(--c-dash);
  border-radius: 16px;
  padding: 20px 22px;
  color: var(--c-soft);
  font-size: 16px;
}
.cempty__title { font-weight: 650; color: var(--c-ink); margin-bottom: 4px; }
.cempty a { color: var(--c-link); }
.cempty--search { margin-top: 18px; }
.cempty--search[hidden] { display: none; }

/* ----------------------------------------------------------------- updates */
/* /updates and /updates/<slug>: the newest update in full, then a single
   column of earlier ones by month, and older/newer links on each entry. */
.cwrap > .clatest, .cwrap > .cupdates {
  max-width: var(--col);
  margin-left: max(0px, calc((100% - 1020px) / 2));
}
.ctags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.ctags li, .ctags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border: 1px solid var(--c-card-line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-soft);
}
.chero__tags { margin-top: 14px; }
/* The hero sits outside .cwrap, where the --c-* tokens do not exist. */
.chero__tags li { border: 1px solid rgba(244, 240, 230, 0.26); color: var(--chalk-dim); }
.ctags--inline { margin-top: 8px; }

.clatest {
  border: 1px solid var(--c-card-line);
  border-radius: 20px;
  background: var(--c-card);
  box-shadow: var(--c-shadow);
  padding: clamp(18px, 3vw, 28px);
}
.clatest__label { font-family: var(--hand); font-size: 22px; line-height: 1.2; color: var(--c-eyebrow); }
.clatest__meta { margin-top: 4px; font-size: 14px; color: var(--c-muted); }
.clatest__title { margin-top: 2px; font-size: clamp(22px, 3vw, 27px); line-height: 1.25; font-weight: 720; color: var(--c-ink); overflow-wrap: break-word; }
.clatest__title a { color: inherit; text-decoration: none; }
.clatest__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.clatest .ctags { margin-top: 12px; }
.clatest__body { max-width: none; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--c-dash); }
.clatest__body h3 { font-size: 20px; margin-top: 28px; }
.clatest__body h4 { font-size: 17.5px; }
.clatest__more { margin-top: 14px; }
.clatest__more a, .cpager__all a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  color: var(--c-link);
  text-underline-offset: 3px;
}

.cwrap > .cupdates { margin-top: 40px; }
.cupds { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.cupd, .cpager__card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  min-height: 44px;
  padding: 16px 18px;
  border: 1px solid var(--c-card-line);
  border-radius: 16px;
  background: var(--c-card);
  box-shadow: var(--c-shadow);
  color: var(--c-ink);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.cupd:hover, .cpager__card:hover { border-color: var(--c-card-hover); transform: translateY(-1px); }
.cupd:focus-visible, .cpager__card:focus-visible { outline: 2px solid var(--c-link); outline-offset: 2px; }
.cupd__date, .cpager__date { font-size: 13.5px; color: var(--c-muted); }
.cupd__title { font-size: 17.5px; font-weight: 650; line-height: 1.35; overflow-wrap: break-word; }
.cupd__desc { font-size: 15px; line-height: 1.5; color: var(--c-soft); overflow-wrap: break-word; }

.cpager__list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cpager__newer { grid-column: 2; text-align: right; }
.cpager__newer .cpager__card { align-items: flex-end; }
.cpager__dir { font-family: var(--hand); font-size: 19px; line-height: 1.1; color: var(--c-eyebrow); }
.cpager__title { font-size: 16.5px; font-weight: 650; line-height: 1.35; overflow-wrap: break-word; }
.cpager__all { margin-top: 10px; color: var(--c-muted); }
@media (max-width: 640px) {
  .cpager__list { grid-template-columns: minmax(0, 1fr); }
  .cpager__newer { grid-column: auto; text-align: left; }
  .cpager__newer .cpager__card { align-items: stretch; }
  .cpager__newer { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .cupd, .cpager__card { transition: none; }
  .cupd:hover, .cpager__card:hover { transform: none; }
}
@media print {
  .cpager, .clatest__more { display: none !important; }
}

/* ------------------------------------------------------------------- tools */
.ctool {
  max-width: var(--col);
  margin-bottom: 36px;
  border: 1px solid var(--c-card-line);
  border-radius: 20px;
  background: var(--c-card);
  box-shadow: var(--c-shadow);
  padding: clamp(18px, 3vw, 28px);
}
.ctool__soonhead { font-weight: 650; color: var(--c-ink); }
.ctool__soon p + p { margin-top: 4px; color: var(--c-soft); }

/* Calculator parts any tool can use. */
.calc__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 14px; }
.calc__field { display: grid; gap: 6px; }
.calc__label { font-size: 15px; font-weight: 600; color: var(--c-ink); }
.calc__input { display: flex; align-items: center; gap: 8px; }
.calc__input input, .calc__input select {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 12px;
  font: 500 17px var(--sans);
  font-variant-numeric: tabular-nums;
  color: var(--c-ink);
  background: var(--c-field);
  border: 1.6px solid var(--c-card-line);
  border-radius: 12px;
}
.calc__input input:focus, .calc__input select:focus { outline: 2px solid var(--c-link); outline-offset: 1px; border-color: transparent; }
.calc__unit { font-size: 15px; color: var(--c-muted); min-width: 2.2em; }
.calc__result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--c-dash);
}
.calc__resultlabel { font-family: var(--hand); font-size: 22px; color: var(--c-eyebrow); }
.calc__big { font-size: clamp(28px, 5vw, 36px); font-weight: 750; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--c-ink); }
.calc__note { margin-top: 12px; font-size: 14.5px; color: var(--c-muted); }

/* ------------------------------------------------------------------- phone */
@media (max-width: 640px) {
  .chero { padding-top: 92px; }
  .chero__lede { font-size: 17px; }
  .prose h2 { margin-top: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .ctoc__title::after { transition: none; }
  .crel__card, .ccard, .chubs__card { transition: none; }
  .crel__card:hover, .ccard:hover, .chubs__card:hover { transform: none; }
}

/* ------------------------------------------------- printable forms (.sheet) */
/* A template page puts each form in <div class="sheet">. On screen it reads as
   a sheet of paper. Printing a page that has one prints only the sheet(s). */
.prose .sheet {
  border: 1px solid var(--c-card-line);
  border-radius: 14px;
  background: var(--c-field);
  color: var(--c-ink);
  padding: clamp(16px, 3vw, 28px);
  font-size: 15.5px;
  line-height: 1.55;
  box-shadow: var(--c-shadow);
}
.sheet > * + * { margin-top: 12px; }
.prose .sheet__title { font-size: 22px; line-height: 1.2; font-weight: 740; color: var(--c-ink); margin: 0; }
.prose .sheet__sub { font-size: 14px; color: var(--c-muted); }
.prose .sheet__h { margin-top: 22px; padding-bottom: 4px; border-bottom: 1px solid var(--c-dash); font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-ink); }
.sheet__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; }
.sheet__f { display: flex; flex-direction: column; justify-content: flex-end; min-height: 46px; min-width: 0; }
.sheet__f--wide { grid-column: 1 / -1; }
.sheet__lab { font-size: 13px; color: var(--c-soft); }
.sheet__line { display: block; min-height: 24px; border-bottom: 1px solid var(--c-ink); }
.sheet__box { display: block; min-height: 5.5em; border: 1px solid var(--c-ink); border-radius: 4px; margin-top: 4px; }
.sheet__box--tall { min-height: 9em; }
.sheet .blank { display: inline-block; min-width: 7em; border-bottom: 1px solid var(--c-ink); }
.sheet .blank--short { min-width: 3.5em; }
.sheet .blank--long { min-width: 14em; }
.sheet p, .sheet li { color: var(--c-ink); }
.prose .sheet ol, .prose .sheet ul { margin: 0; padding-left: 1.4em; }
.prose .sheet ol { counter-reset: none; list-style: decimal; }
.prose .sheet ul { list-style: disc; }
.prose .sheet ol > li, .prose .sheet ul > li { padding-left: 4px; }
.prose .sheet li::before { content: none !important; }
.sheet li + li { margin-top: 4px; }
.sheet .table-wrap, .sheet table { font-size: 14px; }
.sheet table { width: 100%; border-collapse: collapse; }
/* The sheet's own grid is the frame: no rounded box around it to clip the
   corners, and the last row keeps its bottom line (.prose drops it). */
.sheet .table-wrap { border: 0; border-radius: 0; }
.prose .sheet tr:last-child td { border-bottom: 1px solid var(--c-ink); }
.sheet th, .sheet td { border: 1px solid var(--c-ink); padding: 6px 8px; text-align: left; vertical-align: top; background: none; color: var(--c-ink); text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 600; }
.sheet td { font-weight: 400; height: 2.1em; }
.sheet td.num, .sheet th.num { text-align: right; }
.sheet .sheet__sig { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 28px; margin-top: 26px; }
.sheet .sheet__sig .sheet__line { min-height: 34px; }
.sheet .sheet__fine { font-size: 13px; color: var(--c-soft); }
/* A tick-box checklist in blocks, two across (one on a phone):
   .sheet__months > .sheet__month > h4.sheet__h + ul.sheet__checks, and each
   li starts with <span class="sheet__tick" aria-hidden="true"></span>. */
.sheet__months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.sheet .sheet__months { margin-top: 4px; }
.prose .sheet__month .sheet__h { margin-top: 16px; }
.prose .sheet ul.sheet__checks { list-style: none; padding-left: 0; margin-top: 6px; }
.prose .sheet ul.sheet__checks > li { padding-left: 1.55em; text-indent: -1.55em; }
.sheet__checks li + li { margin-top: 3px; }
.sheet__tick { display: inline-block; width: 0.85em; height: 0.85em; margin-right: 0.7em; border: 1.5px solid var(--c-ink); border-radius: 2px; vertical-align: -0.08em; }
/* "Print this checklist": hidden until chalk.js wires it to window.print(). */
.cprint { margin: 18px 0 14px; }
.cprint[hidden] { display: none; }
.cprint__btn {
  min-height: 48px;
  padding: 0 20px;
  font: 600 16px var(--sans);
  color: var(--c-ink);
  background: var(--c-field);
  border: 1.6px solid var(--c-card-hover);
  border-radius: 12px;
  cursor: pointer;
}
.cprint__btn:hover { border-color: var(--c-ink); }
.cprint__btn:focus-visible { outline: 2px solid var(--c-link); outline-offset: 2px; }
@media (max-width: 640px) {
  .sheet__grid, .sheet .sheet__sig, .sheet__months { grid-template-columns: minmax(0, 1fr); }
  .prose .sheet { padding: 14px; font-size: 15px; }
  /* Fill-in tables wrap their words instead of scrolling, so every column is
     on screen. The empty tick and score columns keep a little width. */
  .sheet .table-wrap { overflow-x: auto; }
  .sheet table { min-width: 0; table-layout: auto; }
  .sheet th, .sheet td { padding: 6px 5px; }
  .sheet th:not(:first-child), .sheet td:not(:first-child) { min-width: 2.6em; }
  .sheet td:first-child, .sheet th:first-child { min-width: 0; }
}

@media print {
  :root { color-scheme: light; }
  html, body, .cpage, .cwrap { background: #fff !important; color: #000 !important; }
  .nav, .footer, .gate, .ccrumbs, .ctoc, .cafter, svg, .calc__actions, .calc__fallback, .doodle { display: none !important; }
  /* The page title stays, as a plain heading, and the rest of the hero goes. */
  .chero { background: none !important; padding: 0 0 8pt !important; border: 0 !important; }
  .chero__inner > :not(h1) { display: none !important; }
  .chero h1 { font-size: 20pt !important; color: #000 !important; max-width: none !important; margin: 0 !important; }
  .cwrap { padding: 0 !important; }
  .cwrap > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
  .cgrid { display: block !important; }
  .prose { max-width: none !important; font-size: 11pt !important; line-height: 1.45 !important; color: #000 !important; overflow: visible !important; }
  .prose, .prose h2, .prose h3, .prose h4, .prose strong, .prose a { color: #000 !important; }
  .prose a { text-decoration: none !important; }
  /* A heading stays with what follows it (a table, a list, a paragraph), and a
     short table or block is not split across pages. */
  .prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { break-after: avoid; page-break-after: avoid; }
  .prose h2 + .table-wrap, .prose h3 + .table-wrap, .prose h4 + .table-wrap, .prose p + .table-wrap { break-before: avoid; }
  .prose > .table-wrap, .prose > .table-wrap table, .prose pre, .callout, figure, .prose blockquote { break-inside: avoid; }
  .prose > .table-wrap thead { display: table-header-group; }
  .prose > .table-wrap tr { break-inside: avoid; }
  .prose pre { white-space: pre-wrap !important; overflow: visible !important; -webkit-mask-image: none !important; mask-image: none !important; }
  .table-wrap { overflow: visible !important; border: 0 !important; -webkit-mask-image: none !important; mask-image: none !important; }
  /* A page with a form prints only the form: the title, the sheets and nothing else. */
  body:has(.sheet) .chero { display: none !important; }
  .cwrap:has(.sheet) .prose > :not(.sheet) { display: none !important; }
  .prose .sheet { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: none !important; padding: 0 !important; font-size: 10.5pt !important; color: #000 !important; }
  .sheet + .sheet { break-before: page; }
  .sheet *, .sheet p, .sheet li { color: #000 !important; }
  .prose .sheet__h { break-after: avoid; }
  .sheet tr, .sheet__f, .sheet__sig, .sheet p { break-inside: avoid; }
  .sheet table { min-width: 0 !important; }
  .sheet th, .sheet td, .sheet__line, .sheet .blank, .sheet__box, .sheet__tick { border-color: #000 !important; }
  .cprint { display: none !important; }
  /* A block checklist stays two across and tight, so a year fits one page. */
  .sheet .sheet__months { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0 18pt !important; }
  .prose .sheet__month .sheet__h { margin-top: 8pt !important; font-size: 9pt !important; }
  .sheet__month { break-inside: avoid; }
  .prose .sheet:has(.sheet__months) { font-size: 9.5pt !important; line-height: 1.35 !important; }
  .prose .sheet:has(.sheet__months) > * + * { margin-top: 6pt; }
  .sheet__checks li + li { margin-top: 1pt; }
}

/* Copy-and-paste text messages (guides/text-message-templates-for-contractors). */
.prose .sms {
  max-width: 34em;
  padding: 12px 16px;
  border: 1px solid var(--c-card-line);
  border-radius: 18px 18px 18px 5px;
  background: var(--c-card);
  color: var(--c-ink);
  font-size: 16px;
  line-height: 1.5;
  user-select: all;
  -webkit-user-select: all;
  overflow-wrap: anywhere;
}
@media print {
  .prose .sms { background: none !important; border-color: #000 !important; color: #000 !important; break-inside: avoid; }
}

/* Phone tap targets (Nov 1 QA). The look stays; only the tap area grows.
   Breadcrumb words as short as "Tools" get a 44px-wide target, and topic
   chip rows get enough room that their 44px tap areas never overlap. */
@media (max-width: 640px) {
  .ccrumbs a { min-width: 44px; }
  .cjump ul { row-gap: 8px; }
}
