/* SHETA's room on shatation.com. The page wears the game's own world (its
   near-black, the rounded titles, the sealed code slabs, Exact green and
   Near amber); SHATATION stays in the frame: the monogram at the top and
   the signature at the end, whose point takes SHETA's amber, as on the
   home page. Titles are in Nunito, the rounded face of SHETA's logo files
   (SIL Open Font License), at the one weight they use; the app's SF Pro
   Rounded is licensed for Apple apps only. */
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-800-latin.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Mona Sans";
  src: url("fonts/mona-sans-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
/* the real italic (github/mona-sans 2.027, from the brand folder), light only: the words beside the drawn name */
@font-face {
  font-family: "Mona Sans";
  src: url("fonts/mona-sans-italic-300-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 300;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  --night: #090B11;
  --panel: #13161F;
  --raised: #1B1F29;
  --chalk: #FFFFFF;
  --chalk-2: rgba(255, 255, 255, .7);
  --chalk-3: rgba(255, 255, 255, .52);
  --hair: rgba(255, 255, 255, .1);
  --exact: #7DE8B8;
  --exact-deep: #3E9C74;
  --near: #F5B857;
  --point: #F5B857;
  --gold: #E9C37A;
  --gold-deep: #A9782A;
  --display: "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --brand: "Mona Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); }
body {
  margin: 0;
  padding-inline: var(--gutter);
  background:
    radial-gradient(60rem 36rem at 50% -14%, rgba(125, 232, 184, .14), transparent 62%),
    radial-gradient(40rem 26rem at 100% 30%, rgba(245, 184, 87, .06), transparent 60%),
    var(--night);
  background-repeat: no-repeat;
  color: var(--chalk);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  position: relative;
  z-index: 0;
}
::selection { background: var(--exact); color: var(--night); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--exact); outline-offset: 4px; border-radius: 4px; }
main, .bar, .sig { max-width: 1180px; margin-inline: auto; }

/* ---------- The SHATATION frame ---------- */
.bar { display: flex; justify-content: space-between; align-items: center; padding-block: 22px; }
.home { display: block; width: 34px; color: var(--chalk); }
.home svg { display: block; width: 100%; height: auto; }
.bar-link {
  font-family: var(--brand);
  font-size: 11px;
  font-weight: 500;
  font-stretch: 125%;
  letter-spacing: .26em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--chalk-2);
  transition: color .3s;
}
.bar-link:hover { color: var(--chalk); }
/* the header's links keep apart on the challenge and friend pages too, which load no Index (and so not its style) */
.bar-end { display: flex; align-items: center; gap: 30px; }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: .01em; line-height: 1.06; text-wrap: balance; }
h2 { font-size: clamp(30px, 4vw, 50px); }
h3 { font-size: 21px; }
p { margin: 0; }
.kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--exact);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: 48px var(--gutter);
  padding-block: 6svh 12svh;
}
.hero-text { display: grid; gap: 22px; justify-items: start; }
.app-icon { width: 104px; height: 104px; border-radius: 23px; box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 0 0 1px var(--hair); }
.title { font-size: min(clamp(88px, 13vw, 190px), 24vw); line-height: .84; letter-spacing: .04em; }
.q { font-size: clamp(22px, 2.3vw, 30px); font-weight: 650; line-height: 1.25; }
.lede { max-width: 31rem; color: var(--chalk-2); font-size: clamp(18px, 1.5vw, 20px); }
.cta { margin-top: 8px; }
.cta .key { text-decoration: none; }
.cta-note { margin-top: -10px; font-size: 14px; color: var(--chalk-3); }

/* The game's primary button, here as a quiet promise (not a link yet). */
.key {
  display: inline-block;
  padding: 15px 28px 14px;
  border-radius: 16px;
  background: linear-gradient(rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 60%), var(--exact);
  box-shadow: 0 4px 0 var(--exact-deep);
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  line-height: 1;
  color: #06120C;
}

