/* Result (R1-R13) on the test page and the neighbouring stories. Same page,
   same address: assets/js/result.js arranges what the engine shows - the
   share row under the header, the hook and the rest below, the bottom panel. */

/* The story box steps aside: its children (header, share, result) become
   children of the page, so the share bar sticks over the whole page. */
.ask.is-done { display: contents; }
.ask.is-done .tapback { display: none; }

/* scales are never shown on this site (Lex, 2026-11-12) */
.quiz-engine-scales, .quiz-engine-scale { display: none !important; }
.quiz-engine-result-image { display: none; }

/* R2: share - the engine's row; five networks white, "Share" glass and last, copy hidden */
.quiz-engine-share { position: sticky; top: 0; z-index: 10; padding: max(8px, env(safe-area-inset-top)) var(--gut-hd) 8px; background: var(--st); }
.quiz-engine-share-heading { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* seven plates since task 03: gap 4 px (45 px each on a 360 screen) */
.quiz-engine-share-row { display: flex; gap: 4px; }
.quiz-engine-share-link {
  position: relative; flex: 1 1 0; display: grid; place-items: center; min-width: 0; height: 44px;
  border-radius: 22px; background: var(--tx); color: var(--st); text-decoration: none;
  transition: background-color .1s, transform .1s;
}
.quiz-engine-share-icon { width: 22px; height: 22px; }
.quiz-engine-share-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.quiz-engine-share-native { order: 9; background: var(--glass); color: var(--tx); }
.quiz-engine-share-copy { display: none !important; }
.quiz-engine-share-link:active { transform: scale(.96); }
/* R11: the white focus ring stays off the neighbouring plate (gap 4 px) */
.quiz-engine-share-link:focus-visible, .mq-share-dl:focus-visible { outline-offset: 1px; }
/* "Download the card" - the theme's plate, glass, after "Share" */
.mq-share-dl {
  position: relative; order: 10; flex: 1 1 0; display: grid; place-items: center; min-width: 0; height: 44px;
  border-radius: 22px; background: var(--glass); color: var(--tx);
  transition: background-color .1s, transform .1s, opacity .1s;
}
.mq-share-dl svg { width: 22px; height: 22px; }
.mq-share-dl:active { transform: scale(.96); }
.mq-share-dl[aria-busy="true"] { opacity: .55; cursor: progress; }
.mq-share-dl[aria-busy="true"] svg { animation: omq-dlpulse .8s ease-in-out infinite alternate; }
@keyframes omq-dlpulse { to { transform: translateY(2px); opacity: .6; } }
/* R10: a failed card says so on the button for 2 s (and in the live region) */
.mq-share-dl.is-fail::after { content: attr(data-msg); position: absolute; right: 0; top: calc(100% + 6px); z-index: 2; padding: 6px 10px; border-radius: 10px; background: var(--deep); color: var(--tx); font-size: 13px; line-height: 1.2; font-weight: 800; white-space: nowrap; }
/* R11: below 360 px seven plates would shrink to ~39 px - two rows instead */
@media (max-width: 359px) {
  .quiz-engine-share-row { flex-wrap: wrap; }
  .quiz-engine-share-link, .mq-share-dl { flex: 1 0 calc(25% - 3px); }
}

/* R3-R5: first screen of the result - name and quote between share and panel */
.rmid {
  display: flex; flex-direction: column; align-items: center; justify-content: center; row-gap: 14px;
  min-height: calc(100vh - var(--chrome, 230px)); min-height: calc(100svh - var(--chrome, 230px));
  padding: 6px 20px 14px; text-align: center;
}
.quiz-engine-result-title:focus { outline: none; }
.quiz-engine-result-title { width: 100%; font-size: 64px; font-weight: 900; line-height: 1; letter-spacing: -.03em; text-wrap: balance; overflow-wrap: normal; }
.quiz-engine-result-verdict { display: flex; flex-direction: column; align-items: center; row-gap: 14px; }
.rmid .hook { display: none; }
.quote {
  max-width: 26em; padding: 9px 15px 10px; border-radius: 16px; background: var(--tx); color: var(--ink);
  font-size: clamp(19px, 5.4vw, 22px); line-height: 1.22; font-weight: 800; text-wrap: balance; transform: rotate(-1deg);
}
.duo { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 8px; row-gap: 8px; }
.duo span { max-width: 100%; padding: 7px 14px; border-radius: 12px; background: var(--glass); font-size: 17px; }
.duo span.me { background: var(--tx); color: var(--st); font-weight: 900; }
.fresh .quiz-engine-result-title { animation: omq-pop .44s var(--ease) both; }
.fresh .quote { animation: omq-swipe .3s .18s var(--ease) both; }
@keyframes omq-pop { from { opacity: 0; transform: scale(.7) rotate(-4deg); } }

/* R8-R13: under the first screen */
.below { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 22px var(--gut) 0; }
.below h2 { margin-bottom: 12px; font-size: 22px; line-height: 1.12; font-weight: 900; letter-spacing: -.01em; }
.hooks { display: grid; gap: 12px; }
.hook { max-width: 34em; font-size: 19px; line-height: 1.42; font-weight: 700; }

/* R10: CoreTypes block - the engine's CTA */
.quiz-engine-cta { padding: 20px 18px 18px; border-radius: 22px; background: var(--deep); }
.quiz-engine-cta h3 { font-size: 22px; line-height: 1.14; font-weight: 900; letter-spacing: -.01em; text-wrap: balance; }
.quiz-engine-cta p { margin-top: 10px; font-size: 16px; line-height: 1.45; font-weight: 700; color: var(--soft); }
.quiz-engine-cta-button {
  display: flex; align-items: center; justify-content: center; min-height: 52px; margin-top: 16px; padding: 8px 18px;
  border-radius: 26px; background: var(--tx); color: var(--deep); font-size: 17px; font-weight: 900; text-align: center; text-decoration: none;
}
.quiz-engine-cta-button:focus-visible { outline-offset: 3px; }

/* R11: today */
.circles { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.circ { flex: none; width: 96px; text-align: center; font-size: 13px; line-height: 1.16; font-weight: 800; overflow-wrap: normal; }
.circ u {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 50%;
  background: var(--glass); font-size: 15px; text-decoration: none; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--st), 0 0 0 4px var(--glass2);
}
.circ.me u { background: var(--tx); color: var(--st); box-shadow: 0 0 0 2px var(--st), 0 0 0 4px var(--tx); }
.circ .lb { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* R12: how others answered - the engine's list, from its threshold on */
.card { padding: 14px; border-radius: 20px; background: var(--tx); color: var(--ink); }
.pollc:not(:has(.quiz-engine-comparison)) { display: none; }
.pollc .quiz-engine-comparison-heading { margin-bottom: 10px; font-size: 17px; line-height: 1.2; font-weight: 900; }
.quiz-engine-comparison { display: grid; gap: 7px; }
.quiz-engine-comparison-item { position: relative; display: flex; align-items: center; min-height: 42px; border-radius: 12px; background: var(--pill); overflow: hidden; font-weight: 800; }
.quiz-engine-comparison-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--pollf); }
.quiz-engine-comparison-label { position: relative; display: flex; justify-content: space-between; column-gap: 10px; width: 100%; padding: 0 13px; }
.quiz-engine-comparison-label b { flex: none; font-weight: inherit; font-variant-numeric: tabular-nums; }
.quiz-engine-comparison-mine { font-weight: 900; box-shadow: inset 0 0 0 2px var(--st); }
.quiz-engine-comparison-mine .quiz-engine-comparison-bar { background: var(--pollo); }

