/* ==========================================================================
   EICR Pro — Safety Certificates  ·  DARK THEME
   Design language cloned from phs Compliance (phs.co.uk), re-skinned dark:
   bright-orange #FF7A00 accents (originally phs yellow), lightened blue
   #5FAFE8 for links, deep slate bands, dark cards, rounded corners + glows.
   ========================================================================== */

:root {
  color-scheme: dark;

  --accent:      #FF7A00;   /* bright orange — final pick (yellow was reverted) */
  --accent-deep: #E96B00;   /* deep orange — borders/text where a solid is needed */
  --accent-grad:       linear-gradient(135deg, #FFA733 0%, #FF7A00 52%, #E96B00 100%);
  --accent-grad-hover: linear-gradient(135deg, #FF9C1F 0%, #F57200 52%, #D96300 100%);
  /* kicker rules fade out towards their right end. The last stop keeps the
     same RGB with alpha 0 — fading to a bare 'transparent' greys out the
     midpoint in some engines. */
  --accent-grad-fade: linear-gradient(90deg, #FFA733 0%, #FF7A00 38%, #E96B00 70%, rgba(233, 107, 0, 0) 100%);
  --blue:        #5FAFE8;   /* links & card titles — readable on dark */
  --btn:         #2B3138;   /* charcoal buttons & card bars (white text) */
  --btn-hi:      #3A434D;   /* button hover */
  --ink:         #EEF2F6;   /* headings */
  --body:        #A2ADB8;   /* body copy */
  --bg:          #12171D;   /* page ground */
  --band:        #171E26;   /* alternating bands (was grey) */
  --surface:     #1E262F;   /* cards, header, dropdowns */
  --slate:       #0E1318;   /* footer */
  --line:        #2A333E;
  --radius-card: 10px;
  --shadow-card: 0 6px 22px rgba(0, 0, 0, .35);
  --glow-accent: 0 0 0 4px rgba(255, 122, 0, .14);
  --container:   1440px;
  --header-h:    112px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
}

img { max-width: 100%; display: block; }

h1, h2, h3 { color: var(--ink); line-height: 1.2; font-weight: 800; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 200;
  background: var(--btn); color: #fff; padding: 10px 18px;
  border-radius: 0 0 6px 6px; text-decoration: none; font-weight: 700;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

::selection { background: var(--accent); color: #14181D; }

/* The short yellow rule above every heading — phs's signature kicker */
.kicker-rule {
  display: block;
  width: 200px; height: 5px;
  background: var(--accent-grad-fade);
  border-radius: 3px;
  margin-bottom: 22px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
}

.header-inner {
  max-width: 1740px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-height: var(--header-h);
}

.header-rule { height: 5px; background: var(--accent-grad); }

/* --- logo: oval + stacked "eicr / Pro" + wordmark, phs-lockup style --- */
/* The logo is bottom-aligned rather than centred, so the "Safety Certificates"
   line sits on the same optical row as the nav links (the header-right column
   is two rows: search/contacts, then nav). Re-centred at <=1023px, where the
   contacts row is hidden and the header becomes a single row. */
.logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; flex-shrink: 0;
  align-self: flex-end;
  padding-bottom: 12px;
}
.logo-oval {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  background: var(--accent-grad);
  color: #23282D;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.5px;
  line-height: .95;
  padding: 11px 15px 13px;
  border-radius: 50%;
  transform: rotate(-4deg);
  box-shadow: var(--glow-accent);
}
/* the emblem's ring: one soft pulse every 8 seconds */
.logo-oval::after {
  content: '';
  position: absolute; inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  pointer-events: none;
  animation: logo-ring-pulse 8s ease-out infinite;
}
@keyframes logo-ring-pulse {
  0%   { transform: scale(.92); opacity: .75; }
  16%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

.logo-oval small {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  margin-top: 2px;
}
/* two-line wordmark: "Electrical" sits above "Safety Certificates".
   The lines are sized in `em`, so every responsive step below only needs to
   change .logo-word's font-size and the whole lockup scales together. */
.logo-word {
  display: flex; flex-direction: column;
  color: #D4DBE2;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: .5px;
  line-height: 1.04;
}
.logo-line1 {
  font-size: .64em;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
}
.logo-line2 { font-size: 1em; }

.header-right {
  display: flex; flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  max-width: 1240px;
}

/* --- top strip: search + contacts --- */
.header-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  padding: 14px 0 8px;
}

.header-search {
  display: flex; align-items: center;
  border-bottom: 1px solid var(--line);
  width: 260px;
}
.header-search input {
  border: 0; outline-offset: 4px;
  font: inherit; font-size: 14px; letter-spacing: .06em;
  color: var(--ink);
  width: 100%;
  padding: 6px 4px;
  background: transparent;
}
.header-search input::placeholder { color: #5D6873; }
.header-search button {
  border: 0; background: none; cursor: pointer;
  color: var(--blue);
  width: 34px; height: 30px; padding: 5px;
}
.header-search button svg { width: 100%; height: 100%; }

.header-contacts { display: flex; align-items: center; gap: 36px; }
.contact-item {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-size: 16.5px; font-weight: 600;
  white-space: nowrap;
}
.contact-item svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }
.contact-item:hover { color: var(--blue); }

/* --- nav row --- */
.main-nav ul { list-style: none; }

#nav-menu {
  display: flex; align-items: stretch; justify-content: space-between;
  border-top: 1px solid var(--line);
}
#nav-menu > li { position: relative; display: flex; }

#nav-menu > li > a,
#nav-menu > li > button {
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap;
  font: inherit; font-size: 19px; font-weight: 600;
  color: var(--blue);
  background: none; border: 0; cursor: pointer;
  text-decoration: none;
  padding: 18px 15px;
  transition: color .15s ease;
}
#nav-menu > li > a:hover,
#nav-menu > li > button:hover { color: var(--accent); }

.caret { width: 13px; height: 8px; margin-top: 3px; transition: transform .2s ease; }
.has-drop button[aria-expanded="true"] .caret { transform: rotate(180deg); }

.nav-cta > a { font-weight: 700; }

/* dropdowns */
.drop {
  position: absolute; top: 100%; left: 0;
  min-width: 280px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 50;
  overflow: hidden;
}
.has-drop:hover .drop,
.has-drop:focus-within .drop,
.has-drop.open .drop {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.drop a {
  display: block;
  padding: 12px 22px;
  color: var(--ink); text-decoration: none;
  font-size: 16.5px; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.drop li:last-child a { border-bottom: 0; }
.drop a:hover { background: var(--band); color: var(--accent); }

/* the Locations list is long — run it in two columns on desktop */
.drop-wide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 480px;
  /* anchored left it pokes past the viewport on narrow desktops — open leftward instead */
  left: auto; right: 0;
}
.drop-wide a { white-space: nowrap; }

/* dropdowns under the right end of the menu open leftward, so they never
   poke past the viewport on narrower desktops */
#nav-menu > li:nth-last-child(-n+5) .drop { left: auto; right: 0; }

/* burger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 42px;
  padding: 9px 10px;
  background: none; border: 2px solid var(--accent); border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span:not(.visually-hidden) {
  display: block; height: 3px; border-radius: 2px;
  background: var(--accent);
}

/* ==========================================================================
   Hero
   ========================================================================== */

/* The darkening scrim is a separate ::before layer, not part of the
   background shorthand, so the photo and the darkness are independent:
   swapping the image never touches the scrim, and --hero-dark (0-1, set by
   the slider in js/admin.js) scales the whole thing. The three stops keep
   their relative strength; at the default .88 this renders identically to
   the original flat gradient. */
.hero {
  background: url('../images/photo-01-web.jpg') center 32% / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(10, 14, 19, 1) 0%,
    rgba(10, 14, 19, .7045) 46%,
    rgba(10, 14, 19, .3409) 100%);
  opacity: var(--hero-dark, .88);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1740px; margin: 0 auto;
  padding: 96px 32px 110px;
}
.hero-copy { max-width: 640px; }
.hero h1 {
  color: #fff;
  font-size: clamp(38px, 4.6vw, 62px);
  font-weight: 700;
  margin-bottom: 30px;
}
.hero p {
  color: #D9DFE5;
  font-size: 19px;
  max-width: 540px;
  margin-bottom: 38px;
}

/* --- blue button with attached yellow chevron chip --- */
.btn-primary {
  display: inline-flex; align-items: stretch;
  text-decoration: none;
  font-weight: 700; font-size: 18px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .4);
}
.btn-primary > span:first-child {
  background: var(--btn);
  color: #fff;
  padding: 17px 34px;
  transition: background .15s ease;
}
.btn-primary:hover > span:first-child { background: var(--btn-hi); }
.btn-chip {
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-grad);
  color: #23282D;
  width: 58px;
}
.btn-chip svg { width: 11px; height: 19px; }