/* ---------- The board: a sealed code and the clues that crack it ---------- */
.board {
  justify-self: center;
  width: min(100%, 420px);
  display: grid;
  gap: 18px;
  padding: 26px;
  border-radius: 28px;
  background: linear-gradient(160deg, var(--raised), var(--panel) 55%);
  box-shadow: 0 40px 80px rgba(0, 0, 0, .55), inset 0 0 0 1px var(--hair);
}
.board-label { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--chalk-3); }
.code { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.slab {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  background: linear-gradient(180deg, #232836, #151922);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px var(--hair);
}
/* SHETA's keyhole, cut into each slab. */
.slab::before, .slab::after { content: ""; position: absolute; left: 50%; background: rgba(125, 232, 184, .85); }
.slab::before { top: 30%; width: 30%; aspect-ratio: 1; border-radius: 50%; transform: translateX(-50%); }
.slab::after { top: 47%; width: 18%; height: 26%; transform: translateX(-50%); clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%); }
.rows { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.rows li.win { background: rgba(125, 232, 184, .1); box-shadow: inset 0 0 0 1px rgba(125, 232, 184, .4); }
.digits { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: .32em; font-variant-numeric: tabular-nums; }
.clue { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.chip { padding: 5px 10px 4px; border-radius: 9px; font-size: 13px; font-weight: 800; letter-spacing: .02em; color: #0B0E14; white-space: nowrap; }
.chip.x { background: var(--exact); }
.chip.n { background: var(--near); }
.chip.o { background: transparent; color: var(--chalk-3); box-shadow: inset 0 0 0 1px var(--hair); }
.board-note { font-size: 14px; color: var(--chalk-3); }

/* ---------- Features ---------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 24px var(--gutter);
  padding-block: 9svh;
  border-top: 1px solid var(--hair);
}
.feature .copy { display: grid; gap: 16px; max-width: 34rem; }
.feature .copy p:not(.kicker) { color: var(--chalk-2); }
.fine { font-size: 14px; color: var(--chalk-3) !important; }

/* Clue legend and the five Abilities, as the game's chips. */
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.abilities { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 10px; color: var(--chalk-2); }
.abilities li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 12px 16px 11px;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--hair);
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .08em;
}
.abilities li .glyph { grid-row: span 2; }
.abilities li span { display: block; font-family: var(--text); font-weight: 500; font-size: 13px; letter-spacing: 0; color: var(--chalk-3); }

/* ---------- Signs: real hieroglyphs, gold, carved (light catches the edge) ---------- */
.glyph { display: block; width: 44px; height: 44px; color: var(--gold); filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .7)) drop-shadow(0 -1px 0 rgba(255, 226, 160, .18)); }
.glyph.sm { width: 30px; height: 30px; }
.glyph.lg { width: 72px; height: 72px; }

/* ---------- Phones: the release build's screenshots go here (release day) ---------- */
.phone { margin: 0; justify-self: center; width: min(100%, 330px); padding: 10px; border-radius: 54px; background: linear-gradient(145deg, #2A2F3B, #0F1218 60%); box-shadow: 0 40px 80px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.phone img { display: block; width: 100%; height: auto; border-radius: 44px; }

/* ---------- Ways to play ---------- */
.ways { display: grid; gap: 22px; padding-block: 10svh; border-top: 1px solid var(--hair); }
.ways-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ways-grid li { display: grid; gap: 12px; align-content: start; padding: 24px; border-radius: 22px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--hair); }
.ways-grid p { color: var(--chalk-2); font-size: 16px; }

/* ---------- Progress: the House of Gold ---------- */
.gold-house { position: relative; display: grid; gap: 22px; padding-block: 12svh; border-top: 1px solid var(--hair); }
.gold-house .gold-house .copy { display: grid; gap: 16px; max-width: 38rem; }
.gold-house .copy p:not(.kicker) { color: var(--chalk-2); }
.treasury { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 8px 0 0; padding: 0; list-style: none; }
.treasury li { display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: 22px; background: linear-gradient(160deg, rgba(233, 195, 122, .08), transparent 60%), var(--panel); box-shadow: inset 0 0 0 1px rgba(233, 195, 122, .16); }
.treasury h3 { font-size: 19px; }
.treasury p { color: var(--chalk-2); font-size: 15px; }
.title-line { font-family: var(--display); font-weight: 800; font-size: clamp(20px, 2vw, 26px); color: var(--chalk); }
.title-line span { color: var(--gold); }

/* ---------- Settings chips ---------- */
.options { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.options li { padding: 10px 16px 9px; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--hair); font-size: 15px; color: var(--chalk-2); }
.options li strong { color: var(--chalk); font-weight: 650; }

/* ---------- Ancient Egypt ---------- */
.egypt { position: relative; display: grid; gap: 18px; padding-block: 12svh; border-top: 1px solid var(--hair); }
.egypt > * { max-width: 46rem; }
.egypt .more { justify-self: start; text-decoration: none; }
.egypt p { color: var(--chalk-2); }
.egypt .word { font-family: var(--display); font-weight: 800; font-size: clamp(54px, 8vw, 96px); line-height: .9; color: transparent; background: linear-gradient(180deg, var(--chalk), var(--near)); -webkit-background-clip: text; background-clip: text; }

/* ---------- Your data ---------- */
.calm-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding-block: 4svh 12svh; }
.calm-list div { display: grid; gap: 10px; align-content: start; padding: 26px; border-radius: 26px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--hair); }
.calm-list p { color: var(--chalk-2); font-size: 16px; }

