:root { container-type: inline-size; }

/* Keep the masthead controls in the reading column while the surface spans the page. */
body[class] > :is(.catalog-top, .openline-mast, .transit-wayfinding, .forge-entry,
  .rainbow-gateway, .storybook-library-door, .matsuri-entrance, .quiet-header, .plain-navigation,
  .glide-departure, .shore-header, .contour-masthead, .memo-header, .radiant-header,
  .hedge-header, .drafting-header, .nest-header, .plinth-header, .module-header, .filament-header,
  .channel-header, .margin-header, .stitch-header, .foundation-header, .reflection-header,
  .score-header, .material-header, .bearing-header, .bough-header, .typeset-header,
  .weft-header, .angle-header, .kindling-header, .longitude-header, .depth-header,
  .gild-header, .inlet-bar, .voussoir-portal, .sundeck-sunbar, .tributary-header,
  .specimen-station, .conservatory-gate, .coil-header, .ridge-header) {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: var(--site-content-edge);
  box-shadow: inset 0 -1px color-mix(in srgb, currentColor 16%, transparent);
}
body > :is(.grain-fixed-top, .pace-top) { width: 100%; max-width: none; }
.catalog-home > .catalog-top { background: var(--paper); }

/* Former 100vw covers included the scrollbar, shifting their artwork and content. */
body[class] main :is(.groove-listening-table, .orrery-frontispiece, .openline-front-page,
  .transit-departure, .forge-workbench, .wind-introduction, .skyrail-opening-frame,
  .rainbow-welcome, .forward-introduction, .brief-workspace, .storybook-prologue,
  .night-console, .matsuri-market-hall, .pelagic-first-current, .comic-opening,
  .airpost-postcard, .level-welcome, .module-stage, .reflection-arrival,
  .bearing-arrival, .bough-arrival, .typeset-cover-sheet, .angle-opening, .longitude-opening,
  .gild-arrival, .voussoir-foundation, .sundeck-welcome, .tributary-source, .specimen-opening,
  .outlook-arrival, .conservatory-arrival, .coil-introduction, .ridge-cover),
.pixel-home .pixel-workbench .pixel-welcome {
  box-sizing: border-box;
  inline-size: 100cqw;
  max-inline-size: none;
  margin-inline: calc(50% - 50cqw);
}
main .ridge-cover > header { inline-size: auto; margin-inline: 0; }

/* These covers previously stopped at the content column. */
body[class] main :is(.drafting-introduction, .drafting-pavilion-study, .nest-picture-cover,
  .channel-welcome, .margin-cover, .stitch-first-light, .foundation-overview,
  .score-overture, .material-opening, .weft-introduction, .kindling-welcome,
  .depth-opening, .inlet-expedition) {
  box-sizing: border-box;
  inline-size: 100cqw;
  max-inline-size: none;
  margin-inline: calc(50% - 50cqw);
  border-inline: 0;
  border-radius: 0;
  padding-inline: max(20px, calc((100cqw - 1160px) / 2));
}
body[class] main .drafting-pavilion-study { padding-inline: 0; }
main .nest-picture-cover { margin-top: 0; }
.nest-home main .nest-picture-cover { padding-inline: max(20px, calc((100cqw - 1160px) / 2)); }