/* ==========================================================================
   USP row
   ========================================================================== */

.usps { padding: 84px 0 72px; background: var(--bg); }
.usp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 56px;
}
.usp { text-align: center; }
.usp-badge {
  display: flex; align-items: center; justify-content: center;
  width: 92px; height: 92px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #14181D;               /* dark tick on yellow — reads far better on dark */
  box-shadow: var(--glow-accent);
}
.usp-badge svg { width: 36px; height: 28px; }
.usp h3 { font-size: 21px; margin-bottom: 12px; }
.usp p { font-size: 17px; }

/* ==========================================================================
   Bands & section heads
   ========================================================================== */

.band { padding: 88px 0; }
.band-grey { background: var(--band); }
.band-grey + .band-grey { padding-top: 0; }

.section-head { margin-bottom: 56px; }
.section-head h2 { font-size: 32px; }

/* ==========================================================================
   Intro split
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}
.split-copy h2 { font-size: 30px; margin-bottom: 24px; }
.split-copy p { margin-bottom: 20px; }
.split-copy strong { color: var(--ink); }
.split-media { margin: 0; }
.split-media img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   Service cards — circular photo overlapping a dark card
   ========================================================================== */

.services-band .container { padding-top: 8px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* row gap and margin both have to clear the 110px circle overhang below,
     otherwise the circles collide with the heading / the row above */
  gap: 170px 44px;
  margin-top: 182px;
}