/* ---------- Signature ---------- */
.sig { display: grid; gap: 7svh; padding-block: 10svh calc(5svh + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--hair); }
.signature { font-family: var(--brand); font-size: clamp(22px, 3vw, 34px); font-weight: 500; font-stretch: 125%; letter-spacing: .14em; text-transform: uppercase; }
.signature .end { display: inline-block; width: .2em; height: .2em; margin-left: .12em; border-radius: 50%; background: var(--point); }
/* The signature as the brand draws it (SHATATiON-Brand/signature): "A", the drawn name at .78 em, "app", the point at
   .5 em, centred on one line, .45 em apart; the words light italic at 75 %, normal width, never typeset as the name */
.signature { display: flex; flex-wrap: wrap; align-items: center; gap: .2em .45em; letter-spacing: 0; text-transform: none; line-height: 1; }
.signature .sig-w { font-weight: 300; font-style: italic; font-stretch: 100%; opacity: .75; }
.signature .end { display: block; flex: none; width: .5em; height: .5em; margin: 0; border-radius: 50%; }
.sig-row { display: flex; flex-wrap: wrap; gap: 12px 36px; color: var(--chalk-3); font-size: 14px; }
.sig-row a { color: var(--chalk-2); text-decoration: none; border-bottom: 1px solid var(--hair); }
.sig-row a:hover { color: var(--chalk); }
.sig-row p { flex-basis: 100%; }
/* ---------- The fixed base row (every page: © SHATATION, Made by iShatat, the address) ---------- */
.sig-base { display: flex; flex-wrap: wrap; gap: 10px 32px; padding-top: 22px; border-top: 1px solid var(--hair); font-size: 13px; color: var(--chalk-3); }
.sig-base p { margin: 0; }
.sig-base .house { display: contents; }      /* the house line's links sit in the row with the copyright (tools/house-line.mjs) */
.sig-base .sig-mail { color: var(--chalk-2); text-decoration: none; border-bottom: 1px solid var(--hair); }


