/* tw-tools.css - the 11B diagnostic checklists under /tools/. Added 18 October 2026.

   Source: PageMakingInstruction/templates/tools/tw-tools.css. build_tool.py
   copies it to dist/css/ on every build, so edit the source, not the copy.

   Loaded after renergy-shared.css, tw-faq.css and tw-content.css, and uses
   tw-content.css's tokens (--tw-accent, --tw-line and the rest), so the tool
   reads as part of the article pages: MatterSQ, the dark-green hero, the mint
   answer block, white cards with the house border and the green hover.
   Everything is scoped under .tw-check or .tw-hub-list. */

.tw-check {
  --tw-mint: #eef8f2;
  --tw-mint-strong: #e3f4ea;
  --tw-now: #a12a2a;
  --tw-now-bg: #fdeeee;
  margin: 0 0 1.5em;
}

/* ---------- the symptom list ---------- */

.tw-check .tw-pick-lead { color: var(--tw-ink-soft); }
.tw-check .tw-kind-note {
  margin: 0 0 1.4em;
  padding: .8rem 1rem;
  border-radius: var(--tw-radius);
  background: var(--tw-bg-soft);
  font-size: .98rem;
}
.tw-check h3.tw-group-label { margin: 1.6em 0 .7em; font-size: 1.05rem; }

/* renergy-shared.css gives every li .5rem of left padding and tw-content.css
   gives every list 1.3em, so both are cleared here or the cards sit indented. */
.tw-check .tw-symptoms { display: grid; gap: .7rem; margin: 0 0 1.6em; padding: 0; list-style: none; }
.tw-check .tw-symptoms li { margin: 0; padding: 0; }

/* The card is one <a>, so it has to beat `.tw-article a` or the whole tile
   comes out green and underlined (same fix as .series-toc-card). */
