/* Home page only: hero, fact strip, the problems list, chapters, tiles, price lines */
.hero h1 { max-width: 15em; }
.hero-body { max-width: 640px; margin: var(--s3) auto 0; color: var(--text2); }

/* Fact strip: three facts in one row, one column on a phone */
.facts-s { padding-top: var(--s7); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); padding: var(--s5) 0; border-block: 1px solid var(--line); list-style: none; }
.facts li { color: var(--text2); }

/* The problems: text only, each line a link to its chapter */
.pains { max-width: var(--measure); margin-top: var(--s5); border-bottom: 1px solid var(--line); list-style: none; }
.pains li { border-top: 1px solid var(--line); }
.pains a { display: block; padding: 14px 0; color: var(--text); font-size: 17px; line-height: 24px; text-decoration: none; }
.pains a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pains a:focus-visible { outline-offset: 2px; }

/* A chapter: pain line, answer, how, stage, Also */
.sec-head .label { font-weight: 500; }
.sec-head + .stagetabs { margin-top: var(--s6); }
.also { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: var(--s5); padding: 0; list-style: none; font-size: 14px; line-height: 22px; }
.also-l { color: var(--text2); }
.also a { font-weight: 500; }
.import-note { max-width: var(--measure); margin-top: var(--s5); color: var(--text2); font-size: 14px; line-height: 22px; }
.import-note + .links { margin-top: var(--s4); }

/* Files: the demo with three text facts beside it (under it on a phone) */
.yours { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); margin-top: var(--s6); }
.yours-facts { display: grid; gap: var(--s3); padding: 0; list-style: none; color: var(--text2); }
/* Beside the demo only where the demo keeps the wide layout (its box at least 880 px); under it otherwise. */
@media (min-width: 1200px) {
  .yours { grid-template-columns: minmax(0, 1fr) 200px; align-items: start; gap: var(--s5); }
}

/* Everything else: eight quiet tiles. The name is the link; its box covers the tile. */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s6); padding: 0; list-style: none; }
.tile { position: relative; display: flex; flex-direction: column; gap: 8px; padding: var(--s5); background: var(--win); border: 1px solid var(--line); border-radius: var(--wr); }
.tile h3 { font-size: 17px; line-height: 24px; }
.tile h3 a { color: var(--text); text-decoration: none; }
.tile h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--wr); }
.tile:hover { background: var(--hover); }
.tile:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile h3 a:focus-visible { outline: 0; }
.tile p { color: var(--text2); }
.tile .caption { margin-top: auto; padding-top: 4px; }
#all .links { margin-top: var(--s6); }

/* Price band */
.price-lines { margin-top: var(--s5); padding: 0; list-style: none; display: grid; gap: 4px; }
#price .links { margin-top: var(--s5); }

@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .facts { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .facts-s { padding-top: var(--s6); }
  .pains a { padding: 12px 0; min-height: 44px; }
}
@media (max-width: 560px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