/* ---------- Phones (the device) ---------- */
@media (max-width: 1060px) and (min-width: 821px) {
  .ways-grid, .treasury { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .hero, .feature { grid-template-columns: minmax(0, 1fr); }
  .calm-list { grid-template-columns: minmax(0, 1fr); }
  .ways-grid, .treasury { grid-template-columns: minmax(0, 1fr); }
  .gold-house   .board { padding: 20px; }
  .digits { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Text pages (Privacy, Support, Terms) ---------- */
.doc { display: grid; gap: 22px; max-width: 46rem; padding-block: 6svh 12svh; }
.doc h1 { font-size: clamp(52px, 8vw, 92px); line-height: .95; }
.doc h2 { font-size: clamp(25px, 2.6vw, 31px); margin-bottom: 4px; }
.doc .updated { color: var(--chalk-3); font-size: 14px; }
.doc .intro { font-size: clamp(19px, 1.7vw, 22px); color: var(--chalk); }
.doc section { display: grid; gap: 14px; padding-top: 26px; border-top: 1px solid var(--hair); }
.doc p, .doc li { color: var(--chalk-2); }
.doc strong { color: var(--chalk); font-weight: 650; }
.doc ul { display: grid; gap: 10px; margin: 0; padding-left: 1.2em; }
.doc li::marker { color: var(--exact); }
.doc a:not(.key) { color: var(--chalk); text-decoration: none; border-bottom: 1px solid rgba(125, 232, 184, .55); }
.doc a:not(.key):hover { border-color: var(--exact); }
.contact { justify-items: start; border-top: 0 !important; padding-top: 6px !important; }
.contact .key { text-decoration: none; }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-size: 19px;
  font-weight: 600;
  color: var(--chalk);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: .8; color: var(--exact); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; }

/* ---------- Sources: where the names come from (the app's Papyrus text) ---------- */
.ref-hero { position: relative; display: grid; gap: 22px; justify-items: start; padding-block: 8svh 8svh; }
.ref-hero .lede { max-width: 44rem; }
.inscription { display: block; height: clamp(84px, 13vw, 150px); width: auto; max-width: 100%; color: var(--gold); filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .8)) drop-shadow(0 -1px 0 rgba(255, 226, 160, .25)); }
.inscription.sm { height: clamp(56px, 7vw, 84px); }
.translit { font-style: italic; font-weight: 500; color: var(--gold); }
.disclaimer { display: grid; gap: 10px; max-width: 46rem; padding: 20px 22px; border-radius: 20px; background: linear-gradient(160deg, rgba(233, 195, 122, .07), transparent 60%), var(--panel); box-shadow: inset 0 0 0 1px rgba(233, 195, 122, .18); }
.disclaimer p { color: var(--chalk-2); font-size: 16px; }
.disclaimer a, .entry a { color: var(--chalk); text-decoration: none; border-bottom: 1px solid rgba(233, 195, 122, .45); overflow-wrap: anywhere; }
.entry { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 32px; align-items: start; padding-block: 7svh; border-top: 1px solid var(--hair); }
.entry .glyph.lg { width: 80px; height: 80px; }
.glyph-icon { width: 72px; height: 72px; border-radius: 17px; box-shadow: 0 0 0 1px var(--hair); }
.entry .copy { display: grid; gap: 14px; max-width: 46rem; }
.entry h2 { font-size: clamp(26px, 3vw, 36px); }
.entry p, .entry li { color: var(--chalk-2); }
.entry ul { display: grid; gap: 6px; margin: 0; padding-left: 1.2em; }
.entry ul.sources li { font-size: 14px; color: var(--chalk-3); }
.entry li::marker { color: var(--gold); }
.gallery { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px !important; padding: 0 !important; margin: 8px 0 !important; list-style: none; }
.gallery li { display: grid; justify-items: center; gap: 6px; padding: 16px 8px 12px; border-radius: 16px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--hair); text-align: center; }
.gallery .name { font-size: 13px; font-weight: 650; color: var(--chalk); }
.gallery .code { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--chalk-3); }
@media (max-width: 620px) {
  .entry { grid-template-columns: minmax(0, 1fr); }
  .entry .glyph.lg { width: 56px; height: 56px; }
}

.nm { text-transform: none; }

/* ---------- The sky: the arch of Nut in gold dust (sheta.js) ---------- */
.sky, .sky-front { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* The board plays its guesses, then the code opens */
.board { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.digits { display: inline-block; min-height: 1.15em; min-width: 3ch; }
.board.playing .rows li { opacity: 0; transform: translateY(10px); transition: opacity .45s, transform .6s cubic-bezier(.2, .9, .3, 1), background .6s, box-shadow .6s; }
.board.playing .rows li.in { opacity: 1; transform: none; }
.board.playing .chip { opacity: 0; transform: scale(.55); transition: opacity .25s, transform .45s cubic-bezier(.3, 1.7, .5, 1); }
.board.playing .clued .chip { opacity: 1; transform: none; }
.board.playing .clued .chip + .chip { transition-delay: .12s; }
.board.playing .rows li.win:not(.clued) { background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--hair); }
.slab { transition: box-shadow .8s, background .8s; }
.slab::before, .slab::after { transition: opacity .35s, transform .5s cubic-bezier(.5, 0, .7, .4); }
.slab .d { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: clamp(34px, 4vw, 48px); color: var(--exact); opacity: 0; transform: translateY(26%) scale(.8); text-shadow: 0 0 22px rgba(125, 232, 184, .55); }
.board.open .slab::before, .board.open .slab::after { opacity: 0; transform: translateX(-50%) scale(.3); }
.board.open .slab .d { opacity: 1; transform: none; transition: opacity .5s .25s, transform .7s .25s cubic-bezier(.2, 1.4, .4, 1); }
.board.open .slab:nth-child(2) .d { transition-delay: .4s; }
.board.open .slab:nth-child(3) .d { transition-delay: .55s; }
.board.open .slab { background: linear-gradient(180deg, #1C3A31, #12231F); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(125, 232, 184, .45), 0 0 28px rgba(125, 232, 184, .18); }
.sky-front { z-index: 5; }
/* On the text pages the sky stays back. */
body:has(.doc) .sky, body:has(.ref-hero) .sky { opacity: .55; }

/* ---------- The torchlit relief (The name) ---------- */
.egypt { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); column-gap: var(--gutter); }
.egypt > :not(.relief) { grid-column: 1; position: relative; z-index: 1; }
.relief { grid-column: 2; grid-row: 1 / span 5; align-self: center; width: min(100%, 540px); justify-self: center; max-width: none !important; }
.relief svg { display: block; width: 100%; height: auto; overflow: visible; }

/* ---------- The gate of Per-Nebu ---------- */
.gold-house { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gutter); align-items: center; }
.gold-house .copy { grid-column: 1; grid-row: 1; }
.gold-house .treasury { grid-column: 1 / -1; }
.pylon { grid-column: 2; grid-row: 1; margin: 0; }
.pylon svg { display: block; width: 100%; height: auto; overflow: visible; }
.pylon .s { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(233, 195, 122, .35)); }
.pylon .s.t { stroke-width: 1.3; opacity: .7; filter: none; }
.pylon .s.pole { stroke-width: 1.6; }
.pylon .fill { fill: var(--night); }
.pylon .leaf .fill { fill: #12151D; }
.pylon .flag { fill: var(--gold); opacity: .85; transform-box: fill-box; transform-origin: left center; }
.pylon .ground { opacity: .5; }
.pylon .light, .pylon .beam, .pylon .glow, .pylon .mote { opacity: 0; }
.pylon .leaf { transform-box: fill-box; }
.pylon .leaf.l { transform-origin: left center; }
.pylon .leaf.r { transform-origin: right center; }

/* Drawn: each line runs out from nothing, a little after the one before. */
.ready .pylon .s { stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); }
.ready .pylon .flag { opacity: 0; }
.drawn .pylon .s { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s cubic-bezier(.45, 0, .2, 1) calc(var(--i) * 28ms); }
.drawn .pylon .flag { opacity: .85; transition: opacity .8s 1.8s; animation: pennant 3.2s ease-in-out var(--d) infinite alternate; }
@keyframes pennant { from { transform: skewY(-5deg) scaleX(.92); } to { transform: skewY(6deg) scaleX(1.05); } }

