html,body{height:100%;margin:0;background:#05060a}
*{box-sizing:border-box}
[hidden]{display:none!important}

@keyframes qf-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes afblink{0%,70%,100%{opacity:.25;transform:translateY(0)}35%{opacity:1;transform:translateY(-2px)}}

.qf-app{position:relative;height:100vh;height:100dvh;display:flex;flex-direction:column;background:#05060a;overflow:hidden;font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;padding-top:env(safe-area-inset-top)}
.qf-sky{position:fixed;inset:0;z-index:0;
  background:
    linear-gradient(180deg, rgba(5,6,10,0.35), rgba(5,6,10,0.55)),
    url('assets/qf-bg.webp') center/cover no-repeat #05060a;}

/* Expand / collapse motion (2026-10-06): one slow, shared timing so the banner, the card padding and the card width all move as ONE gesture.
   The banner collapses with the grid-rows trick (0fr <-> 1fr animates to its REAL height, unlike max-height: 2200px which made the start lag), fading and drifting up. */
.qf-app{--qf-dur:1s;--qf-ease:cubic-bezier(.5,0,.15,1)}
.qf-banner-wrap{position:relative;z-index:2;width:100%;display:grid;grid-template-rows:1fr;justify-items:center;margin-top:0;pointer-events:auto;
  transition:grid-template-rows var(--qf-dur) var(--qf-ease),margin-top var(--qf-dur) var(--qf-ease)}
.qf-banner-wrap > picture{display:block;width:100%;max-width:720px;min-height:0;overflow:hidden;
  opacity:1;transform:translateY(0) scale(1);transform-origin:50% 0;transition:opacity .75s ease .2s,transform var(--qf-dur) var(--qf-ease)}
.qf-banner-wrap.qf-expanded{grid-template-rows:0fr;margin-top:-24px;pointer-events:none}
.qf-banner-wrap.qf-expanded > picture{opacity:0;transform:translateY(-14px) scale(.97);transition:opacity .5s ease,transform var(--qf-dur) var(--qf-ease)}
.qf-banner-wrap img{width:100%;max-width:720px;height:auto;display:block;-webkit-mask-image:linear-gradient(180deg,#000 76%,transparent 100%);mask-image:linear-gradient(180deg,#000 76%,transparent 100%);filter:drop-shadow(0 8px 26px rgba(0,0,0,0.55))}

.qf-chat-pad{position:relative;z-index:2;flex:1;min-height:0;display:flex;justify-content:center;padding:8px 16px calc(10px + env(safe-area-inset-bottom));padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));transition:padding var(--qf-dur) var(--qf-ease)}
.qf-chat-pad.qf-expanded{padding-top:58px;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
.qf-chat-col{width:100%;max-width:760px;display:flex;flex-direction:column;min-height:0;transition:max-width var(--qf-dur) var(--qf-ease)}
.qf-chat-pad.qf-expanded .qf-chat-col{max-width:936px}
.qf-chat-card{flex:1;min-height:0;position:relative;border-radius:22px;overflow:hidden;border:1px solid rgba(200,44,42,0.55);background:#0c0f14;box-shadow:0 44px 110px rgba(0,0,0,0.82),0 12px 40px rgba(0,0,0,0.6),0 0 0 1px rgba(152,2,1,0.35),0 0 22px 2px rgba(200,44,42,0.55),0 0 70px 6px rgba(152,2,1,0.42),0 0 130px 20px rgba(152,2,1,0.28),inset 0 1px 0 rgba(255,255,255,0.08);animation:qf-float 9s ease-in-out infinite}

.qf-expand-btn{position:absolute;top:12px;right:12px;z-index:5;width:32px;height:32px;border-radius:9px;border:1px solid rgba(255,255,255,0.14);background:rgba(12,15,20,0.72);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);color:rgba(232,234,239,0.72);display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:border-color .15s,color .15s,background .15s}
.qf-expand-btn:hover{border-color:rgba(200,44,42,0.75);color:#e8eaef;background:rgba(20,12,14,0.8)}
.qf-expand-btn svg{position:absolute;inset:0;margin:auto;width:16px;height:16px;transition:opacity .45s ease,transform .9s var(--qf-ease)}
.qf-expand-btn #expandIconOpen{opacity:1;transform:rotate(0) scale(1)}
.qf-expand-btn #expandIconClose{opacity:0;transform:rotate(-90deg) scale(.6)}
.qf-expand-btn.is-expanded #expandIconOpen{opacity:0;transform:rotate(90deg) scale(.6)}
.qf-expand-btn.is-expanded #expandIconClose{opacity:1;transform:rotate(0) scale(1)}

/* ONE footnote line at the bottom of the page: "Unofficial fan project, built for the Franklies.  Built by DahmsI/O · Account · Terms · Privacy", all in the smaller font of the first sentence */
.qf-foot{margin-top:29px;text-align:center;font-size:11.5px;line-height:1.5;letter-spacing:.3px;text-wrap:balance;text-shadow:0 1px 8px rgba(5,6,10,.95),0 0 2px rgba(5,6,10,.9)}
.qf-disclaimer{color:rgba(232,234,239,.7)}
.qf-credit{color:rgba(232,234,239,.55);margin-left:8px}
.qf-credit a,.qf-linkbtn{color:rgba(200,44,42,.82);text-decoration:none;border-bottom:1px solid rgba(152,2,1,.5)}
.qf-linkbtn{background:none;border-top:0;border-left:0;border-right:0;padding:0;font:inherit;letter-spacing:inherit;cursor:pointer}

/* ---- FrankieChat (minimal variant, accent #980201) ---- */
.af-app{--bg:#0c0f14;--surface:#161b22;--surface2:#1e242d;--border:rgba(255,255,255,0.09);--text:#e8eaef;--dim:rgba(232,234,239,0.55);--dim2:rgba(232,234,239,0.36);--accent:#980201;--accent-hi:#c82c2a;--sys:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;--grotesk:'Space Grotesk',system-ui,sans-serif;
  position:relative;display:flex;flex-direction:column;height:100%;background:var(--bg);color:var(--text);font-family:var(--sys);-webkit-font-smoothing:antialiased;overflow:hidden}
.af-header{display:flex;align-items:flex-start;gap:12px;padding:12px 18px 14px;padding-right:58px;border-bottom:1px solid var(--border);flex:0 0 auto}
.af-logo{flex:0 0 auto;width:34px;height:34px;border-radius:10px;object-fit:cover;display:block;border:1px solid var(--border)}
.af-headtext{display:flex;flex-direction:column;min-width:0;flex:1}
.af-wordmark{font-family:var(--grotesk);font-size:17px;font-weight:600;color:var(--text);letter-spacing:-0.2px;line-height:1.1}
.af-newchat{flex:0 0 auto;background:transparent;border:1px solid var(--border);color:var(--dim);font:500 12.5px var(--sys);padding:7px 11px;border-radius:9px;cursor:pointer;min-height:32px;transition:border-color .15s,color .15s}
.af-newchat:hover{border-color:var(--accent-hi);color:var(--text)}

.af-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:20px 16px 10px}
.af-scroll::-webkit-scrollbar{width:8px}
.af-scroll::-webkit-scrollbar-track{background:transparent}
.af-scroll::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.12);border-radius:8px}
.af-thread{max-width:760px;margin:0 auto;display:flex;flex-direction:column;gap:18px;transition:max-width var(--qf-dur) var(--qf-ease)}
.qf-chat-pad.qf-expanded .af-thread{max-width:936px}

.af-row{display:flex;gap:13px;align-items:flex-start}
.af-row.af-user{justify-content:flex-end}
.af-col{display:flex;flex-direction:column;gap:11px;max-width:90%;min-width:0}
.af-row.af-user .af-col{max-width:82%;align-items:flex-end;gap:8px}
.af-dot{flex:0 0 auto;width:8px;height:8px;border-radius:50%;background:var(--accent);margin-top:9px}
.af-bubble-bot{color:var(--text);font-size:15.5px;line-height:1.75;overflow-wrap:anywhere}
.af-bubble-bot p{margin:0 0 .85em}
.af-bubble-bot p:last-child{margin-bottom:0}
.af-bubble-bot ul,.af-bubble-bot ol{margin:0 0 .85em;padding-left:1.3em}
.af-bubble-bot li{margin:.2em 0}
.af-bubble-bot a{color:var(--accent-hi);text-decoration:underline;text-underline-offset:2px}
.af-bubble-bot code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em;background:var(--surface);padding:1px 5px;border-radius:5px}
.af-bubble-user{background:rgba(255,255,255,0.05);color:var(--text);border-radius:12px;padding:9px 13px;font-size:14.5px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}


.af-note{font-size:13.5px;line-height:1.5;color:var(--dim);border-left:2px solid var(--accent);padding:2px 0 2px 10px}
.af-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}   /* [Sources] [Copy] [Try again] on ONE row */
.af-act{background:transparent;border:1px solid var(--border);color:var(--dim);font:500 12px var(--sys);padding:6px 11px;border-radius:999px;cursor:pointer;min-height:30px;transition:border-color .15s,color .15s}
.af-act:hover{border-color:var(--accent-hi);color:var(--text)}
.af-more{border-color:rgba(200,44,42,.55);color:var(--text)}

