/* =====================================================================
   Learnly – fagenes egne miljøer (fagside). Lag 3 oven på styles.css + nordlys.css.
   Hvert fag får sin scene (art.js), sit motiv, sine tegn og sin komposition (subject-themes.js).
   ===================================================================== */

/* ---------- topscenen ---------- */
.world-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 38px; min-height: 460px; padding: clamp(28px, 4vw, 56px); color: #d6def5;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); grid-template-areas: "copy art" "dock art"; gap: 26px 32px; align-items: center;
  background: radial-gradient(70% 90% at 86% 14%, color-mix(in srgb, var(--s) 60%, transparent), transparent 65%), radial-gradient(60% 80% at 0% 100%, rgb(143 123 255 / .35), transparent 60%), radial-gradient(40% 50% at 40% 0%, rgb(79 140 255 / .25), transparent 70%), linear-gradient(155deg, color-mix(in srgb, var(--s) 38%, #0e1a45), #060c22 85%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), var(--lift-3); }
.world-hero[data-layout="split"] { grid-template-columns: minmax(300px, .95fr) minmax(0, 1.05fr); grid-template-areas: "art copy" "art dock"; }
.world-hero[data-layout="stage"] { grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); grid-template-areas: "copy dock" "art art"; align-items: end; }
.wd-copy { grid-area: copy; position: relative; z-index: 2; }
.wd-art { grid-area: art; position: relative; z-index: 1; display: grid; place-items: center; perspective: 900px; }
.wd-dock { grid-area: dock; position: relative; z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: stretch; }
.world-hero .eyebrow { color: color-mix(in srgb, var(--s) 35%, #c9d6ff); letter-spacing: .14em; }
.world-hero h1 { color: #fff; font-size: clamp(3rem, 7vw, 5.8rem); line-height: .95; letter-spacing: -.055em; margin: 14px 0 16px; hyphens: auto; -webkit-hyphens: auto;
  text-shadow: 0 1px 0 color-mix(in srgb, var(--s) 30%, #fff), 0 2px 0 color-mix(in srgb, var(--s) 70%, #fff), 0 3px 0 color-mix(in srgb, var(--s) 85%, #000), 0 4px 0 color-mix(in srgb, var(--s) 70%, #000), 0 5px 0 color-mix(in srgb, var(--s) 60%, #000), 0 18px 30px rgb(0 0 0 / .5); }
.world-hero[data-layout="stage"] h1 { font-size: clamp(3.2rem, 8vw, 6.6rem); }
.world-hero h1.long { font-size: clamp(2.4rem, 4.8vw, 4.3rem) !important; }
.world-hero h1.xlong { font-size: clamp(2rem, 3.6vw, 3.3rem) !important; }
.world-hero .wd-copy p { font-size: 1.1rem; max-width: 48ch; margin: 0 0 22px; color: #c9d4f2; }
.subj-scene { width: min(100%, 470px); height: auto; overflow: visible; filter: drop-shadow(0 40px 50px rgb(0 0 0 / .55)); animation: sceneIn .9s var(--spring) both; }
@keyframes sceneIn { from { opacity: 0; transform: translateY(30px) scale(.92) rotateX(10deg); } }
.world-hero[data-layout="stage"] .subj-scene { width: min(100%, 440px); margin: -40px 0 -56px; }
.subj-scene .steam { animation: steam 3s ease-in-out infinite; } .subj-scene .steam.s1 { animation-delay: -1s; } .subj-scene .steam.s2 { animation-delay: -2s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(8px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.subj-scene .hand { animation: tick 6s steps(12) infinite; }
@keyframes tick { to { transform: rotate(360deg); } }
.wd-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.wd-stats div { padding: 11px 16px; border-radius: 16px; background: rgb(255 255 255 / .09); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), inset 0 0 0 1px rgb(255 255 255 / .1); min-width: 92px; }
.wd-stats b { display: block; color: #fff; font-family: var(--display); font-size: 1.35rem; letter-spacing: -.03em; line-height: 1.15; }
.wd-stats span { font-size: .76rem; color: #aebbe0; font-weight: 600; }
.wd-ring { display: grid; justify-items: center; align-content: center; gap: 6px; padding: 16px; border-radius: 24px; background: rgb(255 255 255 / .08); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), inset 0 0 0 1px rgb(255 255 255 / .1); }
.wd-ring .ring-label strong { color: #fff; font-size: 1.55rem; }
.wd-ring .ring-label small { color: #aebbe0; }
.wd-ring > small { font-size: .74rem; color: #aebbe0; font-weight: 600; }
.wd-next { display: grid; gap: 4px; align-content: center; justify-items: start; padding: 18px 20px; border-radius: 24px; background: rgb(255 255 255 / .94); color: var(--ink); box-shadow: inset 0 1px 0 #fff, 0 24px 40px -20px rgb(0 0 0 / .7); transition: transform .35s var(--ease), box-shadow .35s; }
a.wd-next:hover { color: var(--ink); transform: translateY(-3px); box-shadow: inset 0 1px 0 #fff, 0 30px 50px -20px rgb(0 0 0 / .8), 0 0 0 3px color-mix(in srgb, var(--s) 35%, transparent); }
.wd-next h3 { margin: 2px 0 0; font-family: var(--display); font-size: 1.15rem; line-height: 1.25; }
.wd-next small { color: var(--ink-2); margin-bottom: 8px; }
.wd-next .eyebrow { color: var(--s-ink); }

/* motiver i baggrunden */
.wd-motif { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .9; -webkit-mask-image: radial-gradient(ellipse 90% 90% at 60% 40%, #000 30%, transparent 85%); mask-image: radial-gradient(ellipse 90% 90% at 60% 40%, #000 30%, transparent 85%); }
[data-motif="grid"] .wd-motif { background-image: linear-gradient(rgb(255 255 255 / .07) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .07) 1px, transparent 1px), linear-gradient(rgb(255 255 255 / .035) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .035) 1px, transparent 1px); background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px; }
[data-motif="lines"] .wd-motif { background-image: linear-gradient(90deg, transparent 8%, rgb(255 140 150 / .28) 8%, rgb(255 140 150 / .28) calc(8% + 2px), transparent calc(8% + 2px)), repeating-linear-gradient(transparent 0 37px, rgb(255 255 255 / .08) 37px 38px); }
[data-motif="dots"] .wd-motif { background-image: radial-gradient(rgb(255 255 255 / .16) 1.4px, transparent 2px); background-size: 24px 24px; }
[data-motif="contour"] .wd-motif { background-image: repeating-radial-gradient(ellipse at 78% 30%, transparent 0 26px, rgb(255 255 255 / .08) 26px 27.5px), repeating-radial-gradient(ellipse at 10% 110%, transparent 0 30px, rgb(255 255 255 / .06) 30px 31.5px); }
[data-motif="hex"] .wd-motif { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0 32V66' fill='none' stroke='white' stroke-opacity='.09' stroke-width='1.5'/%3E%3C/svg%3E"); background-size: 56px 98px; }
[data-motif="timeline"] .wd-motif { -webkit-mask-image: none; mask-image: none; background: linear-gradient(rgb(255 255 255 / .22), rgb(255 255 255 / .22)) left 0 bottom 92px / 100% 2px no-repeat, repeating-linear-gradient(90deg, rgb(255 255 255 / .3) 0 2px, transparent 2px 96px) left 0 bottom 86px / 100% 14px no-repeat, repeating-linear-gradient(90deg, rgb(255 255 255 / .12) 0 1px, transparent 1px 24px) left 0 bottom 89px / 100% 8px no-repeat; }
.wd-glyphs { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.wd-glyphs span { position: absolute; left: var(--x); top: var(--y); font-family: var(--display); font-weight: 800; font-size: var(--fs); color: rgb(255 255 255 / .09); letter-spacing: -.03em; animation: floaty var(--dur) ease-in-out infinite var(--del); white-space: nowrap; }
.wd-glyphs span:nth-child(3n) { color: color-mix(in srgb, var(--s) 55%, #fff); opacity: .22; text-shadow: 0 0 24px var(--s); }
.wd-glyphs span:nth-child(4n+1) { filter: blur(1.5px); }

/* ---------- ruten gennem faget ---------- */
.route { margin-top: 26px; padding: 24px 28px 18px; border-radius: 30px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); box-shadow: var(--glass-edge), var(--lift-2); }
.route-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.route-head h2 { margin: 2px 0 0; }
.route-head .eyebrow { color: var(--s-ink); }
.route-track { isolation: isolate; display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding: 22px 4px 10px; scrollbar-width: thin; }
.rstop { flex: 1 0 150px; max-width: 220px; scroll-snap-align: start; display: grid; justify-items: center; align-content: start; gap: 8px; text-align: center; position: relative; color: var(--ink); padding: 0 8px; }
.rstop:hover { color: var(--ink); }
.rstop::before { content: ''; position: absolute; top: 30px; right: 50%; width: 100%; height: 4px; z-index: -1; background: repeating-linear-gradient(90deg, rgb(11 20 51 / .16) 0 8px, transparent 8px 14px); border-radius: 2px; }
.rstop:first-child::before { display: none; }
.rstop.done::before, .rstop.current::before { background: linear-gradient(90deg, color-mix(in srgb, var(--s) 60%, #fff), var(--s)); box-shadow: 0 0 10px color-mix(in srgb, var(--s) 60%, transparent); }
.rs-tile { width: 64px; height: 64px; border-radius: 21px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--ink-3);
  background: linear-gradient(180deg, #fff, #eef3fc); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgb(11 20 51 / .06), 0 4px 0 #d3ddf0, 0 12px 22px -14px rgb(11 20 51 / .45); transition: transform .4s var(--spring); }
.rs-tile svg { width: 26px; height: 26px; stroke-width: 2.6; }
.rstop:hover .rs-tile { transform: translateY(-4px) rotate(-4deg); }
.rstop.started .rs-tile { color: var(--s-ink); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 2px color-mix(in srgb, var(--s) 40%, transparent), 0 4px 0 #d3ddf0, 0 12px 22px -14px var(--s); }
.rstop.done .rs-tile { color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--s) 50%, #fff), var(--s) 55%, var(--s-ink)); box-shadow: inset 0 2px 0 rgb(255 255 255 / .4), 0 4px 0 color-mix(in srgb, var(--s) 55%, #000), 0 14px 24px -10px var(--s); }
.rstop.current .rs-tile { color: #fff; transform: scale(1.12); background: linear-gradient(145deg, #c5b8ff, #8f7bff 55%, #5a44c9); box-shadow: inset 0 2px 0 rgb(255 255 255 / .4), 0 4px 0 #4733b0, 0 0 0 7px rgb(143 123 255 / .16), 0 16px 28px -10px rgb(143 123 255 / .9); animation: nowPulse 2.6s ease-in-out infinite; }
.rstop b { font-size: .86rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rstop small { font-size: .74rem; color: var(--ink-3); font-weight: 650; }
.rstop.current small { color: #5a44c9; }
.rstop.done small { color: var(--s-ink); }

/* ---------- forløbene som illustrerede paneler ---------- */
.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.cpanel { display: grid; grid-template-rows: auto 1fr; border-radius: 30px; overflow: hidden; color: var(--ink); background: var(--glass-strong); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); box-shadow: var(--glass-edge), var(--lift-2); animation: rise .6s var(--ease) backwards; }
.cpanel:nth-child(2) { animation-delay: .06s; } .cpanel:nth-child(3) { animation-delay: .12s; } .cpanel:nth-child(4) { animation-delay: .18s; } .cpanel:nth-child(n+5) { animation-delay: .24s; }
.cpanel:hover { color: var(--ink); box-shadow: var(--glass-edge), var(--lift-3), 0 0 0 2px color-mix(in srgb, var(--s) 30%, transparent), 0 30px 60px -30px var(--s); }
.cpanel.prog { grid-column: 1 / -1; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr); grid-template-rows: auto; }
.cp-thumb { position: relative; height: 178px; overflow: hidden; isolation: isolate;
  background: radial-gradient(90% 120% at 90% 0%, color-mix(in srgb, var(--s) 45%, #fff), transparent 60%), radial-gradient(70% 90% at 0% 100%, color-mix(in srgb, var(--p, #8f7bff) 65%, transparent), transparent 62%), linear-gradient(var(--a, 135deg), color-mix(in srgb, var(--s) 75%, #0e1a45), var(--s-ink) 55%, #0b1433); }
.cpanel.prog .cp-thumb { height: auto; min-height: 240px; }
.cp-thumb::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgb(255 255 255 / .18) 1.2px, transparent 1.8px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(120deg, transparent 20%, #000 80%); mask-image: linear-gradient(120deg, transparent 20%, #000 80%); }
.cp-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / .18) 50%, transparent 65%); transform: translateX(-100%); transition: transform .9s var(--ease); }
.cpanel:hover .cp-thumb::after { transform: translateX(100%); }
.cp-num { position: absolute; left: 22px; bottom: -22px; font-family: var(--display); font-weight: 800; font-size: 7.4rem; line-height: 1; letter-spacing: -.07em; color: #fff; transition: transform .6s var(--spring);
  text-shadow: 0 1px 0 color-mix(in srgb, var(--s) 30%, #fff), 0 3px 0 color-mix(in srgb, var(--s) 75%, #000), 0 5px 0 color-mix(in srgb, var(--s) 65%, #000), 0 7px 0 color-mix(in srgb, var(--s) 55%, #000), 0 22px 30px rgb(0 0 0 / .45); }
.cpanel:hover .cp-num { transform: translateY(-8px); }
.cp-art { position: absolute; right: 6%; top: calc(50% - 75px); width: 150px; height: 150px; overflow: visible; filter: drop-shadow(0 22px 22px rgb(0 0 0 / .45)); transition: transform .6s var(--spring); }
.cpanel:hover .cp-art { transform: translateY(-8px) scale(1.08) rotate(-4deg); }
.cpanel.prog .cp-art { width: 190px; height: 190px; right: 8%; top: calc(50% - 95px); }
.cp-ic { position: absolute; left: 22px; top: 22px; width: 66px; height: 66px; border-radius: 21px; display: grid; place-items: center; color: #fff; transform: rotate(-8deg); transition: transform .5s var(--spring);
  background: linear-gradient(145deg, rgb(255 255 255 / .45), rgb(255 255 255 / .1)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), inset 0 0 0 1px rgb(255 255 255 / .3), 0 18px 30px -14px rgb(0 0 0 / .6); }
.cp-ic svg { width: 32px; height: 32px; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .3)); }
.cpanel:hover .cp-ic { transform: rotate(0) scale(1.08) translateY(-3px); }
.cp-glyph { position: absolute; font-family: var(--display); font-weight: 800; color: rgb(255 255 255 / .18); white-space: nowrap; pointer-events: none; }
.cp-glyph.g1 { top: 18px; left: 34%; font-size: 1.9rem; }
.cp-glyph.g2 { bottom: 26px; right: 26%; font-size: 1.4rem; color: rgb(255 255 255 / .26); }
.cp-glyph.g3 { top: 50%; right: 8%; font-size: 1.1rem; }
.cp-ribbon { position: absolute; left: 16px; top: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: .74rem; font-weight: 800; color: #5a3500; background: linear-gradient(180deg, #ffe9a8, #ffc246); box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), 0 8px 18px -8px rgb(242 155 29 / .9); }
.cpanel.prog .cp-ribbon { left: 84px; top: 30px; }
.cp-ribbon svg { width: 13px; height: 13px; stroke-width: 3; }
.cp-ribbon.next { color: #fff; background: linear-gradient(180deg, #c5b8ff, #8f7bff); box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 8px 18px -8px rgb(143 123 255 / .9); animation: nowPulse 2.6s ease-in-out infinite; }
.cpanel.done .cp-thumb { box-shadow: inset 0 -4px 0 #ffc246; }
.cp-body { padding: 20px 22px 18px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.cpanel.prog .cp-body { padding: 26px 28px; }
.cp-body .eyebrow { color: var(--s-ink); }
.cp-body h3 { font-family: var(--display); font-size: 1.28rem; letter-spacing: -.025em; margin: 0; line-height: 1.2; }
.cpanel.prog .cp-body h3 { font-size: 1.6rem; }
.cp-body p { margin: 0; color: var(--ink-2); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cpanel.prog .cp-body p { -webkit-line-clamp: 3; }
.cp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.cp-foot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.cp-foot .ring .ring-label strong { font-size: .92rem; letter-spacing: -.02em; }
.cp-foot .ring .ring-label small { font-size: .6rem; }
.cp-foot b { display: block; font-size: .9rem; }
.cp-foot small { display: block; color: var(--ink-2); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpanel:hover .go-round { transform: translateX(4px); }

/* ---------- mål og præstationer ---------- */
.wd-bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; margin-top: 30px; }
.ach-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ach { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: .74rem; font-weight: 700; color: var(--ink-3); }
.ach .medal { width: 56px; height: 56px; filter: grayscale(1) opacity(.35); transition: transform .4s var(--spring); }
.ach.on { color: var(--ink); }
.ach.on .medal { filter: drop-shadow(0 10px 12px rgb(217 122 6 / .35)); animation: floaty 6s ease-in-out infinite; }
.ach.on:hover .medal { transform: scale(1.12) rotate(-6deg); }

/* ---------- brudpunkter ---------- */
@media (max-width: 1280px) {
  .world-hero, .world-hero[data-layout="split"] { grid-template-columns: minmax(0, 1fr) minmax(240px, .8fr); grid-template-areas: "copy art" "dock dock"; }
  .world-hero[data-layout="stage"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "art" "dock"; }
  .wd-dock { grid-template-columns: auto minmax(0, 1fr); }
}
@media (max-width: 1099px) {
  .cpanel.prog { grid-template-columns: minmax(0, 1fr); }
  .cpanel.prog .cp-thumb { min-height: 190px; }
}
@media (max-width: 900px) {
  .cgrid { grid-template-columns: minmax(0, 1fr); }
  .ach-row { grid-template-columns: repeat(5, minmax(56px, 1fr)); overflow-x: auto; }
}
@media (max-width: 767px) {
  .world-hero, .world-hero[data-layout="split"], .world-hero[data-layout="stage"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "dock" "art"; border-radius: 28px; padding: 26px 20px 22px; min-height: 0; gap: 18px; }
  .world-hero h1, .world-hero[data-layout="stage"] h1 { font-size: clamp(2.6rem, 13vw, 3.6rem); }
  .world-hero h1.long { font-size: clamp(2.1rem, 10vw, 2.9rem) !important; }
  .world-hero h1.xlong { font-size: clamp(1.6rem, 7.4vw, 2.2rem) !important; }
  .world-hero .wd-copy p { font-size: 1rem; }
  .subj-scene, .world-hero[data-layout="stage"] .subj-scene { width: min(100%, 300px); margin: -4px 0 -24px; }
  .wd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .wd-stats div { padding: 8px 6px; text-align: center; } .wd-stats b { font-size: 1.05rem; } .wd-stats span { font-size: .64rem; }
  .wd-stats div { min-width: 0; flex: 1 0 40%; padding: 9px 12px; }
  .wd-dock { grid-template-columns: minmax(0, 1fr); }
  .wd-ring { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
  .wd-ring .ring { zoom: .75; }
  .wd-ring > small { font-size: .85rem; }
  .wd-next .btn { width: 100%; }
  .route { padding: 18px 16px 12px; border-radius: 24px; }
  .rstop { flex-basis: 118px; }
  .rs-tile { width: 54px; height: 54px; border-radius: 18px; }
  .rstop::before { top: 25px; }
  .cpanel { border-radius: 24px; }
  .cp-thumb { height: 150px; }
  .cp-num { font-size: 6rem; }
  .cp-ic { width: 48px; height: 48px; border-radius: 16px; }
  .cp-art, .cpanel.prog .cp-art { width: 118px; height: 118px; top: calc(50% - 59px); }
  .cp-body { padding: 16px 18px; }
  .cpanel.prog .cp-body { padding: 18px; }
  .wd-bottom { grid-template-columns: minmax(0, 1fr); }
  .ach .medal { width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .wd-glyphs span, .subj-scene, .subj-scene .steam, .subj-scene .hand, .ach.on .medal, .rstop.current .rs-tile, .cp-ribbon.next { animation: none !important; } }

/* ---------- Fag-oversigten: portaler ind til fagenes verdener ---------- */
.fag-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 38px; padding: clamp(28px, 4vw, 56px); min-height: 340px; color: #c9d4f2;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 24px; align-items: center; background: var(--aurora); box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), var(--lift-3); }
.fag-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgb(255 255 255 / .14) 1.2px, transparent 1.8px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(ellipse at 75% 50%, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse at 75% 50%, #000 20%, transparent 70%); }
.fag-hero .eyebrow { color: #9fb7ff; letter-spacing: .14em; }
.fag-hero h1 { color: #fff; font-size: clamp(2.8rem, 6vw, 5rem); line-height: .98; letter-spacing: -.05em; margin: 12px 0 14px; text-shadow: 0 1px 0 #c8d6ff, 0 2px 0 #9fb3f0, 0 3px 0 #7a90da, 0 4px 0 #5a71c2, 0 16px 28px rgb(0 0 0 / .45); }
.fag-hero h1 em { font-style: normal; background: linear-gradient(90deg, #9fe3ff, #c5b8ff, #ffb98a); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.fag-hero p { font-size: 1.08rem; max-width: 46ch; margin: 0 0 20px; }
.fh-orbit { position: relative; height: 280px; perspective: 900px; }
.fh-t { position: absolute; width: 74px; height: 74px; border-radius: 23px; animation: floaty 7s ease-in-out infinite; }
.fh-t svg { width: 36px; height: 36px; }
.fh-t.t0 { left: 38%; top: 34%; width: 112px; height: 112px; border-radius: 34px; z-index: 2; } .fh-t.t0 svg { width: 54px; height: 54px; }
.fh-t.t1 { left: 8%; top: 8%; animation-delay: -1s; } .fh-t.t2 { left: 72%; top: 4%; animation-delay: -2s; width: 64px; height: 64px; }
.fh-t.t3 { left: 78%; top: 56%; animation-delay: -3s; } .fh-t.t4 { left: 12%; top: 62%; animation-delay: -4s; width: 60px; height: 60px; }
.fh-t.t5 { left: 46%; top: 0; animation-delay: -5s; width: 52px; height: 52px; border-radius: 17px; } .fh-t.t6 { left: 50%; top: 80%; animation-delay: -2.5s; width: 56px; height: 56px; }
.fh-t.t7 { left: 0; top: 36%; animation-delay: -3.5s; width: 48px; height: 48px; border-radius: 15px; } .fh-t.t8 { left: 92%; top: 30%; animation-delay: -6s; width: 46px; height: 46px; border-radius: 14px; }
.fh-t:not(.t0) { filter: saturate(1.1); opacity: .92; }
.portals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 330px; grid-auto-flow: dense; gap: 22px; margin-top: 28px; }
.portal { position: relative; isolation: isolate; overflow: hidden; border-radius: 32px; color: #c9d4f2; display: grid; align-content: end; padding: 24px;
  background: radial-gradient(80% 70% at 85% 10%, color-mix(in srgb, var(--s) 60%, transparent), transparent 70%), radial-gradient(70% 70% at 0% 100%, rgb(143 123 255 / .32), transparent 65%), linear-gradient(160deg, color-mix(in srgb, var(--s) 40%, #0e1a45), #060c22 88%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), inset 0 0 0 1px rgb(255 255 255 / .06), var(--lift-2); animation: rise .6s var(--ease) backwards; transition: transform .5s var(--ease), box-shadow .35s; }
.portal:hover { color: #c9d4f2; box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), inset 0 0 0 2px color-mix(in srgb, var(--s) 55%, transparent), 0 30px 60px -24px color-mix(in srgb, var(--s) 80%, #000); }
.portal.wide { grid-column: span 2; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
.pt-motif { position: absolute; inset: 0; z-index: -1; pointer-events: none; -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 25%, transparent 75%); mask-image: radial-gradient(ellipse at 70% 30%, #000 25%, transparent 75%); }
.portal[data-motif="grid"] .pt-motif { background-image: linear-gradient(rgb(255 255 255 / .08) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .08) 1px, transparent 1px); background-size: 32px 32px; }
.portal[data-motif="lines"] .pt-motif { background-image: linear-gradient(90deg, transparent 10%, rgb(255 140 150 / .3) 10%, rgb(255 140 150 / .3) calc(10% + 2px), transparent calc(10% + 2px)), repeating-linear-gradient(transparent 0 29px, rgb(255 255 255 / .09) 29px 30px); }
.portal[data-motif="dots"] .pt-motif { background-image: radial-gradient(rgb(255 255 255 / .18) 1.3px, transparent 1.9px); background-size: 20px 20px; }
.portal[data-motif="contour"] .pt-motif { background-image: repeating-radial-gradient(ellipse at 75% 25%, transparent 0 20px, rgb(255 255 255 / .09) 20px 21.5px); }
.portal[data-motif="hex"] .pt-motif { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='77' viewBox='0 0 56 98'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0 32V66' fill='none' stroke='white' stroke-opacity='.1' stroke-width='1.5'/%3E%3C/svg%3E"); background-size: 44px 77px; }
.portal[data-motif="timeline"] .pt-motif { -webkit-mask-image: none; mask-image: none; background: linear-gradient(rgb(255 255 255 / .2), rgb(255 255 255 / .2)) left 0 top 46% / 100% 2px no-repeat, repeating-linear-gradient(90deg, rgb(255 255 255 / .28) 0 2px, transparent 2px 64px) left 0 top calc(46% - 6px) / 100% 14px no-repeat; }
.pt-glyph { position: absolute; left: 22px; top: 14px; z-index: -1; font-family: var(--display); font-weight: 800; font-size: 4.4rem; letter-spacing: -.04em; color: rgb(255 255 255 / .07); white-space: nowrap; }
.pt-art { position: absolute; right: -4%; top: -7%; width: 64%; z-index: 0; pointer-events: none; transition: transform .7s var(--spring); }
.pt-scene { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 26px 30px rgb(0 0 0 / .55)); }
.portal:hover .pt-art { transform: translateY(-10px) scale(1.05) rotate(-1.5deg); }
.portal.wide .pt-art { right: 0; top: 50%; width: 52%; transform: translateY(-50%); }
.portal.wide:hover .pt-art { transform: translateY(calc(-50% - 10px)) scale(1.05) rotate(-1.5deg); }
.pt-body { position: relative; z-index: 1; display: grid; gap: 6px; }
.portal .eyebrow { color: color-mix(in srgb, var(--s) 30%, #c9d6ff); letter-spacing: .12em; font-size: .68rem; }
.portal h2 { margin: 0; color: #fff; font-size: clamp(1.8rem, 2.6vw, 2.4rem); line-height: 1; letter-spacing: -.045em; text-shadow: 0 1px 0 color-mix(in srgb, var(--s) 35%, #fff), 0 2px 0 color-mix(in srgb, var(--s) 85%, #000), 0 3px 0 color-mix(in srgb, var(--s) 65%, #000), 0 12px 22px rgb(0 0 0 / .5); }
.portal.wide h2 { font-size: clamp(2.4rem, 3.6vw, 3.4rem); }
.portal h2.long { font-size: clamp(1.5rem, 2.1vw, 1.95rem); }
.portal h2.xlong { font-size: clamp(1.2rem, 1.6vw, 1.5rem); }
.pt-desc { font-size: .88rem; line-height: 1.45; color: #b9c6ea; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 40ch; }
.pt-foot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 10px; padding: 10px 10px 10px 12px; border-radius: 20px; background: rgb(255 255 255 / .08); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), inset 0 0 0 1px rgb(255 255 255 / .08); }
.pt-foot .ring .ring-label strong { color: #fff; font-size: .82rem; }
.pt-foot .ring .ring-label small { color: #aebbe0; font-size: .56rem; }
.pt-foot b { display: block; color: #fff; font-size: .9rem; }
.pt-foot small { display: block; color: #aebbe0; font-size: .76rem; }
.portal:hover .go-round { transform: translateX(4px); }
@media (max-width: 1280px) {
  .portals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal.wide { grid-column: span 2; }
}
@media (max-width: 900px) { .fag-hero { grid-template-columns: minmax(0, 1fr); } .fh-orbit { height: 200px; } }
@media (max-width: 767px) {
  .fag-hero { border-radius: 28px; padding: 26px 20px; min-height: 0; }
  .fag-hero h1 { font-size: clamp(2.4rem, 12vw, 3.2rem); }
  .fh-orbit { height: 150px; margin: -6px 0 -10px; }
  .fh-t { width: 52px; height: 52px; border-radius: 16px; } .fh-t svg { width: 26px; height: 26px; }
  .fh-t.t0 { width: 78px; height: 78px; border-radius: 24px; } .fh-t.t0 svg { width: 38px; height: 38px; }
  .portals { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 290px; gap: 14px; margin-top: 18px; }
  .portal, .portal.wide { grid-column: auto; grid-template-columns: minmax(0, 1fr); border-radius: 26px; padding: 18px; }
  .pt-art, .portal.wide .pt-art { right: -8%; top: -6%; width: 74%; transform: none; }
  .portal.wide:hover .pt-art { transform: none; }
  .portal.wide h2 { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) { .fh-t { animation: none; } }
/* Soft legibility scrim: covers the whole card (no hard edges) and sits under the art */
.portal::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; background: linear-gradient(180deg, transparent 30%, rgb(6 12 34 / .5) 62%, rgb(6 12 34 / .78)); }
.portal.wide::before { background: linear-gradient(90deg, rgb(6 12 34 / .55), rgb(6 12 34 / .2) 50%, transparent 75%), linear-gradient(180deg, transparent 45%, rgb(6 12 34 / .45)); }
@media (max-width: 767px) {
  .portals { grid-auto-rows: 318px; }
  .pt-art, .portal.wide .pt-art { width: 60%; top: -9%; right: -6%; }
  .portal.wide::before { background: linear-gradient(180deg, transparent 30%, rgb(6 12 34 / .5) 62%, rgb(6 12 34 / .78)); }
}
