/* =============================================================================
   INTRO FLOW (Session 13, docs/handover/intro-flow/)
   Loaded before main.css and render-blocking, so it must stay small. While the
   splash shows, main.css is at print media (see the top of index.html): this
   file stands alone, fonts included.
   ============================================================================= */

@font-face {
    font-family: 'Hanken Grotesk';
    src: url('../fonts/hanken-grotesk-variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Saira';
    src: url('../fonts/saira-variable.woff2') format('woff2');
    font-weight: 100 900;
    font-stretch: 50% 125%;
    font-style: normal;
    font-display: swap;
}

/* ── When it shows ───────────────────────────────────────────────────────────
   The shell is out of the page (and the tab order) while the flow is up. */
#introFlow { display: none; }
html[data-intro] body { margin: 0; overflow: hidden; }
/* The sign-in windows (account.css), the Papers window and the Account window (Session 14b) show
   over the flow too. Each must be named here: this rule outranks a window's own display. */
html[data-intro] body > *:not(#introFlow):not(#exampleBand):not(#accWin):not(#papersWin):not(#accountWin) { display: none; }
html[data-intro] #introFlow { display: flex; }

/* ── Splash (screen 1) ────────────────────────────────────────────────────── */
#introFlow {
    position: fixed;
    inset: 0;
    z-index: 9000;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    background: linear-gradient(180deg, #FFFFFF 0%, #F4F3FE 48%, #E0DFFC 100%);
    color: #1A1A2E;
    font-family: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
}
#introFlow :focus-visible { outline: 3px solid #3F3AB8; outline-offset: 3px; }

.ifl-top {
    flex: none;
    box-sizing: border-box;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 56px;
}
.ifl-wordmark { display: block; height: 44px; width: auto; color: #544FF0; }

.ifl-secondary {
    margin: 0;
    font: 700 16px/24px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
    color: #3F3AB8;
    background: #fff;
    border: 2px solid #C9C7F5;
    border-radius: 10px;
    padding: 8px 18px;
    cursor: pointer;
}
.ifl-secondary:hover { border-color: #544FF0; }

/* Barney's bands (docs/handover/intro-flow/splash-layout-guidance.pdf), with his v2 spacing
   (splash-layout-guidance-v2.pdf, measured at 1280 by 800): the headline centred on the page's
   23.5% line (was 25%), Get started on 50%, the illustration on 79.375% (was 75%), which at
   1280 by 800 is the headline 12 px higher and the illustration 35 px lower. The inline script
   in index.html sets --ifl-page, the art's scales, and --ifl-k, which runs from 0 at 1280 by 800
   to 1 at the after page's 1920 by 1288: the headline and strap x 1.155, the button x 1.59. */
.ifl-splash { position: relative; flex: 1 0 auto; height: var(--ifl-page, 100vh); }
.ifl-splash[hidden] { display: none; }
.ifl-top { position: relative; z-index: 1; }
.ifl-head {
    position: absolute; left: 16px; right: 16px; top: 23.5%;
    transform: translateY(-50%);
    text-align: center;
}
.ifl-h1 {
    margin: 0;
    font-weight: 600;
    font-size: calc(clamp(44px, 7.5vw, 96px) + 15px * var(--ifl-k, 0));
    line-height: 1;
    letter-spacing: -0.03em;
    text-wrap: balance;
}
.ifl-h1 span { color: #544FF0; }
/* Out of the flow, so the headline alone is what sits on the line */
.ifl-sub {
    position: absolute; left: 0; right: 0; top: 100%;
    margin: calc(22px + 4px * var(--ifl-k, 0)) 0 0;
    font-weight: 400;
    font-size: calc(clamp(18px, 2.03125vw, 26px) + 4px * var(--ifl-k, 0));
    line-height: 1.385;
    text-wrap: balance;
}
.ifl-cta {
    position: absolute; left: 16px; right: 16px; top: 50%;
    transform: translateY(-50%);
    text-align: center;
}
.ifl-primary {
    display: inline-block;
    margin: 0;
    vertical-align: top;
    font: 700 calc(20px + 11px * var(--ifl-k, 0)) / calc(24px + 13px * var(--ifl-k, 0)) 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
    color: #fff;
    background: #544FF0;
    border: 0;
    border-radius: calc(14px + 7px * var(--ifl-k, 0));
    padding: calc(20px + 12px * var(--ifl-k, 0)) calc(36px + 28px * var(--ifl-k, 0));
    box-shadow: 0 calc(6px + 3px * var(--ifl-k, 0)) 0 #3F3AB8;
    cursor: pointer;
}
.ifl-primary:hover { background: #4743D8; }

/* The illustration: the board's 1280 by 800 frame, of which only y 500 to 800 is drawn on */
.ifl-art-box {
    position: absolute; left: 0; right: 0; top: 79.375%;
    height: calc(300px * var(--ifl-art-scale, 1));
    transform: translateY(-50%);
    pointer-events: none;
}
.ifl-art {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 1280px;
    height: 800px;
    margin-left: -640px;
    transform: scale(var(--ifl-art-scale, 1));
    transform-origin: 50% 100%;
}

@media (max-width: 719px) {
    .ifl-top { padding: 0 16px; }
}

/* ── The splash's pictures, from the board (generated from Flow.dc.html) ─────
   Tiny type here is a picture of a card, aria-hidden, not text to read. */
.ifl-art .ifl-ob{position:absolute;box-sizing:border-box}
.ifl-art .ifl-paper{width:150px;height:196px;background:#fff;border-radius:6px;box-shadow:0 14px 30px rgba(26,26,46,.16);padding:14px 12px;display:flex;flex-direction:column;gap:6px;overflow:hidden}
.ifl-art .ifl-paper i{display:block;height:4px;border-radius:2px;background:#DAD8D0}
.ifl-art .ifl-paper i.ifl-t{height:7px;background:#1A1A2E}
.ifl-art .ifl-paper .ifl-ab{background:#F1F0EC;border-radius:3px;padding:6px;display:flex;flex-direction:column;gap:4px;margin:3px 0}
.ifl-art .ifl-paper .ifl-cols{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.ifl-art .ifl-paper .ifl-cols div{display:flex;flex-direction:column;gap:4px}
.ifl-art .ifl-paper:after{content:'';position:absolute;right:0;bottom:0;width:42px;height:42px;background:linear-gradient(135deg,#fff 0 48%,#E0DFFC 50% 100%);box-shadow:-4px -4px 10px rgba(26,26,46,.12);border-radius:6px 0 0 0}
.ifl-art .ifl-blk{background:#fff;border-radius:14px;padding:14px 16px;box-shadow:0 12px 28px rgba(26,26,46,.13)}
.ifl-art .ifl-blk .ifl-k{font:700 11px/14px 'Hanken Grotesk';letter-spacing:.08em;text-transform:uppercase;color:#544FF0}
.ifl-art .ifl-blk .ifl-n{font-family:'Saira';font-weight:524;color:#544FF0;line-height:1;letter-spacing:-0.03em}
.ifl-art .ifl-blk .ifl-u{font:700 14px/16px 'Hanken Grotesk';color:#544FF0;margin-left:5px}
.ifl-art .ifl-blk .ifl-w{font:400 13px/18px 'Hanken Grotesk';color:#1A1A2E;margin-top:6px}
.ifl-art .ifl-figs{display:grid;grid-template-columns:repeat(11,1fr);gap:3px;margin-top:10px}
.ifl-art .ifl-figs b{display:block;height:10px;border-radius:5px 5px 2px 2px;background:#544FF0}
.ifl-art .ifl-figs b.ifl-g{background:#BBBBC2}
.ifl-art .ifl-bp{width:150px;height:196px;background:#F4F3FE;border-radius:6px;padding:7px;display:flex;flex-direction:column;gap:4px;box-shadow:0 14px 30px rgba(26,26,46,.16);overflow:hidden}
.ifl-art .ifl-bp .ifl-bpt{background:#544FF0;border-radius:3px;padding:5px 6px;color:#fff}
.ifl-art .ifl-bp .ifl-bpt em{display:block;font:700 3px/4px 'Hanken Grotesk';letter-spacing:.08em;text-transform:uppercase;color:#E7FD7D;font-style:normal}
.ifl-art .ifl-bp .ifl-bpt b{display:block;font:600 6.5px/7.5px 'Saira';margin-top:2px}
.ifl-art .ifl-bp .ifl-bpr{display:flex;gap:4px}
.ifl-art .ifl-bp .ifl-bpb{flex:1;background:#fff;border-radius:3px;padding:4px 5px;min-width:0}
.ifl-art .ifl-bp .ifl-bpb em{display:block;font:700 3.2px/5px 'Hanken Grotesk';letter-spacing:.08em;text-transform:uppercase;color:#544FF0;font-style:normal}
.ifl-art .ifl-bp .ifl-bpb i{display:block;height:2px;border-radius:1px;background:#DAD8D0;margin-top:2px}
.ifl-art .ifl-bp .ifl-bn{font-family:'Saira';font-weight:524;font-size:11px;line-height:1;color:#544FF0;letter-spacing:-0.03em}
.ifl-art .ifl-bp .ifl-bn small{font-size:6px;font-weight:700;font-family:'Hanken Grotesk'}
.ifl-art .ifl-bp .ifl-bk{display:flex;gap:5px}
.ifl-art .ifl-bp .ifl-mf{display:grid;grid-template-columns:repeat(11,1fr);gap:1px;margin-top:2px}
.ifl-art .ifl-bp .ifl-mf b{display:block;height:3px;border-radius:1.5px 1.5px .5px .5px;background:#544FF0}
.ifl-art .ifl-bp .ifl-mf b.ifl-g{background:#BBBBC2}
.ifl-art .ifl-card{width:168px;height:210px;background:#544FF0;border-radius:8px;padding:12px;display:flex;flex-direction:column;box-shadow:0 14px 30px rgba(26,26,46,.2);color:#fff}
.ifl-art .ifl-card .ifl-ch{font:600 10.5px/13px 'Saira';letter-spacing:-0.01em}
.ifl-art .ifl-card .ifl-cb{background:#E7FD7D;margin:9px -12px 0;height:66px;display:flex;align-items:center;justify-content:flex-start;gap:12px;padding:0 12px}
.ifl-art .ifl-card .ifl-cn{display:inline-block;font-family:'Saira';font-weight:524;font-size:60px;line-height:1;color:#544FF0;letter-spacing:-0.03em}
.ifl-art .ifl-card .ifl-cn i{font-style:normal;font-weight:200;font-size:26px;vertical-align:top;margin-left:1px;line-height:1.2}
.ifl-art .ifl-card .ifl-cb.ifl-bars{flex-direction:column;align-items:stretch;justify-content:center;gap:6px}
.ifl-art .ifl-card .ifl-bar{display:flex;align-items:center;gap:8px}
.ifl-art .ifl-card .ifl-bar .ifl-cn{font-size:22px;width:30px;text-align:left}
.ifl-art .ifl-card .ifl-bar .ifl-tk{flex:1;height:14px;border-radius:3px;background:#FAFEE5}
.ifl-art .ifl-card .ifl-bar i{display:block;height:14px;border-radius:3px;background:#544FF0}
.ifl-art .ifl-card .ifl-cc{font:700 8.5px/11px 'Hanken Grotesk';margin-top:7px}
.ifl-art .ifl-card .ifl-cl{display:block;height:2.5px;border-radius:1px;background:rgba(255,255,255,.55);margin-top:3px}
.ifl-art .ifl-card .ifl-cr{height:3px;border-radius:2px;background:#E7FD7D;margin-top:6px}
.ifl-art .ifl-card .ifl-cf{margin-top:auto;display:flex;align-items:center;justify-content:space-between;font:700 6.5px/8px 'Hanken Grotesk'}
.ifl-art .ifl-card .ifl-cf span{width:44px;height:11px;border-radius:6px;border:1px solid #E7FD7D}
.ifl-art .ifl-card .ifl-cf b{display:flex;align-items:center;gap:3px}
.ifl-art .ifl-card .ifl-cf b .ifl-logo{display:block}

/* Once the app's styles are in (Back from step 2) they must not resize the pictures. */
.ifl-art * { box-sizing: content-box; }
.ifl-art .ifl-ob { box-sizing: border-box; }

/* A phone held upright (Barney's page 4): the paper, an arrow and the ring card, on a 360 by
   220 frame. Last, to beat the rules above. Held sideways the bands put the art below the fold.
   v2 spacing (measured at 392 by 852): the headline's lines 52 px apart at 60 px (were 60),
   centred on the 20.9% line (was 25%), the strap 22 px under it (was 14), the illustration on
   77.35% (was 75%, so 20 px lower). Get started stays on 50%. */
.ifl-art .ifl-phone-trail { display: none; }
@media (max-width: 719px) and (orientation: portrait) {
    .ifl-head { top: 20.9%; }
    .ifl-h1 { font-size: clamp(48px, 15.3vw, 60px); line-height: 0.867; }
    .ifl-h1 span { display: block; }
    .ifl-sub { margin-top: 22px; font-size: 18px; line-height: 25px; }
    .ifl-primary { display: block; width: 100%; }
    .ifl-art-box { top: 77.35%; height: calc(220px * var(--ifl-phone-scale, 1)); }
    .ifl-art {
        top: 0; bottom: auto;
        width: 360px; height: 220px; margin-left: -180px;
        transform: scale(var(--ifl-phone-scale, 1));
        transform-origin: 50% 0;
    }
    .ifl-art > :not(.ifl-keep) { display: none; }
    .ifl-art .ifl-phone-trail { display: block; left: 0; top: 0; }
    .ifl-art > .ifl-paper { left: 12px !important; top: 12px !important; transform: rotate(-9deg) scale(.85) !important; }
    .ifl-art > .ifl-arrow1 { left: 162px !important; top: 96px !important; }
    .ifl-art > .ifl-ringcard { left: 185px !important; top: 5px !important; transform: rotate(5deg) scale(.83) !important; }
}

/* ── The steps (screens 2 and 3). The app's styles are in by now, so everything
   here carries #introFlow; the side bar's own elements are restyled while inside. ── */
.ifl-steps[hidden] { display: none; }
#introFlow[data-view="steps"] { background: #FAFAF8; }
#introFlow [hidden] { display: none !important; }

#introFlow .ifl-steps { flex: 1 0 auto; box-sizing: border-box; padding: 28px 56px 40px; }
#introFlow .ifl-bar { display: flex; align-items: flex-start; gap: 20px; }
#introFlow .ifl-barlogo { display: block; flex: none; height: 40px; width: auto; margin: 2px 8px 0 0; color: #544FF0; }
#introFlow .ifl-back {
    flex: none; width: 48px; height: 48px; padding: 0; display: grid; place-items: center;
    color: #6B6B72; background: none; border: 0; border-radius: 12px; cursor: pointer;
}
#introFlow .ifl-back:hover { color: #1A1A2E; background: #F4F3FE; }
#introFlow .ifl-prog { flex: 1; min-width: 0; padding-top: 18px; }
#introFlow .ifl-segs { display: flex; gap: 8px; }
#introFlow .ifl-seg { flex: 1; height: 12px; border-radius: 6px; background: #E0DFFC; }
#introFlow .ifl-seg.on { background: #544FF0; }
#introFlow .ifl-keys { display: flex; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
#introFlow .ifl-key {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
    font: 400 16px/24px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; color: #6B6B72;
}
#introFlow .ifl-kn {
    flex: none; width: 24px; height: 24px; box-sizing: border-box; display: grid; place-items: center;
    border: 2px solid currentColor; border-radius: 12px; font: 600 14px/1 'Saira', sans-serif;
}
#introFlow .ifl-key--now { color: #544FF0; font-weight: 700; }
#introFlow .ifl-key--now .ifl-kn { color: #fff; background: #544FF0; border-color: #544FF0; }
#introFlow .ifl-key--done { color: #1A1A2E; }
#introFlow .ifl-key--done .ifl-kn { color: #1A1A2E; background: #E7FD7D; border-color: #E7FD7D; }

#introFlow .ifl-stepmid { margin-top: 42px; display: flex; flex-direction: column; align-items: center; text-align: center; }
#introFlow .ifl-stepmid > section { width: 100%; display: flex; flex-direction: column; align-items: center; }
:is(#introFlow, #iflReadingStep) .ifl-step-h1 {
    margin: 0; color: #1A1A2E; font: 600 56px/1.1 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: -0.02em; outline: none;
}
#introFlow .ifl-step-sub {
    max-width: 760px; margin: 14px 0 40px; color: #1A1A2E;
    font: 400 20px/30px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; text-wrap: balance;
}
#introFlow .ifl-step-sub--tiles { margin-bottom: 28px; }

/* Audience tiles */
#introFlow .ifl-tiles { display: flex; justify-content: center; gap: 32px; }
#introFlow .ifl-tile {
    position: relative; box-sizing: border-box; width: 264px; min-height: 280px; padding: 24px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    background: #fff; border: 2px solid #DAD8D0; border-bottom-width: 6px; border-radius: 24px;
    font-family: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; cursor: pointer;
}
#introFlow .ifl-tile:hover { border-color: #8E8E96; }
#introFlow .ifl-tile.on { background: #F4F3FE; border-color: #544FF0; }
#introFlow .ifl-tile:has(.ifl-radio:focus-visible) { outline: 3px solid #3F3AB8; outline-offset: 3px; }
#introFlow .ifl-radio { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
#introFlow .ifl-ti {
    width: 96px; height: 96px; margin-bottom: 22px; display: grid; place-items: center;
    color: #fff; background: #544FF0; border-radius: 24px;
}
#introFlow .ifl-tiles.picked .ifl-tile:not(.on) .ifl-ti { background: #DAD8D0; }
#introFlow .ifl-tn { color: #1A1A2E; font-weight: 600; font-size: 32px; line-height: 1.1; letter-spacing: -0.015em; }
#introFlow .ifl-tiles.picked .ifl-tile:not(.on) .ifl-tn { color: #6B6B72; }
#introFlow .ifl-ts { margin-top: 10px; color: #6B6B72; font-size: 16px; line-height: 22px; text-wrap: balance; }

#introFlow .ifl-opt {
    display: inline-flex; align-items: center; gap: 8px; margin: 30px 0 0; padding: 0;
    color: #3F3AB8; background: none; border: 0; border-radius: 6px; cursor: pointer;
    font: 600 20px/28px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
}
#introFlow .ifl-opt-o { color: #6B6B72; font-weight: 400; }
#introFlow .ifl-opt svg { transition: transform .15s; }
#introFlow .ifl-opt[aria-expanded="true"] svg { transform: rotate(180deg); }
#introFlow .ifl-complexity { width: 100%; max-width: 420px; margin-top: 14px; }
#introFlow .ifl-complexity .seg3 { height: 44px; }
#introFlow .ifl-complexity .seg3 button { font-size: 16px; }
@media (prefers-reduced-motion: reduce) { #introFlow .ifl-opt svg { transition: none; } }

:is(#introFlow, #iflReadingStep) .ifl-nextb {
    display: inline-flex; align-items: center; gap: 10px; margin: 34px 0 0; padding: 16px 28px;
    color: #fff; background: #544FF0; border: 0; border-radius: 12px; cursor: pointer;
    font: 700 19px/24px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
}
:is(#introFlow, #iflReadingStep) .ifl-nextb:hover { background: #4743D8; }
:is(#introFlow, #iflReadingStep) .ifl-nextb:disabled { color: #6B6B72; background: #E0DFFC; cursor: not-allowed; }

/* The paper: the side bar's DOI field, in the flow's clothes */
#introFlow #iflPick, #introFlow #iflChosen { width: 100%; max-width: 760px; display: flex; flex-direction: column; align-items: center; }
#introFlow .ifl-fetchslot, #introFlow .ifl-uploadslot { width: 100%; }
#introFlow .doi-input-wrap {
    box-sizing: border-box; width: 100%; min-height: 68px; display: flex; align-items: center; gap: 12px;
    margin: 0; padding: 8px 8px 8px 20px; background: #fff;
    border: 2px solid #8E8E96; border-radius: 16px; box-shadow: none;
}
#introFlow .doi-input-wrap::before {
    content: ''; flex: none; width: 24px; height: 24px;
    background: no-repeat center / 24px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6B72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
}
#introFlow .doi-input-wrap:focus-within { border-color: #544FF0; outline: 3px solid #3F3AB8; outline-offset: 3px; }
#introFlow #doiInput {
    flex: 1; min-width: 0; height: auto; padding: 8px 0; color: #1A1A2E; background: transparent; border: 0;
    outline: none; font: 400 19px/28px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
}
#introFlow #doiInput::placeholder { color: #6B6B72; opacity: 1; }
#introFlow #doiFetchBtn {
    flex: none; height: auto; padding: 12px 22px; color: #fff; background: #544FF0; border: 0; border-radius: 10px;
    font: 700 17px/24px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
}
#introFlow #doiFetchBtn:hover { background: #4743D8; }
#introFlow #doiFetchBtn:disabled { opacity: 1; color: #6B6B72; background: #E0DFFC; }
#introFlow #doiSearchResults { text-align: left; }
#introFlow .doi-status, #introFlow .upload-status {
    margin: 10px 0 0; font-family: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px; font-weight: 400; line-height: 24px; text-align: left; animation: none;
}
#introFlow .doi-status:empty { display: none; }
#introFlow .upload-status { padding: 0; background: none; border: 0; border-radius: 0; }

#introFlow .ifl-or {
    width: 100%; margin: 18px 0; display: flex; align-items: center; gap: 16px; color: #6B6B72;
    font: 700 14px/20px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; letter-spacing: .08em;
}
#introFlow .ifl-or::before, #introFlow .ifl-or::after { content: ''; flex: 1; height: 1px; background: #DAD8D0; }
#introFlow .ifl-drop {
    box-sizing: border-box; width: 100%; min-height: 150px; padding: 16px; display: flex; align-items: center; justify-content: center; gap: 24px;
    color: #1A1A2E; background: #F4F3FE; border: 2px dashed #544FF0; border-radius: 20px; box-shadow: none; cursor: pointer;
    font-family: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
}
#introFlow .ifl-drop:hover, #introFlow .ifl-drop.dragover { background: #E0DFFC; }
#introFlow .ifl-di {
    flex: none; width: 80px; height: 80px; display: grid; place-items: center;
    color: #fff; background: #544FF0; border-radius: 22px;
}
#introFlow .ifl-dtext { display: flex; flex-direction: column; text-align: left; }
#introFlow .ifl-dt { font-weight: 700; font-size: 24px; line-height: 32px; }
#introFlow .ifl-dl { font-weight: 400; font-size: 19px; line-height: 28px; }
#introFlow .ifl-lk { color: #3F3AB8; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

#introFlow .ifl-chip {
    box-sizing: border-box; max-width: 100%; display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 14px 8px 12px; color: #1A1A2E; background: #fff; border: 2px solid #544FF0; border-radius: 24px;
    font: 700 17px/24px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; text-align: left;
}
#introFlow .ifl-chip > svg { flex: none; }
#introFlow .ifl-chip-name { min-width: 0; overflow-wrap: anywhere; }
#introFlow .ifl-chip-size { flex: none; color: #6B6B72; font-weight: 400; white-space: nowrap; }
#introFlow .ifl-chip-rm {
    flex: none; width: 24px; height: 24px; margin: 0 0 0 4px; padding: 0; display: grid; place-items: center;
    color: #3F3AB8; background: #E0DFFC; border: 0; border-radius: 12px; cursor: pointer;
    font: 700 18px/1 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
}
/* The confirmation sentence (Session 14b phase 3): under the paper field, #6B6B72 on white 5.3:1 */
#introFlow .ifl-rights { margin: 16px 0 0; color: #6B6B72; font: 400 15px/22px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; }
#introFlow .ifl-ex { margin: 22px 0 0; color: #1A1A2E; font: 400 17px/24px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; }
#introFlow .ifl-linkbtn { margin: 0; padding: 0; background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; }

/* Reading (screen 4: one chip, two stages). Scoped to the step itself, not the flow, since
   Session 13c: the editor borrows it for its runs (features/readingScreen.js, the content area's
   #readingHost), so it looks the same in both places. */
#iflReadingStep { width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }
#iflReadingStep[hidden], #iflReadingStep [hidden] { display: none !important; }
#iflReadingStep :focus-visible { outline: 3px solid #3F3AB8; outline-offset: 3px; }
#iflReadingStep .ifl-file {
    box-sizing: border-box; max-width: min(760px, 100%); margin: 16px 0 40px; display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 18px 8px 12px; color: #1A1A2E; background: #fff; border: 2px solid #DAD8D0; border-radius: 24px;
    font: 700 17px/24px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; text-align: left;
}
#iflReadingStep .ifl-file > svg { flex: none; }
#iflReadingStep .ifl-file-name { min-width: 0; overflow-wrap: anywhere; }
#iflReadingStep .ifl-file-size { flex: none; color: #6B6B72; font-weight: 400; white-space: nowrap; }
#iflReadingStep .ifl-stages { width: 100%; max-width: 760px; margin: 0; padding: 0; list-style: none; text-align: left; }
#iflReadingStep .ifl-stg {
    display: flex; align-items: center; gap: 18px; padding: 18px 0; border-top: 1px solid #DAD8D0;
    color: #6B6B72; font: 400 20px/28px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
}
#iflReadingStep .ifl-stg:last-child { border-bottom: 1px solid #DAD8D0; }
#iflReadingStep .ifl-si {
    flex: none; width: 32px; height: 32px; box-sizing: border-box; display: grid; place-items: center;
    border: 2px solid #8E8E96; border-radius: 16px;
}
#iflReadingStep .ifl-stg.done { color: #1A1A2E; }
#iflReadingStep .ifl-stg.done .ifl-si { color: #1A1A2E; background: #E7FD7D; border-color: #E7FD7D; }
#iflReadingStep .ifl-stg.now { color: #544FF0; font-weight: 700; }
#iflReadingStep .ifl-stg.now .ifl-si { border-color: #544FF0; border-top-color: #E0DFFC; animation: ifl-spin 1s linear infinite; }
@keyframes ifl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #iflReadingStep .ifl-stg.now .ifl-si { animation: none; } }
/* A2 (Session 16a, Barney's Building the blocks): the bar under the steps, 6 px, no words */
#iflReadingStep .ifl-pbar { box-sizing: border-box; width: calc(100% - 8px); max-width: 752px; height: 6px; margin: 20px 4px 0; border-radius: 3px; background: #E2E1EA; overflow: hidden; }
#iflReadingStep .ifl-pbar[hidden] { display: none; }
#iflReadingStep .ifl-pbar i { display: block; height: 100%; width: 0; border-radius: 3px; background: #544FF0; transition: width .2s linear; }
@media (prefers-reduced-motion: reduce) { #iflReadingStep .ifl-pbar i { transition: none; } }
#iflReadingStep .ifl-wait { margin: 32px 0 0; color: #6B6B72; font: 400 16px/24px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; }
#iflReadingStep .ifl-readerr { width: 100%; max-width: 760px; margin-top: 24px; text-align: left; }
#iflReadingStep .ifl-readerr p { margin: 0; color: #C0392B; font: 400 16px/24px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; }
#iflReadingStep .ifl-readerr-acts { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#iflReadingStep .ifl-readerr-acts .ifl-nextb { margin: 0; }
/* The flow dissolving over the editor it hands to */
html:not([data-intro]) #introFlow.ifl-dissolve { display: flex; opacity: 0; transition: opacity .3s ease; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { html:not([data-intro]) #introFlow.ifl-dissolve { display: none; } }

@media (max-width: 899px) {
    #introFlow .ifl-tiles { flex-direction: column; align-items: stretch; width: 100%; max-width: 480px; gap: 12px; }
    #introFlow .ifl-tile { width: 100%; min-height: 0; padding: 14px 16px; display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; text-align: left; }
    #introFlow .ifl-ti { grid-row: 1 / span 2; width: 56px; height: 56px; margin: 0; border-radius: 14px; }
    #introFlow .ifl-ti svg { width: 30px; height: 30px; }
    #introFlow .ifl-tn { font-size: 22px; }
    #introFlow .ifl-ts { margin-top: 2px; }
}
@media (max-width: 719px) {
    #introFlow .ifl-steps { padding: 16px 16px 32px; }
    #introFlow .ifl-bar { flex-wrap: wrap; gap: 8px; }
    #introFlow .ifl-barlogo { margin-right: auto; }
    #introFlow .ifl-prog { flex: 1 0 100%; padding-top: 4px; }
    #introFlow .ifl-stepmid { margin-top: 24px; }
    :is(#introFlow, #iflReadingStep) .ifl-step-h1 { font-size: 40px; }
    #introFlow .ifl-step-sub { font-size: 18px; line-height: 27px; margin-bottom: 24px; }
    :is(#introFlow, #iflReadingStep) .ifl-nextb { width: 100%; justify-content: center; }
    #iflReadingStep .ifl-stg { font-size: 18px; line-height: 26px; gap: 14px; }
    #introFlow .doi-input-wrap { flex-wrap: wrap; padding: 8px 8px 8px 16px; }
    #introFlow #doiInput { flex: 1 1 60%; }
    #introFlow #doiFetchBtn { flex: 1 0 100%; }
    #introFlow .ifl-drop { gap: 14px; }
    #introFlow .ifl-di { width: 56px; height: 56px; border-radius: 16px; }
    #introFlow .ifl-di svg { width: 30px; height: 30px; }
    #introFlow .ifl-dt { font-size: 20px; line-height: 28px; }
    #introFlow .ifl-dl { font-size: 16px; line-height: 24px; }
}

/* The example's banner, at the top of the editor (Session 13) */
.ex-banner {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 6px 16px;
    background: #F4F3FE;
    border-bottom: 1px solid #E0DFFC;
    color: #1A1A2E;
    font: 400 14px/20px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
}
.ex-banner[hidden] { display: none; }
.ex-banner p { margin: 0; }
.ex-banner button {
    min-height: 32px;
    padding: 4px 12px;
    color: #3F3AB8;
    background: #fff;
    border: 2px solid #C9C7F5;
    border-radius: 8px;
    font: 700 14px/20px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
    cursor: pointer;
}
.ex-banner button:hover { border-color: #544FF0; }
.ex-banner button:focus-visible { outline: 3px solid #3F3AB8; outline-offset: 2px; }

/* ── The example (Session 13b, docs/handover/try-an-example/) ─────────────────
   Measured from Flow-example.dc.html. <html data-example> while the example is open; the band
   is a body child above the flow and the shell, so it stays on screen 1, the replay and the
   editor. With the flow up the body becomes a column: the band, then the flow below it. */
.exb { display: none; }
html[data-example] .exb {
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    min-height: 48px;
    padding: 0 14px 0 20px;
    background: #1A1A2E;
    color: #fff;
    font: 400 14px/20px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
    position: relative;
    z-index: 9001;
}
html[data-example][data-intro] body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
html[data-example][data-intro] #introFlow { position: relative; inset: auto; flex: 1 1 auto; min-height: 0; }
.exb-t { margin: 0; flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.exb-t b { font-weight: 700; }
.exb-dot { color: rgba(255, 255, 255, .6); margin: 0 -2px; }
.exb-acts { display: flex; gap: 12px; flex: none; }
.exb-leave,
.exb-use {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    border: 0;
    border-radius: 6px;
    font: 700 12px/16px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}
.exb-leave { color: #fff; background: transparent; padding: 8px 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
.exb-leave:hover { box-shadow: inset 0 0 0 1px #fff; }
.exb-use { color: #1A1A2E; background: #E7FD7D; padding: 9px 14px 9px 16px; }
.exb-use:hover { background: #DDF55F; }
.exb-leave:focus-visible,
.exb-use:focus-visible { outline: 3px solid #E7FD7D; outline-offset: 2px; }
.exb-use:focus-visible { outline-color: #fff; }

/* Screen 1, "The paper first". Before the module runs, ?example shows it and not the splash. */
html[data-intro="example"] .ifl-splash { display: none; }
html[data-intro="example"] .ifl-pf[hidden] { display: flex; }
.ifl-pf { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 100%; background: #F3F4F9; }
.ifl-pf[hidden] { display: none; }
.ifl-pftop {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    height: 64px;
    padding: 0 14px 0 12px;
    background: linear-gradient(#FFFFFF, #F7F8FB);
    border-bottom: 1px solid rgba(26, 26, 46, .10);
}
.ifl-pflogo { display: block; height: 32px; width: auto; color: #544FF0; }
.ifl-pfb {
    flex: 1 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
    gap: 48px;
    align-items: center;
    padding: 24px 88px 24px 72px;
}
.ifl-pfpage { margin: 0; justify-self: center; width: min(500px, calc((100dvh - 48px - 64px - 96px) * 0.761)); min-width: min(260px, 100%); max-width: 100%; }
/* The real first page, its bottom corner peeled back to the lime underneath */
.ifl-pfw { position: relative; filter: drop-shadow(0 1px 1px rgba(26, 26, 46, .08)) drop-shadow(0 16px 32px rgba(26, 26, 46, .14)); }
.ifl-pfw img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 72px), calc(100% - 72px) 100%, 0 100%);
}
.ifl-pfunder,
.ifl-pfflap { position: absolute; right: 0; bottom: 0; width: 72px; height: 72px; }
.ifl-pfunder { background: #E7FD7D; }
.ifl-pfflap { background: linear-gradient(to bottom right, #FFFFFF 0%, #E4E5EC 50%, transparent 50%); filter: drop-shadow(-2px -2px 3px rgba(26, 26, 46, .14)); }
/* The attribution the CC BY licence asks for: part of the screen, not optional */
.ifl-pfcite { margin: 12px 0 0; font: 400 12px/17px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; color: #6B6B72; }
.ifl-pfq { display: flex; flex-direction: column; align-items: flex-start; max-width: 500px; }
.ifl-pfk { margin: 0 0 14px; font: 700 12px/16px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #544FF0; }
.ifl-pfh { margin: 0 0 12px; font: 600 46px/1.08 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; letter-spacing: -0.02em; color: #1A1A2E; }
.ifl-pfh:focus { outline: none; }
.ifl-pfm { margin: 0 0 22px; font: 400 15px/22px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; color: #6B6B72; }
.ifl-pfp { margin: 0 0 30px; font: 400 18px/28px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; color: #1A1A2E; }
.ifl-pfgo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    border: 0;
    border-radius: 6px;
    padding: 15px 22px 15px 24px;
    background: #544FF0;
    box-shadow: 0 1px 2px rgba(84, 79, 240, .3);
    color: #fff;
    font: 700 13px/16px 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}
.ifl-pfgo:hover { background: #4743D8; }

/* The replay: four seconds, so the wait line has nothing to say */
#introFlow[data-replay] #iflWait { display: none; }

/* Between the phone layout and 1100: two equal columns, so the page keeps its column and never
   runs under the words (Session 13c; the words' 540 px column left the page about 20 at 768) */
@media (min-width: 720px) and (max-width: 1099px) {
    .ifl-pfb { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 24px 32px; }
    .ifl-pfh { font-size: 38px; }
}

/* Phone width: the band in two rows, the page above the words, Peel it back full width */
@media (max-width: 719px) {
    html[data-example] .exb { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px 12px; }
    .exb-t { flex: 1 0 100%; }
    .exb-acts { flex: 1 0 100%; }
    .exb-leave, .exb-use { flex: 1 1 0; justify-content: center; min-height: 44px; }
    .ifl-pftop { padding: 0 8px 0 16px; }
    .ifl-pfb { grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; padding: 24px 16px 32px; }
    .ifl-pfpage { width: min(100%, 360px); min-width: 0; }
    .ifl-pfunder, .ifl-pfflap { width: 48px; height: 48px; }
    .ifl-pfw img { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 48px), calc(100% - 48px) 100%, 0 100%); }
    .ifl-pfq { max-width: none; }
    .ifl-pfh { font-size: 34px; }
    .ifl-pfp { font-size: 17px; line-height: 26px; margin-bottom: 24px; }
    .ifl-pfgo { align-self: stretch; }
}
