/* Centrepiece (Oscar's pick, 28 to 29 Nov 2026, from design-demos/centrepiece.html: centrepiece B, rings round the phone):
   an example on a phone with pen notes and a Before/After switch, straight under the hero on the Google rankings and
   Websites pages, on the hero band. Drawn by /js/centrepiece.js. */

.cp-room { position: relative; --gap: var(--s8); padding-bottom: var(--s8); }
.cp { margin: 0; }

/* ---- the frame: same bezel, radius and shadow as the home phone ---- */
.cp {
  --cp-frame: oklch(24% 0.01 260);
  --cp-sheet: oklch(99.2% 0.002 250);
  --cp-ink: oklch(24% 0.01 260);
  --cp-ink-2: oklch(47% 0.012 260);
  --cp-line: oklch(89% 0.006 260);
  --cp-skel: oklch(91% 0.005 260);
  --cp-blue: oklch(48% 0.17 262);       /* result title, like a search result link */
  --cp-green: oklch(45% 0.11 150);
  --cp-brand: oklch(40% 0.09 245);      /* the example roofer's own colour, inside the phone only */
  --cp-marker-bg: oklch(30% 0.02 260);
  --cp-marker-ink: oklch(98.5% 0.004 260);
  --cp-phone: 300px;
}
.cp-title { max-width: 12em; }
.cp-side { margin-top: var(--s5); }
.cp-label { font-weight: 600; font-size: 1rem; color: var(--ink-2); }
.cp-switch { display: none; gap: 4px; padding: 4px; border-radius: 999px; background: oklch(92% 0.006 260); width: max-content; margin-top: var(--s3); }
.cp-room.has-js .cp-switch { display: inline-flex; } /* set by centrepiece.js: no dead switch without JS */
.cp-switch button {
  min-height: 48px; min-width: 96px; padding: 0 22px; border: 0; border-radius: 999px; background: transparent;
  font: 700 1rem/1 var(--head); color: var(--ink); cursor: pointer;
}
.cp-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.cp-switch button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.cp-stage { position: relative; margin-top: var(--s6); }
.cp-phone {
  container-type: inline-size; position: relative; z-index: 1;
  display: flex; box-sizing: border-box; width: var(--cp-phone); max-width: 100%; aspect-ratio: 320 / 680; margin-inline: auto;
  padding: 10px; border-radius: 44px; background: var(--cp-frame);
  box-shadow: 0 1px 2px oklch(20% 0.01 260 / .12), 0 18px 40px -18px oklch(20% 0.01 260 / .35);
}
.cp-screen {
  position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 34px; background: var(--cp-sheet);
  color: var(--cp-ink); font-family: Roboto, "Segoe UI", system-ui, sans-serif; line-height: 1.3; text-align: left;
  font-size: clamp(9px, 4.2cqi, 16px);
}
.cp-screen::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3.4em; pointer-events: none;
  background: linear-gradient(to bottom, oklch(99.2% 0.002 250 / 0), var(--cp-sheet) 80%);
}
.cp-status { display: flex; align-items: center; justify-content: space-between; height: 2.2em; padding: 0 1.9em; }
.cp-status i { display: block; width: 2.4em; height: .5em; border-radius: .25em; background: oklch(32% 0.01 260); }
.cp-status b { display: flex; gap: .3em; }
.cp-status b span { width: .55em; height: .55em; border-radius: 50%; background: oklch(32% 0.01 260); }
.cp-skel { display: block; height: .62em; border-radius: .31em; background: var(--cp-skel); width: var(--w, 100%); }
.cp-skel + .cp-skel { margin-top: .5em; }
.cp-part { position: relative; }
.cp-marker {
  position: absolute; right: 0; top: 0; display: inline-grid; place-items: center; width: 1.75em; height: 1.75em; border-radius: 50%;
  background: var(--cp-marker-bg); color: var(--cp-marker-ink); font: 700 .9em/1 system-ui, "Segoe UI", sans-serif;
  box-shadow: 0 0 0 2px var(--cp-sheet);
}
.cp[data-state="after"] [data-state="before"], .cp[data-state="before"] [data-state="after"] { display: none; }
.cp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- Google rankings: a results page for "roofer st albans" ---- */
.sr-search { display: flex; align-items: center; gap: .6em; margin: .2em .9em .7em; padding: .7em 1em; border-radius: 999px; background: oklch(95% 0.004 260); font-size: 1.05em; }
.sr-search svg { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: var(--cp-ink-2); stroke-width: 2.4; stroke-linecap: round; }
.sr-tabs { display: flex; gap: 1.2em; padding: 0 1.1em .55em; border-bottom: 1px solid var(--cp-line); color: var(--cp-ink-2); font-size: .92em; }
.sr-tabs span:first-child { color: var(--cp-ink); font-weight: 600; box-shadow: 0 .6em 0 -.4em var(--cp-ink); }
.sr-block { margin: .8em .9em 0; padding: .8em .9em; border-radius: .9em; border: 1px solid var(--cp-line); }
.sr-map { height: 5.6em; margin: -.8em -.9em .7em; border-radius: .9em .9em 0 0; overflow: hidden; background: oklch(95.5% 0.008 120); }
.sr-map svg { display: block; width: 100%; height: 100%; }
.sr-biz { display: flex; justify-content: space-between; gap: .6em; padding: .45em 0; border-top: 1px solid var(--cp-line); }
.sr-biz:first-of-type { border-top: 0; }
.sr-biz strong { font-weight: 600; }
.sr-biz small { display: block; color: var(--cp-ink-2); font-size: .85em; }
.sr-result { margin: .9em .9em 0; padding: 0 .1em; }
.sr-site { display: flex; align-items: center; gap: .6em; }
.sr-fav { width: 1.9em; height: 1.9em; border-radius: 50%; background: oklch(93% 0.02 245); display: grid; place-items: center; font-weight: 700; font-size: .8em; color: var(--cp-brand); flex: none; }
.sr-site b { display: block; font-weight: 500; font-size: .95em; }
.sr-site small { display: block; color: var(--cp-ink-2); font-size: .85em; }
.sr-title { display: block; margin: .35em 0 .3em; color: var(--cp-blue); font-size: 1.32em; line-height: 1.25; }
.sr-links { display: flex; flex-wrap: wrap; gap: .4em; margin-top: .7em; padding-right: 2.2em; }
.sr-links span:not(.cp-marker) { padding: .35em .8em; border-radius: 999px; border: 1px solid var(--cp-line); color: var(--cp-blue); font-size: .9em; }
.sr-result--ghost { opacity: 1; }
.sr-result--ghost .sr-fav { background: var(--cp-skel); }

