@font-face {
  font-family: Instrument;
  src: url('./assets/instrument-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url('./assets/ibm-plex-mono.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f6f7f4;
  --white: #fff;
  --ink: #20251f;
  --muted: #60675e;
  --line: #dce0d8;
  --soft: #f3f5f0;
  --lime: #c3f576;
  --green: #385729;
  --mono: Plex, ui-monospace, monospace;
  font:
    16px/1.45 Instrument,
    Arial,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  min-width: 300px;
}
button,
textarea,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.62;
}
button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid #568e24;
  outline-offset: 3px;
}
button {
  touch-action: manipulation;
}
a {
  color: var(--green);
}
[hidden] {
  display: none !important;
}
svg.ico {
  height: 1.14rem;
  width: 1.14rem;
  display: inline-block;
  vertical-align: middle;
  flex: none;
}
.topbar {
  height: 70px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav-shell,
main {
  max-width: 1552px;
  margin: auto;
  padding: 0 clamp(20px, 4.1vw, 74px);
}
.nav-shell {
  display: flex;
  align-items: center;
  height: 100%;
  gap: clamp(30px, 5.2vw, 84px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.47rem;
  font-weight: 670;
  letter-spacing: -0.075em;
  white-space: nowrap;
}
.brand-ar {
  font: 500 0.73rem var(--mono);
  letter-spacing: -0.035em;
  margin-left: 4px;
  vertical-align: top;
  display: inline-block;
  margin-top: 3px;
}
nav {
  display: flex;
  align-self: stretch;
  gap: 26px;
}
.nav-link,
.text-btn,
.icon-btn {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.nav-link {
  position: relative;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 550;
  padding: 0 1px;
}
.nav-link.active {
  color: var(--ink);
}
.nav-link.active:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ink);
}
.nav-link:hover,
.text-btn:hover {
  color: #315d11;
}
.connection {
  margin-left: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 23px;
  padding: 7px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 570;
}
.connection svg {
  height: 14px;
  width: 14px;
  color: #677160;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #aaa;
}
.status-dot.ready {
  background: #6d9e3e;
  box-shadow: 0 0 0 3px #eff7e5;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 38px 0 27px;
}
.page-heading h1 {
  margin: 0;
  font-size: clamp(2.05rem, 3.25vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.065em;
  font-weight: 590;
}
.heading-period {
  color: #6b9943;
}
.page-heading p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 1rem;
}
.heading-actions {
  display: flex;
  gap: 9px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 0.91rem;
  font-weight: 610;
  white-space: nowrap;
}
.btn.secondary {
  background: white;
  border: 1px solid #cdd2c8;
}
.btn.dark,
.ask {
  background: #252c23;
  color: #fff;
  border: 1px solid #252c23;
}
.btn.dark:hover,
.ask:hover {
  background: #3c4b34;
}
.btn.secondary:hover,
.connection:hover {
  background: #f0f3ed;
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.94fr) minmax(295px, 1fr);
  gap: 18px;
  align-items: stretch;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  min-width: 0;
  box-shadow: 0 2px 3px #2b382606;
}
.panel-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 19px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 610;
  font-size: 1.02rem;
  letter-spacing: -0.026em;
}
.view-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}
.icon-btn {
  height: 34px;
  width: 34px;
  border-radius: 7px;
  color: #576052;
}
.icon-btn:hover {
  background: var(--soft);
}
.icon-btn[aria-pressed='false'] {
  background: #edf0e8;
}
.text-btn {
  color: var(--muted);
  font-weight: 550;
  font-size: 0.85rem;
  padding: 5px;
}
.viewer {
  display: flex;
  flex-direction: column;
}
.screen {
  background: #252a27;
  position: relative;
  aspect-ratio: 1.91 / 1;
  flex: 1;
  min-height: 285px;
  isolation: isolate;
  overflow: hidden;
  --reticle: #cbff87;
}
.media-plane {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  touch-action: manipulation;
}
.media-plane > img,
.media-plane > video {
  width: 100%;
  height: 100%;
  display: block;
}
.media-plane > img {
  user-select: none;
  -webkit-user-drag: none;
}
#markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hud-tag,
.anchor-hint,
.marker-name {
  position: absolute;
  background: #1d241fed;
  color: white;
  font: 500 0.73rem var(--mono);
  letter-spacing: 0.035em;
}
.hud-tag {
  left: 23px;
  top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 4px;
  pointer-events: none;
  box-shadow: 0 1px 5px #0002;
}
.hud-lamp {
  width: 9px;
  height: 9px;
  background: #fff;
  border-radius: 2px;
}
.capture-caption, .hud-tag.captured #source-tag { display: none; }
.hud-tag.captured .capture-caption { display: inline; }
.hud-tag.captured .hud-lamp { background: #ff574c; box-shadow: 0 0 0 2px #ff574c55; }
@media (prefers-reduced-motion: no-preference) {
  .hud-tag:not(.captured) .hud-lamp { animation: preview-light 3s ease-in-out infinite; }
  .hud-tag.captured .hud-lamp { animation: capture-light .22s ease-out; }
  @keyframes preview-light { 50% { opacity: .6; } }
  @keyframes capture-light { from { background: white; } 25% { background: #ff574c; transform: scale(1.3); } }
}
.screen-corners {
  position: absolute;
  inset: 12px;
  pointer-events: none;
  opacity: 0.55;
}
.screen-corners b {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 0 solid #eef4e6;
}
.screen-corners b:nth-child(1) {
  left: 0;
  top: 0;
  border-width: 1px 0 0 1px;
}
.screen-corners b:nth-child(2) {
  right: 0;
  top: 0;
  border-width: 1px 1px 0 0;
}
.screen-corners b:nth-child(3) {
  left: 0;
  bottom: 0;
  border-width: 0 0 1px 1px;
}
.screen-corners b:nth-child(4) {
  right: 0;
  bottom: 0;
  border-width: 0 1px 1px 0;
}
.anchor-hint {
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  border-radius: 4px;
  padding: 5px 9px;
  pointer-events: none;
}
.marker {
  border: 0;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  padding: 0;
  pointer-events: auto;
  background: transparent;
  display: grid;
  place-items: center;
  color: var(--reticle);
}
.marker:before {
  content: '';
  width: 10px;
  height: 10px;
  background: #262e25b8;
  border: 1.5px solid var(--reticle);
  border-radius: 50%;
  box-shadow: 0 0 0 3px #1f271e38;
}
.marker.active {
  z-index: 2;
}
.marker.active:before {
  width: 40px;
  height: 35px;
  border-radius: 6px;
  border: 1px solid #c3f5769e;
  background: #b5ff6b21;
  box-shadow: inset 0 0 0 1px #293a2433;
}
.marker.active:after {
  content: '+';
  position: absolute;
  line-height: 1;
  font-family: var(--mono);
  font-size: 18px;
  top: 8px;
  left: 14px;
  text-shadow: 0 0 2px #20281c;
}
.marker-name {
  display: none;
  pointer-events: none;
  white-space: nowrap;
  font-family: Instrument, sans-serif;
  font-size: 0.84rem;
  font-weight: 560;
  letter-spacing: 0;
}
.marker.active .marker-name {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  right: calc(100% + 25px);
  top: -25px;
  color: #f7fbea;
  border: 1px solid #c0f58a8c;
  box-shadow: 0 2px 5px #131b1333;
  border-radius: 5px;
  padding: 5px 10px;
}
.marker-name:after {
  content: '';
  position: absolute;
  top: calc(100% - 4px);
  left: 100%;
  width: 29px;
  border-top: 1px solid var(--reticle);
  transform: rotate(32deg);
  transform-origin: 0 0;
}
.marker-name em {
  font: 500 0.72rem var(--mono);
  font-style: normal;
  color: var(--reticle);
}
.marker.flip .marker-name {
  right: auto;
  left: calc(100% + 22px);
}
.marker.flip .marker-name:after {
  left: auto;
  right: 100%;
  transform: rotate(-32deg);
  transform-origin: 100% 0;
}
.view-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 15px 19px;
  background: #fff;
}
.scene-caption {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}
.scene-caption > div {
  min-width: 0;
}
.scene-caption strong {
  display: block;
  font-size: 1rem;
  font-weight: 610;
  line-height: 1.3;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scene-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 37px;
  height: 37px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #515a4b;
  background: var(--soft);
}
.micro,
.frame-size,
.model-pill,
.latency,
.anchor-id {
  font: 500 0.73rem/1.4 var(--mono);
  letter-spacing: 0.055em;
}
.micro {
  color: #5c6657;
}
.frame-size {
  color: #646e5e;
  background: var(--soft);
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  letter-spacing: 0;
}
.guide {
  display: flex;
  flex-direction: column;
}
.guide-glyph {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #e6f5d4;
  color: #3b502b;
}
.model-pill {
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  border: 1px solid var(--line);
  padding: 3px 6px;
  border-radius: 4px;
  color: #5e665a;
}
.guide-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
}
.guide-reading {
  border-left: 2px solid #add676;
  padding-left: 13px;
  min-width: 0;
}
.reading-source {
  display: flex;
  align-items: center;
  gap: 7px;
}
.reading-source svg {
  width: 13px;
  height: 13px;
}
.guide-reading h3 {
  font-weight: 610;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 8px 0;
}
.guide-reading p {
  font-size: 0.94rem;
  line-height: 1.48;
  color: #525c4f;
  margin: 0;
  overflow-wrap: anywhere;
}
.guide-reading.problem {
  border-color: #d59b54;
}
.latency {
  display: inline-block;
  margin-top: 7px;
  color: var(--green);
  letter-spacing: 0;
}
#image-context {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.prompts {
  margin-top: auto;
}
.prompts h4 {
  margin: 0 0 7px;
  font-weight: 600;
  font-size: 0.85rem;
}
.suggestion {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 5px 0;
  color: #535e4e;
  font-size: 0.88rem;
}
.suggestion svg {
  width: 14px;
  height: 14px;
  color: #7b8675;
}
.suggestion:hover {
  color: #25480f;
  text-decoration: underline;
}
.composer {
  background: #f8f9f6;
  border: 1px solid #cfd5c9;
  border-radius: 9px;
  padding: 9px 9px 8px;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: end;
  gap: 1px;
}
.composer:focus-within {
  border-color: #66834e;
}
.composer textarea {
  width: 100%;
  resize: vertical;
  min-height: 35px;
  max-height: 160px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.94rem;
  line-height: 1.35;
  padding: 2px 3px;
}
.composer textarea:focus-visible {
  outline: none;
}
.ask {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.83rem;
  font-weight: 560;
}
.ask svg {
  width: 14px;
  height: 14px;
}
.guide-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 20px;
  border-top: 1px solid var(--line);
  color: #687063;
  font-size: 0.77rem;
  background: #fafbf8;
}
.inference-mark {
  font-size: 1.4rem;
  font-weight: 650;
  color: #bf6439;
  line-height: 1;
}
.foot-divider {
  height: 11px;
  margin: 0 2px;
  border-left: 1px solid #c4c9bf;
}
.anchor-section {
  margin-top: 25px;
}
.anchor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}
.anchor-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.18rem;
  font-weight: 610;
  letter-spacing: -0.035em;
}
.anchor-head h2 span {
  background: #e9ede5;
  border: 1px solid #d6dccf;
  border-radius: 5px;
  font: 500 0.72rem var(--mono);
  padding: 2px 6px;
}
.anchor-desc {
  font-size: 0.85rem;
  color: var(--muted);
}
.anchor-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.anchor-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 37px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px;
  background: white;
  text-align: left;
}
.anchor-card.active {
  background: #eff6e5;
  border-color: #94ac77;
}
.anchor-card:hover {
  border-color: #92a283;
}
.anchor-symbol {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  background: #f0f2ed;
  border: 1px solid #e0e4da;
  border-radius: 8px;
  color: #526049;
}
.active .anchor-symbol {
  background: #dbedc5;
  border-color: #ccdeb7;
  color: #385324;
}
.anchor-card strong {
  display: block;
  font-size: 0.99rem;
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.anchor-card small {
  display: block;
  color: var(--muted);
  font-size: 0.79rem;
}
.anchor-card > span:nth-child(2) {
  min-width: 0;
}
.anchor-id {
  color: #6a7463;
  font-size: 0.65rem;
  letter-spacing: 0;
  align-self: start;
  position: absolute;
  right: 9px;
  top: 7px;
}
.anchor-card.lost {
  opacity: 0.7;
}
#empty-anchors {
  padding: 20px;
  background: white;
  border: 1px dashed #bdc6b6;
  border-radius: 9px;
  color: var(--muted);
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #626e5b;
  border-top: 1px solid #dce0d6;
  margin: 25px 0 18px;
  padding-top: 14px;
  font-size: 0.8rem;
}
footer > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
footer svg.ico {
  width: 14px;
  height: 14px;
}
footer .text-btn {
  font-size: 0.8rem;
}
.notice {
  border: 1px solid #dfc7a5;
  background: #fff8eb;
  color: #654a25;
  border-radius: 8px;
  padding: 9px 13px;
  margin: 0 0 12px;
  font-size: 0.9rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
dialog {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  width: min(500px, calc(100% - 28px));
  max-height: 85dvh;
  box-shadow: 0 24px 90px #16251235;
}
dialog::backdrop {
  background: #1d261c61;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}
.modal-body {
  padding: 18px 20px;
  overflow-wrap: anywhere;
}
.modal-body p {
  margin: 0 0 13px;
  color: var(--muted);
  line-height: 1.5;
}
.modal-body p:last-child {
  margin-bottom: 0;
}
.modal-body h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}
.modal-body code {
  display: block;
  font: 500 0.8rem/1.65 var(--mono);
  padding: 10px;
  border-radius: 6px;
  background: var(--soft);
  margin-bottom: 12px;
  white-space: pre-wrap;
}
.modal-body li {
  margin: 0 0 10px;
}
.modal-body ol {
  margin: 0;
  padding-left: 20px;
}
.modal-body input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
  width: 100%;
  margin: 8px 0;
}
.log-entry {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.log-entry:last-child {
  border: 0;
}
.log-entry time {
  font: 500 0.72rem var(--mono);
  color: var(--muted);
}
.log-entry p {
  margin: 5px 0;
}
.modal-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.viewer:fullscreen,
.viewer.expanded {
  width: 100%;
  height: 100%;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}
.viewer.expanded {
  position: fixed;
  inset: 0;
  z-index: 20;
}
.viewer:fullscreen .screen,
.viewer.expanded .screen {
  flex: 1;
  aspect-ratio: auto;
}
@media (min-width: 1450px) {
  .page-heading {
    padding: 43px 0 32px;
  }
  .guide-content {
    padding: 24px;
    gap: 21px;
  }
  .guide-reading h3 {
    font-size: 1.45rem;
  }
  .guide-reading p,
  .suggestion {
    font-size: 1rem;
  }
}
@media (max-width: 1020px) {
  .nav-shell,
  main {
    padding-inline: 24px;
  }
  .workbench {
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr);
    gap: 12px;
  }
  .guide-content {
    padding: 15px;
    gap: 13px;
  }
  .anchor-list {
    gap: 8px;
  }
  .anchor-card {
    gap: 7px;
    padding: 15px 10px;
  }
  .panel-head {
    padding-inline: 14px;
  }
  .screen {
    min-height: 265px;
  }
}
@media (max-width: 760px) {
  .nav-shell,
  main {
    padding-inline: 16px;
  }
  .nav-shell {
    gap: 16px;
  }
  .topbar {
    height: 60px;
  }
  nav {
    gap: 14px;
  }
  .nav-link {
    font-size: 0.84rem;
  }
  .nav-link svg {
    display: none;
  }
  .connection {
    font-size: 0.78rem;
    padding: 6px 9px;
  }
  .connection svg {
    display: none;
  }
  .page-heading {
    padding: 25px 0 18px;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .heading-actions {
    gap: 8px;
  }
  .btn {
    padding: 9px 13px;
  }
  .workbench {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .screen {
    min-height: 0;
    flex: auto;
    aspect-ratio: 1.57;
  }
  .guide-content {
    padding: 17px;
    gap: 15px;
  }
  .guide-head,
  .panel-head {
    min-height: 49px;
  }
  .anchor-list {
    grid-template-columns: 1fr 1fr;
  }
  .anchor-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .view-caption {
    padding: 12px 14px;
  }
  .anchor-section {
    margin-top: 20px;
  }
  .composer {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 5px;
  }
  .guide-foot {
    padding: 9px 17px;
  }
  .anchor-desc {
    font-size: 0.83rem;
  }
}
@media (max-width: 460px) {
  .nav-shell {
    gap: 13px;
  }
  .brand {
    gap: 7px;
    font-size: 1.26rem;
  }
  .brand img {
    width: 29px;
    height: 29px;
  }
  .brand-ar {
    font-size: 0.59rem;
  }
  .nav-link.active {
    display: none;
  }
  .connection {
    font-size: 0.75rem;
  }
  .guide-content {
    gap: 13px;
  }
  .anchor-card {
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 15px 8px;
    gap: 7px;
  }
  .anchor-symbol {
    width: 30px;
    height: 30px;
  }
  .anchor-card strong {
    font-size: 0.91rem;
  }
  .frame-size {
    font-size: 0.65rem;
  }
  .hud-tag {
    top: 15px;
    left: 15px;
  }
  .marker.active .marker-name {
    right: calc(100% + 9px);
    top: -26px;
  }
  .marker.flip.active .marker-name {
    right: auto;
    left: calc(100% + 9px);
  }
  .marker-name:after {
    width: 16px;
    transform: rotate(45deg);
  }
  footer {
    margin-bottom: 12px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background 0.15s,
      border-color 0.15s,
      color 0.15s;
  }
  .ask.waiting svg {
    animation: spin 1.2s linear infinite;
  }
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
}
.manual-btn {
  border: 1px solid var(--line);
  background: #f8f9f6;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 7px;
  padding: 9px 10px;
  text-align: left;
  min-width: 0;
}
.manual-btn:hover {
  background: #f0f4e9;
}
.manual-icon {
  width: 30px;
  height: 32px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: #607050;
  background: #eaf0e2;
}
.manual-btn > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.manual-btn small {
  display: block;
  color: #62705a;
  font-size: 0.76rem;
  line-height: 1.2;
}
.manual-btn strong {
  display: block;
  color: #38432f;
  font-weight: 560;
  font-size: 0.87rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.manual-btn > svg {
  width: 15px;
  height: 15px;
  color: #7b8574;
}
.ask-actions,
.manual-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.manual-actions {
  margin-top: 12px;
}
.modal-body > a {
  display: inline-block;
  margin: 8px 10px 13px 0;
}
.modal-body small + h3,
.modal-body a + h3 {
  margin-top: 12px;
}
.ask-actions {
  justify-self: stretch;
  gap: 7px;
}
#input-mode {
  appearance: none;
  color: #5a6554;
  font-size: 0.78rem;
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%235a6554' stroke-width='1.4'%3E%3Cpath d='m3 5 3 3 3-3'/%3E%3C/svg%3E")
    no-repeat right 2px center;
  border: 0;
  padding: 5px 17px 5px 2px;
  margin-right: auto;
  max-width: 44%;
}
@media (max-width: 760px) {
  .composer {
    grid-template-columns: 1fr;
  }
  .ask-actions {
    width: 100%;
  }
}

.adjust {
  display: block;
  padding: 3px 0;
  margin-top: 5px;
  color: var(--green);
}
.screen.positioning .media-plane,
.screen.positioning .marker {
  cursor: crosshair;
}

/* The guide and anchor editor share a scene and a single camera stream. */
.nav-utils {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  text-decoration: none;
  white-space: nowrap;
}
#empty-view,
#quick-question-label {
  display: none;
}

.voice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #32482c;
  border-radius: 7px;
  background: #32482c;
  color: white;
  font: inherit;
  font-size: .91rem;
  font-weight: 600;
  cursor: pointer;
}
.voice-btn:hover:enabled { background: #253c20; }
.voice-btn[aria-pressed='true'] { background: #85402f; border-color: #85402f; }
.voice-btn svg { width: 18px; height: 18px; }
.voice-status { color: #40543a; font-size: .9rem; line-height: 1.45; margin: 8px 0 0; }
#capture-hint { display: block; margin-top: 8px; color: var(--muted); font-size: .82rem; }
[data-empty='true'] #capture-hint { display: none; }
#cancel-btn { min-height: 44px; }
.ask-actions .ask, [data-view='guide'] .ask-actions .ask {
  min-height: 42px;
  border: 1px solid #b9c2b2;
  background: white;
  color: #2c4027;
}
.ask-actions .ask:hover:enabled { background: #f0f4ec; }
@media (max-width: 560px) {
  [data-view='guide'] .guide-content .composer { grid-template-columns: minmax(0, 1fr); }
  .ask-actions { flex-wrap: wrap; }
  [data-view='guide'] .ask-actions { justify-content: flex-end; }
}
[data-empty='true'] #empty-view {
  display: flex;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 17px;
}
[data-empty='true'] .screen {
  background-color: #edf2e8;
  background-image: radial-gradient(#bfccaf 1px, transparent 1px);
  background-size: 18px 18px;
  min-height: 250px;
}
[data-empty='true'] .hud-tag,
[data-empty='true'] .screen-corners,
[data-empty='true'] .view-caption,
[data-empty='true'] .viewer-head,
[data-empty='true'] #anchor-hint {
  display: none !important;
}
.capture-symbol {
  position: relative;
  color: #435d32;
  display: grid;
  place-items: center;
  width: 70px;
  height: 56px;
}
.capture-symbol .ico {
  width: 33px;
  height: 33px;
  stroke-width: 1.5;
}
.capture-symbol b {
  position: absolute;
  width: 13px;
  height: 13px;
  border: solid #6d8856;
  border-width: 0;
}
.capture-symbol b:nth-of-type(1) {
  left: 0;
  top: 0;
  border-width: 2px 0 0 2px;
}
.capture-symbol b:nth-of-type(2) {
  right: 0;
  top: 0;
  border-width: 2px 2px 0 0;
}
.capture-symbol b:nth-of-type(3) {
  left: 0;
  bottom: 0;
  border-width: 0 0 2px 2px;
}
.capture-symbol b:nth-of-type(4) {
  right: 0;
  bottom: 0;
  border-width: 0 2px 2px 0;
}
.sample-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #edf2e8;
  border: 0;
  border-radius: 5px;
  color: #48573f;
  padding: 3px 7px;
  font-size: 0.86rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sample-btn img {
  width: 25px;
  height: 21px;
  object-fit: cover;
  border-radius: 4px;
}
.screen.drop-ready {
  outline: 3px solid #668e42;
  outline-offset: -4px;
}
#reading-text {
  white-space: pre-line;
}
.answer-sources {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 10px;
  font-size: 0.84rem;
}
.answer-sources a {
  overflow-wrap: anywhere;
  text-underline-offset: 2px;
}
[data-view='guide'] main {
  max-width: 960px;
}
[data-view='guide'] .page-heading {
  padding: 34px 0 22px;
}
[data-view='guide'] .workbench {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
[data-view='guide'] .workbench .panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
[data-view='guide'] .screen {
  height: clamp(230px, 36vh, 360px);
  min-height: 0;
  flex: none;
  aspect-ratio: auto;
}
[data-view='guide'][data-empty='true'] .screen {
  height: clamp(220px, 30vh, 300px);
}
[data-view='guide'] .viewer-head {
  min-height: 58px;
  gap: 5px;
}
[data-view='guide'] .viewer-head h2 {
  flex: 1;
}
[data-view='guide'] #viewer-controls .btn {
  padding: 6px 10px;
  font-size: 0.82rem;
}
[data-view='guide'] .guide-head,
[data-view='guide'] .view-caption,
[data-view='guide'] .anchor-section,
[data-view='guide'] #overlay-btn,
[data-view='guide'] #reference-btn,
[data-view='guide'] #manual-btn,
[data-view='guide'] .prompts,
[data-view='guide'] #input-mode,
[data-view='guide'] #anchor-hint,
[data-view='guide'] footer,
[data-view='guide'] #adjust-btn {
  display: none !important;
}
[data-view='guide'] .guide-content {
  padding: 18px 20px;
  gap: 17px;
}
[data-view='guide'] #ask-form {
  order: -1;
}
[data-view='guide'] .composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0;
  column-gap: 15px;
  background: white;
  border: 0;
}
[data-view='guide'] #quick-question-label {
  display: block;
  grid-column: 1/-1;
  justify-self: start;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
}
[data-view='guide'] .composer textarea {
  font-size: 1.05rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 52px;
  border: 1px solid var(--line);
  background: #f9faf7;
  padding: 7px 10px;
  border-radius: 7px;
}
[data-view='guide'] .composer textarea:focus-visible {
  outline: 2px solid #779a54;
  outline-offset: 1px;
}
[data-view='guide'] .ask-actions {
  display: grid;
  grid-template-columns: minmax(6rem, max-content) minmax(5rem, max-content);
  align-self: stretch;
  align-items: center;
}
[data-view='guide'] .ask {
  background: #32482c;
  padding: 11px 17px;
  font-size: 0.93rem;
}
[data-view='guide'] .guide-reading h3 {
  font-size: 1.14rem;
}
[data-view='guide'] .guide-reading p {
  font-size: 1rem;
  color: #354130;
}
[data-view='guide'] .guide-foot {
  padding-left: 20px;
}
[data-view='guide'] .marker {
  pointer-events: none;
}
[data-view='guide'] .marker-name em {
  display: none;
}
.target-ring {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 25px;
  height: 25px;
  box-sizing: border-box;
  border: 3px solid #fc523f;
  border-radius: 50%;
  box-shadow: 0 0 0 2px white, inset 0 0 0 1px white, 0 1px 6px #221410ab;
  pointer-events: none;
}
.target-ring::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fc523f;
  box-shadow: 0 0 0 1px white;
}
[data-view='guide'] .marker.active .target-ring, #captured-ring { display: block; }
[data-view='guide'] .marker.active::before, [data-view='guide'] .marker.active::after { display: none; }
[data-view='guide'] .marker.active.near-top .marker-name { top: 29px; }
[data-view='guide'] .marker.active.near-top .marker-name::after { display: none; }
#marked-capture { margin: 0; padding: 12px 16px; background: #eef2ea; }
#marked-capture figcaption { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 8px; font-size: .85rem; }
.capture-picture { position: relative; width: fit-content; max-width: 100%; margin: auto; }
.capture-picture img { display: block; max-width: 100%; max-height: 32vh; border-radius: 4px; }
#marker-status { display: block; margin-top: 8px; font-size: .88rem; color: #45553e; }
[data-view='guide'] .viewer:fullscreen .screen,
[data-view='guide'] .viewer.expanded .screen {
  height: auto;
  flex: 1;
}
@media (max-width: 760px) {
  .topbar {
    height: auto;
  }
  .nav-shell {
    min-height: 80px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 43px 35px;
    gap: 0;
    padding-top: 5px;
  }
  .nav-utils {
    grid-column: 2;
    grid-row: 1;
  }
  .nav-shell nav {
    grid-column: 1/-1;
    grid-row: 2;
    gap: 20px;
    align-items: stretch;
  }
  .nav-link,
  .nav-link.active {
    display: inline-flex;
    font-size: 0.87rem;
  }
  [data-view='guide'] .page-heading {
    padding: 22px 0 16px;
  }
  [data-view='guide'] .guide-content {
    padding: 13px 14px;
  }
  [data-view='guide'] .viewer-head {
    min-height: 48px;
    padding-inline: 8px;
  }
  [data-view='guide'] .viewer-head h2 {
    font-size: 0.9rem;
    gap: 4px;
  }
  [data-view='guide'] #viewer-controls .btn {
    padding: 6px 7px;
    font-size: 0.76rem;
  }
  [data-view='guide'] .ask {
    font-size: 0.85rem;
    padding: 8px 10px;
  }
  [data-view='guide'] .composer {
    gap: 5px;
  }
  [data-view='guide'] .screen {
    height: clamp(195px, 32vh, 290px);
  }
}
@media (max-width: 450px) {
  [data-view='guide'] .viewer-head h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

.model-settings,
.request-activity {
  min-width: 0;
  border-top: 1px solid var(--line);
}
[data-view='guide'] #ask-form {
  order: -3;
}
[data-view='guide'] .model-settings {
  order: -2;
}
.request-activity {
  order: 3;
}
.model-settings summary,
.request-activity summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0;
  cursor: pointer;
  list-style: none;
  font-size: 0.93rem;
  font-weight: 610;
}
.model-settings summary::-webkit-details-marker,
.request-activity summary::-webkit-details-marker {
  display: none;
}
.model-settings summary::after,
.request-activity summary::after {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid;
  border-bottom: 1.5px solid;
  transform: rotate(45deg);
  flex: none;
  margin: -0.2rem 0.2rem 0 0;
}
details[open] > summary::after {
  transform: rotate(225deg);
  margin-top: 0.25rem;
}
.model-settings summary span:first-child,
.request-activity summary > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
#model-summary {
  margin-left: auto;
  font-size: 0.83rem;
  color: var(--muted);
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
  min-width: 0;
}
#request-activity {
  container: request-activity / inline-size;
}
.activity-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 2px 10px;
  margin-left: auto;
  color: var(--muted);
  font: 500 .875rem/1.35 var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
