/* Beyond the Red Flags: Interactive Field Guide 1.0. Colors from the book cover. */
:root {
  --black: #000; --ink: #0d0d0d; --panel: #141414; --line: #2a2a2a;
  --gold: #f2b705; --gold-soft: rgba(242,183,5,.14); --red: #c8102e; --white: #fff; --dim: #b8b8b8; --muted: #8a8a8a;
  --font: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px; --gutter: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--black); color: var(--white); font-family: var(--font); }
body { font-size: 17px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
a { color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }
.reader blockquote p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: rgba(0,0,0,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.mark { display: flex; flex-direction: column; text-decoration: none; color: var(--white); line-height: 1; }
.mark b { font-weight: 900; font-size: 20px; letter-spacing: .02em; }
.mark span { margin-top: 3px; align-self: flex-start; background: var(--red); color: var(--white); font-weight: 800; font-size: 10px; letter-spacing: .28em; padding: 2px 5px 2px 6px; }
.top nav { display: flex; align-items: center; gap: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 15px var(--font); border-radius: 999px; padding: 11px 20px; border: 2px solid var(--gold); background: var(--gold); color: var(--black); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--gold); }
.btn.small { padding: 7px 14px; font-size: 14px; }
.link { background: none; border: none; color: var(--dim); font: 600 14px var(--font); padding: 8px 10px; cursor: pointer; text-decoration: none; border-radius: 8px; }
.link:hover { color: var(--white); background: var(--panel); }

/* Landing */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 56px; align-items: center; }
.cover { border-radius: 6px; box-shadow: 0 24px 60px rgba(242,183,5,.12), 0 0 0 1px var(--line); }
.kicker { color: var(--gold); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 12px; }
h1 { font-weight: 900; font-size: clamp(34px, 5vw, 56px); line-height: 1.05; margin: 0 0 18px; letter-spacing: -.01em; }
.lede { font-size: 19px; color: var(--dim); margin: 0 0 28px; max-width: 34em; }
.lede em { color: var(--white); font-style: italic; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.note { font-size: 13px; color: var(--muted); margin-top: 14px; }

.coming { border-top: 1px solid var(--line); padding: 56px 0; }
.coming .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 48px; align-items: start; }
h2 { font-weight: 800; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; margin: 0 0 14px; }
.points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.points li { display: flex; gap: 14px; align-items: flex-start; color: var(--dim); }
.points li b { color: var(--white); }
.star { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 15px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.card h3 { margin: 0 0 6px; font-size: 21px; }
.card p { margin: 0 0 18px; color: var(--dim); font-size: 15px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--dim); margin: 0 0 6px; }
input[type=text], input[type=email], input[type=search] { width: 100%; font: 16px var(--font); color: var(--white); background: var(--black); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; outline: none; margin-bottom: 14px; }
input:focus { border-color: var(--gold); }
.card .btn { width: 100%; }
.fine { font-size: 12px; color: var(--muted); margin-top: 12px; }
.ok { color: var(--gold); font-weight: 700; }
.err { color: #ff8a8a; }

.help { border-top: 1px solid var(--line); padding: 40px 0; color: var(--dim); font-size: 15px; }
.help h2 { font-size: 22px; color: var(--white); }
.help table { border-collapse: collapse; width: 100%; max-width: 760px; }
.help td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.help td:first-child { color: var(--white); }
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.72); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal.open { display: flex; }
.modal .card { width: 100%; max-width: 420px; position: relative; }
.modal .x { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; }
#gsi { min-height: 44px; display: flex; justify-content: flex-start; max-width: 280px; margin: 6px 0 4px 1.5px; } /* 1.2.2 D1: left; the 1.5px matches the visible pill edge to the L of the Log in heading (measured at 320, 360, 412) */

@media (max-width: 820px) {
  .hero { padding: 32px 0 24px; }
  .hero .wrap, .coming .wrap { grid-template-columns: 1fr; gap: 28px; }
  .cover { max-width: 260px; margin: 0 auto; }
  .hero-text { text-align: left; }
}
@media (max-width: 420px) {
  .mark b { font-size: 17px; }
  .btn { padding: 10px 16px; }
}

