/* "How to get the most out of IRIS" (templates/_results_tour.html, results_tour.py).
 *
 * A dark card over the light Dashboard. The card is dark; every accent on it is the light Dashboard's own
 * (the light palette in refaced-theme.css): its purple #6C63FF / #5B52E0 and its pink #D81F8F, lifted to a
 * lighter tint where they are words on the dark card so they stay readable. The "Should" sheet and page are
 * the light Dashboard itself: #F8F8FB ground, #101018 ink.
 * Headlines: Cormorant Garamond, the app's display face. Body: IBM Plex Sans (both self-hosted).
 * Every selector starts with .rtour or .rtq, so nothing here can reach the rest of the page.
 */
/* The true Cormorant italic for the accent words (the same files refaced-theme.css declares; that sheet is
   not on every page this tour or /iris/questions renders on, and without it the browser fakes the slant). */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 500 700;
    font-display: swap;
    src: url(../fonts/cormorant-garamond-italic-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 500 700;
    font-display: swap;
    src: url(../fonts/cormorant-garamond-italic-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

.rtour, .rtq {
    --rt-dim: rgba(16, 16, 24, .62);
    --rt-card: #16132C;
    --rt-card-glow: rgba(108, 99, 255, .30);
    --rt-raised: rgba(255, 255, 255, .06);
    --rt-raised-line: rgba(255, 255, 255, .10);
    --rt-text: #F6F5FF;
    --rt-text-soft: rgba(246, 245, 255, .86);
    --rt-muted: rgba(246, 245, 255, .66);
    --rt-accent: #B4AEFF;          /* the Dashboard purple, lifted for words on the dark card */
    --rt-graphic: #6C63FF;         /* the Dashboard purple, untouched, where it is a shape */
    --rt-pink: #D81F8F;            /* the Dashboard's action pink: the one filled button */
    --rt-pink-soft: #FF9AD5;       /* the same pink as a small label on the dark card */
    --rt-light-bg: #F8F8FB;
    --rt-light-card: #FFFFFF;
    --rt-ink: #101018;
    --rt-ink-muted: rgba(16, 16, 24, .66);
    --rt-ink-line: rgba(16, 16, 24, .10);
    --rt-ink-accent: #5B52E0;
    --rt-display: "Cormorant Garamond", Georgia, serif;
    --rt-body: "IBM Plex Sans", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ── The layer and the card ───────────────────────────────────────────────────────────────── */
.rtour {
    position: fixed;
    inset: 0;
    z-index: 7000;                         /* above the Dashboard's own dialogs and the cookie bar */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
    background: var(--rt-dim);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.rtour[hidden] { display: none; }
html.rtour-open, html.rtour-open body { overflow: hidden; }

.rtour-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    height: min(100%, 880px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 28px;
    color: var(--rt-text);
    font-family: var(--rt-body);
    background:
        radial-gradient(120% 55% at 50% 0%, var(--rt-card-glow), transparent 70%),
        var(--rt-card);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55);
}

/* ── Top: progress bars, label, skip ──────────────────────────────────────────────────────── */
.rtour-top { padding: 16px 20px 0; display: grid; gap: 12px; flex: none; }
.rtour-bars { display: flex; gap: 5px; }
.rtour-bars span { flex: 1; height: 4px; border-radius: 2px; background: rgba(246, 245, 255, .2); overflow: hidden; }
.rtour-bars i { display: block; height: 100%; width: 0; background: var(--rt-accent); border-radius: 2px; transition: width .35s ease; }
.rtour-bars span.is-done i { width: 100%; }
.rtour-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rtour-label {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: var(--rt-display);
    font-weight: 600;
    font-style: italic;
    font-size: 17px;
    color: var(--rt-muted);
}
.rtour-skip {
    flex: none;
    background: none;
    border: 0;
    padding: 8px 2px;
    color: var(--rt-muted);
    font: 500 14px var(--rt-body);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── The slides ───────────────────────────────────────────────────────────────────────────── */
.rtour-stage { position: relative; flex: 1; min-height: 0; }
.rtour-slide {
    position: absolute;
    inset: 0;
    padding: 8px 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: rtour-in .35s ease both;
}
.rtour-slide[hidden] { display: none; }
@keyframes rtour-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.rtour-art { flex: 1 1 auto; min-height: 120px; display: flex; align-items: flex-end; justify-content: center; }
.rtour-art img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
/* The big pictures fill whatever height is left and are fitted inside it: an absolutely placed image cannot
   push its box taller, so a short phone shrinks the picture instead of cutting its top off under the label. */
.rtour-slide--cause .rtour-art, .rtour-slide--neck .rtour-art, .rtour-slide--roads .rtour-art,
.rtour-slide--should .rtour-art { position: relative; flex: 1 1 0; min-height: 140px; }
.rtour-slide--cause .rtour-art img, .rtour-slide--neck .rtour-art img, .rtour-slide--roads .rtour-art img,
.rtour-slide--should .rtour-art img {
    position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: contain; object-position: center bottom;
}
.rtour-slide--alert .rtour-art { flex: 0 0 auto; min-height: 0; padding-block: 4px; }
.rtour-slide--alert .rtour-art img { max-height: 92px; }
.rtour-slide--should .rtour-art { max-height: 230px; }
.rtour-slide--closer { text-align: center; }
/* Cards without a big picture sit in the middle of the card instead of hanging from the top. Auto margins,
   NOT justify-content: center: centred content taller than the card spills off the TOP, where no scrolling
   reaches it (the headline vanished under the label on a short phone, Melodie 2026-10-06). */
.rtour-slide--moves > :first-child, .rtour-slide--alert > :first-child, .rtour-slide--next > :first-child,
.rtour-slide--should > :first-child, .rtour-slide--closer > :first-child { margin-top: auto; }
.rtour-slide--moves > :last-child, .rtour-slide--alert > :last-child, .rtour-slide--next > :last-child,
.rtour-slide--should > :last-child, .rtour-slide--closer > :last-child { margin-bottom: auto; }
.rtour-card:focus { outline: none; }
.rtour-slide--closer .rtour-art { flex: 0 0 auto; }
.rtour-art--logo img { width: 104px; height: 104px; filter: drop-shadow(0 0 28px rgba(226, 191, 107, .45)); }

/* Allison's diagrams: a white background of their own, so they sit on a soft white panel; her photo
   comparison gets rounded corners. Both are fitted inside the art box like every other picture. */
.rtour-art--panel img, .rtour-art--photo img { border-radius: 16px; }
.rtour-art--panel img { background: #FFFFFF; padding: 10px; box-sizing: border-box; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5); }
.rtour-slide--flow .rtour-art, .rtour-slide--skin .rtour-art, .rtour-slide--intro .rtour-art,
.rtour-slide--order .rtour-art { position: relative; flex: 1 1 0; min-height: 140px; }
.rtour-slide--flow .rtour-art img, .rtour-slide--skin .rtour-art img, .rtour-slide--intro .rtour-art img,
.rtour-slide--order .rtour-art img {
    position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: contain; object-position: center bottom;
}
/* object-fit leaves empty space inside the img box, so a panel's white would fill it: size the panel to the
   picture instead (static, centred, capped by the box). */
.rtour-slide .rtour-art.rtour-art--panel img, .rtour-slide .rtour-art.rtour-art--photo img {
    position: absolute; inset: auto 0 0 0; margin: 0 auto; width: auto; height: auto; max-width: 100%; max-height: 100%;
}
.rtour-slide--order .rtour-art { min-height: 120px; }

/* "You see / I see" on the cause card. */
.rtour-pairs { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rtour-pairs li {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: baseline;
    padding: 8px 12px; border-radius: 12px; background: var(--rt-raised); border: 1px solid var(--rt-raised-line);
    font-size: 14.5px; line-height: 1.35;
}
.rtour-see { color: var(--rt-muted); }
.rtour-cause { color: var(--rt-text); font-weight: 600; }

.rtour-h {
    margin: 0;
    font-family: var(--rt-display);
    font-weight: 600;
    font-size: clamp(31px, 8.6vw, 38px);
    line-height: 1.04;
    letter-spacing: -.005em;
    color: var(--rt-text);
    text-wrap: balance;
}
.rtour-h em { font-style: italic; font-weight: 500; color: var(--rt-accent); }
.rtour-slide--closer .rtour-h { font-size: clamp(32px, 9vw, 40px); }

.rtour-p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--rt-text-soft); }
.rtour-p strong { font-weight: 600; color: var(--rt-text); }
.rtour-small { margin: 0; font-size: 14px; line-height: 1.5; color: var(--rt-muted); }

/* Card 3's three levels: the baseline, the power moves (lit up), the support team. Every move is a row
   she taps to open, with a + that turns into a minus. */
.rtour-groups { display: grid; gap: 10px; }
.rtour-group { display: grid; gap: 6px; }
.rtour-group-label {
    margin: 0;
    font-family: var(--rt-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rt-muted);
}
.rtour-group--power .rtour-group-label { color: var(--rt-pink-soft); }
.rtour-rows { display: grid; gap: 6px; }
.rtour-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 7px 12px;
    border-radius: 14px;
    border: 1px solid var(--rt-raised-line);
    background: var(--rt-raised);
    color: var(--rt-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.rtour-row:hover { background: rgba(255, 255, 255, .09); }
.rtour-icon { flex: none; width: 32px; height: 32px; }
.rtour-row-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.rtour-tile-name { font-family: var(--rt-display); font-weight: 600; font-size: 19px; line-height: 1.1; }
.rtour-row-line { display: none; font-size: 13.5px; line-height: 1.35; color: var(--rt-text-soft); }
.rtour-row[aria-expanded="true"] .rtour-row-line { display: block; animation: rtour-fade .25s ease both; }
.rtour-row-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--rt-raised-line); position: relative; }
.rtour-row-mark::before, .rtour-row-mark::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -.75px 0 0 -5px;
    background: var(--rt-muted); border-radius: 1px; transition: transform .2s;
}
.rtour-row-mark::after { transform: rotate(90deg); }
.rtour-row[aria-expanded="true"] .rtour-row-mark::after { transform: rotate(0deg); }
.rtour-row[aria-expanded="true"] { border-color: var(--rt-accent); background: rgba(108, 99, 255, .14); }
.rtour-group--power .rtour-row {
    border-color: rgba(255, 154, 213, .55);
    background: linear-gradient(90deg, rgba(216, 31, 143, .16), rgba(108, 99, 255, .10));
    box-shadow: 0 0 22px -8px rgba(216, 31, 143, .55);
}
.rtour-group--power .rtour-row-mark { border-color: rgba(255, 154, 213, .55); }
.rtour-group--power .rtour-row-mark::before, .rtour-group--power .rtour-row-mark::after { background: var(--rt-pink-soft); }
.rtour-group--power .rtour-row[aria-expanded="true"] {
    border-color: var(--rt-pink-soft);
    background: linear-gradient(90deg, rgba(216, 31, 143, .26), rgba(108, 99, 255, .16));
}
@keyframes rtour-fade { from { opacity: 0; } to { opacity: 1; } }

/* Card 4: the perfectionists. */
.rtour-callout { padding: 14px 16px; border-radius: 16px; background: var(--rt-raised); border: 1px solid var(--rt-raised-line); }
.rtour-callout-label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--rt-display);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rt-pink-soft);
}
.rtour-callout p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--rt-text-soft); }

