:root {
  --theme-cream: #fffaf3;
  --theme-paper: #fffdf8;
  --theme-midnight: #171f65;
  --theme-midnight-2: #28337a;
  --theme-sky: #b9d8ff;
  --theme-lavender: #c9bdf2;
  --theme-gold: #f5c84c;
  --theme-sunset: #f4a486;
  --theme-green: #7ba97f;
  --theme-green-dark: #456e52;
  --theme-ink: #25314f;
  --theme-muted: #68748d;
  --theme-line: rgba(23,31,101,.14);
  --theme-shadow: 0 24px 74px rgba(23,31,101,.11);
  --theme-soft-shadow: 0 12px 36px rgba(23,31,101,.07);
  --theme-display: ui-serif, Georgia, 'Times New Roman', serif;
  --theme-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--theme-cream); color: var(--theme-ink); font-family: var(--theme-body); }
a { color: inherit; }
.theme-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 58px; padding: 7px clamp(14px, 4vw, 46px); background: rgba(255,250,243,.88); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(23,31,101,.10); box-sizing: border-box; }
.theme-logo { display: inline-flex; align-items: center; text-decoration: none; min-width: 0; }
.theme-logo-image { display: block; width: auto; height: 44px; max-width: min(250px, 52vw); object-fit: contain; }
.theme-logo-fallback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.theme-menu-toggle { display: none; border: 1px solid rgba(23,31,101,.14); background: rgba(255,255,255,.70); color: var(--theme-midnight); border-radius: 999px; padding: 7px 10px; min-height: 33px; font-size: 12px; font-weight: 850; line-height: 1; }
.theme-header-actions { display: flex; align-items: center; gap: 10px; }
.theme-login-link { color: #4d5973; font-weight: 780; text-decoration: none; font-size: 13px; }
.theme-header-cta, .theme-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border-radius: 14px; padding: 10px 16px; font-weight: 900; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; box-sizing: border-box; }
.theme-header-cta { min-height: 34px; padding: 7px 12px; border-radius: 999px; font-size: 13px; background: linear-gradient(135deg, var(--theme-midnight), var(--theme-midnight-2)); color: #fff; box-shadow: 0 9px 22px rgba(23,31,101,.16); white-space: nowrap; }
.theme-button-primary { background: linear-gradient(135deg, var(--theme-midnight), var(--theme-midnight-2)); color: #fff; box-shadow: 0 12px 28px rgba(23,31,101,.18); }
.theme-button-secondary { background: rgba(255,255,255,.86); color: var(--theme-midnight); border-color: var(--theme-line); box-shadow: var(--theme-soft-shadow); }
.theme-button-muted { background: rgba(255,255,255,.40); color: #56617a; border-color: var(--theme-line); box-shadow: none; }
.theme-button:hover, .theme-header-cta:hover { transform: translateY(-1px); }
.theme-main { min-height: 68vh; background: var(--theme-cream); }
.theme-container { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.theme-page { padding: clamp(34px, 6vw, 84px) 0; }
.theme-content-card, .theme-list-card, .theme-story-card, .theme-term-card, .theme-tax-hero, .theme-story-hero, .theme-portal-panel, .theme-quote-panel, .theme-admin-prompt { border: 1px solid var(--theme-line); border-radius: 28px; background: rgba(255,255,255,.84); box-shadow: var(--theme-shadow); }
.theme-content-card, .theme-portal-panel, .theme-quote-panel, .theme-admin-prompt { padding: clamp(24px,4vw,44px); }
.theme-content-card h1, .theme-content-card h2, .theme-section-heading h1, .theme-section-heading h2, .theme-story-copy h1, .theme-tax-hero h1, .theme-portal-panel h2, .theme-quote-panel h2 { font-family: var(--theme-display); letter-spacing: -.052em; line-height: .96; color: var(--theme-midnight); }
.theme-content-card h1, .theme-section-heading h1, .theme-story-copy h1, .theme-tax-hero h1 { font-size: clamp(42px,7vw,76px); margin: 0 0 18px; }
.theme-content-card h2, .theme-section-heading h2, .theme-portal-panel h2, .theme-quote-panel h2 { font-size: clamp(30px,4vw,50px); margin: 0 0 14px; }
.theme-eyebrow { display: inline-flex; width: max-content; max-width: 100%; color: var(--theme-green-dark); padding: 0; font-size: 12px; font-weight: 950; text-transform: uppercase; letter-spacing: .16em; margin: 0 0 16px; }
.theme-lead, .theme-section-heading p, .theme-content-card p, .theme-story-copy p, .theme-tax-hero p, .theme-portal-panel p, .theme-quote-panel p { color: var(--theme-muted); line-height: 1.7; font-size: clamp(17px, 2vw, 21px); }
.theme-grid-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; margin-top: 26px; }
.theme-list-card { padding: 22px; }
.theme-list-card h2, .theme-list-card h3 { margin: 0 0 8px; }
.theme-list-card a { text-decoration: none; }
.theme-story-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.theme-story-grid.compact { grid-template-columns: repeat(3, minmax(0,1fr)); }
.theme-story-card { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 18px; }
.theme-story-image img, .theme-term-card img, .theme-tax-hero img, .theme-book-card img { width: 100%; border-radius: 22px; background: #f5efd8; object-fit: cover; }
.theme-topic-scene {
  width: 100%;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 24px 58px rgba(0,0,0,.22);
  aspect-ratio: 1.16;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.theme-story-image img { aspect-ratio: 1; }
.theme-story-card h2 { margin: 0 0 8px; font-family: var(--theme-display); }
.theme-story-card p { color: var(--theme-muted); line-height: 1.6; }
.theme-story-hero, .theme-tax-hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,.72fr); gap: clamp(28px,5vw,64px); align-items: center; padding: clamp(26px,5vw,62px); margin-top: clamp(24px,4vw,48px); background: radial-gradient(circle at 0 0, rgba(201,189,242,.22), transparent 34%), radial-gradient(circle at 100% 0, rgba(245,200,76,.20), transparent 32%), rgba(255,255,255,.84); }
.theme-story-visual { display: flex; justify-content: center; }
.theme-book-card { position: relative; width: min(100%, 460px); border-radius: 34px; padding: 14px; background: linear-gradient(135deg, var(--theme-midnight), var(--theme-lavender) 48%, var(--theme-sunset) 78%, var(--theme-gold)); box-shadow: 0 30px 80px rgba(23,31,101,.20); }
.theme-book-card img { aspect-ratio: 1; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.theme-book-caption { position: absolute; left: 28px; right: 28px; bottom: 28px; border-radius: 18px; background: rgba(255,255,255,.90); padding: 14px; backdrop-filter: blur(12px); }
.theme-book-caption span { display: block; color: var(--theme-green-dark); font-size: 12px; font-weight: 950; text-transform: uppercase; letter-spacing: .12em; }
.theme-book-caption strong { display: block; margin-top: 5px; color: var(--theme-midnight); font-family: var(--theme-display); font-size: 24px; line-height: 1.05; }
.theme-name-cta { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 12px; align-items: end; margin: 24px 0 14px; max-width: 660px; }
.theme-name-cta label { display: grid; gap: 8px; font-weight: 900; }
.theme-name-cta input { min-height: 48px; border: 1px solid var(--theme-line); border-radius: 15px; padding: 12px 14px; font: inherit; background: #fff; }
.theme-topic-name-cta {
  max-width: 720px;
  grid-template-columns: minmax(240px, 1fr) auto;
}
.theme-topic-name-cta .theme-button {
  min-height: 48px;
}
.theme-topic-name-note {
  margin: 0;
  font-size: 13px !important;
  color: rgba(247,248,255,.74) !important;
}
.theme-story-details { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; margin-top: 24px; }
.theme-sample-page { border: 1px solid var(--theme-line); border-radius: 22px; background: #fff8df; padding: 24px; font-family: var(--theme-display); color: #3a4761 !important; }
.theme-related-terms { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.theme-related-terms a { border: 1px solid var(--theme-line); border-radius: 999px; background: #fff; padding: 8px 12px; text-decoration: none; color: var(--theme-green-dark); font-weight: 850; }
.theme-cta-panel { background: linear-gradient(180deg, #fff, #f4f8ec); }
.theme-tax-hero img { aspect-ratio: 1.25; }
.theme-tax-grid-section { margin-top: 34px; }
.theme-term-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.theme-term-card { display: grid; gap: 10px; text-decoration: none; padding: 14px; color: var(--theme-ink); transition: transform .18s ease, box-shadow .18s ease; }
.theme-term-card:hover { transform: translateY(-3px); box-shadow: 0 18px 46px rgba(23,31,101,.12); }
.theme-term-card img { aspect-ratio: 1.2; }
.theme-term-card strong { font-size: 17px; }
.theme-term-card span { color: var(--theme-muted); font-size: 13px; font-weight: 850; }
.theme-story-long { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.theme-story-long .theme-content-card { min-height: 100%; }
.theme-mini-proof { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: 26px; }
.theme-mini-proof article { border: 1px solid var(--theme-line); border-radius: 22px; background: rgba(255,255,255,.8); padding: 18px; }
.theme-mini-proof strong { display:block; color: var(--theme-green-dark); margin-bottom:6px; }
.theme-feature-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.theme-feature-row article, .theme-story-steps article, .theme-portal-options article, .theme-narrow-card { border: 1px solid var(--theme-line); border-radius: 22px; background: rgba(255,255,255,.78); padding: 20px; }
.theme-feature-row span { display: inline-grid; place-items:center; width: 42px; height: 42px; border-radius: 16px; background: linear-gradient(135deg, rgba(185,216,255,.24), rgba(201,189,242,.22)); margin-bottom: 12px; }
.theme-story-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.theme-story-steps strong { color: var(--theme-midnight); }
.theme-story-final { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; margin-top: 28px; }
.theme-portal-options { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; margin-top: 24px; }
.theme-portal-options strong, .theme-narrow-card strong { color: var(--theme-midnight); }
.theme-narrow-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 20px; }
.theme-narrow-card { text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.theme-narrow-card:hover { transform: translateY(-2px); box-shadow: var(--theme-soft-shadow); }
.theme-age-expect { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 0; padding: 0; list-style: none; }
.theme-age-expect li { border: 1px solid var(--theme-line); border-radius: 999px; background: rgba(255,255,255,.76); padding: 8px 12px; color: var(--theme-midnight); font-weight: 850; }
.theme-route-badge { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(245,200,76,.36); background: rgba(255,245,190,.54); color: var(--theme-midnight); border-radius: 999px; padding: 8px 12px; font-weight: 900; font-size: 13px; }
.theme-admin-prompt { margin-top: 28px; background: rgba(23,31,101,.94); color: #fff; box-shadow: none; }
.theme-admin-prompt p { color: rgba(255,255,255,.75); font-size: 14px; }
.theme-admin-prompt textarea { width: 100%; min-height: 120px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; padding: 14px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; box-sizing: border-box; }
.theme-missing-plugin { width: min(900px, calc(100% - 36px)); margin: 60px auto; border: 1px solid var(--theme-line); border-radius: 30px; background: #fff; padding: 42px; }
.theme-footer { display: grid; grid-template-columns: 1fr 1.4fr; gap: 36px; padding: 44px clamp(18px,4vw,52px); background: linear-gradient(135deg, #11194f, #202a6e); color: #fff; }
.theme-footer p { color: rgba(255,255,255,.72); max-width: 540px; }
.theme-footer strong { font-size: 24px; }
.theme-footer-columns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.theme-footer-columns h4 { margin: 0 0 10px; color: #fff1a8; }
.theme-footer-columns a { display:block; color: rgba(255,255,255,.84); text-decoration: none; font-weight: 750; margin: 8px 0; }
@media (max-width: 980px) {
  .theme-grid-list, .theme-story-grid, .theme-story-grid.compact, .theme-term-grid, .theme-story-hero, .theme-tax-hero, .theme-story-details, .theme-story-long, .theme-mini-proof, .theme-footer, .theme-footer-columns, .theme-feature-row, .theme-story-steps, .theme-portal-options, .theme-story-final, .theme-narrow-grid { grid-template-columns: 1fr; }
  .theme-story-card { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .theme-header { min-height: 52px; padding: 6px 12px; }
  .theme-logo-image { height: 38px; max-width: 172px; }
  .theme-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .theme-header-actions { position: absolute; right: 10px; top: calc(100% + 8px); display: none; width: min(190px, calc(100vw - 20px)); max-width: calc(100vw - 20px); padding: 10px; border: 1px solid var(--theme-line); border-radius: 18px; background: rgba(255,255,255,.97); box-shadow: 0 20px 60px rgba(23,31,101,.18); box-sizing: border-box; overflow: hidden; }
  .theme-header-actions.is-open { display: grid; gap: 8px; }
  .theme-header-cta { width: 100%; min-height: 32px; padding: 7px 10px; font-size: 12px; }
  .theme-login-link { padding: 6px 4px; font-size: 13px; }
}
@media (max-width: 640px) {
  .theme-container { width: min(100% - 28px, 1180px); }
  .theme-story-hero, .theme-tax-hero, .theme-content-card, .theme-portal-panel, .theme-quote-panel { border-radius: 22px; padding: 22px; }
  .theme-name-cta { grid-template-columns: 1fr; }
  .theme-topic-name-cta .theme-button { width: 100%; }
  .theme-topic-scene { aspect-ratio: 1.05; }
  .theme-book-caption { left: 20px; right: 20px; bottom: 20px; }
}

/* V5 theme polish */
.theme-header { min-height: 66px; }
.theme-logo-image { height: 54px; max-width: min(330px, 58vw); }
.theme-header-cta { min-height: 30px; padding: 6px 11px; font-size: 12px; box-shadow: 0 7px 18px rgba(23,31,101,.14); }
.theme-login-link { font-size: 12px; }
.theme-button-primary, .theme-header-cta { background: linear-gradient(135deg, #17215f, #303687); }
.theme-tax-hero .theme-eyebrow, .theme-story-copy .theme-eyebrow, .theme-content-card .theme-eyebrow { color: #5662a6; }
.theme-specific-landing .theme-lead { max-width: 760px; }
.theme-portal-panel .theme-story-steps article strong { display: block; margin-bottom: 8px; color: var(--theme-midnight); }
.theme-portal-panel .theme-story-steps article p { margin: 0; font-size: 15px; }
.theme-portal-options p, .theme-narrow-card p { font-size: 15px; line-height: 1.58; }
.theme-term-card span { color: var(--theme-muted); line-height: 1.45; }
.theme-story-long { margin-top: 28px; }
.theme-tax-grid-section { margin-bottom: 28px; }
@media (max-width: 720px) {
  .theme-header { min-height: 54px; padding: 6px 10px; }
  .theme-logo-image { height: 41px; max-width: 204px; }
  .theme-header-actions { width: min(164px, calc(100vw - 20px)); padding: 9px; }
  .theme-header-cta { width: 100%; min-height: 29px; padding: 6px 8px; font-size: 11px; }
  .theme-login-link { padding: 4px; font-size: 12px; }
}

/* v0.7.0 portal/topic page architecture polish */
.theme-landing-hero {
  background:
    radial-gradient(circle at 4% 0, rgba(201,189,242,.30), transparent 33%),
    radial-gradient(circle at 94% 8%, rgba(245,200,76,.18), transparent 31%),
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,253,248,.76));
  overflow: hidden;
}
.theme-proof-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}
.theme-proof-chip-row span {
  border: 1px solid rgba(23,31,101,.12);
  background: rgba(255,255,255,.78);
  border-radius: 999px;
  padding: 9px 13px;
  color: #4f5b75;
  font-weight: 800;
  font-size: 13px;
}
.theme-proof-chip-row strong { color: #171f65; }
.theme-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}
.theme-section-panel,
.theme-gift-panel,
.theme-final-prompt {
  margin-top: 30px;
}
.theme-polished-card {
  border-color: rgba(23,31,101,.12) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(249,246,255,.72)) !important;
  box-shadow: 0 14px 36px rgba(23,31,101,.07) !important;
}
.theme-polished-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(23,31,101,.13) !important;
}
.theme-portal-options article,
.theme-story-steps article,
.theme-narrow-card {
  position: relative;
  overflow: hidden;
}
.theme-portal-options article:before,
.theme-story-steps article:before,
.theme-narrow-card:before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #6c58d8, #d8ae43);
  opacity: .85;
}
.theme-narrow-card span {
  display: inline-flex;
  margin-top: 10px;
  color: #6c58d8;
  font-weight: 900;
}
.theme-layer-list { display: grid; gap: 12px; margin-top: 18px; }
.theme-layer-list div {
  display: grid;
  grid-template-columns: minmax(120px, .42fr) 1fr;
  gap: 16px;
  align-items: start;
  border: 1px solid rgba(23,31,101,.10);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.72);
}
.theme-layer-list strong { color: #171f65; }
.theme-layer-list span { color: #68748d; line-height: 1.55; }
.theme-card-library .theme-section-heading p { max-width: 980px; }
.theme-final-prompt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  background:
    radial-gradient(circle at 100% 0, rgba(216,174,67,.16), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(248,244,255,.82));
}
@media (max-width: 760px) {
  .theme-final-prompt,
  .theme-layer-list div { grid-template-columns: 1fr; }
  .theme-hero-actions { flex-direction: column; align-items: stretch; }
}

/* v1.0.12 unified night-sky hero bands and parchment sections */
body {
  background-color: var(--theme-cream);
  background-image: url('../images/placeholders/parchment-paper-texture.svg');
  background-size: 1200px 800px;
  background-repeat: repeat;
}
.theme-night-hero {
  position: relative;
  overflow: hidden;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: clamp(38px, 6vw, 76px) max(clamp(18px, 4vw, 54px), calc((100vw - 1180px) / 2)) clamp(32px, 5vw, 64px) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(114,113,202,.24), transparent 30%),
    radial-gradient(circle at 83% 18%, rgba(216,174,67,.10), transparent 20%),
    linear-gradient(180deg, #071027 0%, #0d1740 50%, #121e54 100%) !important;
  color: #f7f8ff;
  box-shadow: 0 1px 0 rgba(255,255,255,.07), 0 30px 60px rgba(7,16,39,.10);
}
.theme-night-hero > *:not(.theme-night-hero-bg) {
  position: relative;
  z-index: 2;
}
.theme-night-hero h1,
.theme-night-hero .theme-lead,
.theme-night-hero p,
.theme-night-hero .theme-eyebrow {
  color: inherit !important;
}
.theme-night-hero h1 {
  color: #fff !important;
  text-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.theme-night-hero .theme-lead,
.theme-night-hero p {
  color: rgba(247,248,255,.84) !important;
}
.theme-night-hero .theme-eyebrow {
  color: #f7d56e !important;
}
.theme-night-hero .theme-proof-chip-row span {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.18);
  color: rgba(255,255,255,.86);
  backdrop-filter: blur(8px);
}
.theme-night-hero .theme-proof-chip-row strong { color: #fff1a8; }
.theme-night-hero img:not(.theme-night-distant-stars):not(.theme-night-foil-stars) {
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 22px 56px rgba(0,0,0,.22);
}
.theme-night-hero .theme-button-secondary {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.22);
  box-shadow: none;
}
.theme-night-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  --theme-night-progress: 0;
}
.theme-night-distant-stars,
.theme-night-foil-stars {
  position: absolute;
  inset: -10% -5% auto -5%;
  width: 110%;
  height: min(620px, 78vh);
  object-fit: cover;
}
.theme-night-distant-stars {
  opacity: .56;
  transform: translate3d(0, calc(var(--theme-night-progress) * 14px), 0) scale(calc(1 + (var(--theme-night-progress) * .018)));
}
.theme-night-foil-stars {
  opacity: .50;
  filter: drop-shadow(0 0 7px rgba(216,174,67,.15));
  transform: translate3d(0, calc(var(--theme-night-progress) * 32px), 0) scale(calc(1 + (var(--theme-night-progress) * .042)));
}
.theme-night-shooting-star {
  position: absolute;
  width: 128px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,244,196,.85), rgba(216,174,67,.16), rgba(255,255,255,0));
  opacity: 0;
  transform: rotate(-18deg);
  filter: blur(.2px) drop-shadow(0 0 8px rgba(216,174,67,.18));
  animation: themeShootingGlow 14s ease-in-out infinite;
}
.theme-night-shooting-star-a { top: 17%; left: -12%; animation-delay: 3.5s; }
.theme-night-shooting-star-b { top: 29%; left: 58%; width: 96px; animation-delay: 10s; animation-duration: 18s; }
@keyframes themeShootingGlow {
  0%, 77%, 100% { opacity: 0; transform: translate3d(0,0,0) rotate(-18deg); }
  81% { opacity: .48; transform: translate3d(210px, 72px, 0) rotate(-18deg); }
  86% { opacity: 0; transform: translate3d(345px, 116px, 0) rotate(-18deg); }
}
.theme-container:not(.theme-night-hero),
.theme-content-card,
.theme-portal-panel,
.theme-quote-panel,
.theme-tax-grid-section,
.theme-story-details,
.theme-story-long,
.theme-story-final,
.theme-feature-row,
.theme-grid-list {
  position: relative;
}
.theme-content-card,
.theme-portal-panel,
.theme-quote-panel,
.theme-story-final,
.theme-tax-grid-section,
.theme-feature-row article,
.theme-story-steps article,
.theme-portal-options article,
.theme-narrow-card,
.theme-term-card,
.theme-story-card,
.theme-list-card {
  background-image: url('../images/placeholders/parchment-paper-texture.svg');
  background-size: 1200px 800px;
}
.theme-page > .theme-feature-row,
.theme-page > .theme-section-heading,
.theme-page > .theme-grid-list,
.theme-container.theme-tax-grid-section,
.theme-container.theme-story-details,
.theme-container.theme-story-long,
.theme-container.theme-portal-panel,
.theme-container.theme-quote-panel,
.theme-container.theme-story-final {
  margin-top: clamp(26px, 4vw, 44px);
}
@media (max-width: 980px) {
  .theme-night-hero {
    grid-template-columns: 1fr !important;
    padding: 32px 18px 38px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .theme-night-shooting-star { animation: none; display: none; }
  .theme-night-distant-stars, .theme-night-foil-stars { transform: none !important; }
}

/* v1.0.14 night hero readability and launch polish */
.theme-night-hero {
  position: relative;
  overflow: hidden;
  color: #f7f8ff;
  background:
    radial-gradient(circle at 50% 0%, rgba(114,113,202,.22), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(216,174,67,.12), transparent 20%),
    linear-gradient(180deg, #071027 0%, #0d1740 52%, #121e54 100%) !important;
}
.theme-night-hero + *,
.theme-night-hero ~ * {
  background-color: var(--theme-cream);
}
.theme-night-hero .theme-night-distant-stars { opacity: .92 !important; filter: none !important; }
.theme-night-hero .theme-night-foil-stars { opacity: .78 !important; filter: drop-shadow(0 0 12px rgba(247,213,110,.28)) !important; }
.theme-night-shooting-star {
  width: 180px !important;
  height: 3px !important;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.98), rgba(255,232,148,.92), rgba(216,174,67,.24), rgba(255,255,255,0)) !important;
  filter: drop-shadow(0 0 12px rgba(255,238,180,.55)) drop-shadow(0 0 24px rgba(216,174,67,.22)) !important;
}
@keyframes themeShootingGlow {
  0%, 75%, 100% { opacity: 0; transform: translate3d(0,0,0) rotate(-18deg); }
  79% { opacity: .44; }
  83% { opacity: .88; transform: translate3d(240px, 80px, 0) rotate(-18deg); }
  88% { opacity: 0; transform: translate3d(390px, 128px, 0) rotate(-18deg); }
}
.theme-night-hero > *:not(.theme-night-hero-bg) { position: relative; z-index: 3 !important; }
.theme-night-hero .theme-content-card,
.theme-night-hero .theme-hero-copy-card,
.theme-night-hero .theme-story-details,
.theme-night-hero .theme-portal-panel {
  background: rgba(255,250,243,.94);
  color: var(--theme-ink);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 22px 56px rgba(0,0,0,.18);
}
.theme-night-hero .theme-content-card p,
.theme-night-hero .theme-hero-copy-card p,
.theme-night-hero .theme-content-card h1,
.theme-night-hero .theme-content-card h2 { color: inherit !important; }

/* v1.0.15 night hero stabilization (no parallax, no shooting stars) */
.theme-night-hero {
  background:
    radial-gradient(circle at 18% 8%, rgba(114,113,202,.16), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(216,174,67,.08), transparent 20%),
    linear-gradient(180deg, #071027 0%, #0d1740 48%, #121e54 100%) !important;
}
.theme-night-hero-bg {
  --theme-night-progress: 0 !important;
}
.theme-night-distant-stars,
.theme-night-foil-stars {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top;
  transform: none !important;
}
.theme-night-distant-stars {
  opacity: .46 !important;
  mix-blend-mode: screen;
  mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,.92) 64%, rgba(0,0,0,.42) 86%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,.92) 64%, rgba(0,0,0,.42) 86%, rgba(0,0,0,0) 100%);
}
.theme-night-foil-stars {
  opacity: .34 !important;
  mix-blend-mode: screen;
}
.theme-night-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 8% 16%, rgba(255,255,255,.94) 0 1px, transparent 2px),
    radial-gradient(circle at 16% 12%, rgba(255,255,255,.82) 0 1px, transparent 2px),
    radial-gradient(circle at 29% 19%, rgba(255,244,201,.9) 0 1.2px, transparent 2.2px),
    radial-gradient(circle at 43% 10%, rgba(255,255,255,.88) 0 1px, transparent 2px),
    radial-gradient(circle at 58% 17%, rgba(255,255,255,.92) 0 1.2px, transparent 2.2px),
    radial-gradient(circle at 74% 9%, rgba(255,244,201,.86) 0 1px, transparent 2px),
    radial-gradient(circle at 87% 20%, rgba(255,255,255,.9) 0 1.2px, transparent 2.2px),
    radial-gradient(circle at 95% 13%, rgba(255,255,255,.82) 0 1px, transparent 2px);
  opacity: .76;
}
.theme-night-shooting-star {
  display: none !important;
  animation: none !important;
}

/* v1.0.16 topic landing sky continuity + hero form polish */
.theme-topic-hero.theme-night-hero {
  --theme-topic-seam: #1a2157;
  margin-top: 0 !important;
  background:
    radial-gradient(circle at 18% 8%, rgba(114,113,202,.16), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(216,174,67,.09), transparent 22%),
    linear-gradient(180deg, #071027 0%, #10173d 54%, var(--theme-topic-seam) 100%) !important;
  box-shadow: none;
}
.theme-topic-hero + .theme-topic-content-sky {
  background-color: transparent !important;
}
.theme-topic-name-cta {
  max-width: 760px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0;
}
.theme-topic-name-cta label {
  margin: 0;
}
.theme-topic-name-cta input {
  min-height: 60px;
  padding: 0 20px;
  font-size: 18px;
  border-radius: 18px 0 0 18px;
  border-right: 0;
}
.theme-topic-name-cta .theme-button {
  min-height: 60px;
  padding: 0 22px;
  border-radius: 0 18px 18px 0;
}
.theme-story-hero .theme-name-cta {
  max-width: 760px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0;
}
.theme-story-hero .theme-name-cta label {
  margin: 0;
}
.theme-story-hero .theme-name-cta input {
  min-height: 60px;
  padding: 0 20px;
  font-size: 18px;
  border-radius: 18px 0 0 18px;
  border-right: 0;
}
.theme-story-hero .theme-name-cta .theme-button {
  min-height: 60px;
  padding: 0 22px;
  border-radius: 0 18px 18px 0;
}
.theme-topic-featured-art {
  width: min(100%, 420px);
  justify-self: end;
  align-self: center;
  aspect-ratio: 1.02;
  border-radius: 22px;
  background-size: contain;
  background-position: center center;
  background-color: rgba(255,255,255,.06);
  box-shadow: 0 18px 44px rgba(0,0,0,.18);
}
.theme-topic-visual {
  position: relative;
  width: min(100%, 470px);
  justify-self: end;
}
.theme-topic-motifs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.theme-topic-motif {
  position: absolute;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.24);
  background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.08));
  backdrop-filter: blur(2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
}
.theme-tax-hero .theme-topic-motif img,
.theme-night-hero .theme-topic-motif img {
  width: 74%;
  height: 74%;
  object-fit: contain;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: none !important;
}
.theme-topic-motif-1 { left: -24px; top: 22px; transform: rotate(-8deg); }
.theme-topic-motif-2 { right: -18px; top: 30%; transform: rotate(7deg); }
.theme-topic-motif-3 { left: 8%; bottom: -18px; transform: rotate(-5deg); }
.theme-topic-motif-4 { right: 12%; bottom: -24px; transform: rotate(9deg); }
.theme-topic-motif-5 { left: 43%; top: -22px; transform: rotate(5deg); }
.theme-topic-motif-6 { right: 40%; bottom: -28px; transform: rotate(-7deg); }
.theme-topic-content-sky {
  --theme-topic-seam: #1a2157;
  position: relative;
  margin-top: 0;
  padding: 0 0 clamp(34px, 5vw, 76px);
  background: linear-gradient(180deg, #071027 0%, #0f1843 45%, #1a2157 100%);
  overflow: hidden;
}
.theme-topic-content-sky::before {
  content: '';
  position: absolute;
  inset: 0;
  height: auto;
  pointer-events: none;
  background:
    url('../images/placeholders/hero-distant-starfield.svg') center top / 126% auto no-repeat,
    radial-gradient(rgba(255,255,255,.84) 1px, transparent 2px) 0 0 / 20px 20px,
    radial-gradient(rgba(255,241,176,.72) .95px, transparent 1.85px) 10px 8px / 24px 24px,
    radial-gradient(rgba(255,255,255,.72) .9px, transparent 1.8px) 4px 12px / 18px 18px;
  opacity: .92;
  mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,.98) 58%, rgba(0,0,0,.66) 80%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,.98) 58%, rgba(0,0,0,.66) 80%, rgba(0,0,0,0) 100%);
}
.theme-topic-content-sky > * {
  position: relative;
  z-index: 1;
}
.theme-topic-content-sky .theme-topic-content-card {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(248,244,255,.9));
  box-shadow: 0 20px 52px rgba(7,16,39,.22);
}
.theme-topic-content-sky .theme-topic-content-card-row {
  margin-top: clamp(26px, 4vw, 42px);
}
.theme-topic-content-sky .theme-topic-content-card-row .theme-content-card {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(248,244,255,.9));
  box-shadow: 0 20px 52px rgba(7,16,39,.22);
}
@media (max-width: 980px) {
  .theme-topic-visual {
    justify-self: center;
  }
  .theme-topic-featured-art {
    width: min(100%, 360px);
    justify-self: center;
  }
  .theme-topic-motif-1 { left: -8px; top: 14px; }
  .theme-topic-motif-2 { right: -6px; top: 32%; }
  .theme-topic-motif-3 { left: 4%; bottom: -10px; }
  .theme-topic-motif-4 { right: 8%; bottom: -12px; }
}
@media (max-width: 700px) {
  .theme-topic-name-cta,
  .theme-story-hero .theme-name-cta {
    grid-template-columns: minmax(0,1fr);
    gap: 8px;
  }
  .theme-topic-name-cta input,
  .theme-topic-name-cta .theme-button,
  .theme-story-hero .theme-name-cta input,
  .theme-story-hero .theme-name-cta .theme-button {
    border-radius: 17px;
    border-right: 1px solid var(--theme-line);
    width: 100%;
  }
  .theme-topic-motifs {
    display: none;
  }
}

/* v1.0.17 corrective pass: robust topic hero/background + natural star overlays */
.theme-topic-hero.theme-night-hero {
  --theme-topic-seam: #1a2157;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 420px) !important;
  gap: clamp(22px, 4vw, 46px) !important;
  background:
    radial-gradient(circle at 18% 8%, rgba(114,113,202,.16), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(216,174,67,.09), transparent 22%),
    linear-gradient(180deg, #071027 0%, #10173d 56%, var(--theme-topic-seam) 100%) !important;
  box-shadow: none !important;
}
.theme-topic-name-cta input,
.theme-topic-name-cta .theme-button {
  min-height: 60px;
}
.theme-topic-hero .theme-night-hero-bg {
  display: block;
  inset: 0;
}
.theme-topic-hero .theme-night-distant-stars,
.theme-topic-hero .theme-night-foil-stars {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.theme-topic-hero .theme-topic-visual {
  width: min(100%, 420px);
}
.theme-topic-hero .theme-topic-featured-art {
  width: min(100%, 360px);
  margin-left: auto;
}
.theme-topic-content-sky {
  --theme-topic-seam: #1a2157;
  background: linear-gradient(180deg, #071027 0%, #0d1740 48%, #1a2157 100%) !important;
}
.theme-night-hero + .theme-topic-content-sky,
.theme-night-hero ~ .theme-topic-content-sky {
  background-color: transparent !important;
}
.theme-topic-content-sky::before {
  background:
    url('../images/placeholders/hero-distant-starfield.svg') center top / 126% auto no-repeat,
    url('../images/placeholders/foil-star-accent-sheet.svg') center top / 122% auto no-repeat !important;
  opacity: .82;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.98) 0%, rgba(0,0,0,.90) 52%, rgba(0,0,0,.76) 78%, rgba(0,0,0,.55) 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.98) 0%, rgba(0,0,0,.90) 52%, rgba(0,0,0,.76) 78%, rgba(0,0,0,.55) 100%);
}

/* v1.0.18 final corrective pass: edge-to-edge topic hero on shared sky */
.theme-topic-hero.theme-night-hero {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: clamp(38px, 6vw, 70px) max(clamp(18px, 4vw, 54px), calc((100vw - 1180px) / 2)) clamp(30px, 5vw, 56px) !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden;
}
.theme-topic-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 380px) !important;
  gap: clamp(22px, 4vw, 46px) !important;
  align-items: center;
}
.theme-topic-hero.theme-night-hero .theme-night-hero-bg {
  inset: 0 !important;
}
.theme-topic-hero.theme-night-hero .theme-night-distant-stars,
.theme-topic-hero.theme-night-hero .theme-night-foil-stars {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top;
}
.theme-topic-hero .theme-topic-visual {
  width: min(100%, 380px);
  justify-self: end;
}
.theme-topic-hero .theme-topic-featured-art {
  width: min(100%, 320px);
}
.theme-topic-content-sky > .theme-topic-hero-no-card,
.theme-topic-hero-no-card.theme-night-hero {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.theme-story-hero-no-card.theme-night-hero {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.theme-topic-hero-no-card > div:first-child {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
@media (max-width: 700px) {
  .theme-story-hero.theme-night-hero {
    width: 100% !important;
    border-radius: 0 !important;
    padding: 30px 18px 28px !important;
  }
  .theme-topic-hero.theme-night-hero {
    width: 100% !important;
    border-radius: 0 !important;
    padding: 30px 18px 28px !important;
  }
  .theme-topic-hero {
    grid-template-columns: 1fr !important;
  }
  .theme-topic-hero .theme-topic-visual {
    width: min(100%, 300px);
    justify-self: center;
  }
}

/* v1.0.20 unify topic/story heroes with homepage hero system */
.theme-topic-hero.theme-night-hero,
.theme-story-hero.theme-night-hero {
  width: 100% !important;
  max-width: none !important;
  min-height: auto;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: clamp(26px, 4.8vw, 58px) max(clamp(16px, 4vw, 54px), calc((100vw - 1240px) / 2)) clamp(18px, 3vw, 34px) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(114,113,202,.24), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(216,174,67,.10), transparent 20%),
    linear-gradient(180deg, #071027 0%, #0d1740 48%, #121e54 100%) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.07), 0 30px 60px rgba(7,16,39,.12) !important;
  overflow: hidden;
  position: relative;
}
.theme-topic-hero,
.theme-story-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px) !important;
  gap: clamp(16px, 2.4vw, 30px) !important;
  align-items: center;
}
.theme-topic-hero.theme-night-hero .theme-night-hero-bg,
.theme-story-hero.theme-night-hero .theme-night-hero-bg {
  z-index: 0 !important;
  opacity: .52 !important;
  mix-blend-mode: normal !important;
}
.theme-topic-hero.theme-night-hero .theme-night-distant-stars,
.theme-story-hero.theme-night-hero .theme-night-distant-stars {
  opacity: .32 !important;
}
.theme-topic-hero.theme-night-hero .theme-night-foil-stars,
.theme-story-hero.theme-night-hero .theme-night-foil-stars {
  opacity: .46 !important;
}
.theme-topic-hero.theme-night-hero > *:not(.theme-night-hero-bg),
.theme-story-hero.theme-night-hero > *:not(.theme-night-hero-bg) {
  position: relative;
  z-index: 4 !important;
}
.theme-topic-hero .theme-eyebrow,
.theme-story-hero .theme-eyebrow {
  color: #f7d56e !important;
}
.theme-topic-hero h1,
.theme-story-hero h1 {
  width: 100%;
  max-width: 860px;
  margin: 0;
  color: #f5f8ff !important;
  font-size: clamp(34px, 5.2vw, 64px) !important;
  line-height: .98;
  letter-spacing: -.052em;
}
.theme-topic-hero .theme-lead,
.theme-story-hero .theme-lead {
  width: 100%;
  max-width: 860px;
  color: rgba(245,248,255,.9) !important;
  font-size: clamp(14px, 1.65vw, 20px);
  line-height: 1.38;
}
.theme-topic-hero p:not(.theme-eyebrow):not(.theme-lead),
.theme-story-hero p:not(.theme-eyebrow):not(.theme-lead) {
  color: rgba(245,248,255,.9) !important;
}
.theme-topic-hero .theme-topic-name-cta,
.theme-story-hero .theme-name-cta {
  width: min(100%, 440px);
  max-width: 440px;
  margin-top: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0;
}
.theme-topic-hero .theme-topic-name-cta input,
.theme-story-hero .theme-name-cta input {
  min-height: 56px;
  padding: 16px 18px;
  font-size: 17px;
  border: 1px solid rgba(24,35,106,.16);
  border-right: 0;
  border-radius: 16px 0 0 16px;
  background: rgba(255,255,255,.98);
  color: #25314f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.theme-topic-hero .theme-topic-name-cta input:focus,
.theme-story-hero .theme-name-cta input:focus {
  border-color: rgba(120,167,125,.68);
  box-shadow: 0 0 0 4px rgba(120,167,125,.13);
}
.theme-topic-hero .theme-topic-name-cta .theme-button-primary,
.theme-story-hero .theme-name-cta .theme-button-primary {
  min-height: 56px;
  min-width: 136px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 0 16px 16px 0;
  background: linear-gradient(135deg, #18236a, #263177 70%, #314080) !important;
  color: #fff;
  box-shadow: 0 14px 30px rgba(24,35,106,.21);
}
.theme-topic-hero .theme-topic-name-cta .theme-button-primary:hover,
.theme-story-hero .theme-name-cta .theme-button-primary:hover {
  box-shadow: 0 18px 38px rgba(24,35,106,.25);
}
.theme-topic-hero .theme-topic-visual,
.theme-story-hero .theme-story-visual {
  width: min(100%, 320px) !important;
  max-width: 320px;
  justify-self: center !important;
}
.theme-topic-hero .theme-topic-featured-art {
  width: min(100%, 280px) !important;
  margin: 0 auto;
}
.theme-story-hero .theme-book-card {
  width: min(100%, 280px);
  border-radius: 24px;
  padding: 10px;
}
.theme-story-hero .theme-book-card img {
  border-radius: 14px;
}
.theme-story-hero .theme-book-caption {
  left: 14px;
  right: 14px;
  bottom: 14px;
}
.theme-story-proof-chips {
  margin: 16px 0 0;
}
.theme-topic-hero .theme-night-shooting-star,
.theme-story-hero .theme-night-shooting-star {
  display: block !important;
  width: 140px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,244,196,.9), rgba(216,174,67,.18), rgba(255,255,255,0));
  opacity: 0;
  filter: blur(.2px) drop-shadow(0 0 8px rgba(216,174,67,.2));
  animation: themeShootingGlow 12s ease-in-out infinite !important;
}
.theme-topic-hero .theme-night-shooting-star-a,
.theme-story-hero .theme-night-shooting-star-a { top: 18%; left: -12%; animation-delay: 2.6s; }
.theme-topic-hero .theme-night-shooting-star-b,
.theme-story-hero .theme-night-shooting-star-b { top: 28%; left: 58%; width: 110px; animation-delay: 8.8s; animation-duration: 15s; }
@media (max-width: 980px) {
  .theme-topic-hero,
  .theme-story-hero {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 700px) {
  .theme-topic-hero.theme-night-hero,
  .theme-story-hero.theme-night-hero {
    padding: 22px 14px 18px !important;
  }
  .theme-topic-hero h1,
  .theme-story-hero h1 {
    font-size: clamp(28px, 8vw, 38px) !important;
  }
  .theme-topic-hero .theme-lead,
  .theme-story-hero .theme-lead {
    font-size: 12.8px;
  }
  .theme-topic-hero .theme-topic-name-cta,
  .theme-story-hero .theme-name-cta {
    width: min(100%, 440px);
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .theme-topic-hero .theme-topic-name-cta input,
  .theme-topic-hero .theme-topic-name-cta .theme-button-primary,
  .theme-story-hero .theme-name-cta input,
  .theme-story-hero .theme-name-cta .theme-button-primary {
    min-height: 52px;
    border-radius: 16px;
    border-right: 1px solid rgba(24,35,106,.16);
    width: 100%;
  }
  .theme-topic-hero .theme-topic-name-cta .theme-button-primary,
  .theme-story-hero .theme-name-cta .theme-button-primary {
    min-width: 118px;
    padding: 0 12px;
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .theme-topic-hero .theme-night-shooting-star,
  .theme-story-hero .theme-night-shooting-star {
    animation: none !important;
    display: none !important;
  }
}

/* v1.0.21 final unification: shared sky shell + card polish */
.theme-night-content-sky {
  position: relative;
  margin-top: 0;
  padding: 0 0 clamp(34px, 5vw, 76px);
  background:
    radial-gradient(circle at 50% 0%, rgba(114,113,202,.24), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(216,174,67,.10), transparent 20%),
    linear-gradient(180deg, #071027 0%, #0d1740 48%, #3f347d 78%, #f4a486 94%, #fffaf3 100%);
  overflow: hidden;
}
.theme-night-content-sky::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    url('../images/placeholders/hero-distant-starfield.svg') center top / 126% auto no-repeat,
    url('../images/placeholders/foil-star-accent-sheet.svg') center top / 122% auto no-repeat;
  opacity: .52;
  mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,.98) 56%, rgba(0,0,0,.78) 76%, rgba(0,0,0,.42) 92%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,.98) 56%, rgba(0,0,0,.78) 76%, rgba(0,0,0,.42) 92%, rgba(0,0,0,0) 100%);
}
.theme-night-content-sky > * {
  position: relative;
  z-index: 2;
}
.theme-night-content-sky .theme-night-hero {
  background: transparent !important;
  box-shadow: none !important;
}
.theme-night-content-sky .theme-topic-hero,
.theme-night-content-sky .theme-story-hero {
  width: min(1180px, calc(100% - 36px)) !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: clamp(26px, 4.8vw, 50px) clamp(18px, 4vw, 40px) clamp(18px, 3vw, 30px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  grid-template-columns: unset !important;
  gap: 0 !important;
}
.theme-night-content-sky .theme-topic-hero .theme-eyebrow,
.theme-night-content-sky .theme-story-hero .theme-eyebrow {
  font-size: 14px;
  letter-spacing: .14em;
}
.theme-night-content-sky .theme-topic-hero .theme-topic-featured-art {
  width: min(100%, 220px) !important;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(7,16,39,.24);
}
.theme-night-content-sky .theme-story-hero .theme-book-card {
  width: min(100%, 220px);
  border-radius: 18px;
  padding: 8px;
  transform: none;
  box-shadow: 0 14px 30px rgba(7,16,39,.24);
}
.theme-night-content-sky .theme-story-hero .theme-book-card img {
  border-radius: 12px;
}
.theme-night-content-sky .theme-story-hero .theme-book-caption {
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 10px;
}
.theme-night-content-sky .theme-topic-motifs {
  display: none;
}
.theme-night-content-sky .theme-content-card,
.theme-night-content-sky .theme-portal-panel,
.theme-night-content-sky .theme-quote-panel,
.theme-night-content-sky .theme-list-card,
.theme-night-content-sky .theme-term-card,
.theme-night-content-sky .theme-story-card,
.theme-night-content-sky .theme-narrow-card {
  border: 1px solid rgba(255,255,255,.22) !important;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(248,244,255,.9)) !important;
  box-shadow: 0 20px 52px rgba(7,16,39,.22) !important;
}
.theme-night-content-sky .theme-story-details,
.theme-night-content-sky .theme-story-long,
.theme-night-content-sky .theme-story-final,
.theme-night-content-sky .theme-tax-grid-section,
.theme-night-content-sky .theme-portal-panel,
.theme-night-content-sky .theme-quote-panel {
  margin-top: clamp(24px, 4vw, 40px);
}
@media (max-width: 700px) {
  .theme-night-content-sky .theme-topic-hero,
  .theme-night-content-sky .theme-story-hero {
    width: min(100% - 28px, 1180px) !important;
    padding: 22px 16px 18px !important;
  }
}

/* v1.0.23 topic/story hero: single-column stack; split title; image+proof row only at wide breakpoints */
.theme-night-content-sky .theme-topic-hero.theme-night-hero,
.theme-night-content-sky .theme-story-hero.theme-night-hero {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: unset !important;
}
.theme-night-content-sky .theme-hero-inner-centered {
  width: min(100%, 860px);
  margin: 0 auto;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: clamp(10px, 1.8vw, 18px);
}
.theme-night-content-sky .theme-hero-inner-centered > .theme-eyebrow {
  justify-self: center;
  font-size: 13px;
  letter-spacing: .14em;
}
.theme-night-content-sky .theme-topic-hero h1.theme-hero-title-split,
.theme-night-content-sky .theme-story-hero h1.theme-hero-title-split {
  font-size: unset !important;
  line-height: 1.12;
  letter-spacing: normal;
}
.theme-night-content-sky .theme-hero-inner-centered .theme-hero-title-split {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 0.55vw, 10px);
  margin: 0;
  width: 100%;
  max-width: 860px;
  font-weight: inherit;
  text-wrap: balance;
}
.theme-night-content-sky .theme-hero-title-line {
  display: block;
  width: 100%;
}
.theme-night-content-sky .theme-hero-title-line-1 {
  font-size: clamp(22px, 3.2vw, 36px);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: rgba(245, 248, 255, .92);
  line-height: 1.18;
}
.theme-night-content-sky .theme-hero-title-line-2 {
  font-size: clamp(34px, 5.2vw, 64px);
  font-weight: 800;
  letter-spacing: -0.052em;
  line-height: 1.05;
  color: #f5f8ff;
}
.theme-night-content-sky .theme-hero-inner-centered > .theme-hero-visual-band {
  justify-self: stretch;
  width: 100%;
}
.theme-night-content-sky .theme-hero-subhead-match-home {
  width: 100%;
  max-width: 860px;
  margin: 0;
  color: rgba(245,248,255,.9);
  font-size: clamp(14px, 1.65vw, 20px);
  line-height: 1.38;
  text-align: center;
  font-weight: 570;
}
.theme-night-content-sky .theme-hero-subhead-match-home .ftc-subhead-line {
  display: block;
}
.theme-night-content-sky .theme-hero-subhead-match-home a {
  color: #f7d56e;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.theme-night-content-sky .theme-hero-subhead-match-home a:hover {
  border-bottom-color: currentColor;
}
.theme-night-content-sky .theme-hero-inner-centered .ftc-hero-form {
  width: min(100%, 440px);
  justify-self: center;
}
.theme-night-content-sky .theme-hero-inner-centered .ftc-hero-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}
.theme-night-content-sky .theme-hero-inner-centered .ftc-hero-form input {
  min-height: 56px;
  font-size: 17px;
  padding: 16px 18px;
  border-radius: 16px 0 0 16px;
  border: 1px solid rgba(24,35,106,.16);
  border-right: 0;
  width: 100%;
  box-sizing: border-box;
}
.theme-night-content-sky .theme-hero-inner-centered .ftc-hero-go {
  min-height: 56px;
  width: auto;
  min-width: 136px;
  padding: 0 18px;
  border-radius: 0 16px 16px 0;
  font-size: 15px;
  font-weight: 900;
  gap: 8px;
}
.theme-night-content-sky .theme-hero-inner-centered .ftc-hero-go span {
  display: inline-block;
}
.theme-night-content-sky .theme-hero-fine-print {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 860px;
  margin-top: clamp(12px, 2.2vw, 20px);
}
.theme-night-content-sky .theme-hero-fine-print .ftc-hero-scroll-link {
  margin-top: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.theme-night-content-sky .theme-hero-fine-print .ftc-hero-scroll-link:hover {
  color: #f7d56e;
  border-bottom-color: currentColor;
}
.theme-night-content-sky .theme-hero-example-link {
  display: inline-block;
  margin-top: 0;
  font-size: 12px;
  font-weight: 650;
  color: rgba(255, 255, 255, .62);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.theme-night-content-sky .theme-hero-example-link:hover {
  color: #f7d56e;
  border-bottom-color: currentColor;
}
.theme-night-content-sky .theme-hero-visual-band {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(18px, 3vw, 32px);
  width: min(100%, 1060px);
  margin: clamp(14px, 2.5vw, 24px) auto 0;
  padding: 0 clamp(8px, 2vw, 16px);
  box-sizing: border-box;
}
.theme-night-content-sky .theme-hero-visual-band .theme-topic-visual,
.theme-night-content-sky .theme-hero-visual-band .theme-story-visual {
  flex: 0 0 auto;
  width: min(100%, 220px) !important;
  max-width: 220px !important;
  margin: 0 !important;
  justify-self: auto !important;
}
.theme-night-content-sky .theme-hero-visual-band .theme-topic-featured-art {
  width: 100% !important;
  max-width: 220px;
  aspect-ratio: 1.05;
  margin: 0 auto;
  background-size: cover;
}
.theme-night-content-sky .theme-hero-visual-band .theme-book-card {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
}
.theme-night-content-sky .theme-hero-proof-aside {
  flex: 1 1 auto;
  width: 100%;
  max-width: min(100%, 400px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  text-align: left;
}
@media (min-width: 900px) {
  .theme-night-content-sky .theme-hero-visual-band {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    gap: clamp(22px, 3.5vw, 48px);
  }
  .theme-night-content-sky .theme-hero-visual-band .theme-topic-visual,
  .theme-night-content-sky .theme-hero-visual-band .theme-story-visual {
    flex: 0 0 auto;
  }
  .theme-night-content-sky .theme-hero-proof-aside {
    flex: 1 1 260px;
    max-width: min(100%, 420px);
    margin: 0;
    align-self: stretch;
  }
}
.theme-night-content-sky .theme-hero-proof-aside span {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
}
.theme-night-content-sky .theme-hero-proof-aside strong {
  color: #fff1a8;
}
@media (max-width: 700px) {
  .theme-night-content-sky .theme-hero-inner-centered .ftc-hero-form-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .theme-night-content-sky .theme-hero-inner-centered .ftc-hero-form input {
    border-radius: 16px;
    border-right: 1px solid rgba(24,35,106,.16);
  }
  .theme-night-content-sky .theme-hero-inner-centered .ftc-hero-go {
    width: 100%;
    min-width: 0;
    border-radius: 16px;
    min-height: 52px;
    font-size: 13px;
  }
  .theme-night-content-sky .theme-hero-proof-aside {
    margin: 0 auto;
    max-width: 100%;
    text-align: center;
  }
  .theme-night-content-sky .theme-hero-proof-aside span {
    text-align: left;
  }
}

/* v1.0.25 Parchment body below hero sky band; neutralize legacy topic “second night” layer */
.ftc-parchment-page {
  position: relative;
  width: 100%;
  padding: clamp(28px, 4vw, 56px) 0 clamp(44px, 6vw, 96px);
  background:
    radial-gradient(circle at 10% 0%, rgba(201, 189, 242, .12), transparent 30%),
    radial-gradient(circle at 92% 6%, rgba(245, 200, 76, .08), transparent 26%),
    linear-gradient(180deg, var(--theme-cream) 0%, var(--theme-paper) 45%, #f4f8ee 100%);
  box-sizing: border-box;
}
.ftc-parchment-page .theme-topic-content-sky,
.ftc-parchment-page .theme-story-content-sky {
  position: relative;
  margin: 0;
  padding: 0;
  background: none !important;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 4vw, 44px);
  max-width: 100%;
}
.ftc-parchment-page .theme-topic-content-sky::before {
  display: none !important;
  content: none !important;
}
.ftc-parchment-page .theme-topic-content-sky > *,
.ftc-parchment-page .theme-story-content-sky > * {
  margin-top: 0 !important;
  flex-shrink: 0;
  min-width: 0;
}
.ftc-parchment-page .theme-container.theme-story-details,
.ftc-parchment-page .theme-container.theme-story-long,
.ftc-parchment-page .theme-container.theme-portal-panel,
.ftc-parchment-page .theme-container.theme-tax-grid-section,
.ftc-parchment-page .theme-container.theme-quote-panel,
.ftc-parchment-page .theme-container.theme-story-final {
  margin-top: 0 !important;
}
.ftc-parchment-page .theme-story-details,
.ftc-parchment-page .theme-story-long {
  gap: clamp(20px, 3vw, 28px);
  align-items: stretch;
}
.ftc-parchment-page .theme-story-details > *,
.ftc-parchment-page .theme-story-long > * {
  min-width: 0;
}
.ftc-parchment-page .theme-portal-options {
  gap: clamp(16px, 2.5vw, 22px);
  margin-top: clamp(18px, 2.5vw, 26px);
}
.ftc-parchment-page .theme-story-steps {
  gap: clamp(14px, 2.2vw, 20px);
  margin-top: clamp(18px, 2.5vw, 26px);
}
.ftc-parchment-page .theme-narrow-grid {
  gap: clamp(16px, 2.2vw, 22px);
  margin-top: clamp(16px, 2.2vw, 24px);
}
.ftc-hero-sky-band .ftc-site-shell.ftc-home.ftc-page-landing {
  position: relative;
  z-index: 1;
}
.ftc-hero-sky-band .ftc-home.ftc-page-landing .ftc-hero-subhead-full {
  text-align: center;
  text-wrap: balance;
  max-width: min(100%, 38rem);
  margin-left: auto;
  margin-right: auto;
}
.ftc-hero-sky-band .ftc-home.ftc-page-landing .ftc-subhead-line {
  white-space: normal;
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  hyphens: auto;
}
.ftc-hero-sky-band .ftc-home.ftc-page-landing .ftc-hero-copy {
  width: min(100%, 560px);
  max-width: min(100% - 32px, 580px);
}
.ftc-hero-sky-band .ftc-home.ftc-page-landing .ftc-hero-form-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.ftc-hero-sky-band .ftc-home.ftc-page-landing .ftc-hero-form-row input {
  min-width: 0;
}
.ftc-hero-sky-band .ftc-hero-landing-topic-img {
  display: block;
  width: min(100%, 240px);
  height: auto;
  aspect-ratio: 1.05;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(3, 8, 31, .4);
  margin: 0 auto;
}
@media (min-width: 900px) {
  .ftc-hero-sky-band .ftc-hero-landing-topic-img {
    margin: 0;
  }
}
