/* Flashcard, core strip, sticky action bar and results — shared by study + test */

/* полоса-керн */
.core { display: grid; gap: 8px; }
.core-meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--f-mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.core-strip { display: flex; gap: 2px; min-height: 14px; padding: 3px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); }
.core-strip i, .core-strip button { flex: 1 1 0; min-width: 0; border-radius: 1px; background: var(--line); transition: background .25s; border: 0; padding: 0; }
.core-strip i.ok { background: var(--good); }
.core-strip i.no { background: var(--bad); }
.core-strip .cur { background: var(--accent) !important; }
/* test: tappable cells, "answered" = ink */
.core-strip.nav-strip { min-height: 22px; }
.core-strip.nav-strip button { cursor: pointer; }
.core-strip.nav-strip button.done { background: var(--muted); }

/* карточка */
.stage { perspective: 1600px; }
.card { display: grid; transition: transform .5s cubic-bezier(.3,.7,.2,1); transform-style: preserve-3d; }
.card.flipped { transform: rotateY(180deg); }
.face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: clamp(20px, 5vw, 40px); min-height: 280px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.back { transform: rotateY(180deg); }
/* the hidden face must not add height when it's much taller (long "was" text etc.) — both faces share one grid cell */
.face-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.face .num { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.statement { font-size: clamp(19px, 3.4vw, 24px); line-height: 1.45; font-weight: 500; margin: 0; flex: 1; display: flex; align-items: center; text-wrap: pretty; overflow-wrap: anywhere; }
.card-hint { font-size: 13px; color: var(--muted); }
@media (hover: none) { .card-hint { display: none; } }

.star { background: none; border: 0; cursor: pointer; font-size: 22px; line-height: 1; padding: 4px; margin: -4px; color: var(--muted); border-radius: 8px; }
.star[aria-pressed="true"] { color: var(--accent); }
.star:hover { color: var(--accent); }

.verdict { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; padding: 6px 12px; border-radius: 999px; }
.verdict.ok { background: var(--good-soft); color: var(--good); }
.verdict.no { background: var(--bad-soft); color: var(--bad); }
.truth-line { font-size: 15px; color: var(--muted); margin: 0; }
.truth-line b { color: var(--ink); }
.label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.thesis { font-size: clamp(17px, 3vw, 20px); line-height: 1.5; margin: 6px 0 0; overflow-wrap: anywhere; }
.was { font-size: 14px; color: var(--muted); margin: 0; padding-top: 14px; border-top: 1px dashed var(--line); }
.was s { text-decoration-color: var(--bad); }

/* ── sticky action bar: glued to the bottom of the viewport, not the page ── */
.actions {
  position: sticky; bottom: 0; z-index: 10;
  width: 100%;
  padding: 18px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, transparent, var(--bg) 18px);
}
.actions-inner { max-width: var(--maxw); margin: 0 auto; padding-inline: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions .full { grid-column: 1 / -1; }
.btn.no:hover, .btn.no[aria-pressed="true"] { border-color: var(--bad); color: var(--bad); }
.btn.yes:hover, .btn.yes[aria-pressed="true"] { border-color: var(--good); color: var(--good); }
.btn.no[aria-pressed="true"] { background: var(--bad-soft); }
.btn.yes[aria-pressed="true"] { background: var(--good-soft); }
.btn.where { font-size: 15px; font-weight: 500; padding: 11px; background: transparent; }
@media (max-width: 420px) {
  .btn { font-size: 17px; padding: 13px 12px; }
  .btn kbd { display: none; }
}

/* итог */
.score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 20px; }
.score .big { font-family: var(--f-display); font-weight: 700; font-size: clamp(44px, 10vw, 72px); line-height: 1; font-variant-numeric: tabular-nums; }
.score .of { font-family: var(--f-mono); color: var(--muted); font-size: 16px; }
.score .pct { font-family: var(--f-mono); font-size: 15px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.result-actions .btn { font-size: 16px; padding: 14px 20px; flex: 1 1 220px; }
.mist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mist li { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; background: var(--surface-2); min-width: 0; }
.mist li.ok { border-left: 4px solid var(--good); }
.mist li.no { border-left: 4px solid var(--bad); }
.mist .q { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.mist .a { font-size: 15px; overflow-wrap: anywhere; }
.mist .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--f-mono); font-size: 13px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.empty-note { color: var(--muted); margin: 0; }
details.all summary { cursor: pointer; font-weight: 500; }
details.all[open] summary { margin-bottom: 12px; }

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