/* Card 7: the way to the "Should" questions. */
.rtour-qbtn {
    align-self: flex-start;
    margin-top: 2px;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1.5px solid var(--rt-accent);
    color: var(--rt-accent);
    font: 500 15px var(--rt-body);
    text-decoration: none;
}
.rtour-qbtn:hover { background: rgba(180, 174, 255, .1); }

/* ── Bottom: back and next ────────────────────────────────────────────────────────────────── */
.rtour-nav { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 20px 20px; }
.rtour-back {
    background: none;
    border: 0;
    padding: 12px 6px;
    color: var(--rt-muted);
    font: 500 15px var(--rt-body);
    cursor: pointer;
}
.rtour-back[disabled] { visibility: hidden; }
.rtour-next {
    margin-left: auto;
    min-width: 132px;
    padding: 14px 22px;
    border-radius: 999px;
    border: 1.5px solid rgba(246, 245, 255, .35);
    background: rgba(255, 255, 255, .08);
    color: var(--rt-text);
    font: 600 16px var(--rt-body);
    cursor: pointer;
}
.rtour-next.is-final { flex: 1; border-color: var(--rt-pink); background: var(--rt-pink); color: #FFFFFF; }

.rtour button:focus-visible, .rtour a:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: 2px; }

/* ── The "Should" sheet inside the tour ──────────────────────────────────────────────────── */
.rtour-sheet {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow-y: auto;
    padding: 18px 22px 28px;
    background: var(--rt-light-bg);
    color: var(--rt-ink);
    animation: rtour-up .3s ease both;
}
.rtour-sheet[hidden] { display: none; }
@keyframes rtour-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.rtour-sheet-back {
    background: none;
    border: 0;
    padding: 6px 0 10px;
    color: var(--rt-ink-accent);
    font: 600 15px var(--rt-body);
    cursor: pointer;
}

