/* Task pages (scripts/build_free_outcome_pages.py, layout='tool'): a tool card on the first screen, then the guide.
   Loaded after site.css on those pages only. Pages load it with ?v=<content hash>: after editing run  node tests/page_css_tags.mjs --fix
   (the generator computes the same hash, so rerun it too). */
.tp-hero{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:44px;align-items:center;padding:40px 44px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(150deg,rgba(45,212,191,.07),transparent 55%),rgba(17,20,18,.82);box-shadow:0 18px 48px #0007}
.tp-hero .crumb{margin-bottom:16px}
.tp-hero h1{font-size:36px;line-height:1.15;margin:0}
.tp-one{font-size:17px;line-height:1.6;color:var(--text2);max-width:560px;margin:16px 0 0}
.tp-hero .hero-cta{margin:26px 0 0}
.tp-shot{margin:0;min-width:0}
.tp-shot img{display:block;width:100%;height:auto;border-radius:14px;border:1px solid var(--line);box-shadow:0 14px 40px #000a}

/* The guide: as wide as the tool card. An intro row (lede beside the short answer), then a sticky "On this page" rail
   beside numbered sections. A list whose items lead with a bold phrase becomes a grid of cards; a section with a room
   picture sets it beside the text. */
.tp-guide{margin:96px 0 0;counter-reset:tp}
.tp-label{font:400 10.5px/1.4 'Space Mono',monospace;text-transform:uppercase;letter-spacing:1.8px;color:var(--teal);margin:0 0 14px}

.tp-intro{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:28px 48px;align-items:start}
.tp-lede .sub{font-size:19px;line-height:1.7;color:#d5ddd9;max-width:none;margin:0;text-shadow:none}
.tp-short{padding:26px 28px;border:1px solid rgba(212,168,75,.38);border-radius:16px;background:linear-gradient(160deg,rgba(212,168,75,.08),transparent 55%),var(--panel);box-shadow:var(--shadow-card)}
.tp-short p{font-size:15px;line-height:1.75;color:var(--text2);margin:0;max-width:none}
.tp-short strong:first-child{margin-right:6px;font:400 10.5px/1.4 'Space Mono',monospace;text-transform:uppercase;letter-spacing:1.8px;color:var(--gold-bright)}

.tp-body{display:grid;grid-template-columns:220px minmax(0,1fr);gap:64px;margin-top:88px;align-items:start}
.tp-rail{position:sticky;top:112px;margin:0;padding:0}
.tp-rail ol{list-style:none;margin:0;padding:0 0 0 14px;border-left:1px solid var(--line);counter-reset:rail;max-width:none}
.tp-rail li{counter-increment:rail}
.tp-rail a{display:flex;gap:10px;padding:7px 0;font-size:13px;line-height:1.4;color:var(--text-secondary);text-decoration:none}
.tp-rail a::before{content:counter(rail,decimal-leading-zero);flex:none;font:400 10.5px/1.9 'Space Mono',monospace;color:#7d8883}
.tp-rail a:hover{color:var(--teal-bright)}
.tp-rail a:hover::before{color:var(--teal)}

.tp-main{min-width:0}
.tp-main>section{margin:0 0 96px;padding:0;border:0;scroll-margin-top:100px}
.tp-main>section:last-child{margin-bottom:0}
.tp-main>section>h2{counter-increment:tp;font-size:26px;line-height:1.25;letter-spacing:-.5px;margin:0 0 18px;max-width:720px}
.tp-main>section.seasonal>h2{counter-increment:none}
.tp-main>section.seasonal>h2::before{content:'Seasonal';text-transform:uppercase}
.tp-main>section>h2::before{content:counter(tp,decimal-leading-zero);display:block;margin-bottom:12px;font:400 11px/1 'Space Mono',monospace;letter-spacing:2px;color:var(--teal)}
.tp-main>section>p{font-size:15.5px;line-height:1.8;color:var(--text2);margin:0 0 16px;max-width:720px}

/* Lists that lead with a bold phrase: cards. */
.tp-main>section>ul.feat{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:26px 0 22px;padding:0;border:0;max-width:none}
.tp-main>section>ul.feat:has(>li:nth-child(3n):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
.tp-main>section>ul.feat:not(:has(>li:nth-child(3n):last-child))>li:last-child:nth-child(odd){grid-column:1/-1}
.tp-main>section>ul.feat>li{position:relative;padding:20px 20px 20px;border:1px solid var(--line);border-radius:14px;background:linear-gradient(180deg,rgba(255,255,255,.025),transparent 40%),var(--panel);font-size:14px;line-height:1.65;color:var(--text2);box-shadow:0 1px 2px #0005}
.tp-main>section>ul.feat>li::before{content:'';position:absolute;top:0;left:20px;width:28px;height:2px;border-radius:0 0 2px 2px;background:var(--teal)}
.tp-main>section>ul.feat>li>strong:first-child{color:#fff;font-weight:600}
/* A tick list where any item has no bold lead (task_layout.cardify marks it tp-ticks) stays a compact list, not headerless cards. */
.tp-main>section>ul.feat.tp-ticks{display:block;max-width:720px}
.tp-main>section>ul.feat.tp-ticks>li{padding:7px 0 7px 26px;border:0;border-radius:0;background:none;box-shadow:none;font-size:15px;color:var(--text2)}
.tp-main>section>ul.feat.tp-ticks>li::before{content:"\2713";top:7px;left:2px;width:auto;height:auto;border-radius:0;background:none;color:var(--teal);font-weight:600}
.tp-main>section>:is(ul,ol,div,table,figure)+p{margin-top:20px}
.tp-main>section>ul.feat.tp-cards>li.pro{border-color:rgba(212,168,75,.55);background:linear-gradient(150deg,rgba(212,168,75,.08),transparent 60%),var(--panel)}
.tp-main>section>ul.feat.tp-cards>li.pro::before{background:var(--gold)}
.tp-main>section>ul.feat.tp-cards>li.pro>strong:first-child{color:var(--gold-bright)}
.tp-main>section>ul.feat.tp-cards>li.free>strong:first-child{color:var(--teal-bright)}
.tp-main>section>ul.feat.tp-cards>li.credit::before{background:#7c8a84}
.tp-main>section>ul.feat.tp-cards>li{font-size:14.5px;padding:24px}

/* A section with a room picture: text on the left, the picture on the right. */
.tp-main>section.tp-has-fig{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:40px;align-items:start}
.tp-main>section.tp-has-fig>*{grid-column:1/-1}
.tp-main>section.tp-has-fig>h2{grid-column:1;grid-row:1}
.tp-main>section.tp-has-fig>figure+p{grid-column:1;grid-row:2}
.tp-main>section.tp-has-fig>.tp-fig{grid-column:2;grid-row:1/span 2;margin:0 0 8px}
.tp-fig img{display:block;width:100%;height:auto;border-radius:14px;border:1px solid var(--line);box-shadow:0 18px 44px #000b}

/* Steps: a numbered strip, across on wide screens, down the page on phones. */
.tp-main .how-to ol{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:30px 20px;margin-top:30px;padding:28px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(160deg,rgba(45,212,191,.05),transparent 50%),rgba(17,17,17,.6);max-width:none}
.tp-main .how-to ol:has(>:nth-child(5):last-child){grid-template-columns:repeat(5,minmax(0,1fr))}
.tp-main .how-to ol:is(:has(>:nth-child(7):last-child),:has(>:nth-child(8):last-child)){grid-template-columns:repeat(4,minmax(0,1fr))}
.tp-main .how-to ol:has(>:nth-child(6):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
@media(min-width:1101px){.tp-main .how-to ol:is(:has(>:nth-child(7):last-child),:has(>:nth-child(8):last-child))>.step:nth-child(4)::after,.tp-main .how-to ol:has(>:nth-child(6):last-child)>.step:nth-child(3)::after{content:none}}
.tp-main .step{position:relative;background:none;border:0;border-radius:0;padding:0;scroll-margin-top:100px}
.tp-main .step b{display:flex;align-items:center;justify-content:center;width:38px;height:38px;margin:0 0 14px;border:1px solid rgba(45,212,191,.6);border-radius:50%;background:rgba(45,212,191,.12);font:400 14px/1 'Space Mono',monospace;letter-spacing:0;color:var(--teal-bright);box-shadow:0 0 0 4px rgba(45,212,191,.05)}
.tp-main .step b::before{content:none}
.tp-main .step::after{content:'';position:absolute;top:19px;left:48px;right:-10px;height:1px;background:linear-gradient(90deg,rgba(45,212,191,.45),rgba(45,212,191,.08))}
.tp-main .step:last-child::after{content:none}
.tp-main .step h3{font-size:15px;line-height:1.35;margin:0 0 6px}
.tp-main .step p{font-size:13.5px;line-height:1.6}

/* FAQ and related tools sit in panels. */
.tp-main>section>details{padding:0 22px;border:1px solid var(--line);border-radius:12px;background:var(--panel);margin:0 0 10px}
.tp-main>section>details[open]{border-color:rgba(45,212,191,.35)}

.tp-intro-solo{grid-template-columns:minmax(0,1fr)}
.tp-intro-solo .tp-lede{max-width:860px}
.tp-lede .sub+.sub{margin-top:16px}
/* On a tool page the short answer sits up in the hero at body size, so the guide's opening paragraph is body text too, not a big lede. */
.tp-guide-tool .tp-lede .sub{font-size:15.5px;line-height:1.75;color:var(--text2)}
.tp-lede p:not(.sub):not(.tp-label){font-size:15.5px;line-height:1.75;color:var(--text2);margin:16px 0 0;max-width:none}
/* Plain lists, numbered lists, subheadings and tables inside the guide. */
.tp-main>section>ul:not(.feat),.tp-main>section>ol:not(:has(>.step)){max-width:720px;margin:0 0 18px;padding-left:22px;color:var(--text2);font-size:15px;line-height:1.75}
.tp-main>section>ul:not(.feat) li,.tp-main>section>ol:not(:has(>.step)) li{margin:0 0 8px}
.tp-main>section>ol:not(:has(>.step)) li::marker{color:var(--teal)}
.tp-main>section>h3{font-size:17px;margin:28px 0 10px;max-width:720px}
.tp-main>section table{margin:22px 0}
.tp-end{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px 32px;margin-top:96px;padding:32px 36px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(150deg,rgba(45,212,191,.08),transparent 55%),rgba(17,20,18,.82)}
.tp-end .hero-cta{margin:0}
.tp-end-notes{flex:1 1 100%;padding-top:16px;border-top:1px solid var(--line)}
.tp-end-notes p{margin:0;font-size:13px;line-height:1.6;color:var(--text-secondary);max-width:none}
.tp-end-plain{display:block;padding:0;border:0;background:none}
.tp-end-plain .tp-end-notes{padding-top:12px;border:0}
.tp-end .updated{margin:0;max-width:520px}

@media(max-width:1100px){
  .tp-body{grid-template-columns:minmax(0,1fr);gap:0;margin-top:56px}
  .tp-rail{position:static;margin-bottom:64px}
  .tp-rail ol{display:flex;flex-wrap:wrap;gap:8px;padding:0;border:0}
  .tp-rail a{display:inline-flex;align-items:center;min-height:44px;padding:10px 14px;border:1px solid var(--line);border-radius:12px;font-size:13.5px;color:var(--text2);background:rgba(255,255,255,.02)}
  .tp-main .how-to ol:is(:has(>:nth-child(5):last-child),:has(>:nth-child(6):last-child),:has(>:nth-child(7):last-child),:has(>:nth-child(8):last-child)){grid-template-columns:repeat(3,minmax(0,1fr))}
  .tp-main .how-to .step:nth-child(3n)::after{content:none}
}
@media(max-width:900px){
  .tp-hero{grid-template-columns:minmax(0,1fr);gap:28px;padding:32px}
  .tp-shot{width:100%;max-width:560px}
  .tp-intro{grid-template-columns:minmax(0,1fr)}
  .tp-main>section.tp-has-fig{display:block}
  .tp-main>section.tp-has-fig>.tp-fig{margin:0 auto 22px;max-width:560px}
  .tp-main .how-to ol:is(:has(>:nth-child(5):last-child),:has(>:nth-child(6):last-child),:has(>:nth-child(7):last-child),:has(>:nth-child(8):last-child)){grid-template-columns:repeat(2,minmax(0,1fr))}
  .tp-main .how-to .step:nth-child(3n)::after{content:''}
  .tp-main .how-to .step:nth-child(2n)::after,.tp-main .how-to .step:last-child::after{content:none}
}
@media(max-width:760px){
  main:has(>.tp-hero){padding-top:84px}
  .tp-hero{gap:22px;padding:22px 18px 18px;border-radius:16px}
  .tp-hero .crumb{display:none}
  .tp-hero h1{font-size:28px}
  .tp-one{font-size:16px;margin-top:12px}
  .tp-hero .hero-cta{margin-top:20px}
  .tp-guide{margin-top:64px}
  .tp-lede .sub{font-size:17px}
  .tp-short{padding:20px}
  .tp-rail{margin-bottom:56px}
  .tp-rail ol{display:block;border-top:1px solid var(--line)}
  .tp-rail a{display:flex;min-height:44px;padding:11px 2px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;font-size:14px}
  .tp-main>section{margin-bottom:72px}
  .tp-main>section>h2{font-size:23px}
  .tp-main>section>ul.feat,.tp-main>section>ul.feat:has(>li:nth-child(3n):last-child){grid-template-columns:minmax(0,1fr)}
  .tp-main .how-to ol,.tp-main .how-to ol:is(:has(>:nth-child(5):last-child),:has(>:nth-child(6):last-child),:has(>:nth-child(7):last-child),:has(>:nth-child(8):last-child)){grid-template-columns:minmax(0,1fr);gap:0;padding:22px 18px 4px}
  .tp-main .step{padding:0 0 22px 52px}
  .tp-main .step b{position:absolute;left:0;top:-6px;margin:0}
  .tp-main .how-to .step::after,.tp-main .how-to .step:nth-child(n)::after{content:'';top:36px;bottom:0;left:19px;right:auto;width:1px;height:auto;background:linear-gradient(180deg,rgba(45,212,191,.45),rgba(45,212,191,.08))}
  .tp-main .how-to .step:last-child::after{content:none}
  .tp-main>section>details{padding:0 16px}
  .tp-end{padding:24px 20px;margin-top:72px}
}
@media(max-width:360px){
  .tp-hero{padding:18px 14px 14px}
  .tp-hero h1{font-size:25px}
  .tp-hero .cta{padding-left:18px;padding-right:18px;font-size:15px}
}
