/* Sampled from the three landscapes. The page, controls and reading chapters use one palette. */
body {
  --scene-base: 10 24 32;
  --scene-raised: 19 44 57;
  --scene-accent: 139 212 234;
  --scene-glint: 187 232 245;
  --scene-muted: #b7cad2;
  --scene-plate: url("/seaside-assets/shore-after-rain.webp");
  --scene-edge: rgb(var(--scene-glint) / .21);
  --scene-panel: linear-gradient(140deg, rgb(var(--scene-glint) / .10), transparent 52%), rgb(var(--scene-raised) / .76);
  --scene-rim: inset 0 1px 0 rgb(var(--scene-glint) / .12), 0 12px 32px rgb(2 8 13 / .16);
  --shore-story-rgb: var(--scene-base);
  --on-cream: #f2f6f5;
  --on-muted: var(--scene-muted);
  --on-rule: var(--scene-edge);
  --on-orange: rgb(var(--scene-accent));
  color-scheme: dark;
  background: rgb(var(--scene-base));
}
body[data-scene="forest-whisper"] {
  --scene-base: 12 25 22;
  --scene-raised: 27 48 39;
  --scene-accent: 163 215 166;
  --scene-glint: 203 233 193;
  --scene-muted: #bed0c1;
  --scene-plate: url("/seaside-assets/forest-whisper.webp");
}
body[data-scene="starlit-breeze"] {
  --scene-base: 18 20 37;
  --scene-raised: 38 39 64;
  --scene-accent: 191 187 244;
  --scene-glint: 218 215 255;
  --scene-muted: #c4c3d7;
  --scene-plate: url("/seaside-assets/starlit-breeze.webp");
}
body[data-art="cloud-tide"] { --shore-story-rgb: var(--scene-base); }
html { scrollbar-gutter: stable; }
::selection { background: rgb(var(--scene-accent) / .36); color: #fff; }
.on-header {
  --dock-fill: rgb(var(--scene-base) / .82);
  --dock-choice: rgb(var(--scene-glint));
  --glass-edge: var(--scene-edge);
}
.on-header .listen-nav-tabs a[aria-current],
.scene-controls .scene-choice[aria-pressed="true"] {
  color: rgb(var(--scene-glint));
  background: linear-gradient(147deg, rgb(var(--scene-glint) / .22), rgb(var(--scene-accent) / .10));
  border-color: rgb(var(--scene-accent) / .28);
}
.scene-controls { background: var(--scene-panel); border-color: var(--scene-edge); }
.scene-choice[aria-controls="scene-seaside-nostalgia"] { --scene-light: #a6deef; }
#scene-seaside-nostalgia {
  --listen-accent: #a8e2ec;
  --listen-light: #6eb3d4;
}
#scene-seaside-nostalgia .shore-water {
  filter: grayscale(.88) sepia(.57) hue-rotate(150deg) saturate(1.87);
}
#scene-seaside-nostalgia .listen-panel.listen-face {
  border-color: rgb(178 223 240 / .32);
  background: radial-gradient(ellipse at 100% 0%, #72c7e338, transparent 76%), rgb(12 29 39 / .81);
}
#scene-seaside-nostalgia .listen-status { color: #cee1e7; }
.shore-carousel .scene-choice:focus-visible, .on-header :is(a,button):focus-visible {
  outline-color: rgb(var(--scene-glint));
}

