:root {
  --bg: #ffffff;
  --sidebar: #fbfbfb;
  --surface: #ffffff;
  --hover: #f4f4f5;
  --border: #ebebed;
  --border-strong: #d9d9de;
  --text: #0f0f10;
  --text-2: #5c5c64;
  --text-3: #8b8b93;
  --primary: #0f0f10;
  --on-primary: #ffffff;
  --accent: #0e9f6e;
  --accent-soft: #e6f6ef;
  --danger: #c8341c;
  --danger-soft: #fdeceb;
  --warn: #9a5b00;
  --warn-soft: #fff3df;
  --mask: 14, 159, 110;
  --lookalike: 214, 88, 150;
  /* the Benchmarks page's public models, one colour each (our service's is --accent) */
  --m1: #2563c9; --m2: #6a4bc9;
  --shadow: 0 1px 2px rgba(15, 15, 16, .04), 0 6px 24px rgba(15, 15, 16, .05);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 248px;
  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0d;
    --sidebar: #111113;
    --surface: #151517;
    --hover: #1e1e21;
    --border: #26262a;
    --border-strong: #36363c;
    --text: #f3f3f4;
    --text-2: #a9a9b1;
    --text-3: #76767e;
    --primary: #f3f3f4;
    --on-primary: #0c0c0d;
    --accent: #34d39e;
    --accent-soft: #0f2a20;
    --danger: #ff7a66;
    --danger-soft: #2f1613;
    --warn: #f2b45a;
    --warn-soft: #2d2210;
    --mask: 52, 211, 158;
    --lookalike: 244, 128, 186;
    --m1: #6b9cff; --m2: #a58cf5;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6;
      stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Layout: sidebar and main column */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; width: var(--sidebar-w); flex: none;
  display: flex; flex-direction: column; gap: 20px; padding: 18px 14px;
  background: var(--sidebar); border-right: 1px solid var(--border);
  transition: width .18s ease;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px; text-decoration: none;
         font-weight: 650; font-size: 19px; letter-spacing: -.02em; }
.brand-mark { width: 26px; height: 26px; }
.brand-mark rect { fill: var(--primary); stroke: none; }
.brand-mark path { stroke: var(--on-primary); stroke-width: 2.4; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
            text-decoration: none; color: var(--text-2); font-weight: 500; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--hover); color: var(--text); }
.nav-bottom { margin-top: auto; }
.nav-bottom + .sidebar-foot { margin-top: 0; }
.sidebar-foot { margin-top: auto; padding: 12px; border: 1px solid var(--border); border-radius: 12px;
                background: var(--surface); font-size: 13px; color: var(--text-2); }
.sidebar-foot .foot-title { margin-bottom: 8px; font-weight: 600; color: var(--text); }
.sidebar-foot .foot-row { display: flex; justify-content: space-between; gap: 8px; }
.sidebar-foot .foot-row + .meter { margin: 6px 0 10px; }
.sidebar-foot .meter:last-child { margin-bottom: 0; }
.sidebar-foot strong { color: var(--text); font-weight: 600; }
.sidebar-foot .paused { margin-top: 10px; color: var(--danger); }
.sidebar-foot a.foot-title { display: block; text-decoration: none; }
.sidebar-foot a.foot-title:hover { text-decoration: underline; }
.sidebar-foot .paused + .foot-title { margin-top: 10px; }
.sidebar-user { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 0 4px;
                font-size: 13px; color: var(--text-2); }
.sidebar-user[hidden] { display: none; }
.user-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user a { flex: none; color: var(--text-2); text-decoration: none; }
.sidebar-user a:hover { color: var(--text); text-decoration: underline; }

.app.collapsed .sidebar { width: 72px; }
.app.collapsed .nav-text { display: none; }
.app.collapsed .brand, .app.collapsed .nav-item { justify-content: center; padding-inline: 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
          height: 60px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 88%, transparent);
          backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.crumb { font-weight: 550; }
.topbar-right { margin-left: auto; }
.bell:not([hidden]) + .topbar-right { margin-left: 0; }

/* The bell: the user's notifications, in a panel under it */
.bell { position: relative; }
.bell-count { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px;
              border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 650;
              line-height: 17px; text-align: center; }
.bell-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: 360px; max-height: 70vh;
              overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm);
              background: var(--surface); box-shadow: 0 8px 32px rgba(15, 15, 16, .12); }
.bell-head { padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 600; }
.bell-list { margin: 0; padding: 4px; list-style: none; }
.bell-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 10px 10px 22px; border-radius: 8px;
               color: var(--text-2); font-size: 13.5px; line-height: 1.45; text-decoration: none; }
