:root {
  --kh-ink: #121212;
  --kh-paper: #e4e2dd;
  --kh-card: #f3f2ee;
  --kh-signal: #c92516;
  --kh-muted: #5c5a55;
  --kh-line: #2a2925;
  --kh-soft: #9a968c;
  --kh-on-ink: #f3f2ee;
  --kh-rule: #c9c6bf;
  --kh-ease: cubic-bezier(.2, 0, 0, 1);
  --kh-display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --kh-sans: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
}
/* The nav (69px) and the category bar (54px) both stick on wider screens, so a jump lands clear of both. */
html { scroll-padding-top: 132px; }
body { font-family: var(--kh-sans); color: var(--kh-ink); line-height: 1.5; font-size: 17px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--kh-ink); outline-offset: 3px; }
.kh-nav :focus-visible, .kh-top :focus-visible, .kh-cats :focus-visible, .kh-ink :focus-visible, .kh-sched :focus-visible, .kh-footer :focus-visible, .kh-cookie :focus-visible { outline-color: #fff; }

/* Nav: the same ink bar as the home page. */
.kh-link { font-weight: 600; color: inherit; text-decoration: underline; text-decoration-color: var(--kh-signal); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* The page head: the ledger's cover on the ink band. */
.kh-top { background: var(--kh-ink); color: var(--kh-on-ink); padding: 48px 0 36px; }
.kh-top-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; }
.kh-top h1 { font-size: clamp(3rem, 7.4vw, 6rem); max-width: 14ch; }
.kh-top p { margin: 0; max-width: 44ch; font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.45; color: #d9d6cf; }

/* Category bar: sticks under the nav at every width; on phones it turns into one row that scrolls sideways. */
.kh-cats { position: sticky; top: 69px; z-index: 9; background: var(--kh-ink); border-top: 1px solid var(--kh-line); border-bottom: 1px solid var(--kh-line); }
.kh-cats ul { list-style: none; margin: 0 auto; padding: 0 24px; max-width: 1280px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kh-cats a { display: flex; align-items: center; min-height: 52px; padding: 0 14px; border-left: 1px solid var(--kh-line); color: #d9d6cf; text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.2; text-transform: uppercase; letter-spacing: .06em; box-shadow: inset 0 -3px 0 transparent; transition: color 180ms ease-out, box-shadow 180ms ease-out; }
.kh-cats li:last-child a { border-right: 1px solid var(--kh-line); }
.kh-cats a:hover, .kh-cats a[aria-current] { color: #fff; box-shadow: inset 0 -3px 0 var(--kh-signal); }

/* Category sections on the paper ground. */
.kh-cat { background: var(--kh-paper); padding: 88px 0 96px; border-top: 1px solid var(--kh-rule); }
.kh-cat:first-of-type { border-top: 0; padding-top: 56px; }
/* Additions and Baths run on the ink band, so paper and ink alternate down the page as on home. */
.kh-cat.kh-ink { background: var(--kh-ink); color: var(--kh-on-ink); border-top-color: var(--kh-line); }
.kh-ink .kh-pic { background: #1a1916; }
.kh-ink .kh-pic-tag { background: var(--kh-card); color: var(--kh-ink); }
.kh-ink .kh-card p, .kh-ink .kh-pair figcaption, .kh-ink .kh-say-by > p { color: var(--kh-soft); }
.kh-ink .kh-card .kh-say { color: var(--kh-on-ink); }
.kh-ink .kh-say-by { border-top-color: var(--kh-line); }
.kh-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px 64px; align-items: end; margin-bottom: 48px; }
.kh-head h2 { font-size: clamp(2.6rem, 6vw, 5.4rem); }
.kh-head p { margin: 0; max-width: 46ch; font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.4; }

/* Photos: each frame holds its 4:3 box; the loader drops the picture in when it nears the screen. */
.kh-pic { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; margin: 0 0 8px; background: #cfccc5; }
.kh-pic picture { display: contents; }
.kh-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kh-pic-tag { position: absolute; left: 0; bottom: 0; display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 7px 12px 6px; background: var(--kh-ink); color: #f3f2ee; font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.kh-pic-tag b { font-family: var(--kh-display); font-size: 20px; line-height: 1; font-weight: 800; color: var(--kh-signal); }

/* The lead job in each category: photo left, the job right. */
.kh-lj { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px 56px; align-items: center; margin: 0 0 64px; }
.kh-lj .kh-pic { margin: 0; }
.kh-lj-text { display: grid; gap: 14px; justify-items: start; }
.kh-lj h3, .kh-card h3 { font-family: var(--kh-sans); text-transform: none; letter-spacing: 0; font-weight: 600; line-height: 1.2; }
.kh-lj h3 { font-size: clamp(1.5rem, 2.3vw, 2.1rem); }
.kh-lj p { margin: 0; max-width: 48ch; }
.kh-lj .kh-say { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.4; font-weight: 600; }
.kh-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 0; }
.kh-pair figure { margin: 0; }
.kh-pair .kh-pic { aspect-ratio: 3 / 4; margin: 0 0 8px; }
.kh-pair figcaption { font-size: 14px; color: var(--kh-muted); }

/* Job cards: a stretched title link makes the whole card the link when the job has a page. */
.kh-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 28px; }
.kh-card { position: relative; display: grid; gap: 6px; align-content: start; transition: transform .18s var(--kh-ease); }
.kh-card h3 { font-size: clamp(1.15rem, 1.4vw, 1.3rem); }
.kh-card p { margin: 0; color: var(--kh-muted); font-size: 16px; }
.kh-card .kh-say { color: var(--kh-ink); }
.kh-card h3 a, .kh-lj h3 a { color: inherit; text-decoration: none; }
.kh-card h3 a::after, .kh-lj h3 a::after { content: ''; position: absolute; inset: 0; }
/* The label the home cards carry; the title link covers the card, so the label is a picture of the link, hidden from screen readers. */
.kh-go { justify-self: start; margin-top: 4px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--kh-signal); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.kh-card:has(a:hover) { transform: translateY(-2px); }
.kh-card:has(a:hover) .kh-go, .kh-lj:has(a:hover) .kh-go { text-decoration-thickness: 3px; }
.kh-card:has(a:active) { transform: translateY(0); transition-duration: 80ms; }
/* A card reached from a home page link carries a red frame on its photo. */
:target > .kh-card .kh-pic, .kh-lj:target .kh-pic { outline: 3px solid var(--kh-signal); outline-offset: 4px; }

/* A customer's words close the category. */
.kh-say-by { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 8px 64px; margin: 64px 0 0; padding-top: 28px; border-top: 1px solid var(--kh-rule); }
.kh-say-by blockquote { margin: 0; }
.kh-say-by blockquote p { margin: 0; font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.45; max-width: 52ch; }
.kh-say-by > p { margin: 0; align-self: end; color: var(--kh-muted); font-weight: 600; font-size: 15px; }
.kh-say-by > p a { color: inherit; }

/* Scroll reveals: hidden only once the head script marks the page kh-js, so the content shows with JavaScript off. */
.kh-js .kh-reveal { opacity: 0; transform: translateY(18px); transition: opacity 560ms var(--kh-ease), transform 560ms var(--kh-ease); }
.kh-js .kh-fade { opacity: 0; transition: opacity 560ms ease-out; }
.kh-js .kh-reveal.kh-in, .kh-js .kh-fade.kh-in { opacity: 1; transform: none; }

/* The schedule on the ink band, signed by Ben. */
.kh-sched { background: var(--kh-ink); color: var(--kh-on-ink); padding: 88px 0 96px; border-bottom: 1px solid var(--kh-line); }
.kh-sched-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; }
.kh-sched h2 { font-size: clamp(2.6rem, 6vw, 5.4rem); }
.kh-sched-text p { margin: 0 0 14px; max-width: 46ch; }
.kh-sched-text .kh-lead { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.4; }
.kh-sched-text p + p { color: #c9c6be; }
.kh-sched-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; margin-top: 28px !important; }
.kh-sched-cta .kh-call { color: var(--kh-on-ink); text-decoration: underline; text-decoration-color: var(--kh-signal); text-decoration-thickness: 2px; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; }
.kh-sign { display: grid; gap: 2px; margin: 32px 0 0 !important; padding-top: 20px; border-top: 1px solid var(--kh-line); }
.kh-sign b { font-family: var(--kh-display); font-size: 1.7rem; line-height: 1; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; color: var(--kh-on-ink); }
.kh-sign span { color: var(--kh-soft); font-weight: 600; }
.kh-foot-grid p, .kh-foot-grid ul { margin: 0; }
.kh-foot-list a { display: inline-flex; align-items: center; min-height: 32px; color: #e4e1da; text-decoration: none; }
.kh-foot-bottom a, .kh-foot-bottom button { color: var(--kh-soft); text-decoration: none; font: inherit; display: inline-flex; align-items: center; min-height: 28px; }
.kh-cookie p { margin: 0; flex: 1; min-width: 220px; font-size: 14px; color: #c9c6be; }

@media (max-width: 1100px) {
  .kh-cats a { font-size: 14px; padding: 0 10px; letter-spacing: .04em; }
}
/* A category with four cards sets them in one row on wide screens. */
@media (min-width: 1101px) {
  .kh-cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .kh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .kh-top-grid, .kh-head, .kh-sched-grid, .kh-lj, .kh-say-by { grid-template-columns: minmax(0, 1fr); }
  .kh-foot-grid > :first-child { grid-column: 1 / -1; }
}
/* Tablets and phones: the bar stays stuck under the nav as one row that scrolls sideways; the fade on the right says more names sit past the edge. */
@media (max-width: 760px) {
  html { scroll-padding-top: calc(var(--kh-nav-h, 70px) + 56px); }
  .kh-cats { top: var(--kh-nav-h, 70px); }
  .kh-cats::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 32px; background: linear-gradient(to right, rgba(18,18,18,0), var(--kh-ink)); pointer-events: none; }
  .kh-cats ul { position: relative; display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; padding: 0 16px; }
  .kh-cats ul::-webkit-scrollbar { display: none; }
  .kh-cats li { flex: 0 0 auto; }
  .kh-cats li:last-child { padding-right: 24px; }
  .kh-cats a, .kh-cats li:last-child a { min-height: 48px; padding: 0 14px; border: 0; white-space: nowrap; font-size: 14px; letter-spacing: .04em; }
  .kh-cats li:first-child a { padding-left: 0; }
}
@media (max-width: 600px) {
  .kh-js .kh-nav-links a { min-height: 52px; padding: 0; border-top: 1px solid var(--kh-line); font-size: 17px; }
  .kh-top { padding: 48px 0 32px; }
  .kh-top h1 { font-size: clamp(2.8rem, 14vw, 4.2rem); }
  .kh-cat { padding: 56px 0 64px; }
  .kh-head { margin-bottom: 32px; }
  .kh-lj { margin-bottom: 40px; }
  /* Cards turn into ledger rows: the photo left, the job right. */
  .kh-cards { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .kh-card { grid-template-columns: 42% minmax(0, 1fr); column-gap: 14px; }
  .kh-card .kh-pic { grid-row: 1 / span 4; margin: 0; }
  .kh-card > :not(.kh-pic) { grid-column: 2; }
  .kh-card p { font-size: 15px; }
  .kh-pic-tag { padding: 5px 8px 4px; font-size: 12px; }
  .kh-pic-tag b { font-size: 19px; }
  .kh-say-by { margin-top: 48px; }
  .kh-sched { padding: 64px 0; }
}

/* Between the phone menu and the full bar, the nav drops its quote button; the hero and the closing band carry it. */

/* Reduced motion stays last so it wins every cascade. */
@media (prefers-reduced-motion: reduce) {
  .kh-nav-links a { transition: none; }
  .kh-btn, .kh-card, .kh-cats a { transition: none; }
  .kh-btn:hover, .kh-card:has(a:hover) { transform: none; }
}