/* Open: the doors swing in, gold light pours out, and the treasure comes out. */
.open .pylon .leaf { transform: scaleX(.14); transition: transform 1.8s cubic-bezier(.6, 0, .2, 1); }
.open .pylon .light { opacity: 1; transition: opacity 1.2s .2s; }
.open .pylon .beam { opacity: 1; transition: opacity 1.6s .5s; }
.open .pylon .glow { opacity: 1; transition: opacity 2s .4s; }
.open .pylon .mote { animation: mote 3.4s ease-out var(--d) infinite; }
@keyframes mote { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: .9; } 100% { opacity: 0; transform: translate(var(--x), -150px); } }
.ready .treasury li { opacity: 0; transform: translateY(18px); }
.open .treasury li { opacity: 1; transform: none; transition: opacity .7s, transform .9s cubic-bezier(.2, .9, .3, 1); }
.open .treasury li:nth-child(1) { transition-delay: 1.2s; }
.open .treasury li:nth-child(2) { transition-delay: 1.35s; }
.open .treasury li:nth-child(3) { transition-delay: 1.5s; }
.open .treasury li:nth-child(4) { transition-delay: 1.65s; }

@media (max-width: 820px) {
  .egypt, .gold-house { grid-template-columns: minmax(0, 1fr); }
  .relief { grid-column: 1; grid-row: auto; width: min(78%, 340px); }
  .pylon { grid-column: 1; grid-row: auto; order: -1; }
  .gold-house .copy { grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .pylon .flag, .pylon .mote { animation: none; }
}
.pylon .sign { color: var(--gold); fill: var(--gold); opacity: .4; }
.pylon .sign.big { opacity: .5; }
.ready .pylon .sign { opacity: 0; }
.drawn .pylon .sign { opacity: .4; transition: opacity 1.4s 1.2s; }
.drawn .pylon .sign.big { opacity: .5; }

/* ---------- Name in a Cartouche: the page's card ---------- */
.cartouche-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(22px, 4vw, 48px); align-items: center; padding: clamp(18px, 3vw, 28px); margin-block: 6svh 2svh; border-radius: 26px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--hair); }
.cartouche-card img { width: 100%; height: auto; border-radius: 18px; display: block; }
.cartouche-card .cc-text { display: grid; gap: 14px; align-content: center; }
.cartouche-card p:not(.kicker) { color: var(--chalk-2); }
.cartouche-card .cc-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.cartouche-card .key { text-decoration: none; }
.cartouche-card .cc-ar { color: var(--chalk); text-decoration: none; border-bottom: 1px solid var(--hair); }
@media (max-width: 760px) { .cartouche-card { grid-template-columns: minmax(0, 1fr); } }