.bell-list a:hover { background: var(--hover); color: var(--text); }
.bell-list .unread a { position: relative; color: var(--text); }
.bell-list .unread a::before { content: ""; position: absolute; top: 17px; left: 9px; width: 7px; height: 7px;
                               border-radius: 50%; background: var(--accent); }
.bell-list time { font-size: 12px; color: var(--text-3); }
.bell-empty { margin: 0; padding: 14px; font-size: 13px; color: var(--text-3); }
.view { width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 32px 64px; }
.scrim { display: none; }

/* Controls */
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
            border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
       border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface);
       text-decoration: none; font-weight: 500; font-size: 14px; cursor: pointer; }
.btn:hover { background: var(--hover); }
.btn-ghost { border-color: var(--border); }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--hover); gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px;
                    font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.meter { height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.meter.full > span { background: var(--danger); }

/* Home: composer */
.hero { display: flex; flex-direction: column; align-items: center; padding: 48px 0 8px; }
.hero-title { margin: 0 0 28px; font-size: clamp(28px, 4vw, 40px); font-weight: 550;
              letter-spacing: -.025em; text-align: center; }
.composer { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 760px;
            padding: 8px 8px 8px 10px; border: 1px solid var(--border); border-radius: 999px;
            background: var(--surface); box-shadow: var(--shadow); transition: border-color .15s; }
.composer:focus-within, .composer.ready { border-color: var(--border-strong); }
.attach { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
          border: 0; background: var(--hover); cursor: pointer; color: var(--text); }
.attach:hover { background: var(--border); }
.composer-input { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent;
                  font-size: 16px; padding: 0 6px; }
.composer-input::placeholder { color: var(--text-3); }
.send { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%;
        border: 0; background: var(--primary); color: var(--on-primary); cursor: pointer; }
.send:disabled { background: var(--border-strong); color: var(--surface); cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 8px; max-width: 38%; flex: none;
        padding: 4px 6px 4px 4px; border-radius: 999px; background: var(--hover); font-size: 13px; }
.chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--border); }
.chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-x { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 0;
          background: transparent; cursor: pointer; color: var(--text-2); }
.chip-x svg { width: 16px; height: 16px; }
.chip-x:hover { background: var(--border); color: var(--text); }
.hero-note { margin: 14px 0 0; font-size: 13px; color: var(--text-3); text-align: center; }
.hero-note.error { color: var(--danger); }

.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 40px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 120px;
        border: 0; background: transparent; cursor: pointer; padding: 0; }
.tile-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px;
             border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
             transition: transform .15s; }
.tile:hover .tile-icon { transform: translateY(-2px); border-color: var(--border-strong); }
.tile-icon svg { width: 24px; height: 24px; }
.tile-name { font-weight: 550; text-transform: capitalize; }
.tile-sub { margin-top: -8px; font-size: 12px; color: var(--text-3); }

.try { width: 100%; max-width: 760px; margin-top: 48px; text-align: center; }
.try-title { margin: 0; font-size: 16px; font-weight: 600; }
.try-lede { margin: 2px 0 16px; font-size: 13px; color: var(--text-3); }
.try-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 12px; text-align: left; }
.try-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.try-pick { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.try-pick img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px;
                border: 1px solid var(--border); background: #000; transition: transform .15s; }
.try-pick:hover img { transform: translateY(-2px); }
.try-name { font-weight: 550; }
.try-name::first-letter { text-transform: uppercase; }
.try-item .credit { font-size: 11px; line-height: 1.35; }

/* Home: result card; Recent: the image cards */
#current { scroll-margin-top: 76px; }
#current:not(:empty) { margin-top: 40px; }
.result { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 20px 28px; padding: 20px;
          border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
          box-shadow: var(--shadow); }
.result-head { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.result-side { display: flex; flex-direction: column; gap: 14px; align-self: start; min-width: 0; }
.result-image { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
.result-image img, .result-image canvas { display: block; width: 100%; height: auto; }
.result-image canvas { position: absolute; inset: 0; height: 100%; }
.result-image .btn { position: absolute; left: 10px; bottom: 10px; height: 30px; font-size: 13px;
                     background: rgba(15, 15, 16, .72); color: #fff; border: 0; backdrop-filter: blur(4px); }
.result-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.result-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.result-link { font-size: 13px; color: var(--text-2); font-weight: 500; text-decoration: none; }
.result-link:hover { color: var(--text); }

/* The timeline: where the agents are */
.timeline { display: flex; flex-direction: column; gap: 10px; }
.track { display: flex; margin: 0; padding: 0; list-style: none; }
.track li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
            min-width: 0; font-size: 12px; text-align: center; color: var(--text-3); }
.track li::before { content: ""; position: absolute; top: 6px; right: 50%; left: -50%; height: 2px; background: var(--border); }
.track li:first-child::before { display: none; }
.track .dot { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%;
              border: 2px solid var(--border-strong); background: var(--surface); }
.track li.done, .track li.now { color: var(--text); }
.track li.done::before, .track li.now::before { background: var(--accent); }
.track li.done .dot { border-color: var(--accent); background: var(--accent); }
.track li.now .dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.track li.now .dot::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--accent);
                            animation: pulse 1.2s ease-in-out infinite; }
.track li.now span:last-child { font-weight: 600; }
.track li.bad { color: var(--danger); }
.track li.bad .dot { border-color: var(--danger); background: var(--danger); }
.track-now { margin: 0; font-size: 13px; color: var(--text-2); text-align: center; }
@keyframes pulse { 50% { opacity: .25; } }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 0; }
.facts div { padding: 10px 12px; border-radius: 10px; background: var(--hover); }
.facts dt { font-size: 12px; color: var(--text-3); }
.facts dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.measures h3 { margin: 4px 0 8px; font-size: 14px; font-weight: 600; }
.measures-note { margin: 8px 0 0; font-size: 12px; color: var(--text-3); }
.verdict { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); font-size: 14px; }
.verdict strong { display: block; margin-bottom: 2px; }
.verdict.reject strong { color: var(--danger); }

