/* Shared page components for the planning and licensing families (page-style rule 31: the same job
   uses the same component). Rendered by scripts/page_components.py; loaded after the guide styles
   (service-landing.css, hmo-application-guide.css, planning-route-guide.css, seo-shell.css) and
   before a family stylesheet, which must not restyle anything here (scripts/test_page_consistency.py).
   Light design only, body text at 15px or more, one type scale (rules 2, 19 and 25). */

/* Hero: the actions row, and a smaller H1 on phones so the answer and the button share the first
   screen (SEO playbook rule 184). */
.hero-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px}
.pc-hero-secondary{display:inline-flex;align-items:center;min-height:48px;padding:0 6px;font-weight:700;color:inherit;text-underline-offset:3px}
@media (max-width:620px){
  .pc-page .guide-hero h1{font-size:34px;line-height:1.05;letter-spacing:-.04em}
  .pc-page .guide-hero-inner{padding-top:18px}
  .pc-page .guide-hero .eyebrow{margin-bottom:10px}
}
/* In-page jumps land below the header and the sticky contents bar (rule 22); matches the specificity of
   planning-route-guide.css, which loads earlier. */
body.pc-page [id],body.pc-page #questions{scroll-margin-top:calc(var(--seo-header-h,64px) + var(--seo-contents-h,48px) + 12px)}

/* Byline with the author's photo. */
.pc-byline{display:flex;align-items:center;gap:10px;margin:10px 0 14px}
.pc-byline img{width:40px;height:40px;border-radius:50%;object-fit:cover;flex:none}
.pc-byline p{margin:0;font-size:15px;line-height:1.45;color:inherit;opacity:.92}
.pc-byline a{color:inherit}

/* Lists of pages. Cards: the whole tile is the link, a bold name and one line. Links: a text link
   with its line under it (related pages). */
