/* Réviser › Histoire — l'histoire du jour, lue ou écoutée comme un podcast (js/pages/story.js) */
.rv-surface[data-mode="story"], .rv-modes [data-rsub="story"] { --gm-c: var(--das); --gm-c-soft: color-mix(in srgb, var(--das) 14%, var(--surface)); }
#rv-story .rv-surface { gap: 0; }
.st-card { display: flex; flex-direction: column; gap: 12px; }
.st-kicker { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-h { margin: 0; font-family: var(--f-display); font-size: 26px; }
.st-intro { margin: 0; color: var(--muted); line-height: 1.55; }
.st-empty .btn { align-self: flex-start; }
.st-err { margin: 0; color: var(--again); }
.st-title { margin: 0; font-family: var(--f-display); font-size: 28px; line-height: 1.2; }
.st-title-tr { margin: -6px 0 0; color: var(--muted); font-style: italic; }

/* the player */
.st-player { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--gm-c-soft); border: 1px solid color-mix(in srgb, var(--gm-c) 30%, var(--line)); }
.st-play { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--gm-c); color: var(--surface); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 12px color-mix(in srgb, var(--gm-c) 35%, transparent); }
.st-play:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.st-pl-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.st-pl-t { font-weight: 600; font-size: 14px; }
.st-pl-t small { font-weight: 400; color: var(--muted); }
.st-bar { display: block; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--gm-c) 18%, var(--surface)); overflow: hidden; cursor: pointer; }
.st-bar i { display: block; height: 100%; width: 0; background: var(--gm-c); border-radius: 3px; transition: width .25s linear; }
.st-rate { flex: none; min-width: 46px; height: 32px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 13px var(--f-mono); cursor: pointer; }

.st-trtoggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; align-self: flex-start; }

/* the text */
.st-text { font-family: var(--f-display); font-size: 19px; line-height: 1.75; }
.st-s { border-radius: 6px; transition: background .2s; padding: 1px 0; }
.st-s.reading { background: color-mix(in srgb, var(--gm-c) 16%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gm-c) 16%, transparent); }
.st-text.with-tr .st-s { display: block; margin-bottom: 14px; }
.st-tr { display: block; font-family: var(--f-body); font-size: 14.5px; line-height: 1.5; color: var(--muted); margin-top: 2px; }
.st-rom { display: block; font-family: var(--f-body); font-size: 13px; color: var(--muted); font-style: italic; }
.st-w { font: inherit; font-weight: 700; color: var(--ink); background: none; border: 0; padding: 0 1px; cursor: pointer; border-bottom: 2px solid var(--gm-c); border-radius: 0; line-height: inherit; }
.st-w.on, .st-w:hover { background: var(--gm-c-soft); }
.st-w:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* a word tapped */
.st-pop { border: 1px solid color-mix(in srgb, var(--gm-c) 40%, var(--line)); background: var(--surface); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); position: sticky; bottom: 12px; z-index: 3; animation: stPop .2s ease-out; }
@keyframes stPop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.st-pop-h { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-size: 20px; }
.st-pop-h b { flex: 1; min-width: 0; }
.st-pop-x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 6px; }
.st-pop-tr { margin: 4px 0 0; font-size: 16px; font-weight: 600; }
.st-pop-form { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }

.st-sub { margin: 10px 0 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.st-words { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.st-chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; font: inherit; text-align: start; }
.st-chip b { font-family: var(--f-display); font-size: 15.5px; }
.st-chip span { font-size: 13px; color: var(--muted); }
.st-chip.on, .st-chip:hover { border-color: var(--gm-c); background: var(--gm-c-soft); }

/* the questions */
.st-quiz { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 14px; }
.st-q { margin: 0 0 8px; font-weight: 600; }
.st-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.st-opt { padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; text-align: start; }
.st-opt:hover:not(:disabled) { border-color: var(--gm-c); }
.st-opt.ok { border-color: var(--easy); background: color-mix(in srgb, var(--easy) 14%, var(--surface)); font-weight: 600; }
.st-opt.ko { border-color: var(--again); background: color-mix(in srgb, var(--again) 12%, var(--surface)); text-decoration: line-through; }
.st-opt.off { opacity: .55; }
.st-opt:disabled { cursor: default; }
.st-fb { margin: 6px 0 0; font-size: 14px; font-weight: 600; }
.st-fb.ok { color: var(--easy); } .st-fb.ko { color: var(--again); }
.st-done { margin: 4px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--gm-c-soft); font-weight: 600; }
.st-foot { display: flex; justify-content: center; margin-top: 8px; }

/* writing */
.st-wait { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--muted); }
.st-sk { padding-top: 4px; }

.st-archive { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.st-archive summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.st-archive ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 480px) {
  .st-title { font-size: 24px; }
  .st-text { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .st-pop { animation: none; } .st-bar i { transition: none; } }
/* the level of the story */
.st-make-row, .st-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.st-make-row { justify-content: flex-start; }
.st-lvl { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
.st-lvl select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; }