/* The chat: the request, then each role's turn */
.chat { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.msg .bubble { min-width: 0; max-width: 100%; padding: 10px 14px; border-radius: 14px; background: var(--hover);
               font-size: 14px; overflow-wrap: anywhere; }
.msg.you { justify-content: flex-end; }
.msg.you .bubble { max-width: 80%; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 4px; }
.msg.agent .bubble { flex: 1; border-top-left-radius: 4px; }
.msg.system { justify-content: center; font-size: 12px; color: var(--text-3); }
.msg .who { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.msg .who time { font-weight: 400; color: var(--text-3); }
.msg strong { display: block; font-weight: 600; }
.msg strong.good { color: var(--accent); }
.msg strong.bad { color: var(--danger); }
.msg p { margin: 4px 0 0; color: var(--text-2); }
.msg ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); }
.avatar { --h: 210; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
          font-size: 13px; font-weight: 600; background: hsl(var(--h) 75% 93%); color: hsl(var(--h) 60% 32%); }
.avatar.locator { --h: 28; }
.avatar.decider { --h: 268; }
.avatar.labeller { --h: 158; }
.avatar.checker { --h: 330; }
.avatar.reviewer { --h: 44; }
@media (prefers-color-scheme: dark) {
  .avatar { background: hsl(var(--h) 35% 20%); color: hsl(var(--h) 70% 76%); }
}
.typing { display: inline-flex; gap: 4px; padding: 6px 0 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: pulse 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
.located { display: block; width: min(100%, 260px); height: auto; margin-top: 10px; border-radius: 8px; cursor: zoom-in; }
.pictures { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.pictures img { flex: none; height: 120px; width: auto; border-radius: 8px; background: #000; cursor: zoom-in; }
.pictures.one img { width: min(100%, 520px); height: auto; }
.msg small { display: block; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
            background: rgba(0, 0, 0, .82); cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

.recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 24px; }
.recent > .empty { grid-column: 1 / -1; }
.more { display: flex; justify-content: center; margin-top: 20px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--text-2);
        text-decoration: none; font-weight: 500; }
.back:hover { color: var(--text); }
.back svg { width: 18px; height: 18px; }
.recent-item { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px;
               background: var(--surface); text-align: left; text-decoration: none; min-width: 0; }
.recent-item:hover { border-color: var(--border-strong); background: var(--hover); }
.recent-item img { width: 64px; height: 64px; flex: none; border-radius: 10px; object-fit: cover; background: #000; }
.recent-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.recent-title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-title::first-letter, .result-title::first-letter { text-transform: uppercase; }
.recent-desc { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2;
               -webkit-box-orient: vertical; overflow: hidden; }
.recent-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--text-3); }
.recent-meta > * { white-space: nowrap; }

/* Pills */
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
        font-size: 12px; font-weight: 550; white-space: nowrap; background: var(--hover); color: var(--text-2); }
