/* fr-interactive.css: styles for fr-interactive.js labs. Uses the site's
   --bg --bg2 --ink --soft --card --line, with fallbacks. Colour roles follow
   FR-DIAGRAM-BRIEF: stem blue, ending orange, irregular purple, auxiliary green,
   agreement red; perfect = red dot, imperfect = blue line, pluperfect purple,
   future green. Every state also has ✓/✗ text or a shape, never colour alone. */
.frl{
  --frl-blue:var(--verb,#2e8bff);--frl-orange:var(--gpe,#ff9f1c);--frl-red:var(--red,#ff5b6e);
  --frl-green:var(--green,#34c777);--frl-purple:#9b5de5;--frl-grey:#9aa0b4;
  --frl-ok:#1f9d55;--frl-bad:#d6334a;--frl-focus:var(--verb,#2e8bff);
  font-family:inherit;color:var(--ink,#2c2840);background:var(--card,#fff);
  border:2px solid var(--line,#efe2d2);border-radius:18px;padding:14px 12px;margin:14px 0;
  max-width:100%;overflow-wrap:anywhere;box-sizing:border-box;font-size:16px;line-height:1.45
}
[data-theme="dark"] .frl{--frl-ok:#4ade80;--frl-bad:#ff7a8a;--frl-purple:#b78cf0}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .frl{--frl-ok:#4ade80;--frl-bad:#ff7a8a;--frl-purple:#b78cf0}}
.frl *,.frl *::before,.frl *::after{box-sizing:border-box}
.frl p{margin:6px 0}
.frl-title{font-weight:800;font-size:1.05em}
.frl-tag{display:inline-block;background:var(--frl-blue);color:#fff;border-radius:999px;padding:1px 9px;font-size:.78em;margin-right:4px}
.frl-h{font-weight:800;color:var(--soft,#6b6580);text-transform:uppercase;font-size:.78em;letter-spacing:.04em;margin-top:12px!important}
.frl-prog{text-transform:none;font-weight:600}
.frl-prompt{font-weight:600}
.frl-lab{font-size:.85em;color:var(--soft,#6b6580);margin:8px 0 2px!important}
.frl-hint,.frl-soft{color:var(--soft,#6b6580);font-size:.9em}
.frl-hint.frl-flash{color:var(--frl-bad);font-weight:700}
.frl-row,.frl-opts{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.frl-opts{flex-direction:column;align-items:stretch}
.frl-btn{font:inherit;color:inherit;background:var(--bg2,#ffeedd);border:2px solid var(--line,#efe2d2);border-radius:12px;
  padding:6px 10px;min-height:40px;cursor:pointer;text-align:left;max-width:100%;position:relative}
.frl-btn:hover:not([disabled]){border-color:var(--frl-blue)}
.frl-btn:focus-visible{outline:3px solid var(--frl-focus);outline-offset:2px}
.frl-btn[disabled]{cursor:default;opacity:.75}
.frl-btn[aria-pressed="true"]{border-color:var(--ink,#2c2840);box-shadow:inset 0 0 0 2px var(--ink,#2c2840);font-weight:700}
.frl-btn[aria-pressed="true"]::before{content:"● ";font-size:.7em;vertical-align:middle}
.frl-opt{width:100%}
.frl-main{background:var(--frl-blue);border-color:var(--frl-blue);color:#fff;font-weight:800}
.frl-ghost{background:transparent}
.frl-bar{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.frl-chip{--c:var(--frl-grey);border-color:var(--c);background:var(--bg2,#ffeedd);
  background:color-mix(in srgb,var(--c) 14%,var(--card,#fff));display:inline-flex;flex-direction:column;align-items:flex-start}
.frl-cap{font-size:.72em;color:var(--soft,#6b6580);font-weight:600;line-height:1.1}
.frl-used{opacity:.35;border-style:dashed}
.frl-r-stem,.frl-r-verb,.frl-r-m-line{--c:var(--frl-blue)}
.frl-r-ending,.frl-r-participle,.frl-r-pron{--c:var(--frl-orange)}
.frl-r-agree,.frl-r-neg,.frl-r-m-dot,.frl-r-m-bar{--c:var(--frl-red)}
.frl-r-aux,.frl-r-m-future{--c:var(--frl-green)}
.frl-r-irregular,.frl-r-m-plup{--c:var(--frl-purple)}
.frl-r-subject,.frl-r-word,.frl-r-prep,.frl-r-punct{--c:var(--frl-grey)}
.frl-line{display:block;font-size:1.05em;line-height:1.9}
.frl-line>.frl-btn{margin:2px 3px;vertical-align:middle}
.frl-big{font-size:1.15em;min-height:44px}
.frl-box{--c:var(--frl-grey);display:inline-block;margin:0 .12em;line-height:1.3;border-bottom:3px solid var(--c);padding:0 4px;font-weight:800;min-width:2.2em;text-align:center}
.frl-res{--c:var(--frl-green)}
.frl-tog{font-weight:700;text-decoration:underline dotted}
.frl-slot{min-width:4em;border-style:dashed;text-align:center}
.frl-target{border-color:var(--frl-blue);border-style:solid}
.frl-ans{min-height:48px;padding:6px;border:2px dashed var(--line,#efe2d2);border-radius:12px;margin:6px 0}
.frl-built{font-weight:800;color:var(--frl-blue);min-height:1.4em}
.frl-src{padding:6px 10px;border-left:4px solid var(--line,#efe2d2)}
.frl-m{display:inline-block;margin-left:4px;font-weight:900}
.frl-ok{border-color:var(--frl-ok)!important}.frl-ok>.frl-m{color:var(--frl-ok)}
.frl-bad{border-color:var(--frl-bad)!important}.frl-bad>.frl-m{color:var(--frl-bad)}
.frl-out{margin-top:10px;padding:8px 10px;border-radius:12px;min-height:1em;background:var(--bg,#fff7ec)}
.frl-out:empty{padding:0;background:none}
.frl-o-ok{border-left:5px solid var(--frl-ok)}.frl-o-bad{border-left:5px solid var(--frl-bad)}
.frl-o-show,.frl-o-empty{border-left:5px solid var(--frl-grey)}
.frl-say-line,.frl-take{display:block;margin-top:4px}
.frl-take{border-top:1px solid var(--line,#efe2d2);padding-top:6px}
.frl-pfb:empty{display:none}
.frl-pfb{padding:6px 10px;background:var(--bg,#fff7ec);border-radius:10px}
.frl-cases{list-style:none;padding:0;margin:4px 0;display:flex;flex-direction:column;gap:4px}
.frl-cases li{display:flex;align-items:center}
.frl-cases li.frl-ok,.frl-cases li.frl-bad{border:0}
.frl-case{background:transparent;padding:4px 8px;min-height:36px;width:100%}
.frl-gap{padding:6px 0;border-bottom:1px solid var(--line,#efe2d2)}
.frl-gap .frl-line{border:0}
.frl-zone{--c:var(--frl-grey)}
/* timeline */
.frl-tl{margin-top:10px;padding:8px 6px;background:var(--bg,#fff7ec);border-radius:12px}
.frl-lane{display:flex;align-items:center;gap:6px;min-height:26px}
.frl-ll{flex:0 0 26%;font-size:.8em;font-weight:700;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.frl-tr{position:relative;flex:1;height:22px;border-bottom:2px solid var(--line,#efe2d2)}
.frl-zh .frl-tr{display:flex;border:0;height:auto}
.frl-zl{flex:1;font-size:.68em;text-align:center;color:var(--soft,#6b6580);line-height:1.1}
.frl-zl.frl-now{font-weight:800;color:var(--ink,#2c2840)}
.frl-nowline{position:absolute;top:-4px;bottom:-4px;width:0;border-left:2px dashed var(--ink,#2c2840)}
.frl-mk{position:absolute;top:5px;height:12px}
.frl-mk-dot,.frl-mk-plup,.frl-mk-future{background:none}
.frl-mk-dot::after,.frl-mk-plup::after,.frl-mk-future::after{content:"";position:absolute;left:50%;top:-1px;width:14px;height:14px;margin-left:-7px;border-radius:50%;background:var(--frl-red)}
.frl-mk-plup::after{background:var(--frl-purple)}
.frl-mk-future::after{background:var(--frl-green)}
.frl-mk-line{background:var(--frl-blue);border-radius:6px;opacity:.85}
.frl-mk-bar{background:var(--frl-red);border-radius:6px;transform:scaleX(.8)}
.frl-play .frl-mk{animation:frl-in .5s both}
@keyframes frl-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.frl-play .frl-mk{animation:none}}
/* sorter */
.frl-buckets{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin-top:10px}
.frl-bucket{border:2px solid var(--line,#efe2d2);border-radius:12px;padding:6px;background:var(--bg,#fff7ec)}
.frl-bh{width:100%;font-weight:800}
.frl-in{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px;min-height:8px}
.frl-wrap{display:inline-flex;align-items:center;gap:2px;flex-wrap:wrap}
.frl-say{min-width:40px;padding:4px}
.frl-hl{text-decoration:underline;color:var(--frl-blue)}
.frl-mu{display:block;line-height:2.3}
.frl-badges{display:inline-flex;gap:2px}
.frl-badge{font-size:.7em;font-weight:800;border:1px solid var(--ink,#2c2840);border-radius:6px;padding:0 4px}
.frl [hidden],.frl[hidden]{display:none!important}
