/* llamatree.dev/try: a guided demo of LlamaTree. The page's own chrome (the bar, the tour, the install panel) uses the
   site's colours; everything inside .lt is a replica of the app and uses the app's own dark-theme colours, sizes and
   status-dot animations, copied from its app.css. */
:root {
  --p-bg: #061018; --p-bg-2: #0a1822; --p-bg-3: #0f2130; --p-line: #1b3242; --p-line-2: #26475c;
  --p-text: #e6eef2; --p-dim: #9fb3bf; --p-faint: #6c8594; --p-orange: #ff8a1a; --p-orange-2: #ffb14c; --p-cyan: #46e8f5;
  --p-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --p-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; background: var(--p-bg); color: var(--p-text); font: 15px/1.5 var(--p-sans); -webkit-text-size-adjust: 100%; }
a { color: var(--p-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--p-orange-2); outline-offset: 2px; }
.grow { flex: 1; }

/* ------------------------------------------------------------ the page's bar, with the install button always in it */
.bar { flex: none; display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 14px; border-bottom: 1px solid var(--p-line); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--p-text); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.bar-tag { color: var(--p-dim); font-size: 12.5px; border: 1px solid var(--p-line-2); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.bar-btn { height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--p-line-2); background: var(--p-bg-3); cursor: pointer; font-weight: 600; font-size: 13.5px; }
.get { display: flex; flex: none; }
.cta { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px 0 0 10px; border: 1px solid #ffb14c; background: linear-gradient(180deg, var(--p-orange-2), var(--p-orange)); color: #1b0d00; font: 700 14px/1 var(--p-sans); white-space: nowrap; cursor: pointer; box-shadow: 0 6px 22px -8px rgba(255, 138, 26, .7); }
.cta:hover { text-decoration: none; filter: brightness(1.06); }
.cta svg { flex: none; }
.cta-more { padding: 0 9px; border-radius: 0 10px 10px 0; border-left-color: rgba(27, 13, 0, .35); }
.cta.solo { border-radius: 10px; }

.get-panel { position: fixed; z-index: 300; top: 56px; right: 10px; width: 440px; max-width: calc(100vw - 20px); max-height: calc(100dvh - 70px); overflow: auto; padding: 6px 16px 10px; background: var(--p-bg-2); border: 1px solid var(--p-line-2); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); }
.get-panel section { padding: 10px 0 4px; border-bottom: 1px solid var(--p-line); }
.get-panel h2 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--p-dim); }
.get-panel p { margin: 8px 0; color: var(--p-dim); font-size: 13.5px; }
.get-panel section.here h2 { color: var(--p-orange-2); }
.get-panel section.here h2::after { content: " · this computer"; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--p-faint); }
.get-panel section[data-os="phone"].here h2::after { content: ""; }
.get-foot { font-size: 13px; }
.get-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: 10px; border: 1px solid var(--p-line-2); background: var(--p-bg-3); color: var(--p-text); font: 600 14px/1.2 var(--p-sans); cursor: pointer; }
.btn:hover { text-decoration: none; border-color: var(--p-faint); }
.btn.primary { background: linear-gradient(180deg, var(--p-orange-2), var(--p-orange)); color: #1b0d00; border-color: #ffb14c; }
.btn .size { font-weight: 400; opacity: .75; }
.cmd { display: flex; align-items: stretch; gap: 0; margin-bottom: 8px; border: 1px solid var(--p-line-2); border-radius: 10px; background: #03090e; overflow: hidden; }
.cmd pre { flex: 1; margin: 0; padding: 10px 12px; font: 12.5px/1.45 var(--p-mono); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.cmd .copy { flex: none; padding: 0 14px; border: 0; border-left: 1px solid var(--p-line-2); background: var(--p-bg-3); cursor: pointer; font-weight: 600; font-size: 13px; }
.cmd .copy.done { color: #39ed9a; }

/* ------------------------------------------------------------ the window the replica sits in */
.shell { flex: 1; min-height: 0; display: flex; padding: 10px 12px; }
.win { flex: 1; min-width: 0; position: relative; display: flex; border: 1px solid var(--p-line-2); border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .8); }
.noscript { margin: auto; max-width: 520px; padding: 24px; text-align: center; }

/* ------------------------------------------------------------ the tour */
.coach { flex: none; display: flex; align-items: center; gap: 16px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--p-line); background: var(--p-bg-2); }
.coach-n { flex: none; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.coach-n b { font-size: 12px; color: var(--p-dim); font-weight: 600; white-space: nowrap; }
.pips { display: flex; gap: 5px; }
.pips i { width: 18px; height: 5px; border-radius: 3px; background: var(--p-line-2); }
.pips i.on { background: var(--p-orange); }
.pips i.past { background: color-mix(in srgb, var(--p-orange) 45%, var(--p-line-2)); }
.coach-text { flex: 1; min-width: 0; }
.coach-text h1 { margin: 0; font-size: 16.5px; line-height: 1.25; letter-spacing: -.01em; }
.coach-text p { margin: 2px 0 0; color: var(--p-dim); font-size: 13.5px; line-height: 1.4; max-width: 105ch; }
.coach-text .todo { color: var(--p-text); }
.coach-text .todo::before { content: "▸ "; color: var(--p-cyan); }
.coach-text .todo.done { color: #39ed9a; }
.coach-text .todo.done::before { content: "✓ "; color: #39ed9a; }
.dot-key { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; white-space: nowrap; }
.dot-key i { width: 8px; height: 8px; border-radius: 50%; }
.coach-btns { flex: none; display: flex; align-items: center; gap: 8px; }
.coach-btns .btn { min-height: 38px; }
.coach-btns .btn.next.go { animation: nudge 1.6s ease-in-out infinite; }
.coach-btns .skip { background: none; border: 0; color: var(--p-faint); cursor: pointer; font-size: 13px; padding: 6px; }
.coach-btns .skip:hover { color: var(--p-text); }
@keyframes nudge { 50% { box-shadow: 0 0 0 5px rgba(255, 138, 26, .28); } }

/* Where the tour wants a click: the same glow as a highlight, pulsing until it's clicked. */
.ring { outline: 2px solid var(--p-cyan) !important; outline-offset: 3px; animation: ring 1.4s ease-in-out infinite; }
@keyframes ring {
  0%, 100% { box-shadow: 0 0 4px 1px rgba(70, 232, 245, .35); outline-color: var(--p-cyan); }
  50% { box-shadow: 0 0 22px 7px rgba(70, 232, 245, .6), 0 0 6px 1px rgba(70, 232, 245, .9); outline-color: #b9f8fd; }
}
.bar-more { color: var(--p-cyan); background: rgba(70, 232, 245, .08); font: 600 12.5px/1.4 var(--p-sans); border: 1px solid rgba(70, 232, 245, .45); border-radius: 999px; padding: 3px 11px; white-space: nowrap; cursor: pointer; }
.bar-more:hover { background: rgba(70, 232, 245, .16); }
.bar-more .wide { font-weight: 500; }
.final .more-h { margin: 6px 0 0; font-size: 16px; color: var(--p-text); }
.final ul.more { columns: 2; column-gap: 24px; margin: 0; padding-left: 18px; color: var(--p-dim); font-size: 14px; }
.final ul.more li { break-inside: avoid; margin-bottom: 4px; }
@media (max-width: 640px) { .final ul.more { columns: 1; } }

/* ============================================================ the replica of the app */
.lt {
  --chrome: #1f1f1f; --chrome-2: #181818; --chrome-3: #141414; --panel: #252526; --panel-2: #2d2d30; --hover: #2a2d2e; --hover-strong: #37373d;
  --border: #3e3e42; --border-soft: #333337; --border-strong: #5a5a60; --text: #e0e0e0; --text-dim: #9d9d9d; --text-faint: #6f6f6f; --text-strong: #fff;
  --accent: #8b7ff0; --accent-strong: #7160e8; --focus: #3794ff; --select-inactive: #37373d; --terminal-bg: #181818; --editor-bg: #1e1e1e;
  --ok: #4ec9b0; --working: #3794ff; --attention: #f0a030; --asking: #f472b6; --danger: #f14c4c; --danger-fill: #a1260d;
  --st-m: #d7ba7d; --st-a: #81b88b; --st-d: #e5534b; --ico-folder: #dcb67a; --ico-file: #9da5b4; --graph: #5d8ac4; --link: #4daafc;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, Menlo, "DejaVu Sans Mono", "Courier New", monospace;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; font-size: 12px; line-height: normal; color: var(--text);
}
.lt svg.ic { width: 16px; height: 16px; flex: none; display: block; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.lt .spacer { flex: 1; }
.lt .dim { color: var(--text-dim); }
#app { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--chrome); user-select: none; }
#main { flex: 1; min-height: 0; display: flex; position: relative; }

/* ---- status dots (the app's default style, Glow) */
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); flex: none; margin: 0 2px; }
.dot::before, .dot::after { position: absolute; border-radius: 50%; pointer-events: none; }
.dot.running { background: var(--ok); }
.dot.running::after { content: ''; inset: -4px; background: radial-gradient(closest-side, var(--ok), transparent); opacity: 0; animation: dot-rest 4s ease-in-out infinite; }
.dot.running[data-from="working"] { animation: dot-settle .45s cubic-bezier(.3, 1.7, .5, 1); }
.dot.running[data-from="working"]::before { content: ''; inset: 0; box-shadow: inset 0 0 0 1.5px var(--ok); opacity: 0; animation: dot-ripple .8s cubic-bezier(0, 0, .2, 1); }
.dot.working { background: none; }
.dot.working::before { content: ''; left: 2.5px; top: -17.5px; width: 3px; height: 3px; box-shadow: -4.5px 20px var(--working), 0 20px var(--working), 4.5px 20px var(--working); animation: dot-typing 1.2s linear infinite; }
.dot.attention { --glow: color-mix(in srgb, var(--attention) 85%, transparent); background: var(--attention); animation: dot-beat 2.2s ease-out infinite, dot-shine 2.2s ease-out infinite; }
.dot.asking { --glow: color-mix(in srgb, var(--asking) 85%, transparent); background: none; }
.dot.asking::after { content: ''; inset: 0; background: var(--asking); transform-origin: 50% 100%; animation: dot-hop 1.6s infinite, dot-glow 1.6s ease-in-out infinite; }
.dot.asking::before { content: ''; inset: 0; box-shadow: inset 0 0 0 1.5px var(--asking); opacity: 0; animation: dot-land 1.6s ease-out infinite; }
@keyframes dot-typing {
  0%, 48%, 100% { box-shadow: -4.5px 20px var(--working), 0 20px var(--working), 4.5px 20px var(--working); }
  12% { box-shadow: -4.5px 17.5px var(--working), 0 20px var(--working), 4.5px 20px var(--working); }
  24% { box-shadow: -4.5px 20px var(--working), 0 17.5px var(--working), 4.5px 20px var(--working); }
  36% { box-shadow: -4.5px 20px var(--working), 0 20px var(--working), 4.5px 17.5px var(--working); }
}
@keyframes dot-ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }
@keyframes dot-shine { 0%, 60%, 100% { background: var(--attention); box-shadow: 0 0 3px 0 var(--glow); } 10% { background: color-mix(in srgb, var(--attention) 55%, #fff); box-shadow: 0 0 9px 3px var(--glow); } }
@keyframes dot-beat { 0%, 30%, 100% { transform: scale(1); } 10% { transform: scale(1.3); } }
@keyframes dot-rest { 0%, 100% { transform: scale(.6); opacity: 0; } 50% { transform: scale(1); opacity: .55; } }
@keyframes dot-settle { from { transform: scale(.4); } }
@keyframes dot-hop {
  0% { transform: translateY(0) scale(1, 1); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  12% { transform: translateY(-6px) scale(.9, 1.1); animation-timing-function: cubic-bezier(.6, 0, .8, .3); }
  24% { transform: translateY(0) scale(1.25, .75); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  33% { transform: translateY(-2.5px) scale(.95, 1.05); animation-timing-function: cubic-bezier(.6, 0, .8, .3); }
  42% { transform: translateY(0) scale(1.15, .85); }
  50%, 100% { transform: translateY(0) scale(1, 1); }
}
@keyframes dot-land { 0%, 23.9% { transform: scale(1); opacity: 0; } 24% { transform: scale(1); opacity: .9; } 41.9% { transform: scale(2.6); opacity: 0; } 42% { transform: scale(1); opacity: .6; } 60%, 100% { transform: scale(2.1); opacity: 0; } }
@keyframes dot-glow { 0%, 60%, 100% { background: var(--asking); box-shadow: 0 0 3px 0 var(--glow); } 12% { background: color-mix(in srgb, var(--asking) 55%, #fff); box-shadow: 0 0 9px 3px var(--glow); } 33% { background: color-mix(in srgb, var(--asking) 75%, #fff); box-shadow: 0 0 6px 2px var(--glow); } }
@keyframes tab-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---- projects and sessions down the left */
#navBar { flex: none; width: 236px; display: flex; flex-direction: column; min-height: 0; background: var(--chrome-3); border-right: 1px solid var(--border-soft); }
#navHead { flex: none; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 8px; border-bottom: 1px solid var(--border-soft); }
.project-bar-label { color: var(--text-dim); font-size: 11px; letter-spacing: .5px; }
.tb-btn { height: 26px; min-width: 26px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; background: transparent; border-radius: 4px; padding: 0 6px; cursor: pointer; color: var(--text); }
.tb-btn:hover { background: var(--hover-strong); }
.tb-btn.text { padding: 0 8px; color: var(--text-dim); }
.tb-btn.text:hover { color: var(--text); }
#navList { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px 6px; scrollbar-width: thin; }
#navFoot { flex: none; display: flex; padding: 6px; border-top: 1px solid var(--border-soft); }
.nav-group { --proj: #4ec98f; display: flex; flex-direction: column; gap: 3px; }
.project-tab { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 8px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--proj) 55%, transparent); background: color-mix(in srgb, var(--proj) 10%, transparent); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.project-tab:hover { background: color-mix(in srgb, var(--proj) 18%, transparent); }
.project-tab:not(.shown) { background: none; border-color: var(--border); color: var(--text-dim); font-weight: 400; }
.project-tab:not(.shown) .check { color: var(--text-dim); }
.project-tab.chip-tab { width: auto; flex: none; height: 24px; border-radius: 12px; }
.project-all { flex: none; height: 22px; padding: 0 8px; border: 1px solid transparent; border-radius: 11px; background: none; color: var(--text-dim); cursor: pointer; }
.project-all:hover { color: var(--text); border-color: var(--border); }
#projectBar { display: none; flex: none; align-items: center; gap: 6px; height: 34px; padding: 0 6px; background: var(--chrome-3); border-bottom: 1px solid var(--border-soft); overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.nav-hint { display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px; border: 1px dashed var(--border); border-radius: 6px; background: none; color: var(--text-dim); font: inherit; font-size: 11.5px; line-height: 1.4; text-align: left; cursor: pointer; }
.nav-hint:hover { color: var(--text); border-color: var(--border-strong); }
.nav-hint svg.ic { margin-top: 1px; }
/* Side by side: a view's tab, with its sessions' dots and a pink edge when one of them needs your answer. */
.view-tab.nav-view { display: flex; align-items: center; gap: 7px; width: 100%; height: 30px; padding: 0 4px 0 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--text-dim); font: inherit; cursor: pointer; }
.view-tab.nav-view:hover { color: var(--text); }
.view-tab.nav-view.active { background: var(--panel-2); border-color: var(--accent-strong); color: var(--text); }
.view-tab.asking { box-shadow: inset 3px 0 0 var(--asking); }
.view-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.view-dots { display: inline-flex; flex: none; }
.view-tab .x { display: inline-flex; flex: none; width: 16px; height: 16px; align-items: center; justify-content: center; border-radius: 3px; opacity: .8; }
.view-tab .x:hover { background: rgba(255, 255, 255, .2); }
.view-tab .x svg.ic { width: 12px; height: 12px; }
#docTabs .view-tab:not(.active) { display: none; }
.session-tab.in-pane { border-color: var(--border); border-style: dashed; color: var(--text); }
.project-tab .check { color: var(--proj); }
.project-tab .badge, .doc-tab .badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--attention); color: #000; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.project-tab .badge { margin-left: auto; }
.nav-sessions { display: flex; flex-direction: column; gap: 1px; margin-left: 13px; padding-left: 6px; border-left: 2px solid color-mix(in srgb, var(--proj) 45%, transparent); }
.session-tab { display: flex; align-items: center; gap: 7px; width: calc(100% + 6px); margin-left: -6px; min-height: 38px; padding: 3px 6px 3px 12px; border-radius: 4px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text-dim); text-align: left; }
.session-tab:hover { background: var(--hover); color: var(--text); }
.session-tab.active { background: var(--panel-2); border-color: var(--border); color: var(--text); }
.session-tab.current:not(.active) { color: var(--text); }
.session-tab.asking { color: var(--text); }
.tab-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.tab-name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab-branch { display: flex; align-items: center; gap: 3px; color: var(--text-faint); font-size: 11px; white-space: nowrap; overflow: hidden; }
.tab-branch .agent { margin-right: 4px; flex: none; }
.tab-branch > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.tab-branch svg.ic { width: 10px; height: 10px; }
.session-tab.working .tab-name { --shine: color-mix(in srgb, var(--working) 40%, #fff); background: linear-gradient(90deg, currentColor 40%, var(--shine) 50%, currentColor 60%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: tab-shimmer 2.4s linear infinite; }
.session-marks { display: flex; align-items: center; gap: 5px; flex: none; font-size: 11px; font-variant-numeric: tabular-nums; }
.session-marks .warm { color: var(--attention); }
.session-marks .hot { color: var(--danger); }
/* Which agent a session runs: its name, in its colour. (The app shows a small mark; the demo spells it out.) */
.agent { color: var(--agent); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.agent::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 1.5px; background: var(--agent); vertical-align: 1px; }

/* ---- the tab row over the terminals */
#stage { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doc-tabs { flex: none; display: flex; align-items: stretch; height: 30px; background: var(--chrome-2); border-bottom: 2px solid var(--accent-strong); overflow: hidden; }
.doc-tab { display: inline-flex; align-items: center; gap: 7px; max-width: 260px; padding: 0 10px; border: 0; background: transparent; color: var(--text-dim); cursor: pointer; white-space: nowrap; min-width: 0; }
.doc-tab:hover { background: var(--hover); color: var(--text); }
.doc-tab.active { background: var(--accent-strong); color: #fff; }
.doc-tab .doc-title { overflow: hidden; text-overflow: ellipsis; }
.doc-tab.preview .doc-title { font-style: italic; }
.doc-tab .doc-sub { opacity: .65; font-size: 11px; }
.doc-tab .x { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; border-radius: 3px; opacity: .8; }
.doc-tab .x:hover { background: rgba(255, 255, 255, .2); }
.doc-tab.git-toggle { margin-left: auto; display: none; color: var(--text); }
.proj-tag { --proj: #4ec98f; display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 9px; font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--proj); background: color-mix(in srgb, var(--proj) 14%, transparent); border: 1px solid color-mix(in srgb, var(--proj) 45%, transparent); }
.doc-tab.active .proj-tag { color: #fff; background: color-mix(in srgb, var(--proj) 55%, transparent); }
#docArea { flex: 1; min-height: 0; position: relative; }

/* ---- tiles */
#grid { position: absolute; inset: 0; padding: 8px; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 8px; }
#grid.one { grid-template-columns: 1fr; }
#grid.one .tile:not(.expanded) { display: none; }
.tile { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--terminal-bg); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; transition: border-color .2s; }
.tile:hover:not(.expanded) { border-color: var(--border-strong); }
.tile.current:not(.expanded) { border-color: var(--accent-strong); }
.tile.attention:not(.expanded) { border-color: var(--attention); box-shadow: 0 0 0 1px var(--attention); }
.tile.asking:not(.expanded) { border-color: var(--asking); box-shadow: 0 0 0 1px var(--asking); }
.tile.expanded { border-radius: 4px; }
.tile-header { height: 30px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 10px; background: var(--panel); border-bottom: 1px solid var(--border-soft); cursor: pointer; min-width: 0; overflow: hidden; }
.tile.expanded .tile-header { cursor: default; }
.tile-name { font-weight: 600; white-space: nowrap; font-size: 12.5px; }
.tile-title { color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--panel-2); color: var(--text-dim); white-space: nowrap; font-size: 11px; border: 1px solid transparent; flex: none; }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--border); color: var(--text); }
.chip svg.ic { width: 12px; height: 12px; }
.chip.ctx { --ctx: var(--text-dim); gap: 5px; font-variant-numeric: tabular-nums; }
.chip.ctx.warm { --ctx: var(--attention); color: var(--attention); }
.chip.ctx.hot { --ctx: var(--danger); color: var(--danger); }
.ctx-bar { width: 26px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ctx) 25%, transparent); overflow: hidden; }
.ctx-bar span { display: block; height: 100%; border-radius: 3px; background: var(--ctx); transition: width .5s; }
.ctx-n { opacity: .75; }
.chip .mod { color: var(--st-m); }
.chip.mail { color: var(--link); background: color-mix(in srgb, var(--link) 14%, transparent); }
.chip.branch { min-width: 0; flex: 0 1 auto; overflow: hidden; }
.chip.branch span { overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 24px; height: 24px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: 4px; cursor: pointer; color: var(--text-dim); }
.icon-btn:hover { background: var(--hover-strong); color: var(--text); }
.tile:not(.expanded) .restore { display: none; }
[data-git-hide] { display: none; }
.tile-body { position: relative; flex: 1; min-height: 0; overflow: hidden; container-type: inline-size; }
.tile-cover { position: absolute; inset: 0; cursor: zoom-in; z-index: 2; border: 0; background: none; padding: 0; }
.tile.expanded .tile-cover { display: none; }

/* ---- the terminal's text (the app draws this with xterm; here it's plain styled text) */
.term { position: absolute; inset: 0; overflow: hidden; padding: 4px 8px; font-family: var(--mono); font-size: clamp(5.4px, 1.62cqw, 9.5px); line-height: 1.32; color: #cccccc; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.tile.expanded .term { overflow-y: auto; padding: 10px 14px; font-size: clamp(10.5px, 1.75cqw, 15px); scrollbar-width: thin; }
.term .l { min-height: 1.32em; }
.term .box { display: inline-block; min-width: min(46ch, 100%); margin-bottom: 1.3em; padding: .5em 1.2em; border: 1px solid #888; border-radius: .4em; }
.term .box.o { border-color: #d77757; }
.term .g { color: #999; }
.term .gr { color: #4eba65; }
.term .o { color: #d77757; }
.term .bl { color: #b1b9f9; }
.term .b { color: #fff; font-weight: 700; }
.term .add, .term .del { display: inline-block; width: min(66ch, 100%); vertical-align: top; }
.term .add { background: #224a28; }
.term .del { background: #5c222c; }
.term .rule { border-top: 1px solid #888; margin: .6em 0 .3em; min-height: 0; }
.term .opt { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; white-space: pre-wrap; cursor: pointer; }
.term .opt.sel { color: #b1b9f9; }
.tile:is(.expanded, .paired) .term .opt:hover { background: rgba(177, 185, 249, .14); }
.term .t-input { display: flex; gap: 1ch; }
.term .t-input input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: none; color: #fff; font: inherit; }
.term .t-input input::placeholder { color: #777; }
.tile:not(.expanded):not(.paired) .term .t-input input { pointer-events: none; }
.term .cursor { display: inline-block; width: .6em; height: 1.1em; background: #ccc; vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- a diff beside... well, in place of the terminal (the app uses the Monaco editor here) */
#diffDoc { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--editor-bg); }
.diff-toolbar { flex: none; display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; background: var(--chrome-2); border-bottom: 1px solid var(--border-soft); white-space: nowrap; overflow: hidden; }
.diff-summary { font-weight: 600; }
.diff-live { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); }
.diff-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--working); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.diff-labels { flex: none; display: grid; grid-template-columns: 1fr 1fr; color: var(--text-dim); font-size: 11px; border-bottom: 1px solid var(--border-soft); }
.diff-labels div { padding: 3px 10px; }
.diff-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 0 20px; font: 12.5px/1.5 var(--mono); user-select: text; scrollbar-width: thin; }
.dr { display: grid; grid-template-columns: 4.5ch minmax(0, 1fr) 4.5ch minmax(0, 1fr); }
.dn { padding-right: 1ch; text-align: right; color: var(--text-faint); user-select: none; }
.dc { padding: 0 1ch; white-space: pre; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--border-soft); color: #d4d4d4; }
.dc.del { background: rgba(255, 0, 0, .2); }
.dc.add { background: rgba(155, 185, 85, .2); }
.dc.none { background: repeating-linear-gradient(-45deg, transparent 0 4px, rgba(255, 255, 255, .035) 4px 5px); }
.dr.new .dc.add { animation: flash 2.2s ease-out; }
@keyframes flash { 0%, 35% { background: rgba(155, 185, 85, .6); } }
.dr.u { grid-template-columns: 3.5ch 3.5ch minmax(0, 1fr); }
.dr.u .dc { white-space: pre-wrap; overflow-wrap: anywhere; border-right: 0; }

/* ---- the side panel: Git Changes and Git Repository */
#gitPanel { flex: none; width: 330px; display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: 1px solid var(--border-soft); }
.tw-session { flex: none; display: flex; align-items: center; gap: 4px; padding: 6px 6px 4px 8px; }
.tw-session select { flex: 1; min-width: 0; height: 26px; padding: 0 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--chrome); color: var(--text); font: inherit; }
.tw-title { flex: none; display: flex; align-items: flex-start; gap: 2px; min-height: 32px; padding: 0 4px 0 8px; border-bottom: 1px solid var(--border-soft); }
.tw-tab { height: 31px; padding: 0 9px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-dim); cursor: pointer; white-space: nowrap; font-size: 12.5px; }
.tw-tab:hover { color: var(--text); }
.tw-tab.active { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.git-branch { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 10px 4px; min-width: 0; }
.git-branch .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.git-branch .ab { color: var(--text-dim); white-space: nowrap; }
.git-commit { flex: none; padding: 4px 10px 8px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--border-soft); }
.git-commit textarea { height: 52px; resize: none; padding: 5px 7px; border: 1px solid var(--border); border-radius: 4px; background: var(--chrome); color: var(--text); font: inherit; }
.git-commit textarea:focus { outline: 1px solid var(--focus); outline-offset: -1px; }
.git-commit-actions { display: flex; gap: 8px; align-items: center; }
.abtn { min-height: 0; height: 26px; padding: 0 12px; border-radius: 4px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; }
.abtn:hover { background: var(--hover-strong); }
.abtn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.abtn.primary:hover { background: var(--accent); }
.abtn:disabled { opacity: .5; cursor: default; }
.commit-suggest { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.commit-suggest .ic { color: var(--accent); width: 14px; height: 14px; }
.commit-suggest.busy .ic { animation: pulse 1s ease-in-out infinite; }
.git-scroll { flex: 1; overflow: auto; padding-bottom: 12px; min-height: 0; scrollbar-width: thin; }
.git-message { padding: 16px 12px; color: var(--text-dim); line-height: 1.5; }
.section-header { display: flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; font-weight: 600; }
.section-header .count { color: var(--text-dim); font-weight: 400; }
.row { display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px 0 calc(12px + var(--depth, 0) * 14px); cursor: pointer; white-space: nowrap; }
.row.folder { cursor: default; }
.row:not(.folder):hover { background: var(--hover); }
.row.selected { background: var(--select-inactive); }
.row .label { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.row .status { margin-left: auto; width: 14px; text-align: center; font-weight: 600; flex: none; font-family: var(--mono); }
.row .status.M { color: var(--st-m); } .row .status.A { color: var(--st-a); } .row .status.D { color: var(--st-d); }
.row.file-D .label { text-decoration: line-through; color: var(--text-dim); }
.row svg.ic { width: 14px; height: 14px; }
.row .fo { color: var(--ico-folder); } .row .fi { color: var(--ico-file); }
.row.fresh { animation: fresh 2.4s ease-out; }
@keyframes fresh { 0%, 30% { background: color-mix(in srgb, var(--st-a) 30%, transparent); } }
.commit-row { display: flex; align-items: center; gap: 8px; height: 24px; padding: 0 10px 0 12px; white-space: nowrap; }
.commit-row .graph { width: 9px; height: 9px; flex: none; border-radius: 50%; border: 2px solid var(--graph); }
.commit-row.outgoing .graph { border-color: var(--accent); background: var(--accent); }
.commit-subject { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.commit-meta { color: var(--text-dim); flex: none; font-size: 11px; }
.git-statusbar { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 12px; height: 26px; padding: 0 10px; border-top: 1px solid var(--border-soft); color: var(--text-dim); white-space: nowrap; overflow: hidden; }
.git-statusbar span { display: inline-flex; align-items: center; gap: 4px; }
.git-statusbar svg.ic { width: 12px; height: 12px; }

/* ---- prompts to try, under the terminal you're in */
.try-bar { display: none; flex: none; align-items: center; gap: 6px; padding: 6px 8px; border-top: 1px solid var(--border-soft); background: var(--panel); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.tile:is(.expanded, .pane-focus) .try-bar { display: flex; }
.try-chip { flex: none; height: 24px; padding: 0 10px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent-strong) 16%, transparent); color: var(--text); font: inherit; cursor: pointer; }
.try-chip:hover { background: color-mix(in srgb, var(--accent-strong) 34%, transparent); }

/* ---- panels: tabs beside Git Changes that an agent fills */
.tw-title { flex-wrap: wrap; }
.panel-tab { display: inline-flex; align-items: center; gap: 5px; }
.pbadge { display: inline-flex; align-items: center; height: 16px; padding: 0 6px; border-radius: 8px; font-size: 11px; font-weight: 400; background: var(--hover-strong); color: var(--text); }
.pbadge.info { background: #1f4a7a; } .pbadge.warning { background: #6b4a14; } .pbadge.danger { background: #7a2525; }
.updated-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--link); }
.panel-head { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 10px; border-bottom: 1px solid var(--border-soft); }
.panel-heading { flex: 1; min-width: 0; }
.panel-title { font-weight: 600; font-size: 13px; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-meta { color: var(--text-dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-body { user-select: text; }
.pg-head { display: flex; align-items: center; gap: 6px; width: 100%; height: 28px; padding: 0 8px; border: 0; border-bottom: 1px solid var(--border-soft); background: none; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.pg-head:hover { background: var(--hover); }
.pg-head .count { font-weight: 400; color: var(--text-dim); }
.pg-head svg.ic { width: 12px; height: 12px; color: var(--text-dim); transition: transform .12s; }
.pg-head.folded svg.ic { transform: rotate(-90deg); }
.pg-head.h2 { height: 30px; margin-top: 4px; border: 0; font-size: 14.5px; color: var(--text-strong); }
.p-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border-soft); }
.p-item > input { flex: none; margin: 2px 0 0; accent-color: var(--accent-strong); }
.p-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.p-top { display: flex; align-items: center; gap: 6px; }
.p-key { font-family: var(--mono); font-weight: 700; color: var(--link); text-decoration: none; }
a.p-key:hover { text-decoration: underline; }
.p-title { font-weight: 600; }
.p-item.ticked .p-title { text-decoration: line-through; color: var(--text-dim); }
.p-progress { display: flex; align-items: center; gap: 8px; color: var(--text-dim); }
.p-progress .bar { flex: 1; max-width: 220px; height: 5px; border-radius: 3px; background: var(--hover-strong); overflow: hidden; }
.p-progress .bar span { display: block; height: 100%; background: var(--accent-strong); transition: width .5s; }
.p-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.p-md { padding: 0 10px 10px 2px; line-height: 1.5; }
.p-md :is(p, ul, pre, table) { margin: 2px 0 8px 26px; }
.p-md ul { padding-left: 18px; }
.p-md pre { padding: 8px 10px; border-radius: 6px; background: #161616; color: #d4d4d4; font: 12px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.p-md table { border-collapse: collapse; }
.p-md :is(td, th) { padding: 3px 8px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.p-md th { background: #2a2a2d; }
.panel-foot { justify-content: flex-start; }

/* ---- dialogs, menus, toasts */
#modalHost { position: fixed; inset: 0; z-index: 250; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .5); }
.modal { width: 560px; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 16px 48px rgba(0, 0, 0, .5); font-size: 13px; }
.modal-title { padding: 14px 18px 4px; font-size: 15px; font-weight: 600; }
.modal-body { padding: 10px 18px; overflow: auto; display: flex; flex-direction: column; gap: 10px; line-height: 1.45; }
.modal-body p { margin: 0; }
.modal-footer { padding: 12px 18px 16px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal-footer .abtn { height: 30px; padding: 0 16px; }
.perms-radios { display: flex; flex-direction: column; gap: 5px; }
.perms-radios label { display: flex; align-items: center; gap: 10px; padding-left: 8px; cursor: pointer; }
.perms-radios input { accent-color: var(--accent-strong); margin: 0; }
.perms-radios b { margin-top: 4px; }
.msg-quote { padding: 8px 10px; border-left: 3px solid var(--accent-strong); background: var(--chrome); border-radius: 0 4px 4px 0; color: var(--text); }
.menu { position: fixed; z-index: 260; min-width: 200px; padding: 4px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); font-size: 12.5px; }
.menu-header { padding: 6px 10px 3px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-faint); }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 10px; border: 0; border-radius: 4px; background: none; color: var(--text); font: inherit; cursor: pointer; white-space: nowrap; text-align: left; }
.menu-item:hover { background: var(--accent-strong); color: #fff; }
.menu-item:disabled { color: var(--text-faint); cursor: default; background: none; }
.menu-note { padding: 2px 10px 6px; max-width: 260px; color: var(--text-dim); font-size: 11.5px; line-height: 1.4; white-space: normal; }
#toastHost { position: fixed; z-index: 270; left: 50%; bottom: 110px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { padding: 8px 14px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); font-size: 12.5px; max-width: 90vw; animation: toast 4s forwards; }
@keyframes toast { 0% { opacity: 0; transform: translateY(6px); } 6%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* The last step: what it was, and how to get it. In the page's colours, since it's the page talking, not the app. */
.modal.final { width: 620px; background: var(--p-bg-2); border-color: var(--p-line-2); border-radius: 16px; color: var(--p-text); font: 15px/1.5 var(--p-sans); }
.final .modal-body { padding: 24px 24px 8px; gap: 12px; }
.final h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; line-height: 1.15; }
.final p { color: var(--p-dim); }
.final ul { margin: 0; padding-left: 20px; color: var(--p-dim); font-size: 14px; }
.final .get-panel { position: static; width: auto; max-width: none; max-height: none; padding: 0; border: 0; background: none; box-shadow: none; overflow: visible; }
.final .get-panel section:not(.here) { display: none; }
.final .get-panel.all section:not([hidden]) { display: block; }
.final .get-panel section { border: 0; padding: 4px 0; }
.final .get-row { margin: 10px 0; }
.final .get-panel .btn.primary { min-height: 48px; padding: 8px 22px; font-size: 16.5px; box-shadow: 0 6px 24px -8px rgba(255, 138, 26, .7); }
.final .modal-footer { padding: 4px 24px 20px; justify-content: space-between; align-items: center; }
.final .linkish { background: none; border: 0; padding: 4px 0; color: var(--p-cyan); cursor: pointer; font-size: 14px; }
.final .linkish:hover { text-decoration: underline; }

/* ---- how many tiles, and side by side: each session a full terminal in its pane, the one with the keyboard in the accent colour */
#grid.c1 { grid-template-columns: 1fr; }
#grid.c3 { grid-template-columns: repeat(3, 1fr); }
#grid.panes.p1 { grid-template-columns: 1fr; }
#grid.panes.p3 { grid-template-columns: repeat(3, 1fr); }
.tile.paired .tile-cover { display: none; }
.tile.paired .tile-header { cursor: default; }
.tile.paired .term { overflow-y: auto; padding: 8px 10px; font-size: clamp(9.5px, 2.2cqw, 13px); scrollbar-width: thin; }
.tile.paired .term :is(.add, .del) { display: inline; }   /* a pane is narrow: the coloured line wraps with its text */
.tile.paired.pane-focus { border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong); }
#empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; }

/* ------------------------------------------------------------ narrower windows */
@media (max-width: 1500px) { .tile:not(.expanded) .tile-header .proj-tag { display: none; } }
@media (max-width: 1180px) { #navBar { width: 200px; } #gitPanel { width: 290px; } }
@media (max-width: 980px) { #navBar { display: none; } }
@media (max-width: 760px) {
  body { font-size: 14px; }
  .bar { height: 48px; gap: 8px; padding: 0 10px; }
  .bar-tag .wide, .bar-more .wide, .brand span { display: none; }
  .bar-tag { display: none; }
  .cta { height: 34px; padding: 0 11px; font-size: 13px; }
  .get-panel { top: 52px; }
  .shell { padding: 6px; }
  .win { border-radius: 8px; }
  /* The side panel becomes a sheet over the bottom of the window, opened from the tab row. */
  #gitPanel { position: absolute; z-index: 20; left: 0; right: 0; bottom: 0; width: auto; height: 62%; border-left: 0; border-top: 1px solid var(--border-strong); box-shadow: 0 -12px 30px rgba(0, 0, 0, .5); transform: translateY(105%); transition: transform .2s ease; }
  #app.git-open #gitPanel { transform: none; }
  .doc-tab.git-toggle, [data-git-hide] { display: inline-flex; }
  .doc-tabs { height: 34px; }
  .doc-tab { max-width: 42vw; padding: 0 8px; }
  .doc-tab .proj-tag, .doc-tab .doc-sub { display: none; }
  #grid { grid-template-columns: 1fr; grid-auto-rows: minmax(150px, 1fr); padding: 6px; gap: 6px; overflow-y: auto; }
  #grid.one { grid-auto-rows: 1fr; overflow: hidden; }
  .tile-header { height: 32px; }
  .tile:not(.expanded) .chip.branch { display: none; }
  .term { font-size: clamp(6.4px, 1.9cqw, 9px); }
  .tile.expanded .term { font-size: 10.5px; padding: 8px 10px; }
  .row { height: 32px; } .tw-tab { height: 36px; } .abtn { height: 32px; } .menu-item { height: 36px; }
  .coach { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .coach-n { flex-direction: row; align-items: center; justify-content: space-between; }
  .coach-text h1 { font-size: 16px; }
  .coach-text p { font-size: 13px; }
  .dot-key { margin-right: 8px; }
  .coach-btns .btn { flex: 1; min-height: 42px; }
  .final h1 { font-size: 23px; }
  .final .modal-body { padding: 18px 16px 6px; }
  .final .modal-footer { padding: 4px 16px 16px; }
  .final .get-panel .btn { flex: 1 1 100%; }
  #toastHost { bottom: 200px; }
}
@media (max-height: 520px) and (min-width: 761px) { .coach-text p:not(.todo) { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .dot.attention { box-shadow: 0 0 6px 2px var(--glow); }
  .dot.asking::after { box-shadow: 0 0 6px 2px var(--glow); }
  .dot.asking::before { inset: -3px; opacity: 1; }
}

/* Narrow windows, after the rules above: the Projects row takes the list's place, views get tabs, and panes stack. */
@media (max-width: 1300px) {
  #grid.panes.p3 { grid-template-columns: 1fr 1fr; }
  #grid.panes.p3 .tile[style*="order: 2"] { grid-column: span 2; }
}
@media (max-width: 980px) {
  #projectBar { display: flex; }
  #docTabs .view-tab:not(.active) { display: inline-flex; }
  #docTabs .view-tab .view-name { max-width: 16ch; }
}
@media (max-width: 760px) {
  #grid.c3, #grid.panes, #grid.panes.p3 { grid-template-columns: 1fr; }
  #grid.panes { grid-auto-rows: 47%; overflow-y: auto; }
  #grid.panes.p3 .tile[style*="order: 2"] { grid-column: auto; }
  .tile.paired .term { font-size: 9.5px; }
  .project-tab.chip-tab, #projectBar .tb-btn { height: 28px; }
  #docTabs .view-tab :is(.view-name, .x) { display: none; }
}

/* Where something just happened because of what you did: one short glow that pulses three times, in the tour's colour, to draw the eye there. It
   never takes clicks; with animations off (see above) the outline simply stands for its two seconds. */
/* The glow swells and fades three times, then lets go. Elements drawn inside a panel (.in) glow inward, since a
   parent's overflow would clip an outer glow. */
.flash.flash { outline: 2px solid var(--p-cyan) !important; outline-offset: 2px; animation: flash-glow 2.7s ease-in-out both; }
.flash.flash.in { outline-offset: -2px; animation-name: flash-glow-in; }
@keyframes flash-glow {
  0%, 33.3%, 66.6% { box-shadow: 0 0 4px 1px rgba(70, 232, 245, .35); outline-color: var(--p-cyan); }
  16.6%, 50%, 83.3% { box-shadow: 0 0 22px 7px rgba(70, 232, 245, .65), 0 0 6px 1px rgba(70, 232, 245, .9); outline-color: #b9f8fd; }
  100% { box-shadow: 0 0 0 0 rgba(70, 232, 245, 0); outline-color: transparent; }
}
@keyframes flash-glow-in {
  0%, 33.3%, 66.6% { box-shadow: inset 0 0 4px 1px rgba(70, 232, 245, .3); background-color: rgba(70, 232, 245, .06); outline-color: var(--p-cyan); }
  16.6%, 50%, 83.3% { box-shadow: inset 0 0 26px 6px rgba(70, 232, 245, .45); background-color: rgba(70, 232, 245, .16); outline-color: #b9f8fd; }
  100% { box-shadow: inset 0 0 0 0 rgba(70, 232, 245, 0); background-color: transparent; outline-color: transparent; }
}
.flash-tag { position: fixed; z-index: 280; pointer-events: none; padding: 2px 8px; border-radius: 6px; background: var(--p-cyan); color: #04222a; font: 700 11.5px/1.5 var(--p-sans); white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .5), 0 0 14px rgba(70, 232, 245, .55); animation: flash-tag 2.8s ease-out both; }
@keyframes flash-tag { 0% { opacity: 0; transform: translateY(4px); } 8%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.welcome .btn.primary { min-height: 48px; padding: 8px 22px; font-size: 16.5px; }
