/* Site pages (22 Nov 2026): Why, How this was built, Make your own, About Richard and Contact.
   Loaded last. Same type scale, hairlines and colours as the dashboard. */

/* ---------- Page masthead ---------- */
.hd-mast--page .hd-lede { margin-top: 20px; max-width: 38em; }

/* ---------- Page body ---------- */
.hd-site { display: grid; gap: 64px; padding-block: 48px 8px; }
.hd-site__block { display: grid; gap: 24px; min-width: 0; }
.hd-site__head { display: grid; gap: 4px; padding-top: 16px; border-top: 2px solid var(--hd-rule); }
.hd-site__head h2 { font-family: var(--hd-display); font-weight: 600; font-size: clamp(22px, 2.4cqi, 28px); line-height: 1.2; letter-spacing: -.02em; }
.hd-site__sub { max-width: 44em; font-size: 15px; line-height: 1.6; color: var(--color-fg-muted); }
.hd-site__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.hd-link { color: var(--hd-accent); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hd-link:hover { text-decoration-thickness: 2px; }
.hd-site > .hd-callout { max-width: 52em; }

/* essay rows: heading on the left, words on the right */
.hd-essay { display: grid; min-width: 0; }
.hd-essay__row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 56px; row-gap: 8px; padding: 16px 0 32px; border-top: 1px solid var(--hd-line); }
.hd-essay__row:first-child { border-top: 2px solid var(--hd-rule); }
.hd-essay__row--stack { grid-template-columns: minmax(0, 1fr); }
.hd-essay__row h2 { font-family: var(--hd-display); font-weight: 600; font-size: 20px; line-height: 1.3; letter-spacing: -.01em; }
.hd-prose { display: grid; gap: 16px; max-width: 40em; font-size: 16px; line-height: 1.65; }
.hd-prose ul { display: grid; gap: 12px; margin: 0; padding-left: 20px; }
.hd-prose li::marker { color: var(--hd-accent); }
.hd-prose b { font-variant-numeric: tabular-nums; }

/* ---------- How this was built ---------- */
.hd-glance { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hd-glance .hd-stat__v { font-size: 28px; }
.hd-glance .hd-stat__v--sm { font-size: 18px; line-height: 1.5; }

.hd-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hd-line); }
.hd-flow li { position: relative; min-width: 0; padding: 16px 20px 8px 0; }
.hd-flow li + li { padding-left: 20px; border-left: 1px solid var(--hd-line); }
.hd-flow li + li::before {
  content: ""; position: absolute; left: -5px; top: 21px; width: 9px; height: 9px;
  background: var(--color-bg); border-top: 1px solid var(--hd-line); border-right: 1px solid var(--hd-line); transform: rotate(45deg);
}
.hd-flow__n { font-family: var(--hd-display); font-weight: 600; font-size: 13px; color: var(--hd-accent); font-variant-numeric: tabular-nums; }
.hd-flow h3 { margin-top: 8px; font-family: var(--hd-display); font-weight: 600; font-size: 16px; line-height: 1.3; }
.hd-flow h3 + p { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--color-fg-muted); }

.hd-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.hd-split > div { min-width: 0; }
.hd-split h3 { padding-bottom: 8px; border-bottom: 1px solid var(--hd-rule); font-family: var(--hd-display); font-weight: 600; font-size: 16px; }
.hd-ticks { display: grid; margin: 0; padding: 0; list-style: none; }
.hd-ticks li { padding: 12px 0; border-bottom: 1px solid var(--hd-line); font-size: 14px; line-height: 1.5; }
.hd-ticks li:last-child { border-bottom: 0; }

.hd-table--plain { min-width: 0; font-size: 14px; }
.hd-table--plain td { vertical-align: top; }
.hd-table--plain td:first-child { width: 38%; }

/* ---------- The Formulate panel ---------- */
.hd-offer {
  --color-fg: #ffffff; --color-fg-muted: rgba(255, 255, 255, .68); --hd-line: rgba(255, 255, 255, .18);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 48px; align-items: end;
  padding: 32px; background: #19181b; color: var(--color-fg);
}
.hd-offer__kicker { font-size: 13px; font-weight: 500; color: #c4a2f8; }
.hd-offer h2 { margin-top: 8px; font-family: var(--hd-display); font-weight: 600; font-size: clamp(22px, 2.4cqi, 28px); line-height: 1.2; letter-spacing: -.02em; }
.hd-offer h2 + p { margin-top: 12px; max-width: 36em; font-size: 15px; line-height: 1.6; color: var(--color-fg-muted); }
.hd-offer__links { display: grid; gap: 8px; }
.hd-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px;
  border: 1px solid var(--hd-line); color: var(--color-fg); text-decoration: none;
  font-family: var(--hd-display); font-weight: 500; font-size: 14px; line-height: 1.3;
}
.hd-btn::after { content: "\2192"; font-family: var(--hd-text); }
.hd-btn:hover { background: rgba(255, 255, 255, .06); }
.hd-btn--primary { border-color: #7013ba; background: #7013ba; color: #fff; }
.hd-btn--primary:hover { background: #8124cc; }

/* ---------- Make your own ---------- */
.hd-need { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; }
.hd-need > div { padding-top: 12px; border-top: 1px solid var(--hd-line); }
.hd-need h3 { font-family: var(--hd-display); font-weight: 600; font-size: 16px; }
.hd-need p { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--color-fg-muted); }

.hd-steps { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hd-line); }
.hd-step { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 0 16px; padding: 20px 0 24px; border-bottom: 1px solid var(--hd-line); }
.hd-step:last-child { border-bottom: 0; }
.hd-step__n { font-family: var(--hd-display); font-weight: 600; font-size: 28px; line-height: 1; color: var(--hd-accent); font-variant-numeric: tabular-nums; }
.hd-step h3 { font-family: var(--hd-display); font-weight: 600; font-size: 18px; line-height: 1.3; }
.hd-step h3 + p { margin-top: 8px; max-width: 44em; font-size: 15px; line-height: 1.6; color: var(--color-fg-muted); }
.hd-prompt { max-width: 44em; margin-top: 12px; border: 1px solid var(--hd-line); background: var(--hd-soft); }
.hd-prompt__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 4px 12px; border-bottom: 1px solid var(--hd-line); font-size: 12px; color: var(--color-fg-muted); }
.hd-prompt__copy { appearance: none; margin: 0; padding: 4px 12px; border: 1px solid var(--hd-line); background: var(--color-bg); color: var(--color-fg); font: 500 12px/1.4 var(--hd-text); cursor: pointer; }
.hd-prompt__copy:hover { border-color: var(--color-fg-muted); }
.hd-prompt__text { padding: 12px; font-size: 14px; line-height: 1.6; }