/* ---- Websites: an example roofer's site on the phone ---- */
.ws-bar { margin: 0 .9em .5em; padding: .55em .9em; border-radius: 999px; background: oklch(95% 0.004 260); color: var(--cp-ink-2); font-size: .9em; text-align: center; }
.ws-head { display: flex; align-items: center; justify-content: space-between; gap: .6em; padding: .55em 1em; border-bottom: 1px solid var(--cp-line); }
.ws-logo { font-weight: 700; color: var(--cp-brand); font-size: 1.05em; }
.ws-call { display: inline-flex; align-items: center; gap: .4em; padding: .5em .9em; border-radius: .5em; background: var(--cp-brand); color: oklch(98.5% 0.004 245); font-weight: 600; font-size: .92em; }
.ws-call svg { width: 1em; height: 1em; fill: currentColor; }
.ws-burger { display: grid; gap: .25em; width: 1.4em; }
.ws-burger i { display: block; height: .18em; border-radius: .1em; background: var(--cp-ink-2); }
.ws-nav { display: flex; gap: .6em; font-size: .62em; color: var(--cp-ink-2); }
.ws-photo { display: block; width: 100%; height: 10.5em; object-fit: cover; }
.ws-photo--none { display: grid; place-items: center; height: 10.5em; background: oklch(93% 0.004 260); color: var(--cp-ink-2); font-size: .85em; }
.ws-body { padding: .9em 1em 0; }
.ws-h1 { font-size: 1.75em; line-height: 1.12; font-weight: 700; letter-spacing: -.01em; }
.ws-h1--weak { font-size: 1.25em; font-weight: 400; }
.ws-btns { display: grid; gap: .5em; margin-top: .9em; }
.ws-btn { display: block; padding: .75em; border-radius: .55em; text-align: center; font-weight: 600; }
.ws-btn--fill { background: var(--cp-brand); color: oklch(98.5% 0.004 245); }
.ws-btn--line { box-shadow: inset 0 0 0 1.5px var(--cp-brand); color: var(--cp-brand); }
.ws-rows { display: grid; gap: .8em; margin-top: .9em; }
.ws-rows > span { display: flex; align-items: center; gap: .7em; }
.ws-rows i { width: 1.6em; height: 1.6em; border-radius: .4em; background: oklch(93% 0.02 245); flex: none; }
.ws-rows .cp-skel { flex: 1; max-width: var(--w); }
.ws-foot { margin-top: 1.4em; padding-top: .7em; border-top: 1px solid var(--cp-line); color: var(--cp-ink-2); font-size: .7em; }

