/* Screenshot-led refinements; existing grid, motion and responsive modes remain canonical. */
:root {
  --loop-breath: clamp(120px, 12vw, 260px);
  --brand-reveal-ms: 2200;
}

/* The existing disc and Phi stay intact. Only its static perimeter is extended. */
.side-logo { position: relative; isolation: isolate; }
.side-logo::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -1;
  background: var(--white);
  pointer-events: none;
  clip-path: polygon(47.65% 10.47%, 50.00% 3.50%, 52.35% 10.47%, 62.96% 12.58%, 67.41% 7.96%, 67.30% 14.38%, 76.29% 20.39%, 83.59% 16.41%, 79.61% 23.71%, 85.62% 32.70%, 92.50% 32.40%, 87.42% 37.04%, 89.53% 47.65%, 96.50% 50.00%, 89.53% 52.35%, 87.42% 62.96%, 92.04% 67.41%, 85.62% 67.30%, 79.61% 76.29%, 83.59% 83.59%, 76.29% 79.61%, 67.30% 85.62%, 67.60% 92.50%, 62.96% 87.42%, 52.35% 89.53%, 50.00% 96.50%, 47.65% 89.53%, 37.04% 87.42%, 32.59% 92.04%, 32.70% 85.62%, 23.71% 79.61%, 16.41% 83.59%, 20.39% 76.29%, 14.38% 67.30%, 7.50% 67.60%, 12.58% 62.96%, 10.47% 52.35%, 3.50% 50.00%, 10.47% 47.65%, 12.58% 37.04%, 7.96% 32.59%, 14.38% 32.70%, 20.39% 23.71%, 16.41% 16.41%, 23.71% 20.39%, 32.70% 14.38%, 32.40% 7.50%, 37.04% 12.58%);
}

/* Hairline travels with the photograph/screen, not a stationary faux browser. */
.plate .swing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1px solid var(--royal-900);
  pointer-events: none;
}
.media-surface { position: relative; background: var(--paper-2); overflow: hidden; }
.media-surface > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-credit { position: absolute; z-index: 4; inset-inline-end: 10px; bottom: 10px; max-width: calc(100% - 20px); }
.photo-credit a {
  display: inline-block;
  padding: .4em .6em;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  color: var(--ink);
  font-size: clamp(11px, .8vw, 14px);
  line-height: 1.3;
  text-decoration: none;
  transition: color 160ms var(--control-ease), background-color 160ms var(--control-ease);
}
.photo-credit a:hover { color: var(--royal-900); background: var(--white); }
.photo-credit a:active { opacity: .75; }

/* Genuine original colours, including ink variants for genuinely monochrome marks. */
.brands-grid .brand-link img { filter: saturate(0); }
.panel--brands.is-color .brands-grid .brand-link img { filter: saturate(1); }
.brand-link:hover { opacity: .82; }
.brand-link { --brand-width: 184px; --brand-height: 68px; }
.brand-link--cornelsen { --brand-width: 220px; }
.brand-link--smc { --brand-width: 150px; --brand-height: 76px; }
.brand-link--leybold { --brand-width: 184px; }
.brand-link--phywe { --brand-width: 176px; }
.brand-link--lucas-nuelle { --brand-width: 66px; --brand-height: 66px; }
.brand-link--cool-tool { --brand-width: 160px; --brand-height: 74px; }
.brand-link--microbit { --brand-width: 180px; }
.brand-link--skilltoolkit { --brand-width: 166px; --brand-height: 70px; }
.brand-link--dobot { --brand-width: 156px; }
.brand-link--gunt { --brand-width: 132px; --brand-height: 60px; }
.brand-link--gratnells { --brand-width: 158px; --brand-height: 70px; }
.brand-link--tts { --brand-width: 118px; --brand-height: 64px; }