.svc-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);
  display: flex; flex-direction: column;
  padding-top: 156px;          /* circle bottom sits at 110px — leaves ~46px */
  transition: transform .2s ease, border-color .2s ease;
}
.svc-card:hover { transform: translateY(-4px); border-color: #39434F; }
.svc-photo {
  position: absolute;
  top: -110px; left: 50%;
  transform: translateX(-50%);
  width: 220px; height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid var(--band);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5), var(--glow-accent);
}
.svc-photo img { width: 100%; height: 100%; object-fit: cover; }

.svc-body { padding: 0 34px 30px; flex: 1 1 auto; }
.svc-body h3 { color: var(--blue); font-size: 23px; margin-bottom: 16px; }
.svc-body p { font-size: 17px; }

/* --- blue bar + yellow chip, full card width --- */
.card-bar {
  display: flex; justify-content: space-between;
  background: var(--btn);
  color: #fff;
  text-decoration: none;
  font-weight: 700; font-size: 18px;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  overflow: hidden;
  transition: background .15s ease;
}
.card-bar:hover { background: var(--btn-hi); }
.card-bar { padding-left: 34px; align-items: center; }
.card-bar > .btn-chip { min-height: 56px; align-self: stretch; }

/* ==========================================================================
   c-codes.html — inspection procedure, handover, per-code defect categories
   ========================================================================== */

/* numbered procedure */
.steps-list { list-style: none; counter-reset: step; }
.steps-list > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 26px 62px;
}
.steps-list > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: -2px;
  width: 44px;
  font: 800 20px/1 'Nunito', 'Segoe UI', system-ui, sans-serif;
  color: var(--accent);
  letter-spacing: -.02em;
}
/* hairline running down through the numbers */
.steps-list > li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 21px; top: 24px; bottom: 6px;
  width: 1px;
  background: var(--line);
}
.steps-list h3 { font-size: 18px; margin-bottom: 6px; }
.steps-list p { font-size: 16.5px; margin: 0; }

/* "what to expect on the day" pills */
.notes-list { list-style: none; display: grid; gap: 12px; }
.notes-list li {
  position: relative;
  padding-left: 30px;
  font-size: 16.5px;
  line-height: 1.55;
}
.notes-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 13px; height: 7px;
  border-left: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg);
  border-radius: 1px;
}

/* a list beside a supporting photo */
.media-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.page-media { position: relative; margin: 0; }
.page-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.page-media figcaption {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.5;
  color: #8894A0;
}

/* per-code "what falls under this code" blocks */
.code-detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--code, var(--accent));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px 30px;
  margin-bottom: 22px;
}
.code-detail-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  margin-bottom: 6px;
}
.code-detail-head .code-badge { margin-bottom: 0; }
.code-detail-head h3 { font-size: 20px; }
.code-principle {
  font-size: 16.5px;
  font-style: italic;
  color: #8894A0;
  margin-bottom: 22px;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}
.cat-grid h4 {
  color: var(--ink);
  font-size: 16px; font-weight: 800;
  margin-bottom: 9px;
}
.cat-grid ul { list-style: none; }
.cat-grid li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 7px;
  font-size: 15.5px;
  line-height: 1.5;
}
.cat-grid li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--code, var(--accent));
}
.code-context {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
  line-height: 1.6;
}
.code-context strong { color: var(--ink); }

/* the caveat that must never be dropped */
.judgement-note {
  background: var(--band);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 22px 26px;
  margin-bottom: 40px;
  font-size: 16.5px;
}
.judgement-note strong { color: var(--ink); }

@media (max-width: 1100px) {
  .media-wrap { grid-template-columns: 1fr; gap: 34px; }
  .page-media { max-width: 620px; }
}

@media (max-width: 700px) {
  .page-header { padding: 52px 0 46px; }
  .steps-list > li { padding-left: 48px; }
  .steps-list > li::before { font-size: 17px; width: 34px; }
  .steps-list > li:not(:last-child)::after { left: 15px; }
  .code-detail { padding: 24px 22px; }
  .code-legend a { padding: 9px 13px; font-size: 13px; }
  .cat-grid { grid-template-columns: 1fr; gap: 18px; }
  .judgement-note { padding: 18px 20px; }
}

/* ==========================================================================
   Inner-page header (c-codes.html) + the home page's cross-link to it
   ========================================================================== */

