/* =====================================================================================
   Switch Smart Electrical: supporting pages (about, contact, thanks, privacy, 404)
   Loaded after site.css on those pages only. Uses the site tokens; no new colours.
    1 drawing sheet (hero aside on ink)   2 the mark, drawn out (about)
    3 RCBO + lamp (thanks, 404)           4 about                 5 contact
    6 thanks                              7 404                   8 privacy
   ===================================================================================== */

/* ------------------------------------------------------------------ 1 drawing sheet */
.pg-sheet {
  position: relative; display: grid; gap: 14px; margin: 0; padding: clamp(14px, 2vw, 22px);
  border-radius: var(--r-3); background-color: var(--ink-2); background-image: var(--grid-ink); background-size: 24px 24px; background-position: -1px -1px;
  box-shadow: 0 0 0 1px var(--rule-ink-2), 0 30px 60px -36px rgba(0, 0, 0, .9);
}
.pg-sheet__tag { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 500 .75rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--on-ink-3); }
.pg-sheet__tag > span:first-child { display: inline-flex; align-items: center; gap: 9px; color: var(--on-ink); }
.pg-sheet__cap { padding-top: 12px; border-top: 1px dashed var(--rule-ink-2); font-size: var(--fs-small); line-height: 1.5; color: var(--on-ink-3); }
.pg-sheet .dgm { margin-inline: auto; }
.pg-sheet .dgm { --dg-card: var(--ink-2); }

