/* Qoupe landing page. Loads after app.css and uses its tokens. */

.site { font-size: 16px }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 22px }
.skip { position: absolute; right: 12px; top: -60px; z-index: 50; background: var(--primary); color: var(--on-primary); padding: 10px 14px; border-radius: 10px; text-decoration: none }
.skip:focus { top: 12px }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s ease, background-color .3s ease }
.top.scrolled { border-bottom-color: var(--line) }
.top-in { height: 72px; display: flex; align-items: center; gap: 18px }
.nav { display: flex; gap: 26px; margin-inline-start: 26px; flex-grow: 1 }
.nav a { position: relative; color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 600; padding: 6px 0; background: linear-gradient(var(--thread), var(--thread)) no-repeat right bottom / 0 1.5px; transition: background-size .35s ease, color .2s ease }
.nav a:hover { color: var(--ink); background-size: 100% 1.5px }
.top-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto }
.menu-btn { display: none }

/* ---------- buttons and links used on the site ---------- */
.btn.lg { height: 56px; padding: 0 30px; font-size: 17px; border-radius: 12px }
.btn.gold { background: var(--night-gold); color: #141A2C }
.btn.gold:hover { color: #141A2C; filter: brightness(1.08) }
.link-thread { color: var(--ink); font-weight: 600; text-decoration: none; padding-bottom: 3px; background: linear-gradient(var(--thread), var(--thread)) no-repeat right bottom / 100% 1.5px; transition: background-size .35s ease }
.link-thread:hover { background-size: 35% 1.5px; color: var(--ink) }

/* ---------- hero ---------- */
.hero-s { position: relative; overflow: hidden; padding: clamp(36px, 6vw, 84px) 0 clamp(56px, 8vw, 110px) }
.threads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--thread); opacity: .34 }
[data-theme="dark"] .threads { opacity: .22 }
.threads path { stroke: currentColor; stroke-width: 1.1; vector-effect: non-scaling-stroke }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center }
/* Zain needs air between lines: its dots and tails collide below 1.3. */
.hero-h { font-family: var(--display); font-weight: 800; font-size: clamp(44px, 6.6vw, 86px); line-height: 1.34; letter-spacing: 0; text-wrap: balance }
.hero-p { margin-top: 18px; font-size: clamp(16.5px, 1.5vw, 18.5px); line-height: 2.05; color: var(--ink-2); max-width: 34em }
.hero-cta { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px }
.hero-note { margin-top: 18px; font-size: 13.5px; color: var(--muted) }