/* Let a little of the scenery show through at either end of the editorial canvas. */
[data-art="cloud-tide"] .shore-origin {
  position: relative; isolation: isolate;
  background: rgb(var(--scene-base)); border: none;
}
.shore-origin::before, body > .on-ending::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0;
  background: var(--scene-plate) center 62% / cover no-repeat;
  opacity: .24;
  mask-image: linear-gradient(0deg, transparent, #0009 24%, black 57%, transparent 100%);
}
.shore-origin-inner { column-gap: clamp(35px, 7vw, 95px); }
.shore-origin .shore-credit { color: rgb(var(--scene-accent)); }
.shore-origin .shore-letter > p:not(.shore-credit) { color: var(--scene-muted); }
.shore-origin .shore-link, .on-home .oh-text-link {
  color: rgb(var(--scene-glint)); text-decoration-color: rgb(var(--scene-accent) / .64);
}
.shore-origin .shore-glass {
  justify-self: end; width: min(100%, 424px); padding: clamp(12px, 1.3vw, 19px);
  border: 1px solid var(--scene-edge); border-radius: 28px; background: var(--scene-panel); box-shadow: var(--scene-rim);
}
.shore-origin .shore-glass img { width: 100%; border-color: rgb(var(--scene-glint) / .13); border-radius: 16px; }
.shore-origin .shore-glass figcaption { padding: 3px 4px 0; color: var(--scene-muted); }
.edition-body {
  background: radial-gradient(ellipse 58% 37% at 2% 32%, rgb(var(--scene-accent) / .06), transparent),
    radial-gradient(ellipse 54% 28% at 98% 64%, rgb(var(--scene-accent) / .07), transparent), rgb(var(--scene-base));
}
.edition-body .on-home {
  --oh-accent: rgb(var(--scene-accent)); --oh-rule: var(--scene-edge);
  --oh-ink: var(--on-cream); --oh-muted: var(--scene-muted);
}
.on-home .oh-kicker, .on-home .oh-year { color: rgb(var(--scene-accent)); }
.on-home .oh-colors {
  border: 1px solid var(--scene-edge); border-radius: 20px;
  background: var(--scene-panel); box-shadow: var(--scene-rim);
}
.oh-timeline article { position: relative; border-top: 1px solid var(--scene-edge); }
.oh-timeline article::before {
  content: ""; position: absolute; top: -2px; left: 0; height: 3px; width: 32px;
  background: rgb(var(--scene-accent)); border-radius: 2px;
}
.on-home .history-art { stroke: var(--scene-muted); }
.on-home .history-art :is(.ha-case,.ha-glass) { fill: rgb(var(--scene-accent) / .08); }
.on-home .history-art :is(.ha-signal,.ha-flow,.ha-samples,.ha-detail) { stroke: rgb(var(--scene-accent)); }
.on-home .oh-colors { padding: clamp(15px,2.5vw,32px); }
.on-home .oh-colors > div:last-child { padding-bottom: 0; }
body > .on-ending {
  position: relative; isolation: isolate; overflow: hidden;
  border-color: var(--scene-edge); background: rgb(var(--scene-raised));
}
body > .on-ending::before {
  opacity: .35; background-position: 50% 45%;
  mask-image: linear-gradient(90deg,transparent,#0007 39%,black 76%,#0008);
}
.on-ending .on-ending-primary, .sheet-content .sheet-page :is(.on-ending-primary,.primary,.app-store-link) {
  color: rgb(var(--scene-base)); border: 1px solid rgb(var(--scene-glint) / .77); border-radius: 999px;
  background: linear-gradient(140deg, rgb(var(--scene-glint)), rgb(var(--scene-accent)));
  box-shadow: inset 0 1px 0 #ffffff55, 0 4px 14px #0002;
}
.on-ending .on-ending-secondary { color: rgb(var(--scene-glint)); border-color: rgb(var(--scene-accent) / .55); }
.on-footer, .review-return { background: rgb(var(--scene-base)); border-color: var(--scene-edge); }
.on-footer nav a, .on-footer .on-up, .on-ending p { color: var(--scene-muted); }
.on-footer a[aria-current], .on-footer .on-up span { color: rgb(var(--scene-accent)); }
.on-footer .on-brand b { color: #ff8950; }
@media (hover:hover) {
  .on-footer a:hover, .on-home .oh-text-link:hover { color: rgb(var(--scene-glint)); }
  .on-ending .on-ending-primary:hover, .sheet-content .sheet-page :is(.primary,.app-store-link):hover { background: rgb(var(--scene-glint)); color: rgb(var(--scene-base)); }
}
@media (min-width: 761px) {
  .shore-origin .shore-glass { margin-right: clamp(0px, 2.8vw, 46px); }
}
@media (max-width: 760px) {
  .shore-origin .shore-glass { justify-self: start; }
}

/* Document contents share the active landscape palette. */
.sheet-content, .sheet-content .sheet-page, .sheet-content .app-content {
  --soft: var(--scene-muted); --muted: var(--scene-muted); --ink: var(--on-cream); --accent: rgb(var(--scene-accent));
  --orange: rgb(var(--scene-accent)); --bg: rgb(var(--scene-base)); --panel: rgb(var(--scene-raised)); --paper: rgb(var(--scene-base)); --line: var(--scene-edge);
  background: transparent; color: var(--on-cream);
}
/* The same landscape is faintly visible at the leading edge of each document. */
.sheet-content .sheet-page { position: relative; isolation: isolate; }
.sheet-content .sheet-page::before {
  content: ""; position: absolute; inset: 0 0 auto; z-index: -1;
  height: clamp(150px, 24vw, 270px); pointer-events: none;
  background: var(--scene-plate) center 44% / cover no-repeat; opacity: .16;
  mask-image: linear-gradient(170deg, #000b, #0007 25%, transparent 84%);
}
.sheet-content .sheet-page .sheet-page-main, .sheet-content .doc-main.wrap {
  width: auto; max-width: 100%; margin: 0; padding: 0 var(--sheet-gutter) clamp(35px,5vw,72px);
}
.sheet-content .sheet-page-main .wrap { width: 100%; max-width: 100%; margin-inline: 0; }
.sheet-content .on-intro { gap: clamp(16px,3vw,42px); padding-block: clamp(28px,4vw,58px); }
.sheet-content :is(.on-intro h1,.hero h1) { font-size: clamp(2.65rem,4.8vw,5rem); }
.sheet-content :is(.on-intro h1 em,.hero h1 em,.on-caption,.on-jump a span,.eyebrow,.tone-story h2 em,.tone-guide,.on-zoom,.doc-note a) { color: rgb(var(--scene-accent)); }
.sheet-content .sheet-page :is(.on-caption,.eyebrow), .on-home .oh-kicker {
  font: 550 .75rem/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .075em; text-transform: uppercase; color: rgb(var(--scene-accent));
}
.sheet-content :is(.on-lead,.on-date,.policy-content p,.prose p,.answer p,.on-index a,.doc-note) { color: var(--scene-muted); }
.sheet-content :is(.on-jump,.device-stage,.night-visual,.on-search) {
  border: 1px solid var(--scene-edge); border-radius: 18px; background: var(--scene-panel); box-shadow: var(--scene-rim);
}
.sheet-content .on-search { border-radius: 10px; background: rgb(var(--scene-base) / .70); box-shadow: none; }
.sheet-content :is(.on-jump a + a,.on-index a,.doc-detail,.app-subnav,.on-ending) { border-color: var(--scene-edge); }
.sheet-content .on-index > summary { color: rgb(var(--scene-glint)); }
.sheet-content .on-index a[aria-current], .sheet-content .on-reading .doc-detail[open] > summary { color: rgb(var(--scene-accent)); }
.sheet-content .on-index a[aria-current] { background: rgb(var(--scene-accent) / .07); border-color: rgb(var(--scene-accent)); }
.sheet-content :is(.on-index,.doc-detail) > summary::after { border-color: rgb(var(--scene-accent)); }
.sheet-content .on-rail { top: 0; }
.sheet-content .on-ending { background: rgb(var(--scene-raised) / .4); }
.sheet-content .on-container { width: calc(100% - 2 * var(--sheet-gutter)); }
.sheet-content .on-reading-body, .sheet-content .on-help-panel { min-width: 0; }
.sheet-content .app-subnav { row-gap: 0; }
.sheet-content .view-section, .sheet-content .night-section { background: transparent; }
.sheet-content .feature-chart { font-size: clamp(.78rem,1.5vw,.97rem); }
.sheet-content .feature-chart-wrap { max-width: 100%; overflow-x: auto; }
dialog.on-viewer { background: rgb(var(--scene-base)); border-color: var(--scene-edge); border-radius: 18px; }
.on-viewer .on-viewer-tools { background: var(--scene-panel); }
.on-viewer .on-viewer-tools button {
  color: rgb(var(--scene-glint)); border: 1px solid var(--scene-edge); border-radius: 999px; background: rgb(var(--scene-raised)); min-height: 44px;
}
.on-viewer .on-viewer-image { background: rgb(var(--scene-base)); }
.on-viewer .on-viewer-caption { color: var(--scene-muted); }
@media (hover: hover) {
  .sheet-content :is(.on-jump a,.on-index a,.doc-detail > summary):hover { color: rgb(var(--scene-glint)); background: rgb(var(--scene-accent) / .06); }
}
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .shore-glass { -webkit-backdrop-filter: saturate(1.16) blur(18px); backdrop-filter: saturate(1.16) blur(18px); }
}
@media (min-width: 761px) and (max-width: 1060px) {
  .sheet-content .on-intro { grid-template-columns: minmax(0,1.12fr) minmax(210px,.85fr); }
  .sheet-content .on-reading { column-gap: 24px; }
}
@media (max-width: 760px) {
  .sheet-content .on-intro { display: block; }
}
@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  .on-header { --dock-fill: rgb(var(--scene-base)); --glass-edge: var(--scene-muted); }
  .on-header, .shore-glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .shore-origin::before, body > .on-ending::before, .sheet-content .sheet-page::before { display: none; }
}
@media (forced-colors: active) {
  .on-home .oh-colors, .shore-origin .shore-glass,
  .scene-controls, .sheet-content .on-jump { background: Canvas; color: CanvasText; border-color: ButtonText; box-shadow: none; }
  .shore-origin::before, body > .on-ending::before, .sheet-content .sheet-page::before { display: none; }
}

/* Let enlarged reading text wrap within the phone viewport and its grid tracks. */
.scene-chapter a[href^="mailto:"] { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .shore-carousel h1, .listening-choices button, .scene-chapter :is(h1,h2,h3) { overflow-wrap: anywhere; }
  .on-home .oh-color, .scene-chapter .app-content .tone-feature { grid-template-columns: minmax(0, 1fr); }
  .on-home .oh-colors > div { grid-template-columns: min(4em, 30%) minmax(0, 1fr); }
  .on-home .oh-colors dd { overflow-wrap: anywhere; }
}