/* ------------------------------------------------------------------ 2 the mark, drawn out */
.pg-mark { max-width: 440px; }
.pg-mark .pg-guide { opacity: .2; }
.pg-mark .ln-d { opacity: .32; }
.pg-mark .pg-cl { stroke-dasharray: 14 5 2 5; }
.pg-mark .pg-cline { opacity: .4; }
.pg-mark .pg-mk { stroke-width: 1.6; }
.pg-mark .fl-paper { fill: var(--ink-3); }
.pg-run { fill: none; stroke: var(--red-l); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.pg-run--glow { stroke: var(--red); stroke-width: 14; opacity: .3; }
.pg-mark .pg-node { fill: var(--red-l); }
/* With motion (pages.js adds .pg-motion when core.js runs and motion is allowed): the run waits for the draw-in, then travels the length of
   the mark; the cut end and the LED in the tag light when it gets there. Without JS, or under
   reduced motion, the run is already complete and both are lit. */
html.pg-motion .pg-mark .pg-run { stroke-dasharray: 1 2; stroke-dashoffset: 1; }
html.pg-motion .pg-mark.is-run .pg-run { animation: pg-run 3.2s var(--ease-in-out) .15s forwards; }
html.pg-motion .pg-mark:not(.is-done) .pg-node--end { fill-opacity: 0; }
html.pg-motion .pg-mark .pg-node--end { transition: fill-opacity .3s; }
@keyframes pg-run { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
html.pg-motion [data-mark-fig]:not(.is-done) [data-mark-led] { background: rgba(255, 255, 255, .16) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1) !important; }

/* ------------------------------------------------------------------ 3 RCBO + lamp */
.pg-rcbo { max-width: 340px; }
.pg-rcbo .pg-lever { fill: var(--dg-ink); }
.pg-rcbo .pg-grip { fill: none; stroke: var(--dg-dark); stroke-width: 2; stroke-linecap: round; }
.pg-rcbo .pg-lamp__glow { fill: var(--red); opacity: .26; transition: opacity .35s var(--ease-out); }
.pg-rcbo .pg-lamp__bulb { fill: var(--red); transition: fill .25s; }
/* thanks: site.js arms the breaker (off) and closes it after the draw-in; the lamp follows it */
[data-breakers].is-armed .brk:not(.is-on) ~ .pg-lamp .pg-lamp__glow { opacity: 0; }
[data-breakers].is-armed .brk:not(.is-on) ~ .pg-lamp .pg-lamp__bulb { fill: var(--dg-card); }
/* 404: tripped by default (no JS, reduced motion); pages.js resets it from the button */
.pg-trip:not(.is-reset) .pg-brk .brk__lever { transform: translateY(var(--throw, 44px)); }
.pg-trip:not(.is-reset) .pg-brk .brk__flag { fill: var(--dg-paper); }
.pg-trip:not(.is-reset) .pg-lamp__glow { opacity: 0; }
.pg-trip:not(.is-reset) .pg-lamp__bulb { fill: var(--dg-card); }
.pg-reset { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.pg-reset .btn { margin-bottom: 3px; }
.pg-reset__msg { margin: 0; font: 500 .75rem/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--red-l); }
.pg-reset__msg:empty { display: none; }
html:not(.pg-js) .pg-reset { display: none; }
.pg-sheet-hero { align-items: center; }

/* ------------------------------------------------------------------ 4 about */
.pg-about-hero { align-items: center; }
.pg-about-hero .h1 { max-width: 13ch; }
.pg-who { align-items: center; }
.pg-num { font-size: .9375rem; letter-spacing: .04em; }
.pg-ext { display: inline-flex; align-items: center; gap: 7px; color: var(--text); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
.pg-ext svg { width: 14px; height: 14px; color: var(--red); flex: none; }
.pg-ext:hover { color: var(--red); }
.pg-box { border-radius: var(--r-3); background: var(--card); box-shadow: 0 0 0 1px var(--rule), var(--shadow-1); padding: clamp(18px, 2.4vw, 28px); }
.pg-where { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px clamp(28px, 4vw, 64px); align-items: start; }
.pg-where .chart th[scope="row"] { font-weight: 600; white-space: nowrap; }
.pg-where .chart td:last-child { color: var(--text-2); }
.pg-where__side { display: grid; gap: 12px; justify-items: start; padding-top: 6px; }
.pg-where__side .h4 { margin: 0; }
.pg-also { color: var(--text-2); max-width: 46ch; }
@media (max-width: 899px) { .pg-where { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
  .pg-where .chart { font-size: .875rem; }
  .pg-where .chart th, .pg-where .chart td { padding-inline: 6px; }
}

/* ------------------------------------------------------------------ 5 contact */
.pg-contact-hero .phero__grid { align-items: center; }
/* direct lines: a job-sheet style card of links on ink */
.pg-lines { border-radius: var(--r-3); background: var(--ink-2); box-shadow: 0 0 0 1px var(--rule-ink-2), 0 30px 60px -36px rgba(0, 0, 0, .9); overflow: hidden; }
.pg-lines__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--rule-ink); font: 500 .75rem/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--on-ink-3); }
.pg-lines__head > span:first-child { display: inline-flex; align-items: center; gap: 9px; color: var(--on-ink); }
.pg-lines__list { list-style: none; }
.pg-lines__list li + li { border-top: 1px dashed var(--rule-ink); }
.pg-lines__list a {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) 22px; gap: 4px 14px; align-items: baseline; padding: 15px 18px;
  color: var(--on-ink); text-decoration: none; transition: background-color var(--t-fast);
}
.pg-lines__k { font: 500 .75rem/1.35 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--on-ink-3); }
.pg-lines__v { display: grid; gap: 4px; min-width: 0; }
.pg-lines__v b { font-weight: 600; font-size: 1.0625rem; line-height: 1.3; overflow-wrap: anywhere; }
.pg-lines__v b.tel { font-weight: 500; }
.pg-lines__s { font-size: .875rem; line-height: 1.45; color: var(--on-ink-2); }
.pg-lines__ic { align-self: center; width: 20px; height: 20px; color: var(--on-ink-3); transition: color var(--t-fast), transform .3s var(--ease-out); }
.pg-lines__list a:hover { background: var(--ink-3); }
.pg-lines__list a:hover .pg-lines__ic, .pg-lines__list a:focus-visible .pg-lines__ic { color: var(--red-l); transform: translateX(2px); }
.pg-lines__list a:focus-visible { outline-offset: -3px; }
@media (max-width: 420px) {
  .pg-lines__list a { grid-template-columns: minmax(0, 1fr) 22px; padding: 14px 16px; }
  .pg-lines__k { grid-column: 1 / -1; }
  .pg-lines__ic { grid-column: 2; grid-row: 2; }
}
/* the form beside what happens next */
.pg-contact { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: 48px clamp(36px, 5vw, 88px); align-items: start; }
.pg-contact__main .h2 { margin: 0; }
.pg-contact__side { display: grid; gap: 18px; position: sticky; top: calc(var(--header-h) + 28px); }
.pg-box__h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pg-box__ic { width: 18px; height: 18px; color: var(--red); flex: none; }
.pg-box p { color: var(--text-2); font-size: .9688rem; line-height: 1.55; }
.pg-box p b { color: var(--text); font-weight: 600; }
.pg-box .link-arrow { margin-top: 12px; }
.pg-steps { list-style: none; display: grid; border-top: 1px solid var(--rule); }
.pg-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 13px 0; border-bottom: 1px dashed var(--rule); color: var(--text-2); font-size: .9688rem; line-height: 1.5; }
.pg-steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.pg-steps b { color: var(--text); font-weight: 600; }
.pg-steps__n { font: 500 .75rem/1 var(--f-mono); letter-spacing: .06em; color: var(--red); }
.pg-submit { display: grid; gap: 14px; padding-top: 6px; }
.pg-submit .form__note { max-width: 56ch; }
@media (max-width: 999px) {
  .pg-contact { grid-template-columns: minmax(0, 1fr); }
  .pg-contact__side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 700px) { .pg-contact__side { grid-template-columns: minmax(0, 1fr); } }
/* what to photograph */
.pg-photo { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px clamp(36px, 5vw, 88px); align-items: center; }
.pg-photo .h2 { margin: 0; }
.pg-photo .fig__panel { gap: 14px; }
@media (max-width: 899px) { .pg-photo { grid-template-columns: minmax(0, 1fr); } }
.dgm .pg-vf { stroke-width: 3; }

/* ------------------------------------------------------------------ 6 thanks */
.pg-process .process__step .h4 { margin: 10px 0 6px; }
.pg-process .process__step .small { max-width: 30ch; }
.pg-process .process__step .mono { color: var(--text-3); }
.pg-process .process__step.is-lit .mono { color: var(--red); }
.cards--3 .card__n.mono { font-size: .75rem; letter-spacing: .08em; }

/* ------------------------------------------------------------------ 7 404 */
.pg-ways { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 10px; border-radius: var(--r-3); background: var(--card); box-shadow: 0 0 0 1px var(--rule), var(--shadow-1); }
.pg-ways .way:hover, .pg-ways .way:focus-visible { background: var(--paper-2); }
@media (max-width: 999px) { .pg-ways { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pg-ways { grid-template-columns: minmax(0, 1fr); padding: 6px; } }

/* ------------------------------------------------------------------ 8 privacy */
.pg-legal .prose ul > li { padding-left: 26px; }
.pg-legal .tel { white-space: nowrap; }