.page-header {
  position: relative;
  overflow: hidden;
  background: var(--band);          /* shows through if the photo is removed */
  border-bottom: 1px solid var(--line);
  padding: 76px 0 68px;
}
.banner-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* scrim: heavy on the left where the text sits, opening up to the right */
.page-header::after {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(90deg,
    rgba(18, 23, 29, .95) 0%,
    rgba(18, 23, 29, .84) 46%,
    rgba(18, 23, 29, .55) 100%);
  pointer-events: none;
}
.page-header > .container { position: relative; z-index: 2; }
.page-header h1 {
  font-size: clamp(30px, 3.4vw, 44px);
  margin-bottom: 20px;
}
.page-lead {
  max-width: 780px;
  font-size: 18.5px;
}

.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  margin-bottom: 26px;
  font-size: 14.5px; font-weight: 700;
  letter-spacing: .03em;
  color: #7C8894;
}
.crumbs a { color: var(--blue); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }

/* the "what happens next" line inside each code card */
.code-action { margin-top: 12px; }
.code-action strong { color: var(--ink); }

/* home page: pointer to the C codes page where the codes used to sit */
.cross-link {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 26px;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px 30px;
  margin-bottom: 76px;
}
.cross-link h3 { font-size: 20px; margin-bottom: 8px; }
.cross-link p { margin: 0; max-width: 620px; }

@media (max-width: 700px) {
  .page-header { padding: 44px 0 40px; }
  .page-lead { font-size: 17px; }
  .cross-link { padding: 24px 22px; margin-bottom: 52px; }
}

/* ==========================================================================
   EICR explained — five-year rule, C codes, remedial work
   ========================================================================== */

.explain-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  margin-bottom: 72px;
}
.explain-copy p { margin-bottom: 20px; }
.explain-copy p:last-child { margin-bottom: 0; }
.explain-copy strong { color: var(--ink); }

.explain-facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px 30px;
}
.explain-facts h3 { font-size: 20px; margin-bottom: 20px; }
.fact-list { list-style: none; }
.fact-list li {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.fact-list li:first-of-type { border-top: 0; padding-top: 0; }
.fact-list li:last-child { padding-bottom: 0; }
.fact-list strong {
  display: block;
  color: var(--accent);
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.fact-list span { display: block; font-size: 16px; line-height: 1.55; }

.sub-head { font-size: 25px; margin-bottom: 14px; }
.sub-lead { max-width: 760px; margin-bottom: 34px; }

/* --- C1 / C2 / C3 / FI — set exactly like the home page's service cards:
   a coloured circle overlapping the card top, blue title, charcoal outcome
   bar with a chip, hover lift. --- */
.code-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 92px 24px;
  margin-top: 76px;
}
.code-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  padding-top: 64px;
  transition: transform .2s ease, border-color .2s ease;
}
.code-card:hover { transform: translateY(-4px); border-color: #39434F; }
.code-circle {
  position: absolute;
  top: -46px; left: 50%;
  transform: translateX(-50%);
  width: 92px; height: 92px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--code, var(--accent));
  color: #14181D;
  font-size: 30px; font-weight: 800;
  border: 6px solid var(--band);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
}
.code-card .code-body { padding: 0 24px 22px; flex: 1 1 auto; }
.code-card h2 { color: var(--blue); font-size: 20px; margin-bottom: 10px; }
.code-card p { font-size: 15.5px; line-height: 1.6; }
.code-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  background: var(--btn);
  color: #fff;
  font-weight: 700; font-size: 13.5px;
  padding-left: 22px;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  overflow: hidden;
}
.code-bar .btn-chip {
  width: 46px; min-height: 46px;
  align-self: stretch; flex-shrink: 0;
  background: var(--code, var(--accent));
  color: #14181D;
}
.code-bar .btn-chip svg { width: 14px; height: 14px; }

/* code chips in the detail heads — same shape the home page uses for chips */
.code-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--code, var(--accent));
  color: #12171D;
  font-weight: 800; font-size: 16px; letter-spacing: .04em;
}