/* Move permanent side controls into the page flow so the cover can span both edges. */
body:is(.quiet-home,.quiet-inner), .motion-home, .drafting-home { padding-right: 0; }
body:is(.quiet-home,.quiet-inner) .quiet-header > .quiet-register {
  position: static;
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 10px 18px;
  writing-mode: horizontal-tb;
  letter-spacing: 0;
}
.motion-home .motion-screen-section,
.drafting-home .drafting-reading-map {
  position: static;
  width: auto;
  min-width: 0;
  overflow: visible;
}
.motion-home .motion-screen-section {
  max-width: 1160px;
  margin: 30px max(20px, calc((100% - 1160px) / 2));
}
.motion-home .motion-screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 12px;
}
.drafting-home .drafting-reading-map nav a:nth-child(n) { color: #25496c; }

@media screen {
  .ed-inner main .ed-inner-cover,
  .folio-workshop-inner .folio-notebook > :is(.folio-notebook-cover,.folio-download-cover,.folio-guide-cover),
  .orbit-flight-inner .orbit-manual > :is(.orbit-manual-heading,.orbit-inner-hero,.orbit-download-cover,.orbit-company-cover) {
    box-sizing: border-box;
    inline-size: 100cqw;
    max-inline-size: none;
    margin-inline: calc(50% - 50cqw);
    border-inline: 0;
    border-radius: 0;
    padding-inline: var(--site-content-edge);
  }
  .ed-inner main .ed-inner-cover { column-gap: clamp(12px, 2.2vw, 32px); }
  .ed-inner main .ed-inner-cover > div:not(.ed-inner-art) { padding-inline: 0; }
}
.ed-column main .ed-inner-cover { background-color: var(--wash); }

/* A page's masthead, cover and pricing section use the same content edges. */
body[class] {
  --site-content-max: 1240px;
  --site-min-gutter: clamp(16px, 3.3vw, 40px);
  --site-content-edge: max(var(--site-min-gutter), calc((100cqw - var(--site-content-max)) / 2));
  --site-content-width: calc(100cqw - 2 * var(--site-content-edge));
}
body:is(.template-bloom, .template-ledger, .template-parlor, .template-route, .template-foundry,
  .template-meadow, .template-archive, .template-island, .template-radar, .template-courtyard,
  .template-indexer, .template-spectrum, .template-almanac, .template-fluent, .template-north,
  .template-form, .template-ribbon, .template-observatory, .template-common, .template-vertex,
  .template-strata, .template-solstice, .template-nocturne, .template-verdigris, .template-summit,
  .template-meridian, .template-sonata, .template-kinetic, .template-oasis, .template-argon,
  .template-verge, .template-rivulet) { --site-content-max: 1200px; }
body:is(.template-clarity, .template-mezzanine, .template-halcyon, .template-relay, .template-terrace,
  .template-mosaic, .template-keystone, .template-fieldnote, .template-vantage, .template-arcadia,
  .template-helix, .template-seaglass) { --site-content-max: 1280px; }
body:is(.template-emberline, .template-apex) { --site-content-max: 1160px; }
body.template-orbit { --site-content-max: 1220px; }
body:is(.catalog-home, .ed-inner:not([data-composition]), .folio-workshop-inner) { --site-content-max: 1180px; }

@media (max-width: 600px) {
  body[class] { --site-min-gutter: 16px; }
}

.catalog-home .catalog-body,
.template-seaglass :is(.sg-menubar, .sg-hero-layout, #plans > .sg-shell, .sg-inner-main .sg-shell),
.template-orbit :is(.orbit-command-row, #plans.orbit-plan-hangar, .orbit-manual),
.folio-workshop-inner .folio-canvas,
.ed .ed-header-row,
.ed .ed-inner-main {
  width: var(--site-content-width);
  max-width: none;
}
.catalog-home[data-catalog-layout] .catalog-hero,
.orbit-flight-home .orbit-station > .orbit-hero {
  padding-inline: var(--site-content-edge);
}

body[class] > header:has(> a),
.catalog-home > :is(header,[role="banner"]).catalog-top {
  padding-inline: var(--site-content-edge);
}
body[class] > header:has(> a[data-track-register]) {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-inline: 0;
}
.outlook-viewfinder > div { width: var(--site-content-width); }
body.motion-home > .motion-header { padding-inline: var(--site-content-edge); }
.template-parlor > .openline-mast > :is(div, nav.desktop-primary-links) {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}
@media (min-width: 768px) {
  body[class] > :is(.tsukimi-noren,.concierge-header,.shore-header,.conservatory-gate) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto;
    gap: 10px clamp(12px, 2.2vw, 30px);
  }
  body[class] > :is(.tsukimi-noren,.concierge-header,.shore-header,.conservatory-gate) > a:first-of-type {
    grid-area: 1 / 1;
    margin-inline: 0;
    justify-self: start;
  }
  body[class] > :is(.tsukimi-noren,.concierge-header,.shore-header,.conservatory-gate) > nav {
    grid-area: 1 / 2;
    width: auto;
    margin-inline: 0;
    justify-self: end;
  }
  body[class] > :is(.tsukimi-noren,.concierge-header,.shore-header,.conservatory-gate) > [data-track-register] {
    grid-area: 1 / 3;
    margin-inline: 0;
    justify-self: end;
  }
}
.catalog-home > .catalog-editorial {
  justify-content: stretch;
  text-align: start;
}
.catalog-home > .catalog-editorial :is(div,nav) { justify-content: flex-start; }

body[class] :is(.grain-fixed-top > .grain-header, .pace-top > .pace-header,
  .grain-fixed-top > nav, .pace-top > nav, .transit-route-directory) {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: var(--site-content-edge);
}

body[class]:not(.catalog-home,.template-seaglass,.template-orbit,.template-apex) main #plans {
  box-sizing: border-box;
  width: var(--site-content-width);
  max-width: none;
  margin-inline: calc((100% - var(--site-content-width)) / 2);
  padding-inline: var(--site-plan-inset, 0px);
}
body:is(.template-foundry,.template-indexer,.template-almanac,.template-observatory,
  .template-verdigris,.template-kinetic,.template-aerial,.template-tidepool,
  .template-lantern,.template-polaris,.template-vantage) main #plans {
  --site-plan-inset: clamp(16px, 2.5vw, 32px);
}
.civic-home main .civic-service-hub {
  display: block;
  width: var(--site-content-width);
}
.civic-home main .civic-service-hub .civic-hub-directory {
  position: static;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 124px), 1fr));
  margin-block-end: 24px;
}
body.template-apex main #plans {
  width: 100cqw;
  margin-inline: calc(50% - 50cqw);
  padding-inline: var(--site-content-edge);
}
.stitch-home #plans .stitch-chapter-title {
  margin-inline: 0;
  padding-inline: 0;
}
.stitch-home #plans .stitch-chapter-title > div { padding-inline: 0; }
.stitch-home .stitch-first-light .stitch-read-plans { margin: 0; }

/* Keep artwork full bleed. The inset only defines the cover's content tracks. */
body[class] main :is(.groove-listening-table, .orrery-frontispiece, .openline-front-page,
  .transit-departure, .forge-workbench, .wind-introduction, .skyrail-opening-frame, .rainbow-welcome,
  .forward-introduction, .brief-workspace, .storybook-prologue, .night-console, .matsuri-market-hall,
  .pelagic-first-current, .comic-opening, .airpost-postcard, .case-opening, .tsukimi-evening,
  .actuation-opening, .cloud-billboard, .openair-campaign, .quiet-opening, .concierge-introduction,
  .lightfield-opening, .thought-introduction, .routing-route-poster, .motion-opening, .celadon-overview,
  .plain-frontispiece, .glide-horizon, .shore-frontispiece, .contour-cover, .memo-open-notebook,
  .radiant-sunroom, .grain-opening, .level-welcome, .hedge-showcase, .drafting-introduction,
  .nest-picture-cover, .pace-opening, .module-stage, .filament-opening, .channel-welcome,
  .margin-cover, .stitch-first-light, .foundation-overview, .reflection-arrival, .score-overture,
  .material-opening, .bearing-arrival, .bough-arrival, .typeset-cover-sheet, .weft-introduction,
  .angle-opening, .kindling-welcome, .longitude-opening, .depth-opening, .gild-arrival,
  .inlet-expedition, .voussoir-foundation, .sundeck-welcome, .tributary-source, .specimen-opening,
  .outlook-arrival, .conservatory-arrival, .coil-introduction),
