/* Hero loop: four of Jiro's uses in one 22 s story, rendered in Slack, the web app or the terminal.
   Every string comes from site/hero-loop/copy.json. */

.hl-stage {
  position: absolute;
  inset: 0 0 var(--band-h) 0;
  overflow: hidden;
  container-type: size;
  --pad: 24px;
  --ink: #0a0a0a;
  --muted: #5c5c58;
  --rule: #0a0a0a;
  --soft: #e4e4e0;
  --green: #2bff6b;
  --salmon: #fb5e45;
  --phone-w: 236px;
  --phone-h: 480px;
  font-family: "Söhne", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}
.hero-media { --band-h: 40px; }
.hl-stage:not(.is-ready) .hl-world { visibility: hidden; }
.hl-stage:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }

/* Each surface is a full-stage layer. All three run on the same clock; only one is visible. */
.hl-surface { position: absolute; inset: 0; overflow: hidden; visibility: hidden; opacity: 0; will-change: opacity, transform; }
.hl-surface.is-on, .hl-surface.is-leaving { visibility: visible; }
.hl-surface.is-on { opacity: 1; z-index: 1; }

/* ---------- Surface switcher: a segmented pill under the loop, with Jiro riding the highlight ---------- */
.hl-pill-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--band-h);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 5px;
  box-sizing: border-box;
  z-index: 3;
  pointer-events: none;
}
.hl-pill {
  --seg-w: 84px;
  --pill-h: 30px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, var(--seg-w));
  height: var(--pill-h);
  box-sizing: border-box;
  border: 1px solid #0a0a0a;
  border-radius: 999px;
  background: #fff;
  pointer-events: auto;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hl-pill button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #0a0a0a;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hl-pill button svg { width: 14px; height: 14px; flex: none; }