.pc-list-groups{display:grid;gap:28px;margin-top:28px}
.pc-list-group h3{margin:0 0 12px;font-size:18px;line-height:1.3;color:var(--teal-dark)}
.pc-cards{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.pc-cards a{display:block;height:100%;box-sizing:border-box;padding:16px 18px;border:1px solid var(--line);border-radius:16px;background:var(--card);text-decoration:none;color:var(--ink)}
.pc-cards a:hover,.pc-cards a:focus-visible{border-color:var(--teal)}
.pc-cards strong{display:block;margin-bottom:4px;font-size:17px;line-height:1.35;color:var(--teal-dark)}
.pc-cards span{display:block;font-size:15px;line-height:1.5;color:var(--muted)}
.pc-links{list-style:none;margin:0;padding:0;display:grid}
.pc-links li{display:grid;gap:3px;padding:13px 0;border-top:1px solid var(--line)}
.pc-links a{font-size:17px;font-weight:750;color:var(--teal);text-underline-offset:3px}
.pc-links span{font-size:15px;line-height:1.5;color:var(--muted)}
@media (min-width:768px){
  .pc-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pc-links{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px}
}
.pc-related{max-width:1180px}

/* Data tables: no sideways scroll at 390px (rule 16). */
.pc-table{width:100%;margin:28px 0 0;border-collapse:collapse;background:var(--card);border:1px solid var(--line);border-radius:14px;overflow:hidden;font-size:15px;line-height:1.45}
.pc-table caption{caption-side:top;text-align:left;padding:0 0 10px;color:var(--teal);font-size:15px;font-weight:800}
.pc-table th,.pc-table td{padding:12px 14px;border-top:1px solid var(--line);text-align:left;vertical-align:top}
.pc-table thead th{border-top:0;background:var(--teal-pale);color:var(--teal-dark);font-size:15px;font-weight:800}
.pc-table tbody th{font-weight:650}
.pc-table td a{color:var(--teal);font-weight:780}
.pc-table.pc-fee-table td{white-space:nowrap;font-weight:750;font-variant-numeric:tabular-nums}

/* Dated "what we've seen" cards (not proof; decided cases use the carousel below). */
.pc-case{padding:24px}
.pc-case .case-study-topline{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;color:var(--muted);font-size:15px}
.pc-case h3{margin:14px 0 0;font-size:21px;line-height:1.2}
.pc-case .case-intro{margin:10px 0 0;color:var(--muted);font-size:15px;line-height:1.6}
.pc-case .case-intro a{color:var(--teal);font-weight:780}
.pc-case .case-outcome{border-left:0;border-radius:10px}
.case-status.pc-status-neutral{background:var(--teal-soft);color:var(--teal-dark)}
.case-status.pc-status-pending{background:#fff4dc;color:#7a5410}
.case-status.pc-status-advice{background:var(--teal-pale);color:var(--teal)}
.case-status.pc-status-lesson{background:#fbe6e1;color:#973c31}

/* Decided-case carousel (rules 10, 11, 28). */
.pc-page .cases-section .case-card{flex-basis:290px}
.pc-page .cases-section .case-card dt{font-size:15px}
.pc-page .cases-section .section-head p{color:var(--muted);font-size:15px;line-height:1.6;max-width:720px}

/* The on-page enquiry block. On a phone the form comes straight after the short heading, so tapping
   "Start my application enquiry" puts the first field on screen (rule 26). */
.pc-request{max-width:1180px;margin:0 auto;padding:96px 24px 0}
.pc-request-inner{display:grid;grid-template-columns:minmax(0,.9fr) minmax(360px,1.1fr);grid-template-areas:"head form" "side form";gap:18px 56px;align-items:start}
.pc-request-head{grid-area:head}
.pc-request-head h2{margin:0;font-size:clamp(30px,3.4vw,44px);line-height:1.05;letter-spacing:-.04em}
.pc-request-fee{margin:14px 0 0;font-size:16px;line-height:1.5}
.pc-request-fee strong{display:block;color:var(--teal-dark);font-size:22px}
.pc-request-fee span{color:var(--muted)}
.pc-form{grid-area:form;display:grid;gap:14px;padding:26px;border:1px solid var(--line);border-radius:18px;background:var(--card);box-shadow:var(--shadow-small)}
.pc-fields{display:grid;gap:14px}
.pc-form label{display:grid;gap:6px;font-size:15px;font-weight:750;color:var(--ink)}
.pc-form input,.pc-form textarea{width:100%;box-sizing:border-box;min-height:48px;padding:11px 13px;border:1px solid var(--line-strong);border-radius:10px;background:#fff;color:var(--ink);font:inherit;font-weight:500;font-size:16px}
.pc-form textarea{min-height:88px;resize:vertical}
.pc-form input:focus,.pc-form textarea:focus{outline:3px solid rgba(14,76,72,.25);border-color:var(--teal)}
.pc-form .contact-trap{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.pc-optional{color:var(--muted);font-weight:500}
.pc-form button[type=submit]{width:100%;min-height:52px;justify-content:space-between;font-size:16px}
.pc-form-note{margin:0;color:var(--muted);font-size:15px;line-height:1.5}
.pc-form-note a{color:var(--teal);font-weight:750}
.pc-form [role=status]{margin:0;font-size:15px;line-height:1.5}
.pc-form [role=status]:empty{display:none}
.pc-form [role=status].error{color:var(--danger);font-weight:750}
.pc-form [role=status].success{padding:13px 15px;border:1px solid #b9d6ce;border-radius:10px;background:var(--teal-pale);color:var(--teal-dark);font-weight:750}
.pc-request-side{grid-area:side}
.pc-benefits{margin:0;padding-left:20px;color:var(--ink);font-size:15px;line-height:1.8}
.pc-person{display:flex;gap:14px;align-items:flex-start;margin-top:18px}
.pc-person img{flex:0 0 auto;width:64px;height:64px;border-radius:50%;object-fit:cover}
.pc-person p,.pc-call{margin:0;color:var(--muted);font-size:15px;line-height:1.55}
.pc-call{margin-top:18px}
.pc-person strong{color:var(--ink)}
.pc-person a,.pc-call a{color:var(--teal);font-weight:780}

@media (max-width:920px){
  .pc-request{padding:72px 16px 0}
  .pc-request-inner{grid-template-columns:1fr;grid-template-areas:"head" "form" "side";gap:18px}
  .pc-form{padding:18px;border-radius:16px}
  .pc-table th,.pc-table td{padding:10px 10px}
  .pc-table.pc-fee-table td{white-space:normal}
}

/* Free postcode check (licensing pages, the Article 4 guide). */
.pc-check-form{display:grid;gap:8px;max-width:640px;margin-top:18px}
.pc-check-form label{font-weight:700}
.pc-check-row{display:flex;gap:10px;flex-wrap:wrap}
.pc-check-row input[type=search]{flex:1 1 200px;min-height:48px;padding:10px 12px;border:1px solid var(--line-strong);border-radius:12px;font-size:17px;background:var(--white)}
.pc-check-row button{min-height:48px;padding:0 18px;border:1px solid var(--teal);border-radius:12px;background:var(--white);color:var(--teal-dark);font-weight:750;cursor:pointer}
.pc-check-hint{margin:0;font-size:15px;color:var(--muted)}

/* Form selects match the inputs; a section's source line. */
.pc-form select{width:100%;box-sizing:border-box;min-height:48px;padding:11px 13px;border:1px solid var(--line-strong);border-radius:10px;background:#fff;color:var(--ink);font:inherit;font-weight:500;font-size:16px}
.pc-page .sources{margin:16px 0 0;font-size:15px;line-height:1.55;color:var(--muted)}
.pc-page .sources a{color:var(--teal)}

/* The standard brand description under the hero (the licensing service page, /pricing). */
.pc-standard{max-width:1120px;margin:22px auto 0;padding:0 20px;font-size:16px}

/* The booking block (page-style rule 37): an SEO page's closing call to action, in place of its
   enquiry form. The request block's section and heading, the form card's box, the site's primary
   button; one component on every page (rule 31). */
.pc-book-card{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;padding:32px;border:1px solid var(--line);border-radius:18px;background:var(--card);box-shadow:var(--shadow-small)}
.pc-book-card .pc-request-head{grid-area:auto}
/* The line sits directly under the heading, not level with the foot of the button (gate on /pricing,
   26 Nov 2026). */
.pc-book-line{align-self:start;margin:0;color:var(--muted);font-size:16px;line-height:1.55}
/* A page's own proof lines (/pricing) sit below the actions. */
.pc-book-proof{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 32px;align-items:start;padding-top:20px;border-top:1px solid var(--line)}
.pc-book-proof>*{margin:0;font-size:15px;line-height:1.55}
.pc-book-proof .pc-person{margin:0}
/* The FAQ already ends in its own bottom padding, so a booking block straight after it (/pricing)
   adds none of its own: the same gap as on the guides. */
.faq-section+.pc-request{padding-top:0}
.pc-book-actions{display:grid;gap:12px;justify-items:start}
.pc-book-button{gap:14px;min-height:52px;font-size:16px;white-space:nowrap}
.pc-book-actions .pc-call{margin:0}
@media (min-width:921px){
  .pc-book-actions{display:flex;flex-wrap:wrap;align-items:center;gap:16px}
}
@media (max-width:920px){
  .pc-book-card{padding:22px 18px;border-radius:16px}
  .pc-book-actions{grid-template-columns:minmax(0,1fr);justify-items:stretch}
  .pc-book-button{justify-content:space-between;width:100%;box-sizing:border-box;white-space:normal}
  .pc-book-proof{grid-template-columns:1fr;gap:12px;padding-top:16px}
}

/* Question headings (page-style rule 38, Michael 25 Nov 2026: "frame sections as questions people
   legitimately might wish to ask"). Opt in with body class pc-questions: every section heading on
   the page is a question a landlord or provider asks, which runs longer than a two-word label, so
   the section h2s take a smaller size than the 54px default (three lines at desktop otherwise).
   First used on the children's home and supported living guides; later rule 38 pages opt in. */
.pc-questions .guide-section .guide-heading h2{font-size:clamp(28px,3.1vw,38px);line-height:1.12;letter-spacing:-.035em}

/* One reading column (page-style rule 33, Michael 25 Nov 2026: "Why are the tables on the preview
   wider than the text?"). Opt in with body class pc-reading (the /planning hub, its service pages
   and guides). At desktop widths every block in main (hero copy and tiles, contents bar, prose,
   tables, grids, panels, the request block, FAQ and related list) sits on the same 800px column, so
   the left and right edges of text and tables line up. Tables that need more room are restructured
   in their builders, never widened. Phones keep rule 16 (full width, no sideways scroll). */
.pc-reading{--pc-col:800px}
@media (min-width:921px){
  .pc-reading main>section:not(.guide-hero),.pc-reading main>nav.guide-jump,.pc-reading main>.ps-seen-note{max-width:calc(var(--pc-col) + 48px);margin-left:auto;margin-right:auto}
  .pc-reading .guide-hero-inner{max-width:calc(var(--pc-col) + 48px)}
  .pc-reading .guide-hero-copy,.pc-reading .guide-hero .hero-lede,.pc-reading .guide-facts,.pc-reading .guide-heading,.pc-reading .ps-prose,.pc-reading main .section-head{max-width:none}
  /* Boxed panels sit flush with the column, like the document and table cards. */
  .pc-reading main>section.process-section,.pc-reading main>section.case-studies-section,.pc-reading main>section.source-section{max-width:var(--pc-col)}
  .pc-reading main>section.process-section{grid-template-columns:1fr;gap:28px;padding:48px 32px}
  .pc-reading main>section.case-studies-section{padding-left:32px;padding-right:32px}
  .pc-reading main>section.source-section{grid-template-columns:1fr;gap:24px;padding:40px 32px}
  .pc-reading .assessment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pc-reading .problem-risk .problem-list{grid-template-columns:1fr}
  .pc-reading main>nav.guide-jump{flex-wrap:nowrap;gap:10px 14px;overflow-x:auto;white-space:nowrap;scrollbar-width:none}
  .pc-reading main>nav.guide-jump::-webkit-scrollbar{display:none}
  .pc-reading .guide-jump[data-contents-bar].is-stuck{max-width:none;padding-left:calc((100vw - var(--pc-col))/2);padding-right:calc((100vw - var(--pc-col))/2)}
}

/* Compact hero and print treatment for the national guides with open route packs. */
.national-guide .guide-hero-inner{padding-bottom:30px}
.national-guide .hero-actions{gap:8px 16px;margin-top:12px}
.national-guide .hero-actions .pc-hero-secondary{width:auto;padding-inline:0}
.national-guide .hero-actions .button-light{margin-top:0}
.national-guide .pc-fee-table{margin:18px 0}
@media (max-width:420px){
  .national-guide .hero-actions .pc-hero-secondary{font-size:15px}
  .national-guide .guide-crumb{margin-bottom:16px}
}
@media print{
  .national-guide .guide-hero{display:block!important;background:none!important;color:#000}
  .national-guide .guide-hero-inner{padding:0}
  .national-guide :is(.guide-crumb,.guide-hero .eyebrow,.pc-byline,.hero-lede,.hero-actions,.pc-book,.pc-related){display:none!important}
  .national-guide .national-pack h3,.national-guide .guide-heading{break-after:avoid}
  .national-guide:is([data-print-selection],:has(.national-pack:target)) main>
    :not(.guide-hero,[data-print-route],:has(.national-pack:target),#shared-plans,#cost,#after-decision){display:none}
}

/* One set of prices, service guarantees and FAQ questions for the reading pages. */
:is(.pricing-detail-card,.mv2-card) p.pricing-detail-fee{margin:0 0 12px;line-height:1.15}
.pricing-detail-fee strong{font-size:clamp(32px,5vw,48px);font-weight:850;color:var(--teal-dark)}
.pricing-detail-fee span{font-size:14px;color:var(--muted);padding-left:4px}
/* Reading breadcrumbs and row facts used by the council template. */
.pc-breadcrumb{margin:14px 0 2px;font-size:15px;color:var(--ink3)}
.pc-breadcrumb ol{display:flex;flex-wrap:wrap;gap:0 4px;margin:0;padding:0;list-style:none}
.pc-breadcrumb a{color:var(--ink2)}
.pc-breadcrumb [aria-hidden]{padding:0 3px}
.pc-facts-rows{margin:0}
@media (min-width:720px){
  .pc-facts-rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px}
}

/* Service pricing and its disclosure on reading pages. */
:is(.pricing-page .pricing-detail-card,.council-page .service-card.managed-v2,.licensing-page .pricing-detail-card,.planning-editorial .pricing-detail-card){
  min-width:0;padding:clamp(20px,4vw,32px);background:#fff;border:1px solid var(--line);
  border-radius:18px;box-shadow:0 5px 18px rgba(15,38,32,.06)}
.pricing-card-details{margin-top:14px;border-block:1px solid var(--line)}
.pricing-card-details>summary{min-height:48px;padding:12px 0;font-weight:750;color:var(--teal-dark,var(--accent));cursor:pointer}
.pricing-card-details>summary:focus-visible{outline-offset:2px}
.pricing-card-promise{padding:13px 16px;background:var(--teal-pale,var(--accent-soft));border-radius:10px}
.council-page .faq-list{border-top:1px solid var(--line)}
.council-page .faq-list details{border-bottom:1px solid var(--line)}
.council-page .faq-list summary{position:relative;list-style:none;cursor:pointer;padding:23px 60px 23px 0;color:#17211f;font-size:17px;font-weight:780;line-height:1.5}
.council-page .faq-list summary::-webkit-details-marker{display:none}
.council-page .faq-list summary::after{content:"+";position:absolute;right:6px;top:19px;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;border:1px solid var(--line-strong);color:var(--teal);font-size:20px;font-weight:400}
.council-page .faq-list details[open] summary::after{content:"-"}
.council-page .faq-list details p{max-width:790px;color:var(--ink,#161F1D);margin:-5px 0 24px;font-size:17px;line-height:1.55}
.council-page .rows>div>dt:empty{display:none}
.council-page .rows>div>dt:empty+dd{grid-column:-2/-1}
@media (max-width:620px){
  .council-page .faq-list summary{padding:20px 52px 20px 0}
  .council-page .faq-list summary::after{top:15px}
}
.pc-page .faq-list summary{font-size:17px}

.pc-page .guide-jump{
  max-width:1180px;margin:0 auto;padding:17px 24px;
  display:flex;flex-wrap:wrap;gap:10px 24px;align-items:center;border-bottom:1px solid var(--line)
}
.pc-page .guide-jump span{color:var(--muted);text-transform:uppercase;letter-spacing:.09em;font-size:9px;font-weight:850}
.pc-page .guide-jump a{color:var(--teal);font-size:12px;font-weight:780;text-underline-offset:3px}
@media (max-width:680px){
  .pc-page .guide-jump{overflow-x:auto;flex-wrap:nowrap;white-space:nowrap}
}
@media (min-width:921px){
  .pc-reading main.wrap{max-width:calc(var(--pc-col) + 48px);padding-inline:24px}
}

/* The same proof badge and photograph in the archive grid and service carousels. */
:is(.case-list,.case-grid) .case-card:has(.case-status.is-granted){padding:20px;border-radius:18px}
:is(.case-list,.case-grid) .case-card:has(.case-status.is-granted) .case-photo{
  margin:-20px -20px 16px;border-radius:18px 18px 0 0
}
:is(.case-list,.case-grid) .case-card>.case-status.is-granted{
  background:#dcebe0;color:#073b38;font-size:15px;line-height:1.55;font-weight:800
}
:is(.case-list,.case-grid) .case-card:has(.case-status.is-granted) h3{
  margin:12px 0 8px;font-size:20px;line-height:1.3
}