.pixel-home .pixel-workbench .pixel-welcome {
  padding-inline: var(--site-content-edge);
}
body[class] main :is(.civic-service-brief, .plinth-introduction, .ridge-cover) > header {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  padding-inline: var(--site-content-edge);
}

body[class] main :is(.groove-listening-table > .groove-record-sleeve,
  .transit-departure > header, .forward-introduction > header, .brief-workspace > .brief-opening,
  .comic-opening > header, .actuation-opening > header, .plain-frontispiece > .plain-introduction,
  .outlook-arrival > header),
.pixel-home .pixel-workbench .pixel-welcome > div {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}
.margin-home main .margin-cover { display: block; }
.margin-home .margin-cover .margin-introduction { grid-area: auto; }

main :is(#plans, .ed-plan, .sg-plan, .orbit-vessel, .folio-package)
  :is(strong,b,[class*="-price"],[class*="-charge"]) {
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ed-ripple .ed-plans { --accent: #206f65; }
.ed-shan .ed-plans { --accent: #4a6e23; }
.ed-muse .ed-plans { --accent: #606c21; }
.ed-canvas .ed-plans { --accent: #206f60; }
.ed-muse .ed-plans .ed-button { background-color: #606c21; }
.ed-shan :is(.catalog-mobile-shortcuts, .catalog-desktop-nav, .catalog-menu) [aria-current] {
  color: #4a6e23;
}

@media (min-width: 768px) {
  [data-extended-navigation] :is(body > header, body > [role="banner"], body > .pace-top,
    body > .grain-fixed-top, .sg-menubar, .orbit-command-row, .ed-header-row):has(> nav) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    justify-content: space-between;
  }
  [data-extended-navigation] :is(body > header, body > [role="banner"], body > .pace-top,
    body > .grain-fixed-top, .sg-menubar, .orbit-command-row, .ed-header-row)
    > nav:not(.catalog-mobile-shortcuts),
  [data-extended-navigation] body > .transit-route-directory {
    display: flex;
    flex: 0 0 100%;
    order: 1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 6px 14px;
    overflow: visible;
    justify-content: flex-start;
  }
  [data-extended-navigation] :is(body > header, body > [role="banner"], body > .pace-top,
    body > .grain-fixed-top, .sg-menubar, .orbit-command-row, .ed-header-row)
    > nav:not(.catalog-mobile-shortcuts) > :is(ul,ol,menu,.independent-desktop-links) {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 6px 14px;
    justify-content: flex-start;
  }
  [data-extended-navigation] :is(body > header, body > [role="banner"], body > .pace-top,
    body > .grain-fixed-top, .sg-menubar, .orbit-command-row, .ed-header-row) > nav a {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  [data-extended-navigation] :is(body > header, body > [role="banner"], .sg-menubar, .orbit-command-row,
    .ed-header-row) > a:is([data-track-register],.catalog-setup) { white-space: nowrap; }
}

@media (min-width: 768px) {
  body > :is(.catalog-top, .brief-masthead, .glide-departure, .tsukimi-noren, .concierge-header, .shore-header,
    .conservatory-gate, .bearing-header, .drafting-header, .filament-header, .channel-header,
    .stitch-header, .weft-header, .kindling-header, .longitude-header, .gild-header, .sundeck-sunbar)
    > nav:not(.catalog-mobile-shortcuts),
  .pace-top > nav, .orbit-command-row > nav, .folio-sidebar > nav {
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-block: 4px;
  }
  body > :is(.catalog-top, .brief-masthead, .glide-departure, .tsukimi-noren, .concierge-header, .shore-header,
    .conservatory-gate, .bearing-header, .drafting-header, .filament-header, .channel-header,
    .stitch-header, .weft-header, .kindling-header, .longitude-header, .gild-header, .sundeck-sunbar)
    > nav:not(.catalog-mobile-shortcuts) :is(ul,.independent-desktop-links),
  .pace-top > nav > ul, .orbit-command-row > nav > .orbit-command-links, .folio-sidebar > nav > ul {
    flex-wrap: nowrap;
  }
  body > :is(.catalog-top, .brief-masthead, .glide-departure, .tsukimi-noren, .concierge-header, .shore-header,
    .conservatory-gate, .bearing-header, .drafting-header, .filament-header, .channel-header,
    .stitch-header, .weft-header, .kindling-header, .longitude-header, .gild-header, .sundeck-sunbar)
    > nav:not(.catalog-mobile-shortcuts) a,
  .pace-top > nav a, .orbit-command-row > nav a, .folio-sidebar > nav a {
    white-space: nowrap;
    overflow-wrap: normal;
  }
  body > .catalog-index > nav { display: flex; gap: 12px; align-self: center; }
  .catalog-top .catalog-index-link { gap: 4px; }
  body > .bearing-header, body > .bearing-header > nav { overflow: visible; max-height: none; }
  body > .bearing-header > nav {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(max-content, 1fr);
    overflow-x: auto;
  }
  body > .bearing-header > nav a { padding-inline: clamp(5px, 1vw, 15px); }
  .pace-top > nav > ul { width: max-content; }
  .pace-top > nav { justify-content: safe center; }
  body > .transit-route-directory {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0;
  }
  body > .transit-route-directory a { padding-inline: 3px; font-size: clamp(12px, 1.35vw, 16px); }
}

@media (min-width: 768px) and (max-width: 1150px) {
  body[class] > :is(.tsukimi-noren,.concierge-header,.shore-header,.conservatory-gate) {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  body[class] > :is(.tsukimi-noren,.concierge-header,.shore-header,.conservatory-gate) > nav {
    grid-area: 2 / 1 / 3 / -1;
    justify-self: stretch;
    justify-content: safe center;
  }
  body[class] > :is(.tsukimi-noren,.concierge-header,.shore-header,.conservatory-gate) > [data-track-register] {
    grid-area: 1 / 2;
  }
  body > :is(.catalog-masthead,.catalog-command,.catalog-crossbar,.catalog-utility,.catalog-index,.brief-masthead) {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  body > :is(.catalog-masthead,.catalog-command,.catalog-crossbar,.catalog-utility,.catalog-index,.brief-masthead)
    > nav:not(.catalog-mobile-shortcuts) {
    order: 1;
    flex: 1 1 100%;
    gap: clamp(9px, 1.4vw, 16px);
  }
  .catalog-top .catalog-index-link [aria-hidden] { display: none; }
  .orbit-command-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .orbit-command-row > nav {
    grid-area: 2 / 1 / 3 / -1;
    justify-content: safe start;
  }
  .orbit-command-row > nav > .orbit-command-links { width: max-content; gap: 6px; }
  .orbit-command-row > nav a { padding-inline: 7px; }
  .folio-sidebar > nav { order: 1; flex-basis: 100%; }
  .folio-sidebar { flex-wrap: wrap; }
  .folio-sidebar > nav > ul { gap: 6px; }
  .folio-sidebar > nav a { padding-inline: 5px; }
  body > .glide-departure { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  body > .glide-departure > nav { grid-area: 2 / 1 / 3 / -1; }
  body > .glide-departure > [data-track-register] { grid-area: 1 / 2; }
}

@media (min-width: 768px) and (max-width: 900px) {
  body > :is(.filament-header,.channel-header,.stitch-header,.drafting-header,.weft-header,
    .kindling-header,.longitude-header,.gild-header,.sundeck-sunbar) > nav {
    column-gap: 12px;
    justify-content: safe start;
  }
  body > :is(.filament-header,.drafting-header,.sundeck-sunbar) > nav .independent-desktop-links { column-gap: 10px; }
  body > .drafting-header > nav a { padding-inline: 7px; }
  body > .sundeck-sunbar > nav a { padding-inline: 6px; }
  body > .pace-top > nav a { padding-inline: 7px; }
  body.filament-home > .filament-header { grid-template-columns: minmax(0, 1fr) auto; }
  body.filament-home > .filament-header > nav { grid-column: 1 / -1; order: 1; }
}

@media (min-width: 801px) and (max-width: 1150px) {
  body > :is(.memo-header,.radiant-header,.level-header,.hedge-header,
    .drafting-header,.nest-header,.module-header) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 20px;
    padding-block: 12px;
  }
  body > :is(.memo-header,.radiant-header,.level-header,.hedge-header,
    .drafting-header,.nest-header,.module-header) > nav {
    grid-area: 2 / 1 / 3 / -1;
    width: 100%;
  }
  body > :is(.memo-header,.radiant-header,.level-header,.hedge-header,
    .drafting-header,.nest-header,.module-header) > [data-track-register] { grid-area: 1 / 2; }
}

@media (max-width: 767px) {
  body > .bearing-header {
    position: static;
    max-height: none;
    overflow: visible;
  }
  body > .bearing-header > nav { grid-template-columns: repeat(auto-fit, minmax(min(100%, 92px), 1fr)); }
  body > .bearing-header > nav a { padding-inline: 4px; }
  body > .pace-top { position: static; }
  body > .pace-top > nav {
    display: block;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }
  .pace-top > nav > ul {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,88px),1fr));
    gap: 4px;
  }
  .pace-top > nav a { padding-inline: 4px; border: 0; }
}

body.catalog-home > .catalog-top:has(> .catalog-header-register) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px clamp(12px, 2vw, 24px);
  align-items: center;
  text-align: start;
}
body.catalog-home > .catalog-top > :first-child { grid-area: 1 / 1; }
.catalog-top > .catalog-header-register {
  grid-area: 1 / 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-height: 44px;
  padding: 8px clamp(12px, 2vw, 20px);
  border-radius: var(--button-radius, 8px);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.catalog-top > .catalog-header-register:hover { text-decoration: underline; }
body.catalog-home > .catalog-top > :is(nav,details,.catalog-setup) { grid-column: 1 / -1; }
@media (min-width: 1151px) {
  html:not([data-extended-navigation]) body.catalog-home > .catalog-top:has(> .catalog-header-register) {
    grid-template-columns: minmax(0, 1fr) minmax(0, max-content) auto;
  }
  html:not([data-extended-navigation]) .catalog-top > .catalog-header-register { grid-area: 1 / 3; }
  html:not([data-extended-navigation]) body.catalog-home > .catalog-top > nav:not(.catalog-mobile-shortcuts) { grid-area: 1 / 2; }
}

@media (max-width: 540px) {
  body[class] > :is(header,[role="banner"]):not(.catalog-top):has(> a[data-track-register]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    row-gap: 8px;
    column-gap: 10px;
  }
  body[class] > :is(header,[role="banner"]):not(.catalog-top):has(> a[data-track-register])
    > a:first-of-type:not([data-track-register]) {
    grid-area: 1 / 1;
    min-width: 0;
    margin-inline: 0;
    overflow-wrap: anywhere;
  }
  body[class] > :is(header,[role="banner"]):not(.catalog-top) > a[data-track-register] {
    grid-area: 1 / 2;
    justify-self: end;
    min-height: 44px;
    margin-inline: 0;
    white-space: nowrap;
  }
  body[class] > :is(header,[role="banner"]):not(.catalog-top):has(> a[data-track-register])
    > :is(nav,details) {
    grid-column: 1 / -1;
  }
  .outlook-viewfinder > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
  }
  .outlook-viewfinder .outlook-brand { min-width: 0; }
  .outlook-viewfinder .outlook-register {
    grid-area: 1 / 2;
    justify-self: end;
    white-space: nowrap;
  }
  .outlook-viewfinder > div > nav { grid-column: 1 / -1; }
}

:is(.margin-header-top,.voussoir-portal-row) { width: 100%; }
:is(.margin-header-top,.voussoir-portal-row) > [data-track-register] {
  margin-inline-start: auto;
  flex: none;
  white-space: nowrap;
}

@media (max-width: 767px) {
  [data-extended-navigation] body > :is(header, [role="banner"], .pace-top, .grain-fixed-top) {
    position: static;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  [data-extended-navigation] :is(body > header, body > [role="banner"], .outlook-viewfinder > div)
    > a[href="/"]:not([data-track-register]) {
    flex: 1 1 0%;
    min-width: 0;
  }
  [data-extended-navigation] :is(body > header, body > [role="banner"], .outlook-viewfinder > div)
    > a[href="/"]:not([data-track-register]) > :is(strong,b,span) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  [data-extended-navigation] :is(body > header, body > [role="banner"], .outlook-viewfinder > div)
    > a[data-track-register] {
    flex: none;
    margin-inline-start: auto;
    white-space: nowrap;
  }
}

@media (min-width: 768px) {
  [data-extended-navigation] body > .shore-header:has(> nav) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  [data-extended-navigation] body > .shore-header > [data-track-register] { grid-area: 1 / 2; }
  [data-extended-navigation] body > .shore-header > nav { grid-area: 2 / 1 / 3 / -1; }
}

.template-support-email {
  grid-column: 1 / -1;
  flex-basis: 100%;
  margin-block: 0;
  font-style: normal;
  overflow-wrap: anywhere;
}
.template-support-email > a { text-decoration: underline; text-underline-offset: .2em; }

@media screen {
  .catalog-inner.ed,
  .catalog-inner.folio-workshop-inner {
    --canvas: var(--paper);
    --surface: #fff;
    --wash: hsl(var(--catalog-hue) 38% 94%);
    --muted: #4c5b70;
    --action: var(--accent);
    --on-action: #fff;
    --heading: system-ui, "Microsoft YaHei", sans-serif;
  }
  .catalog-inner.folio-workshop-inner { --coral: var(--accent); --mint: var(--wash); }
  .catalog-inner .catalog-header-register { border-radius: 8px; }
  .catalog-inner[data-catalog-layout="observatory"] .catalog-header-register { border-radius: 999px; }
  .catalog-inner.ed .ed-inner-main { padding-top: 0; }
  .catalog-inner .folio-notebook { padding-top: 0; }
  .catalog-inner main .ed-inner-cover,
  .catalog-inner.folio-workshop-inner .folio-notebook > :is(.folio-notebook-cover,.folio-download-cover,.folio-guide-cover) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    align-content: center;
    gap: 12px;
    min-block-size: 0;
    margin-block-start: 0;
    padding-block: clamp(26px, 5vw, 72px);
    border: 0;
    text-align: start;
    color: var(--hero-ink);
    background: radial-gradient(ellipse at var(--hero-glow, 88% 0%), hsl(var(--catalog-hue) 65% 57% / .22), transparent 68%), var(--hero-base);
  }
  .catalog-inner:is(.ed-shan,.ed-horizon) main .ed-inner-cover::before { content: none; }
  .catalog-inner main :is(.ed-inner-cover,.folio-notebook-cover,.folio-download-cover,.folio-guide-cover) :is(h1,p,a,nav) {
    color: inherit;
  }
  .catalog-inner.folio-workshop-inner main .folio-guide-cover .folio-join {
    background: var(--hero-action);
    color: #152236;
    border-color: transparent;
  }
  .catalog-inner main :is(.ed-inner-cover,.folio-notebook-cover,.folio-download-cover,.folio-guide-cover) h1 {
    margin-block: 8px;
  }
  .catalog-inner main :is(.ed-inner-cover,.folio-notebook-cover,.folio-download-cover,.folio-guide-cover) p {
    max-inline-size: 62ch;
  }
  .catalog-inner:is([data-catalog-layout="observatory"],[data-catalog-layout="focus"],[data-catalog-layout="ribbon"])
    main .ed-inner-cover {
      justify-items: center;
      text-align: center;
  }
  .catalog-inner.ed main .ed-inner-cover > div:not(.ed-inner-art) { grid-area: auto; padding: 0; }
  .catalog-inner .ed-inner-content { margin-block-start: clamp(24px, 4.2vw, 62px); }
  .catalog-inner .ed-related { gap: 10px 20px; }
  .catalog-inner .ed-faq { border-radius: 12px; }
  .catalog-inner[data-catalog-support="3"] .ed-faq,
  .catalog-inner[data-catalog-support="4"] .ed-faq { border-inline: 0; border-radius: 0; background: transparent; }
  .catalog-inner[data-catalog-support="1"] .ed-faq .resource-faq-item {
    margin-block: 10px;
    padding-inline: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
  }
  .catalog-inner .ed-inner-content :is(.ed-prose,.ed-download-note) { overflow-wrap: anywhere; }
  .catalog-inner .ed-measure dt { font-size: 20px; }
  .catalog-inner .ed-measure dd { font-size: 16px; }

  .sg-inner .sg-inner-hero {
    background: radial-gradient(ellipse at 83% 16%, #245779, transparent 65%), #102c41;
    color: #fff;
  }
  .sg-inner .sg-inner-hero :is(h1,p) { color: inherit; }
  .orbit-flight-inner .orbit-transmission {
    padding-block: 12px;
    box-shadow: 0 0 0 100vmax #131b29;
    clip-path: inset(0 -100vmax);
    background: #131b29;
    color: #e0edf5;
  }
  .orbit-flight-inner .orbit-transmission b { color: #afebdc; }

  body[class][data-editorial-inner] main[data-inner-content] {
    box-sizing: border-box;
    /* The shared content width takes precedence over legacy ID-based page widths. */
    inline-size: var(--site-content-width) !important;
    max-width: none;
    margin-inline: auto;
    padding-inline: 0;
  }
  body[data-editorial-inner] main :is(h1, h2, h3, summary, a) { overflow-wrap: anywhere; }
  body[data-editorial-inner] main h1 { max-inline-size: 32ch; text-wrap: balance; }
  body[class][data-editorial-inner] main[data-inner-content] > :is(header,section,.margin-reading-head,.outlook-reference-cover):has(h1) {
    box-sizing: border-box;
    inline-size: 100cqw;
    max-inline-size: none;
    min-block-size: 0;
    margin-inline: calc(50% - 50cqw);
    padding-inline: var(--site-content-edge);
    border-inline-width: 0;
    border-radius: 0;
  }
  /* These reading headers belong to the bordered document, so keep their text inside it. */
  body[class][data-editorial-inner] main[data-inner-content] > :is(.memo-file-heading,
    .drafting-document-heading, .plinth-document-heading):has(h1) {
    inline-size: 100%;
    margin-inline: 0;
    padding-inline: clamp(16px, 3vw, 36px);
  }
  body[data-editorial-inner] main > :is(.memo-file-content, .memo-file-end, .drafting-document-content,
    .drafting-document-end, .plinth-document-content, .plinth-document-end) {
    min-inline-size: 0;
    padding-inline: clamp(16px, 3vw, 36px);
  }
  .drafting-document-index a > span {
    flex: none;
    white-space: nowrap;
  }
  body.template-fjord.inlet-inner { padding-inline-start: 0; }
  body.template-aerial.glide-inner,
  .pace-inner main.pace-service-desk,
  .weft-inner .weft-reader > .weft-reader-page { border-inline-width: 0; }
  .weft-inner .weft-reader > .weft-reader-page { padding-inline: 0; }
  .score-inner main[data-inner-content] > .score-reading-header {
    grid-column: 1 / -1;
    padding-block: clamp(24px, 4vw, 52px);
    background: #f1eadc;
  }
  .score-inner main[data-inner-content] > .score-reading-rail { padding-block-start: 0; }
  body[data-editorial-inner] main :is([data-client-platform],summary) { min-inline-size: 0; }
  body[data-editorial-inner] main .resource-faq-item {
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-block-end: 1px solid color-mix(in srgb, currentColor 24%, transparent);
    border-radius: 0;
    background: transparent;
    color: inherit;
  }
  body[data-editorial-inner] main .resource-faq-item > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-block-size: 48px;
    padding-block: 12px;
    font-size: 18px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
  }
  body[data-editorial-inner] main .resource-faq-item > summary::-webkit-details-marker { display: none; }
  body[data-editorial-inner] main .resource-faq-item > summary::after {
    content: "";
    flex: 0 0 8px;
    block-size: 8px;
    margin-inline: 4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
  }
  body[data-editorial-inner] main .resource-faq-item[open] > summary::after {
    transform: translateY(2px) rotate(225deg);
  }
  body[data-editorial-inner] main .resource-faq-item > :not(summary) {
    max-inline-size: 75ch;
    margin-block: 0 18px;
    font-size: 16px;
    line-height: 1.7;
  }
}

@media screen and (max-width: 600px) {
  .shore-footer .shore-footer-title { display: block; overflow-wrap: anywhere; }
  .shore-footer-title > span { margin-inline-end: 8px; }
  body[data-editorial-inner] main > header:has(h1) + nav:has(> a:nth-of-type(5)) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 104px), 1fr));
    gap: 4px 8px;
  }
  body[data-editorial-inner] main > .drafting-document-heading + .drafting-document-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-editorial-inner] main > header:has(h1) + nav:has(> a:nth-of-type(5)) > a {
    min-inline-size: 0;
    min-block-size: 36px;
    padding-block: 6px;
    align-content: center;
  }
}

/* Keep the first answer line and its next divider clear of the question text. */
main :is(.brief-help,.glide-flight-answers,.plain-reading-answers,.contour-help,
  .channel-answers,.margin-help,.stitch-answers,.foundation-help,.reflection-help,
  .score-answers,.bearing-help,.bough-help,.longitude-questions,.inlet-answers,
  .sundeck-questions,.specimen-questions,.coil-questions) details[open] > p {
  padding-block: 8px 10px;
}

body.ed-inner:is(.ed-prism,.ed-nexus,.ed-slate,.ed-tide) .ed-plans {
  row-gap: 14px;
}
.channel-inner .channel-device-list p { margin-block-start: 10px; }

@media (max-width: 700px) {
  :is(.wind-configurations,.skyrail-passes,.margin-plan-columns) {
    row-gap: 14px;
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .wind-configurations > .wind-configuration { border: 1px solid #b1c3b0; }
  .skyrail-passes > .skyrail-pass { border: 1px solid #b7a7b7; }
  .margin-plan-columns > .margin-plan { border: 1px solid #b5acbe; }
}

@media screen and (max-width: 450px) {
  .groove-records-home .groove-listening-table .groove-record-sleeve {
    overflow: clip;
  }
}

@media screen and (max-width: 450px) and (max-height: 640px) {
  body > :is(.contour-masthead,.voussoir-portal,.sundeck-sunbar) {
    position: static;
  }
}

@media screen and (min-width: 1024px) {
  [data-extended-navigation] :is(body > header, body > [role="banner"], body > .pace-top, body > .grain-fixed-top,
    .sg-menubar, .orbit-command-row, .ed-header-row, .outlook-viewfinder > div) > nav a,
  [data-extended-navigation] body > .transit-route-directory a {
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .motion-home .motion-screen-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 256px), 1fr));
  }
  .motion-screen-grid .motion-screen-action {
    flex: none;
    white-space: nowrap;
  }
  .template-blueprint .drafting-client-schedule li {
    grid-template-columns: 35px clamp(100px, 10vw, 130px) minmax(0, 1fr) max-content;
  }
  .template-blueprint .drafting-client-schedule li > a[data-client-platform] {
    width: auto;
    gap: 12px;
    white-space: nowrap;
  }

  :is(.tsukimi-house-name,.concierge-identity,.motion-identity,.shore-wordmark,.contour-brand,.voussoir-brand,.outlook-brand) {
    min-width: 0;
    max-width: 100%;
  }
  :is(.tsukimi-house-name,.concierge-identity,.motion-identity,.shore-wordmark,.contour-brand,.voussoir-brand,.outlook-brand) > :is(strong,b) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  :is(.tsukimi-noren,.concierge-header,.motion-header,.shore-header,.contour-masthead,.voussoir-portal-row,.outlook-viewfinder > div)
    > [data-track-register] {
    flex: none;
    white-space: nowrap;
  }
  [data-long-site-name] .voussoir-portal-caption { display: none; }
  [data-long-site-name] .margin-header-top > .margin-wordmark { display: none; }
  [data-long-site-name] .margin-header-top > .margin-brand { min-width: 0; }
  [data-long-site-name] .margin-brand > strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  html:is([data-extended-navigation],[data-long-site-name]) .contour-masthead > .contour-wordline {
    display: none;
  }

  html:is([data-extended-navigation],[data-long-site-name]) body[class]
    > :is(.tsukimi-noren,.concierge-header,.motion-header,.shore-header,.contour-masthead),
  html:is([data-extended-navigation],[data-long-site-name]) .outlook-viewfinder > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 20px;
    align-items: center;
  }
  html:is([data-extended-navigation],[data-long-site-name]) body[class]
    > :is(.tsukimi-noren,.concierge-header,.motion-header,.shore-header,.contour-masthead) > nav,
  html:is([data-extended-navigation],[data-long-site-name]) .outlook-viewfinder > div > nav {
    grid-area: 2 / 1 / 3 / -1;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow: visible;
  }
  html:is([data-extended-navigation],[data-long-site-name]) body[class]
    > :is(.tsukimi-noren,.concierge-header,.motion-header,.shore-header,.contour-masthead) > [data-track-register],
  html:is([data-extended-navigation],[data-long-site-name]) .outlook-viewfinder > div > [data-track-register] {
    grid-area: 1 / 2;
    justify-self: end;
  }

  body[class] > :is(.forward-navigation,.drafting-header) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 20px;
    align-items: center;
  }
  body[class] > .forward-navigation {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  body[class] > :is(.forward-navigation,.drafting-header) > nav {
    grid-area: 2 / 1 / 3 / -1;
    order: 0;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow: visible;
  }
  :is(.forward-navigation,.drafting-header) > :is(.forward-brand,.drafting-brand) {
    grid-area: 1 / 1;
    justify-self: start;
    max-width: 100%;
    margin: 0;
  }
  :is(.forward-brand,.drafting-brand) > strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[class] > :is(.forward-navigation,.drafting-header) > a[data-track-register] {
    grid-area: 1 / -2 / 2 / -1;
    justify-self: end;
    white-space: nowrap;
  }
  .forward-navigation > .forward-index-trigger {
    grid-area: 1 / 2;
    white-space: nowrap;
  }

  .ed-ripple.ed-inner .ed-downloads {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  }
  .openline-comic-home .openline-postcards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 176px), 1fr));
  }
  .night-home .night-commands {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 8px;
    border: 0;
  }
  .night-home .night-commands > li:nth-child(n) { border: 1px solid var(--night-line); }
  .foundation-home .foundation-client-blocks {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 174px), 1fr));
  }
  .ed-ripple.ed-inner .ed-downloads :is(h3,p),
  .openline-comic-home .openline-postcards :is(strong,small,.openline-postcard-action),
  .night-home .night-commands :is(strong,small,.night-command-action),
  .foundation-home .foundation-client-blocks :is(h3,p,a) {
    overflow-wrap: normal;
    white-space: nowrap;
  }
}