.hl-pill button svg path { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.hl-pill button svg circle { fill: currentColor; }
.hl-pill button:focus-visible { outline: 2px solid #0a0a0a; outline-offset: 2px; }
/* The highlight is one segment wide and only ever translates. */
.hl-hi {
  position: absolute;
  left: 2px;
  top: 2px;
  bottom: 2px;
  width: calc(var(--seg-w) - 4px);
  border-radius: 999px;
  background: #fb5e45;
  overflow: hidden;
  will-change: transform;
}
/* Auto progress: a thin fill along the bottom of the highlight, driven by the loop clock. */
.hl-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #0a0a0a;
  opacity: 0.55;
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
  transition: opacity 0.2s;
}
.hl-pill.is-pinned .hl-fill, .hl-reduced .hl-fill { opacity: 0; }
/* Jiro sits on the pill above the active segment. x = slide, y = hop arc; the canvas draws the character. */
.hl-rider {
  position: absolute;
  left: calc(var(--seg-w) / 2 - 24px);
  bottom: calc(100% - 6px);
  width: 48px;
  height: 48px;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
  transition: opacity var(--motion-fast) var(--motion-feedback-ease);
}
/* While the page's flying Jiro crosses the hero, this one steps aside so only one Jiro is in the air:
   gone at once (a jump can put the flier mid-path in one frame), back with a short fade once he lands. */
.jiro-airborne .hl-rider { opacity: 0; transition: none; }
.hl-rider-y { position: absolute; inset: 0; will-change: transform; }
.hl-jiro { display: block; width: 100%; height: 100%; }
.hl-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.hl-world [data-k],
.hl-world [data-st],
.hl-world .w { will-change: transform, opacity; }

.hl-win {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  background: #fff;
  overflow: hidden;
}
.hl-view { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.hl-scroll { position: relative; }

/* ---------- Jiro web app, in a browser window ---------- */
.hl-session {
  left: 0;
  top: 0;
  width: calc(100cqw - 2 * var(--pad));
  height: calc(100cqh - 2 * var(--pad));
  border-radius: 10px;
}
.bw-bar { flex: none; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-bottom: 1px solid var(--rule); background: #f4f4f1; }
.bw-bar > i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--rule); box-sizing: border-box; background: #fff; }
.bw-url, .ph-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 3px 12px;
  border: 1px solid var(--soft);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
}
.bw-url { margin: 0 auto; max-width: 70%; }
.bw-url span:last-child, .ph-url span:last-child { overflow: hidden; text-overflow: ellipsis; }
.bw-lock { flex: none; position: relative; width: 7px; height: 6px; margin-top: 3px; background: var(--muted); border-radius: 1px; }
.bw-lock::before { content: ""; position: absolute; left: 1px; bottom: 5px; width: 5px; height: 4px; box-sizing: border-box; border: 1.2px solid var(--muted); border-bottom: 0; border-radius: 3px 3px 0 0; }
.bw-app { flex: 1; min-height: 0; display: flex; }
.ss-side {
  flex: none;
  width: 136px;
  box-sizing: border-box;
  padding: 12px 8px;
  border-right: 1px solid var(--rule);
  background: #fafaf8;
  font-size: 12px;
  display: flex;
  flex-direction: column;
}
.ss-brand { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 14px; padding: 0 6px 10px; }
.ss-caret { color: var(--salmon); }
.ss-side ul { list-style: none; margin: 0; padding: 0; }
.ss-side li { padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-nav { padding-bottom: 8px !important; border-bottom: 1px solid var(--soft) !important; }
.ss-group { padding: 12px 6px 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.ss-chats li { position: relative; padding-left: 16px; color: var(--muted); }
.ss-chats li.on { background: var(--green); color: var(--ink); font-weight: 600; }
.ss-live { position: absolute; left: 6px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--ink); }
.ss-me { margin-top: auto; padding: 10px 6px 0; border-top: 1px solid var(--soft); color: var(--muted); font-size: 11px; }
.ss-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ss-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  white-space: nowrap;
}
.ss-head b { overflow: hidden; text-overflow: ellipsis; }
.ss-pres { margin-left: auto; display: flex; flex: none; }
.ss-pres .ss-av { margin: 0 0 0 -5px; width: 22px; height: 22px; background: #fff; }
.ss-split { flex: 1; min-height: 0; display: flex; }
.ss-convo { flex: 1 1 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.ss-view { flex: 1 1 auto; }
.ss-at { background: var(--green); padding: 0 2px; font-weight: 600; }

/* Sidebar: project runs Jiro starts, as the real chat list shows them (title, unread dot, session-type icon lit while live). */
.hl-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ss-chats li.ss-run { display: flex; align-items: center; gap: 2px; padding-left: 4px; padding-right: 4px; }
.ss-run-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ss-lead { flex: none; display: grid; place-items: center; width: 8px; }
.ss-unread { width: 5px; height: 5px; border-radius: 50%; background: #198038; }
.ss-kic { position: relative; flex: none; width: 12px; height: 12px; }
.ss-kic svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #525252; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; opacity: 0.4; }
.ss-kic .ss-kic-live { stroke: #0f62fe; opacity: 1; background: #fafaf8; }
.ss-link { color: #0f62fe; word-break: break-all; }

/* The chat side panel, after broker/ui ChatSidePanel.vue, ArtifactPane.vue and WebPreviewPane.vue (light theme tokens). */
.sp {
  --sp-bg: #f2f4f8;
  --sp-border: #dde1e6;
  --sp-muted: #525252;
  --sp-text: #393939;
  --sp-fg: #161616;
  --sp-accent: #0f62fe;
  --sp-green: #198038;
  flex: 1.08 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--sp-border);
  background: #fff;
  color: var(--sp-fg);
  font-size: 12px;
  line-height: 1.4;
}
.sp svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sp-head { flex: none; display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 6px 0 7px; border-bottom: 1px solid var(--sp-border); }
.sp-tabs { display: flex; min-width: 0; margin-right: auto; gap: 2px; padding: 2px; border: 1px solid var(--sp-border); border-radius: 6px; background: var(--sp-bg); }
.sp-tab { position: relative; display: inline-flex; align-items: center; gap: 3px; height: 19px; padding: 0 4px; border-radius: 4px; color: var(--sp-muted); font-size: 9.5px; white-space: nowrap; }
.sp-tab > svg, .sp-tab > span { position: relative; }
.sp-tab > svg { width: 10px; height: 10px; }
.sp-on { position: absolute; inset: -1px; border: 1px solid var(--sp-border); border-radius: 4px; background: #fff; }
.sp-x { flex: none; width: 14px; height: 14px; color: var(--sp-muted); }
.sp-body { position: relative; flex: 1; min-height: 0; }
.sp-body > * { position: absolute; inset: 0; }
.sp-empty { display: grid; place-items: center; color: var(--sp-muted); font-size: 12.5px; }
.sp-art { display: flex; flex-direction: column; }
.sp-art-head { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-bottom: 1px solid var(--sp-border); }
.sp-art-head b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-kind { font-family: "JetBrains Mono", monospace; font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sp-muted); }
.sp-actions { display: flex; gap: 5px; padding: 6px 12px; border-bottom: 1px solid var(--sp-border); }
.sp-actions span { padding: 2px 8px; border: 1px solid var(--sp-border); border-radius: 6px; color: var(--sp-muted); font-family: "JetBrains Mono", monospace; font-size: 9.5px; letter-spacing: 0.04em; }
.sp-gallery { display: flex; gap: 5px; padding: 6px 12px; border-bottom: 1px solid var(--sp-border); overflow: hidden; }
.sp-gchip { flex: none; display: flex; flex-direction: column; gap: 1px; padding: 4px 7px; border: 1px solid var(--sp-border); border-radius: 8px; background: var(--sp-bg); color: var(--sp-muted); }
.sp-gchip.on { border-color: #c1c7cd; background: #fff; color: var(--sp-fg); }
.sp-gtitle { max-width: 9rem; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-art-body { flex: 1; min-height: 0; overflow: hidden; padding: 12px; }
.sp-prlink { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--sp-border); border-radius: 8px; background: var(--sp-bg); }
.sp-pr-repo { font-family: "JetBrains Mono", monospace; font-size: 11.5px; font-weight: 600; }
.sp-pr-num { color: var(--sp-muted); font-size: 10.5px; }
.sp-pr-arrow { grid-column: 2; grid-row: 1 / span 2; color: var(--sp-accent); }
.sp-table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.sp-table th, .sp-table td { padding: 4px 7px; border: 1px solid var(--sp-border); text-align: left; color: var(--sp-text); white-space: nowrap; }
.sp-table th { color: var(--sp-fg); font-weight: 600; }
.sp-pre { display: flex; flex-direction: column; }
.sp-pre-head { flex: none; display: flex; align-items: baseline; gap: 8px; padding: 7px 8px 7px 10px; border-bottom: 1px solid var(--sp-border); }
.sp-pre-head b { flex: none; font-size: 10.5px; }
.sp-pre-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sp-muted); font-family: "JetBrains Mono", monospace; font-size: 10px; }
.sp-pre-head svg { flex: none; align-self: center; width: 12px; height: 12px; color: var(--sp-muted); }
/* Inside the preview frame: the served Scrivener copy viewer. */
.sp-frame { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; background: #fff; font-family: Georgia, "Times New Roman", serif; }
.sv-bar { flex: none; display: flex; align-items: baseline; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #e8e2d4; background: #faf7f0; }
.sv-bar b { font-size: 13px; letter-spacing: 0.02em; }
.sv-bar span { color: #6b6457; font-size: 10.5px; }
.sv-doc { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px 6px; }
.sv-doc b { font-size: 12px; font-weight: 600; }
.sv-count { margin-left: auto; color: var(--sp-green); font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 600; }
.sv-pages { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; padding: 4px 12px 8px; }
.sv-pages > span { position: relative; display: flex; flex-direction: column; gap: 3px; aspect-ratio: 3 / 4; padding: 6px 5px; box-sizing: border-box; border: 1px solid #ddd6c6; background: #fffdf8; }
.sv-pages i { display: block; height: 2px; background: #d9d2c2; }
.sv-pages i:nth-child(2) { width: 80%; }
.sv-pages i:nth-child(3) { width: 60%; }
.sv-pages em { position: absolute; right: 3px; bottom: 2px; font-style: normal; font-size: 7.5px; color: #8a8273; }
.sv-match { display: flex; align-items: center; gap: 6px; margin: 2px 12px 0; color: var(--sp-green); font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 600; }
.sv-tick { width: 11px; height: 11px; stroke-width: 2.5; }
.ss-scroll { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.ss-user { align-self: flex-end; max-width: 82%; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; margin: 12px 0 10px; }
.ss-who { font-size: 11px; color: var(--muted); }
.ss-bubble { padding: 8px 12px; border: 1px solid var(--rule); background: #fff; font-size: 13.5px; }
.ss-relay {
  align-self: flex-end;
  max-width: 82%;
  margin: 12px 0 10px;
  padding: 7px 12px 9px;
  border: 1px solid var(--rule);
  background: #fff;
}
.ss-relay-src:empty { display: none; }
.ss-relay-src { display: block; font-family: "JetBrains Mono", monospace; font-size: 9px; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 5px; }
.ss-relay-msg { display: flex; gap: 8px; align-items: flex-start; }
.ss-relay-msg p { margin: 0; font-size: 13.5px; }
.ss-av {
  flex: none;
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 600;
  margin-top: 2px;
}
.ss-av-lawyer { background: var(--salmon) !important; }
.ss-av-turkey { background: var(--green) !important; }
.ss-av-nippers { background: #ffd34d !important; }
.ss-av-bartleby { background: #d9d9d4 !important; }
.ss-fold { font-size: 12.5px; color: var(--muted); padding: 0 4px 4px; }
.ss-fold-l { display: inline-grid; }
.ss-fold-l i { grid-area: 1 / 1; font-style: normal; white-space: nowrap; }
.ss-fold-l i::after { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 0 3px 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
.ss-row { position: relative; display: flex; align-items: center; gap: 8px; min-height: 24px; padding: 1px 4px; font-size: 12.5px; }
.ss-row code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
}
.ss-row .hl-glow { position: absolute; inset: 0; background: var(--green); z-index: -1; }
.ss-row-mem { isolation: isolate; }
.ic-logo { flex: none; width: 17px; height: 17px; margin: 0 -1.5px; display: block; }
.ic { position: relative; flex: none; width: 14px; height: 14px; box-sizing: border-box; }
.ic-term { border: 1.5px solid var(--ink); }
.ic-term::before { content: ""; position: absolute; left: 1.5px; top: 2.5px; width: 3px; height: 3px; border: solid var(--ink); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
.ic-term::after { content: ""; position: absolute; left: 6px; bottom: 2px; width: 4px; height: 1.5px; background: var(--ink); }
.ic-edit::before { content: ""; position: absolute; left: 6px; top: 0; width: 3.5px; height: 13px; background: var(--ink); transform: rotate(45deg); }
.ic-wrench::before { content: ""; position: absolute; left: 5.5px; top: 4px; width: 3px; height: 10px; background: var(--ink); transform: rotate(45deg); }
.ic-wrench::after { content: ""; position: absolute; right: 0; top: 0; width: 7px; height: 7px; box-sizing: border-box; border: 2px solid var(--ink); border-radius: 50%; border-bottom-color: transparent; }
.ic-book { border: 1.5px solid var(--ink); border-radius: 1px; }
.ic-book::after { content: ""; position: absolute; left: 4.5px; top: 0; bottom: 0; width: 1.5px; background: var(--ink); }
.st { margin-left: auto; position: relative; flex: none; width: 14px; height: 14px; }
.st i { position: absolute; inset: 0; margin: auto; }
.st .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); border: 1px solid var(--rule); }
.st .ck::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 7px;
  border: solid var(--ink);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.ss-say { margin: 10px 4px 4px; font-size: 13.5px; line-height: 1.5; }
.ss-say .w { display: inline-block; }
.ss-say mark { background: none; color: inherit; }
.ss-say mark .w { background: var(--salmon); white-space: pre; }
.ss-chip {
  align-self: flex-start;
  margin: 6px 4px 0;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
}
.ss-chip { white-space: nowrap; }
.ss-chip span { font-family: "JetBrains Mono", monospace; font-size: 9px; letter-spacing: 0.08em; color: var(--muted); }
.ss-skill { margin: 8px 4px 0; border: 1px solid var(--rule); }
.ss-skill-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13px; }
.ss-skill-head em { font-style: normal; font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--muted); }
.ss-open { margin-left: auto; padding: 1px 6px; border: 1px solid var(--soft); font-size: 11px; }
.ss-skill-tabs { display: flex; gap: 16px; padding: 0 10px; border-top: 1px solid var(--soft); border-bottom: 1px solid var(--soft); font-family: "JetBrains Mono", monospace; font-size: 9.5px; letter-spacing: 0.08em; color: var(--muted); }
.ss-skill-tabs span { padding: 6px 0 5px; }
.ss-skill-tabs .on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.ss-diff { margin: 0; padding: 6px 0; font-family: "JetBrains Mono", monospace; font-size: 11px; line-height: 1.7; overflow: hidden; }
.ss-diff span { display: block; padding: 0 10px 0 calc(10px + 5ch); text-indent: -5ch; white-space: pre-wrap; }
.ss-diff .add { background: var(--green); }
.ss-skill-mini { align-self: flex-start; max-width: 100%; }
.ss-skill-mini .ss-skill-head { white-space: nowrap; }
.ph-screen .ss-skill-head { font-size: 11.5px; padding: 6px 8px; }
.ss-compose {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 14px 12px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.ss-ph, .ss-type { overflow: hidden; }
.ss-type { position: absolute; left: 12px; right: 44px; color: var(--ink); }
.ss-type .c { display: inline-block; white-space: pre; }
.ss-compose i { margin-left: auto; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--green); border: 1px solid var(--rule); box-sizing: border-box; }

/* ---------- Slack thread ---------- */
.sk-head { display: flex; align-items: baseline; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--soft); font-size: 14.5px; }
.sk-chan { color: var(--muted); font-size: 12.5px; }
.sk-x { margin-left: auto; width: 10px; height: 10px; position: relative; align-self: center; }
.sk-x::before, .sk-x::after { content: ""; position: absolute; left: 0; top: 4.5px; width: 10px; height: 1px; background: var(--muted); transform: rotate(45deg); }
.sk-x::after { transform: rotate(-45deg); }
.sk-view { padding: 10px 0 12px; min-height: 172px; box-sizing: border-box; }
.sk-msg { display: flex; gap: 10px; padding: 6px 14px; }
.sk-av { flex: none; width: 32px; height: 32px; box-sizing: border-box; display: grid; place-items: center; border: 1px solid var(--rule); font-weight: 600; font-size: 11.5px; }
.sk-av-lawyer { background: var(--salmon); }
.sk-av-bartleby { background: #d9d9d4; }
.sk-av-jiro { background: #fff; }
.sk-av-jiro img { width: 28px; height: 28px; }
.sk-body { min-width: 0; flex: 1; }
.sk-body p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.42; }
.sk-meta { display: flex; align-items: baseline; gap: 6px; font-size: 13.5px; }
.sk-meta span { color: var(--muted); font-size: 11px; }
.sk-meta em { font-style: normal; font-family: "JetBrains Mono", monospace; font-size: 9px; font-weight: 600; letter-spacing: 0.06em; padding: 0 4px; border: 1px solid var(--soft); color: var(--muted); align-self: center; }
.sk-at { background: var(--green); padding: 0 2px; font-weight: 600; }
.sk-card { margin-top: 6px; padding: 2px 0 2px 10px; border-left: 3px solid var(--soft); display: flex; align-items: center; gap: 7px; }
.sk-card img { width: 14px; height: 14px; }
.sk-card b { font-family: "JetBrains Mono", monospace; font-size: 12px; }

/* ---------- Sam's phone ---------- */
.hl-phone {
  position: absolute;
  width: var(--phone-w);
  height: var(--phone-h);
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: 30px;
  background: var(--ink);
}
.ph-screen {
  height: 100%;
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 12px;
}
.ph-head { display: flex; justify-content: center; padding: 14px 10px 6px; }
.ph-url { font-size: 9.5px; padding: 2px 10px; }
.ph-title { padding: 0 14px 8px; border-bottom: 1px solid var(--soft); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-scroll { padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.ph-screen .ss-say, .ph-screen .ss-bubble, .ph-screen .ss-relay-msg p { font-size: 12px; }
.ph-screen .ss-say { margin: 8px 2px 2px; }
.ph-screen .ss-user, .ph-screen .ss-relay { max-width: 92%; margin: 8px 0 6px; }
.ph-screen .ss-bubble { padding: 6px 10px; }
.ph-screen .ss-row code { font-size: 10px; }
.ph-screen .ss-chip { font-size: 11px; padding: 4px 8px; }
.ph-compose { margin: 0 8px 10px; padding: 8px 8px 8px 10px; font-size: 12px; border-radius: 16px; }
.ph-compose .ss-type { left: 10px; right: 36px; }
.ph-compose i { width: 20px; height: 20px; }

/* ---------- Admin access request ---------- */
.hl-scrim { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.72); pointer-events: none; }
.hl-admin {
  position: absolute;
  width: 280px;
  box-sizing: border-box;
  padding: 16px 18px 18px;
  border: 1px solid var(--rule);
  background: #fff;
  box-shadow: 6px 6px 0 var(--ink);
}
.ad-title { display: block; font-size: 15px; margin-bottom: 10px; }
.ad-body dl { margin: 0 0 14px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: baseline; }
.ad-body dt { font-family: "JetBrains Mono", monospace; font-size: 9px; letter-spacing: 0.08em; color: var(--muted); }
.ad-body dd { margin: 0; font-size: 13px; }
.ad-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ad-btns span { display: grid; place-items: center; height: 34px; border: 1px solid var(--rule); font-weight: 600; font-size: 13px; }
.ad-ok { background: var(--green); }
.ad-no { background: #fff; color: var(--salmon); }
.ad-done { position: absolute; left: 18px; right: 18px; top: 52px; font-size: 14px; font-weight: 600; }
.ad-done::before { content: ""; display: inline-block; width: 14px; height: 14px; margin: 0 8px -2px 0; background: var(--green); border: 1px solid var(--rule); box-sizing: border-box; }

/* ---------- Touch reticles ---------- */
.reticle, .ripple { position: absolute; left: 0; top: 0; box-sizing: border-box; pointer-events: none; z-index: 5; width: 30px; height: 30px; border-radius: 50%; }
.reticle { border: 2px solid #0a0a0a; background: var(--c); }
.reticle::after { content: ""; position: absolute; left: 10px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: #0a0a0a; }
.ripple { border: 1px solid #0a0a0a; }

/* ---------- Slack surface ---------- */
.sx-pane { left: var(--pad); top: var(--pad); width: min(470px, calc(100cqw - 2 * var(--pad) - var(--phone-w) - 20px)); height: calc(100cqh - 2 * var(--pad)); }
.sx-pane .sk-head { border-bottom-color: var(--rule); }
.sx-scroll { padding: 10px 0 14px; }
.sx-pane .sk-msg { padding: 7px 16px; }
.sx-pane .sk-cont { padding: 2px 16px 2px 58px; }
.sx-pane .sk-body p { font-size: 14px; line-height: 1.45; }
.sx-pane .sk-meta { font-size: 14px; }
.sx-rule { margin: 6px 16px 4px; border-top: 1px solid var(--soft); }
.sx-via { color: var(--muted); font-size: 12.5px !important; }
.sx-pane blockquote { margin: 2px 0 0; padding: 0 0 0 10px; border-left: 3px solid var(--soft); font-size: 14px; }
.sx-pane mark { background: var(--salmon); color: inherit; padding: 0 2px; }
.sx-pane u { text-decoration-thickness: 1px; text-underline-offset: 2px; font-size: 13px; overflow-wrap: anywhere; }
.sx-reacts { margin-top: 6px; display: flex; }
.sx-react { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; box-sizing: border-box; border: 1px solid var(--rule); border-radius: 12px; font-size: 12px; font-weight: 600; }
.sx-emo { display: inline-grid; font-size: 13px; line-height: 1; }
.sx-emo i { grid-area: 1 / 1; font-style: normal; }
.sx-code { margin: 6px 0 0; padding: 6px 0; border: 1px solid var(--soft); font-family: "JetBrains Mono", monospace; font-size: 11.5px; line-height: 1.6; overflow: hidden; }
.sx-code span { display: block; padding: 0 8px; white-space: pre; }
.sx-code .add { background: var(--green); }
.sx-lcard { margin-top: 6px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--rule); max-width: 300px; box-sizing: border-box; }
.sx-lcard div { display: flex; flex-direction: column; min-width: 0; }
.sx-lcard b { font-size: 13px; }
.sx-lcard span { font-size: 11.5px; color: var(--muted); }
.sx-lcard em { margin-left: auto; font-style: normal; font-weight: 600; font-size: 12px; padding: 3px 10px; border: 1px solid var(--rule); background: var(--green); }
.sx-status { position: relative; display: flex; align-items: center; gap: 7px; height: 22px; padding: 0 16px; font-size: 12.5px; color: var(--muted); font-style: italic; }
.sx-spin { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); border: 1px solid var(--rule); box-sizing: border-box; }
.sx-st { position: relative; flex: 1; min-width: 0; height: 22px; }
.sx-st > span { position: absolute; left: 0; top: 0; height: 22px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding-right: 6px; isolation: isolate; }
.sx-st b { color: var(--ink); font-style: normal; }
.sx-st .ic-logo { width: 14px; height: 14px; margin: 0; }
.sx-st .hl-glow { position: absolute; inset: 0 0 0 -4px; background: var(--green); z-index: -1; }
.sx-st-mem { color: var(--ink); }
.sx-compose { padding: 0 14px 10px; }
.sx-compose .ss-compose { margin: 0; border-radius: 8px; }
.sx-also { display: flex; align-items: center; gap: 7px; padding: 7px 2px 0; font-size: 12px; color: var(--muted); }
.sx-also i { width: 11px; height: 11px; border: 1px solid var(--muted); box-sizing: border-box; border-radius: 2px; }

/* ---------- CLI surface (Nori CLI TUI, lightly restyled) ---------- */
.cx-term {
  left: var(--pad);
  top: var(--pad);
  width: min(520px, calc(100cqw - 2 * var(--pad) - var(--phone-w) - 20px));
  height: calc(100cqh - 2 * var(--pad));
  background: #0a0a0a;
  color: #e9e9e4;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  line-height: 1.55;
  --dim: #8b8b85;
  --cx-green: #2bff6b;
  --cx-red: #fb5e45;
}
.cx-term .dim { color: var(--dim); font-weight: 400; }
.cx-term .g { color: var(--cx-green); }
.cx-term .r { color: var(--cx-red); }
.cx-bar { flex: none; display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-bottom: 1px solid #2a2a28; color: var(--dim); font-size: 10.5px; }
.cx-bar i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid #3a3a38; box-sizing: border-box; }
.cx-bar span { margin-left: 8px; }
.cx-scroll { padding: 10px 14px 12px; display: flex; flex-direction: column; }
.cx-hd { margin-bottom: 10px; }
.cx-user { margin: 8px -14px 6px; padding: 4px 14px 5px; background: #1d1d1b; }
.cx-user p { margin: 0; }
.cx-by { display: block; color: var(--dim); font-size: 10px; }
.cx-cell { position: relative; display: grid; grid-template-columns: 16px 1fr; margin: 3px 0; isolation: isolate; }
.cx-cell code { font: inherit; color: #fff; }
.cx-cell > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-out { grid-column: 2; color: var(--dim); }
.cx-b { position: relative; display: inline-grid; align-self: start; font-style: normal; }
.cx-b s { grid-area: 1 / 1; text-decoration: none; color: var(--dim); }
.cx-b s.ok { color: var(--cx-green); font-weight: 700; }
.cx-b-on::before { content: "•"; color: var(--cx-green); font-weight: 700; }
.cx-swap { display: inline-grid; }
.cx-swap > span { grid-area: 1 / 1; }
.cx-mem .hl-glow { position: absolute; inset: -1px -6px; background: #14532b; z-index: -1; }
.cx-sep { margin: 8px 0 6px; color: var(--dim); white-space: nowrap; overflow: hidden; }
.cx-say { position: relative; margin: 4px 0 4px; padding-left: 16px; }
.cx-say .cx-dot { position: absolute; left: 0; color: var(--dim); }
.cx-say .w { display: inline-block; }
.cx-say mark { background: none; color: inherit; }
.cx-say mark .w { background: var(--cx-red); color: #0a0a0a; white-space: pre; }
.cx-diff { margin: 0 0 4px 16px; font: inherit; font-size: 10.5px; overflow: hidden; }
.cx-diff > span { display: block; white-space: pre; padding-right: 6px; }
.cx-diff i { font-style: normal; color: var(--dim); display: inline-block; width: 2ch; text-align: right; margin-right: 1ch; }
.cx-diff .add { background: #163d24; color: var(--cx-green); }
.cx-bottom { position: relative; flex: none; padding: 0 14px 8px; }
.cx-status { display: flex; align-items: center; gap: 8px; height: 20px; }
.cx-spin { width: 6px; height: 6px; border-radius: 50%; background: var(--cx-green); }
.cx-mode { position: absolute; right: 14px; top: 22px; color: var(--dim); font-size: 10.5px; }
.cx-compose { position: relative; display: flex; gap: 8px; margin-top: 18px; padding: 5px 0; border-top: 1px solid #2a2a28; white-space: nowrap; }
.cx-ph { color: var(--dim); }
.cx-type { left: 18px; right: 0; top: 5px; color: #fff; }
.cx-foot { color: var(--dim); font-size: 10px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-approve { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px 10px; background: #0a0a0a; border-top: 1px solid #2a2a28; }
.cx-approve p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-approve p + p { margin-top: 2px; }
.cx-approve .cx-opt-on { margin-top: 8px; color: var(--cx-green); font-weight: 700; }
.cx-approve p:last-child { margin-top: 8px; }

/* Narrow stages (phones, narrow tablets): the product drops its sidebar and the phone shrinks. */
@container (max-width: 560px) {
  .hl-world { font-size: 12px; --pad: 14px; --phone-w: 150px; --phone-h: 290px; }
  .ss-side { display: none; }
  .bw-bar { height: 26px; padding: 0 8px; gap: 4px; }
  .bw-bar > i { width: 7px; height: 7px; }
  .bw-url { font-size: 9px; padding: 2px 8px; max-width: 78%; }
  .ss-split { flex-direction: column; }
  .sp { flex: 0 0 132px; border-left: 0; border-top: 1px solid var(--rule); font-size: 10px; }
  .sp-head { height: 28px; padding: 0 6px; }
  .sp-tabs { flex: 1; justify-content: space-between; border-radius: 999px; }
  .sp-tab { flex: 1 1 0; justify-content: center; height: 18px; padding: 0; border-radius: 999px; }
  .sp-tab > span, .sp-x { display: none; }
  .sp-on { border-radius: 999px; }
  .sp-art-head { padding: 5px 10px; }
  .sp-art-head b { font-size: 11px; }
  .sp-kind { font-size: 8px; }
  .sp-actions, .sp-gallery { display: none; }
  .sp-art-body { padding: 6px 10px; }
  .sp-prlink { padding: 6px 10px; }
  .sp-table { font-size: 9px; }
  .sp-table th, .sp-table td { padding: 1px 5px; }
  .sp-table tr:nth-child(n+3) { display: none; }
  .sp-pre-head { padding: 4px 8px; }
  .sp-pre-head b { font-size: 9.5px; }
  .sp-pre-url { font-size: 8.5px; }
  .sv-bar { display: none; }
  .sv-doc { padding: 4px 10px 3px; }
  .sv-doc b { font-size: 10px; }
  .sv-pages { grid-template-columns: repeat(12, 1fr); gap: 3px; padding: 2px 10px 4px; }
  .sv-pages > span { aspect-ratio: auto; height: 22px; padding: 3px 2px; gap: 2px; }
  .sv-pages i { height: 1px; }
  .sv-pages em { display: none; }
  .sv-match { margin: 0 10px; font-size: 9px; }
  .ss-head { padding: 8px 12px; font-size: 12.5px; }
  .ss-scroll { padding: 10px 10px 16px; }
  .ss-bubble, .ss-say, .ss-relay-msg p, .sk-body p { font-size: 12.5px; }
  .ss-row code { font-size: 10.5px; }
  .ss-diff { font-size: 9.5px; }
  .ss-diff span { padding: 0 6px 0 calc(6px + 5ch); }
  .ss-compose { margin: 0 10px 10px; padding: 8px 8px 8px 10px; font-size: 12px; }
  .hl-phone { padding: 6px; border-radius: 22px; }
  .ph-screen { border-radius: 16px; font-size: 10px; }
  .ph-head { padding: 10px 10px 4px; }
  .ph-url { font-size: 7.5px; padding: 1px 6px; gap: 4px; }
  .ph-title { padding: 0 10px 6px; font-size: 10.5px; }
  .ph-scroll { padding: 2px 6px 8px; }
  .ph-screen .ss-say, .ph-screen .ss-bubble, .ph-screen .ss-relay-msg p { font-size: 10px; }
  .ph-screen .ss-row code { font-size: 8.5px; }
  .ph-screen .ss-chip { font-size: 9px; padding: 3px 5px; gap: 5px; max-width: 100%; box-sizing: border-box; overflow: hidden; }
  .ph-screen .ss-chip span { font-size: 7.5px; }
  .ph-screen .ss-skill-head { font-size: 9.5px; padding: 4px 6px; gap: 5px; }
  .ph-screen .ss-skill-head em { font-size: 8px; }
  .ph-compose { font-size: 10px; padding: 6px; margin: 0 6px 6px; }
  .ph-compose .ss-type { left: 6px; right: 28px; }
  .ph-compose i { width: 16px; height: 16px; }
  .hl-admin { width: 236px; }
  .sx-pane, .cx-term { width: calc(100cqw - 2 * var(--pad)); }
  .sx-pane .sk-msg { padding: 6px 10px; }
  .sx-pane .sk-cont { padding: 2px 10px 2px 52px; }
  .sx-pane .sk-body p, .sx-pane blockquote { font-size: 12.5px; }
  .sx-pane .sk-meta { font-size: 12.5px; }
  .sx-code { font-size: 9.5px; }
  .sx-code span { padding: 0 5px; }
  .sx-status { padding: 0 10px; font-size: 11px; }
  .sx-compose { padding: 0 10px 8px; }
  .cx-term { font-size: 10px; }
  .cx-scroll { padding: 8px 10px 10px; }
  .cx-user { margin: 6px -10px 4px; padding: 3px 10px 4px; }
  .cx-diff { font-size: 9px; }
  .cx-bottom { padding: 0 10px 6px; }
  .cx-mode { right: 10px; }
  .cx-approve { padding: 8px 10px; }
  .cx-approve p { white-space: normal; }
}

@media (max-width: 420px) {
  .hl-pill { --seg-w: 76px; }
}