#activity-elapsed, .activity-rate { white-space: nowrap; }
.activity-rate {
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 10px;
}
#activity-rate.measured { color: var(--green); font-weight: 600; }
@container request-activity (max-width: 25rem) {
  .activity-numbers { flex-direction: column; align-items: flex-end; }
  .activity-rate { border: 0; padding: 0; }
}
.settings-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.8rem;
  margin: 0.1rem 0 0.6rem;
}
.settings-fields .wide {
  grid-column: 1 / -1;
}
.settings-fields label {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 0.3rem;
  font-weight: 590;
  font-size: 0.875rem;
}
.settings-fields select,
.settings-fields input {
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.6rem;
  font: inherit;
  font-weight: 450;
  font-size: 1rem;
  color: var(--ink);
  background: #fafbf8;
  border: 1px solid #c9d0c4;
  border-radius: 6px;
}
.settings-fields p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}
.settings-fields .fallback-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.4rem 0;
  cursor: pointer;
}
.fallback-toggle input[type='checkbox'] {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}
#fallback-hint {
  padding-left: 1.65rem;
}
#activity-lines {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0.35rem 0.6rem;
  max-height: 10.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f5f7f2;
  border: 1px solid var(--line);
  border-radius: 6px;
}
#activity-lines li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.2rem;
  padding: 0.24rem 0;
  font-size: 0.88rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