/* ---- notes ---- */
.cp-notes { list-style: none; margin: var(--s6) auto 0; padding: 0; max-width: 34rem; display: grid; gap: var(--s4); }
.cp-notes li { position: relative; padding-left: 40px; font: 400 1.5rem/1.15 var(--pen); color: var(--ink); }
.cp-notes li::before {
  content: attr(data-n); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--cp-marker-bg); color: var(--cp-marker-ink); font: 700 .875rem/1 system-ui, "Segoe UI", sans-serif;
}
.cp-leaders { display: none; }
.cp-leaders path { fill: none; stroke: var(--edge); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Hung on the wall (1024px and up, set by cp.js as .is-hung): notes sit beside the phone at each marker's height. */
@media (min-width: 1024px) {
  .cp { --cp-phone: 320px; --cp-gap: 88px; }
  .is-hung .cp-notes { margin: 0; max-width: none; display: block; position: static; }
  .is-hung .cp-notes li { position: absolute; top: var(--y, 0); font-size: 1.625rem; }
  .is-hung .cp-leaders { display: block; position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 2; }
  .is-hung .cp-notes li.is-left { right: calc(50% + var(--cp-phone) / 2 + var(--cp-gap)); width: min(22rem, calc(50% - var(--cp-phone) / 2 - var(--cp-gap))); text-align: right; padding: 0 40px 0 0; }
  .is-hung .cp-notes li.is-left::before { left: auto; right: 0; }
  .is-hung .cp-notes li.is-right { left: calc(50% + var(--cp-phone) / 2 + var(--cp-gap)); width: min(22rem, calc(50% - var(--cp-phone) / 2 - var(--cp-gap))); }

  /* A and B: the title opens the left wall, the label (and switch) the right wall, level with the phone's top.
     All three share one grid cell, so the heading stays in flow (its rail dot measures from the section). */
  .is-hung .cp { display: grid; }
  .is-hung .cp > * { grid-row: 1; grid-column: 1; align-self: start; }
  .is-hung .cp-title { justify-self: start; max-width: min(9.5em, calc(50% - var(--cp-phone) / 2 - 48px)); }
  .is-hung .cp-side { justify-self: start; margin: 0 0 0 calc(50% + var(--cp-phone) / 2 + var(--cp-gap)); z-index: 2; position: relative; }
  .is-hung .cp-stage { margin-top: 0; }

}

/* ---- background options ---- */
.cp-ripples.bg-layer { z-index: 0; overflow: clip; }
@media print { .cp-ripples { display: none; } }
