/* Free Building Tools hub (/readiness/) and dedicated tool pages. Loaded only by those five pages. */

/* ---- colour families (one per journey step) ---- */
.th-c1 { --tc: #02355A; --tw: #E9EEF3; }
.th-c2 { --tc: #2F6E9E; --tw: #E7F0F7; }
.th-c3 { --tc: #54748A; --tw: #EDF2F4; }
.th-c4 { --tc: #00607A; --tw: #E3F1F5; }
.th-c5 { --tc: #1D6F9C; --tw: #E4EFF7; }
.th-c6 { --tc: #8A5A12; --tw: #FBF4E8; }

/* ---- illustrations ---- */
.th-art { display: block; width: 100%; height: auto; }
.th-art .ta-ground { stroke: var(--ink); stroke-width: 2.5; }
.th-art .ta-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.th-art .ta-fill { fill: #FFFFFF; stroke: var(--ink); stroke-width: 2; }
.th-art .ta-accent { fill: none; stroke: var(--tc); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.th-art rect.ta-accent { fill: #FFFFFF; }
.th-art .ta-acc2 { fill: none; stroke: var(--tc); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.th-art .ta-s1, .th-art .ta-s2, .th-art .ta-s3, .th-art .ta-s4 { fill: none; stroke-width: 5; stroke-linecap: round; }
.th-art .ta-s1 { stroke: #2E8B6F; } .th-art .ta-s2 { stroke: #C2410C; } .th-art .ta-s3 { stroke: #A16207; } .th-art .ta-s4 { stroke: #1D6F9C; }

/* ---- hub hero ---- */
.th-hero { background: var(--surface); border-bottom: 1px solid var(--rule); }
.th-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
main.ici-main.th .th-hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); line-height: 1.04; letter-spacing: -0.025em; margin: 0.4rem 0 1rem; }
.th ol, .th ul, .tp ol, .tp ul, .th .th-what, .th .th-get { max-width: none; }
.th .th-what, .th .th-get { max-width: 36rem; }
.th-hero .lead { max-width: 34rem; }
.th-hero-cta { margin-top: 1.75rem; }
.th-hero-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.th-hero-steps a { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 1rem 0.7rem 0.7rem; background: var(--tw); border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.02rem; text-decoration: none; transition: box-shadow var(--dur) var(--ease); }
.th-hero-steps a:hover, .th-hero-steps a:focus-visible { box-shadow: inset 0 0 0 2px var(--tc); }
.th-ch { scroll-margin-top: 5rem; }
.th-hero-steps li span { flex: none; display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--tc);
  color: #FFFFFF; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em; }
.th-hero-steps li:nth-child(even) { margin-left: 2.25rem; }

/* ---- section headings ---- */
.th-section-h { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -0.01em; margin: 0 0 0.5rem; }
.th-section-lede { color: var(--muted); max-width: 40rem; margin: 0 0 2rem; }

/* ---- the journey ---- */
.th-journey { padding-block: var(--rhythm); background: var(--paper); }
.th-journey .th-section-h { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.th-chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(2.5rem, 6vw, 5.5rem); }
.th-ch { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.75rem, 5vw, 4.5rem); align-items: center; }
.th-ch.th-flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.th-ch.th-flip .th-ch-art { order: 2; }
.th-ch-art { position: relative; background: var(--tw); border-radius: 28px; aspect-ratio: 5 / 4; overflow: hidden; }
.th-ch-art::before { content: ""; position: absolute; right: -6%; bottom: -14%; width: 76%; aspect-ratio: 1; border-radius: 50%; background: #FFFFFF; }
.th-ch-art .th-art { position: absolute; right: 7%; bottom: 8%; width: 56%; }
.th-num { position: absolute; top: clamp(0.8rem, 2vw, 1.4rem); left: clamp(1rem, 2.4vw, 1.8rem); font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3.5rem, 8vw, 6.5rem); line-height: 1; color: var(--tc); letter-spacing: -0.04em; z-index: 1; }
.th-kicker { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--tc); margin: 0 0 0.75rem; }
.th-kn { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--tc); color: #FFFFFF; letter-spacing: 0; font-size: 0.8rem; }
.th-ch h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 0.9rem; }
.th-what { font-size: 1.1rem; line-height: 1.55; color: var(--body); max-width: 34rem; margin: 0 0 1.1rem; }
.th-get { border-left: 4px solid var(--tc); padding: 0.2rem 0 0.2rem 1rem; color: var(--body); max-width: 34rem; margin: 0 0 1.6rem; }
.th-get span { display: block; font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; }

/* ---- supporting tools ---- */
.th-utils-band { background: var(--surface); border-top: 1px solid var(--rule); }
.th-utils { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.th-util a { display: grid; gap: 0.45rem; height: 100%; padding: 1.25rem 1.25rem 1.35rem; border: 1px solid var(--rule); border-radius: 16px; background: var(--paper);
  color: var(--ink); text-decoration: none; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.th-util a:hover, .th-util a:focus-visible { border-color: var(--action); box-shadow: var(--lift); }
.th-ico { width: 2.6rem; height: 2.6rem; padding: 0.55rem; border-radius: 50%; background: var(--tint-teal); fill: none; stroke: var(--action); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; margin-bottom: 0.35rem; }
.th-util-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.25; }
.th-util-name::after { content: " \2192"; color: var(--action); }
.th-util-what { color: var(--muted); font-size: 0.95rem; line-height: 1.45; }

/* ---- building record band ---- */
.th-record-band { background: var(--ink); color: #FFFFFF; --tc: #8FD3E3; }
.th-record { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.th-record-art { background: rgba(255, 255, 255, 0.06); border-radius: 50%; aspect-ratio: 1; display: grid; place-items: center; padding: 18%; }
.th-record-art .ta-line, .th-record-art .ta-ground { stroke: #FFFFFF; }
.th-record h2 { color: #FFFFFF; font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 0.7rem; }
.th-record p { color: #D6E4EA; max-width: 36rem; }
.th-kicker-light { color: #8FD3E3; }
.th-rec-list { list-style: none; margin: 1.25rem 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem 2rem; }
.th-rec-list li { border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: 0.6rem; }
.th-rec-name { display: block; font-family: var(--font-display); font-weight: 700; color: #FFFFFF; }
.th-rec-what { display: block; color: #BFD2DA; font-size: 0.95rem; }
.th-btn-light { background: #FFFFFF; color: var(--ink); border-color: #FFFFFF; }

.th-boundary { background: var(--paper); }

/* ---- tool pages ---- */
.tp-hero { background: var(--tw); border-bottom: 1px solid var(--rule); }
.tp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
.tp-hero-grid:has(.tp-photo) { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.tp-crumb { margin: 0 0 1rem; font-size: 0.92rem; }
.tp-crumb a { color: var(--tc); font-weight: 600; }
.tp-crumb a::before { content: "\2190  "; }
.tp-title { display: flex; align-items: center; gap: 1rem; }
main.ici-main.tp .tp-title h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
.tp-num { flex: none; display: inline-grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%; background: var(--tc); color: #FFFFFF;
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.tp-hero .lead { margin-top: 1rem; max-width: 42rem; }
.tp-explain { color: var(--body); max-width: 42rem; }
.tp-work { background: var(--paper); }
.tp-where { margin-bottom: 2rem; }
.tp-where .rd-h2 { margin-top: 0; }
.tp-work .tool-workspace { border-radius: 16px; }
.tp-about { background: var(--surface); border-top: 1px solid var(--rule); }
.tp-about-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(2rem, 5vw, 4rem); }
.tp-related ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.tp-related li a { display: block; padding: 0.85rem 1rem; border: 1px solid var(--rule); border-radius: 12px; font-weight: 600; text-decoration: none; color: var(--ink); background: var(--paper); }
.tp-related li a::after { content: " \2192"; color: var(--action); }
.tp-related li a:hover, .tp-related li a:focus-visible { border-color: var(--action); }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .th-utils { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .th-hero-grid, .th-ch, .th-ch.th-flip, .th-record, .tp-about-grid, .tp-hero-grid:has(.tp-photo) { grid-template-columns: minmax(0, 1fr); }
  .th-ch.th-flip .th-ch-art { order: 0; }
  .th-ch-art { aspect-ratio: 16 / 10; }
  .th-ch-art .th-art { width: 46%; }
  .th-hero-steps li:nth-child(even) { margin-left: 0; }
  .th-record-art { max-width: 14rem; }
  .th-rec-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .th-utils { grid-template-columns: minmax(0, 1fr); }
  .th-hero-steps a { font-size: 0.95rem; }
  .tp-num { width: 3rem; height: 3rem; font-size: 1.05rem; }
}
@media print {
  .th-hero-art, .th-ch-art, .th-record-art { display: none; }
}

/* Contractor sheet safety note (founder ruling, 26 September 2026): fixed, sourced, shown only when triggered.
   It must read as distinct from the sheet's ordinary sections, on screen and on paper. */
.prep-page .prep-safety { margin: 1rem 0 1.25rem; padding: 0.9rem 1rem; border: 1px solid var(--ember, #c2410c); border-left-width: 5px; border-radius: 6px; background: var(--ember-soft, #fff7ed); }
.prep-page .prep-safety h4 { margin-top: 0; color: var(--ember-ink, #9a3412); }
.prep-page .prep-safety p { margin: 0.35rem 0 0; }
.prep-page .prep-safety .prep-safety-src { font-size: 0.875rem; }
@media print { .prep-page .prep-safety { border: 2px solid #000; background: none; } .prep-page .prep-safety h4 { color: #000; } }

/* Compact directory (founder ruling, 26 September 2026): choose the tool, open the tool page.
   Each group is a card: a small drawing, its kicker, a title, one sentence, one button. */
.th-dir { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .th-dir { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .th-dir { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.th-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px 18px; scroll-margin-top: 5rem; }
.th-card-art { height: 56px; margin-bottom: 10px; }
.th-card-art .th-art { height: 56px; width: auto; display: block; }
.th-card .th-kicker { margin: 0 0 4px; }
.th-card h3 { font-family: var(--font-display); color: var(--ink); font-size: 1.15rem; line-height: 1.25; margin: 0 0 6px; }
.th-card .th-what { margin: 0 0 14px; color: var(--body); line-height: 1.5; }
.th-card-cta { margin: auto 0 0; }
/* the Building Record is one destination: its drawing shrinks to the same restrained size */
.th .th-record-art svg { max-height: 88px; width: auto; }
.th-card .th-kicker { font-size: 0.78rem; letter-spacing: 0.06em; }
.th .th-record-art { max-width: 150px; }
@media (max-width: 639px) {
  .th-card { padding: 16px 18px 14px; }
  .th-card-art, .th-card-art .th-art { height: 44px; }
  /* supporting tools: icon beside the name rather than above it */
  .th-util a { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: start; }
  .th-util a .th-ico { grid-row: span 2; margin: 2px 0 0; }
  .th .th-record-art { display: none; }
}

/* ===== Visual pass (founder review, 26 September 2026): a polished suite of public tools, not a sitemap. ===== */
/* hero: a soft tinted band, copy beside a quiet mosaic of the six tools (decorative; not links) */
.th .th-hero { background: linear-gradient(180deg, var(--wash) 0%, var(--surface) 100%); }
.th-hero-mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 460px; justify-self: end; width: 100%; }
.th-tile { aspect-ratio: 1; border-radius: 18px; background: var(--tw); display: grid; place-items: center; border: 1px solid rgba(10, 42, 66, 0.06); }
.th-tile .th-art { width: 78%; height: auto; }
@media (max-width: 899px) { .th-hero-grid { grid-template-columns: minmax(0, 1fr); } .th-hero-mosaic { justify-self: start; max-width: 360px; gap: 10px; } }

/* primary tools: substantial cards with a tinted art panel and a group accent */
.th-dir { gap: 24px; }
.th .th-card { padding: 0; overflow: hidden; border: 1px solid var(--rule); border-top: 4px solid var(--tc); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(10, 42, 66, 0.05); transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.th .th-card > :not(.th-card-art) { padding-inline: 26px; }
.th .th-card > :last-child { padding-bottom: 24px; }
.th .th-card-art { height: 150px; margin: 0 0 20px; background: var(--tw); display: grid; place-items: center; }
.th .th-card-art .th-art { height: 118px; width: auto; }
.th .th-card h3 { font-size: 1.35rem; margin: 2px 0 8px; }
.th .th-card .th-what { font-size: 1rem; }
.th .th-card .th-kicker { color: var(--tc); }
.th .th-card-cta .btn { border-color: var(--tc); color: var(--tc); }
.th .th-card-cta .btn:hover, .th .th-card-cta .btn:focus-visible { background: var(--tc); color: #fff; }
.th .th-card:hover, .th .th-card:focus-within { box-shadow: var(--lift); border-color: var(--tc); }
@media (prefers-reduced-motion: no-preference) { .th .th-card:hover, .th .th-card:focus-within { transform: translateY(-3px); } }

/* supporting tools: clearly secondary — a tinted band of white cards, icon in a tinted circle */
.th .th-utils-band { background: var(--wash); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.th .th-utils { gap: 16px; }
@media (min-width: 1100px) { .th .th-utils { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.th .th-util a { background: var(--surface); border-radius: 14px; transition: box-shadow 0.18s ease, border-color 0.18s ease; }
.th .th-util .th-ico { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--tint-teal); box-sizing: border-box; }

/* the Building Record: a full-width feature band, its drawing at a considered size */
.th .th-record-art { max-width: 220px; }
@media (max-width: 639px) {
  .th .th-card-art { height: 116px; } .th .th-card-art .th-art { height: 90px; }
  .th .th-card > :not(.th-card-art) { padding-inline: 20px; }
  .th .th-record-art { display: grid; max-width: 120px; }
}
@media (max-width: 639px) { .th-hero-mosaic { display: none; } }

/* ===== Supporting tools (founder visual ruling, 27 September 2026): each tool its own drawing, same line language,
   clearly secondary to the six primary cards. ===== */
.th-c7 { --tc: #A34700; --tw: #FEF1E4; }
.th-c8 { --tc: #1A5E46; --tw: #E7F2EC; }
.th .th-utils { gap: 18px; }
.th .th-util a { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 16px; row-gap: 4px;
  align-items: start; padding: 18px 18px 18px 16px; border: 1px solid var(--rule); border-left: 3px solid var(--tc); border-radius: 14px;
  background: var(--surface); box-shadow: 0 1px 2px rgba(10, 42, 66, 0.05); text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease; }
.th .th-util-art { grid-row: 1 / span 2; width: 72px; height: 72px; border-radius: 12px; background: var(--tw); display: grid; place-items: center; }
.th .th-util-art .th-art { width: 52px; height: 52px; }
.th .th-util-name { color: var(--ink); font-size: 1.02rem; line-height: 1.25; margin-top: 2px; }
.th .th-util-what { color: var(--body); font-size: 0.92rem; line-height: 1.45; }
.th .th-util a:hover, .th .th-util a:focus-visible { border-color: var(--tc); box-shadow: 0 10px 24px rgba(10, 42, 66, 0.12); background: linear-gradient(0deg, var(--surface), var(--surface)), var(--tw); }
.th .th-util a:hover .th-util-name, .th .th-util a:focus-visible .th-util-name { color: var(--tc); }
.th .th-util a:focus-visible { outline: 3px solid var(--tc); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) { .th .th-util a:hover, .th .th-util a:focus-visible { transform: translateY(-2px); } }
@media (min-width: 1100px) { .th .th-utils { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 1099px) { .th .th-utils { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .th .th-util a { grid-template-columns: 60px minmax(0, 1fr); padding: 14px; } .th .th-util-art { width: 60px; height: 60px; } .th .th-util-art .th-art { width: 44px; height: 44px; } }
/* four across: drawing above the name, so the description uses the card's full width */
@media (min-width: 1100px) {
  .th .th-util a { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; row-gap: 8px; padding: 18px 20px 20px; }
  .th .th-util-art { grid-row: auto; width: 64px; height: 64px; margin-bottom: 4px; }
  .th .th-util-art .th-art { width: 48px; height: 48px; }
}
@media (min-width: 1100px) { .th .th-util-art { width: 76px; height: 76px; border-radius: 14px; } .th .th-util-art .th-art { width: 60px; height: 60px; } }
