/* The toolkit hub: a short hero, "What's in the way?" (problems that lead to a tool), a plain index
   of all 16 tools in three groups, and a one-line Loop to song teaser. Tokens from /assets/toolkit.css.
   Calm on purpose: no orange here except the logo; type sizes H1 · H2 · 22 · 17 · 14. */

.h-hd { margin: 0; font-weight: 700; letter-spacing: -0.045em; line-height: 0.92; color: var(--p-head); text-wrap: balance; }
.h-h2 { margin: 0; font-size: clamp(32px, 4.6vw, 56px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--p-head); }
.h-h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--p-sage); }

/* hero */
.h-hero { padding-top: 56px; padding-bottom: 8px; }
.h-hero h1 { font-size: clamp(48px, 8.4vw, 120px); }
.h-lede { margin: 22px 0 0; max-width: 30em; font-size: 22px; line-height: 1.4; color: var(--p-text); }
@media (max-width: 640px) { .h-hero { padding-top: 32px; } .h-lede { margin-top: 16px; font-size: 19px; } }

/* sections */
.h-sec { padding-top: 72px; }
.h-sec > .h-h2 { padding-bottom: 18px; border-bottom: 1px solid var(--p-border, #6D736E); }
@media (max-width: 640px) { .h-sec { padding-top: 48px; } .h-sec > .h-h2 { padding-bottom: 14px; } }

/* what's in the way: one row per problem, the tool on the right */
.h-probs { list-style: none; margin: 0; padding: 0; }
.h-probs li { border-bottom: 1px solid var(--p-line-2); }
.h-probs a { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 32px; min-height: 44px; padding: 18px 0; text-decoration: none; }
.h-probs .q { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; color: var(--p-text); }
.h-probs .t { flex: none; font-size: 14px; font-weight: 600; color: var(--p-muted); white-space: nowrap; }
.h-probs a:hover .q { color: var(--p-sage); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.h-probs a:hover .t { color: var(--p-sage); }
@media (max-width: 700px) {
  .h-probs a { flex-direction: column; align-items: flex-start; padding: 14px 0; }
  .h-probs .q { font-size: 19px; }
}

/* all tools: three plain groups */
.h-note { margin: 18px 0 0; font-size: 14px; line-height: 1.5; color: var(--p-muted); }
.h-note a { color: var(--p-sage); font-weight: 600; text-underline-offset: 3px; }
.h-note a:hover { color: var(--p-text); }
.h-group { margin-top: 40px; }
.h-group h3 { margin: 0 0 4px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--p-sage); }
.h-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 48px; }
@media (min-width: 900px) { .h-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.h-list li { border-bottom: 1px solid var(--p-line); }
.h-list a { display: flex; flex-direction: column; gap: 2px; min-height: 44px; padding: 14px 0; text-decoration: none; }
.h-list b { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--p-text); }
.h-list span { font-size: 15px; line-height: 1.45; color: var(--p-muted); }
.h-list a:hover b { color: var(--p-sage); text-decoration: underline; text-underline-offset: 4px; }

/* Loop to song, in one line */
.h-app { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: clamp(20px, 3vw, 32px); border-radius: 8px; background: var(--p-panel); box-shadow: inset 0 0 0 1px var(--p-line); }
.h-app p { margin: 6px 0 0; max-width: 34em; font-size: 15px; line-height: 1.5; color: var(--p-muted); }
@media (max-width: 480px) { .h-app .p-btn { flex: 1 1 100%; } }

/* touch targets: the header button and the footer links at least 44 px */
.p-nav .p-btn { min-height: 44px; }
.p-foot nav a { display: inline-flex; align-items: center; min-height: 44px; }
/* very narrow phones, also when the account control can't load: keep the header inside the screen */
@media (max-width: 359px) { .p-brand > svg, .p-brand .p-bar { display: none; } .p-nav .p-btn { padding: 0 12px; } }

/* Rhythm (2026-11-07): the tool list sits on a deeper charcoal and an orange band closes the page,
   so the page no longer reads as one colour. Full-bleed grounds behind the centred sections. */
#tools { margin-top: 72px; padding-bottom: 72px; background: #1F201F; box-shadow: 0 0 0 100vmax #1F201F; clip-path: inset(0 -100vmax); }
.h-close { margin-top: 0; padding-top: 64px; padding-bottom: 64px; background: var(--p-orange); box-shadow: 0 0 0 100vmax var(--p-orange); clip-path: inset(0 -100vmax); }
.h-close .h-app { padding: 0; background: none; box-shadow: none; border: 0; }
.h-close .h-h3 { color: #1F201F; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -0.035em; }
.h-close .h-app p { color: #2A2B2A; }
.h-close .p-btn { background: #1F201F; color: var(--p-head); border-color: #1F201F; box-shadow: none; }
.h-close .p-btn:hover { background: #2A2B2A; }
@media (max-width: 640px) { #tools { margin-top: 48px; padding-bottom: 48px; } .h-close { padding-top: 48px; padding-bottom: 48px; } }
body:has(.h-close) .p-foot { margin-top: 0; }
#problems { padding-bottom: 72px; } @media (max-width: 640px) { #problems { padding-bottom: 48px; } } #tools { margin-top: 0; }

/* The tool index as a compact spec sheet (Codex reviews 33 and 35). Each group: its name, then its tools in a balanced grid
   (4/8/4 tools: 4 columns on wide screens, 2 between 900 and 1179 px, 1 on phones), so no row ends with a lone tool.
   Wider columns than a side label would leave, so the descriptions read easily. No copy changes. */
@media (min-width: 900px) {
  #tools .h-group { margin-top: 0; padding: 26px 0 30px; border-top: 1px solid var(--p-line-2); }
  #tools .h-note + .h-group { margin-top: 32px; }
  #tools .h-group h3 { margin: 0 0 6px; font-size: 20px; }
  #tools .h-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; row-gap: 0; }
  #tools .h-list li { border-bottom: 0; border-top: 1px solid var(--p-line); }
  #tools .h-list a { padding: 12px 0 14px; gap: 4px; }
  #tools .h-list b { font-size: 16px; }
  #tools .h-list span { font-size: 14px; line-height: 1.45; }
}
@media (min-width: 1180px) { #tools .h-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
#tools .h-list a:hover b { color: var(--p-orange); }