.pill.ok { background: var(--primary); color: var(--on-primary); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.wait { background: var(--warn-soft); color: var(--warn); }
.pill.live { background: var(--accent-soft); color: var(--accent); }

/* Usage */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.page-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.downloads { display: flex; flex-wrap: wrap; gap: 8px; }
.downloads:empty { display: none; }
#current .downloads { margin: 0 0 16px; }
.page-title { margin: 0; font-size: 30px; font-weight: 550; letter-spacing: -.02em; }
.subtabs { display: flex; gap: 4px; margin: 20px 0 24px; border-bottom: 1px solid var(--border); }
.subtab { padding: 10px 14px; margin-bottom: -1px; text-decoration: none; color: var(--text-2);
          border-bottom: 2px solid transparent; font-weight: 500; }
.subtab:hover { color: var(--text); }
.subtab.active { color: var(--text); border-bottom-color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.stat-label { font-size: 13px; color: var(--text-2); }
.stat-value { margin: 4px 0 2px; font-size: 26px; font-weight: 600; letter-spacing: -.02em;
              font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 13px; color: var(--text-3); }
.stat .meter { margin-top: 10px; }
.card { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius);
        background: var(--surface); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
             padding: 16px 20px 0; }
.card-title { margin: 0; font-size: 15px; font-weight: 600; }
.card-body { padding: 16px 20px 20px; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-top: 16px; }
.grid-2 > .card { margin-top: 0; }
.search { height: 36px; min-width: 220px; padding: 0 12px; border: 1px solid var(--border);
          border-radius: 10px; background: var(--surface); outline: 0; }
.search:focus { border-color: var(--border-strong); }
.empty { padding: 28px 20px; text-align: center; color: var(--text-3); }
.ask { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
td .ask { display: inline-flex; flex-wrap: nowrap; }
.field { height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px;
         background: var(--surface); outline: 0; }
.field:focus { border-color: var(--border-strong); }
.amount { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.amount .field { width: 84px; }
.field.note { flex: 1; min-width: 200px; }
.ask-note { color: var(--danger); font-size: 13px; }
.ask-note:empty { display: none; }
.ask-wait { margin: 0; color: var(--text-2); }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; stroke: none; }
.chart .grid line { stroke: var(--border); stroke-width: 1; }
.chart text { fill: var(--text-3); font-size: 12px; font-family: var(--font); }
.chart .bar { fill: var(--accent); }
.chart .band { fill: transparent; }
.chart .bar.hot { opacity: .75; }
.tip { position: absolute; z-index: 2; pointer-events: none; min-width: 160px; padding: 10px 12px;
       border-radius: 10px; background: var(--primary); color: var(--on-primary); font-size: 13px;
       box-shadow: var(--shadow); transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; }
.tip b { display: block; margin-bottom: 2px; }

.bars-list { display: flex; flex-direction: column; gap: 14px; }
.bars-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.bars-row .meter { grid-column: 1 / -1; }
.bars-row .num { font-variant-numeric: tabular-nums; color: var(--text-2); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 10px 12px; text-align: left; font-weight: 500; color: var(--text-3); font-size: 13px;
     border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: var(--hover); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.sub { color: var(--text-3); }
td.wrap { white-space: normal; min-width: 220px; max-width: 360px; color: var(--text-2); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.drop-overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center;
                background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(4px); }
.drop-overlay div { padding: 28px 40px; border: 2px dashed var(--border-strong); border-radius: 20px;
                    background: var(--surface); font-size: 18px; font-weight: 550; }

/* Agents: the specialists */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.agents-hero { max-width: 780px; }
.agents-title { margin: 10px 0 12px; font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -.03em;
                line-height: 1.08; text-wrap: balance; }
.agents-lede { margin: 0; max-width: 62ch; font-size: 17px; color: var(--text-2); }
.how { list-style: none; counter-reset: how; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
       gap: 14px; margin: 32px 0 0; padding: 0; }
.how li { counter-increment: how; display: flex; flex-direction: column; gap: 4px; padding: 18px 20px;
          border: 1px solid var(--border); border-radius: 16px; background: var(--surface); font-size: 14px; color: var(--text-2); }
.how li::before { content: counter(how); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 8px;
                  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; }
.how b { color: var(--text); font-size: 15px; font-weight: 600; }
.agents-filter { margin-top: 32px; }
.agents-filter .segmented { flex-wrap: wrap; }
.spec-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 18px; }
.spec-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 18px;
             background: var(--surface); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.spec-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.spec-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.spec-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.spec-card:hover .spec-cover img { transform: scale(1.04); }
.spec-cover.blank, .spec-hero-image.blank { display: flex; align-items: flex-end;
  background: radial-gradient(120% 100% at 15% 0%, #1d3a30 0%, #0d1311 55%, #070808 100%); }
.spec-blank { padding: 18px 20px; color: rgba(255, 255, 255, .88); font-size: 22px; font-weight: 600;
              letter-spacing: -.02em; line-height: 1.15; }
.spec-hero-image .spec-blank { padding: 26px 28px; font-size: 30px; }
.spec-badge { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55);
              color: #fff; font-size: 12px; font-weight: 550; backdrop-filter: blur(6px); }
.spec-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.spec-name { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.spec-about { font-size: 14px; color: var(--text-2); }
.spec-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 550; }
.tag.quiet { background: var(--hover); color: var(--text-2); }
.foundations { margin: 28px 0 0; font-size: 14px; color: var(--text-3); }

.spec-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.spec-title { margin: 10px 0 12px; font-size: clamp(32px, 4.5vw, 50px); font-weight: 600; letter-spacing: -.035em; line-height: 1.04; }
.spec-lede { margin: 0; max-width: 50ch; font-size: 18px; color: var(--text-2); }
.spec-facts { display: flex; flex-wrap: wrap; gap: 18px 32px; margin-top: 26px; }
.spec-fact { display: flex; flex-direction: column; gap: 2px; }
.spec-fact strong { font-size: 17px; font-weight: 600; }
.spec-fact span { font-size: 13px; color: var(--text-3); }
.spec-hero-figure { display: flex; flex-direction: column; gap: 8px; margin: 0; min-width: 0; }
.credit { font-size: 12px; color: var(--text-3); text-decoration: none; }
.credit:hover { color: var(--text-2); text-decoration: underline; }
.spec-hero-image { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 22px; background: #000; }
.spec-hero-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.spec-section { margin-top: 56px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.section-title { margin: 0 0 6px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.section-lede { margin: 0; max-width: 68ch; font-size: 15px; color: var(--text-2); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; border: 2px solid rgb(var(--mask)); background: rgba(var(--mask), .2); }
.swatch.rose { border-color: rgb(var(--lookalike)); background: rgba(var(--lookalike), .2); }
.parts { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.parts li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.part-swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.part-note { flex-basis: 100%; color: var(--text-2); font-size: 13px; }
.structure { margin-top: 28px; scroll-margin-top: 24px; }
.structure + .structure { padding-top: 28px; border-top: 1px solid var(--border); }
.structure-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.structure-title { margin: 0; font-size: 18px; font-weight: 600; }
.structure-summary { margin: 4px 0 16px; max-width: 72ch; font-size: 14px; color: var(--text-2); }
.examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.example { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.example-image { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: #000; }
.example-image img, .example-image canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.example figcaption { font-size: 12px; color: var(--text-3); }
.example-source { display: block; margin-top: 4px; font-weight: 550; color: var(--text-2); }
.placeholder { padding: 18px 20px; border: 1px dashed var(--border-strong); border-radius: 16px; font-size: 14px; color: var(--text-2); }
.placeholder strong { color: var(--text); }
.placeholder .prose, .placeholder p { margin: 8px 0 0; padding: 0; }
.coverage-stats { margin-top: 18px; }
.coverage tr.group td { background: var(--hover); font-weight: 550; }
.coverage td.indent { padding-left: 28px; }
.coverage td.wrap { min-width: 240px; white-space: normal; }
.muted { color: var(--text-3); font-weight: 400; }
.topics { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.topic { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.topic summary { display: flex; justify-content: space-between; gap: 12px; padding: 15px 18px; cursor: pointer; font-weight: 550; list-style: none; }
.topic summary::-webkit-details-marker { display: none; }
.topic summary::after { content: "+"; color: var(--text-3); font-weight: 400; }
.topic[open] summary::after { content: "\2212"; }
.prose { max-width: 80ch; padding: 0 18px 16px; font-size: 14px; line-height: 1.65; color: var(--text-2); }
.prose p { margin: 0 0 10px; }
.prose ul { margin: 0 0 10px; padding-left: 18px; }
.prose li { margin: 4px 0; }
.prose h4 { margin: 14px 0 6px; font-size: 14px; color: var(--text); }
.sub-title { margin: 30px 0 0; font-size: 16px; font-weight: 600; }
.sources { display: flex; flex-direction: column; gap: 8px; max-width: 86ch; margin: 16px 0 0; padding-left: 22px; font-size: 14px; color: var(--text-2); }
.checked { padding: 24px 26px; border-radius: 18px; background: var(--accent-soft); }
.checked .section-lede { color: var(--text); }

/* Narrow screens: the sidebar becomes a drawer */
@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 30; left: 0; transform: translateX(-100%); transition: transform .2s ease;
             width: var(--sidebar-w) !important; }
  .app.open .sidebar { transform: none; }
  .app.collapsed .nav-text { display: initial; }
  .app.collapsed .brand, .app.collapsed .nav-item { justify-content: flex-start; padding-inline: 12px; }
  .app.open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .3); }
  .topbar { padding: 0 16px; }
  .view { padding: 20px 16px 48px; }
  .hero { padding-top: 24px; }
  .result { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .search { min-width: 0; width: 100%; }
  .how, .spec-hero { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .stat-value { font-size: 22px; }
}
@media (max-width: 560px) {
  .bell-panel { position: fixed; top: 64px; left: 16px; right: 16px; width: auto; }
  .chip-name { display: none; }
  .tiles { gap: 10px; }
  .tile { width: 92px; }
  .try-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.app.landing, .app.landing .main { background: #000; }
.app.landing .sidebar,
.app.landing .topbar { display: none; }
.view[data-view="landing"] {
  position: relative; max-width: none; min-height: 100vh; margin: 0; padding: 0;
  background: #000; color: #fff; overflow: hidden;
}
.landing-bar { display: none; }
.app.landing .landing-bar {
  position: fixed; z-index: 2; top: 0; left: 0; right: 0;
  display: flex; align-items: center; padding: 22px 28px 0; background: none;
}
/* the way back to the website */
.landing-home { color: #fff; font-size: 18px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.landing-home span { color: #34d39e; }
.landing-panel {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -46%);
  width: min(720px, calc(100% - 48px)); color: #fff; font-weight: 700; text-align: center;
}
.landing-panel h2 { margin: 0 0 14px; font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.landing-panel p { margin: 0; font-size: 17px; line-height: 1.5; color: #eee; }
.landing-go {
  display: inline-flex; margin-top: 22px; height: 44px; align-items: center; padding: 0 18px;
  border-radius: 999px; background: #fff; color: #0f0f10; text-decoration: none; font-weight: 550;
}
/* Sign in: Google straight to Google, email to the sign-in page (access.py) */
.landing-signin { display: flex; flex-direction: column; gap: 12px; max-width: 320px; margin: 26px auto 0; }
.landing-signin .landing-go { margin: 0; justify-content: center; gap: 10px; }
.landing-signin svg { width: 18px; height: 18px; }
.landing-go.quiet { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px #555; }

/* Activity (the admin's): every user's images, and every step of one */
.page-note { margin: 8px 0 0; color: var(--text-2); }
.thumb { display: block; width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #000; }
.cell-title { font-weight: 550; }
.cell-title::first-letter { text-transform: uppercase; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.activity-head { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 24px; padding: 20px; }
.activity-facts { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.activity-title { margin: 28px 0 0; font-size: 17px; font-weight: 600; }
.steps-log { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.steps-log > .msg.system { margin-top: 6px; justify-content: flex-start; }
.activity-head .result-image { align-self: start; }
.run { margin-top: 6px; }
.run-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px;
            border-bottom: 1px solid var(--border); }
.run-head strong::first-letter { text-transform: uppercase; }
.run-head .sub { margin-left: auto; font-size: 13px; }
.run-events { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; font-size: 14px; min-width: 0; }
.run-events pre { margin: 6px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--hover); font-size: 12.5px;
                  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; }
.fold > summary { cursor: pointer; color: var(--text-2); font-size: 13px; }
.ev-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-cell { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 260px; }
.ev-call { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding-left: 10px; border-left: 2px solid var(--accent); }
.ev-call .mono { color: var(--text-2); overflow-wrap: anywhere; }
.ev-result { padding-left: 12px; }
.ev-result.bad pre { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 900px) {
  .activity-head { grid-template-columns: minmax(0, 1fr); }
}

/* Registry (the staff's): the datasets we hold, training runs, models; the volume viewer */
.registry-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.registry-bar + .recent { margin-top: 16px; }
.registry-title { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.registry-title::first-letter { text-transform: uppercase; }
.registry-meta { margin: 10px 0 20px; font-size: 13px; }
.registry-meta a { color: var(--text-2); }
.registry-line { margin: 0 0 14px; }
.registry-stats { margin-top: 20px; }
.recent-meta > .registry-clip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.recent-item .no-picture { width: 64px; height: 64px; flex: none; border-radius: 10px; background: var(--hover); }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.previews img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px;
                background: #000; cursor: zoom-in; }
.notes { margin: 0 0 12px; padding-left: 18px; color: var(--text-2); }
.notes li + li { margin-top: 6px; }
td .meter { min-width: 96px; margin-top: 6px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.second { stroke: var(--text-3); }
.chart .guide { stroke: var(--border-strong); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; background: var(--accent); }
.legend i.second { background: var(--text-3); }
.viewer { height: min(72vh, 640px); border-radius: 10px; overflow: hidden; background: #000; }
.viewer canvas { display: block; width: 100%; height: 100%; }
.viewer-note { margin: 10px 0 0; font-size: 13px; color: var(--text-3); }

/* Benchmarks (the staff's): one box per set, a chart per measure (vertical bars, the best first),
   the rest folded under Details */
.bench { margin-top: 20px; }
.bench-title { font-size: 18px; letter-spacing: -.01em; }
.bench-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 28px 24px; }
.bench-panel { display: flex; flex-direction: column; }
.bench-panel-title { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.bench-sub { margin: 0 0 14px; font-size: 13px; color: var(--text-2); }
.bench-chart { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.bench-details { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); }
.bench-details > summary { cursor: pointer; font-size: 14px; font-weight: 550; color: var(--text-2); }
.bench-details[open] > summary { margin-bottom: 14px; }
.bench-details h4 { margin: 20px 0 8px; font-size: 14px; font-weight: 600; }
.bench-plots { display: grid; gap: 8px; height: 190px; padding-top: 22px;
  background: linear-gradient(var(--border) 1px, transparent 1px) 0 22px / 100% 42px no-repeat,
              linear-gradient(var(--border) 1px, transparent 1px) 0 64px / 100% 42px no-repeat,
              linear-gradient(var(--border) 1px, transparent 1px) 0 106px / 100% 42px no-repeat,
              linear-gradient(var(--border) 1px, transparent 1px) 0 148px / 100% 42px no-repeat;
  border-bottom: 1px solid var(--border-strong); }
.bench-plot { position: relative; height: 100%; }
/* a public model's bar: hatched in its colour (--c) over a light tint of it; our service's alone is solid */
.bench-bar { --c: var(--text-3); --hatch: 45deg;
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: min(72%, 52px);
  min-height: 2px; border: 1.5px solid var(--c); border-bottom: 0; border-radius: 6px 6px 0 0;
  background: repeating-linear-gradient(var(--hatch), var(--c) 0 1.5px, transparent 1.5px 6px),
              color-mix(in srgb, var(--c) 14%, var(--surface)); }
.bench-bar.m1 { --c: var(--m1); }
.bench-bar.m2 { --c: var(--m2); --hatch: -45deg; }
.bench-bar.ours { border: 0; background: var(--accent); }
.bench-val { position: absolute; left: 50%; transform: translateX(-50%); margin-bottom: 4px; font-size: 12px;
  font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bench-val.none { bottom: 0; font-weight: 500; color: var(--text-3); }
/* the 95% interval: a line with short ends, edged in the card's colour to stand out on any bar */
.bench-ci { position: absolute; left: 50%; width: 2px; margin-left: -1px; background: var(--text);
  box-shadow: 0 0 0 1px var(--surface); }
.bench-ci::before, .bench-ci::after { content: ""; position: absolute; left: -4px; width: 10px; height: 2px;
  background: var(--text); box-shadow: 0 0 0 1px var(--surface); }
.bench-ci::before { top: 0; }
.bench-ci::after { bottom: 0; }
.bench-names { display: grid; gap: 8px; text-align: center; font-size: 12px; line-height: 1.3; }
.bench-names b { display: block; font-weight: 600; white-space: nowrap; }
.bench-model { font-weight: 550; }
.bench-names span { color: var(--text-3); }
.bench-seen { margin-left: 1px; font-size: 14px; font-weight: 700; line-height: 0; color: var(--warn); }
.bench-legend { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 13px; color: var(--text-2); }
.bench-notes { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.bench-notes li + li { margin-top: 6px; }

/* Viewer: an image's label to correct and to measure */
.view[data-view="viewer"] { max-width: 1520px; }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary); opacity: .88; }
.btn:disabled { opacity: .45; cursor: default; }
.vw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 14px; }
.vw-head .result-title { margin-right: auto; }
.vw-state { font-size: 13px; color: var(--text-3); }
.vw-state.dirty { color: var(--warn); font-weight: 500; }
.vw-said { font-size: 13px; color: var(--text-2); }
.vw-said.error { color: var(--danger); }
.vw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 6px; margin-bottom: 12px;
          border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.vw-group { display: flex; align-items: center; gap: 2px; }
.vw-zoom { margin-left: auto; }
.vw-sep { width: 1px; height: 22px; background: var(--border); }
.vw-tool { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: 9px;
           background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.vw-tool:hover { background: var(--hover); color: var(--text); }
.vw-tool.on { background: var(--primary); color: var(--on-primary); }
.vw-tool:disabled { opacity: .35; cursor: default; background: transparent; }
.vw-range { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.vw-range input { width: 104px; accent-color: var(--accent); }
.vw-range span { min-width: 40px; font-variant-numeric: tabular-nums; }
.vw { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.vw-stage { position: relative; height: calc(100vh - 210px); min-height: 440px; overflow: hidden; border-radius: 14px;
            background: #000; touch-action: none; user-select: none; outline: none; cursor: grab; }
.vw-stage[data-tool="ruler"] { cursor: crosshair; }
.vw-stage[data-tool="brush"], .vw-stage[data-tool="eraser"] { cursor: none; }
.vw-stage[data-tool="remove"] { cursor: pointer; }
.vw-stage.panning, .vw-stage.pan-key { cursor: grabbing; }
.vw-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.vw-image, .vw-label { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vw-world.sharp .vw-image, .vw-world.sharp .vw-label { image-rendering: pixelated; }
.vw-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; pointer-events: none; }
.vw-lines line, .vw-lines circle { vector-effect: non-scaling-stroke; stroke-linecap: round; }
.vw-long { stroke: #fff; stroke-width: 2; }
.vw-short { stroke: #fff; stroke-width: 2; stroke-dasharray: 6 5; }
.vw-inner { stroke: #fbbf24; stroke-width: 2; stroke-dasharray: 2 4; }
.vw-cross { stroke: #fbbf24; stroke-width: 3; }
.vw-dot { fill: #fbbf24; stroke: none; }
.vw-cross-outer { stroke: #fff; stroke-width: 2; stroke-dasharray: 2 3; }
.vw-ruler { stroke: #38bdf8; stroke-width: 2; }
.vw-end { fill: #38bdf8; stroke: none; }
.vw-cursor { stroke: #fff; stroke-width: 1.5; stroke-dasharray: 3 3; }
.vw-tip { position: absolute; z-index: 2; padding: 5px 9px; border-radius: 8px; pointer-events: none; white-space: nowrap;
          background: rgba(12, 12, 13, .88); color: #fff; font-size: 12.5px; font-weight: 500; }
.vw-badges { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.vw-badge { position: absolute; transform: translate(-50%, -140%); display: inline-flex; align-items: center; gap: 2px;
            padding: 2px 4px 2px 8px; border-radius: 7px; background: #075985; color: #fff; font-size: 12px; font-weight: 600;
            white-space: nowrap; pointer-events: auto; }
.vw-badge button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 4px; font-size: 15px; line-height: 1; opacity: .75; }
.vw-badge button:hover { opacity: 1; }
.vw-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vw-card { padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.vw-card h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.vw-card .sub { margin: 0; font-size: 13px; }
.vw-structs { display: flex; flex-direction: column; gap: 2px; }
.vw-struct { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 1px solid transparent;
             border-radius: 10px; background: transparent; text-align: left; font-size: 14px; }
button.vw-struct { cursor: pointer; }
button.vw-struct:hover { background: var(--hover); }
.vw-struct.on { border-color: var(--border-strong); background: var(--hover); }
.vw-struct-name { flex: 1; font-weight: 550; min-width: 0; }
.vw-struct-name::first-letter, .vw-here-name strong::first-letter { text-transform: uppercase; }
.vw-struct-size { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.vw-here-name { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.vw-here .facts { grid-template-columns: 1fr 1fr; gap: 6px; }
.vw-here .facts div { padding: 8px 10px; }
.vw-pin, .vw-pin-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
                      background: #fbbf24; color: #1c1917; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vw-pin { position: absolute; transform: translate(-50%, calc(-100% - 7px)); box-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.vw-pin::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 2px; height: 7px; margin-left: -1px; background: #fbbf24; }
.vw-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.vw-card-head h3 { margin: 0; }
.vw-card-head .btn { height: 26px; padding: 0 9px; font-size: 12.5px; }
.vw-pins { display: flex; flex-direction: column; gap: 8px; max-height: 440px; overflow: auto; }
.vw-pinbox { padding: 10px; border: 1px solid var(--border); border-radius: 12px; }
.vw-pinbox .vw-here-name { margin-bottom: 8px; }
.vw-pinbox .vw-here-name .icon-btn { margin-left: auto; width: 28px; height: 28px; font-size: 16px; }
.vw-pinbox .facts { grid-template-columns: 1fr 1fr; gap: 6px; }
.vw-pinbox .facts div { padding: 7px 9px; }
.vw-rulers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.vw-rulers li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.vw-rulers li span { flex: 1; color: var(--text-2); }
.vw-rulers .icon-btn { width: 28px; height: 28px; font-size: 16px; }
.vw-save { display: flex; flex-direction: column; gap: 8px; }
.vw-save .btn { justify-content: center; }
.vw-note-in { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 10px;
              background: var(--surface); font-size: 13px; }
.vw-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.vw-history li { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px; border-radius: 10px; background: var(--hover); font-size: 13px; }
.vw-history .sub { font-size: 12px; }
.vw-version { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vw-version .pill { height: 20px; font-size: 11px; }
.vw-quote { color: var(--text-2); font-style: italic; }
.vw-history .btn { align-self: flex-start; height: 28px; margin-top: 4px; font-size: 12.5px; }
.vw-card .vw-range { display: flex; justify-content: space-between; margin-bottom: 6px; }
.vw-card .measures-note { margin-top: 4px; }
@media (max-width: 1100px) {
  .vw { grid-template-columns: minmax(0, 1fr); }
  .vw-stage { height: 64vh; min-height: 320px; }
}
@media (max-width: 560px) {
  .vw-tool span { display: none; }
  .vw-zoom { margin-left: 0; }
}
