/* Malleable reader styles (spec 7.2). Copied into every published edition. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; width: 100%; overflow: hidden; background: #000; font-family: 'Inter', -apple-system, sans-serif; -webkit-font-smoothing: antialiased; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; }
body { display: flex; align-items: center; justify-content: center; }
.m-frame { width: 100%; height: 100%; position: relative; overflow: hidden; }

@media (min-aspect-ratio: 10/16) {
  .m-frame {
    width: auto;
    height: 100vh;
    aspect-ratio: 9 / 16;
    max-width: 100vw;
    margin: 0 auto;
  }
}

.m-pages { position: relative; width: 100%; height: 100%; }
.m-page { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; overflow: hidden; }
.m-page.active { opacity: 1; visibility: visible; z-index: 2; }
.m-page::before { content: ''; position: absolute; inset: 0; border: 14px solid var(--frame-colour, #0E394F); opacity: var(--frame-opacity, 0.9); z-index: 10; pointer-events: none; }
.m-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.m-bg img, .m-bg video { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-bg-fill { width: 100%; height: 100%; }
.m-content { position: relative; z-index: 5; padding: 28px 30px 40px; }
.m-page--bottom { justify-content: flex-end; }
.m-page--middle { justify-content: center; }
.m-page--top { justify-content: flex-start; }
.m-page--top .m-content { padding-top: 64px; }
.m-align-left { text-align: left; }
.m-align-center { text-align: center; }
.m-align-right { text-align: right; }
.m-box-gradient .m-content::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 65%; background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 55%, transparent 100%); z-index: -1; pointer-events: none; }
.m-page--middle.m-box-gradient .m-content::before { inset: 0; height: auto; background: radial-gradient(ellipse at center, rgba(0,0,0,0.5) 0%, transparent 70%); }
.m-page--top.m-box-gradient .m-content::before { bottom: auto; top: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 55%, transparent 100%); }
.m-box-solid .m-content { border-radius: 6px; margin: 16px; padding: 24px; }
.m-box-transparent .m-content::before { display: none; }
.m-section { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; opacity: 0.7; }
.m-title { font-size: 24px; font-weight: 700; line-height: 1.2; margin-bottom: 8px; }
.m-text { font-size: 15px; line-height: 1.55; opacity: 0.88; }
.m-link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; text-decoration: none; color: inherit; opacity: 0.7; border-bottom: 1px solid currentColor; position: relative; z-index: 18; }
.m-cover .m-content { padding-bottom: 44px; color: #fff; }
.m-cover .m-content::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 65%; background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 55%, transparent 100%); z-index: -1; pointer-events: none; }
.m-cover { justify-content: flex-end; }
.m-page-logo { position: absolute; top: 22px; left: 26px; z-index: 12; pointer-events: none; }
.m-page-logo img { height: 16px; width: auto; filter: drop-shadow(0 1px 4px rgba(0,0,0,0.3)); opacity: 0.7; }
.m-cover-logo { position: absolute; top: 0; left: 0; right: 0; z-index: 12; text-align: center; padding-top: 28px; pointer-events: none; }
.m-cover-logo img { width: var(--logo-width, 75%); height: auto; filter: drop-shadow(0 1px 6px rgba(0,0,0,0.3)); }
.m-cover-meta { display: flex; justify-content: space-between; font-size: 11px; font-weight: 500; letter-spacing: 0.06em; opacity: 0.6; margin-bottom: 14px; }
.m-highlights { list-style: none; }
.m-highlights li { font-size: 14px; font-weight: 600; line-height: 1.6; opacity: 0.85; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.04em; }
.m-quote .m-content { padding: 60px 34px; }
.m-quote .m-content::before { display: none; }
.m-quote-text { font-size: 22px; font-weight: 500; line-height: 1.45; font-style: italic; margin-bottom: 16px; }
.m-quote-author { font-size: 13px; font-weight: 600; opacity: 0.6; }
.m-close { justify-content: center; }
.m-close .m-content { text-align: center; padding: 60px 34px; }
.m-close .m-content::before { display: none; }
.m-close-msg { font-size: 20px; font-weight: 600; margin-bottom: 30px; }
.m-close-links { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.m-close-links a { font-size: 14px; font-weight: 500; text-decoration: none; color: inherit; opacity: 0.65; border-bottom: 1px solid currentColor; position: relative; z-index: 18; }
.m-close-signup { margin-bottom: 24px; position: relative; z-index: 18; }
.m-close-signup-label { font-size: 13px; font-weight: 500; opacity: 0.6; margin-bottom: 10px; }
.m-close-signup-form { min-height: 58px; max-width: 440px; margin: 0 auto; width: 100%; }
.m-close-signup-placeholder {
  display: flex; align-items: center; justify-content: center; padding: 0 12px;
  border: 1px dashed currentColor; border-radius: 8px; font-size: 12px; opacity: 0.55; box-sizing: border-box;
}
.m-close-meta { margin-top: 40px; font-size: 11px; opacity: 0.4; }
.m-progress { position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 4px; padding: 10px 18px 0; z-index: 20; }
.m-bar { flex: 1; height: 2px; background: rgba(255,255,255,0.25); border-radius: 1px; }
.m-bar.visited, .m-bar.active { background: rgba(255,255,255,0.8); }
.m-tap { position: absolute; top: 0; bottom: 0; z-index: 15; cursor: pointer; }
.m-tap--prev { left: 0; width: 15%; }
.m-tap--next { right: 0; width: 15%; }
.m-transition { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0E394F; color: #ffffff; opacity: 0; visibility: hidden; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease; }
.m-transition.active { opacity: 1; visibility: visible; transform: translateX(0); }
.m-transition.from-left { transform: translateX(-100%); }
.m-transition.from-left.active { transform: translateX(0); }
.m-transition-label { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; margin-bottom: 12px; }
.m-transition-edition { font-size: 36px; font-weight: 700; letter-spacing: 0.02em; }
a.m-page-logo { text-decoration: none; cursor: pointer; z-index: 15; position: absolute; top: 22px; left: 26px; pointer-events: auto; }

/* Glimpses (Glimpses spec 6.2, 6.3): a 9:16 stage centred in the page, sized
   with container query units so cell proportions match on every device. The
   grid insets keep the cells clear of the progress bars, logo and text. */
.m-glimpses { background: var(--ground, #0B0F12); container-type: size; }
.g-stage { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(100cqw, calc(100cqh * 9 / 16)); aspect-ratio: 9 / 16; container-type: size; pointer-events: none; }
/* The grid area (shared/render/glimpses-layouts.js GRID). Each cell's left, top,
   width and height come inline from the layout table, gaps included. */
.g-grid { position: absolute; left: 10.2%; right: 10.2%; top: 9.9%; bottom: 21.9%; }
.g-cell { position: absolute; overflow: hidden; -webkit-mask-image: var(--g-mask); mask-image: var(--g-mask); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.g-cell--missing { background: rgba(255,255,255,0.08); }
.g-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

@media (prefers-reduced-motion: reduce) {
  .m-page, .m-transition { transition: none; }
}
