/* Etude — the guide pages' demos: small crops of the app, played by
 * assets/vignette.js. Each stage is laid out at its own size (data-w ×
 * data-h on the figure) in the app's own points, and scaled to the column
 * (up to data-max), like the front page's demo.
 *
 * Sizes and colours follow Etude 0.2.0's theme (MagpieUI/SettledTheme.json
 * and Theme.swift: 13 pt body, 12 pt labels, 11 pt captions, 16 pt glass
 * corners, 12 pt cards); the window and bubble colours are the ones measured
 * on screen for the front-page demo (assets/demo.css). Icons are in
 * assets/vg-icons.svg. */

.vg {
  --ad-wall:       radial-gradient(120% 90% at 18% 0%, #2a3a5c 0%, rgba(42, 58, 92, 0) 60%),
                   radial-gradient(90% 80% at 100% 100%, #1b2638 0%, rgba(27, 38, 56, 0) 70%),
                   linear-gradient(160deg, #161c28 0%, #0d1016 100%);
  --ad-win:        #191a1a;            /* the conversation */
  --ad-win-rim:    rgba(255, 255, 255, 0.10);
  --ad-bar:        #242526;            /* a window's title bar */
  --ad-side:       #2c2d2d;            /* the sidebar */
  --ad-form:       #1f1f20;            /* Settings: the window */
  --ad-form-card:  #2a2a2b;            /* Settings: a grouped section */
  --ad-ink:        #f5f5f5;
  --ad-ink-2:      #979898;            /* secondary */
  --ad-ink-3:      #6c6d6d;            /* placeholder */
  --ad-glyph:      rgba(255, 255, 255, 0.7);   /* the composer's icons */
  --ad-accent:     #4172d9;            /* accent fills */
  --ad-accent-ink: #85a9f2;            /* accent text and glyphs */
  --ad-blue:       #0a84ff;            /* the system's default button */
  --ad-danger:     #ed6b66;
  --ad-caution:    #ffca61;
  --ad-chosen:     #b8c9ef;            /* the model in use: primary mixed with the accent */
  --ad-bubble:     #262f3f;
  --ad-bubble-ink: #ffffff;
  --ad-field:      #2e2f2f;
  --ad-field-rim:  rgba(255, 255, 255, 0.08);
  --ad-quat:       rgba(255, 255, 255, 0.09);  /* a card's fill */
  --ad-hover:      rgba(255, 255, 255, 0.08);
  --ad-press:      rgba(255, 255, 255, 0.18);
  --ad-push:       #5a5a5d;            /* a push button */
  --ad-push-rim:   rgba(255, 255, 255, 0.12);
  --ad-pop:        #262627;
  --ad-rule:       rgba(255, 255, 255, 0.09);
  --ad-sel:        #3b4962;
  --sh-cmd: #b4fa72; --sh-flag: #a5d5fe; --sh-str: #fefdc2; --sh-op: #d0d1fe;
  --ad-shadow:     0 18px 50px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --ad-pop-shadow: 0 12px 34px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12);
}
:root[data-theme="light"] .vg {
  --ad-wall:       radial-gradient(120% 90% at 18% 0%, #c6d6f3 0%, rgba(198, 214, 243, 0) 60%),
                   radial-gradient(90% 80% at 100% 100%, #dfe4ee 0%, rgba(223, 228, 238, 0) 70%),
                   linear-gradient(160deg, #e3e9f3 0%, #f3f5f9 100%);
  --ad-win:        #ffffff;
  --ad-win-rim:    rgba(0, 0, 0, 0.12);
  --ad-bar:        #f3f3f3;
  --ad-side:       #f2f2f2;
  --ad-form:       #ececec;
  --ad-form-card:  #ffffff;
  --ad-ink:        #000000;
  --ad-ink-2:      #808080;
  --ad-ink-3:      #a6a6a6;
  --ad-glyph:      rgba(0, 0, 0, 0.7);
  --ad-accent:     #233870;
  --ad-accent-ink: #4165b0;
  --ad-blue:       #007aff;
  --ad-danger:     #d9453e;
  --ad-caution:    #e0a100;
  --ad-chosen:     #3a5594;
  --ad-bubble:     #dce5fb;
  --ad-bubble-ink: #000000;
  --ad-field:      #f1f1f1;
  --ad-field-rim:  rgba(0, 0, 0, 0.07);
  --ad-quat:       rgba(0, 0, 0, 0.05);
  --ad-hover:      rgba(0, 0, 0, 0.06);
  --ad-press:      rgba(0, 0, 0, 0.14);
  --ad-push:       #ffffff;
  --ad-push-rim:   rgba(0, 0, 0, 0.14);
  --ad-pop:        #ffffff;
  --ad-rule:       rgba(0, 0, 0, 0.09);
  --ad-sel:        #d4daec;
  --sh-cmd: #10a778; --sh-flag: #008ec4; --sh-str: #a89c14; --sh-op: #20a5ba;
  --ad-shadow:     0 18px 44px rgba(30, 40, 60, 0.20), 0 2px 8px rgba(30, 40, 60, 0.10);
  --ad-pop-shadow: 0 12px 30px rgba(30, 40, 60, 0.20), 0 0 0 1px rgba(0, 0, 0, 0.09);
}

/* ---- the box and the stage --------------------------------------------- */
.vg {
  --s: 1;
  position: relative;
  margin: 18px 0 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--ad-wall);
  box-shadow: 0 0 0 1px var(--line);
}
.vg-stage {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%) scale(var(--s));
  transform-origin: 50% 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 13px;
  line-height: 17px;
  color: var(--ad-ink);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
.vg-stage * { box-sizing: border-box; }
/* what the script fades, and what it removes */
.vg-stage * { transition: opacity 0.28s ease, transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), background-color 0.15s ease, color 0.15s ease, left 0.3s ease; }
.vg-stage .vg-hidden { opacity: 0 !important; pointer-events: none; }
.vg-stage .vg-gone { display: none !important; }
.vg-stage.vg-snap, .vg-stage.vg-snap * { transition: none !important; }

/* ---- the pointer --------------------------------------------------------- */
.vg-pointer {
  position: absolute; left: 0; top: 0; z-index: 30;
  width: 20px; height: 20px;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1) !important;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
.vg-pointer svg { width: 20px; height: 20px; fill: #000; stroke: #fff; stroke-width: 1.3; stroke-linejoin: round; transition: transform 0.12s ease !important; transform-origin: 25% 15%; }
.vg-pointer.is-pressing svg { transform: scale(0.82); }

/* ---- shared pieces ------------------------------------------------------- */
.vg-ic { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vg-2 { color: var(--ad-ink-2); }
.vg-cap11 { font-size: 11px; line-height: 14px; color: var(--ad-ink-2); }
.vg-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; line-height: 15px; }
.vg-spin { width: 11px; height: 11px; flex: none; border-radius: 50%; border: 1.6px solid var(--ad-press); border-top-color: var(--ad-ink-2); animation: vg-spin 0.8s linear infinite; }
@keyframes vg-spin { to { transform: rotate(360deg); } }

/* a window, or a crop of one */
.vg-win {
  position: absolute;
  overflow: hidden;
  border-radius: 14px;
  background: var(--ad-win);
  box-shadow: var(--ad-shadow), inset 0 0 0 1px var(--ad-win-rim);
}
.vg-titlebar {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 34px;
  background: var(--ad-bar);
  border-bottom: 1px solid var(--ad-rule);
  font-weight: 600; font-size: 13px;
}
.vg-lights { position: absolute; left: 13px; top: 11px; display: flex; gap: 8px; }
.vg-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.vg-lights i:nth-child(2) { background: #febc2e; }
.vg-lights i:nth-child(3) { background: #28c840; }

/* macOS buttons: a push button, the default (blue) one, a link */
.vg-push {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 10px; border-radius: 6px;
  background: var(--ad-push);
  box-shadow: 0 0 0 0.5px var(--ad-push-rim), 0 0.5px 1px rgba(0, 0, 0, 0.18);
  font-size: 13px; color: var(--ad-ink); white-space: nowrap;
}
.vg-push.small { height: 20px; padding: 0 8px; font-size: 12px; }
.vg-push.default { background: var(--ad-blue); color: #fff; box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.2); }
.vg-push.is-off { opacity: 0.45; }
.vg-push.is-pressed { filter: brightness(0.82); }
.vg-linkbtn { color: var(--ad-accent-ink); font-size: 11px; }
.vg-linkbtn.is-pressed { opacity: 0.55; }

/* ---- the sidebar --------------------------------------------------------- */
.vg-sb { position: absolute; left: 0; top: 0; bottom: 0; padding: 14px 10px; background: var(--ad-side); border-right: 1px solid var(--ad-rule); }
.vg-sb-h { padding: 0 8px 6px; font-size: 11px; font-weight: 600; color: var(--ad-ink-2); }
.vg-ws { position: relative; display: flex; align-items: center; height: 26px; padding-left: 8px; font-size: 12px; }
.vg-ws .chev { width: 9px; height: 9px; stroke-width: 2.4; color: var(--ad-ink-2); }
.vg-ws .fold { width: 16px; height: 16px; margin: 0 8px 0 6px; color: var(--ad-accent-ink); }
.vg-chat { display: flex; align-items: center; gap: 6px; height: 24px; margin: 0 0 0 21px; padding: 0 8px; border-radius: 6px; font-size: 12px; }
.vg-chat i { width: 6px; height: 6px; border-radius: 50%; background: transparent; flex: none; }
.vg-chat.is-sel { background: color-mix(in srgb, var(--ad-accent-ink) 22%, transparent); }
.vg-sb-new { display: flex; align-items: center; gap: 10px; height: 26px; margin-top: 4px; padding: 0 8px; border-radius: 6px; font-size: 12px; color: var(--ad-accent-ink); }
.vg-sb-new .vg-ic { width: 15px; height: 15px; }
.vg-sb-new.is-pressed { background: var(--ad-hover); }
.vg-ws.is-new { animation: vg-flash 1.4s ease 0.2s; border-radius: 6px; }
@keyframes vg-flash { 0%, 100% { background: transparent; } 30% { background: color-mix(in srgb, var(--ad-accent-ink) 22%, transparent); } }

/* the New Workspace popup: glass, over a dimmed window */
.vg-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.10); }
.vg-popup {
  position: absolute;
  width: 360px; padding: 20px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--ad-pop) 88%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--ad-pop-shadow);
}
.vg-popup.vg-hidden { transform: scale(0.97); }
.vg-popup h4 { margin: 0 0 16px; font-size: 13px; font-weight: 700; }
.vg-pgrid { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 6px; align-items: center; }
.vg-pgrid > .lbl { text-align: right; }
.vg-tf { height: 22px; padding: 2px 6px; border-radius: 5px; background: var(--ad-form-card); box-shadow: inset 0 0 0 1px var(--ad-push-rim); font-size: 13px; overflow: hidden; white-space: nowrap; }
.vg-tf .ph { color: var(--ad-ink-3); }
.vg-tf .val:not(:empty) + .ph { display: none; }
.vg-loc { grid-column: 2 / 4; font-size: 12px; color: var(--ad-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vg-pbtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ---- the conversation ------------------------------------------------------ */
.vg-conv { position: absolute; padding: 18px 22px 0; }
.vg-bubble {
  width: fit-content; max-width: 86%; margin-left: auto;
  padding: 6px 12px; border-radius: 12px;
  background: var(--ad-bubble); color: var(--ad-bubble-ink);
}
.vg-under { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 5px; font-size: 11px; color: var(--ad-ink-2); }
.vg-under .vg-ic { width: 12px; height: 12px; }
.vg-block { margin: 12px 0 0 28px; }
.vg-tooluse { margin-bottom: 6px; font-size: 11px; color: var(--ad-ink-2); }
.vg-card { padding: 12px; border-radius: 12px; background: var(--ad-quat); }
.vg-card > b { display: block; font-size: 12px; font-weight: 700; }
.vg-card .verb { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; font-weight: 600; }
.vg-card .verb .vg-ic { color: var(--ad-ink-2); width: 13px; height: 13px; }
.vg-card .vg-mono { margin-top: 4px; }
.vg-card .note { margin-top: 4px; font-size: 11px; line-height: 14px; color: var(--ad-ink-2); }
.vg-card .btns { display: flex; gap: 8px; margin-top: 10px; }
.sh-cmd { color: var(--sh-cmd); font-weight: 700; }
.sh-flag { color: var(--sh-flag); }
.sh-str { color: var(--sh-str); }
.sh-op { color: var(--sh-op); }
/* a run of tool calls, folded to its latest line */
.vg-fold { display: flex; align-items: center; gap: 4px; margin: 12px 0 0 28px; font-size: 11px; color: var(--ad-ink-2); white-space: nowrap; }
.vg-fold .chev { width: 10px; height: 10px; stroke-width: 2.4; }
.vg-fold .vg-ic { width: 13px; height: 13px; }
.vg-fold .line { font-size: 12px; color: var(--ad-ink); overflow: hidden; text-overflow: ellipsis; }
.vg-fold .sp { flex: 1; }
.vg-reply { margin: 8px 0 0 28px; }
.vg-reply p { margin: 0 0 6px; }
.vg-src { display: inline-block; margin-right: 4px; padding: 0 6px; border-radius: 6px; background: var(--ad-quat); font-size: 11px; color: var(--ad-ink-2); }

.vg-file.is-drag { transform: translate(-315px, 55px) scale(0.9); transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease !important; }

/* the drop target over the conversation */
.vg-drop {
  position: absolute; inset: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; border: 2px dashed var(--ad-accent-ink);
  background: color-mix(in srgb, var(--ad-win) 85%, transparent);
  color: var(--ad-ink-2); font-size: 12px; text-align: center;
}
.vg-drop .vg-ic { width: 26px; height: 26px; color: var(--ad-accent-ink); stroke-width: 1.4; }
/* a file on the desktop, dragged in */
.vg-file { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); z-index: 20; }
.vg-file .sheet { position: relative; width: 38px; height: 48px; border-radius: 3px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.vg-file .sheet::after { content: "PDF"; position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 9px; font-weight: 800; color: #e0352b; text-shadow: none; }
.vg-file .sheet::before { content: ""; position: absolute; left: 7px; right: 7px; top: 9px; height: 16px; background: repeating-linear-gradient(#c9c9c9 0 2px, transparent 2px 5px); }
:root[data-theme="light"] .vg-file { color: #1a1a1a; text-shadow: none; }

/* ---- the message box ------------------------------------------------------- */
.vg-composer {
  position: absolute;
  padding: 4px 12px 4px 6px;
  border-radius: 16px;
  background: var(--ad-field);
  box-shadow: inset 0 0 0 1px var(--ad-field-rim), 0 4px 14px rgba(0, 0, 0, 0.12);
}
.vg-above { display: flex; align-items: center; gap: 8px; padding: 6px 4px 2px 6px; font-size: 11px; color: var(--ad-ink-2); white-space: nowrap; }
.vg-above .vg-ic { width: 13px; height: 13px; }
.vg-above .xm { margin-left: auto; width: 11px; height: 11px; }
.vg-path { padding: 1px 6px; border-radius: 99px; background: color-mix(in srgb, var(--ad-accent) 16%, transparent); color: var(--ad-accent-ink); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; }
.vg-crow { display: flex; align-items: center; gap: 4px; min-height: 30px; }
.vg-cbtn { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--ad-glyph); }
.vg-cbtn .vg-ic { width: 15px; height: 15px; }
.vg-cbtn.is-pressed, .vg-cbtn.is-open { background: var(--ad-press); }
.vg-cbtn.danger { color: var(--ad-danger); }
.vg-cbtn .alt { display: none; }
.vg-cbtn.is-alt .main { display: none; }
.vg-cbtn.is-alt .alt { display: block; }
.vg-field { flex: 1; min-width: 0; margin-left: 4px; white-space: nowrap; overflow: hidden; }
.vg-field .ph { color: var(--ad-ink-3); }
.vg-field .typed:not(:empty) + .ph { display: none; }
.vg-modelbtn { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border-radius: 99px; color: var(--ad-glyph); }
.vg-modelbtn .pips { width: 15px; height: 10px; }
.vg-modelbtn .pips.alt, .vg-modelbtn.is-alt .pips.main { display: none; }
.vg-modelbtn.is-alt .pips.alt { display: block; }
.vg-modelbtn .vg-ic { width: 11px; height: 11px; stroke-width: 2; }
.vg-modelbtn.is-pressed, .vg-modelbtn.is-open { background: var(--ad-press); }
.vg-send { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ad-hover); color: var(--ad-glyph); }
.vg-send .vg-ic { width: 13px; height: 13px; stroke-width: 2.4; }
.vg-send.is-ready { background: var(--ad-accent); color: #fff; }
.vg-foot { position: absolute; font-size: 11px; color: var(--ad-ink-2); text-align: center; }

/* ---- popovers over the message box ------------------------------------------ */
.vg-pop {
  position: absolute;
  padding: 8px;
  border-radius: 14px;
  background: var(--ad-pop);
  box-shadow: var(--ad-pop-shadow);
  transform-origin: 20% 100%;
}
.vg-pop.right { transform-origin: 85% 100%; }
.vg-pop.vg-hidden { transform: scale(0.96) translateY(4px); }
.vg-opt { display: flex; align-items: baseline; gap: 4px; padding: 8px; border-radius: 6px; }
.vg-opt.is-pressed { background: var(--ad-hover); }
.vg-opt .ck { width: 11px; height: 11px; stroke-width: 2.6; color: var(--ad-accent-ink); opacity: 0; align-self: flex-start; margin-top: 3px; }
.vg-opt.is-on .ck { opacity: 1; }
.vg-opt .ico { display: grid; place-items: center; width: 20px; align-self: flex-start; color: var(--ad-ink-2); }
.vg-opt .ico .vg-ic { width: 14px; height: 14px; }
.vg-opt .ico.danger { color: var(--ad-danger); }
.vg-opt b { display: block; font-weight: 400; }
.vg-opt span { display: block; margin-top: 2px; font-size: 11px; line-height: 14px; color: var(--ad-ink-2); }

/* the model popover: the line of dots, then Thinking */
.vg-mtitle { padding: 2px 8px 6px; font-size: 12px; }
.vg-dots { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: center; padding: 8px; border-radius: 16px; background: var(--ad-quat); }
.vg-dots .end { color: var(--ad-ink-3); font-size: 11px; justify-self: center; }
.vg-dots .end .vg-ic { width: 12px; height: 12px; }
.vg-line { display: grid; grid-template-columns: repeat(4, 1fr); height: 18px; }
.vg-dc { position: relative; display: grid; place-items: center; }
.vg-dc::before, .vg-dc::after { content: ""; position: absolute; top: 50%; height: 1.5px; margin-top: -0.75px; background: var(--ad-ink-2); }
.vg-dc::before { left: 0; right: calc(50% + 9px); }
.vg-dc::after { right: 0; left: calc(50% + 9px); }
.vg-dc:first-child::before, .vg-dc:last-child::after { display: none; }
.vg-dc i { width: 11px; height: 11px; border-radius: 50%; background: var(--ad-ink); opacity: 0.8; }
.vg-dc.off i { width: 5.5px; height: 5.5px; background: var(--ad-ink-2); opacity: 1; }
.vg-dc.is-on i { background: var(--ad-chosen); opacity: 1; animation: vg-breath 2.8s ease-in-out infinite; }
.vg-dc.is-pressed i { transform: scale(1.25); background: var(--ad-ink); opacity: 1; }
@keyframes vg-breath { 50% { opacity: 0.45; } }
.vg-piprow { display: grid; grid-template-columns: repeat(4, 1fr); justify-items: center; color: var(--ad-ink); }
.vg-piprow svg { width: 15px; height: 10px; display: block; }
.vg-piprow .is-on { color: var(--ad-chosen); }
.vg-mrow { padding: 8px; font-size: 12px; border-radius: 6px; }
.vg-rule { height: 1px; margin: 4px 0; background: var(--ad-rule); }
.vg-think { padding: 8px; }
.vg-think > div:first-child { font-size: 12px; }
.vg-slider { position: relative; width: 80%; height: 20px; margin: 4px auto 0; }
.vg-slider .track { position: absolute; left: 0; right: 0; top: 9px; height: 3px; border-radius: 2px; background: var(--ad-press); }
.vg-slider .fill { position: absolute; left: 0; top: 9px; height: 3px; border-radius: 2px; background: var(--ad-accent-ink); width: var(--at); transition: width 0.35s ease; }
.vg-slider .thumb { position: absolute; top: 3px; left: var(--at); width: 15px; height: 15px; margin-left: -7.5px; border-radius: 50%; background: #fff; box-shadow: 0 0.5px 2px rgba(0, 0, 0, 0.35), 0 0 0 0.5px rgba(0, 0, 0, 0.1); transition: left 0.35s ease; }
.vg-slider.at-0 { --at: 0%; } .vg-slider.at-1 { --at: 33.333%; } .vg-slider.at-2 { --at: 66.667%; } .vg-slider.at-3 { --at: 100%; }
.vg-ticks { position: relative; width: 80%; height: 16px; margin: 3px auto 0; font-size: 11px; color: var(--ad-ink-2); }
.vg-ticks span { position: absolute; transform: translateX(-50%); }

/* ---- the page preview, beside the conversation ------------------------------- */
.vg-prev { position: absolute; top: 0; bottom: 0; right: 0; background: var(--ad-win); border-left: 1px solid var(--ad-rule); }
.vg-prev.vg-hidden { transform: translateX(30px); }
.vg-prev-h { display: flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px 0 12px; border-bottom: 1px solid var(--ad-rule); font-size: 12px; font-weight: 600; }
.vg-prev-h .sp { flex: 1; }
.vg-prev-h .vg-ic { width: 13px; height: 13px; margin-left: 8px; color: var(--ad-ink-2); }
/* the page the agent wrote: its own look, not the app's */
.vg-web { padding: 18px 20px; height: calc(100% - 30px); background: #fbf7f0; color: #2b2622; font-family: Georgia, "Times New Roman", serif; }
.vg-web small { display: block; font-family: -apple-system, sans-serif; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #a0552f; }
.vg-web h5 { margin: 4px 0 12px; font-size: 22px; line-height: 26px; font-weight: 700; }
.vg-web .book { display: flex; gap: 12px; }
.vg-web .cover { width: 58px; height: 84px; flex: none; border-radius: 2px; background: linear-gradient(160deg, #2f4a6b, #1a2b40); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.vg-web .book b { display: block; font-size: 14px; line-height: 18px; }
.vg-web .book span { display: block; margin-top: 2px; font-size: 12px; color: #6d625a; font-style: italic; }
.vg-web .when { margin-top: 8px; font-family: -apple-system, sans-serif; font-size: 11px; color: #2b2622; }
.vg-web ol { margin: 12px 0 0; padding-left: 18px; font-family: -apple-system, sans-serif; font-size: 11px; line-height: 17px; color: #4a423c; }

/* ---- Settings: a grouped form ---------------------------------------------------- */
.vg-form { position: absolute; left: 0; right: 0; top: 34px; bottom: 0; padding: 14px 18px; background: var(--ad-form); }
.vg-form > .vg-cap11 { margin: 0 4px 12px; }
.vg-sec-h { margin: 14px 10px 6px; font-size: 11px; font-weight: 600; color: var(--ad-ink-2); }
.vg-sec { padding: 4px 12px; border-radius: 10px; background: var(--ad-form-card); box-shadow: 0 0 0 0.5px var(--ad-rule); }
.vg-sec + .vg-sec { margin-top: 10px; }
.vg-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.vg-item + .vg-item { border-top: 1px solid var(--ad-rule); }
.vg-item .who { flex: 1; min-width: 0; }
.vg-item .who b { display: block; font-weight: 500; }
.vg-item .who span { display: block; margin-top: 2px; font-size: 11px; line-height: 14px; color: var(--ad-ink-2); }
.vg-tile { position: relative; display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 8px; background: #fff; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.15); overflow: hidden; color: #1a1a1a; }
.vg-tile.cal::before { content: "THU"; position: absolute; top: 3px; font-size: 6.5px; font-weight: 700; letter-spacing: 0.04em; color: #e0352b; }
.vg-tile.cal::after { content: "15"; position: absolute; top: 9px; font-size: 17px; font-weight: 300; }
.vg-tile.rem { background: #fff; }
.vg-tile.rem::before { content: ""; position: absolute; left: 6px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: #0a84ff; box-shadow: 0 7px 0 #ff9f0a, 0 14px 0 #ff453a; }
.vg-tile.rem::after { content: ""; position: absolute; left: 14px; right: 6px; top: 10px; height: 1px; background: #d0d0d0; box-shadow: 0 7px 0 #d0d0d0, 0 14px 0 #d0d0d0; }
.vg-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; background: var(--ad-quat); font-size: 11px; }
.vg-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--ad-accent-ink); }
.vg-remove { font-size: 13px; color: var(--ad-danger); }
.vg-more { color: var(--ad-ink-2); }
.vg-more .vg-ic { width: 16px; height: 16px; }
.vg-access { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--ad-rule); }
.vg-popbtn { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 6px 0 9px; border-radius: 6px; background: var(--ad-push); box-shadow: 0 0 0 0.5px var(--ad-push-rim), 0 0.5px 1px rgba(0, 0, 0, 0.18); font-size: 13px; }
.vg-popbtn .vg-ic { width: 10px; height: 10px; stroke-width: 2.4; color: var(--ad-ink-2); }
.vg-tools { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ad-ink-2); }
.vg-tools .vg-ic { width: 9px; height: 9px; stroke-width: 2.4; }

/* External Agents rows */
.vg-agent { padding: 10px 0; }
.vg-agent + .vg-agent { border-top: 1px solid var(--ad-rule); }
.vg-agent .top { display: flex; gap: 12px; }
.vg-atile { display: grid; place-items: center; width: 45px; height: 45px; flex: none; border-radius: 14px; background: #fff; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 16px; font-weight: 700; color: #1a1a1a; }
:root:not([data-theme="light"]) .vg-atile { background: rgba(255, 255, 255, 0.10); color: #f5f5f5; box-shadow: none; }
.vg-agent .who b { display: block; font-weight: 500; }
.vg-agent .by { display: flex; align-items: center; gap: 12px; margin-top: 3px; font-size: 11px; color: var(--ad-ink-2); }
.vg-agent .by a { display: inline-flex; align-items: center; gap: 3px; color: var(--ad-blue); text-decoration: none; }
.vg-agent .by .vg-ic { width: 11px; height: 11px; }
.vg-agent .why { margin-top: 3px; font-size: 11px; color: var(--ad-ink-2); }
.vg-agent .vg-push { margin: 8px 0 0 57px; }
/* the setup prompt, and connection values, each with a copy glyph */
.vg-prompt { display: flex; gap: 10px; align-items: flex-start; }
.vg-prompt .vg-mono { flex: 1; white-space: pre-wrap; color: var(--ad-ink); }
.vg-copy { display: grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 5px; color: var(--ad-ink-2); }
.vg-copy .vg-ic { width: 13px; height: 13px; }
.vg-copy .alt { display: none; color: var(--ad-accent-ink); }
.vg-copy.is-alt .main { display: none; }
.vg-copy.is-alt .alt { display: block; }
.vg-copy.is-pressed { background: var(--ad-hover); }

/* ---- Terminal (dark in either theme, like most people's) ------------------------- */
.vg-term { position: absolute; overflow: hidden; border-radius: 11px; background: #1e1e1e; color: #e8e8e8; box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.10); }
.vg-term.vg-hidden { transform: translateY(16px) scale(0.98); }
.vg-term-bar { position: relative; height: 28px; background: #2d2d2d; text-align: center; font-size: 12px; line-height: 28px; color: #b8b8b8; }
.vg-term-bar .vg-lights { top: 8px; left: 10px; }
.vg-term-body { padding: 10px 12px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; line-height: 17px; white-space: pre-wrap; }
.vg-term-body .p { color: #7ee787; }
.vg-term-body .d { color: #8b949e; }
.vg-term-body .a { color: #79c0ff; }
.vg-term-body .box { margin: 6px 0; padding: 6px 9px; border: 1px solid #3d3d3d; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  .vg-spin, .vg-dc.is-on i { animation: none; }
}

/* the empty chat's own words: the workspace, and what the agent may do there */
.vg-empty { position: absolute; left: 0; right: 0; top: 74px; text-align: center; font-size: 12px; color: var(--ad-ink-2); }
.vg-empty div { margin-top: 8px; }
.vg-wschip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: var(--ad-quat); color: var(--ad-ink); }
.vg-wschip .vg-ic { width: 12px; height: 12px; }