/* Reader */
.reader { max-width: 760px; margin: 0 auto; padding: 28px var(--gutter) 80px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--dim); text-decoration: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); background: var(--gold-soft); border-radius: 999px; padding: 4px 10px; text-decoration: none; }
.reader h1 { font-size: clamp(30px, 5vw, 44px); margin: 10px 0 18px; }
.reader h2 { font-size: 24px; margin: 34px 0 10px; }
.reader h3 { font-size: 19px; margin: 26px 0 8px; }
.reader h4 { font-size: 16px; margin: 22px 0 6px; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; }
.reader blockquote { margin: 18px 0; padding: 12px 16px; border-left: 3px solid var(--gold); background: var(--panel); border-radius: 0 10px 10px 0; color: var(--dim); }
.reader table { border-collapse: collapse; width: 100%; font-size: 15px; }
.reader th, .reader td { border-bottom: 1px solid var(--line); padding: 8px 8px 8px 0; text-align: left; vertical-align: top; }
.reader strong { color: var(--white); }
.reader p, .reader li { color: #e9e9e9; }
.doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 18px 0 30px; }
.door { display: block; text-decoration: none; color: var(--white); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.door:hover { border-color: var(--gold); }
.door small { display: block; color: var(--gold); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.door b { display: block; font-size: 17px; line-height: 1.25; }
.door span { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
.more { margin-top: 44px; border-top: 1px solid var(--line); padding-top: 20px; }
.more h3 { margin: 0 0 12px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.more .doors { margin: 0 0 16px; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.pn a { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--white); font-weight: 600; font-size: 15px; }
.pn a small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.pn a.next { text-align: right; }
.pn a:hover { border-color: var(--gold); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { text-decoration: none; color: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.tag:hover { border-color: var(--gold); color: var(--gold); }
.az { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 20px; }
.az a { text-decoration: none; color: var(--gold); border: 1px solid var(--line); border-radius: 8px; min-width: 34px; text-align: center; padding: 4px 6px; font-weight: 700; }
.termlist { list-style: none; padding: 0; margin: 0; columns: 2 260px; }
.termlist li { break-inside: avoid; margin: 0 0 6px; }
.termlist a { color: var(--white); text-decoration: none; }
.termlist a:hover { color: var(--gold); }
.search-results a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--white); }
.search-results small { color: var(--muted); }
.loading { color: var(--muted); padding: 60px 0; text-align: center; }

/* 1.0.1 (Nov 4): no bleed on phones. The book's top bar wraps instead of pushing the page wider. */
.reader, .reader * { overflow-wrap: anywhere; }
.reader table { display: block; overflow-x: auto; }
.reader img, .reader iframe { max-width: 100%; }
@media (max-width: 620px) {
  .top .wrap { height: auto; min-height: 56px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; row-gap: 4px; }
  .top nav { flex-wrap: wrap; gap: 0; margin-left: -8px; }
  .top nav .link { padding: 6px 8px; font-size: 13px; }
}
@media (max-width: 400px) {
  .top .wrap { justify-content: flex-start; }
  .top nav { width: 100%; justify-content: space-between; margin-left: -8px; margin-right: -8px; width: calc(100% + 16px); }
}

/* 1.1 preview (Nov 4): icons, shield, star patterns, Back / Sparkle's pick bar, phone-first sizes */
.trail { position: sticky; top: 64px; z-index: 15; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px var(--gutter); background: rgba(0,0,0,.94); border-bottom: 1px solid var(--line); max-width: 760px; margin: 0 auto; }
.tb { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; color: var(--white); min-height: 48px; }
.tb small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.tb.next small { color: var(--gold); }
.tb span { display: block; font-size: 14px; font-weight: 700; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tb.next { text-align: right; border-color: rgba(242,183,5,.5); }
.cicon { width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%; }
.cicon.big { width: 88px; height: 88px; }
.door.withicon { display: flex; gap: 14px; align-items: center; }
.door.read { border-color: rgba(27,111,204,.7); }
.chead { display: flex; gap: 16px; align-items: center; margin: 6px 0 14px; }
.chead h1 { margin: 6px 0 0; }
.chead .fine { margin: 4px 0 0; }
.pattern { width: 100%; max-width: 420px; height: auto; display: block; margin: 4px 0 8px; }
.pattern a { cursor: pointer; }
.where { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 0 0 22px; }
.where small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.where span { display: block; font-size: 14px; color: var(--dim); }
.mini .shield { width: 120px; height: 120px; display: block; }
.shield .seg path { transition: opacity .15s; }
.shield .seg:hover path { opacity: .8; }
.shieldcard { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; text-decoration: none; color: var(--white); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 0 0 22px; }
.shieldcard .shield { width: 120px; height: 120px; }
.shieldcard b { display: block; font-size: 20px; }
.shieldcard span { display: block; color: var(--gold); font-weight: 700; }
.shieldcard small { display: block; color: var(--dim); font-size: 14px; }
.bigshield .shield { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto 18px; }
.legend { display: grid; gap: 10px; margin: 0 0 10px; }
.legend div { display: grid; grid-template-columns: 22px auto; column-gap: 10px; align-items: start; }
.legend i { width: 22px; height: 22px; border-radius: 6px; grid-row: span 2; margin-top: 2px; }
.legend b { font-size: 16px; }
.legend span { color: var(--dim); font-size: 14px; }
.az a.on { background: var(--gold); color: #000; }
@media (max-width: 620px) {
  body { font-size: 18px; }
  .reader { padding-top: 16px; }
  .reader h1 { font-size: 32px; }
  .reader h2 { font-size: 24px; }
  .door b { font-size: 18px; }
  .door small, .chip { font-size: 13px; }
  .door span { font-size: 15px; }
  .crumbs { font-size: 14px; }
  .tag { font-size: 16px; padding: 8px 14px; }
  .pn a { font-size: 16px; }
  .trail { top: 0; position: sticky; }
  .top { position: static; }
  .termlist { columns: 1; }
  .termlist li { margin: 0 0 10px; font-size: 18px; }
  .az a { min-width: 40px; padding: 8px 6px; }
}
@media (max-width: 460px) { .top nav .link { padding: 6px 6px; font-size: 13px; } .top nav { gap: 0; } }
/* Step 1: the Knowledge Flame hold */
.flame { display: flex; gap: 16px; align-items: center; margin: 32px 0 8px; padding: 16px; border: 1px solid rgba(242,183,5,.45); border-radius: 18px; background: #0f0d08; }
.flamebtn { flex-shrink: 0; width: 104px; height: 104px; border-radius: 50%; border: none; background: none; padding: 0; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.flamebtn svg { width: 100%; height: 100%; display: block; }
.flamebtn:disabled { cursor: default; }
.flametext b { display: block; font-size: 20px; }
.flametext span { display: block; color: var(--dim); font-size: 16px; }
.flame.locked { border-color: #F2B705; }
.flame.burst .flamebtn { animation: burst .6s ease-out; }
@keyframes burst { 0% { transform: scale(1); } 40% { transform: scale(1.15); } 100% { transform: scale(1); } }
/* Step 2: the armor */
.armor { display: block; }
.armor .piece path { transition: fill .4s; }
.shieldcard .pair { display: flex; align-items: center; gap: 4px; }
.shieldcard .pair .armor { width: 70px; height: 92px; }
.shieldcard { grid-template-columns: 196px 1fr; }
.bigarmor .armor { width: 100%; max-width: 300px; height: auto; margin: 0 auto 16px; }
.armorlist { display: grid; gap: 8px; margin: 0 0 22px; }
.armorlist a { display: grid; grid-template-columns: 22px auto; column-gap: 12px; align-items: center; text-decoration: none; color: var(--white); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.armorlist i { width: 22px; height: 22px; border-radius: 6px; grid-row: span 2; }
.armorlist b { font-size: 17px; }
.armorlist span { color: var(--dim); font-size: 14px; }
@media (max-width: 460px) { .shieldcard { grid-template-columns: 1fr; } .shieldcard .pair { justify-content: center; } .shieldcard .pair .shield { width: 140px; height: 140px; } .shieldcard .pair .armor { width: 100px; height: 132px; } }
/* Step 3: the Set moment */
.setmoment { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.82); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .3s; }
.setmoment.on { opacity: 1; }
.smcard { width: 100%; max-width: 420px; max-height: 92vh; overflow-y: auto; background: var(--panel); border: 2px solid var(--tc); border-radius: 20px; padding: 20px; text-align: center; box-shadow: 0 0 40px color-mix(in srgb, var(--tc) 45%, transparent); transform: scale(.92); transition: transform .4s; }
.setmoment.on .smcard { transform: scale(1); }
.smcard .cicon.big { margin: 0 auto 6px; display: block; }
.smkicker { color: var(--tc); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; margin: 0; }
.smcard h2 { margin: 2px 0 6px; }
.smline .pattern { margin: 0 auto; }
.pattern.drawn polyline { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.4s .3s ease-out forwards; stroke: var(--tc); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.smarmor .armor { width: 120px; height: 158px; margin: 4px auto; }
.armor .piece.glow path { animation: snap 1.2s .9s ease-out both; }
@keyframes snap { 0% { transform: scale(1.6); opacity: 0; transform-box: fill-box; transform-origin: center; } 60% { opacity: 1; } 100% { transform: scale(1); opacity: 1; transform-box: fill-box; transform-origin: center; } }
.smpiece { font-size: 17px; margin: 6px 0; }
.smnext { color: var(--gold); font-weight: 700; font-size: 16px; margin: 6px 0 14px; }
.smcard .ctas { justify-content: center; }
/* Step 4: the sky */
.skywrap { margin: 0 -8px 26px; border-radius: 22px; overflow: hidden; background: radial-gradient(circle at 50% 50%, #0b1020 0%, #000 72%); border: 1px solid var(--line); }
.sky { display: block; width: 100%; height: auto; }
.sky .skystar.lit polygon { filter: drop-shadow(0 0 6px currentColor); }
.sky .dust circle { animation: twinkle 4s ease-in-out infinite alternate; }
.sky .dust circle:nth-child(3n) { animation-delay: 1.3s; } .sky .dust circle:nth-child(3n+1) { animation-delay: 2.6s; }
@keyframes twinkle { from { opacity: .1; } to { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .sky .dust circle, .pattern.drawn polyline, .armor .piece.glow path, .flame.burst .flamebtn { animation: none !important; } .pattern.drawn polyline { stroke-dashoffset: 0; } }
.shield .core { transition: r 1.6s ease-in-out; }
/* step 6: the loot gate */
.gate { margin: 16px 0 8px; padding: 16px; border: 1px solid rgba(204,27,74,.5); border-radius: 18px; background: #120709; }
.gate > b { display: block; font-size: 20px; margin-bottom: 4px; }
.gate > span { display: block; margin-bottom: 12px; }
.gate.waiting { opacity: .7; border-style: dashed; }
.gate.done { border-color: #CC1B4A; background: #1d0a10; }
.gate.done > b { color: #ff6b8e; }
.gq-k { margin: 0; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: #ff6b8e; }
.gq { margin: 6px 0 12px; }
.gopts { display: grid; gap: 10px; }
.gopt { text-align: left; font: inherit; color: inherit; padding: 14px 16px; min-height: 52px; border-radius: 14px; border: 1px solid #444; background: #1a1a1a; cursor: pointer; }
.gopt.idk { border-style: dashed; color: #bbb; }
.gopt:disabled { cursor: default; opacity: .6; }
.gopt.right { opacity: 1; border-color: #1BCC7A; background: #0b2418; }
.gopt.wrong { opacity: 1; border-color: #CC1B4A; background: #2a0b14; }
.gopt.chose { opacity: 1; border-color: #aaa; }
.gfb { margin-top: 12px; }
.gfb blockquote { margin: 8px 0 12px; padding: 10px 14px; border-left: 4px solid #F2C94C; background: #15130c; border-radius: 6px; }
/* step 7: response scale on Lexicon entries */
.rscale { margin: 16px 0 8px; padding: 16px; border: 1px solid #444; border-radius: 18px; background: #111; }
.rscale > b { display: block; font-size: 20px; margin-bottom: 4px; }
.rscale > span { display: block; margin-bottom: 12px; }
.rscale.waiting { opacity: .7; border-style: dashed; }
.gopt.picked { border-color: #F2C94C; background: #221c08; }
.rscale textarea { width: 100%; box-sizing: border-box; margin: 8px 0; font: inherit; color: inherit; background: #1a1a1a; border: 1px solid #555; border-radius: 12px; padding: 12px; }
/* blessing fixes, Nov 4 */
.gopt.idk { border-style: solid; color: inherit; }
svg.shield circle.core { transition: r 3.5s ease-in-out; }
svg.shield a.seg.pulse path { animation: segpulse 1.4s ease-in-out 1; }
@keyframes segpulse { 0%,100% { filter: none; } 45% { filter: brightness(1.9) drop-shadow(0 0 18px #fff); } }
.flame.locked #flameshape { transform-origin: 60px 96px; animation: flicker 2.6s ease-in-out infinite; }
@keyframes flicker { 0%,100% { transform: scale(1,1); opacity: 1; } 30% { transform: scale(.97,1.04); opacity: .93; } 60% { transform: scale(1.02,.98); opacity: 1; } 80% { transform: scale(.99,1.02); opacity: .96; } }
@media (prefers-reduced-motion: reduce) { .flame.locked #flameshape, svg.shield a.seg.pulse path { animation: none !important; } svg.shield circle.core { transition: none !important; } }
/* locks (Billy, Nov 4) */
.door.locked { opacity: .6; border-style: dashed; }
.door.locked b { color: #9a9a9a; }
.lockcard { text-align: center; padding: 24px 16px; border: 1px dashed #555; border-radius: 18px; margin: 16px 0; }
.lockcard svg { width: 120px; height: 120px; display: block; margin: 0 auto 8px; }
.sky a.skystar.locked polygon { opacity: .45; }
/* no bleeds: long button labels wrap instead of pushing the page wider (Billy's phone, Nov 4) */
#view .btn, .setmoment .btn, .gate .btn, .rscale .btn { white-space: normal; max-width: 100%; text-align: center; box-sizing: border-box; }
/* hold every line (Billy, Nov 4): a small flame in the right margin; text reads around it */
.lessonbody .holdline { position: relative; padding-right: 46px; }
.lessonbody li.holdline { padding-right: 46px; }
.lf { position: absolute; right: 0; top: 0; width: 38px; height: 38px; padding: 0; border: none; background: none; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.lf svg { width: 100%; height: 100%; display: block; }
.lf.got { cursor: default; }
.holdline.nudge { outline: 2px solid #F2C94C; outline-offset: 4px; border-radius: 6px; }
.flame.notyet { opacity: .75; border-style: dashed; }
/* TRAPPED expansion */
.trapx { margin: 12px 0 20px; border: 1px solid #3a3a3a; border-radius: 16px; background: #0d0d0d; }
.trapx summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; }
.trapx summary::-webkit-details-marker { display: none; }
.trapx summary small { display: block; font-weight: 400; color: #aaa; margin-top: 2px; }
.trapx[open] summary { border-bottom: 1px solid #2a2a2a; }
.trapx > p, .trapx .moment { margin: 12px 16px; }
.trapx .tw { color: #ffb3c4; }
.moment { border-top: 1px solid #222; padding-top: 12px; }
.mplace { margin: 0 0 6px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: #F2C94C; }
.msetup small { color: #999; }
.mline { margin: 8px 0; padding: 10px 14px; border-left: 4px solid #333; background: #141414; border-radius: 6px; color: #bbb; }
.mline.on { border-left-color: #CC1B4A; color: #fff; background: #1d0a10; }
.mline small { display: block; color: #ff6b8e; font-weight: 700; letter-spacing: .06em; }
.vid { margin: 10px 0; }
.vid iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; display: block; }
.trlinks a { color: #F2C94C; }
/* the lit flame takes its star's tier color (Billy, Nov 4: "Blue flame blue star?") */
.flame.locked { border-color: var(--fc, #F2B705); box-shadow: 0 0 24px color-mix(in srgb, var(--fc, #F2B705) 35%, transparent); }
/* icon cards */
button.ico { font: inherit; background: none; border: none; padding: 0 2px; margin: 0; cursor: pointer; border-radius: 6px; line-height: inherit; }
button.ico:focus-visible, button.ico:hover { background: #2a2a2a; }
.icbig { font-size: 56px; margin: 0; line-height: 1.1; }
.srcs a, .lessonbody a[target=_blank] { overflow-wrap: anywhere; }
/* star reward */
.starcard .bigstar { width: 120px; height: 120px; display: block; margin: 0 auto 6px; filter: drop-shadow(0 0 18px var(--tc)); animation: starpop .9s ease-out 1; }
@keyframes starpop { 0% { transform: scale(.3) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.12) rotate(4deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
.smline1 { font-size: 20px; font-weight: 700; margin: 4px 0 8px; }
.mini2 svg.shield { width: 150px; height: 150px; display: block; margin: 8px auto; }
@media (prefers-reduced-motion: reduce) { .starcard .bigstar { animation: none; } }
/* level up */
.levelup { margin: 14px 0; padding: 12px 16px; border-radius: 14px; background: #0b1a2c; border: 1px solid #1B6FCC; text-align: left; }
.levelup small { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #7fb3ff; }
.levelup b { display: block; font-size: 18px; margin-top: 2px; }
.startover { margin: 28px 0 8px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tester { margin: 20px 0; padding: 14px 16px; border: 1px dashed #F2C94C; border-radius: 14px; }
.tester b { display: block; }
.tester .tags { margin-top: 10px; }
.tester button.tag { font: inherit; cursor: pointer; }
/* save your progress card */
#savef { text-align: left; margin: 10px 0; }
#savef label { display: block; font-size: 15px; margin: 10px 0 4px; }
#savef input { width: 100%; box-sizing: border-box; font: inherit; padding: 12px; border-radius: 12px; border: 1px solid #555; background: #1a1a1a; color: inherit; }
#savef .btn { margin-top: 12px; width: 100%; }
.alias { text-align: left; margin: 8px 0; }
.alias summary { cursor: pointer; color: #F2C94C; }
.alias a { color: #F2C94C; }

/* 1.1.1 (Billy, Nov 5): pop-ups scroll as one piece; top edge scrolls away, bottom edge shows only at the end */
.setmoment { align-items: flex-start; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.setmoment:not(.on) { pointer-events: none; }
.smcard { max-height: none; overflow: visible; margin: auto 0; flex-shrink: 0; }
.modal { align-items: flex-start; overflow-y: auto; overscroll-behavior: contain; }
.modal .card { margin: auto 0; flex-shrink: 0; }
/* 1.1.1 (Billy, Nov 5): solid sticky bars so text never shows through */
.trail { background: var(--black); backdrop-filter: none; }

/* 1.1.2 (Nov 5, 2026): punch list items 13, 14, 15, 19 to 22, and Quick exit (Compliance F6) */
html { scroll-padding-top: 104px; }
.btn { min-height: 48px; }
.btn.small { min-height: 44px; }
.note { font-size: 14px; }
.kicker2 { margin-top: 26px; }
.nw { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 400px) { .tb span { -webkit-line-clamp: 3; } }
@keyframes burst2 { 0%, 50%, 100% { transform: scale(1); } 25%, 75% { transform: scale(1.18); } }
.flame.burst .flamebtn, .lf.got svg { animation: burst2 .6s ease-out; }
.lf.got.pre svg { animation: none; }
@media (prefers-reduced-motion: reduce) { .flame.burst .flamebtn, .lf.got svg { animation: none !important; } }
.gopt.right::before { content: "\2713  Right answer: "; color: #1BCC7A; font-weight: 700; }
.gopt.wrong::before { content: "\2717  Your answer: "; color: #ff6b8e; font-weight: 700; }
.smcard svg a { pointer-events: none; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tester button.tag { color: #000; }
.legend i.hollow, .armorlist i.hollow { background: none !important; border: 1px solid #8A8A8A; }
.armorlist b small { font-weight: 400; color: var(--dim); font-size: 14px; }
.armorlist a.here { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.consent, #savef .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 600; color: var(--white); margin: 0 0 14px; cursor: pointer; line-height: 1.4; }
.consent input[type=checkbox], #savef .consent input[type=checkbox] { width: 22px; height: 22px; min-width: 22px; margin: 0; padding: 0; accent-color: var(--gold); }
.consentline { margin: 0 0 12px; }
#savef .consentline { margin: 12px 0 10px; }
.tip { font-size: 15px; color: var(--dim); border-left: 3px solid var(--line); padding-left: 12px; }
.privacy h2 { font-size: 22px; margin: 30px 0 8px; }
.qexit { position: fixed; top: 0; right: 0; z-index: 100; min-height: 36px; padding: 0 12px; border: none; border-radius: 0 0 0 12px; background: var(--red); color: #fff; font: 700 13px var(--font); cursor: pointer; }
.qexit:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
@media (max-width: 1320px) { .top .wrap { padding-right: calc(var(--gutter) + 100px); } }
@media (max-width: 620px) {
  .top .wrap { padding-right: var(--gutter); position: relative; }
  .top .mark { min-height: 38px; justify-content: center; }
  .book .top nav { margin-left: -6px; flex-basis: 100%; }
  .book #authbtn { position: absolute; top: 9px; right: 100px; min-height: 38px; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; }
  .landing .top nav { position: absolute; top: 6px; right: 100px; }
  .book .top { position: relative; z-index: 20; } /* the header paints over the trail shadow */
  .book .trail { padding-top: 8px; top: 36px; box-shadow: 0 -36px 0 #000; }
}
@media (max-width: 400px) { .book .top nav { margin-left: -6px; } }

/* 1.1.3: THE DOORWAY (item 24). z 99 sits under Quick exit (z 100). */
html.dw-lock, html.dw-lock body { overflow: hidden; }
.doorway { position: fixed; inset: 0; z-index: 99; background: #000; color: #F0EFE8; overflow: hidden; padding-top: env(safe-area-inset-top, 0px); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.doorway > * { position: absolute; margin: 0; }
.doorway:not(.ready) > * { visibility: hidden; }
.dw-q { left: 16px; right: 16px; text-align: center; font: 800 var(--dw-q, 28px)/1.15 Poppins, "Work Sans", sans-serif; letter-spacing: -0.01em; color: #F0EFE8; max-width: 960px; margin: 0 auto; text-wrap: balance; will-change: transform, opacity; }
.dw-q span { display: inline-block; white-space: nowrap; }
.dw-q.two span { display: block; width: max-content; margin: 0 auto; }
.dw-stage { pointer-events: none; }
.dw-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dw-svg * { pointer-events: none; }
.dw-sp { position: absolute; left: 0; top: 0; will-change: transform, opacity; }
.dw-sp .sparkle-svg { display: block; }
.dw-tag { left: 16px; right: 16px; text-align: center; font: 600 var(--dw-t, 20px)/1.2 Poppins, "Work Sans", sans-serif; color: #F2B705; white-space: nowrap; }
.dw-chev { width: 48px; height: 48px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; pointer-events: none; border-radius: 8px; }
.dw-chev.on { pointer-events: auto; }
.dw-chev svg { display: block; overflow: visible; }
.dw-chev:focus { outline: none; }
.dw-chev:focus-visible { outline: 2px solid #F2B705; outline-offset: 2px; }
.doorway.out { transition: opacity 400ms cubic-bezier(0.33, 1, 0.68, 1); opacity: 0; pointer-events: none; }
/* 1.1.3: Sparkle the character (item 25). Her layer sits under the sticky bars (z 15, 20) and Quick exit. */
.sp-home { position: absolute; left: 0; top: 0; width: 44.8px; height: 49px; display: block; pointer-events: none; transform-origin: 50% 50%; }
.sp-home .sparkle-svg { display: block; position: absolute; left: 0; top: 0; }
.sp-home > span { position: absolute; inset: 0; }
.sparkle-svg { overflow: visible; }
.sparkle-svg .sp-eye { transform-box: fill-box; transform-origin: center; transition: transform 60ms linear; }
.sparkle-svg.blink .sp-eye { transform: scaleY(0.1); }
.sp-layer { position: fixed; inset: 0; z-index: 14; pointer-events: none; overflow: hidden; }
.sp-actor { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform, opacity; }
.sp-actor.sp-behind { z-index: 0; }
.sp-actor .sparkle-svg { display: block; }
@media (prefers-reduced-motion: reduce) { .sparkle-svg * { animation: none !important; } }
/* 1.1.3 Creative Director (c): nav ends 20 px from the right edge at 400 px and under */
@media (max-width: 400px) { .top nav { margin-left: -6px; margin-right: -6px; width: calc(100% + 12px); } .book .top nav { flex-basis: calc(100% + 12px); } }

/* 1.1.3 Education Master gate fixes (Nov 5): I don't know is never red and never wrong; screen-reader text on options */
.ifg-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.gfb .gidk { margin: 0 0 6px; color: #BDBDBD; }
.gfb .gans { margin: 0 0 8px; font-weight: 700; }
.gfb .gck { color: #1BCC7A; font-weight: 800; }

/* ---- 1.2.1 (Nov 11, 2026): version tag, account dialogs ---- */
.ifg-verbar{background:#000;color:#F2B705;font:600 11px/16px Poppins,system-ui,sans-serif;letter-spacing:.04em;padding:2px 0}
.ifg12-dlg{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(0,0,0,.72)}
.ifg12-card{max-width:440px;width:100%;background:#000;color:#fff;border:1px solid #F2B705;border-radius:12px;padding:20px}
.ifg12-card h3{margin:0 0 10px;font-size:20px}
.ifg12-card p{margin:0 0 12px;line-height:1.5}
.ifg12-card a{color:#F2B705}
.ifg12-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.ifg12-btns .btn{min-height:44px}
#ifg12-del,#ifg12-fb{margin-left:8px;min-height:44px}

/* 1.2.1 (Nov 11, 2026): front page on phones. The Log in button was pushed off the left edge (the button row was pinned 100px from the right but kept its full width). It now gets its own row under the header, right edge on the page margin. */
@media (max-width: 620px) {
  .landing .top .wrap { flex-wrap: wrap; }
  .landing .top nav { position: static; flex-basis: 100%; width: auto; margin: 8px 0 0 0; justify-content: flex-end; flex-wrap: nowrap; }
}


/* ---- 1.2.2 (Nov 11, 2026): Creative Director D2, Compliance P3 ---- */
.ifg12-btns .btn.danger{background:transparent;color:#fff;border:2px solid #E5484D}
.ifg12-btns .btn.danger:hover{background:rgba(229,72,77,.14);filter:none}
.ifg12-btns .btn:focus-visible{outline:3px solid #fff;outline-offset:2px}
#ifg12-911{margin:10px 0 0}
footer a{white-space:nowrap} /* 1.2.2 Creative Director re-review: footer links never break across lines */

/* ---- 1.3.0 (Nov 11, 2026): item 38, Become a beta tester, Beta tester or Advisor, the one Privacy setting ---- */
.ifg13-beta{margin:14px 0 0}
.ifg13-beta .btn{min-height:44px;max-width:100%;white-space:normal;text-align:center}
.ifg13-beta .fine{margin:8px 0 0}
#ifg13-beta-sh{margin-left:8px;min-height:44px}
.ifg13-priv{margin:20px 0 8px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--panel);max-width:640px}
.ifg13-badge{display:inline-block;margin:0 0 12px;padding:4px 12px;border:1px solid var(--gold);border-radius:999px;color:var(--gold);font-weight:700;font-size:14px;line-height:20px}
.ifg13-priv fieldset{border:0;margin:0;padding:0;min-width:0}
.ifg13-priv legend{padding:0;margin:0 0 6px;font-weight:700;font-size:16px;line-height:1.4}
.ifg13-priv label{display:flex;align-items:center;gap:12px;min-height:44px;padding:6px 0;cursor:pointer;line-height:1.4}
.ifg13-priv input[type=radio]{width:20px;height:20px;margin:0;flex:0 0 20px;accent-color:var(--gold)}
.ifg13-priv .fine{margin:8px 0 0}
#ifg13-priv-msg:empty{display:none}

/* 1.3.0b item 42: Shield star tips (Creative Director spec, Blessings Log row 865) */
/* 1.3.0e (Blessings Log row 867): tip dot colors as named tokens; grey = Blind Spot */
:root{--ifg-dot-grey:#8A8A8A;--tier1:#1B6FCC;--tier2:#CC1B4A;--tier3:#1BCC7A;--tier4:#F2B705}
.ifg-shtip{position:fixed;z-index:9999;left:16px;top:16px;width:max-content;max-width:min(280px,calc(100% - 32px));box-sizing:border-box;padding:10px 12px;background:#141414;color:#fff;border:1px solid #3A3A3A;border-radius:8px;font-size:14px;line-height:1.35;text-align:left;box-shadow:0 4px 18px rgba(0,0,0,.45);opacity:0;pointer-events:none;transition:opacity 150ms ease}
.ifg-shtip.on{opacity:1}
.ifg-shtip .h{color:#DDD;margin-bottom:6px}
.ifg-shtip .t b{color:#FFF;font-weight:600}
.ifg-shtip .d{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px;vertical-align:middle;position:relative;top:-1px}
.ifg-shtip .n{margin-top:6px;font-weight:400;color:#FFF}
@media (prefers-reduced-motion:reduce){.ifg-shtip{transition:none}}
/* 1.3.0g (Billy, Nov 12): armor list on phones: the name, the 'takes' line and the stars line all sit in the text column (the third line was falling into the 22 px icon column). */
.armorlist a { grid-template-columns: 22px minmax(0, 1fr); }
.armorlist b, .armorlist span { grid-column: 2; min-width: 0; }
.armorlist i { grid-row: 1 / span 2; }
/* 1.3.0g: movie clip under the film paragraph (Creative Director: note, button, fine line; 44 px button; 14 px text; left edge with the paragraph) */
.clipx { margin: 4px 0 20px; }
.clipx .cnote { color: var(--dim); font-size: 14px; margin: 6px 0 0; }
.clipx .vid { margin: 6px 0 0; }
.clipx .vplay { min-height: 44px; margin-left: 0; }
.clipx .fine { font-size: 14px; margin-top: 6px; }
