/* The pages that are not guides (11-29): the same dark title band as the guide lists, then each page's own layout.
   Everything is under body.pg, and the site's own colours are used so light and dark keep working. */

/* ---------- the title band ---------- */
body.pg .list-hero,body.pg .ab-hero{background:#241d16;color:#f6efe6;border-bottom:6px solid var(--acc)}
:root[data-theme=dark] body.pg .list-hero,:root[data-theme=dark] body.pg .ab-hero{background:#120f0c}
body.pg .list-hero{padding:30px 0 34px}
body.pg .list-hero h1{color:#f6efe6;font-size:clamp(34px,5vw,56px);letter-spacing:-.028em}
body.pg .list-hero .lead,body.pg .ab-hero .lead,body.pg .list-hero .lead p{color:#e3d8c8}
body.pg .list-hero .crumbs,body.pg .list-hero .crumbs a,body.pg .ab-hero .crumbs,body.pg .ab-hero .crumbs a{color:#cdbfab}
body.pg .list-hero .lead a,body.pg .ab-hero .lead a{color:#ffb27f}
body.pg .list-hero .chip{background:transparent;border-color:#6a5a48;color:#f6efe6}
body.pg .list-hero .chip span,body.pg .list-hero .count{color:#cdbfab}
body.pg .list-hero a.count{color:#ffb27f}
body.pg .list-hero .chip:hover{border-color:var(--acc)}
body.pg .list-hero .chip.on{background:var(--acc);border-color:var(--acc);color:var(--acc-ink)}
body.pg .list-hero .chip.on span{color:inherit}
body.pg .ab-hero .kicker{color:#ff9a5c}
body.pg .ab-hero .btn:not(.btn-acc){background:transparent;border-color:#8a775f;color:#f6efe6}
body.pg .sec-head h2{position:relative;padding-top:14px}
body.pg .sec-head h2::before{content:"";position:absolute;left:0;top:0;width:54px;height:5px;border-radius:5px;background:var(--acc)}
body.pg .ab-center h2::before{left:50%;translate:-50% 0}

/* ---------- About ---------- */
body.pg-about .ab-hero-in{padding-bottom:62px;gap:64px}
body.pg-about .ab-photo{background:#fff;border:0;border-radius:8px;padding:12px 12px 6px;transform:rotate(-2deg);box-shadow:18px 18px 0 var(--acc)}
body.pg-about .ab-photo img{border-radius:3px}
body.pg-about .ab-photo figcaption{color:#5c5248}
body.pg-about .ab-stats{margin-top:0;gap:0;border-bottom:1px solid var(--line);padding-top:30px;padding-bottom:26px}
body.pg-about .ab-stats>div{background:none;border:0;border-radius:0;box-shadow:none;border-left:5px solid var(--acc);padding:2px 18px}
body.pg-about .ab-stats strong{font-size:clamp(34px,5vw,58px);color:var(--fg)}
body.pg-about .ab-time{max-width:none;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px;counter-reset:none}
body.pg-about .ab-time::before{left:0;right:0;top:20px;bottom:auto;width:auto;height:3px;background:var(--line2)}
body.pg-about .ab-time li{flex-direction:column;gap:12px;padding:0}
body.pg-about .ab-time h3{margin:0 0 8px;font-size:18.5px}
body.pg-about .ab-time p{font-size:15px;line-height:1.6}
body.pg-about .ab-dot{border-radius:12px}
body.pg-about .ab-how-grid{counter-reset:how}
body.pg-about .ab-how .ab-box{border:0;border-top:6px solid var(--acc);border-radius:6px 6px 18px 18px;box-shadow:none;padding:24px}
body.pg-about .ab-built-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
body.pg-about .ab-card{flex-direction:column;align-items:stretch;gap:0;padding:0;overflow:hidden;text-align:center}
body.pg-about .ab-card img{width:100%;height:150px;border-radius:0;background:var(--acc-soft);padding:22px;object-fit:contain}
body.pg-about .ab-card>span{padding:16px 16px 18px}
body.pg-about .ab-stack{margin-top:56px;padding-bottom:30px;background:#241d16;color:#f6efe6;border-radius:26px;padding-left:34px;padding-right:34px;max-width:1132px}
body.pg-about .ab-stack .sec-head h2{color:#f6efe6}
body.pg-about .ab-stack .sec-head span{color:#cdbfab}
body.pg-about .ab-stack-grid{gap:0 34px}
body.pg-about .ab-stack .ab-box{background:none;border:0;border-top:1px dashed #6a5a48;border-radius:0;box-shadow:none;padding:18px 0 18px 48px;position:relative;transform:none}
body.pg-about .ab-stack .ab-ico{position:absolute;left:0;top:18px;font-size:26px}
body.pg-about .ab-stack .ab-box p{color:#d8ccbb}
body.pg-about .ab-stack .ab-box a{color:#ffb27f}
body.pg-about .ab-start-in{grid-template-columns:minmax(0,1fr);gap:24px;background:var(--acc-soft);border:0}
body.pg-about .ab-start-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
body.pg-about .ab-start-steps li{display:flex}
body.pg-about .ab-start-steps a{flex:1;flex-direction:column;align-items:flex-start;gap:12px;padding:20px}
body.pg-about .ab-start-steps a:hover{transform:translateY(-3px)}
body.pg-about .ab-start-go{display:none}

/* ---------- Support ---------- */
body.pg-support .sp-grid{counter-reset:none;gap:18px}
body.pg-support .sp-way{border:0;border-radius:20px;background:var(--panel);border-top:86px solid var(--acc-soft);position:relative;padding-top:20px}
body.pg-support .sp-way:nth-child(2){border-top-color:color-mix(in srgb,#d32f2f 18%,var(--panel))}
body.pg-support .sp-way:nth-child(3){border-top-color:color-mix(in srgb,#18bcf2 22%,var(--panel))}
body.pg-support .sp-way:nth-child(4){border-top-color:color-mix(in srgb,#52b54b 22%,var(--panel))}
body.pg-support .sp-way .ab-ico{position:absolute;left:20px;top:-70px;width:54px;height:54px;display:grid;place-items:center;background:var(--panel);border-radius:16px;box-shadow:var(--shadow)}
body.pg-support .cform{border-top:6px solid var(--acc)}
body.pg-support .sp-coffee{box-shadow:14px 14px 0 var(--acc-soft)}
@media (min-width:861px){body.pg-support .sp-side{position:sticky;top:84px}}
body.pg-support .sp-thanks{font:700 22px var(--display);color:var(--fg)}

/* ---------- Custom cards ---------- */
body.pg-custom-home-assistant-cards .cc-ex{background:#31281f;border-color:#4c3f31;color:#f6efe6;transform:rotate(1.2deg);box-shadow:16px 16px 0 var(--acc)}
body.pg-custom-home-assistant-cards .cc-ex-card{background:#fff;border:0;color:#1f2328}
body.pg-custom-home-assistant-cards .ab-hero-in{padding-bottom:58px}
body.pg-custom-home-assistant-cards .cc-offers{grid-template-columns:repeat(2,minmax(0,1fr))}
body.pg-custom-home-assistant-cards .cc-offer{position:relative;padding:24px 24px 22px 96px;border:0;border-left:6px solid var(--acc);border-radius:6px 20px 20px 6px;min-height:140px}
body.pg-custom-home-assistant-cards .cc-offer .ab-ico{position:absolute;left:22px;top:22px;width:54px;height:54px;display:grid;place-items:center;background:var(--acc-soft);border-radius:16px;font-size:28px}
body.pg-custom-home-assistant-cards .ab-how{background:#241d16;border:0;color:#f6efe6}
body.pg-custom-home-assistant-cards .ab-how .sec-head h2{color:#f6efe6}
body.pg-custom-home-assistant-cards .cc-steps{position:relative;gap:22px}
body.pg-custom-home-assistant-cards .cc-steps li{background:none;border:0;box-shadow:none;border-radius:0;padding:0;border-top:3px solid #6a5a48;padding-top:0}
body.pg-custom-home-assistant-cards .cc-steps .ab-dot{margin:-22px 0 14px;box-shadow:0 0 0 6px #241d16;border-radius:12px}
body.pg-custom-home-assistant-cards .cc-steps h3{color:#f6efe6}
body.pg-custom-home-assistant-cards .cc-steps p{color:#d8ccbb}
body.pg-custom-home-assistant-cards .cc-steps a{color:#ffb27f}
body.pg-custom-home-assistant-cards .ab-how .sec-head{margin-bottom:36px}
body.pg-custom-home-assistant-cards .cform{border-top:6px solid var(--acc)}

/* ---------- My kit ---------- */
body.pg-my-home-assistant-kit .kit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
body.pg-my-home-assistant-kit .kit-card{flex-direction:row}
body.pg-my-home-assistant-kit .kit-img{flex:0 0 40%;aspect-ratio:auto;border-bottom:0;border-right:5px solid var(--acc)}
body.pg-my-home-assistant-kit .kit-img img{object-fit:contain;max-height:280px}
body.pg-my-home-assistant-kit .kit-copy{min-width:0}
body.pg-my-home-assistant-kit .kit-copy p{font-size:15px}

/* ---------- Videos ---------- */
body.pg-videos .vids-all{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
body.pg-videos .vcard{gap:0;background:var(--panel);border:1px solid var(--line);border-radius:18px;overflow:hidden;transition:transform .15s,box-shadow .15s}
body.pg-videos .vcard[hidden]{display:none}
body.pg-videos .vcard:hover{transform:translateY(-3px);box-shadow:0 8px 0 -2px var(--acc),var(--shadow)}
body.pg-videos .vcard-img{border-radius:0}
body.pg-videos .vcard strong{padding:12px 14px 2px;font-size:15.5px}
body.pg-videos .vcat{padding:0 14px 14px;color:var(--mut)}

/* ---------- Search and "not found" ---------- */
body.pg-search .list-hero .search,body.pg-notfound .list-hero .search{margin:18px 0 0;text-align:left}
body.pg-notfound .list-hero{padding:48px 0 44px}
body.pg-notfound .list-hero h1::before{content:"404";display:block;font:800 96px/1 var(--display);color:var(--acc);margin-bottom:10px}
body.pg-search .grid .gcard{border-left:6px solid var(--acc)}

/* ---------- Contact and the legal pages: one sheet of paper ---------- */
body.pg .page .page-body .prose{max-width:860px;margin:0 auto;background:var(--panel);border:1px solid var(--line);border-top:6px solid var(--acc);border-radius:6px 6px 22px 22px;padding:30px 42px 24px;box-shadow:var(--shadow)}
body.pg .page .page-body .prose>*{max-width:none}
body.pg .page .list-hero .wrap{max-width:908px}
body.pg .page .prose h2{margin:1.8em 0 .6em;padding-top:20px;border-top:1px solid var(--line);font-size:25px}
body.pg .page .prose>h2:first-child{margin-top:0;padding-top:0;border-top:0}
body.pg .page .prose .cform{box-shadow:none;background:var(--soft)}

@media (max-width:1060px){
  body.pg-about .ab-time{grid-template-columns:minmax(0,1fr);gap:0;max-width:820px}
  body.pg-about .ab-time::before{left:19px;right:auto;top:20px;bottom:20px;width:3px;height:auto}
  body.pg-about .ab-time li{flex-direction:row;gap:20px;padding-bottom:22px}
  body.pg-about .ab-built-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.pg-videos .vids-all{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.pg-my-home-assistant-kit .kit-grid{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:960px){
  body.pg-about .ab-photo{transform:rotate(-1deg);box-shadow:10px 10px 0 var(--acc)}
  body.pg-about .ab-stats{gap:18px 0;margin-top:0}
  body.pg-custom-home-assistant-cards .cc-ex{transform:none;box-shadow:8px 8px 0 var(--acc)}
  body.pg-about .ab-start-steps{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:860px){body.pg-videos .vids-all{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){
  body.pg .page .page-body .prose{padding:20px 18px 14px}
  body.pg-about .ab-stack{border-radius:0;padding-left:20px;padding-right:20px}
  body.pg-about .ab-built-grid{gap:12px}
  body.pg-about .ab-card img{height:104px;padding:14px}
  body.pg-about .ab-card>span{padding:12px 10px 14px}
  body.pg-about .ab-card span span{font-size:13.5px}
  body.pg-about .ab-start-steps a{flex-direction:row;align-items:center;gap:12px;padding:12px}
  body.pg-custom-home-assistant-cards .cc-offers{grid-template-columns:minmax(0,1fr)}
  body.pg-custom-home-assistant-cards .cc-offer{padding:20px 18px 18px 84px;min-height:0}
  body.pg-custom-home-assistant-cards .cc-offer .ab-ico{left:16px;top:18px;width:48px;height:48px}
  body.pg-custom-home-assistant-cards .cc-steps li{border-top:0;border-left:3px solid #6a5a48;padding:0 0 0 22px}
  body.pg-custom-home-assistant-cards .cc-steps .ab-dot{margin:0 0 10px;box-shadow:none}
  body.pg-my-home-assistant-kit .kit-card{flex-direction:column}
  body.pg-my-home-assistant-kit .kit-img{flex:none;aspect-ratio:16/9;border-right:0;border-bottom:5px solid var(--acc)}
  body.pg-videos .vids-all{gap:10px}
  body.pg-videos .vcard strong{font-size:13.5px;padding:9px 9px 2px}
  body.pg-videos .vcard-img img:not(.vposter){width:60px;height:60px;border-radius:12px;padding:5px}
  body.pg-videos .vcat{padding:0 9px 10px;font-size:12px}
  body.pg-notfound .list-hero h1::before{font-size:68px}
}
@media (max-width:600px){body.pg-about .ab-stack-grid{grid-template-columns:minmax(0,1fr)}}
@media (min-width:1061px){body.pg-my-home-assistant-kit .kit-card:last-child:nth-child(odd){grid-column:1/-1}body.pg-my-home-assistant-kit .kit-card:last-child:nth-child(odd) .kit-img{flex-basis:30%}}

/* ---------- Visitor account pages: the plugin writes its own inline styles, so these have to win over them ---------- */
body.pg-auth #content h1+div{background:var(--panel)!important;border:1px solid var(--line)!important;border-top:6px solid var(--acc)!important;border-radius:6px 6px 22px 22px!important;box-shadow:var(--shadow)!important;margin:0 auto!important;color:var(--fg)}
body.pg-auth #content h1{color:var(--fg)!important;font-size:clamp(30px,5vw,42px)!important;line-height:1.15}
body.pg-auth #content h1::after{content:"";display:block;width:54px;height:5px;border-radius:5px;background:var(--acc);margin:14px auto 0}
body.pg-auth #content .col-lg-8>div{max-width:480px!important;padding:44px 16px 60px!important;box-sizing:content-box}
body.pg-auth #content label,body.pg-auth #content p{color:var(--fg)!important}
body.pg-auth #content p[style*="#6b7280"]{color:var(--mut)!important}
body.pg-auth #content p[role=alert]{color:#991b1b!important}
body.pg-auth #content p[role=status]{background:var(--soft)!important;border-left-color:var(--acc)!important}
body.pg-auth #content input:not([type=checkbox]):not([type=hidden]){background:var(--bg)!important;color:var(--fg)!important;border:1px solid var(--line2)!important;border-radius:11px!important;padding:12px 13px!important}
body.pg-auth #content input:focus{outline:3px solid color-mix(in srgb,var(--acc) 40%,transparent);border-color:var(--acc)!important}
body.pg-auth #content button[type=submit]{background:var(--acc)!important;color:var(--acc-ink)!important;border:0!important;box-shadow:none!important;border-radius:12px!important;margin:0!important;min-height:48px;font:700 16px var(--body)!important}
body.pg-auth #content a{color:var(--link)!important}
@media (max-width:560px){body.pg-auth #content .col-lg-8>div{box-sizing:border-box}}