@media screen and (min-width: 1240px) {
  html:not([data-extended-navigation],[data-long-site-name]) body[class] > .drafting-header {
    grid-template-columns: minmax(120px, 1fr) minmax(0, max-content) auto;
  }
  html:not([data-extended-navigation]) body[class] > .forward-navigation {
    grid-template-columns: minmax(120px, 1fr) minmax(0, max-content) auto auto;
  }
  html:not([data-extended-navigation],[data-long-site-name]) body[class] > :is(.forward-navigation,.drafting-header) > nav {
    grid-area: 1 / 2;
  }
  html:not([data-extended-navigation]) .forward-navigation > .forward-index-trigger {
    grid-area: 1 / 3;
  }
}

/* Separate the route strips that sit directly below their covers. */
main > .voussoir-foundation + .voussoir-foundation-record {
  margin-block-start: 12px;
  border-block-start: 1px solid #342c46;
}
main > :is(.grain-opening,.skyrail-opening-frame,.nest-picture-cover)
  + :is(.grain-opening-index,.skyrail-chapter-nav,.nest-reading-route) {
  margin-block-start: 12px;
}
.template-rivulet #tributary-main > .tributary-source + .tributary-route {
  margin-block-start: 10px;
}
.material-home .material-opening + .material-client-section {
  margin-block-start: 24px;
}
.nest-home .nest-picture-cover + .nest-reading-route { margin-block-start: 14px; }