/* header legend: pill chips like the site's floating pills */
.code-legend {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 30px;
}
.code-legend a {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px;
  background: rgba(18, 23, 29, .72);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px; font-weight: 700;
  color: #D4DBE2;
  transition: border-color .15s ease, color .15s ease;
}
.code-legend a b { color: var(--code); font-weight: 800; }
.code-legend a:hover { border-color: var(--code); color: #fff; }

/* the at-a-glance panel: results coloured by consequence */
.outcome-panel .fact-list li:nth-child(-n+3) strong { color: #F2555A; }
.outcome-panel .fact-list li:nth-child(4) strong { color: #5FAFE8; }

@media (max-width: 1240px) {
  .code-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .code-grid { grid-template-columns: 1fr; gap: 84px; }
}

.code-c1 { --code: #F2555A; }   /* danger        */
.code-c2 { --code: #F0902F; }   /* potentially   */
.code-c3 { --code: #5FAFE8; }   /* recommended   */
.code-fi { --code: #A88BE0; }   /* investigate   */

.code-note {
  max-width: 900px;
  margin: 32px 0 76px;
  padding: 18px 22px;
  background: var(--band);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  font-size: 16.5px;
}
.code-note strong { color: var(--ink); }

/* --- remedial work --- */
.remedy-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}
.remedy-list { list-style: none; }
.remedy-list li {
  position: relative;
  padding: 0 0 16px 34px;
  font-size: 16.5px;
  line-height: 1.6;
}
.remedy-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 15px; height: 8px;
  border-left: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg);
  border-radius: 1px;
}
.remedy-list strong { color: var(--ink); }

.remedy-media { margin: 0; }
.remedy-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.remedy-media figcaption {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.5;
  color: #8894A0;
}

.explain-cta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 28px;
  margin-top: 56px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.explain-cta p { flex: 1 1 420px; margin: 0; }

.disclaimer {
  margin-top: 26px;
  font-size: 14.5px;
  color: #7C8894;
  font-style: italic;
}

@media (max-width: 1240px) {
  .explain-grid { grid-template-columns: 1fr; gap: 40px; }
  .remedy-wrap { grid-template-columns: 1fr; gap: 36px; }
  .remedy-media { order: -1; }
}

@media (max-width: 700px) {
  .explain-grid { margin-bottom: 52px; }
  .explain-facts { padding: 26px 22px; }
  .code-note { margin: 26px 0 56px; }
  .sub-head { font-size: 21px; }
  .explain-cta { margin-top: 42px; gap: 22px; }
}

/* ==========================================================================
   Sectors
   ========================================================================== */

.sector-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  padding: 74px 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 56px;
  text-align: center;
}
.sector-icon { display: block; width: 76px; height: 76px; margin: 0 auto 26px; color: var(--accent); }
.sector-icon svg { width: 100%; height: 100%; }
.sector h3 { color: var(--blue); font-size: 21px; margin-bottom: 12px; }
.sector p { font-size: 17px; }

/* ==========================================================================
   Accreditations
   ========================================================================== */

.accr-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px;
}
.accr-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  min-height: 150px;
  padding: 24px 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px;
  transition: border-color .2s ease;
}
.accr-tile:hover { border-color: var(--accent); }
.accr-tile strong {
  color: var(--accent);
  font-size: 24px; font-weight: 800; letter-spacing: .02em;
}
.accr-tile span { font-size: 14.5px; line-height: 1.4; }

/* ==========================================================================
   News cards
   ========================================================================== */

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);
  display: flex; flex-direction: column;
  transition: transform .2s ease, border-color .2s ease;
}
.news-card:hover { transform: translateY(-4px); border-color: #39434F; }
.news-card > img {
  width: 100%; aspect-ratio: 16 / 10.5; object-fit: cover;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.news-body { padding: 28px 26px 20px; flex: 1 1 auto; }
.news-body h3 { color: var(--blue); font-size: 20.5px; margin-bottom: 14px; }
.news-body p { font-size: 16.5px; }

.news-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding-left: 26px;
  color: var(--blue);
  font-weight: 700; font-size: 17px;
  text-decoration: underline;
  text-underline-offset: 4px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  overflow: hidden;
}
.news-bar .btn-chip { min-height: 52px; align-self: stretch; }
.news-bar:hover { color: var(--accent); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  position: relative;
  background: var(--slate);
  border-top: 6px solid var(--accent);
  border-image: linear-gradient(90deg, #FFA733 0%, #FF7A00 50%, #E96B00 100%) 1;
  color: #C7CFD6;
  padding: 86px 0 30px;
  margin-top: 60px;
}
.back-top {
  position: absolute;
  top: -6px; right: 40px;
  width: 56px; height: 52px;
  background: var(--accent-grad);
  color: #23282D;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0 0 8px 8px;
}
.back-top svg { width: 22px; height: 14px; }
.back-top:hover { background: var(--accent-grad-hover); }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 320px));
  justify-content: center;
  gap: 72px;
}
.footer-col h3 { color: #fff; font-size: 20px; margin-bottom: 24px; }
.footer-col p { margin-bottom: 16px; font-size: 17px; }
.footer-col a { color: #C7CFD6; text-decoration: none; }
.footer-col a:hover { color: var(--accent); }

.socials { display: flex; gap: 22px; }
.socials a { color: #C7CFD6; }
.socials a:hover { color: var(--accent); }
.socials svg { width: 30px; height: 30px; }

.footer-legal { margin-top: 70px; }
.footer-legal p {
  font-size: 14.5px; color: #7C8894; line-height: 1.7;
}

/* ==========================================================================
   Chat pill — yellow on dark now, mirrors the accent
   ========================================================================== */

.chat-pill {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: 90;
  display: flex; align-items: center; gap: 12px;
  background: var(--accent-grad);
  color: #14181D;
  text-decoration: none;
  font-weight: 800; font-size: 17px;
  padding: 15px 26px;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .55);
  transition: background .15s ease, transform .15s ease;
}
.chat-pill:hover { background: var(--accent-grad-hover); transform: translateY(-2px); }
.chat-icon { display: flex; }
.chat-icon svg { width: 24px; height: 24px; }

/* ==========================================================================
   Per-image upload buttons (js/admin.js) — overrides live in IndexedDB only
   ========================================================================== */

.hero, .split-media, .news-card, .remedy-media,
.page-header, .page-media { position: relative; }

.upload-btn {
  position: absolute; z-index: 6;
  top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-grad);
  color: #14181D;
  border: 0; border-radius: 999px;
  font: 800 13px/1 'Nunito', 'Segoe UI', system-ui, sans-serif;
  padding: 9px 15px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
  transition: background .15s ease, transform .15s ease;
}
.upload-btn:hover { background: var(--accent-grad-hover); transform: translateY(-1px); }
.upload-btn svg { width: 16px; height: 16px; }

/* circles clip their corners — centre the button along the bottom instead */
.svc-photo .upload-btn {
  top: auto; bottom: 16px;
  right: 50%; transform: translateX(50%);
}
.svc-photo .upload-btn:hover { transform: translateX(50%) translateY(-1px); }

.hero > .upload-btn { top: 18px; right: 18px; }

/* --- hero darkness slider (sits under the hero's Change photo button) --- */
.hero-dark {
  position: absolute; z-index: 6;
  top: 66px; right: 18px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(18, 23, 29, .82);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: 8px 16px 8px 14px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}
.hero-dark > svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.hero-dark label {
  font: 800 12px/1 'Nunito', 'Segoe UI', system-ui, sans-serif;
  color: #E7EBEE; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
}
.hero-dark output {
  font: 700 12px/1 'Nunito', 'Segoe UI', system-ui, sans-serif;
  color: var(--accent);
  min-width: 34px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.hero-dark input[type='range'] {
  -webkit-appearance: none; appearance: none;
  width: 120px; height: 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,.25), #000);
  cursor: pointer;
}
.hero-dark input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent-grad);
  border: 2px solid #12171D;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}
