/* Full-screen composition for the six compact brand-guide chapters. */
@media (min-width: 1100px) and (min-height: 620px) {
  .story-edition #logo.st-section,
  .story-edition #logo-clearspace.st-section,
  .story-edition #logo-rules.st-section,
  .story-edition #colour.st-section,
  .story-edition #digital.st-section,
  .story-edition #downloads.st-section {
    min-height: 100svh;
    padding: clamp(22px, 3.4vh, 38px) 0;
    justify-content: start;
    position: relative;
  }
  :is(#logo, #logo-clearspace, #colour, #digital) > .gv-head-sentinel {
    position: absolute;
    top: 0;
    left: 0;
  }

  .story-edition :is(#logo, #logo-clearspace, #colour, #digital) .st-section-head {
    position: relative;
    top: auto;
    z-index: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
    grid-template-rows: auto auto;
    align-items: end;
    gap: 4px 30px;
    margin: 0 0 clamp(16px, 2.5vh, 26px);
    padding: 0 0 clamp(13px, 2vh, 20px);
    background: transparent;
    border-bottom: 1px solid var(--line);
  }
  .story-edition :is(#logo, #logo-clearspace, #colour, #digital) .st-section-head .st-kicker {
    display: block;
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0;
  }
  .story-edition :is(#logo, #logo-clearspace, #colour, #digital) .st-section-head .st-headline {
    grid-column: 1;
    grid-row: 2;
    font-size: clamp(32px, 3.2vw, 44px);
    line-height: 1.08;
  }
  .story-edition :is(#logo, #logo-clearspace, #colour, #digital) .st-section-head > p {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    max-height: none;
    overflow: visible;
    white-space: normal;
    font-size: clamp(13px, 1.15vw, 16px);
    line-height: 1.4;
    opacity: 1;
  }

  #logo.st-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(200px, 1fr) auto minmax(195px, .78fr);
    gap: clamp(8px, 1.35vh, 14px);
  }
  #logo .st-section-head { margin-bottom: 0 !important; }
  #logo .st-logo-pair { height: 100%; align-items: stretch; }
  #logo .st-logo-panel { height: 100%; min-height: 0; max-height: none; }
  #logo .st-logo-stage { min-height: 0; padding: 22px; }
  #logo .st-logo-stage > .logo { width: min(82%, 270px); }
  #logo .st-rule-line { padding: 4px 0; }
  #logo #compact-mark.cm-minimal { height: 100%; min-height: 0; margin: 0; padding-top: 12px; }
  #logo #compact-mark .cm-minimal-visual { min-height: 0; height: 100%; }
  #logo #compact-mark .cm-tile img { width: clamp(82px, 7.8vw, 118px); }

  #logo-clearspace.st-section { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 0; }
  #logo-clearspace .st-clearspace-rule { min-height: 0; height: 100%; }
  #logo-clearspace .st-clearspace-diagram {
    height: 100%;
    min-height: 0;
    margin: 0;
    justify-content: center;
    gap: clamp(70px, 10vh, 96px);
  }
  #logo-clearspace .st-clearspace-frame { --logo-w: min(540px, 57cqw); }

  #logo-rules.lr-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(135px, .5fr) minmax(0, 1.5fr);
    gap: clamp(14px, 2.4vh, 24px);
  }
  #logo-rules .lr-header { margin: 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  #logo-rules .lr-header .st-kicker { margin: 0 0 7px; color: var(--emerald); }
  #logo-rules .lr-header h2 { font-size: clamp(32px, 3.2vw, 44px); font-weight: 700; }
  #logo-rules .lr-size-block { height: 100%; align-items: stretch; }
  #logo-rules .lr-size-copy { display: flex; flex-direction: column; justify-content: center; }
  #logo-rules .lr-size-visual { height: 100%; min-height: 0; }
  #logo-rules .lr-measure { width: min(66%, 250px); }
  #logo-rules .lr-form-block {
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin: 0;
    padding-top: 12px;
  }
  #logo-rules .lr-examples {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 10px 22px;
  }
  #logo-rules .lr-example { display: flex; flex-direction: column; }
  #logo-rules .lr-example-art { flex: 1 1 auto; min-height: 70px; height: auto; }
  #logo-rules .lr-example figcaption { padding-top: 5px; }
  #logo-rules .lr-example p { font-size: 11px; line-height: 1.35; }

  #colour.st-section { display: flex; }
  #colour .st-section-head { flex: 0 0 auto; }
  #colour .st-palette-layout { flex: 1 1 auto; min-height: 0; }
  #colour .st-palette-layout > div:first-child { display: flex; flex-direction: column; min-height: 0; }
  #colour .st-palette-layout .st-colours { flex: 1 1 auto; min-height: 0; grid-template-rows: 1fr 1fr; }
  #colour .st-swatch-stage { height: clamp(82px, 10vh, 105px); }
  #colour .st-production-reference { flex: 0 0 auto; }
  #colour details.st-notes { flex: 0 0 auto; }

  #digital.st-section { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  #digital .bs-digital { height: 100%; min-height: 0; align-items: stretch; gap: clamp(28px, 4vw, 58px); }
  #digital .bs-web-preview { position: relative; height: 100%; min-height: 0; }
  #digital .bs-web-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }
  #digital .bs-digital > div { display: flex; flex-direction: column; justify-content: center; padding: 0; }
  #digital .bs-digital h3 { font-size: clamp(34px, 3.3vw, 48px); }
  #digital .bs-digital .bs-caption { margin-top: auto !important; padding-top: 20px; }

  #downloads.st-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(210px, .9fr) minmax(210px, 1fr) auto auto;
    gap: clamp(8px, 1.2vh, 14px);
  }
  #downloads .st-download-hero {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    grid-template-rows: auto 1fr auto;
    column-gap: clamp(24px, 4vw, 60px);
    align-items: center;
    min-height: 0;
    padding: clamp(22px, 3vh, 32px) clamp(28px, 3.5vw, 42px);
  }
  #downloads .st-download-hero .st-kicker { grid-column: 1 / -1; align-self: start; }
  #downloads .st-download-hero h2 {
    grid-column: 1;
    grid-row: 2 / 4;
    margin: 0;
    font-size: clamp(36px, 3.6vw, 50px);
    line-height: 1.08;
  }
  #downloads .st-download-hero p { grid-column: 2; grid-row: 2; align-self: end; font-size: 14px; }
  #downloads .st-full-download {
    grid-column: 2;
    grid-row: 3;
    justify-self: stretch;
    align-self: end;
    width: 100%;
    min-width: 0;
    margin: 8px 0 0;
    white-space: normal;
  }
  #downloads .st-full-download > span:first-child {
    min-width: 0;
    font-size: clamp(12px, 1.05vw, 15px);
    line-height: 1.25;
    white-space: normal;
  }
  #downloads .st-full-download > span:last-child { flex: 0 0 auto; }
  #downloads .ad-files-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    column-gap: clamp(24px, 4vw, 56px);
    min-height: 0;
    margin: 0;
  }
  #downloads .ad-files-grid a { min-height: 0; padding: 4px 0; font-size: 14px; }
  #downloads .ad-files-grid small { font-size: 11px; }
  #downloads .bs-link-row { margin: 0; }
  #downloads .ad-release-note { margin: 0; }
}

@media (min-width: 1100px) and (max-height: 619px) {
  #logo, #logo-clearspace, #logo-rules, #colour, #digital, #downloads { justify-content: flex-start; }
}

/* Keep the wayfinding section title as a single line at every viewport width. */
#wayfinding #wf-title { white-space: nowrap; }
@media (max-width: 620px) {
  #wayfinding #wf-title { font-size: clamp(20px, 5.4vw, 32px); }
}

/* Render the current editable website inside its preview instead of a stale screenshot. */
#digital .bs-web-preview iframe {
  position: absolute;
  top: 36px;
  left: 0;
  display: block;
  width: 300%;
  height: 1800px;
  border: 0;
  pointer-events: none;
  transform: scale(0.333333);
  transform-origin: top left;
}
#digital .bs-digital > div > .bs-download + .bs-download {
  margin-top: 12px !important;
}