.tw-article .tw-symptom,
.tw-symptom {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  gap: .9rem;
  align-items: center;
  padding: .95rem 1.1rem;
  border: 1px solid var(--tw-line);
  border-radius: var(--tw-radius);
  background: #fff;
  color: var(--tw-ink);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tw-symptom:hover,
.tw-symptom:focus-visible {
  border-color: var(--tw-accent);
  box-shadow: 0 1px 10px rgba(20, 102, 61, .10);
}
.tw-symptom:focus-visible { outline: 2px solid var(--tw-accent); outline-offset: 2px; }
.tw-symptom-n {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--tw-mint);
  color: var(--tw-accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tw-symptom-body { min-width: 0; }
.tw-symptom-see { display: block; font-weight: 600; line-height: 1.35; }
.tw-symptom-body .tw-urgency { margin-top: .4rem; }
.tw-symptom-go { color: var(--tw-accent); font-size: 1.25rem; font-weight: 700; line-height: 1; }
.tw-symptom:hover .tw-symptom-go { transform: translateX(2px); }

/* Urgency chips. Red only for "now" and "today", amber within a day or a
   trip, green for this week. Text colours hold 4.5:1 or better on their fills. */
.tw-urgency {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.35;
}
.tw-urgency--now { background: var(--tw-now-bg, #fdeeee); color: var(--tw-now, #a12a2a); }
.tw-urgency--soon { background: var(--tw-warn-bg); color: var(--tw-warn); }
.tw-urgency--week { background: var(--tw-mint, #eef8f2); color: var(--tw-accent); }

/* ---------- the question panel ---------- */

.tw-check .tw-run[hidden],
.tw-check .tw-pick[hidden] { display: none; }
.tw-check .tw-run {
  scroll-margin-top: 5.5rem;
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid var(--tw-line);
  border-radius: var(--tw-radius);
  background: #fff;
  box-shadow: 0 2px 18px rgba(0, 26, 13, .06);
}
.tw-run-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.tw-check .tw-back {
  padding: .35rem 0;
  border: 0;
  background: none;
  color: var(--tw-accent);
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
}
.tw-check .tw-back:hover { text-decoration: underline; text-underline-offset: 2px; }
.tw-run-count {
  color: var(--tw-ink-faint);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tw-check .tw-run-sym {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  margin: .7rem 0 0;
  color: var(--tw-ink-soft);
  font-size: .95rem;
}
.tw-run-sym-n {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--tw-mint);
  color: var(--tw-accent);
  font-size: .8rem;
  font-weight: 700;
}
.tw-progress { height: 6px; margin: 1rem 0 0; overflow: hidden; border-radius: 999px; background: #e3ece7; }
.tw-progress span { display: block; height: 100%; border-radius: inherit; background: var(--tw-accent-bright); transition: width .25s ease; }

.tw-check .tw-q {
  margin: 1.3rem 0 1.4rem;
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.35;
  outline: none;
}

/* Yes and No look the same on purpose: the styling must not nudge anyone
   towards a diagnosis. Not sure is quieter but just as easy to hit. */
.tw-answers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.tw-check .tw-a {
  min-height: 3.3rem;
  padding: .8rem .6rem;
  border: 1.5px solid var(--tw-line);
  border-radius: .5rem;
  background: #fff;
  color: var(--tw-ink);
  font: inherit;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.tw-check .tw-a:hover { border-color: var(--tw-accent); background: #f6fbf8; }
.tw-check .tw-a:active { background: var(--tw-mint-strong); }
.tw-check .tw-a:focus-visible { outline: 2px solid var(--tw-accent); outline-offset: 2px; }
.tw-check .tw-a[aria-pressed="true"] { border-color: var(--tw-accent); box-shadow: inset 0 0 0 1px var(--tw-accent); }
.tw-check .tw-a--unsure { color: var(--tw-ink-soft); font-weight: 600; }
.tw-check .tw-step-note { margin: 1rem 0 0; color: var(--tw-ink-faint); font-size: .85rem; }

/* ---------- the result: the highlight quote ---------- */

.tw-check .tw-result-title { margin: 1.3rem 0 .9rem; font-size: clamp(1.2rem, 2.4vw, 1.4rem); font-weight: 600; outline: none; }
.tw-check .tw-result-text { margin: 0 0 1.2rem; }

.tw-article .tw-quote,
.tw-quote {
  position: relative;
  display: block;
  margin: 0 0 1rem;
  padding: 1.15rem 1.3rem 1.1rem 3.1rem;
  border-left: 4px solid var(--tw-accent-bright);
  border-radius: 0 var(--tw-radius) var(--tw-radius) 0;
  background: #f2fbf6;
  color: var(--tw-ink);
  text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease;
}
.tw-quote::before {
  content: "\201C";
  position: absolute;
  top: .55rem;
  left: .85rem;
  color: var(--tw-accent-bright);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}
.tw-quote:hover { background: #e8f7ee; box-shadow: 0 1px 10px rgba(20, 102, 61, .10); }
.tw-quote:focus-visible { outline: 2px solid var(--tw-accent); outline-offset: 2px; }
.tw-quote-where {
  display: block;
  color: var(--tw-accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tw-quote-reason { display: block; margin: .3rem 0 .45rem; font-size: 1.22rem; font-weight: 600; line-height: 1.35; }
.tw-quote-section { display: block; color: var(--tw-ink-soft); font-size: .95rem; line-height: 1.45; }
.tw-quote-go { display: inline-block; margin-top: .7rem; color: var(--tw-accent); font-weight: 700; }
.tw-quote:hover .tw-quote-go { text-decoration: underline; text-underline-offset: 2px; }
.tw-quote:hover .tw-arrow { padding-left: 2px; }

.tw-quote--small { padding: .85rem 1.1rem .85rem 2.6rem; }
.tw-quote--small::before { top: .4rem; left: .65rem; font-size: 2.3rem; }
.tw-quote--small .tw-quote-reason { font-size: 1.05rem; }
.tw-quote--small .tw-quote-section { font-size: .88rem; }
.tw-quote--small .tw-quote-go { margin-top: .45rem; font-size: .92rem; }

.tw-check .tw-next { margin: 0 0 1.2rem; }
.tw-check .tw-urgent-line { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1rem; }
.tw-check .tw-more { margin: 0 0 1rem; }
.tw-check .tw-group { margin: 1.6rem 0 1.2rem; }
.tw-check h4.tw-group-title {
  margin: 0 0 .7rem;
  color: var(--tw-ink-soft);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* The answer ladder (18 Oct 2026): the answers that led to the result, under
   the symptom line, in small grey type. Indented to line up with the symptom
   text, past its number badge. */
.tw-check .tw-ladder {
  display: flex;
  flex-wrap: wrap;
  margin: .45rem 0 0 2.05rem;
  padding: 0;
  list-style: none;
  color: var(--tw-ink-faint);
  font-size: .85rem;
  line-height: 1.55;
}
.tw-check .tw-ladder li { margin: 0; padding: 0; }
.tw-check .tw-ladder li + li::before { content: "\2192"; margin: 0 .45rem; color: #a9b5ae; }
.tw-ladder-answer { font-weight: 700; }
.tw-ladder-step--yes .tw-ladder-answer { color: var(--tw-accent); }

/* In short (18 Oct 2026): the bottom line of every result. The big one closes
   the card in the site's dark green, so "call today" cannot be missed; the
   small one sits under each smaller quote. */
.tw-check .tw-short {
  margin: 1.1rem 0 0;
  padding: 1rem 1.2rem 1.05rem;
  border-radius: var(--tw-radius);
  background: var(--tw-dark);
  color: #fff;
}
.tw-check .tw-short-label {
  display: block;
  margin-bottom: .3rem;
  color: var(--tw-accent-bright);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.tw-check .tw-short-text { margin: 0; color: #fff; font-size: 1.1rem; font-weight: 600; line-height: 1.45; }
.tw-check .tw-short.tw-short--small {
  margin: -.35rem 0 1.15rem;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--tw-ink);
  font-size: .95rem;
  line-height: 1.5;
}
.tw-check .tw-short--small strong { color: var(--tw-accent); }

.tw-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--tw-line); }
.tw-check .tw-btn { font: inherit; font-weight: 700; cursor: pointer; }
.tw-check .tw-btn--ghost {
  padding: .75rem 1.2rem;
  border: 1.5px solid var(--tw-accent);
  border-radius: var(--tw-radius);
  background: #fff;
  color: var(--tw-accent);
}
.tw-check .tw-btn--ghost:hover { background: var(--tw-mint); }
.tw-check .tw-btn--text { padding: .75rem 0; border: 0; background: none; color: var(--tw-ink-soft); }
.tw-check .tw-btn--text:hover { color: var(--tw-accent); text-decoration: underline; text-underline-offset: 2px; }
.tw-check .tw-btn:focus-visible { outline: 2px solid var(--tw-accent); outline-offset: 2px; }

@media screen and (max-width: 520px) {
  .tw-article .tw-symptom, .tw-symptom { grid-template-columns: 2rem 1fr; gap: .75rem; padding: .85rem .9rem; }
  .tw-symptom-n { width: 2rem; height: 2rem; font-size: .9rem; }
  .tw-symptom-go { display: none; }
  .tw-answers { gap: .5rem; }
  .tw-check .tw-a { font-size: 1rem; padding: .75rem .3rem; }
  .tw-article .tw-quote, .tw-quote { padding-left: 2.6rem; }
  .tw-check .tw-ladder { margin-left: 0; }
  .tw-check .tw-short-text { font-size: 1.02rem; }
  .tw-quote::before { left: .6rem; font-size: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tw-symptom, .tw-quote, .tw-progress span, .tw-check .tw-a { transition: none; }
}

/* ---------- the /tools/ hub: one card per checklist ---------- */

/* margin auto, like every other block in .tw-article: a plain 0 here pinned
   the grid to the left of the page container instead of under the heading. */
.tw-article .tw-hub-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: .9rem; margin: 0 auto 2em; padding: 0; list-style: none; }
.tw-article .tw-hub-list li { margin: 0; padding: 0; }
.tw-article .tw-hub-card,
.tw-hub-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--tw-line);
  border-radius: var(--tw-radius);
  background: #fff;
  color: var(--tw-ink);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tw-hub-card:hover, .tw-hub-card:focus-visible { border-color: var(--tw-accent); box-shadow: 0 1px 10px rgba(20, 102, 61, .10); }
.tw-hub-card:focus-visible { outline: 2px solid var(--tw-accent); outline-offset: 2px; }
.tw-hub-card h3 { margin: 0 0 .4rem; color: var(--tw-accent); font-size: 1.12rem; }
.tw-hub-card p { margin: 0 0 .8rem; color: var(--tw-ink-soft); font-size: .95rem; line-height: 1.5; }
.tw-hub-card .tw-hub-meta { margin-top: auto; color: var(--tw-ink-faint); font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.tw-hub-card:hover h3 { text-decoration: underline; text-underline-offset: 2px; }