#activity-lines time {
  font: 0.78rem/1.6 var(--mono);
  color: var(--muted);
}
#repeat-frame {
  margin-top: 0.65rem;
}
#frame-comparison {
  border-top: 1px solid var(--line);
  margin-top: 0.9rem;
  padding-top: 0.65rem;
}
#frame-comparison h4 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
}
.comparison-run {
  display: grid;
  gap: 0.1rem;
  margin: 0.55rem 0;
  font-size: 0.84rem;
  color: var(--muted);
}
.comparison-run p,
.speed-help p {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.request-activity .comparison-run summary,
.request-breakdown .speed-help summary {
  width: fit-content;
  padding: 0.35rem 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}
#frame-comparison strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}
@media (max-width: 470px) {
  .settings-fields {
    grid-template-columns: 1fr;
  }
  .model-settings summary {
    flex-wrap: wrap;
  }
  #model-summary {
    max-width: 53%;
  }
  #activity-lines li {
    grid-template-columns: 3.9rem 1fr;
  }
}

.throughput {
  margin: 20px 0 24px;
  padding: clamp(16px, 3vw, 26px);
}
.throughput-head, .throughput-stats, .throughput-peak {
  display: flex;
  align-items: center;
}
.throughput-head, .throughput-stats {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.throughput-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -.035em;
}
.throughput-switch {
  display: inline-flex;
  min-width: 0;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--soft);
}
.throughput-switch label {
  position: relative;
  cursor: pointer;
}
.throughput-switch input {
  position: absolute;
  opacity: 0;
}
.throughput-switch span {
  display: block;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 560;
  color: var(--muted);
}
.throughput-switch input:checked + span {
  background: #fff;
  box-shadow: 0 0 0 1px #cfd6c8;
  color: var(--green);
}
.throughput-switch input:focus-visible + span, #throughput-plot:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.throughput-stats {
  margin: 16px 0 10px;
  align-items: flex-end;
}
.throughput-label {
  font-size: .875rem;
  font-weight: 560;
  color: var(--muted);
}
.throughput-peak {
  gap: 6px;
  align-items: baseline;
  color: var(--green);
}
#throughput-max {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}
.throughput-peak span, #throughput-state {
  font-size: .9rem;
}
#throughput-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  color: var(--muted);
}
#throughput-state::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #86927e;
}
#throughput-state.working::before {
  background: #5b813f;
}
.throughput-figure {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px 8px;
  margin: 12px 0;
}
.throughput-unit, .throughput-figure figcaption {
  font-size: .83rem;
  color: var(--muted);
}
.throughput-unit { grid-column: 1 / -1; }
.throughput-axis-y, .throughput-axis-x {
  font: .78rem/1 var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.throughput-axis-y {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 0 1px;
  min-width: 3ch;
}
#throughput-plot {
  display: block;
  width: 100%;
  height: 108px;
  min-width: 0;
}
.throughput-axis-x {
  grid-column: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  margin: 3px 0;
}
.throughput-axis-x span:last-child { text-align: right; }
.throughput-figure figcaption { grid-column: 2; text-align: center; }
#throughput-reading, .throughput-help {
  margin: 0;
  font-size: .875rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
#throughput-reading { font-weight: 590; }
.throughput-help { color: var(--muted); margin-top: 2px; }
.capture-diamond { display: inline-block; width: .55em; height: .55em; background: #b43729; transform: rotate(45deg); }

.request-breakdown {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.breakdown-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px 12px;
}
.breakdown-heading h3 { margin: 0; font-size: 1rem; }
#request-usage-status, .request-measures dt {
  color: var(--muted);
  font-size: .875rem;
}
.request-measures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 12px 0 8px;
}
.request-measures dd {
  margin: 2px 0 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.request-breakdown summary { cursor: pointer; }
@media (max-width: 520px) {
  .request-measures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
#public-allowance {
  display: block;
  margin-top: 0.6rem;
  color: var(--muted, #54604f);
  font-size: 0.8125rem;
  line-height: 1.45;
}
#public-allowance[hidden] { display: none; }