/* R13: what else you could get */
.hl { display: grid; gap: 7px; }
/* the site's one glass row (B5): 56 px, radius 16, 17 / 900, arrow 18 */
.hl button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 56px; padding: 8px 14px 8px 16px; border-radius: 16px; background: var(--glass); font-size: 17px; line-height: 1.2; font-weight: 900; }
.hl button:active, .quiz-engine-share-native:active, .mq-share-dl:active { background: var(--glassp); }
.hl button svg { flex: none; width: 18px; height: 18px; transition: transform .15s; }
.hl button[aria-expanded="true"] { background: var(--tx); color: var(--st); }
.hl button[aria-expanded="true"] svg { transform: rotate(90deg); }
.opened:not(:empty) { margin-top: 12px; }
.opened .card { display: grid; gap: 6px; }
.opened .card p:first-child { font-size: 19px; line-height: 1.25; font-weight: 800; }
.opened .card p + p { font-weight: 700; color: var(--ink2); }

/* R6-R7: bottom panel, at the bottom from the first second; a slate fade above it.
   Fixed, not sticky: in the DOM it stands right after the result (R7, Tab order),
   so the column keeps its height free (--panel-h, result.js). */
.panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; padding: 8px var(--gut-hd) calc(4px + env(safe-area-inset-bottom)); background: var(--st); }
.col.has-panel { padding-bottom: var(--panel-h, 160px); }
@media (min-width: 600px) { .panel { left: 50%; right: auto; width: min(100%, 520px); transform: translateX(-50%); } }
@media (min-width: 1000px) { .panel { width: 470px; } }
.panel::before { content: ''; position: absolute; left: 0; right: 0; top: -24px; height: 24px; background: linear-gradient(rgba(70, 96, 122, 0), var(--st)); pointer-events: none; }
/* R6 (P3, task 04): "One more" - a dark compact plate; .go itself lives in main.css (shared with the home page) */
/* R4: two lines at most - line-clamp works only on a -webkit-box */
.panel .go small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
/* R7 (P3): CoreTypes - a white sticker tilted -1.5 deg with a dark badge on its corner; the whole sticker is the link */
.ctstk { position: relative; display: flex; align-items: center; justify-content: center; margin: 20px 6px 10px; min-height: 56px; padding: 16px 16px 12px; border-radius: 18px; background: var(--tx); color: var(--ink); text-align: center; text-decoration: none; transform: rotate(-1.5deg); transition: transform .12s var(--ease); }
/* the site's one dark tag (B2): 13 / 900, radius 10, +2deg on a sticker */
.ctname { position: absolute; left: 14px; top: -12px; padding: 4px 10px 5px; border-radius: 10px; background: var(--deep); color: var(--tx); font-size: 13px; line-height: 1.1; font-weight: 900; transform: rotate(2deg); }
.cttx { font-size: 15px; line-height: 1.18; font-weight: 900; overflow-wrap: normal; text-wrap: balance; }
.ctstk:focus-visible { outline-color: var(--tx); outline-offset: 3px; }