.hero-dark input[type='range']::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%;
  background: #FF7A00;
  border: 2px solid #12171D;
}

@media (max-width: 700px) {
  .hero-dark { padding: 7px 12px; gap: 7px; top: 60px; right: 14px; }
  .hero-dark label { display: none; }
  .hero-dark input[type='range'] { width: 88px; }
}

/* ==========================================================================
   Reveal on scroll (no-JS safe: only hidden under html.js)
   ========================================================================== */

html.js .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}
html.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logo-oval::after { animation: none; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .drop, .svc-card, .news-card, .chat-pill { transition: none; }
  .svc-card:hover, .news-card:hover, .chat-pill:hover { transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1500px) {
  #nav-menu > li > a,
  #nav-menu > li > button { padding: 18px 10px; font-size: 16.5px; }
  .contact-item { font-size: 15px; }
}

/* Step the lockup down through the desktop band so the header keeps one row. */
@media (max-width: 1300px) {
  .logo-oval { font-size: 20px; padding: 10px 13px 12px; }
  .logo-oval small { font-size: 11.5px; }
  .logo-word { font-size: 22px; }
}

@media (max-width: 1240px) {
  .header-contacts { gap: 20px; }
  .header-search { width: 190px; }
  /* last squeeze before the burger takes over at 1023 */
  .header-inner { gap: 24px; }
  .logo-oval { font-size: 18px; padding: 9px 12px 11px; }
  .logo-oval small { font-size: 10.5px; }
  .logo-word { font-size: 19px; }
  /* 7 top-level items incl. the long "Electrical Safety" — this band is the
     tightest one before the burger takes over at 1023px */
  #nav-menu > li > a,
  #nav-menu > li > button { padding: 18px 5px; font-size: 14.5px; }
  .contact-item { font-size: 14px; }
  .header-search { width: 160px; }
  .usp-grid { grid-template-columns: repeat(2, 1fr); gap: 48px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .accr-grid { grid-template-columns: repeat(3, 1fr); }
  .sector-card { grid-template-columns: repeat(2, 1fr); padding: 56px 40px; }
  .split { grid-template-columns: 1fr; gap: 44px; }
  .split-media { order: -1; }
}

@media (max-width: 1023px) {
  :root { --header-h: 84px; }

  .header-inner { gap: 20px; }
  .logo { align-self: center; padding-bottom: 0; }
  .logo-oval { font-size: 17px; padding: 8px 11px 10px; }
  .logo-oval small { font-size: 10px; margin-top: 1px; }
  .logo-word { font-size: 18px; }

  .header-top { display: none; }
  .header-right { flex: 0 0 auto; }

  .nav-toggle { display: flex; }

  #nav-menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--surface);
    border-top: 5px solid var(--accent);
    box-shadow: 0 22px 36px rgba(0, 0, 0, .55);
    display: none;
  }
  .main-nav.open #nav-menu { display: flex; }
  #nav-menu > li { display: block; border-bottom: 1px solid var(--line); }
  #nav-menu > li > a,
  #nav-menu > li > button {
    width: 100%; justify-content: space-between;
    padding: 15px 28px; font-size: 18px;
  }
  .drop {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-radius: 0;
    display: none;
    background: var(--bg);
  }
  .has-drop.open .drop { display: block; }
  /* On mobile, hover must not open drops — click only */
  .has-drop:hover .drop, .has-drop:focus-within .drop { display: none; }
  .has-drop.open:hover .drop, .has-drop.open:focus-within .drop { display: block; }
  /* in the drawer the Locations list is a plain single column */
  .drop-wide { min-width: 0; }

  .hero-inner { padding: 64px 32px 76px; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .header-inner { padding: 0 20px; gap: 14px; }

  /* keep the stacked lockup + burger on one row */
  .logo { gap: 9px; }
  .logo-oval { font-size: 15px; padding: 8px 10px 9px; }
  .logo-oval small { font-size: 9px; }
  .logo-word { font-size: 16px; }
  .hero-inner { padding: 52px 20px 64px; }
  .hero p { font-size: 17px; }

  .usps { padding: 64px 0 56px; }
  .usp-grid { grid-template-columns: 1fr; gap: 44px; }
  .band { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }
  .section-head h2, .split-copy h2 { font-size: 26px; }

  .card-grid { grid-template-columns: 1fr; gap: 180px; margin-top: 186px; }
  .news-grid { grid-template-columns: 1fr; }
  .accr-grid { grid-template-columns: repeat(2, 1fr); }
  .sector-card { grid-template-columns: 1fr; padding: 44px 28px; gap: 40px; }

  .footer-cols { grid-template-columns: 1fr; gap: 40px; }
  .back-top { right: 20px; }
  .chat-pill { right: 14px; bottom: 14px; padding: 12px 18px; font-size: 15px; }
}

/* ==========================================================================
   Admin mode — must stay LAST: these rules gate the editing controls and
   rely on source order to beat the display values in their own rulesets.
   ========================================================================== */

/* --- image focus picker -------------------------------------------------
   Every cover-cropped image (object-fit / background-size: cover) is cropped
   from its centre by default, which can cut off the subject. The Focus button
   turns the image into a click target: clicking (or dragging, or arrow-keying)
   sets object-position / background-position, so the chosen point stays in
   frame at every screen size. */
.focus-btn {
  position: absolute; z-index: 7;
  top: 56px; right: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(18, 23, 29, .88);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font: 800 13px/1 'Nunito', 'Segoe UI', system-ui, sans-serif;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
  transition: background .15s ease, color .15s ease;
}
.focus-btn:hover { background: var(--accent); color: #14181D; }
.focus-btn svg { width: 15px; height: 15px; }
.focusing > .focus-btn { background: var(--accent); color: #14181D; }

/* circles: Change photo sits bottom-centre, so Focus goes top-centre */
.svc-photo .focus-btn {
  top: 14px; right: 50%;
  transform: translateX(50%);
}
/* hero: below Change photo and the Darkness slider */
.hero > .focus-btn { top: 114px; right: 18px; }

.focus-layer {
  position: absolute; inset: 0; z-index: 6;
  display: none;
  cursor: crosshair;
  background: rgba(10, 14, 19, .35);
  touch-action: none;
}
.focusing > .focus-layer { display: block; }
.focus-layer:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

.focus-dot {
  position: absolute;
  width: 28px; height: 28px;
  margin: -14px 0 0 -14px;          /* centre on the point without a transform */
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .65), 0 2px 10px rgba(0, 0, 0, .7);
  pointer-events: none;
}
.focus-dot::after {
  content: '';
  position: absolute; inset: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.focus-hint {
  position: absolute; left: 50%; bottom: 10px;
  transform: translateX(-50%);
  background: rgba(10, 14, 19, .9);
  color: #E7EBEE;
  font: 700 11px/1.3 'Nunito', 'Segoe UI', system-ui, sans-serif;
  padding: 6px 11px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
}
.svc-photo .focus-hint { display: none; }   /* no room inside the circle */

@media (max-width: 700px) {
  .focus-btn { padding: 7px 11px; font-size: 12px; }
  .hero > .focus-btn { top: 104px; right: 14px; }
  .focus-hint { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .focus-btn { transition: none; }
}

/* ==========================================================================
   News article pages & pricing
   ========================================================================== */

/* long-form copy runs narrower than the full container for readability */
.article-copy { max-width: 900px; }

/* photo-less cards: common-findings on articles, tiers on pricing */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 26px;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 30px 28px 28px;
  /* 4px orange-gradient strip along the top, clipped by the radius */
  background-image: var(--accent-grad);
  background-size: 100% 4px;
  background-repeat: no-repeat;
  background-position: top;
}
.info-card h3 { color: var(--blue); font-size: 20px; margin-bottom: 10px; }
.info-card p { margin: 0; }

/* pricing tiers reuse the info card with a large price line on top */
.price-line {
  display: block;
  font-size: 30px; font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
  line-height: 1.1;
}

@media (max-width: 700px) {
  .info-grid { grid-template-columns: 1fr; }
}

/* Mid-page call to action.
   Long pages used to carry their only button in the final few lines, so a
   reader part-way down had nothing to act on. This compact strip sits at a
   section boundary near the middle: quieter than the closing CTA block, but
   always within reach. */
.cta-strip {
  display: flex; align-items: center; justify-content: space-between;
  gap: 26px; flex-wrap: wrap;
  margin-top: 46px;
  padding: 26px 30px 26px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  background-color: var(--surface);
  background-image: var(--accent-grad);   /* accent edge, clipped by the radius */
  background-size: 5px 100%;
  background-repeat: no-repeat;
  background-position: left center;
}
.cta-strip-copy { flex: 1 1 320px; }
.cta-strip h3 { font-size: 21px; margin-bottom: 6px; }
.cta-strip p { margin: 0; font-size: 16.5px; }
.cta-strip .btn-primary { flex: 0 0 auto; }

@media (max-width: 700px) {
  .cta-strip { padding: 22px 20px 22px 24px; gap: 18px; }
  .cta-strip .btn-primary { width: 100%; }
}

/* Unresolved placeholders in the legal pages. Deliberately loud: these need
   the owner's real details (ICO registration, company number, retention
   periods) before the site goes live, and must never ship unnoticed. */
.todo-flag {
  background: rgba(255, 122, 0, .16);
  color: #FFC98A;
  border: 1px dashed var(--accent);
  border-radius: 5px;
  padding: 1px 7px;
  font-weight: 700;
  font-size: .93em;
}

/* Call to action inside a page banner. Inner pages used to open with a
   heading and a paragraph and nothing to click, so the first action was
   often hundreds of lines down the page. */
.banner-cta {
  margin-top: 28px;
}

@media (max-width: 700px) {
  .banner-cta { margin-top: 22px; }
}

/* --- admin mode gate ---------------------------------------------------
   Every editing control is hidden until the floating Admin button turns
   edit mode on (html.admin-on). Hiding is the CSS default, so the controls
   never flash on load. Content the controls produced — uploaded images and
   the saved hero darkness — always displays, admin mode or not. */
.upload-btn,
.focus-btn,
.hero-dark { display: none; }
html.admin-on .upload-btn { display: inline-flex; }
html.admin-on .focus-btn { display: inline-flex; }
html.admin-on .hero-dark { display: flex; }

/* --- the Admin toggle itself (bottom-left, opposite the chat pill) --- */
/* Sits in the normal flow at the very end of the page, after the footer, so
   it scrolls away with the content instead of floating over it. Small and
   quiet: it is a maintenance control, not part of the site's message. */
.admin-toggle {
  display: flex; align-items: center; gap: 7px;
  margin: 0 auto;
  background: transparent;
  color: #66727E;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 700 11.5px/1 'Nunito', 'Segoe UI', system-ui, sans-serif;
  padding: 7px 13px;
  cursor: pointer;
  opacity: .55;
  transition: opacity .15s ease, color .15s ease, border-color .15s ease, background .15s ease;
}
.admin-toggle:hover { opacity: 1; color: #C7CFD6; border-color: #3C4855; }
.admin-toggle svg { width: 12px; height: 12px; flex-shrink: 0; }

/* the strip of page the button sits on, below the footer.
   The "Leave A Message" pill is fixed to the bottom-right of the viewport, so
   the bar reserves enough height for the button to clear it once the reader
   has scrolled all the way down. */
.admin-bar {
  display: flex; justify-content: center;
  padding: 16px 20px 22px;
  background: var(--slate);
}

@media (max-width: 900px) {
  .admin-bar { padding-bottom: 84px; }
}
.admin-toggle .admin-state { opacity: .65; font-weight: 700; }

html.admin-on .admin-toggle {
  opacity: 1;
  background: var(--accent-grad);
  color: #14181D;
  border-color: transparent;
}
html.admin-on .admin-toggle .admin-state { opacity: .8; }

@media (max-width: 700px) {
  .admin-toggle { padding: 6px 12px; font-size: 11px; }
  .admin-toggle .admin-state { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-toggle { transition: none; }
  .admin-toggle:hover { transform: none; }
}

.upload-btn.upload-failed { background: #F2555A; color: #fff; }

.admin-toast {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translateX(-50%) translateY(14px);
  z-index: 120;
  max-width: min(560px, calc(100vw - 32px));
  background: #F2555A;
  color: #fff;
  font: 700 15px/1.45 'Nunito', 'Segoe UI', system-ui, sans-serif;
  padding: 13px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.admin-toast.show { opacity: 1; visibility: visible; transform: translateX(-50%); }
@media (prefers-reduced-motion: reduce) { .admin-toast { transition: none; } }