@media (min-width: 900px) and (min-aspect-ratio: 1/1) and (min-height: 520px) {
  .side-brand { margin-top: clamp(18px, 2.5svh, 30px); font-size: clamp(32px, 3.25vw, 62px); font-weight: 750; line-height: .98; letter-spacing: -.04em; }
  .side-contact { position: relative; flex-shrink: 0; margin-top: 12px; }
  .side-contact summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65em;
    min-height: 44px;
    width: fit-content;
    margin-inline: auto;
    list-style: none;
    cursor: pointer;
    font-size: clamp(16px, 1.2vw, 22px);
  }
  .side-contact summary::-webkit-details-marker { display: none; }
  .side-contact summary::after {
    content: "";
    width: .65em;
    height: .65em;
    background: currentColor;
    clip-path: polygon(43% 0, 57% 0, 57% 43%, 100% 43%, 100% 57%, 57% 57%, 57% 100%, 43% 100%, 43% 57%, 0 57%, 0 43%, 43% 43%);
    transition: transform 160ms var(--control-ease);
  }
  .side-contact[open] summary::after { transform: rotate(45deg); }
  .side-contact summary:hover { color: var(--royal-300); }
  .side-contact summary:active { opacity: .7; }
  .side-contact summary:focus-visible { outline-color: var(--royal-300); }
  .side-contact__body {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    max-height: var(--contact-room, 20svh);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-gutter: stable both-edges;
    scrollbar-color: var(--royal-100) var(--ink-2);
    padding: 8px 5px;
    background: var(--ink-2);
    user-select: text;
  }
  .side-contact[open] > .side-contact__body {
    animation: contact-open 180ms var(--control-ease);
  }
  @keyframes contact-open {
    from { opacity: .35; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }
  :is(.no-anim, .is-motion-paused) .side-contact[open] > .side-contact__body { animation: none; }
  :is(.no-anim, .is-motion-paused) .side-contact summary::after { transition: none; }
  @media (prefers-reduced-motion: reduce) {
    .side-contact__body { animation: none !important; }
    .side-contact summary::after { transition: none; }
  }
  .side-phones { margin-block: 1.1em; }
  .fair-link { width: 86%; flex-shrink: 0; margin-top: clamp(24px, 3.4svh, 38px); margin-bottom: 0; font-size: clamp(20px, 1.85vw, 34px); font-weight: 600; line-height: 1.16; padding: 0; }
  .fair-link__dot { width: .22em; height: .22em; margin-left: .18em; }

  /* Both real hero and sanitized clone share this exact seam paint. At x=0 the
     line is safely beneath the fixed header; at the loop join it is exposed. */
  .panel--hero::before {
    content: "";
    position: absolute;
    inset-block: 10svh;
    inset-inline-start: calc(-1 * var(--m) - 2px);
    width: 2px;
    background: var(--royal-900);
    pointer-events: none;
  }
  .panel--brands {
    --brands-stage-width: max(780px, calc(100vw - var(--side-w) - var(--m)));
    width: calc(var(--brands-stage-width) + var(--loop-breath));
    min-width: 0;
    padding-inline-end: calc(var(--m) + var(--loop-breath));
  }
  .brands-grid { column-gap: clamp(24px, 2.1vw, 54px); }
}

@media (min-width: 900px) and (min-aspect-ratio: 1/1) and (min-height: 520px) and (max-height: 740px) {
  .side-logo { width: min(63%, 20svh); }
  .side-brand { margin-top: 16px; font-size: clamp(28px, 2.6vw, 44px); }
  .side-phones { margin-block: .75em; }
  .fair-link { font-size: clamp(18px, 1.65vw, 28px); margin-top: 3svh; }
}

@media (max-width: 899px), (max-aspect-ratio: 999/1000), (max-height: 519px) {
  .side-brand { font-size: clamp(18px, 4.8vw, 22px); font-weight: 700; }
  .side-contact__body .contact-fair-link { font-size: 18px; }
  .brand-link { padding-inline: clamp(10px, 3vw, 16px); }
  .brand-link--cornelsen { padding-inline: clamp(8px, 2vw, 16px); }
  .brand-link--smc { --brand-width: 146px; --brand-height: 72px; }
  .photo-credit a { min-height: 44px; display: flex; align-items: center; font-size: 11px; }
}