/* ── The questions list (sheet and /iris/questions) ───────────────────────────────────────── */
.rtq { color: var(--rt-ink); font-family: var(--rt-body); }
.rtq-title { margin: 4px 0 6px; font-family: var(--rt-display); font-weight: 600; font-size: 34px; line-height: 1.05; color: var(--rt-ink); }
.rtq-intro { margin: 0 0 16px; font-size: 15px; color: var(--rt-ink-muted); }
.rtq-list { display: grid; gap: 10px; }
.rtq-item { background: var(--rt-light-card); border: 1px solid var(--rt-ink-line); border-radius: 16px; padding: 0 16px; box-shadow: 0 2px 16px rgba(0, 0, 0, .05); }
.rtq-q {
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 0;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.35;
    cursor: pointer;
}
.rtq-q::-webkit-details-marker { display: none; }
.rtq-q::after { content: "+"; flex: none; color: var(--rt-ink-accent); font-weight: 500; font-size: 20px; line-height: 1; }
.rtq-item[open] .rtq-q::after { content: "\2212"; }
.rtq-a { margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: var(--rt-ink-muted); }
.rtq-q:focus-visible { outline: 2px solid var(--rt-ink-accent); outline-offset: 2px; border-radius: 6px; }

@media (max-height: 700px) {
    .rtour-slide { gap: 10px; }
    .rtour-h { font-size: clamp(28px, 8vw, 33px); }
    .rtour-p { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .rtour-slide, .rtour-sheet, .rtour-row[aria-expanded="true"] .rtour-row-line { animation: none; }
    .rtour-bars i, .rtour-row, .rtour-row-mark::before, .rtour-row-mark::after { transition: none; }
}

/* Read aloud, never seen: which card she is on. */
.rtour-live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The page of its own (/iris/questions). */
.rtq-page { max-width: 640px; margin: 0 auto; padding: 28px 16px 56px; }
.rtq-page .rtq-title { font-size: clamp(34px, 7vw, 44px); }

/* The replay link on the Dashboard. Drawn inside the Dashboard's own theme, so it takes the Dashboard's
   tokens (--rf-glow is gold on the dark look and the purple ink on the light one). */
.rtour-replay {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--rf-glass-border, rgba(16, 16, 24, .12));
    background: var(--rf-glass-bg, #FFFFFF);
    color: var(--rf-glow, #5B52E0);
    font: 600 14px var(--font-sans, -apple-system, sans-serif);
    cursor: pointer;
}
.rtour-replay::before { content: "\2726"; font-size: 13px; }
.rtour-replay:hover { filter: brightness(1.05); }
.rtour-replay:focus-visible { outline: 2px solid var(--rf-glow, #5B52E0); outline-offset: 2px; }