/* Cap the larger stacked margins where a cover and its next section both have their own padding. */
body:is(.template-almanac,.template-fluent,.template-observatory) main #plans {
  margin-block-start: clamp(22px, 3vw, 38px);
  padding-block-start: clamp(24px, 3vw, 36px);
}
.weft-home .weft-sampler { margin-block-end: clamp(22px, 3vw, 36px); }
.template-tidepool .shore-frontispiece { padding-block-end: clamp(28px, 4vw, 52px); }
.template-tidepool .shore-field-spread { margin-block-start: clamp(22px, 3vw, 38px); }
.template-observatory .case-evidence-board { margin-block: clamp(22px, 3vw, 38px); }
.template-foundry .forge-operator-desk { padding-block: clamp(20px, 2.5vw, 28px); }
.template-foundry .forge-craft-notes { padding-block-start: clamp(24px, 3.5vw, 44px); }
.template-verdigris .concierge-service-records { padding-block-end: clamp(20px, 3vw, 32px); }
.template-verdigris .concierge-approach { margin-block-start: clamp(18px, 2.5vw, 28px); }
.template-solstice .openair-campaign { padding-block-end: clamp(20px, 3vw, 34px); }
.template-courtyard .brief-workspace { padding-block-end: clamp(28px, 4vw, 44px); }
.template-courtyard .brief-workspace + #plans { margin-block-start: clamp(22px, 3vw, 38px); }
.template-bloom .groove-device-shelf { padding-block-end: clamp(26px, 3vw, 42px); }
.template-bloom .groove-help,
.template-archive .skyrail-help,
.template-parlor .openline-help,
.template-emberline .filament-next,
.template-indexer .storybook-illustrated-spread,
.template-meadow .wind-observation-record,
.template-almanac .matsuri-service-tale,
.template-mirage .reflection-service-window {
  margin-block: clamp(24px, 3.2vw, 42px);
}
.template-foundry .forge-workbench,
.template-observatory .case-opening,
.template-fluent .pelagic-first-current,
.template-spectrum .night-tools,
.template-meridian .thought-introduction,
.template-aquaform .channel-welcome,
.template-cadence .score-overture,
.template-polaris .bearing-arrival {
  padding-block-end: clamp(28px, 3.5vw, 46px);
}
body:is(.template-almanac,.template-fluent,.template-apex,.template-fjord) main #plans {
  margin-block-end: clamp(22px, 3vw, 36px);
  padding-block-end: clamp(24px, 3.5vw, 42px);
}
.template-parallax .depth-facts + .depth-device-section { padding-block-start: 22px; }
.template-mezzanine #plans + #level-service-overview { margin-block-start: 18px; }
body:is(.template-verdigris,.template-mirage,.template-arcadia) main #plans {
  padding-block-start: clamp(24px, 3vw, 36px);
}

.orbit-flight-inner .orbit-manual { gap: clamp(22px, 3vw, 34px); padding-block-end: 36px; }
.orbit-flight-inner .orbit-manual > :is(.orbit-manual-layout,.orbit-company-actions) { margin-block: 0; }
.folio-workshop-inner .folio-notebook {
  row-gap: clamp(20px, 2.5vw, 32px);
  padding-block-end: clamp(28px, 3vw, 40px);
}
.shore-inner .shore-document { margin-block-end: clamp(14px, 2vw, 20px); }
.shore-inner #shore-main,
.case-inner #case-main,
.matsuri-inner #matsuri-main {
  padding-block-end: clamp(24px, 3vw, 32px);
}
.matsuri-inner .matsuri-reference-paper,
.case-inner .case-reference-file,
.tsukimi-inner .tsukimi-handbook-paper,
.comic-inner .comic-reference-content,
.cloud-inner .cloud-reference-body,
.openair-inner .openair-reference-sheet {
  padding-block-end: clamp(24px, 3vw, 38px);
}