/* neighbouring stories: only from 1180 px */
.peek { display: none; }
@media (min-width: 1180px) {
  .peek:not([hidden]) {
    position: fixed; top: 50%; z-index: 1; display: flex; flex-direction: column; justify-content: space-between;
    width: 230px; height: 410px; padding: 18px; border-radius: 22px; color: var(--tx);
    /* A2: the see-through is the background's, the type stays white */
    background: rgba(70, 96, 122, .72); text-decoration: none; transform: translateY(-50%); transition: background-color .15s;
  }
  .peek.l { left: calc(50% - 235px - 64px - 230px); }
  .peek.r { left: calc(50% + 235px + 64px); }
  .peek.r { justify-content: flex-start; }
  /* S2 (Lex, 2026-11-14): left - your result; right - the next quiz's first screen */
  .peek small { display: block; font-size: 14px; line-height: 1.2; font-weight: 800; color: var(--tx); }
  .peek .grow { flex: 1; }
  .peek .pn { display: block; font-size: 34px; line-height: 1; font-weight: 900; letter-spacing: -.02em; overflow-wrap: normal; }
  .peek .pq { display: block; margin: 12px -4px 0; padding: 8px 11px 9px; border-radius: 12px; background: var(--tx); color: var(--ink); font-size: 14px; line-height: 1.2; font-weight: 800; text-align: center; transform: rotate(-1deg); }
  .peek .pt { margin-top: 12px; }
  .peek .pbar { display: flex; gap: 3px; }
  .peek .pbar i { flex: 1; height: 3px; border-radius: 2px; background: var(--glass2); }
  .peek .pnext { margin-top: 10px; font-size: 15px; font-weight: 900; }
  .peek .pqq { flex: 1; display: flex; align-items: flex-end; justify-content: center; min-height: 0; overflow: hidden; padding: 10px 2px 14px; font-size: 19px; line-height: 1.12; font-weight: 900; text-align: center; text-wrap: balance; }
  .peek .pskel { display: block; padding: 7px; border-radius: 14px; background: var(--tx); transform: rotate(-1deg); }
  .peek .pskel i { display: block; height: 22px; margin-top: 5px; border-radius: 8px; background: var(--pill); }
  .peek .pskel i:first-child { margin-top: 0; }
}

@media (hover: hover) and (pointer: fine) {
  .quiz-engine-share-link:hover { background: var(--whiteh); }
  .quiz-engine-share-native:hover, .mq-share-dl:hover { background: var(--glassh); }
  .quiz-engine-cta-button:hover { background: var(--whiteh); }
  .ctstk:hover { transform: rotate(0); }
  .hl button:hover { background: var(--glassh); }
  .hl button[aria-expanded="true"]:hover { background: var(--tx); }
  .peek:hover { background: rgba(70, 96, 122, .9); }
}