/* sources under an answer */
.af-src-toggle{display:inline-flex;align-items:center;gap:6px;background:transparent;border:1px solid var(--border);color:var(--dim);font:500 12px var(--sys);padding:6px 11px;border-radius:999px;cursor:pointer;min-height:30px}
.af-src-toggle:hover{border-color:var(--accent-hi);color:var(--text)}
.af-src-toggle .af-caret{display:inline-block;transition:transform .15s;font-size:9px;color:var(--accent-hi)}
.af-src-toggle[aria-expanded="true"] .af-caret{transform:rotate(90deg)}
.af-srclist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.af-src{display:flex;gap:10px;align-items:flex-start;padding:10px 11px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.af-src-body{min-width:0;display:flex;flex-direction:column;gap:3px}
.af-src-title{font-size:13.5px;font-weight:600;line-height:1.35;color:var(--text);overflow-wrap:anywhere}
.af-src-meta{font-size:12px;color:var(--dim)}
.af-src-kind{color:var(--accent-hi)}
.af-src-snippet{font-size:12.5px;line-height:1.5;color:var(--dim);overflow-wrap:anywhere}
.af-src-link{align-self:flex-start;margin-top:3px;font-size:12px;color:var(--accent-hi);text-decoration:none;border-bottom:1px solid rgba(152,2,1,.5)}

/* ALL suggested-question pills (welcome starters, "Keep exploring", "Or choose your own adventure") are .af-chip inside .af-chips: ONE definition, nothing overrides it */
.af-chips{display:flex;flex-direction:column;gap:7px;margin-top:4px;align-items:flex-start}
.af-chip{background:var(--surface);border:1px solid var(--border);color:var(--text);font-family:var(--sys);font-size:11.5px;font-weight:400;line-height:1.35;letter-spacing:0;text-align:left;padding:5px 11px;border-radius:10px;cursor:pointer;min-height:28px;transition:border-color .15s,background .15s;max-width:100%}
.af-chip:hover{border-color:var(--accent);background:var(--surface2)}

.af-think{display:inline-flex;gap:5px;align-items:center;padding-top:4px}
.af-think span{width:6px;height:6px;border-radius:50%;background:var(--dim);display:inline-block;animation:afblink 1.3s infinite}
.af-think span:nth-child(2){animation-delay:.18s}
.af-think span:nth-child(3){animation-delay:.36s}

.af-footer{flex:0 0 auto;padding:12px 14px;padding-bottom:calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--border);background:var(--bg)}
.af-input-wrap{display:flex;align-items:flex-end;gap:8px;background:var(--surface);border:1px solid var(--border);border-radius:22px;padding:6px 6px 6px 16px;max-width:760px;margin:0 auto;transition:max-width var(--qf-dur) var(--qf-ease),border-color .15s}
.af-input-wrap:focus-within{border-color:rgba(200,44,42,.6)}
.qf-chat-pad.qf-expanded .af-input-wrap{max-width:936px}
.af-input-wrap textarea{flex:1;background:transparent;border:none;outline:none;color:var(--text);font-size:16px;font-family:var(--sys);resize:none;line-height:1.45;padding:9px 0;max-height:120px}
.af-input-wrap textarea::placeholder{color:rgba(233,237,235,0.38)}
.af-send{flex:0 0 auto;width:38px;height:38px;border-radius:50%;border:none;font-size:18px;font-weight:700;display:flex;align-items:center;justify-content:center;transition:all .15s;cursor:default;background:var(--surface2);color:var(--dim2)}
.af-send.af-send-active{cursor:pointer;background:var(--accent);color:#fff}
.af-send.af-send-stop{cursor:pointer;background:var(--accent);color:#fff;font-size:14px}

/* passcode gate */
.af-gate{position:absolute;inset:0;z-index:6;display:flex;align-items:center;justify-content:center;padding:14px;background:rgba(5,6,10,.96);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.af-gate-card{width:100%;max-width:320px;display:flex;min-height:0;flex-direction:column;align-items:center;gap:10px;text-align:center}
.af-gate-logo{width:48px;height:48px;border-radius:14px}
.af-gate-text{margin:0 0 4px;font-size:14px;line-height:1.5;color:var(--dim)}
.af-gate-input{width:100%;background:var(--surface);border:1px solid var(--border);border-radius:12px;color:var(--text);font-size:16px;padding:12px 14px;outline:none;text-align:center}
.af-gate-input:focus{border-color:rgba(200,44,42,.7)}
.af-gate-error{margin:0;font-size:13px;color:#ff8b89}
.af-gate-btn{width:100%;background:var(--accent);color:#fff;border:none;border-radius:12px;font:600 14.5px var(--sys);padding:12px;cursor:pointer;min-height:44px}
.af-gate-btn:hover{background:var(--accent-hi)}

/* sign-in, account and allowance (Stage 5b) */
.af-account{max-width:360px;max-height:100%;padding:4px 2px;overflow-y:auto}
.af-signin{max-width:380px;max-height:100%;overflow:hidden;align-items:stretch;gap:10px;text-align:left}
.af-signin-head{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
.af-signin-title{margin:2px 0 0;font:600 17px var(--grotesk);letter-spacing:-.1px;color:var(--text)}
.af-note-wrap{position:relative;flex:1 1 auto;min-height:0;max-height:50vh;max-height:50dvh;display:flex;flex-direction:column}
.af-note-wrap.af-more-below::after{content:'';position:absolute;left:1px;right:1px;bottom:1px;height:30px;border-radius:0 0 12px 12px;background:linear-gradient(rgba(22,27,34,0),var(--surface) 85%);pointer-events:none}
.af-signin-foot{flex:0 0 auto;display:flex;flex-direction:column;gap:8px;text-align:center}
.af-gate-form{width:100%;display:flex;flex-direction:column;gap:10px}
.af-note-box{width:100%;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;text-align:left;font-size:13px;line-height:1.55;color:var(--dim);padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.af-note-box:empty{display:none}
.af-note-box p{margin:0 0 8px}
.af-note-box p:last-child{margin-bottom:0}
.af-note-box b{color:var(--text)}
.af-code-input{letter-spacing:.35em;font-variant-numeric:tabular-nums}
.af-gate-links{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:13px}
.af-gate-legal{margin:0;font-size:12px;line-height:1.5;color:var(--dim2)}
.af-gate-legal a{color:var(--accent-hi)}
.af-gate-btn:disabled{opacity:.5;cursor:default}
.af-gate-btn-quiet{background:transparent;border:1px solid var(--border);color:var(--dim)}
.af-gate-btn-quiet:hover{background:transparent;border-color:var(--accent-hi);color:var(--text)}
/* the questions counter sits BELOW the input field */
.af-budget{text-align:center;font-size:12px;line-height:1.35;color:var(--dim);margin-top:8px}
.af-limit{max-width:760px;margin:0 auto 10px;padding:10px 14px;border:1px solid var(--border);border-left:2px solid var(--accent);border-radius:12px;background:var(--surface);display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.af-limit-text,.af-limit-thanks{margin:0;font-size:13.5px;line-height:1.5;color:var(--text);flex:1 1 220px}
.af-limit-thanks{color:var(--dim)}

button:focus-visible,a:focus-visible,textarea:focus-visible,input:focus-visible{outline:2px solid var(--accent-hi,#c82c2a);outline-offset:2px}

/* phones */
@media (max-width:640px){
  .qf-chat-pad{padding:6px 10px calc(8px + env(safe-area-inset-bottom));padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
  .qf-chat-pad.qf-expanded{padding-top:10px}
  .qf-banner-wrap.qf-expanded{margin-top:0}   /* the desktop -24px pulled the expanded card 14px ABOVE the screen on phones */
  .qf-chat-card{border-radius:18px}
  .qf-expand-btn{display:none}
  .af-header{padding:12px 14px}
    .af-scroll{padding:16px 12px 8px}
  .af-col{max-width:100%}
  .af-row{gap:10px}
  .af-bubble-bot{font-size:15px;line-height:1.7}
  .qf-foot{margin-top:24px;font-size:10.5px}
  .qf-credit{margin-left:0}
}
@media (max-height:520px){ .qf-banner-wrap{display:none} }
@media (prefers-reduced-motion:reduce){ .qf-chat-card{animation:none} *{transition:none!important} }

/* Stage 5b: notify and account toggle, short screens */
.af-input-wrap textarea::placeholder{font-size:14px}   /* "Ask anything about the show..." must stay on ONE line on a 320px phone (the field itself stays 16px so iOS does not zoom) */
.af-headtext{padding-top:6px}                                                        /* centres "AskFrankie" against the 34px logo now that the header is top-aligned */
.qf-app.af-kb .af-latest-replay{white-space:normal}
.af-latest-replay-label{color:var(--dim)}
.af-latest-link{color:var(--accent-hi);text-decoration:none;border-bottom:1px solid rgba(152,2,1,.5)}
.af-latest-link:hover{color:var(--text);border-bottom-color:var(--accent-hi)}
@media (max-width:380px){ .af-actions{gap:5px} .af-actions .af-act,.af-actions .af-src-toggle{padding:6px 9px} }   /* [Sources] [Copy] [Tell me more] stay on ONE row on a 320px phone */
.af-follow{display:flex;flex-direction:column;gap:14px;margin-top:12px}
.af-follow-group{display:flex;flex-direction:column;gap:6px;min-width:0}
.af-follow-label{font-size:12px;color:var(--dim2);margin-top:2px}   /* one group, left-aligned: "Choose a new adventure…" */
.af-latest{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 4px;min-width:0;max-width:100%;font-size:12px;line-height:1.4;color:var(--dim)}
.af-latest-head{margin-top:2px}
.af-latest-label{flex:0 0 auto}
.af-latest-title{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.af-latest-sep{display:none}   /* the date is on its own row (row 1 = label + title, so the title gets all the room) */
.af-latest-meta{flex:0 0 100%;white-space:normal}
@media (max-width:640px){
  /* phones: row 1 = label + title (ellipsis), row 2 = date and "Updated daily" */
  /* phones: the header text block dissolves so the "Latest in the archive" line can use the FULL header width on its own row(s): row 1 label + title (ellipsis), row 2 date + "Updated daily" */
  .af-header{flex-wrap:wrap;row-gap:6px;align-items:center}
  .af-headtext{display:contents}
  .af-header .af-logo{order:1}
  .af-header .af-wordmark{order:2;flex:1 1 0;min-width:0}      /* scoped to the chat header: the sign-in card has its own .af-wordmark/.af-logo */
  .af-newchat{order:3}
  .af-latest-head{order:4;flex:0 0 100%;margin-top:0}
  .af-budget{font-size:11px;text-wrap:balance}
}
.qf-noanim,.qf-noanim *{transition:none!important}
.qf-app.af-kb .qf-foot{display:none}   /* keyboard open: the whole visible area belongs to the card */
.qf-app.af-kb .qf-chat-pad{padding:6px 10px}
.qf-app.af-kb{padding-top:0}
.qf-app.af-kb .af-signin{height:auto}   /* keyboard up: the card is as tall as its content, centred in what is visible */
.qf-app.af-gate-open .qf-chat-card{animation:none}   /* the card's slow 6px float must not move the sign-in under the reader's thumb */
@media (max-width:700px){ .qf-chat-card{animation:none} }
.af-signin.af-pending{visibility:hidden}
.af-signin .af-gate-error[hidden]{display:block!important;visibility:hidden}   /* the error line keeps its space: the form must not jump when a message appears */
.af-signin .af-gate-error{min-height:18px;line-height:1.35}
@media (max-width:700px){
  .af-gate{background:#0c0f14}              /* opaque on phones: the chat header and chips must not show through the full-screen card */
  .af-signin{height:100%}                 /* a stable full-height card: the note takes the free space, the footer stays pinned at the bottom */
  .af-signin.af-step-code{height:auto}
  .af-note-wrap{max-height:none}
}
.af-notify{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.af-notify-sub{margin:0;font-size:12px;line-height:1.45;color:var(--dim)}
.af-toggle-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:14px;color:var(--text);text-align:left}
@media (max-height:700px){ .af-gate{padding:12px} .af-gate-logo{display:none} .af-gate-card{gap:8px} }
.af-gate.af-nonote .af-note-wrap{display:none}
.af-gate.af-compact .af-wordmark,.af-gate.af-compact .af-gate-logo{display:none}
.af-gate.af-compact .af-signin-foot{gap:6px}
@media (max-width:380px){ .af-latest{font-size:11px} }   /* "Mon Oct 5, 2026 - Replay: Pilled · YouTube · Twitch" stays on one line on a 320px phone */