/* The manuscript page keeps its paper color in both themes: it is an object on the desk. */
.reader { margin: 0; position: relative }
.page { position: relative; z-index: 1; background: #FFFDF7; color: #1B2338; border: 1px solid #E4DECB; border-radius: 6px; padding: 22px clamp(20px, 3vw, 34px) 34px; font-family: var(--script); font-size: clamp(19px, 1.9vw, 23px); line-height: 2.2; box-shadow: 0 30px 60px -36px rgba(23, 32, 58, .55) }
[data-theme="dark"] .page { background: #F1EBDB; border-color: #D9D0B8; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9) }
.reader::before, .reader::after { content: ""; position: absolute; inset: 10px 6px auto 6px; height: calc(100% - 150px); background: #FBF8EF; border: 1px solid #E4DECB; border-radius: 6px; transform: rotate(-2.2deg); z-index: 0 }
.reader::after { transform: rotate(1.6deg); background: #F7F3E7 }
[data-theme="dark"] .reader::before, [data-theme="dark"] .reader::after { background: #D9D2BF; border-color: #C9C0A8; opacity: .5 }
.page-head { display: flex; align-items: center; gap: 12px; font-family: var(--text); font-size: 12px; font-weight: 600; color: #7A7462; margin-bottom: 8px }
.page-rule { flex-grow: 1; height: 1px; background: linear-gradient(to left, #C39B39, transparent) }
.ms { margin: 0 }
.ms.dlg { margin-top: 6px }
.mk { --mk: #B88F2E; cursor: pointer; border-radius: 3px; padding: 0 1px; -webkit-box-decoration-break: clone; box-decoration-break: clone; background: linear-gradient(var(--mk), var(--mk)) no-repeat right calc(100% - .32em) / 0 1.5px; transition: background-size .9s cubic-bezier(.4, .1, .2, 1), background-color .4s ease }
.mk.k-warn { --mk: #B86E00 }
.mk.k-error { --mk: #B3261E }
.mk.seen { background-size: 100% 1.5px }
.mk.on { background-size: 100% 1.5px; background-color: rgba(195, 155, 57, .13) }
.mk.k-warn.on { background-color: rgba(184, 110, 0, .13) }
.mk.k-error.on { background-color: rgba(179, 38, 30, .11) }
.mk:focus-visible { outline: 2px solid #1A2647; outline-offset: 2px }
html:not(.js) .mk { background-size: 100% 1.5px }

.lens { position: absolute; top: 0; left: 0; width: 62px; height: 62px; z-index: 2; pointer-events: none; color: #B88F2E; opacity: 0; transform: translate(40px, 40px); transition: transform 1.1s cubic-bezier(.45, .05, .2, 1), opacity .5s ease; filter: drop-shadow(0 6px 10px rgba(23, 32, 58, .28)) }
.lens.live { opacity: 1 }
.lens-glass { fill: rgba(255, 244, 214, .34); stroke: none }
html:not(.js) .lens { display: none }

.gloss { position: relative; z-index: 3; margin: -18px clamp(12px, 3vw, 34px) 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 12px; box-shadow: var(--shadow) }
.gloss-top { display: flex; align-items: center; gap: 10px }
.gloss-kind { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold) }
.gloss.k-warn .gloss-kind { background: var(--amber-soft); color: var(--amber-ink) }
.gloss.k-error .gloss-kind { background: var(--red-soft); color: var(--red) }
.gloss-name { font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1.3 }
.gloss-text { margin-top: 6px; font-size: 14.5px; line-height: 1.9; color: var(--ink-2); min-height: 3.8em }
.gloss.swap .gloss-top, .gloss.swap .gloss-text { animation: gl-in .45s ease both }
.gloss-dots { display: flex; gap: 2px; margin-top: 4px }
.gloss-dots button { width: 26px; height: 22px; border: 0; background: transparent; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center }
.gloss-dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: transform .3s ease, background-color .3s ease }
.gloss-dots button[aria-pressed="true"]::before { background: var(--thread); transform: scale(1.45) }
.gloss-dots button:focus-visible { outline: 2px solid var(--focus); border-radius: 6px }
html:not(.js) .gloss-dots { display: none }
.reader figcaption { margin: 12px clamp(12px, 3vw, 34px) 0; font-size: 12.5px; color: var(--muted) }

/* ---------- sections ---------- */
.sec, .night { scroll-margin-top: 60px }
.sec { padding: clamp(64px, 9vw, 124px) 0; overflow-x: clip } /* the tilted report sheet pokes out on a phone */
.sec-tight { padding-top: 0; scroll-margin-top: 104px }
.sec-h { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 4.3vw, 50px); line-height: 1.36; text-wrap: balance }
.sec-p { margin-top: 12px; font-size: 17px; line-height: 2.05; color: var(--ink-2); max-width: 60ch }
.sec-head { margin-bottom: clamp(28px, 4vw, 48px) }

/* criteria: fourteen named criteria, each with the question it asks of the text */
.scale { list-style: none; margin: 0; padding: 0; counter-reset: crit; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(7, auto); grid-auto-flow: column; column-gap: clamp(32px, 6vw, 84px) }
.scale li { counter-increment: crit; position: relative; padding: 15px 44px 16px 0; border-top: 1px solid var(--line) }
.scale li::before { content: counter(crit); position: absolute; right: 0; top: 14px; width: 30px; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.3; color: var(--gold); font-variant-numeric: tabular-nums }
.sc-name { display: block; font-weight: 700; font-size: 17.5px; line-height: 1.5 }
.sc-q { display: block; font-size: 14.5px; color: var(--muted); line-height: 1.8 }

/* how it reads */
.tenets { margin-top: clamp(26px, 4vw, 44px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line) }
.tenet { padding: 26px 22px 6px; border-inline-start: 1px solid var(--line) }
.tenet:first-child { border-inline-start: 0; padding-inline-start: 0 }
.tenet-i { width: 46px; height: 46px; color: var(--ink-2) }
.tenet-i .au, .soon-i .au { stroke: var(--thread) }
.tenet h3 { margin-top: 14px; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.45 }
.tenet p { margin-top: 8px; font-size: 15px; line-height: 1.95; color: var(--ink-2) }

/* writer report */
.report-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(36px, 6vw, 90px); align-items: center }
.parts { list-style: none; margin: 26px 0 0; padding: 0 }
.parts li { display: grid; grid-template-columns: 11.5em minmax(0, 1fr); gap: 4px 14px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 15.5px }
.parts li:last-child { border-bottom: 1px solid var(--line) }
.parts b { font-weight: 700 }
.parts span { color: var(--ink-2) }
.aside { margin-top: 18px; font-size: 14px; color: var(--muted); padding-inline-start: 14px; border-inline-start: 2px solid var(--thread) }
.sheet-art { position: relative; max-width: 400px; margin: 0 auto; width: 100% }
.rsheet { position: relative; background: #FFFDF7; color: #1B2338; border: 1px solid #E4DECB; border-radius: 6px; padding: 22px 22px 16px; font-size: 12px; line-height: 1.6; box-shadow: 0 34px 60px -38px rgba(23, 32, 58, .6) }
.rsheet.back { position: absolute; inset: 0; transform: rotate(4deg) translate(-10px, 8px); background: #F7F3E7; box-shadow: none }
[data-theme="dark"] .rsheet { background: #F1EBDB; border-color: #D9D0B8 }
[data-theme="dark"] .rsheet.back { background: #CFC8B4; opacity: .55 }
.rs-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 10px; border-bottom: 1.5px solid #C39B39; margin-bottom: 12px }
.rs-title { font-family: var(--display); font-weight: 800; font-size: 20px }
.rs-no { font-size: 11px; color: #7A7462; direction: ltr }
.rs-sec { margin-bottom: 12px }
.rs-sec b { display: block; font-size: 12.5px; margin-bottom: 7px; color: #7A5C12 }
.rs-sec i { display: block; height: 5px; border-radius: 3px; background: #DDD7C5; margin-bottom: 6px }
.rs-sec i.l1 { width: 100% } .rs-sec i.l2 { width: 86% } .rs-sec i.l3 { width: 64% }
.rs-sec i.dot { position: relative; margin-inline-start: 12px; width: calc(var(--dw, 80%) - 12px) }
.rs-sec i.dot.l1 { --dw: 96% } .rs-sec i.dot.l2 { --dw: 82% } .rs-sec i.dot.l3 { --dw: 62% }
.rs-sec i.dot::before { content: ""; position: absolute; right: -12px; top: 0; width: 5px; height: 5px; border-radius: 50%; background: #C39B39 }
.rs-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px }
.rs-table { display: grid; grid-template-columns: 1.2fr 1.3fr .7fr .6fr; border: 1px solid #E4DECB; border-radius: 4px; overflow: hidden; font-size: 11.5px }
.rs-table span { padding: 5px 8px; border-top: 1px solid #E4DECB }
.rs-table span:nth-child(-n+4) { border-top: 0; background: #F3EEDF; font-weight: 700; font-size: 10.5px; color: #5E5846 }
.rs-table .er { color: #B3261E }
.rs-table .ok { color: #17694A }
.rs-foot { margin-top: 12px; padding-top: 8px; border-top: 1px solid #E4DECB; font-size: 10px; color: #7A7462; text-align: center }

/* ---------- competition: always night ---------- */
.night { position: relative; background: radial-gradient(1200px 520px at 78% 0%, #101830 0%, transparent 70%), var(--night); color: var(--night-ink); padding: clamp(64px, 9vw, 120px) 0; overflow: hidden }
.night .sec-p { color: #C4BFB0 }
.comp-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(20px, 5vw, 72px); align-items: center }
.emblem { position: relative; width: 100%; max-width: 360px }
.emblem img { display: block; width: 100%; height: auto; border-radius: 28px; border: 1px solid color-mix(in srgb, var(--night-gold) 20%, transparent); box-shadow: 0 18px 48px rgba(0, 0, 0, .38) }
.comp-facts { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px }
.comp-facts li { font-size: 13.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(216, 180, 102, .38); color: var(--night-gold) }

/* The stages tracker. Each stage is done, now or next: the state is set by a class in the HTML.
   Numbers are real: the stages happen in this order. */
.stages-h { margin-top: clamp(40px, 6vw, 76px); font-family: var(--display); font-weight: 800; font-size: clamp(24px, 3vw, 34px); line-height: 1.4; text-align: center }
.stages-sub { margin: 6px auto 0; text-align: center; font-size: 15px; color: var(--night-muted) }
.stages-cd { margin: 10px auto 0; width: fit-content; padding: 5px 14px; border-radius: 999px; border: 1px solid rgba(216, 180, 102, .45); color: var(--night-gold); font-size: 14px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums }
.stages-cd[hidden] { display: none }
.track { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) }
.tstage { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 10px; text-align: center }
.tflag { height: 34px; display: flex; align-items: flex-start; justify-content: center }
.tflag span { position: relative; font-size: 12.5px; font-weight: 700; line-height: 1; padding: 6px 12px; border-radius: 999px; background: var(--night-gold); color: #141A2C; white-space: nowrap }
.tflag span::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--night-gold) }
.tnode { position: relative; z-index: 1; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1; background: var(--night); border: 2px solid #46507A; color: #8B93B2; font-variant-numeric: tabular-nums }
.tnode svg { display: none }
/* the rail runs from this node to the next one (to the left, in reading order) */
.tstage::before { content: ""; position: absolute; top: 58px; right: 50%; width: 100%; height: 2px; background: repeating-linear-gradient(to left, #46507A 0 7px, transparent 7px 14px) }
.tstage:last-child::before { display: none }
.tcard { margin-top: 16px; padding: 16px 14px 18px; border-radius: 14px; border: 1px solid transparent; width: 100% }
.tcard h4 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 23px; line-height: 1.4 }
.tcard p { margin: 6px auto 0; font-size: 14.5px; line-height: 1.95; color: var(--night-muted); max-width: 26ch }
.tstate { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: #8B93B2 }

.tstage.is-done .tnode { background: var(--night-gold); border-color: var(--night-gold); color: #141A2C }
.tstage.is-done .tnode span { display: none }
.tstage.is-done .tnode svg { display: block }
.tstage.is-done::before { background: var(--night-gold) }
.tstage.is-done .tstate { color: var(--night-gold) }
.tstage.is-now .tnode { background: var(--night-gold); border-color: var(--night-gold); color: #141A2C; box-shadow: 0 0 0 6px rgba(216, 180, 102, .16), 0 0 22px rgba(216, 180, 102, .55) }
.tstage.is-now .tnode::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--night-gold); animation: qp-pulse 2s ease-out infinite }
/* under way: the first part of the rail is gold, and the rest is still to come */
.tstage.is-now::before { background: linear-gradient(to left, var(--night-gold) 0 38%, transparent 38%), repeating-linear-gradient(to left, #46507A 0 7px, transparent 7px 14px) }
.tstage.is-now .tcard { border-color: rgba(216, 180, 102, .5); background: rgba(216, 180, 102, .07) }
.tstage.is-now .tstate { color: var(--night-gold) }
.tstage.is-next .tcard h4 { color: #C9C4B6 }

/* before taking part: the groups are open to look at, and joining asks for two things */
/* the competition channel: public, shown before anything is sent */
.channel { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(16px, 3vw, 32px); align-items: center; padding: clamp(22px, 3.4vw, 40px); border-radius: 22px; border: 1px solid rgba(216, 180, 102, .34); background: linear-gradient(160deg, rgba(216, 180, 102, .09), rgba(216, 180, 102, .02) 60%) }
.channel-i { width: 56px; height: 56px; padding: 13px; border-radius: 16px; background: var(--night-2); border: 1px solid var(--night-line); color: var(--night-gold) }
.channel h3 { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 3vw, 32px); line-height: 1.45 }
.channel p { margin-top: 6px; font-size: 15.5px; line-height: 2; color: #C4BFB0; max-width: 60ch }
.channel .btn { height: auto; min-height: 56px; padding-block: 10px; white-space: normal; text-align: center; line-height: 1.5 }

.comp-cta { margin-top: clamp(32px, 5vw, 56px); text-align: center }
.comp-cta p { margin: 14px auto 0; font-size: 13.5px; color: var(--night-muted); max-width: 46ch }

/* ---------- coming soon: a dashed frame means "not here yet" ---------- */
.soon-grid { margin-top: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px }
.soon { display: flex; gap: 20px; align-items: flex-start; padding: 26px; border: 1.5px dashed var(--line-2); border-radius: 16px }
.soon-i { width: 60px; height: 60px; flex-shrink: 0; color: var(--ink-2) }
.soon h3 { margin-top: 10px; font-family: var(--display); font-weight: 800; font-size: 25px; line-height: 1.4 }
.soon p { margin-top: 6px; font-size: 15.5px; line-height: 1.95; color: var(--ink-2) }

/* ---------- contact ---------- */
.contact { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: clamp(24px, 4vw, 44px); border-radius: 20px; background: var(--soft); border: 1px solid var(--line) }
.contact .sec-h { font-size: clamp(26px, 3.4vw, 38px) }
.contact .sec-p { margin-top: 8px; font-size: 16px }
.contact-act { display: flex; flex-direction: column; align-items: flex-start }

/* pledge: what Qoupe commits to toward the writer's novel, numbered like the criteria */
.pledge > * { max-width: 880px }
.pledge-list { list-style: none; margin: clamp(22px, 3.5vw, 36px) 0 0; padding: 0; counter-reset: pledge }
.pledge-list li { counter-increment: pledge; position: relative; padding: 15px 44px 16px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 2; color: var(--ink-2) }
.pledge-list li:last-child { border-bottom: 1px solid var(--line) }
.pledge-list li::before { content: counter(pledge); position: absolute; right: 0; top: 14px; width: 30px; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.5; color: var(--gold); font-variant-numeric: tabular-nums }
.pledge-sign { margin-top: 22px }
.pledge-name { color: inherit; font: inherit; text-decoration: none }
.pledge-name:hover { text-decoration: underline; text-underline-offset: 3px }
.pledge-name:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 30px 0 38px }
.foot-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 22px }
.foot-nav a { font-size: 14px; color: var(--ink-2); text-decoration: none }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--thread); text-underline-offset: 5px }
.foot .site-copy { margin-top: 26px; padding: 0 16px }

/* ---------- entrances. They wait for "go", set when the page script runs. ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.go) .hero-copy > *, html.js:not(.go) .reader { opacity: 0 }
  html.js:not(.go) .threads { visibility: hidden }
  html.go .hero-copy > * { animation: rise-in .8s cubic-bezier(.2, .7, .2, 1) both }
  html.go .hero-copy > :nth-child(2) { animation-delay: .12s }
  html.go .hero-copy > :nth-child(3) { animation-delay: .24s }
  html.go .hero-copy > :nth-child(4) { animation-delay: .34s }
  html.go .reader { animation: rise-in 1s .2s cubic-bezier(.2, .7, .2, 1) both }
  html.go .threads { animation: unspool 3.4s .1s cubic-bezier(.4, .1, .2, 1) both }

  /* the tracker draws itself once, when it scrolls into view */
  html.js .track:not(.seen) .tnode { transform: scale(.5); opacity: 0 }
  html.js .track:not(.seen) .tcard, html.js .track:not(.seen) .tflag { opacity: 0; transform: translateY(10px) }
  html.js .track:not(.seen) .tstage::before { transform: scaleX(0) }
  .track .tnode { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), opacity .4s ease }
  .track .tcard, .track .tflag { transition: opacity .6s ease, transform .6s ease }
  .track .tstage::before { transform-origin: right center; transition: transform .7s ease }
  .track .tstage:nth-child(1) > * { transition-delay: .05s } .track .tstage:nth-child(1)::before { transition-delay: .3s }
  .track .tstage:nth-child(2) > * { transition-delay: .55s } .track .tstage:nth-child(2)::before { transition-delay: .8s }
  .track .tstage:nth-child(3) > * { transition-delay: 1.05s } .track .tstage:nth-child(3)::before { transition-delay: 1.3s }
  .track .tstage:nth-child(4) > * { transition-delay: 1.55s }
}
@keyframes rise-in { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: none } }
@keyframes unspool { from { -webkit-clip-path: inset(0 0 0 100%); clip-path: inset(0 0 0 100%) } to { -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0) } }
@keyframes gl-in { from { opacity: 0; transform: translateY(5px) } to { opacity: 1; transform: none } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .tenets { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .tenet { padding-bottom: 22px }
  .tenet:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0 }
  .tenet:nth-child(n+3) { border-top: 1px solid var(--line) }
}
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 72px; right: 0; left: 0; margin: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 6px 22px 14px; box-shadow: var(--shadow) }
  .nav.open { display: flex }
  .nav a { padding: 12px 0; border-top: 1px solid var(--line); background: none }
  .nav a:first-child { border-top: 0 }
  .menu-btn { display: inline-flex }
  .hero-grid { grid-template-columns: minmax(0, 1fr) }
  .reader { max-width: 560px; width: 100%; margin: 6px auto 0 }
  .report-grid { grid-template-columns: minmax(0, 1fr) }
  .comp-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center }
  .emblem { width: min(78vw, 360px) }
  .comp-facts { justify-content: center }
  .night .sec-p { margin-inline: auto }
  .channel { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center }
  .channel p { margin-inline: auto }

  /* the tracker turns vertical: node on the right, card beside it, rail running down */
  .track { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto }
  .tstage { display: grid; grid-template-columns: 50px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 0 0 18px; text-align: right }
  .tstage:last-child { padding-bottom: 0 }
  .tflag { grid-column: 2; grid-row: 1; height: auto; justify-content: flex-start; margin-bottom: 8px }
  .tflag:empty { display: none }
  .tflag span::after { display: none }
  .tnode { grid-column: 1; grid-row: 1 / span 2 }
  .tcard { grid-column: 2; margin-top: 0; padding: 12px 14px 14px }
  .tcard p { margin-inline: 0; max-width: none }
  .tstage::before { top: 50px; right: 24px; width: 2px; height: calc(100% - 50px); background: repeating-linear-gradient(to bottom, #46507A 0 7px, transparent 7px 14px) }
  .tstage.is-done::before { background: var(--night-gold) }
  .tstage.is-now::before { background: linear-gradient(to bottom, var(--night-gold) 0 38%, transparent 38%), repeating-linear-gradient(to bottom, #46507A 0 7px, transparent 7px 14px) }
}
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  html.js .track:not(.seen) .tstage::before { transform: scaleY(0) }
  .track .tstage::before { transform-origin: center top }
}
@media (max-width: 700px) {
  .scale { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row }
  .soon-grid { grid-template-columns: minmax(0, 1fr) }
  .parts li { grid-template-columns: minmax(0, 1fr) }
  .contact { flex-direction: column; align-items: stretch }
  .contact-act { align-items: stretch }
  .contact .btn { width: 100% }
  .hero-cta .btn { flex: 1 1 100% }
  .channel .btn { width: 100% }
}
@media (max-width: 560px) {
  .tenets { grid-template-columns: minmax(0, 1fr) }
  .tenet { border-inline-start: 0; padding-inline: 0; border-top: 1px solid var(--line) }
  .tenet:first-child { border-top: 0 }
  .soon { flex-direction: column; gap: 12px; padding: 22px }
  .top-in { gap: 8px }
  .top-actions { gap: 6px }
  .top-cta { padding: 0 11px; font-size: 12.5px }
  .top .icon-btn { width: 38px; height: 38px }
}
@media (max-width: 380px) {
  .wrap { padding: 0 16px }
}
/* At 320 the header (brand, theme, start, menu) needs more room than the page has. */
@media (max-width: 340px) {
  .top-in.wrap { padding: 0 8px; gap: 4px }
  .top-actions { gap: 4px }
  .top-cta { padding: 0 8px; font-size: 12px }
  .top .icon-btn { width: 36px; height: 36px }
}

@media (prefers-reduced-motion: reduce) {
  .lens { transition: none }
}

/* Nazm section: one line and a button to /nazm */
.nazm-go { margin-top: 22px }

/* The header logo fades in over 500ms on arrival. Not under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .top .brand-img img { animation: logo-in .5s ease-out both }
  @keyframes logo-in { from { opacity: 0 } to { opacity: 1 } }
}

/* ---------- phones: the platform dock (public/dock.js) replaces the header menu; the desktop header nav stays ---------- */
@media (max-width: 700px) {
  .menu-btn, .nav, .nav.open { display: none }
}

/* ---------- the competition portal (docs/competition/PLAN.md 3.3), shown by public/portal.js while /competition is public ----------
   Scroll linked, never scroll locked: the night card grows from an inset rounded card to the full screen while the visitor
   scrolls, then its content rises in order; scrolling back reverses it. */
@view-transition { navigation: auto }
#competition.has-portal { padding-top: 0; overflow: clip } /* clip, not hidden: a hidden overflow would stop the sticky card */
#competition.has-portal > .wrap { padding-top: clamp(64px, 9vw, 120px) }
.portal-wrap { position: relative; height: 150vh; background: var(--bg) }
.portal {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; color: #ECE5D4;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, #111B36, #070B17 70%);
  clip-path: inset(9vh 24px round 34px); will-change: clip-path
}
#pThreads { position: absolute; inset: 0; width: 100%; height: 100%; display: block }
.p-in {
  position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 76px 24px calc(var(--dock-space, 86px) + 8px); gap: clamp(10px, 2vh, 18px); transform-origin: 50% 45%
}
.portal.anim .p-in [data-s] { opacity: 0; will-change: transform, opacity }
.p-eye { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: #D8B466; padding: 6px 16px; border-radius: 999px; border: 1px solid rgba(216, 180, 102, .35); background: rgba(216, 180, 102, .06) }
.p-eye i { width: 7px; height: 7px; border-radius: 50%; background: #D8B466; box-shadow: 0 0 12px #D8B466; animation: p-breath 2.2s infinite }
.p-title { font-family: var(--display); font-weight: 800; font-size: clamp(64px, 12vw, 150px); line-height: .95; background: linear-gradient(180deg, #FFF6DE 10%, #D8B466 60%, #9A7433); -webkit-background-clip: text; background-clip: text; color: transparent }
.p-slogan { font-family: 'Amiri', serif; font-size: clamp(16px, 2vw, 22px); color: #C6CCDD; max-width: 600px; line-height: 1.8 }
.p-slogan b { color: #D8B466; font-weight: 700 }
.p-live { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; font-size: 14.5px; color: #C6CCDD }
.p-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #3CCB8C; animation: p-ping 1.8s infinite }
.p-live b { color: #F2ECDD; font-family: var(--display); font-size: 20px; font-weight: 800 }
.p-cd { font-family: var(--display); font-size: 20px; color: #D8B466; font-variant-numeric: tabular-nums; padding: 2px 12px; border: 1px solid rgba(216, 180, 102, .3); border-radius: 10px; background: rgba(7, 11, 23, .5) }
.p-stats { display: flex; gap: clamp(18px, 4vw, 48px) }
.p-stats b { display: block; font-family: var(--display); font-size: clamp(28px, 4vw, 42px); font-weight: 800; line-height: 1; color: #F2ECDD; font-variant-numeric: tabular-nums }
.p-stats small { color: #97A0B4; font-size: 12.5px }

@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false }
.enter { position: relative; display: inline-block; margin-top: 6px; border-radius: 999px; text-decoration: none; color: #F2ECDD; transition: transform .35s cubic-bezier(.2, .8, .2, 1); -webkit-tap-highlight-color: transparent }
.enter:focus-visible { outline: 2px solid #D8B466; outline-offset: 6px }
.enter .ring { position: absolute; inset: -2px; border-radius: 999px; background: conic-gradient(from var(--ang, 0deg), rgba(216, 180, 102, .15), #D8B466, #FFF1C9, #D8B466, rgba(216, 180, 102, .15)); animation: p-spin 3.5s linear infinite }
.enter .ring::after { content: ""; position: absolute; inset: -14px; border-radius: 999px; background: radial-gradient(closest-side, rgba(216, 180, 102, .35), transparent); opacity: .6; animation: p-breath 2.6s infinite }
.enter .core { position: relative; display: inline-flex; align-items: center; gap: 14px; padding: 16px 30px 16px 22px; border-radius: 999px; background: linear-gradient(180deg, #141E3A, #0A1022); font-family: var(--display); font-size: 22px; font-weight: 800; line-height: 1.3; overflow: hidden }
.enter .core::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 241, 201, .18) 50%, transparent 70%); transform: translateX(120%); animation: p-sheen 3.2s 1s infinite }
.enter .tx { position: relative; text-align: right }
.enter small { display: block; font-family: var(--text); font-size: 12px; font-weight: 500; color: #97A0B4; margin-top: -2px }
.enter .arr { position: relative; width: 38px; height: 38px; border-radius: 50%; background: #D8B466; color: #141A2C; display: flex; align-items: center; justify-content: center; transition: transform .4s cubic-bezier(.2, .8, .2, 1) }
.enter .arr svg { width: 18px; height: 18px }
.enter:hover .arr { transform: translateX(-6px) rotate(-8deg) }

.marq { position: absolute; z-index: 1; inset-inline: 0; bottom: calc(var(--dock-space, 86px) + 6px); display: flex; flex-direction: column; gap: 10px; -webkit-mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); pointer-events: none }
.marq-row { display: flex; gap: 10px; width: max-content; animation: p-marq 60s linear infinite }
.marq-row.r2 { animation-direction: reverse; animation-duration: 75s }
.marq span { font-size: 13px; color: rgba(198, 204, 221, .55); padding: 5px 14px; border-radius: 999px; border: 1px solid rgba(46, 61, 110, .6); white-space: nowrap }
.marq span b { color: rgba(236, 229, 212, .8); font-weight: 600 }
.marq span.q { border-color: rgba(216, 180, 102, .45); color: rgba(216, 180, 102, .8) }
@keyframes p-spin { to { --ang: 360deg } }
@keyframes p-sheen { 60%, 100% { transform: translateX(-120%) } }
@keyframes p-marq { to { transform: translateX(50%) } }
@keyframes p-breath { 50% { opacity: .35 } }
@keyframes p-ping { 0% { box-shadow: 0 0 0 0 rgba(60, 203, 140, .6) } 100% { box-shadow: 0 0 0 10px rgba(60, 203, 140, 0) } }

/* The jump into /competition (cross-document View Transition): the circle itself is drawn by competition.css on the new page. */

@media (max-width: 700px) {
  .portal-wrap { height: 135vh }
  .portal { clip-path: inset(9vh 12px round 28px) }
  .marq { display: none }
  .p-in { padding-top: 64px; gap: 10px }
  .enter .core { font-size: 19px; padding: 13px 22px 13px 16px }
}
@media (max-width: 700px) and (max-height: 700px) {
  .p-title { font-size: 56px }
  .p-slogan { font-size: 14.5px; line-height: 1.7 }
  .p-stats b { font-size: 26px }
}
@media (prefers-reduced-motion: reduce) {
  .portal { clip-path: none; will-change: auto }
  .p-eye i, .p-live .dot, .enter .ring, .enter .ring::after, .enter .core::before, .marq-row { animation: none }
}

/* ---------- Q.Naseej (#literary). Uses app.css tokens only, so day and night follow the theme. ---------- */
.nj { border-top: 1px solid var(--line) }
.nj-center { text-align: center }

/* identity */
.nj-id { text-align: center }
.nj-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15.5px; color: var(--gold) }
.nj-beta { display: inline-block; font: 700 12px/1 var(--text); letter-spacing: .04em; padding: 6px 10px 5px; border-radius: 999px; border: 1px solid var(--thread); background: var(--gold-soft); color: var(--gold); vertical-align: middle }
.nj-mark { margin-top: 10px; font-family: var(--display); font-weight: 800; font-size: clamp(64px, 12vw, 150px); line-height: 1.05; letter-spacing: -.01em; color: var(--ink) }
.nj-mark span, .nj-end-mark > span:first-child { color: var(--thread) }
.nj-weave { display: block; width: min(420px, 78%); height: 28px; margin: 4px auto 0 }
.nj-weave path { stroke: var(--thread); stroke-width: 2; stroke-linecap: round }
.nj-weave .w2 { stroke: var(--line-2) }
.nj-tag { margin-top: 12px; font-family: var(--script); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.8; color: var(--ink-2) }

/* comparison headline */
.nj-lead { margin: clamp(40px, 6vw, 72px) auto 0; text-align: center; max-width: 30ch }
.nj-claim { font-size: 16px; color: var(--muted); font-weight: 600 }
.nj-claim s { color: var(--ink-2); font-weight: 700; text-decoration-color: var(--red); text-decoration-thickness: 2px }
.nj-big { margin-top: 10px; font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4vw, 46px); line-height: 1.45; text-wrap: balance }

/* numbers */
.nj-stats { list-style: none; margin: clamp(36px, 5vw, 60px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-block: 1px solid var(--line) }
.nj-stats li { padding: 22px 10px; text-align: center; border-inline-start: 1px solid var(--line) }
.nj-stats li:first-child { border-inline-start: 0 }
.nj-stats b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(36px, 4.2vw, 54px); line-height: 1.1; color: var(--gold); font-variant-numeric: tabular-nums }
.nj-stats span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--ink-2); font-weight: 600 }

/* blocks */
.nj-block { margin-top: clamp(64px, 9vw, 112px); scroll-margin-top: 90px }
.nj-h3 { font-family: var(--display); font-weight: 800; font-size: clamp(27px, 3.3vw, 40px); line-height: 1.4; text-wrap: balance }
.nj-p { margin-top: 10px; font-size: 16.5px; line-height: 2; color: var(--ink-2); max-width: 56ch }
.nj-head2 { margin-bottom: clamp(22px, 3vw, 34px) }
.nj-src { max-width: 60ch }

/* evidence */
.nj-ev { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(26px, 5vw, 64px); align-items: center }
.nj-kinds { margin-top: 22px; display: grid; gap: 2px }
.nj-kinds button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-weight: 600; font-size: 16px; color: var(--ink-2); transition: color .2s ease }
.nj-kinds button:last-child { border-bottom: 1px solid var(--line) }
.nj-kinds button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); flex-shrink: 0; transition: all .2s ease }
.nj-kinds button[aria-selected="true"] { color: var(--ink) }
.nj-kinds button[aria-selected="true"]::before { background: var(--thread); border-color: var(--thread); box-shadow: 0 0 0 4px var(--gold-soft) }
.nj-kinds button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px }
.nj-note { position: relative; padding: clamp(20px, 3vw, 30px); border-radius: 20px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow) }
.nj-note::before { content: ""; position: absolute; inset: 10px -10px -10px 10px; z-index: -1; border-radius: 20px; border: 1px dashed var(--line-2) }
.nj-note-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap }
.nj-q { margin-top: 18px; padding: 2px 16px 4px 0; border-inline-start: 3px solid var(--thread) }
.nj-loc { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums }
.nj-q p { margin-top: 4px; font-family: var(--script); font-size: clamp(19px, 2vw, 22px); line-height: 1.95; color: var(--ink) }
.nj-why { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14.5px; line-height: 1.9; color: var(--ink-2) }

/* what you get */
.nj-gets { margin-top: clamp(22px, 3vw, 34px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px }
.nj-get { padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--card) }
.nj-get h4 { margin-top: 18px; font-family: var(--display); font-weight: 800; font-size: 23px; line-height: 1.45 }
.nj-get p { margin-top: 6px; font-size: 15px; line-height: 1.95; color: var(--ink-2) }
.nj-viz { height: 118px; border-radius: 12px; background: var(--soft); padding: 16px }
.nj-bars { display: flex; align-items: flex-end; gap: 5px }
.nj-bars i { flex: 1; height: var(--h); border-radius: 4px 4px 2px 2px; background: var(--line-2) }
.nj-bars i.lo { background: var(--thread) }
.nj-steps { display: grid; align-content: center; gap: 9px }
.nj-steps div { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px }
.nj-steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--thread); color: var(--card); font: 800 13px/1 var(--display) }
.nj-steps i { height: 7px; width: 66%; border-radius: 4px; background: var(--line-2) }
.nj-steps span { font-size: 11px; font-weight: 700; color: var(--muted); padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); white-space: nowrap }
.nj-jury { position: relative; display: flex; flex-wrap: wrap; align-content: center; gap: 8px; padding-inline-end: 70px }
.nj-jury span { font-size: 12.5px; font-weight: 700; padding: 6px 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2) }
.nj-jury svg { position: absolute; left: 16px; top: 50%; width: 54px; height: 54px; margin-top: -27px; color: var(--thread); transform: rotate(-12deg) }

/* seven layers: a thread runs through the nodes */
.nj-layers { list-style: none; margin: clamp(24px, 3vw, 36px) 0 0; padding: 0; counter-reset: lay; max-width: 780px; position: relative }
.nj-layers::before { content: ""; position: absolute; right: 21px; top: 22px; bottom: 30px; width: 2px; background: linear-gradient(var(--thread), var(--thread)) right / 2px 100% no-repeat; opacity: .55 }
.nj-layers li { counter-increment: lay; position: relative; padding: 9px 66px 20px 0; min-height: 44px }
.nj-layers li::before { content: counter(lay); position: absolute; right: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 2px solid var(--thread); color: var(--gold); font: 800 20px/1 var(--display); font-variant-numeric: tabular-nums }
.nj-layers b { display: block; font-weight: 700; font-size: 17.5px; line-height: 1.6 }
.nj-layers span { display: block; margin-top: 2px; font-size: 15px; line-height: 1.9; color: var(--ink-2) }
.nj-layers li.human { margin-top: 6px; padding: 14px 76px 16px 16px; border-radius: 14px; background: var(--gold-soft); border: 1px solid var(--thread) }
.nj-layers li.human::before { right: 10px; top: 12px; background: var(--thread); color: var(--card) }

/* ten questions */
.nj-qs { list-style: none; margin: 0; padding: 0; counter-reset: q; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 6vw, 84px) }
.nj-qs li { counter-increment: q; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 15px 44px 16px 0; border-top: 1px solid var(--line) }
.nj-qs li::before { content: counter(q); position: absolute; right: 0; top: 14px; width: 30px; font: 800 22px/1.3 var(--display); color: var(--gold); font-variant-numeric: tabular-nums }
.nj-qs span { font-weight: 600; font-size: 17px; line-height: 1.75 }
.nj-qs em { font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted) }

/* thirteen axes in four levels */
.nj-lvls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "l1 l2" "l1 l3" "l4 l4"; gap: 20px }
.nj-lvl { padding: clamp(18px, 2.6vw, 28px); border-radius: 18px; border: 1px solid var(--line); background: var(--card) }
.nj-lvl.l1 { grid-area: l1 } .nj-lvl.l2 { grid-area: l2 } .nj-lvl.l3 { grid-area: l3 } .nj-lvl.l4 { grid-area: l4 }
.nj-lvl small { font-size: 12.5px; font-weight: 700; color: var(--gold) }
.nj-lvl h4 { margin-top: 2px; font-family: var(--display); font-weight: 800; font-size: 27px; line-height: 1.35 }
.nj-lvl > p { font-size: 14.5px; color: var(--muted) }
.nj-lvl ol { list-style: none; margin: 12px 0 0; padding: 0 }
.nj-lvl ol li { position: relative; padding: 12px 40px 12px 0; border-top: 1px solid var(--line) }
.nj-lvl ol li::before { content: attr(data-n); position: absolute; right: 0; top: 11px; font: 800 20px/1.3 var(--display); color: var(--gold); font-variant-numeric: tabular-nums }
.nj-lvl b { display: block; font-weight: 700; font-size: 16.5px; line-height: 1.6 }
.nj-lvl span { display: block; font-size: 14.5px; line-height: 1.85; color: var(--muted) }
.nj-lvl.l4 { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 28px; align-items: end }
.nj-lvl.l4 ol { margin: 0; grid-column: 2; grid-row: 1 / span 3 }

/* comparison table */
.nj-cmp { margin: clamp(22px, 3vw, 34px) auto 0; max-width: 820px; position: relative }
.nj-cmp::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 50%; border-radius: 16px; border: 1.5px solid var(--thread); background: var(--gold-soft); z-index: -1 }
.nj-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) }
.nj-row span { padding: 14px 20px; font-size: 15.5px; line-height: 1.8; border-top: 1px solid var(--line) }
.nj-row span:first-child { color: var(--muted) }
.nj-row span:last-child { font-weight: 700; color: var(--ink); border-top-color: color-mix(in srgb, var(--thread) 35%, transparent) }
.nj-th span { border-top: 0; padding-top: 18px; font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--ink-2) }
.nj-th span:last-child { font-size: 26px; color: var(--gold) }

/* closing */
.nj-end { margin-top: clamp(64px, 9vw, 112px); padding: clamp(28px, 5vw, 56px) 20px; text-align: center; border-radius: 22px; border: 1px solid var(--line); background: var(--soft) }
.nj-end-mark { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 6vw, 64px); line-height: 1.1 }
.nj-end-mark .nj-beta { margin-inline-start: 8px; font-size: 12px }
.nj-end-cta { margin-top: 22px; display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap }

/* responsive */
@media (max-width: 900px) {
  .nj-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) }
  .nj-stats li:nth-child(4) { border-inline-start: 0 }
  .nj-stats li:nth-child(n+4) { border-top: 1px solid var(--line) }
  .nj-ev { grid-template-columns: minmax(0, 1fr) }
  .nj-gets { grid-template-columns: minmax(0, 1fr) }
  .nj-qs { grid-template-columns: minmax(0, 1fr) }
  .nj-lvls { grid-template-columns: minmax(0, 1fr); grid-template-areas: "l1" "l2" "l3" "l4" }
  .nj-lvl.l4 { display: block } .nj-lvl.l4 ol { margin-top: 12px }
}
@media (max-width: 560px) {
  .nj-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .nj-stats li:nth-child(4) { border-inline-start: 1px solid var(--line) }
  .nj-stats li:nth-child(odd) { border-inline-start: 0 }
  .nj-stats li:nth-child(n+3) { border-top: 1px solid var(--line) }
  .nj-row span { padding: 12px 12px; font-size: 14.5px }
  .nj-th span:last-child { font-size: 22px }
  .nj-note::before { display: none }
}
.nj-cmp, .nj-note { isolation: isolate }
.nj-ev { isolation: isolate }
.nj-lead { max-width: 900px }
.nj-lvl h4 { margin: 2px 0 0 } .nj-lvl > p { margin: 2px 0 0 }
.nj-lvl.l4 { display: block } .nj-lvl.l4 ol { margin-top: 12px; max-width: 560px }
.nj-get h4 { margin-bottom: 0 } .nj-get p { margin-bottom: 0 }

/* Bar heights and step widths of the result cards: CSP (style-src 'self') blocks inline style attributes. */
.nj-bars i:nth-child(1) { --h: 86% }
.nj-bars i:nth-child(2) { --h: 72% }
.nj-bars i:nth-child(3) { --h: 34% }
.nj-bars i:nth-child(4) { --h: 78% }
.nj-bars i:nth-child(5) { --h: 64% }
.nj-bars i:nth-child(6) { --h: 90% }
.nj-bars i:nth-child(7) { --h: 40% }
.nj-bars i:nth-child(8) { --h: 70% }
.nj-bars i:nth-child(9) { --h: 58% }
.nj-bars i:nth-child(10) { --h: 46% }
.nj-bars i:nth-child(11) { --h: 82% }
.nj-bars i:nth-child(12) { --h: 66% }
.nj-bars i:nth-child(13) { --h: 74% }
.nj-steps div:nth-child(2) i { width: 52% }
.nj-steps div:nth-child(3) i { width: 44% }

/* The header nav with its two Beta chips, between the phone menu (900px) and the width where all links fit. */
@media (min-width: 901px) and (max-width: 1099px) {
  .nav { gap: 9px; margin-inline-start: 12px }
  .nav a { font-size: 14px; white-space: nowrap }
}

/* The home card of Q.Naseej (#literary): the closing box of the page, linking to /naseej. */
.nj-tease .nj-end { margin-top: 0 }
.nj-tease .nj-big { max-width: 30ch; margin-inline: auto; margin-top: 14px; font-size: clamp(22px, 2.6vw, 30px) }
