/* Threadly workspace motion: native links, grouped branches, calm selection. */
.app-shell .rail nav.app-branched-menu { padding-left:0; }
.app-shell .rail nav.app-branched-menu::before,.app-branched-menu .nav-group::before,.app-shell .rail .app-branched-menu .nav-group-title::before,.app-shell .rail .app-branched-menu button.nav::before,.app-shell .rail .app-branched-menu button.nav::after { display:none; }
.app-shell .rail .app-branched-menu .nav-group { padding-left:0;margin:0 0 7px; }
.app-shell .rail .app-branch-head { display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:10px 8px 9px;margin:0;border:0;background:none;color:var(--app-muted);font:600 10px/1.4 var(--sans);letter-spacing:.1em;text-align:left;cursor:pointer; }
.app-branch-caret { color:var(--app-muted);font-size:14px;line-height:1;transition:rotate .28s ease; }
[data-branch-open="false"] .app-branch-caret { rotate:-90deg; }
.app-branch-head:hover { color:var(--app-text)!important; }
.app-branch-head:focus-visible { outline:2px solid var(--app-lime);outline-offset:0;border-radius:7px; }
.app-branch-body { display:grid;grid-template-rows:1fr;transition:grid-template-rows .3s cubic-bezier(.23,1,.32,1); }
[data-branch-open="false"]>.app-branch-body { grid-template-rows:0fr; }
.app-branch-fold { min-height:0;overflow:hidden; }
.app-branch-tree { position:relative;display:grid;gap:2px;padding:3px 0 7px 22px; }
.app-branch-lines { position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none; }
.app-branch-base,.app-branch-trace { fill:none;stroke:var(--app-line-strong);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke; }
.app-branch-base { opacity:.7; }
.app-branch-trace { stroke:var(--app-lime);stroke-width:1.5;stroke-dasharray:1;stroke-dashoffset:0;opacity:0;transition:opacity .18s ease; }
.app-shell .rail .app-branched-menu button.nav { width:100%;margin:0;padding:8px;min-height:34px;border-radius:8px;font-size:11px;gap:9px;transition:background .18s ease,color .18s ease,border-color .18s ease; }
.app-shell .rail .app-branched-menu button.nav:hover { transform:none;background:color-mix(in srgb,var(--app-lime) 6%,var(--app-rail));border-color:transparent; }
.app-shell .rail .app-branched-menu button.nav.active { color:var(--app-text);border-color:color-mix(in srgb,var(--app-lime) 27%,var(--app-line));background:color-mix(in srgb,var(--app-lime) 10%,var(--app-rail)); }
.app-shell .rail .app-branched-menu .nav-glyph { width:15px;flex:0 0 15px; }
.app-choice-group { position:relative;isolation:isolate; }
.app-choice-slider { position:absolute;z-index:0;pointer-events:none;transform-origin:center;border-radius:10px;background:color-mix(in srgb,var(--app-lime) 12%,var(--app-surface));border:1px solid color-mix(in srgb,var(--app-lime) 50%,var(--app-line));box-shadow:inset 0 1px #ffffff06; }
.app-choice-group>button { position:relative;z-index:1; }
.app-choice-group.kinds .btn { border:1px solid transparent;background:none;border-radius:10px;color:var(--app-muted,var(--muted));min-height:50px;font-size:13px;line-height:1.4; }
.app-choice-group.kinds .btn.active { color:var(--app-text,var(--bone));background:none;box-shadow:none; }
.home-module-tabs.app-choice-group::before,.home-module-tabs.app-choice-group::after { display:none; }
.home-module-tabs.app-choice-group { padding:6px;gap:6px;border:1px solid var(--app-line);border-radius:13px;background:var(--app-surface);width:fit-content; }
.home-module-tabs.app-choice-group .btn { border-color:transparent;background:none;box-shadow:none;border-radius:9px;transform:none; }
.home-module-tabs.app-choice-group .btn.primary { color:var(--app-text); }
.home-module-tabs.app-choice-group .btn::before { display:none; }
.module-tabs.comment-navigation.app-choice-group .tab.active { background:none;box-shadow:none; }
.connect-modal { --app-text:var(--bone);--app-lime:var(--lime);--app-line:var(--line);--app-surface:var(--steel);padding:26px;gap:0; }
.connect-modal .modal-header { gap:20px;margin-bottom:22px;align-items:center; }
.connect-modal .modal-header h3 { margin:0;font-size:20px;line-height:1.3; }
.connect-modal .kinds { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:5px;margin-bottom:24px;border:1px solid var(--line);border-radius:14px;background:var(--app-input,#101214); }
.connect-modal .modal-form { display:grid;gap:18px; }
.connect-modal .modal-form .field { margin:0; }
.connect-modal .modal-actions { margin-top:4px; }
body:has(.app-shell) .connect-modal .kinds.app-choice-group>.btn { background:none;border-color:transparent;color:var(--app-muted,var(--muted));box-shadow:none; }
body:has(.app-shell) .connect-modal .kinds.app-choice-group>.btn.active { background:none;border-color:transparent;color:var(--app-lime,var(--lime));box-shadow:none; }
.code-slots { position:relative;isolation:isolate;max-width:360px; }
.code-slots-entry { position:absolute;inset:0;width:100%;height:100%;opacity:0;z-index:2;cursor:text;font-size:16px; }
.code-slot { display:flex;align-items:center;justify-content:center;min-height:54px;pointer-events:none;overflow:hidden;border-color:var(--line);color:var(--bone);background:var(--steel);transition:background .18s ease,border-color .18s ease,box-shadow .18s ease; }
.code-digit { display:inline-block;line-height:1; }
.code-slots .code-slot { display:flex;align-items:center;justify-content:center;margin:0;padding:0;font:700 24px/1 var(--sans);color:var(--bone);letter-spacing:0; }
.code-slots .code-digit { display:inline-block;margin:0;padding:0;font:700 24px/1 var(--sans);color:var(--bone);letter-spacing:0; }
.code-slot.is-filled { background:color-mix(in srgb,var(--lime) 8%,var(--app-surface,#15191b));border-color:color-mix(in srgb,var(--lime) 28%,var(--line)); }
.code-slot.is-current { border-color:var(--lime);box-shadow:0 0 0 3px color-mix(in srgb,var(--lime) 12%,transparent); }
.code-slot.is-current:not(.is-filled)::after { content:'';width:2px;height:20px;border-radius:1px;background:var(--lime);animation:code-caret 1s step-end infinite; }
@keyframes code-caret { 50%{opacity:0} }
@media(max-width:520px) { .connect-modal { padding:20px; }.connect-modal .kinds { gap:3px;padding:4px; }.app-choice-group.kinds .btn { padding:10px 5px;font-size:12px;min-height:48px; }.connect-modal .modal-header h3 { font-size:18px; }.connect-modal .modal-header { gap:12px; }.code-slot { min-height:48px; } }
@media(max-width:520px) { .code-slots .code-slot,.code-slots .code-digit { font-size:22px; } }
@media(prefers-reduced-motion:reduce) { .app-branch-body,.app-branch-caret,.code-slot,.app-branch-trace { transition:none; }.code-slot::after { animation:none!important; } }

/* Jelly Radio uses independently springing chips, not a sliding background. */
.app-shell .app-choice-group.rb-jelly,.connect-modal .app-choice-group.rb-jelly { padding:10px 13px;gap:10px;border:0;background:none;overflow:visible; }
.app-shell .home-module-tabs.app-choice-group.rb-jelly { margin-left:-5px; }
.app-choice-group.rb-jelly>button,.app-choice-group.rb-jelly>a.tab { transform-origin:center;transition:background-color .2s ease,color .2s ease,border-color .2s ease; }
.app-shell .app-choice-group.rb-jelly>.btn,.app-shell .app-choice-group.rb-jelly>.tab,body:has(.app-shell) .connect-modal .kinds.app-choice-group.rb-jelly>.btn { background:var(--app-control,var(--steel));border:1px solid var(--app-line,var(--line));border-radius:10px;color:var(--app-muted,var(--muted));box-shadow:none; }
.app-shell .app-choice-group.rb-jelly>.btn.primary,.app-shell .app-choice-group.rb-jelly>[aria-selected="true"],.app-shell .app-choice-group.rb-jelly>[aria-pressed="true"],.app-shell .app-choice-group.rb-jelly>.tab.active,body:has(.app-shell) .connect-modal .kinds.app-choice-group.rb-jelly>.btn.active { background:var(--app-lime,var(--lime));border-color:var(--app-lime,var(--lime));color:#12210c; }
.app-choice-group.rb-jelly>:focus-visible { outline:2px solid var(--app-lime,var(--lime));outline-offset:4px; }
body:has(.app-shell) .connect-modal .kinds.app-choice-group.rb-jelly { padding:9px 10px;gap:8px; }
.app-branch-marker { position:absolute;left:1px;width:2px;height:16px;border-radius:2px;background:var(--app-lime);pointer-events:none;transition:top .22s cubic-bezier(.23,1,.32,1); }
.app-branch-marker[hidden] { display:none; }
.code-slots .code-slot { position:relative;isolation:isolate; }
.code-slot-fill { position:absolute;inset:0;z-index:0;border-radius:inherit;background:var(--lime);transform:scale(0); }
.code-slot.is-filled .code-slot-fill { transform:scale(1); }
.code-slots .code-digit { position:relative;z-index:1; }
.code-slots .is-filled .code-digit { color:#12210c; }
.code-slots:has(input[aria-invalid="true"]) .code-slot { border-color:var(--app-red,#eb7c83); }
.code-slots:has(input[aria-invalid="true"]) .code-slot-fill { background:var(--app-red,#eb7c83); }
@media(max-width:520px) { body:has(.app-shell) .connect-modal .kinds.app-choice-group.rb-jelly { padding:8px 9px;gap:5px; }.app-shell .home-module-tabs.app-choice-group.rb-jelly { padding:10px;margin-left:0;gap:8px; } }
@media(prefers-reduced-motion:reduce) { .app-branch-marker { transition:none; } }
