/* Current portal palette, 2026-09-16.
   H1/H2/H3: warm ivory on lavender, purple on white. Other text keeps its surface ink.
   Branded surfaces and decorative borders: neon lavender.
   White is neutral paper. Source illustrations, PDFs, and embedded games keep their art.
   Load this shared theme last; earlier palette experiments are not loaded by the portal. */
/* Poppins Black matches the user's Adobe "We are Roadie" reference.
   Self-hosted Latin subsets; licensed under SIL OFL in poppins-OFL.txt. */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('poppins-black-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('poppins-black-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root[data-portal-theme="navy-lavender"] {
  --brand-heading-font: 'Poppins', system-ui, sans-serif;
  --brand-heading-paper-ink: #47246f;
  --brand-heading-surface-ink: #fff3df;
  --brand-heading-ink: var(--brand-heading-paper-ink);
  --brand-paper-ink: #071225;
  --brand-surface-ink: #000000;
  --brand-ink: var(--brand-paper-ink);
  --brand-surface: #b28aff;
  --brand-paper: #fff;
  --navy: var(--brand-ink);
  --ink: var(--brand-ink);
  --muted: var(--brand-ink);
  --paper: var(--brand-paper);
  --action: var(--brand-surface);
  --action-hover: var(--brand-surface);
  --lavender: var(--brand-surface);
  --lavender-hover: var(--brand-surface);
  --lavender-ink: var(--brand-ink);
  --lavender-edge: var(--brand-surface);
  --line: var(--brand-surface);
  --blue: var(--brand-surface);
  --portal-ink: var(--brand-ink);
  --portal-purple: var(--brand-ink);
  --portal-violet: var(--brand-surface);
  --portal-neon: var(--brand-surface);
  --portal-line: var(--brand-surface);
  --portal-soft: var(--brand-surface);
}

/* Text inherits the ink assigned to its surface, including dynamic resource cards. */
:root[data-portal-theme] body,
:root[data-portal-theme] body :where(*) {
  color: var(--brand-ink) !important;
  border-color: var(--brand-surface) !important;
  text-shadow: none;
}
:root[data-portal-theme] body {
  background: var(--brand-paper);
  accent-color: var(--brand-ink);
}
:root[data-portal-theme] body :where(*)::before,
:root[data-portal-theme] body :where(*)::after,
:root[data-portal-theme] body :where(*)::marker {
  color: var(--brand-ink) !important;
}
:root[data-portal-theme] .portal-logo .portal-rune {
  background: var(--brand-ink) !important;
}

/* Keep the selected neon lavender on all branded panels, including reading areas.
   The pale v20 tint was rejected. Readability comes from dark ink and typography. */
:root[data-portal-theme] :is(
  .portal-footer, .welcome-feature, .platform-parent, .world-door,
  .info-toc, .info-callout, .policy-draft, .info-content th,
  .platform-value, .set-materials, .home-library, .parents-notes,
  .parent-section, .steps, .adventure-set, .empty-state, .load-error,
  .parents-ori, .parent-book-feature>a, .resource-preview, .preview-stage, .paper-preview,
  .material-visual, .peach, .blue, .mint, .butter, .lilac, .sand,
  .set-scene, .hero-visual, .welcome-adventure,
  .scene-caption, .welcome-adventure-caption, .scene-credit,
  .set-scene>span, .caption-icon, .scene-go, .adventure-sticker,
  .path-number, .step-number, .benefit-number, .review-strip,
  .atlas-collection .discovery-tools
) {
  background: var(--brand-surface) !important;
  --brand-ink: var(--brand-surface-ink);
  --brand-heading-ink: var(--brand-heading-surface-ink);
  box-shadow: none;
}

/* Compact accents retain the selected neon lavender. */
:root[data-portal-theme] :is(.caption-icon, .scene-go, .adventure-sticker, .path-number, .step-number, .benefit-number) {
  background: var(--brand-surface) !important;
  --brand-ink: var(--brand-surface-ink);
}

/* Neutral areas separate content without introducing more brand colors. */
:root[data-portal-theme] :is(
  .portal-header, .resource-card, .material, .home-material,
  .adventure-card, .parent-path, .feature-set, .proof-card,
  .age-badge, .feature-age, .preview-tag, .parent-portrait,
  .adventure-picture, .atlas-game-picture, .feature-set>a,
  .small-button, .skip-link, dialog
) {
  background: var(--brand-paper) !important;
  --brand-ink: var(--brand-paper-ink);
  --brand-heading-ink: var(--brand-heading-paper-ink);
  box-shadow: none;
}

/* Actions use the same lavender, with black labels in normal and hover states. */
:root[data-portal-theme] :is(
  .button, .primary, .secondary, .adventure-link, .header-button,
  .portal-parent-link, .parents-nav, .parent-entry, .yellow-button,
  .world-home-parent, .atlas-play, .parent-button
) {
  background: var(--brand-surface) !important;
  --brand-ink: var(--brand-surface-ink);
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none;
}
:root[data-portal-theme] :is(
  .filters button, .age-choices button, .world-filters button,
  .shelf-more, .adventure-link.material-link
) {
  background: var(--brand-paper) !important;
  --brand-ink: var(--brand-paper-ink);
  box-shadow: none !important;
}
:root[data-portal-theme] :is(button[aria-pressed="true"], .filters button[aria-pressed="true"], .age-choices button[aria-pressed="true"]) {
  background: var(--brand-surface) !important;
  --brand-ink: var(--brand-surface-ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
:root[data-portal-theme] :is(.button, .adventure-link, .atlas-play, .shelf-more, .world-home-parent):hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
:root[data-portal-theme] :is(.platform-parent, .world-door) .button {
  background: var(--brand-paper) !important;
  --brand-ink: var(--brand-paper-ink);
  border: 1px solid var(--brand-ink) !important;
}
:root[data-portal-theme] :is(.info-content a, .family-format-link, .welcome-go, .atlas-game-bottom>a) {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Input boundaries and keyboard focus use ink for visibility, not decorative color. */
:root[data-portal-theme] body :is(input, select, textarea) {
  background: var(--brand-paper) !important;
  --brand-ink: var(--brand-paper-ink);
  border-color: var(--brand-ink) !important;
}
:root[data-portal-theme] body :is(input, textarea)::placeholder {
  color: var(--brand-ink);
  opacity: 1;
}
:root[data-portal-theme] body :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--brand-ink) !important;
  outline-offset: 4px !important;
}
:root[data-portal-theme] :is(.welcome-feature, .home-worlds .welcome-feature) a:focus-visible {
  outline: 3px solid var(--brand-ink) !important;
  outline-offset: -5px !important;
}
:root[data-portal-theme] dialog::backdrop {
  background: rgb(7 18 37 / 65%);
}

/* Illustration edges stay clean. No return of the rejected purple picture frames. */
:root[data-portal-theme] :is(
  .world-home-visual figure, .family-format-art, .welcome-feature-picture,
  .home-worlds .welcome-feature-picture, .world-home-places img, .world-welcome>img
) {
  border-width: 0 !important;
  background: transparent !important;
}

/* Readability correction: body copy needs a comfortable size, not only a passing ratio. */
:root[data-portal-theme] :is(
  .world-home-description, .family-format-copy>p:not(.family-format-label),
  .family-connection p, .atlas-introduction p, .home-worlds-heading>p,
  .world-trail-heading>p, .atlas-collection-heading>p, .atlas-game p,
  .platform-access p:not(.eyebrow), .feature-set p:not(.eyebrow),
  .parent-path p, .resource-copy>p:not(.resource-kind):not(.resource-meta)
) {
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
}
:root[data-portal-theme] :is(
  .eyebrow, .family-format-label, .family-art-caption, .world-chapter,
  .world-status, .atlas-game-meta, .resource-kind, .resource-meta,
  .world-home-free, .world-home-visual figcaption, .parents-free, .set-age
) {
  font-size: .875rem !important;
  line-height: 1.6;
}
:root[data-portal-theme] .welcome-feature-copy {
  display: flex;
  flex-direction: column;
  padding: 28px;
}
:root[data-portal-theme] .welcome-feature-copy :is(h2, h3) {
  font-size: clamp(1.625rem, 2.2vw, 1.875rem);
  line-height: 1.25;
  margin: 12px 0 16px;
}
:root[data-portal-theme] .welcome-feature-copy>p:not(.welcome-kicker) {
  font: 500 1.125rem/1.7 system-ui, sans-serif;
  margin: 0 0 26px;
  max-width: 36em;
}
:root[data-portal-theme] .welcome-kicker {
  flex-wrap: wrap;
  font: 700 .875rem/1.5 system-ui, sans-serif;
}
:root[data-portal-theme] .welcome-kicker span {
  font: 650 .875rem/1.5 system-ui, sans-serif;
  letter-spacing: .025em;
  text-transform: none;
}
:root[data-portal-theme] .welcome-feature .welcome-go {
  --brand-ink: var(--brand-paper-ink);
  margin-top: auto;
  min-height: 52px;
  padding: 12px 16px;
  box-sizing: border-box;
  border: 2px solid var(--brand-ink) !important;
  border-radius: 12px;
  background: var(--brand-paper);
  font: 700 1.125rem/1.4 system-ui, sans-serif;
  text-decoration: none;
}
:root[data-portal-theme] .welcome-go .welcome-go-label {
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}
:root[data-portal-theme] .welcome-go .welcome-go-arrow {
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
}
:root[data-portal-theme] :is(.portal-header nav a, .portal-footer-links a, .portal-footer p, .portal-footer-bottom a) {
  font-size: 1rem;
  line-height: 1.6;
}
:root[data-portal-theme] .portal-footer-links a { min-height: 44px; }
@media(max-width:700px) {
  :root[data-portal-theme] .welcome-feature-copy { padding: 22px; }
}

/* One strong, upright heading voice throughout the portal, including dynamic
   catalogue titles. Body copy and the established Fredoka wordmark stay distinct. */
:root[data-portal-theme] body :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--brand-heading-font) !important;
  font-weight: 900 !important;
  font-style: normal !important;
  font-synthesis: none;
  letter-spacing: -.025em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
:root[data-portal-theme] body :is(h1, h2, h3, h4, h5, h6) :is(a, em, span, strong) {
  font-family: inherit !important;
  font-weight: inherit !important;
  font-style: normal !important;
  letter-spacing: inherit;
}
:root[data-portal-theme] body h1 { line-height: 1.08; }
/* User correction, 16 September: light headings must break up purple surfaces.
   Surface-specific roles keep white headings off white paper. */
:root[data-portal-theme] :is(
  .farm-titleband, .farm-pages, .farm-memo, .farm-keepsakes, .realm-stories,
  .oak-arrival-note, .oak-paths, .oak-storybook #books,
  .oak-storybook #make-and-play, .welcome-parent,
  .ap-home, .ap-parent, .ap-today, .ap-future, .ap-step, .answer-callout,
  .farm-gate, .farm-jumps, .farm-shelf, .farm-arrival,
  .path-choice:has(:checked), .path-pace, .path-notice, .path-extra,
  .world-landing-hero, .answers-picker, .water-welcome-feature,
  .oak-arrival-scene, .oak-arrival, .oak-game, .oak-draw-intro, .oak-entry,
  .oak-storybook #rhymes .welcome-song, .welcome-hero-art,
  .welcome-cover, .welcome-gift-image, .tablet-sidebar, .tablet-tools,
  .reader-tools, .reader-entry, .coloring-entry, .answers-entry, .tablet-entry
) {
  --brand-heading-ink: var(--brand-heading-surface-ink);
}
/* White cards nested in lavender sections retain their paper heading role. */
:root[data-portal-theme] :is(
  .farm-white, .farm-shelf > .farm-section-title, .ap-dashboard article,
  .oak-storybook .oak-game, .oak-storybook .oak-draw-intro,
  .oak-storybook .welcome-gift, .oak-storybook .welcome-gift-image,
  .oak-storybook .oak-book > .welcome-cover
) {
  --brand-heading-ink: var(--brand-heading-paper-ink) !important;
}
:root[data-portal-theme] body :is(h1, h2, h3) {
  --brand-ink: var(--brand-heading-ink);
  color: var(--brand-heading-ink) !important;
}
:root[data-portal-theme] body :is(h1, h2, h3) :where(*) {
  color: inherit !important;
}
:root[data-portal-theme] .world-home-hero h1 em { white-space: normal; }
:root[data-portal-theme] .portal-footer h2 {
  line-height: 1.4;
  letter-spacing: -.01em;
}

/* Shared image treatment: consistent game previews and rounded portal artwork. */
:root[data-portal-theme] body img {
  border-radius: 16px !important;
}
:root[data-portal-theme] :is(
  .atlas-game-picture, .adventure-picture, .welcome-feature-picture,
  .realm-game-picture
) {
  width: 100%;
  height: auto !important;
  aspect-ratio: 3 / 2 !important;
  border-radius: 16px !important;
  overflow: hidden;
}
:root[data-portal-theme] :is(
  .atlas-game-picture, .adventure-picture, .welcome-feature-picture,
  .realm-game-picture
) img,
:root[data-portal-theme] :is(
  .farm-game > img, .set-scene > img, .hero-art, .welcome-adventure > img,
  .welcome-hero-art > img, .oak-game > img
) {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 3 / 2 !important;
  object-fit: cover !important;
}
:root[data-portal-theme] .welcome-features {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 700px) {
  :root[data-portal-theme] .welcome-features { grid-template-columns: 1fr; }
}
/* Adventure card presentation, 2026-09-30.
   One coloured category bar on top, the adventure name on the bottom of the
   picture, a short child-action caption just below it, and a larger, readable
   Play control. The bar and Play take the adventure's category colour; white
   text on every bar colour stays at least 4.5:1. The name, caption and Play
   are real HTML, never part of the picture. */
:root[data-portal-theme] body .wm-cat {
  display: block;
  margin: 0 0 10px !important;
  padding: 12px 16px !important;
  min-height: 0 !important;
  border: 0;
  border-radius: 14px;
  background: var(--wm-cat, #5B6470) !important;
  background-image: none !important;
  color: #fff !important;
  font-family: var(--brand-heading-font);
  font-weight: 800;
  font-size: clamp(1.05rem, 1.7vw, 1.6rem);
  line-height: 1.25;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
:root[data-portal-theme] body .wm-card-name {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  margin: 0;
  padding: 26px 14px 12px;
  background: linear-gradient(180deg, rgba(7, 18, 37, 0), rgba(7, 18, 37, .8));
  color: #fff !important;
  font-family: var(--brand-heading-font);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
  overflow-wrap: anywhere;
}
:root[data-portal-theme] body .wm-card-caption {
  margin: 10px 0 0;
  color: #17324d !important;
  font-family: var(--brand-heading-font);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.45;
}
:root[data-portal-theme] body .wm-card-age {
  margin: 4px 0 0;
  color: #526174 !important;
  font-family: var(--brand-heading-font);
  font-weight: 600;
  font-size: .85rem;
  line-height: 1.5;
}
:root[data-portal-theme] body .atlas-game-picture,
:root[data-portal-theme] body .world-game-frame {
  position: relative;
}
/* The set hero reuses the shared card copy: bar, name on the picture, caption
   below it. The left-hand <h1> still carries the full title. */
:root[data-portal-theme] body .set-scene > .world-game-frame {
  display: block;
  position: relative;
  padding: 0 !important;
  border-radius: 26px 26px 4px 4px;
  overflow: hidden;
  background: #fff;
}
:root[data-portal-theme] body .set-scene > .world-game-frame > img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
:root[data-portal-theme] body .set-scene > .wm-card-caption {
  padding: 14px 14px 18px;
  margin: 0;
  color: #174A7E !important;
  text-align: center;
}
/* The set-scene category bar keeps its card size; set-experience.css resets
   every direct .set-scene > span to 16px, so pin the label at 20-24px. */
:root[data-portal-theme] body .set-scene > .wm-cat {
  font-size: clamp(1.25rem, 1.7vw, 1.5rem) !important;
}
/* Play is its own sibling of the picture link: a card never nests controls. */
:root[data-portal-theme] body .realm-game-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 10px 6px 0;
}
:root[data-portal-theme] body .realm-game-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #17324d !important;
  font-family: var(--brand-heading-font);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 4px;
}
:root[data-portal-theme] body .realm-game-actions a.wm-play {
  min-height: 48px;
  min-width: 116px;
  padding: 12px 22px;
  justify-content: center;
  border: 0;
  border-radius: 24px;
  box-sizing: border-box;
  background: #174A7E !important;
  background-image: none !important;
  color: #fff !important;
  font-family: var(--brand-heading-font);
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1.2;
  text-decoration: none;
}
:root[data-portal-theme] body .realm-game-actions a.wm-play:is(:hover, :focus-visible) {
  text-decoration: underline;
  text-underline-offset: 4px;
}
:root[data-portal-theme] body :is(.wm-play, .atlas-play):focus-visible {
  outline: 3px solid #071225 !important;
  outline-offset: 3px !important;
}
:root[data-portal-theme] body .atlas-play {
  min-height: 48px;
  min-width: 108px;
  padding: 12px 20px;
  border: 0;
  border-radius: 24px;
  background: #174A7E !important;
  background-image: none !important;
  color: #fff !important;
  font-family: var(--brand-heading-font);
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1.2;
  cursor: pointer;
}
/* The catalogue shows the canonical framed art only: the protruding
   character cutout overlays were rejected on 2026-09-30. */
:root[data-portal-theme] body .atlas-game .atlas-game-picture {
  aspect-ratio: 3 / 2 !important;
  overflow: hidden !important;
  background: transparent;
}
:root[data-portal-theme] body .atlas-game .world-game-shot {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
}
:root[data-portal-theme] body .atlas-game .world-game-frame {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 16px;
}
:root[data-portal-theme] body .atlas-game .world-game-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* >>> adventure-card-categories:start (generated) >>> */
:root[data-portal-theme] body .wm-cat[data-category="adding"]{background:#A32E6B !important}
:root[data-portal-theme] body .wm-cat[data-category="balance"]{background:#2F6BD8 !important}
:root[data-portal-theme] body .wm-cat[data-category="changes"]{background:#6A3FA0 !important}
:root[data-portal-theme] body .wm-cat[data-category="counting"]{background:#A8541E !important}
:root[data-portal-theme] body .wm-cat[data-category="discovery"]{background:#7A5A00 !important}
:root[data-portal-theme] body .wm-cat[data-category="logic"]{background:#7A4A16 !important}
:root[data-portal-theme] body .wm-cat[data-category="matching"]{background:#8A5A2B !important}
:root[data-portal-theme] body .wm-cat[data-category="measuring"]{background:#2E7A46 !important}
:root[data-portal-theme] body .wm-cat[data-category="memory"]{background:#C0503F !important}
:root[data-portal-theme] body .wm-cat[data-category="paths"]{background:#46539E !important}
:root[data-portal-theme] body .wm-cat[data-category="patterns"]{background:#127A7D !important}
:root[data-portal-theme] body .wm-cat[data-category="puzzles"]{background:#5B3A8C !important}
:root[data-portal-theme] body .wm-cat[data-category="sequencing"]{background:#1F6F6F !important}
:root[data-portal-theme] body .wm-cat[data-category="shadow"]{background:#40406E !important}
:root[data-portal-theme] body .wm-cat[data-category="shapes"]{background:#8A4FA0 !important}
:root[data-portal-theme] body .wm-cat[data-category="sharing"]{background:#8C2F39 !important}
:root[data-portal-theme] body .wm-cat[data-category="sorting"]{background:#6E5A2E !important}
:root[data-portal-theme] body .wm-cat[data-category="symmetry"]{background:#2A5C8A !important}
/* <<< adventure-card-categories:end <<< */