/* ---------- About Richard ---------- */
.hd-bio { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; align-items: start; }
.hd-bio__fig { min-width: 0; }
.hd-bio__photo { aspect-ratio: 4 / 5; background-color: var(--hd-soft); background-position: center; background-size: cover; background-repeat: no-repeat; }
.hd-bio__cap { margin-top: 8px; font-size: 12px; color: var(--color-fg-muted); }

/* ---------- Contact ---------- */
.hd-contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--hd-line); border-top: 2px solid var(--hd-rule); border-bottom: 1px solid var(--hd-line); }
.hd-contact a { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 20px 20px 24px; background: var(--color-bg); color: var(--color-fg); text-decoration: none; }
.hd-contact a:first-child { padding-left: 0; }
.hd-contact__k { font-size: 13px; color: var(--color-fg-muted); }
.hd-contact__v { font-family: var(--hd-display); font-weight: 600; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.hd-contact__go { margin-top: 4px; font-size: 13px; font-weight: 500; color: var(--hd-accent); }
.hd-contact a:hover .hd-contact__v { color: var(--hd-accent); }
.hd-topics { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hd-line); }
.hd-topics a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 16px 0; border-bottom: 1px solid var(--hd-line); color: var(--color-fg); text-decoration: none; }
.hd-topics a::after { content: "\2192"; grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--hd-accent); }
.hd-topics__t { grid-column: 1; font-family: var(--hd-display); font-weight: 600; font-size: 16px; }
.hd-topics__d { grid-column: 1; font-size: 14px; color: var(--color-fg-muted); }
.hd-topics a:hover .hd-topics__t { color: var(--hd-accent); }

/* ---------- Footer links ---------- */
.hd-foot__links { display: inline-flex; flex-wrap: wrap; gap: 4px 16px; }
.hd-foot__links a { color: var(--color-fg-muted); text-decoration: underline; text-underline-offset: 3px; }
.hd-foot__links a:hover { color: var(--color-fg); }

/* ---------- Focus ---------- */
.hd-link:focus-visible, .hd-btn:focus-visible, .hd-contact a:focus-visible, .hd-topics a:focus-visible,
.hd-prompt__copy:focus-visible, .hd-foot__links a:focus-visible { outline: 2px solid var(--hd-accent); outline-offset: 2px; }
.hd-offer .hd-btn:focus-visible { outline-color: #c4a2f8; }

/* ---------- Widths ---------- */
@container hd (max-width: 1080px) {
  .hd-flow { grid-template-columns: minmax(0, 1fr); }
  .hd-flow li, .hd-flow li + li { display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 24px; padding: 16px 0; border-left: 0; }
  .hd-flow li + li { border-top: 1px solid var(--hd-line); }
  .hd-flow li + li::before { left: 20px; top: -5px; transform: rotate(135deg); }
  .hd-flow__n { grid-column: 1; }
  .hd-flow h3 { grid-column: 1; margin-top: 4px; }
  .hd-flow h3 + p { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .hd-need { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container hd (max-width: 880px) {
  .hd-essay__row { grid-template-columns: minmax(0, 1fr); }
  .hd-split, .hd-offer, .hd-bio { grid-template-columns: minmax(0, 1fr); }
  .hd-bio { gap: 32px; }
  .hd-bio__fig { max-width: 280px; }
  .hd-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hd-contact { grid-template-columns: minmax(0, 1fr); }
  .hd-contact a, .hd-contact a:first-child { padding: 16px 0; }
}
@container hd (max-width: 600px) {
  .hd-site { gap: 48px; padding-top: 32px; }
  .hd-flow li, .hd-flow li + li { grid-template-columns: minmax(0, 1fr); }
  .hd-flow h3 + p { grid-column: 1; grid-row: auto; margin-top: 8px; }
  .hd-need { grid-template-columns: minmax(0, 1fr); }
  .hd-offer { padding: 20px; }
  .hd-step { grid-template-columns: 32px minmax(0, 1fr); gap: 0 12px; }
  .hd-step__n { font-size: 22px; }
  .hd-glance .hd-stat__v { font-size: 22px; }
  .hd-table--plain td:first-child { width: 45%; }
}
