/* LocalFlow dictation demo (home #lf-demo, the /compare cards, Lite, the setup window). All rules are scoped under .lfd. Tokens come from home.css (--bg --surface --ink --mute
   --line --accent --accent-ink --accent-soft --focus --font --mono); the fallbacks are the same light values. */
.lfd{
  --lfd-bg:var(--bg,#f3f5f3);--lfd-surface:var(--surface,#fff);--lfd-ink:var(--ink,#16201b);
  --lfd-mute:var(--mute,#58645d);--lfd-line:var(--line,#d5dcd6);--lfd-accent:var(--accent,#17684a);
  --lfd-accent-ink:var(--accent-ink,#fff);--lfd-soft:var(--accent-soft,#e1efe8);--lfd-focus:var(--focus,#0b57d0);
  --lfd-font:var(--font,-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",system-ui,sans-serif);
  --lfd-mono:var(--mono,ui-monospace,"SF Mono",Menlo,monospace);
  container-type:inline-size;display:flex;flex-direction:column;gap:12px;width:100%;
  font:15px/1.45 var(--lfd-font);color:var(--lfd-ink);text-align:left}
.lfd *{box-sizing:border-box}
.lfd .lfd-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* stage: menu bar with notch, the pill that slides out under it, a Notes-style window */
.lfd .lfd-stage{position:relative;border:1px solid var(--lfd-line);border-radius:18px;overflow:hidden;
  background:linear-gradient(155deg,var(--lfd-soft),var(--lfd-bg));padding-bottom:clamp(16px,4cqw,30px)}
.lfd .lfd-bar{position:relative;height:28px;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:0 14px;background:var(--lfd-surface);border-bottom:1px solid var(--lfd-line);font-size:12.5px;color:var(--lfd-ink)}
.lfd .lfd-bar b{font-weight:650}
.lfd .lfd-menus{display:flex;gap:14px;color:var(--lfd-mute);white-space:nowrap}
.lfd .lfd-status{display:flex;align-items:center;gap:10px;color:var(--lfd-ink);white-space:nowrap}
.lfd .lfd-wifi{display:inline-flex;width:18px;height:14px;position:relative}
.lfd .lfd-wifi svg{width:100%;height:100%;display:block;overflow:visible}
.lfd .lfd-wifi .arc{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.lfd .lfd-wifi .dot{fill:currentColor}
.lfd .lfd-wifi .slash{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-dasharray:18;stroke-dashoffset:18;transition:stroke-dashoffset .3s}
.lfd.is-off .lfd-wifi{color:var(--lfd-mute)}
.lfd.is-off .lfd-wifi .arc,.lfd.is-off .lfd-wifi .dot{opacity:.45}
.lfd.is-off .lfd-wifi .slash{stroke-dashoffset:0}
.lfd .lfd-offnote{font-size:11.5px;font-weight:650;color:var(--lfd-accent);opacity:0;transform:translateY(2px);transition:opacity .25s,transform .25s}
.lfd.is-off .lfd-offnote{opacity:1;transform:none}
.lfd .lfd-notch{position:absolute;left:50%;top:-1px;bottom:-2px;z-index:2;width:170px;transform:translateX(-50%);
  background:#0b0e0c;border-radius:0 0 6px 6px;transition:border-radius .3s}
.lfd.is-lit .lfd-notch{border-radius:0}
.lfd .lfd-pill{position:absolute;left:50%;top:28px;z-index:3;width:170px;margin-left:-85px;line-height:0;
  transform:translateY(-100%);transition:transform .45s ease-out}
.lfd.is-lit .lfd-pill{transform:none}
.lfd .lfd-pill canvas{display:block;width:100%;aspect-ratio:190/34}

.lfd .lfd-win{position:relative;margin:clamp(48px,8cqw,64px) clamp(12px,6cqw,56px) 0;background:var(--lfd-surface);
  border:1px solid var(--lfd-line);border-radius:12px;overflow:hidden;box-shadow:0 22px 44px -24px rgba(0,0,0,.45)}
.lfd .lfd-title{display:flex;align-items:center;gap:7px;height:34px;padding:0 12px;border-bottom:1px solid var(--lfd-line);
  font-size:13px;font-weight:600;color:var(--lfd-mute)}
.lfd .lfd-title i{width:11px;height:11px;border-radius:50%;background:var(--lfd-line);display:block}
.lfd .lfd-title i:nth-child(1){background:#ee6a5f}
.lfd .lfd-title i:nth-child(2){background:#f4bf4f}
.lfd .lfd-title i:nth-child(3){background:#61c554}
.lfd .lfd-title span{margin:0 auto;transform:translateX(-18px)}
.lfd .lfd-body{padding:clamp(14px,4cqw,26px) clamp(16px,5cqw,30px);min-height:clamp(186px,38cqw,236px);font-size:clamp(15px,2.9cqw,18px);line-height:1.5}
.lfd .lfd-body h4{margin:0 0 8px;font:650 1.2em/1.2 var(--lfd-font);letter-spacing:-.01em}
.lfd .lfd-lines{position:relative}
.lfd .lfd-cur{position:absolute;left:0;top:0;margin:0}
.lfd .lfd-ln{margin:0 0 .5em;opacity:0}
.lfd .lfd-ln.on{opacity:1;animation:lfd-in .22s ease-out}
.lfd .lfd-caret{display:inline-block;width:2px;height:1.1em;vertical-align:-.18em;background:var(--lfd-accent);margin-left:1px;}
@keyframes lfd-in{from{opacity:.2}to{opacity:1}}
.lfd .lfd-stage,.lfd .lfd-row{transition:opacity .7s ease}
.lfd.is-reset .lfd-stage,.lfd.is-reset .lfd-row{opacity:.25}

/* keyboard row: fn key, live caption, stopwatch */
.lfd .lfd-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:clamp(12px,3cqw,22px);
  background:var(--lfd-surface);border:1px solid var(--lfd-line);border-radius:14px;padding:12px clamp(12px,3cqw,18px)}
.lfd .lfd-key{display:grid;place-items:end start;width:62px;height:50px;padding:5px 8px;border-radius:9px;
  background:var(--lfd-bg);border:1px solid var(--lfd-line);border-bottom-width:4px;
  font:600 14px/1 var(--lfd-font);color:var(--lfd-ink);transition:background-color .2s,color .2s,transform .2s,border-bottom-width .2s,box-shadow .3s}
.lfd.is-lit .lfd-key{background:var(--lfd-accent);color:var(--lfd-accent-ink);border-color:var(--lfd-accent);border-bottom-width:1px;
  transform:translateY(2px);box-shadow:0 0 0 4px var(--lfd-soft)}
.lfd .lfd-cap{min-width:0;font-size:15.5px;color:var(--lfd-ink)}
.lfd .lfd-cap small{display:block;font-size:11.5px;font-weight:650;letter-spacing:.07em;text-transform:uppercase;color:var(--lfd-mute);margin-bottom:2px}
.lfd .lfd-cap q{quotes:none;display:block;min-height:1.45em;font-style:italic}
.lfd .lfd-cap q.idle{color:var(--lfd-mute);font-style:normal}
.lfd .lfd-cap q.done{color:var(--lfd-mute)}
.lfd .lfd-watch{text-align:right;min-width:7.6em}
.lfd .lfd-t{display:block;font:650 clamp(22px,5cqw,30px)/1 var(--lfd-mono);font-variant-numeric:tabular-nums;color:var(--lfd-mute)}
.lfd .lfd-v{display:block;margin-top:4px;font-size:13px;font-weight:600;color:var(--lfd-accent);min-height:1.4em}
.lfd.is-timing .lfd-t,.lfd.is-done .lfd-t{color:var(--lfd-ink)}

.lfd .lfd-ctl{display:flex;justify-content:flex-end}
.lfd .lfd-btn{font:600 13px/1 var(--lfd-font);color:var(--lfd-accent);background:transparent;border:1.5px solid var(--lfd-line);
  border-radius:8px;min-height:34px;padding:0 12px;cursor:pointer}
.lfd .lfd-btn:hover{background:var(--lfd-soft)}
.lfd .lfd-btn:focus-visible{outline:3px solid var(--lfd-focus);outline-offset:2px}

/* phone and narrow columns */
@container (max-width:540px){
  .lfd .lfd-row{grid-template-columns:auto 1fr;grid-template-areas:"key watch" "cap cap"}
  .lfd .lfd-key{grid-area:key}
  .lfd .lfd-watch{grid-area:watch}
  .lfd .lfd-cap{grid-area:cap}
  .lfd .lfd-menus span{display:none}
  .lfd .lfd-cap q{min-height:2.9em}
  .lfd .lfd-title span{transform:none;margin:0 auto 0 4px}
}
@container (max-width:380px){
  .lfd .lfd-notch{position:absolute;left:50%;top:-1px;bottom:-2px;z-index:2;width:170px;transform:translateX(-50%);
  background:#0b0e0c;border-radius:0 0 6px 6px;transition:border-radius .3s}
.lfd.is-lit .lfd-notch{border-radius:0}
  .lfd .lfd-pill{position:absolute;left:50%;top:28px;z-index:3;width:170px;margin-left:-85px;line-height:0;
  transform:translateY(-100%);transition:transform .45s ease-out}
  .lfd .lfd-offnote{display:none}
}
@media (prefers-reduced-motion:reduce){
  .lfd .lfd-pill,.lfd .lfd-key,.lfd .lfd-stage,.lfd .lfd-row,.lfd .lfd-notch,.lfd .lfd-wifi .slash,.lfd .lfd-offnote{transition:none}
  .lfd .lfd-ln.on{animation:none}
}
@container (max-width:380px){
  .lfd .lfd-notch{width:136px}
  .lfd .lfd-pill{width:136px;margin-left:-68px}
}

/* real-Mac menu bar extras (owner 11-09): Apple logo, LocalFlow's own icon, battery, search, Control Centre,
   and macOS's orange microphone dot while LocalFlow is listening */
.lfd .lfd-menus{align-items:center}
.lfd .lfd-apple{width:13px;height:16px;fill:var(--lfd-ink);flex:none}
.lfd .lfd-menus b,.lfd .lfd-menus span{color:var(--lfd-ink)}
.lfd .lfd-lf{display:inline-flex;box-sizing:content-box;width:16px;height:14px;padding:3px 5px;margin:-3px -5px;border-radius:5px;transition:background .15s}
.lfd .lfd-lf svg{width:16px;height:14px;fill:var(--lfd-ink)}
.lfd.is-lit .lfd-lf{background:rgba(255,255,255,.18)}
.lfd.is-lit .lfd-lf svg{fill:var(--lfd-accent)}
.lfd .lfd-batt{position:relative;width:24px;height:11px;border:1.4px solid var(--lfd-ink);border-radius:3.5px;opacity:.9}
.lfd .lfd-batt::after{content:"";position:absolute;right:-4px;top:3px;width:2px;height:4px;border-radius:0 1px 1px 0;background:var(--lfd-ink)}
.lfd .lfd-batt i{position:absolute;left:1.5px;top:1.5px;bottom:1.5px;width:70%;border-radius:1.5px;background:var(--lfd-ink)}
.lfd .lfd-ic{width:15px;height:14px;fill:none;stroke:var(--lfd-ink);stroke-width:1.6;stroke-linecap:round;display:block}
.lfd .lfd-ic .f{fill:var(--lfd-ink);stroke:none}
.lfd .lfd-cc{position:relative;display:inline-flex}
.lfd .lfd-mic{position:absolute;right:-5px;top:-4px;width:6px;height:6px;border-radius:50%;background:#ff9f0a;opacity:0;transform:scale(.4);transition:opacity .2s,transform .2s}
.lfd.is-lit .lfd-mic{opacity:1;transform:none}
@media (max-width:640px){.lfd .lfd-batt,.lfd .lfd-status>.lfd-ic{display:none}}
@media (max-width:980px){.lfd .lfd-menus span:nth-of-type(n+4){display:none}}

/* ---- one demo, several places (owner 9 Nov: no letter-by-letter typing anywhere; every demo shows the real flow) ---- */
/* the key row when the Mac app is Lite: fn, then a manual Command-V */
.lfd .lfd-key2,.lfd .lfd-copied{display:none}
.lfd.lfd-lite .lfd-watch{display:none}
.lfd.lfd-lite .lfd-row{grid-template-columns:auto auto 1fr;justify-content:start}
.lfd.lfd-lite .lfd-key2{display:grid;place-items:center;width:78px;height:50px;border-radius:9px;background:var(--lfd-bg);border:1px solid var(--lfd-line);border-bottom-width:4px;
  font:600 15px/1 var(--lfd-font);color:var(--lfd-ink);transition:background-color .2s,color .2s,transform .2s,border-bottom-width .2s,box-shadow .3s}
.lfd.lfd-lite.is-cmd .lfd-key2{background:var(--lfd-accent);color:var(--lfd-accent-ink);border-color:var(--lfd-accent);border-bottom-width:1px;transform:translateY(2px);box-shadow:0 0 0 4px var(--lfd-soft)}
.lfd.lfd-lite .lfd-copied{display:block;position:absolute;z-index:4;left:50%;top:34px;transform:translate(-50%,-6px);opacity:0;transition:opacity .2s,transform .2s;
  background:#0b0e0c;color:#e8f2ec;font-size:12.5px;font-weight:600;padding:6px 12px;border-radius:0 0 10px 10px;white-space:nowrap}
.lfd.lfd-lite.is-copied .lfd-copied{opacity:1;transform:translate(-50%,0)}
@container (max-width:540px){
  .lfd.lfd-lite .lfd-row{grid-template-columns:auto minmax(0,1fr);grid-template-areas:"key key2" "cap cap"}
  .lfd.lfd-lite .lfd-key2{grid-area:key2;justify-self:start}
}
/* compact: a card on /compare or the Lite page. Menu bar + pill + one text field, the key row under it. */
.lfd[data-compact]{gap:8px}
.lfd[data-compact] .lfd-menus span:nth-of-type(n+2){display:none}
.lfd[data-compact] .lfd-status>.lfd-ic,.lfd[data-compact] .lfd-batt{display:none}
.lfd[data-compact] .lfd-stage{border-radius:14px;padding-bottom:12px}
.lfd[data-compact] .lfd-win{margin:46px 14px 0}
.lfd[data-compact] .lfd-title{height:26px;font-size:12px}
.lfd[data-compact] .lfd-body{min-height:0;padding:12px 16px;font-size:16px}
.lfd[data-compact] .lfd-body h4{display:none}
.lfd[data-compact] .lfd-ln{margin:0}
.lfd[data-compact] .lfd-lines{min-height:3em}
.lfd[data-compact] .lfd-row{padding:10px 12px}
.lfd[data-compact] .lfd-key{width:54px;height:44px}
.lfd[data-compact] .lfd-cap q{min-height:1.45em}
.lfd[data-compact] .lfd-ctl{margin-top:-2px}
.lfd[data-compact] .lfd-btn{min-height:30px;font-size:12.5px}
/* the card frame the demo replaces */
.lfd-card{display:block;min-width:0}
.lfd[data-nowatch] .lfd-watch{display:none}
.lfd[data-nowatch] .lfd-row{grid-template-columns:auto 1fr;grid-template-areas:"key cap"}
.lfd[data-compact]{position:relative}
.lfd[data-compact] .lfd-ctl{position:absolute;right:10px;top:36px;margin:0;z-index:5}
.lfd[data-compact] .lfd-btn{background:color-mix(in srgb,var(--lfd-surface) 88%,transparent);min-height:28px;font-size:12px;padding:0 10px}
.lfd[data-compact] .lfd-offnote,.lfd[data-compact] .lfd-lf{display:none}
@media (prefers-reduced-motion:reduce){.lfd.lfd-lite .lfd-key2,.lfd.lfd-lite .lfd-copied{transition:none}}

/* the bar is only on screen while you hold the key (the app's HUD is hidden the rest of the time); it slides up, then hides */
.lfd .lfd-pill{visibility:hidden;transition:transform .45s ease-out,visibility 0s .45s}
.lfd.is-lit .lfd-pill{visibility:visible;transition:transform .45s ease-out,visibility 0s}
@media (prefers-reduced-motion:reduce){.lfd .lfd-pill{transition:none}}

/* narrow cards: the notch takes the middle of the bar, so drop the app name and the clock */
@container (max-width:380px){
  .lfd .lfd-date,.lfd .lfd-menus b{display:none}
}

/* the offline demo opens by switching airplane mode on: toggle flips, Wi-Fi icon crosses out, the window says Offline */
.lfd .lfd-air,.lfd .lfd-offbadge{display:none}
.lfd[data-compact] .lfd-title{position:relative}
.lfd.lfd-hasair .lfd-air{display:inline-flex;align-items:center;gap:7px;position:absolute;left:14px;top:36px;z-index:5;font-size:12px;font-weight:650;color:var(--lfd-mute);
  background:color-mix(in srgb,var(--lfd-surface) 88%,transparent);border:1px solid var(--lfd-line);border-radius:999px;padding:4px 8px 4px 9px;transition:color .3s,border-color .3s}
.lfd .lfd-air svg{width:14px;height:14px;fill:currentColor}
.lfd .lfd-sw{position:relative;width:30px;height:18px;border-radius:99px;background:var(--lfd-line);transition:background .3s;flex:none}
.lfd .lfd-sw i{position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;transition:left .3s;display:block}
.lfd.is-off .lfd-air{color:var(--lfd-accent);border-color:var(--lfd-accent)}
.lfd.is-off .lfd-sw{background:var(--lfd-accent)}
.lfd.is-off .lfd-sw i{left:14px}
.lfd.lfd-hasair .lfd-offbadge{display:inline-block;position:absolute;right:8px;top:50%;transform:translateY(-50%) scale(.9);font-style:normal;font-size:11.5px;font-weight:750;letter-spacing:.03em;text-transform:uppercase;
  background:var(--lfd-accent);color:var(--lfd-accent-ink);padding:2px 8px;border-radius:99px;opacity:0;transition:opacity .3s,transform .3s}
.lfd.lfd-hasair.is-off .lfd-offbadge{opacity:1;transform:translateY(-50%)}
.lfd.lfd-hasair .lfd-wifi{transition:color .3s}
@media (prefers-reduced-motion:reduce){.lfd .lfd-air,.lfd .lfd-sw,.lfd .lfd-sw i,.lfd .lfd-offbadge{transition:none}}

/* real caret rate (about 1.06 s a cycle) and the calm success tick after the line lands */
@media (prefers-reduced-motion:no-preference){.lfd .lfd-caret{animation:lfdblink 1.06s steps(1) infinite}@keyframes lfdblink{0%,55%{opacity:1}56%,100%{opacity:0}}}
.lfd .lfd-win{position:relative}
.lfd .lfd-ok{position:absolute;right:12px;bottom:9px;display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:650;color:var(--lfd-accent);
  opacity:0;transform:scale(.94);transform-origin:right center;transition:opacity .7s ease,transform .7s ease;pointer-events:none;z-index:4}
.lfd .lfd-ok svg{width:20px;height:20px;fill:color-mix(in srgb,var(--lfd-accent) 14%,transparent);stroke:var(--lfd-accent);stroke-width:1.6}
.lfd .lfd-ok svg path{fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:18;stroke-dashoffset:18;transition:stroke-dashoffset .6s ease .1s}
.lfd.is-ok .lfd-ok{opacity:1;transform:none}
.lfd.is-ok .lfd-ok svg path{stroke-dashoffset:0}
@media (prefers-reduced-motion:reduce){.lfd .lfd-ok,.lfd .lfd-ok svg path{transition:none}}
/* narrow screens: the Airplane Mode label gives way (icon + toggle stay) so it never sits under the recording bar */
@container (max-width:540px){.lfd .lfd-air span{display:none}.lfd.lfd-hasair .lfd-air{gap:6px;padding:4px 8px}}
