/* Outfit (SIL Open Font License), the typeface of the Satin design: one variable file, every weight */
@font-face { font-family: "Outfit"; src: url("brand/outfit.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  /* Satin, as in V4's Merra chat panel: ink #303740, muted #6e7885, brand blue #145dfb, quiet rules */
  --bg: #fbfcfd; --side: #f7f8fa; --surface: #ffffff; --wash: #f3f5f8;
  --text: #303740; --text-2: #6e7885; --text-3: #7c8695;
  /* Tailwind v4's slate and blue, which V4's chat uses for its welcome screen and sidebar */
  --slate-300: #cad5e2; --slate-400: #90a1b9; --slate-500: #62748e; --slate-600: #45556c; --slate-800: #1d293d; --slate-900: #0f172b;
  --blue-50: #eff6ff; --blue-200: #bedbff; --blue-600: #155dfc; --blue-700: #1447e6;
  --border: #dfe5ed; --border-2: #e6ebf2;
  --tint: #eef3fb; --tint-2: #e6eefc;
  --accent: #145dfb; --accent-ink: #1d4ed8; --ok: #0b6b40; --warn: #a3530a; --bad: #a91534;
  --s1: #145dfb; --s2: #0b1f4d; --s3: #7ba4f0; --s4: #c2410c; --s5: #6b7280; --s6: #0f8a4b;
  --font: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: var(--font);
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 12px; --col: 768px;   /* the reading column, as wide as ChatGPT's: messages and the box line up */
  --shadow: 0 1px 2px #2836470a, 0 6px 18px -10px #24344933;
  --panel: linear-gradient(165deg, #fbfcfd 3%, #f3f5f8 72%, #eef1f5); --panel-edge: #ffffffb3;
  --panel-shadow: 0 0 0 1px #2836470d, inset 0 1px 0 #fff, 0 2px 5px #26354705;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* The app never scrolls sideways: each view scrolls up and down only, and anything wide (a table, a data
   grid) scrolls inside its own box. overscroll-behavior stops the trackpad's sideways bounce. */
html, body { height: 100%; margin: 0; overflow-x: hidden; overscroll-behavior-x: none; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--font); font-synthesis: none; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); font-size: 12.5px; }
.ic { flex: none; }

/* Shell */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); height: 100vh; }
.side { display: flex; flex-direction: column; gap: 1px; min-height: 0; padding: 14px 10px 10px; border-right: 1px solid var(--border-2); background: var(--side); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; }
.app-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent); box-shadow: inset 0 1px 0 #ffffff24, 0 2px 5px #145dfb12; }
.app-mark img { width: 18px; height: auto; display: block; }
.app-name { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.app-name b { font-size: 16px; font-weight: 400; letter-spacing: -.025em; }
.app-name sup { margin-left: 3px; font-size: 9px; font-weight: 400; letter-spacing: .03em; color: var(--accent); vertical-align: 6px; }
.app-name small { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-new, .side-tab { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font-size: 13px; color: var(--text-2); text-align: left; cursor: pointer; }
.side-new { height: 40px; margin-bottom: 8px; background: var(--blue-50); color: var(--blue-700); font-weight: 600; transition: background 140ms; }
.side-new .ic { color: var(--blue-700); }
.side-new:hover { background: #dbeafe; }
.side-tab .ic { color: var(--text-3); }
.side-tab em { margin-left: auto; font-size: 11.5px; font-style: normal; color: var(--text-3); font-variant-numeric: tabular-nums; }
.side-tab:hover { background: var(--tint); color: var(--text); }
.side-tab.is-on { background: var(--tint-2); color: var(--accent-ink); }
.side-tab.is-on .ic { color: var(--accent-ink); }
.side-sec { margin: 20px 0 6px; padding: 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--slate-400); }
.chats { display: flex; flex-direction: column; gap: 1px; margin: 0; padding: 0; list-style: none; }
.chats button { position: relative; display: flex; align-items: center; gap: 9px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font-size: 13px; color: var(--slate-800); text-align: left; cursor: pointer; }
.chats button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chats button > .ic { color: var(--slate-400); }
.chats button em { flex: none; font-size: 11px; font-style: normal; color: var(--slate-400); font-variant-numeric: tabular-nums; }
.chats button:hover { background: var(--tint); }
.chats button.is-on { background: #eaf1fe; }
.chats button.is-on::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--accent); }
.chats .live { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.chats .empty { padding: 4px 10px; font-size: 12.5px; color: var(--text-3); }

.main { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: linear-gradient(180deg, #fbfcfd 0%, #f6f7f9 100%); }
.view { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior-x: none; }
.banner { margin: 14px 24px 0; padding: 10px 14px; border: 1px solid rgba(169, 21, 52, .25); border-radius: var(--r); background: rgba(169, 21, 52, .06); font-size: 13px; }
.banner code { padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .05); }

/* Buttons and small parts */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 13px; white-space: nowrap; cursor: pointer; }
.btn:hover { border-color: rgba(20, 93, 251, .45); color: var(--accent-ink); text-decoration: none; }
.btn.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); color: #fff; }
.btn.quiet { border-color: transparent; color: var(--text-2); }
.btn.quiet:hover { background: var(--tint); border-color: transparent; }
.btn.danger:hover { border-color: rgba(169, 21, 52, .5); color: var(--bad); }
.btn:disabled { opacity: .55; cursor: default; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px; background: #e8edf2; font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.pill.ok { background: rgba(11, 107, 64, .09); color: var(--ok); } .pill.ok i { background: var(--ok); }
.pill.warn { background: rgba(163, 83, 10, .1); color: var(--warn); } .pill.warn i { background: var(--warn); }
.pill.bad { background: rgba(169, 21, 52, .09); color: var(--bad); } .pill.bad i { background: var(--bad); }
.glyph { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--tint-2); color: var(--accent-ink); }
.error { padding: 9px 12px; border: 1px solid #ffe4e6; border-radius: 8px; background: #fff1f2; color: #be123c; font-size: 13px; }
.muted { color: var(--text-3); }

/* Welcome */
.welcome-in { display: flex; flex-direction: column; gap: 12px; width: min(var(--col), calc(100% - 48px)); margin: 0 auto; padding: 11vh 0 24px; }
.w-mark { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 12px; border-radius: 12px; background: var(--blue-50); color: var(--blue-600); }
/* Type as in V4's Merra chat welcome: 28px light title in slate-900 with a blue second line, 13px slate-500 text,
   12.5px starters, weight 400 throughout */
.w-title { margin: 0; font-family: var(--display); font-weight: 300; font-size: 28px; line-height: 1.2; letter-spacing: -.035em; color: var(--slate-900); }
.w-title em { display: block; font-style: normal; color: var(--blue-600); }
.w-sub { margin: 0 0 6px; max-width: 56ch; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.w-sugs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.w-sug { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 38px 12px 14px; border: 1px solid #e2e8f0cc; border-radius: 8px; background: #ffffff8c; text-align: left; font-weight: 400; cursor: pointer; transition: border-color 140ms, background 140ms, color 140ms; }
.w-sug b { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 400; color: var(--slate-800); }
.w-sug b .ic { color: var(--blue-600); }
.w-sug span { font-size: 12.5px; line-height: 1.6; color: var(--slate-500); }
.w-sug:hover { border-color: var(--blue-200); background: var(--blue-50); }
.w-sug:hover b, .w-sug:hover span { color: var(--blue-700); }
.w-sug > .go { position: absolute; top: 13px; right: 13px; color: var(--slate-300); transition: color 140ms; }
.w-sug:hover > .go { color: var(--blue-600); }
.w-sug small { font-size: 11px; color: var(--slate-400); }

/* Status flags, used by findings and the site check */
.flag { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; flex: none; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 11.5px; font-style: normal; font-weight: 500; white-space: nowrap; background: #e8edf2; color: #46505c; }
.flag.clear { background: linear-gradient(145deg, #c9f6dc, #aff0cd); color: #075b35; }
.flag.caution { background: linear-gradient(145deg, #ffefd6, #ffe2b8); color: #8a4b08; }
.flag.issue { background: linear-gradient(145deg, #ffdae1, #ffc4cf); color: #a91534; }
.flag.info { background: #edf3ff; color: var(--accent); }


.w-points { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; padding: 0; list-style: none; font-size: 13px; line-height: 1.6; color: var(--slate-500); }
.w-points li { display: inline-flex; align-items: center; gap: 7px; }
.w-points li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--tint-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.3l2 2 4-4.6' fill='none' stroke='%23155bdc' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.w-points li.now { color: var(--ok); }
.w-points li.now::before { width: 7px; height: 7px; margin: 0 3px; background: var(--ok); box-shadow: 0 0 0 4px rgba(11, 107, 64, .14); }
.live { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11.5px; color: var(--ok); }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.srcline { font-size: 12px; color: var(--text-3); }
.src-sum { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 0; border: 0; border-radius: 4px; background: none; font-size: 12px; color: var(--text-3); cursor: pointer; transition: color 140ms; }
.src-sum:hover { color: var(--accent-ink); }
.src-sum > .ic:last-child { transition: transform .15s; }
.src-sum[aria-expanded="true"] > .ic:last-child { transform: rotate(90deg); }
.src-marks { display: inline-flex; gap: 3px; margin-left: 2px; }
.src-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; color: var(--text-2); }
.srcchip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 3px; border: 1px solid var(--border-2); border-radius: 6px; background: #fff; }
.srcchip > .ic { margin-left: 6px; color: var(--text-3); }
.w-recent { margin-top: 10px; }
.w-recent > small { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--slate-400); }
.w-recent .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.w-recent .card { padding: 10px 14px 12px; border-radius: 8px; }
.w-recent .card .thumb { height: 48px; margin: 0 -4px; }
.w-recent .card h3 { margin: 0; font-size: 13px; font-weight: 400; color: var(--slate-800); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Composer */
.composer { flex: none; display: flex; flex-direction: column; gap: 8px; width: min(var(--col), calc(100% - 48px)); margin: 6px auto 20px; padding: 10px 10px 10px 12px; border: 1px solid #dfe5ed; border-radius: 14px; background: #fff; box-shadow: 0 2px 6px #293b5005; transition: border-color 160ms, box-shadow 160ms; }
.composer:focus-within { border-color: #b5caf5; box-shadow: 0 0 0 2px #145dfb12, 0 2px 6px #293b5005; }
.main:not([data-screen="new"]):not([data-screen="chat"]) .composer { display: none; }
.composer textarea { width: 100%; max-height: 160px; min-height: 28px; padding: 4px; border: 0; outline: 0; resize: none; font: 400 14.5px/1.5 var(--font); background: transparent; }
.composer textarea::placeholder { color: #8591a0; font-weight: 300; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.effort { display: inline-flex; gap: 2px; padding: 2px; border-radius: 6px; background: #e9edf2; }
.effort button { height: 24px; padding: 0 10px; border: 0; border-radius: 4px; background: none; font-size: 12px; color: var(--text-2); cursor: pointer; }
.effort button[aria-checked="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 3px #28394e14; }
.send { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; transition: background 140ms; }
.send:hover:not(:disabled) { background: var(--accent-ink); }
.send:disabled { background: #e2e8f0; color: #94a3b8; cursor: default; }
.send.stop { background: var(--accent); }

/* Chat */
.thread { display: flex; flex-direction: column; gap: 28px; width: min(var(--col), calc(100% - 48px)); margin: 0 auto; padding: 28px 0; }
.thread > * { min-width: 0; max-width: 100%; }
.msg-user { display: flex; justify-content: flex-end; }
.msg-user div { max-width: 88%; padding: 12px 20px; border: 1px solid #e1e8f3; border-radius: 16px 16px 5px 16px; background: #edf2fa; font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.turn { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* Nothing in a reply is wider than the column: a long code line or a wide table scrolls inside its own box */
.turn > * { min-width: 0; max-width: 100%; }
/* Who is speaking: the Merra mark and name above each reply */
.who { display: flex; align-items: center; gap: 7px; margin-bottom: -4px; font-size: 12px; line-height: 20px; color: #6e7885; }
.who-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: #e9effd; color: var(--accent); }

/* The collapsed record of the work: one line while running, a summary when done, the steps on demand */
.work { border-radius: 10px; }
/* The record of the work, as in Claude's app: what Merra says, and one line for each run of steps between.
   The newest line, while it works, has three pulsing dots, what it is doing now and a clock. */
.flow { display: flex; flex-direction: column; gap: 12px; }
.flow:empty { display: none; }
/* Parts of a reply with nothing in them take no room */
.slot-found:empty, .slot-src:empty, .slot-err:empty, .run-foot:empty { display: none; }
.say { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text); overflow-wrap: anywhere; }
.say b { font-weight: 500; }
.say p, .say ul, .say ol { margin: 0 0 8px; } .say > :last-child { margin-bottom: 0; }
.say ul, .say ol { padding-left: 1.15em; }
/* A step line stays full width while it is the live one (the general .live label style is not for it) */
.flow > .grp { display: block; margin: 0; font-size: inherit; color: inherit; }
.grp-row { display: flex; align-items: center; gap: 12px; min-height: 26px; }
.grp-h, .wait, .grp-end { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 2px 6px 2px 0; border: 0; border-radius: 4px; background: none; font-size: 13.5px; color: var(--text-3); text-align: left; }
.grp-h { cursor: pointer; transition: color 140ms; }
.grp-h:hover { color: var(--text); }
.grp-h > .ic { flex: none; transition: transform .15s; }
.grp.open .grp-h > .ic { transform: rotate(90deg); }
.grp-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp.live .grp-t, .wait .grp-t { color: var(--text-2); }
.grp-m { flex: none; color: #94a3b8; font-variant-numeric: tabular-nums; }
.grp-m:empty { display: none; }
.grp-thumbs { display: inline-flex; flex: none; gap: 6px; margin-left: auto; }
.grp-thumbs:empty { display: none; }
.thumb-s { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; overflow: hidden; font-size: 9px; font-weight: 700; color: var(--accent); cursor: pointer; transition: border-color 140ms, transform 140ms; }
.thumb-s:hover { border-color: #bfdbfe; transform: translateY(-1px); }
.thumb-s img { width: 100%; height: 100%; object-fit: cover; }
.thumb-s.scene { background: #edf3ff; }
.thumb-s .fmt { height: 15px; margin: 0; padding: 0 3px; font-size: 7px; }
.thumb-s.peek { width: 46px; }
/* A picture at full size over the page */
.pic-view { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 32px 16px; background: rgba(23, 28, 34, .72); cursor: zoom-out; animation: pv-in 140ms ease-out; }
.pic-view figure { margin: 0; display: grid; gap: 10px; justify-items: center; max-width: min(1100px, 100%); }
.pic-view img { display: block; max-width: 100%; max-height: calc(100vh - 110px); border-radius: 8px; background: #fff; box-shadow: 0 18px 48px rgba(0, 0, 0, .35); }
.pic-view figcaption { color: #e8edf3; font-size: 13px; }
.pic-view .pv-x { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.pic-view .pv-x:hover { background: rgba(255, 255, 255, .24); }
@keyframes pv-in { from { opacity: 0; } }
.grp-b { display: flex; flex-direction: column; gap: 1px; margin: 8px 0 2px 4px; padding-left: 12px; border-left: 2px solid #dbe6fb; }
.flash { box-shadow: 0 0 0 3px #145dfb40 !important; transition: box-shadow .3s; }
.work-dots { display: none; flex: none; gap: 3px; }
.grp.live .work-dots, .wait .work-dots { display: inline-flex; }
.work-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.work-dots i:nth-child(2) { animation-delay: .18s; }
.work-dots i:nth-child(3) { animation-delay: .36s; }
.tl-step { border-radius: 6px; }
.tl-step > button { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 9px; width: 100%; padding: 4px 6px; border: 0; border-radius: 6px; background: none; font-size: 13px; color: var(--text-2); text-align: left; cursor: pointer; }
.tl-step > button:hover { background: var(--tint); }
.tl-step .ic { color: var(--text-3); }
.tl-step .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-step .sum { font-size: 12px; color: var(--text-3); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.tl-step.run .ic { color: var(--accent-ink); animation: pulse 1.2s ease-in-out infinite; }
.tl-step.miss .lab { color: var(--text-3); }
.tl-step.miss .sum { color: var(--warn); }
.tl-detail { margin: 2px 0 8px 31px; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--wash); font-size: 12.5px; }
.tl-detail pre { margin: 0; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; }
.tl-detail .grid { margin-top: 10px; }
.tl-note, .tl-thought { padding: 3px 6px 3px 31px; font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.tl-thought { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-style: italic; cursor: pointer; }
.tl-thought.open { display: block; white-space: pre-wrap; }

/* What a run produced */
.outs { display: flex; flex-wrap: wrap; gap: 10px; }
.outs:empty { display: none; }
.out { display: flex; align-items: center; gap: 12px; min-width: 240px; max-width: 100%; padding: 12px; border: 1px solid #e2e8f0cc; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px #f1f5f9; text-align: left; color: inherit; cursor: pointer; transition: border-color 140ms; }
.out:hover { border-color: #bfdbfe; text-decoration: none; }
.out b { display: block; font-size: 14px; font-weight: 500; line-height: 1.5; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.out small { display: block; font-size: 12px; color: #64748b; }
/* A file to download, after the V4 chat: a miniature of it, its format, its name and one outlined button */
.out.doc { flex: 1 1 100%; align-items: stretch; }
.out-t { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding-top: 2px; }
.out-t > span:last-child { min-width: 0; }
.fmt { flex: none; display: inline-flex; align-items: center; height: 22px; margin-top: 1px; padding: 0 5px; border-radius: 4px; background: #2563eb; color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.fmt.pdf { background: #e11d48; }
.out .dl { align-self: flex-end; flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 1px solid #bfdbfe; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 500; color: var(--accent); transition: background 140ms; }
.out:hover .dl { background: #eff6ff; }
.mini { flex: none; display: flex; flex-direction: column; gap: 3px; width: 104px; height: 70px; padding: 8px 9px; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; overflow: hidden; }
.mini i { display: block; flex: none; height: 2.5px; border-radius: 1px; background: #e2e8f0; }
.mini i.t { width: 60%; height: 5px; background: #334155; }
.mini i.s { width: 40%; height: 3px; margin-bottom: 2px; background: #cbd5e1; }
.mini .bx { display: flex; gap: 3px; margin-bottom: 2px; }
.mini .bx i { flex: 1; height: 12px; background: #eff6ff; }
.mini.sheet i { height: 4px; background: #eef2f6; }
.mini.sheet i.t { width: 100%; height: 6px; background: #e2e8f0; }
@media (max-width: 560px) { .out.doc .mini { display: none; } .out.doc { flex-wrap: wrap; } }

/* The answer as a Satin panel: a headline, then compact Figures with their status at the top right */
.found { padding: 20px 22px; border: 1px solid var(--panel-edge); border-radius: 12px; background: var(--panel); box-shadow: var(--panel-shadow); }
.found h3.found-sum { margin: 0 0 16px; max-width: 52ch; font-family: var(--font); font-weight: 400; font-size: 19px; line-height: 1.42; letter-spacing: -.015em; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--panel-edge); border-radius: 8px; background: #ffffff9c; box-shadow: 0 0 0 1px #2836470a; }
/* the status sits at the top right, the number gets the full width under it */
.stat-top { display: flex; flex-direction: column-reverse; gap: 6px; }
.stat-top .flag { align-self: flex-end; margin: -2px -4px 0 0; }
.stat b { font-size: 21px; font-weight: 400; line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat b.long { font-size: 15.5px; font-weight: 500; letter-spacing: -.01em; }
.stat span { font-size: 12.5px; line-height: 1.45; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stat details, .found-more { font-size: 12px; color: var(--text-3); }
.stat summary, .found-more summary { cursor: pointer; }
.stat pre { margin: 6px 0 0; padding: 8px 10px; border-radius: 6px; background: var(--wash); white-space: pre-wrap; word-break: break-word; max-height: 200px; overflow: auto; }
.found-more { margin-top: 12px; }
.found-more p, .found-more ul { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.found-more ul { padding-left: 18px; }
.found-more .stats { margin-top: 10px; }
.writeup > summary { font-size: 12.5px; color: var(--text-3); cursor: pointer; }
.writeup[open] > summary { margin-bottom: 10px; }
/* What to do next, under the latest reply only: a click sends it, the pencil puts it in the box to edit first */
.nexts { padding-top: 10px; border-top: 1px solid #e6ebf2; }
.nexts-h { margin: 0 0 3px 6px; font-size: 10.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: #7c8695; }
.nx { display: flex; align-items: stretch; gap: 2px; }
.nx-go { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 34px; padding: 5px 8px 5px 6px; border: 0; border-radius: 8px; background: none; font-size: 13px; line-height: 1.35; color: var(--text); text-align: left; cursor: pointer; }
.nx-go:hover, .nx-go:focus-visible { background: #eef3fb; color: var(--accent-ink); outline: none; }
.nx-go .n { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; border: 1px solid #e3e8ef; border-radius: 4px; background: #f4f6f9; font-size: 10px; font-weight: 500; line-height: 1; color: #7c8695; }
.nx-go > .ic { color: #7c8695; }
.nx-go:hover > .ic, .nx-go:hover .n { color: var(--accent-ink); }
.nx-go span { flex: 1; min-width: 0; }
.nx-edit { display: grid; place-items: center; width: 28px; border: 0; border-radius: 8px; background: none; color: transparent; cursor: pointer; }
.nx:hover .nx-edit, .nx-edit:focus-visible { color: #7c8695; }
.nx-edit:hover { background: #f4f6f9; color: var(--text); }
.slot-next:empty { display: none; }

.md { font-size: 15px; line-height: 1.75; color: var(--text); overflow-wrap: anywhere; }
.md p { margin: 0 0 14px; } .md p:last-child { margin-bottom: 0; }
.md b, .md strong { font-weight: 500; }
.md h4 { margin: 18px 0 6px; font-size: 15px; font-weight: 500; }
.md ul, .md ol { margin: 0 0 14px; padding-left: 1.15em; }
.md li { margin-bottom: 6px; padding-left: 2px; }
.md li::marker { color: #94a3b8; }
.md code { padding: 1px 5px; border-radius: 4px; background: #f1f4f9; }
.md pre { margin: 0 0 10px; padding: 12px 14px; border-radius: var(--r); background: var(--wash); overflow-x: auto; }
.md pre code { padding: 0; background: none; }
.md-table { max-width: 100%; margin: 0 0 10px; overflow-x: auto; }
/* A value the source does not publish: an empty outline in its slot, and one quiet line under the chart */
.col-np { fill: none; stroke: #c3ccd8; stroke-width: 1; stroke-dasharray: 3 2; }
.np-note { margin-top: 6px; font-size: 11.5px; color: var(--text-3); }
.sc-figure-note { margin-top: 4px; font-size: 11px; color: #9b6553; }
.md table { border-collapse: collapse; margin: 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.md th, .md td { padding: 6px 14px 6px 0; border-bottom: 1px solid var(--border-2); text-align: left; vertical-align: top; }
.md th { font-weight: 500; color: var(--text-2); }
.run-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
/* The task list Merra keeps while it works: done, doing now, to do */
.slot-plan:empty { display: none; }
.plan { display: grid; gap: 8px; max-width: 560px; margin: 2px 0; padding: 12px 16px; list-style: none; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.plan-i { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.plan-m { flex: none; display: grid; place-items: center; box-sizing: border-box; width: 15px; height: 15px; margin-top: 2px; border: 1.5px dashed #b3bdc9; border-radius: 50%; color: #fff; }
.plan-i.is-done { color: var(--text-3); }
.plan-i.is-done .plan-m { border: 0; background: #98a3b1; }
.plan-i.is-doing { color: var(--text); font-weight: 500; }
.plan-i.is-doing .plan-m { border: 1.5px solid #d3dae4; border-top-color: var(--accent); animation: plan-turn .9s linear infinite; }
@keyframes plan-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .plan-i.is-doing .plan-m { animation: none; border-color: var(--accent); } }
/* Thumbs up or down on an answer, and one line for what was wrong */
.run-foot { align-items: center; }
.rate { display: inline-flex; align-items: center; gap: 2px; }
.rate-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text-3); cursor: pointer; }
.rate-btn:hover { background: var(--wash); color: var(--text); }
.rate-btn.is-on { background: #edf3ff; color: var(--accent); }
.rate-btn:focus-visible { outline: 2px solid var(--blue-200); outline-offset: 1px; }
.rate-msg { margin-left: 6px; }
.rate-msg:empty { display: none; }
.rate-note { flex-basis: 100%; }
.rate-note[hidden] { display: none; }
.rate-note input { width: min(100%, 440px); height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; outline: 0; background: var(--surface); font: inherit; font-size: 13px; color: var(--text); }
.rate-note input:focus { border-color: rgba(20, 93, 251, .5); }

/* Pages: datasets, updates, usage */
.page-in { max-width: 1080px; margin: 0 auto; padding: 34px 32px 60px; }
.page-h { margin-bottom: 22px; }
.page-h h1 { margin: 0 0 6px; font-family: var(--display); font-weight: 300; font-size: 34px; line-height: 1.12; }
.page-h p { margin: 0; max-width: 70ch; font-size: 14.5px; color: var(--text-2); }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; font-size: 13px; color: var(--text-3); }
.back:hover { color: var(--accent-ink); text-decoration: none; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.head .page-h { margin: 0; min-width: 0; }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex: none; }
.sec { margin: 34px 0 4px; font-size: 16px; font-weight: 500; }
.sec-sub { margin: 0 0 14px; font-size: 13px; color: var(--text-3); }
.sec.first { margin-top: 0; }
/* Data that Merra manages carries the Merra mark and brand blue, so it reads as ours at a glance */
.managed-h { display: flex; align-items: center; gap: 12px; margin: 52px 0 6px; padding-top: 28px; border-top: 1px solid var(--border-2); }
.managed-h h2 { margin: 0; font-family: var(--display); font-weight: 300; font-size: 30px; line-height: 1.1; color: var(--accent-ink); }
.mbadge { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 4px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 500; }
.mbadge .app-mark { width: 18px; height: 18px; border-radius: 4px; background: rgba(255, 255, 255, .18); }
.mbadge .app-mark img { width: 11px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; }
.card:hover { border-color: rgba(20, 93, 251, .4); box-shadow: var(--shadow); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card h3 { margin: 4px 0 0; font-size: 15.5px; font-weight: 500; line-height: 1.3; }
.card p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.card .thumb { height: 74px; margin: -4px -6px 2px; }
.card .thumb svg { display: block; width: 100%; height: 100%; }
.empty-state { padding: 46px 24px; border: 1px dashed var(--border); border-radius: 14px; color: var(--text-2); font-size: 14px; text-align: center; }
.empty-state h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 300; font-size: 24px; color: var(--text); }
details.more { margin-top: 30px; }
details.more > summary { cursor: pointer; font-size: 13.5px; color: var(--text-2); }
details.more > summary:hover { color: var(--accent-ink); }
.rows { display: flex; flex-direction: column; margin-top: 10px; border: 1px solid var(--border-2); border-radius: 12px; overflow: hidden; }
.rows > * { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-top: 1px solid var(--border-2); background: #fff; font-size: 13px; text-align: left; }
.rows > *:first-child { border-top: 0; }
.rows > button { cursor: pointer; }
.rows > button:hover { background: var(--wash); }
.rows .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Library: public data by collection, with who publishes it */
.pmark { display: inline-grid; place-items: center; flex: none; min-width: 38px; height: 38px; padding: 0 7px; border-radius: 10px; background: color-mix(in srgb, var(--pc, #475569) 9%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc, #475569) 22%, transparent); color: var(--pc, #475569); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.pmark.sm { min-width: 26px; height: 18px; padding: 0 5px; border-radius: 4px; font-size: 9.5px; }
.pmark.xs { min-width: 22px; height: 16px; padding: 0 4px; border-radius: 4px; font-size: 8.5px; letter-spacing: .02em; }
.pmark img { max-width: 30px; max-height: 26px; }
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 6px; }
.trust div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.trust .ic { margin-top: 2px; color: var(--accent-ink); }
.trust b { display: block; font-weight: 500; color: var(--text); }
.coll { margin-top: 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--accent-ink); }
.coll h2 { margin: 2px 0 6px; font-family: var(--display); font-weight: 300; font-size: 27px; line-height: 1.15; }
.coll > p { margin: 0 0 16px; max-width: 74ch; font-size: 14.5px; color: var(--text-2); }
.coll-b { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.coll-b.one { grid-template-columns: minmax(0, 1fr); }
.feat { padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.feat h3 { margin: 0 0 10px; font-size: 14px; font-weight: 500; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; margin-bottom: 12px; border-radius: 6px; background: #e9edf2; }
.seg button { height: 24px; padding: 0 10px; border: 0; border-radius: 4px; background: none; font-size: 12px; color: var(--text-2); cursor: pointer; }
.seg button.is-on { background: #fff; color: var(--text); box-shadow: 0 1px 3px #28394e14; }
.feat .cap { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--text-3); }
.rank { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rank b { font-weight: 500; color: var(--text); }
.srcs { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
.src { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border: 0; border-top: 1px solid var(--border-2); background: none; text-align: left; cursor: pointer; }
.src:first-child { border-top: 0; }
.src:hover { background: var(--wash); }
.src h4 { margin: 0 0 2px; font-size: 15px; font-weight: 500; }
.src p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.src small { display: block; margin-top: 5px; font-size: 12px; color: var(--text-3); }
.src > .ic { color: var(--text-3); }
.ask-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.ask-list small { font-size: 12px; color: var(--text-3); }
.ask-list button, .asks button { display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 13px; line-height: 1.4; color: var(--text-2); text-align: left; cursor: pointer; }
.ask-list button .ic, .asks button .ic { margin-top: 2px; color: var(--accent-ink); }
.ask-list button:hover, .asks button:hover { border-color: rgba(20, 93, 251, .4); color: var(--text); }
.asks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.byline { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; color: var(--text-2); }
.notes { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.notes li { margin-bottom: 4px; }

/* County maps */
.map { position: relative; }
.map svg { display: block; width: 100%; height: auto; }
.map path { stroke: #fff; stroke-width: 1; stroke-linejoin: round; cursor: default; transition: opacity .1s; }
.map path:hover { stroke: var(--s2); stroke-width: 1.4; }
.map svg.fine path { stroke-width: .5; }
.map svg.fine path:hover { stroke-width: 1; }
.packs-h { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border-2); }
.packs-h h2 { margin: 0 0 4px; font-size: 16px; font-weight: 500; }
.packs-h p { margin: 0; max-width: 74ch; font-size: 13.5px; color: var(--text-3); }
.packs-h + .coll { margin-top: 24px; }
.map-legend { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.map-legend .ramp { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #e3ecfb, #a9c4f4, #5d8fe8, #1f5fd6, #0b3a99); }
.map-legend .nd { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; }
.map-legend .nd i { width: 10px; height: 10px; border-radius: 3px; background: #eceff4; }

/* Dataset page */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--border-2); overflow: hidden; }
.fact { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; background: #fff; }
.fact small { font-size: 12px; color: var(--text-3); }
.fact b { font-size: 17px; font-weight: 400; line-height: 1.3; font-variant-numeric: tabular-nums; }
.fact b.sm { font-size: 14px; }
.fact b + small { margin-top: 1px; }
.fact .ok { color: var(--ok); } .fact .bad { color: var(--bad); }
.edit-h input, .edit-h textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; outline: 0; }
.edit-h input { margin-bottom: 8px; font-size: 20px; }
.edit-h textarea { min-height: 70px; font-size: 14px; resize: vertical; }
.edit-h input:focus, .edit-h textarea:focus { border-color: rgba(20, 93, 251, .5); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.field { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--border-2); }
.field .ic { margin-top: 2px; color: var(--text-3); }
.field b { font-size: 13.5px; font-weight: 500; }
.field span { grid-column: 2; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field em { float: right; margin-left: 8px; font-size: 11.5px; font-style: normal; font-weight: 400; color: var(--text-3); }
.link { padding: 0; border: 0; background: none; font-size: 13px; color: var(--accent-ink); cursor: pointer; }
.link:hover { text-decoration: underline; }
.search { display: flex; align-items: center; gap: 8px; width: min(320px, 100%); height: 34px; margin-bottom: 10px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-3); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13px; color: var(--text); }
.grid { max-height: 440px; overflow: auto; border: 1px solid var(--border-2); border-radius: 12px; }
.grid table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.grid th { position: sticky; top: 0; background: var(--wash); font-weight: 500; color: var(--text-2); }
.grid th, .grid td { padding: 7px 14px; border-bottom: 1px solid var(--border-2); text-align: left; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.grid td.num, .grid th.num { text-align: right; }
.grid th small { display: block; font: 400 10.5px var(--mono); color: var(--text-3); }
.grid-foot { margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.checks { display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.check .ic { color: var(--ok); } .check.fail .ic { color: var(--bad); }
.check small { margin-left: auto; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.origin { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.origin > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.origin .ic { color: var(--text-3); }
details.adv { margin-top: 16px; }
details.adv > summary { cursor: pointer; font-size: 13px; color: var(--text-3); }
.console { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.console textarea { width: 100%; min-height: 84px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); font: 12.5px/1.6 var(--mono); resize: vertical; }
.console .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--text-3); }

/* Charts and chart tiles */
.tiles { display: flex; flex-direction: column; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.charts .wide { grid-column: 1 / -1; }
.tile { min-width: 0; padding: 16px 18px 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.tile h4 { margin: 0 0 10px; font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.kpi h4 { margin-bottom: 6px; font-weight: 400; color: var(--text-2); }
.tile .big { font-size: 34px; font-weight: 300; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile .note { margin-top: 8px; font-size: 12px; line-height: 1.45; color: var(--text-3); }
.tile .terr { font-size: 12.5px; color: var(--bad); }
.tile .grid { max-height: 340px; border-radius: 8px; }
.chart { position: relative; height: 250px; }
.chart.short { height: 190px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .gl { stroke: rgba(16, 33, 66, .07); }
.chart .ax { stroke: rgba(17, 24, 39, .28); }
.chart text { font: 11px var(--font); fill: var(--text-3); font-variant-numeric: tabular-nums; }
.chart .ln { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.chart .col { fill: var(--s1); opacity: .85; }
.chart .col:hover { opacity: 1; }
.chart .cross { stroke: rgba(17, 24, 39, .3); }
.tip { position: absolute; z-index: 2; transform: translate(-50%, calc(-100% - 10px)); padding: 5px 8px; border-radius: 6px; background: #111827; color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 3px; margin-right: 6px; border-radius: 2px; vertical-align: middle; }
.legend i.sw { height: 8px; }
/* An estimate's key is a short dashed line in its colour, as the series is drawn */
.legend i.est { width: 14px !important; height: 2px !important; border-radius: 0 !important; background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px) !important; }
.bars .track i.est { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.6) 0 3px, transparent 3px 6px); }
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 34%) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bar-row i { display: block; height: 14px; min-width: 2px; border-radius: 3px; background: var(--s1); }
.bar-row b { min-width: 44px; font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; }
.bar-row.group { margin-top: 6px; }
.insight { margin-bottom: 16px; padding: 18px 20px; border-radius: 14px; background: linear-gradient(180deg, #f4f8ff, #fafcff); border: 1px solid rgba(20, 93, 251, .14); }
.insight h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--accent-ink); }
.insight > p { margin: 0; max-width: 60ch; font-family: var(--display); font-weight: 300; font-size: 20px; line-height: 1.4; }
.insight .stats { margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }

/* Automatic updates */
.upds { display: flex; flex-direction: column; gap: 12px; }
.upd { padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.upd.off { background: var(--wash); }
.upd-main { display: flex; align-items: flex-start; gap: 12px; }
.upd-main h3 { margin: 0 0 2px; font-size: 15.5px; font-weight: 500; }
.upd-main p { margin: 0; font-size: 13px; color: var(--text-2); }
.upd-t { flex: 1; min-width: 0; }
.upd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-2); font-size: 13px; color: var(--text-2); }
.upd-row .sp { flex: 1; }
.upd select { height: 34px; padding: 0 28px 0 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b7280' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; font-size: 13px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.upd select:hover { border-color: rgba(20, 93, 251, .45); }
.hist { display: inline-flex; align-items: center; gap: 3px; }
.hist i { width: 7px; height: 16px; border-radius: 2px; background: #dfe5ee; }
.hist i.ok { background: #5fbf8f; } .hist i.bad { background: #e58b5f; }
.switch { position: relative; flex: none; width: 38px; height: 22px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #cfd6e2; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid rgba(20, 93, 251, .5); outline-offset: 2px; }

/* Usage */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.table th { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--border); font-weight: 500; font-size: 12px; color: var(--text-3); text-align: left; }
.table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border-2); vertical-align: top; }
.table td.num, .table th.num { text-align: right; }

.page-h h1, .managed-h h2, .coll h2, .empty-state h2 { letter-spacing: -.03em; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -120% 0; } }

@media (max-width: 860px) {
  .welcome-in { padding-top: 40px; }
  .w-sugs, .charts, .fields, .coll-b, .trust { grid-template-columns: minmax(0, 1fr); }
  .page-in { padding: 24px 18px 48px; }
  .head { flex-direction: column; } .actions { justify-content: flex-start; }
}

/* ---------------- Files Merra made ---------------- */
.outs > .filecard { flex: 1 1 100%; min-width: 0; }
.outs.solo { display: block; }
.filecard { display: block; border: 1px solid #e2e8f0cc; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px #f1f5f9; overflow: hidden; color: inherit; text-decoration: none; }
.filecard.pic img { display: block; width: 100%; max-height: 400px; object-fit: contain; background: var(--wash); }
.outs.solo .filecard.pic img { max-height: none; }
.filecard.pic span { display: block; padding: 9px 14px 11px; font-size: 13px; font-weight: 500; text-transform: capitalize; }
.filecard.pic:hover { border-color: #bfdbfe; }
.scene-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--border-2); }
.scene-bar b { margin-right: auto; font-size: 14px; font-weight: 500; }
/* A Satin control: a quiet square-cornered button that turns pale blue when on */
.ctl { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid #e4e9ef; border-radius: 6px; background: #e9edf2; font-size: 12px; color: var(--text-2); cursor: pointer; text-decoration: none; transition: background 160ms, color 160ms, border-color 160ms; }
.ctl:hover, .ctl.is-on { background: #edf3ff; border-color: #d9e4f9; color: var(--accent); text-decoration: none; }
/* The 3D model's layers: a Satin panel floating on the view, one row per layer, long names wrap */
.layers { position: absolute; left: 12px; top: 12px; z-index: 3; display: flex; flex-direction: column; width: min(260px, calc(100% - 72px)); max-height: calc(100% - 24px); border: 1px solid var(--panel-edge); border-radius: 10px; background: linear-gradient(165deg, #fbfcfdf2 3%, #f3f5f8eb 72%, #eef1f5eb); box-shadow: 0 0 0 1px #2836470f, 0 4px 14px #2434490f; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); overflow: hidden; }
.layers-h { display: flex; align-items: center; gap: 7px; width: 100%; padding: 9px 10px 9px 12px; border: 0; background: none; font-size: 12px; font-weight: 500; color: var(--text); text-align: left; cursor: pointer; }
.layers-h em { margin-left: auto; font-size: 11px; font-style: normal; font-weight: 400; color: var(--text-3); font-variant-numeric: tabular-nums; }
.layers-h > .ic { color: var(--text-3); transform: rotate(90deg); transition: transform .15s; }
.layers.shut .layers-h > .ic { transform: none; }
.layers.shut .layers-b { display: none; }
.layers-b { display: flex; flex-direction: column; gap: 1px; padding: 4px 6px 6px; border-top: 1px solid #e1e6ed; overflow-y: auto; }
.lyr { display: grid; grid-template-columns: 12px minmax(0, 1fr) 12px; align-items: center; gap: 9px; min-height: 30px; padding: 4px 6px; border: 0; border-radius: 6px; background: none; font-size: 12px; line-height: 1.35; color: var(--text-3); text-align: left; cursor: pointer; transition: background 140ms, color 140ms; }
.lyr:hover { background: #edf3ff; }
.lyr i { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px #2836471f; opacity: .3; }
.lyr .ic { color: var(--accent); opacity: 0; }
.lyr.is-on { color: var(--text); }
.lyr.is-on i, .lyr.is-on .ic { opacity: 1; }
.lyr:focus-visible, .layers-h:focus-visible, .ctl:focus-visible, .nx-go:focus-visible, .src-sum:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Options: alternative designs for the same land, one shown at a time, each a radio heading over its parts */
.lyr-cap { margin: 8px 6px 2px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.lyr-opt { display: grid; grid-template-columns: 12px minmax(0, 1fr); align-items: center; gap: 9px; min-height: 30px; padding: 4px 6px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--text-3); text-align: left; cursor: pointer; }
.lyr-opt:hover { background: #edf3ff; }
.lyr-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lyr-opt i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #94a3b8; }
.lyr-opt[aria-pressed="true"] { color: var(--text); }
.lyr-opt[aria-pressed="true"] i { background: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent), inset 0 0 0 3.5px #fff; }
.lyr.lyr-sub { padding-left: 27px; }
.lyr.is-idle { opacity: .45; }
/* Older pages still use the chip; it takes the same square look */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid #e4e9ef; border-radius: 6px; background: #fff; font-size: 12px; color: var(--text-3); cursor: pointer; text-decoration: none; }
.chip.is-on { color: var(--accent); border-color: #d9e4f9; background: #edf3ff; }
.scene-v { position: relative; height: min(68vh, 600px); min-height: 320px; overflow: hidden; background: linear-gradient(180deg, #eaf1fb 0%, #f7f9fc 55%, #ffffff 100%); }
.scene-tag { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 7px; border-radius: 6px; background: rgba(255, 255, 255, .96); box-shadow: 0 0 0 1px #2836470f, 0 6px 20px #21354b16; font-size: 11.5px; font-weight: 500; line-height: 1.2; color: var(--text); white-space: nowrap; pointer-events: none; will-change: transform; }
.scene-tag::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--accent)); }
.scene-tag::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 12px; background: rgba(16, 33, 66, .35); }
.scene-v canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.scene-v canvas:active { cursor: grabbing; }
.north { position: absolute; right: 12px; top: 12px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: rgba(255, 255, 255, .92); border: 1px solid var(--panel-edge); box-shadow: 0 0 0 1px #2836470f; font-size: 10px; font-weight: 600; color: var(--text-2); pointer-events: none; }
.north i { position: absolute; top: 3px; border: 4px solid transparent; border-bottom: 7px solid var(--accent); border-top: 0; }
.scene-tip { margin: 0; padding: 7px 14px 9px; font-size: 11.5px; color: var(--text-3); }
.pageframe iframe { display: block; width: 100%; height: min(70vh, 620px); border: 0; background: #fff; }

/* ---------------- Live sources and what comes next ---------------- */
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(11, 107, 64, .14); }
.srcs.live-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; margin-top: 12px; }
.srcs.live-g { border: 0; background: none; overflow: visible; }
.srcs.live-g .src { grid-template-columns: auto minmax(0, 1fr); border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: default; }
.coming-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.coming-g > div { padding: 12px 14px; border: 1px dashed var(--border); border-radius: 12px; }
.coming-g h4 { margin: 0 0 4px; font-size: 13.5px; font-weight: 500; }
.coming-g p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.rows.notes > div { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 12px; border-bottom: 1px solid var(--border-2); font-size: 13.5px; }
.rows.notes .grow { flex: 1; min-width: 0; }

/* ---------------- Updates Merra writes while it works ---------------- */

/* ---------------- A note Merra proposes ---------------- */
.outs > .keepnote { flex: 1 1 100%; }
.keepnote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border: 1px solid rgba(20, 93, 251, .22); border-radius: 12px; background: var(--tint); font-size: 13.5px; }
.keepnote span { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); }
.keepnote b { flex: 1 1 260px; font-weight: 500; }
.keepnote div { display: inline-flex; gap: 6px; }
.effort button:disabled { cursor: default; opacity: .55; }
.effort button:disabled[aria-checked="true"] { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .work-dots i, .chats .live, .tl-step.run .ic, .pic-view { animation: none; }
  .composer, .w-sug, .out, .grp-h, .lyr, .ctl, .send, .thumb-s { transition: none; }
}

/* ---------- Charts and headline figures, as in V4's program panels ---------- */
.tile { padding: 22px; border: 1px solid var(--panel-edge); border-radius: 12px; background: var(--panel); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; }
.tile-h { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.tile-h .idx { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 6px; background: #145dfb17; color: #145dfb; font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; }
.tile h4, .tile-h h4 { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.4; letter-spacing: -.015em; color: var(--text); }
.tile .note { margin-top: 12px; font-size: 11px; line-height: 1.45; color: var(--text-2); }
.kpis { gap: 8px; padding: 22px; border: 1px solid var(--panel-edge); border-radius: 12px; background: var(--panel); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tile.kpi { padding: 13px 12px; border: 1px solid #ffffffb3; border-radius: 8px; background: #ffffff9c; box-shadow: none; }
.kpi-top { display: flex; align-items: center; min-height: 24px; margin-bottom: 10px; font-size: 11px; line-height: 1.4; color: var(--text-2); }
.tile.kpi .big { font-size: 29px; font-weight: 400; line-height: 1.15; letter-spacing: -.035em; }
.tile.kpi .note { display: block; margin-top: 5px; font-size: 11px; }
.chart text { font: 400 10px var(--font); fill: #6e7885; font-variant-numeric: tabular-nums; }
.chart .gl { stroke: #e1e6ed; }
.chart .ax { stroke: #cfd6df; }
.chart .ln { stroke-width: 1.75; }
.chart .col { fill: #2a6bfc; opacity: 1; transition: fill 160ms; }
.chart .col:hover { fill: #145dfb; }
.chart .cross { stroke: #8494ad; stroke-dasharray: 3 3; }
.tip { transform: translate(-50%, calc(-100% - 12px)); display: flex; flex-direction: column; gap: 5px; min-width: 150px; padding: 12px; border: 1px solid #dfe5ed; border-radius: 8px; background: #fafbfd; color: var(--text); box-shadow: 0 8px 25px #253b5620; font-size: 11px; white-space: nowrap; }
.tip b { font-weight: 500; }
.tip span { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.tip span i { flex: none; width: 8px; height: 8px; border-radius: 2px; }
.tip em { margin-left: auto; padding-left: 14px; font-style: normal; color: var(--text); font-variant-numeric: tabular-nums; }
.legend { gap: 6px 16px; font-size: 12px; color: var(--text-2); }
.legend i { width: 9px; height: 9px; margin-right: 7px; border-radius: 2px; }
.bars { gap: 2px; }
.bar-row { grid-template-columns: minmax(80px, 34%) minmax(0, 1fr) 64px; gap: 10px; min-height: 30px; padding: 0 6px; border-radius: 5px; font-size: 12px; transition: background 160ms; }
.bar-row:hover { background: #e8eef8; }
.bar-row span:first-child { color: var(--text); }
.bar-row .track { position: relative; height: 10px; border-radius: 2.5px; background: #e8edf3; overflow: hidden; }
.bar-row .track i { position: absolute; inset: 0 auto 0 0; height: auto; min-width: 0; border-radius: 2.5px; background: linear-gradient(90deg, #3d7bfd, #145dfb); }
.bar-row b { min-width: 0; }
.bar-row.group { margin-top: 8px; }
/* Ranges, the clickable legend, benchmarks, dumbbells, strip plots and tabbed chart cards */
.chart .band { stroke: none; }
.chart .dot { cursor: default; }
.chart text.lbl { fill: var(--text-2); font-size: 10.5px; }
.legend.filter span { cursor: pointer; user-select: none; }
.legend.filter span.off { opacity: .45; }
.legend.filter span.off i { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--c); }
.legend i.tick { width: 2px; height: 11px; border-radius: 1px; background: #8a94a1; }
.legend i.dot { border-radius: 50%; }
.bar-row, .db-row { position: relative; }
.bar-row .track.has-bm { overflow: visible; }
.bar-row .track .bm { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: #8a94a1; }
.bm-tip { display: none; position: absolute; right: 6px; bottom: calc(100% - 2px); z-index: 2; padding: 7px 10px; border: 1px solid #dfe5ed; border-radius: 8px; background: #fafbfd; font-size: 11.5px; font-style: normal; color: var(--text); white-space: nowrap; box-shadow: 0 8px 20px -10px rgba(16, 24, 40, .25); pointer-events: none; }
.bar-row:hover .bm-tip, .db-row:hover .bm-tip { display: block; }
.dumbbell { display: flex; flex-direction: column; gap: 2px; }
.db-row { display: grid; grid-template-columns: minmax(80px, 34%) minmax(0, 1fr) 64px; align-items: center; gap: 10px; min-height: 30px; padding: 0 6px; border-radius: 5px; font-size: 12px; transition: background 160ms; }
.db-row:hover { background: #e8eef8; }
.db-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.db-row b { font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; }
.db-track { position: relative; height: 14px; margin: 0 6px; }
.db-track u { position: absolute; top: 6px; height: 2px; background: #c5ced9; }
.db-track i { position: absolute; top: 1px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; box-shadow: 0 0 0 2px #fafbfd; }
.db-track i.h { background: #145dfb; }
.db-track i.o { background: #94a3b8; }
.db-axis, .db-axis:hover { min-height: 20px; background: none; }
.db-scale { position: relative; height: 14px; margin: 0 6px; }
.db-scale span { position: absolute; transform: translateX(-50%); font-size: 10px; color: #6e7885; font-variant-numeric: tabular-nums; }
.chart-tabs { display: flex; gap: 18px; margin: 0 0 12px; border-bottom: 1px solid #e1e6ed; }
.chart-tabs button { margin-bottom: -1px; padding: 0 0 8px; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.chart-tabs button.on { border-bottom-color: #145dfb; color: var(--text); }
.chart-window { display: flex; justify-content: flex-end; gap: 14px; margin: -2px 0 6px; }
.chart-window button { padding: 0 0 3px; border: 0; border-bottom: 1.5px solid transparent; background: none; font: inherit; font-size: 11.5px; color: var(--text-3); cursor: pointer; }
.chart-window button.on { border-bottom-color: #145dfb; color: var(--text); }
.stat-row { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 10px; }
.stat-row.n1 { --n: 1; } .stat-row.n2 { --n: 2; } .stat-row.n3 { --n: 3; } .stat-row.n4 { --n: 4; }
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px 10px; border: 1px solid #e3e8ef; border-radius: 10px; background: #fafbfd; }
.stat-l { font-size: 12px; color: var(--text-2); }
.stat-v { font-size: 24px; font-weight: 500; letter-spacing: -.02em; color: var(--text); }
.stat-n { font-size: 11.5px; color: var(--text-3); }
.stat .spark { margin-top: 4px; }
@media (max-width: 640px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.parts { position: relative; }
.parts-bar { display: flex; gap: 2px; height: 28px; margin-bottom: 12px; }
.parts-bar span { display: flex; align-items: center; min-width: 2px; padding: 0 8px; overflow: hidden; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; outline-offset: 2px; }
.parts-tip { position: absolute; top: -6px; z-index: 2; transform: translate(-50%, -100%); padding: 6px 9px; border: 1px solid #dfe5ed; border-radius: 7px; background: #fafbfd; font-size: 11.5px; white-space: nowrap; pointer-events: none; box-shadow: 0 8px 20px -10px rgba(16, 24, 40, .25); }
.meters { display: flex; flex-direction: column; gap: 2px; }
.meter-row { display: grid; grid-template-columns: minmax(80px, 34%) minmax(0, 1fr) minmax(64px, auto); align-items: center; gap: 10px; min-height: 30px; padding: 0 6px; border-radius: 5px; font-size: 12px; }
.meter-row:hover { background: #e8eef8; }
.meter-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.meter-track { position: relative; height: 10px; border-radius: 5px; background: #dbe5f7; }
.meter-track i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: #145dfb; }
.meter-track u { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: #fafbfd; }
.meter-row b { font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter-row b em { margin-left: 8px; font-style: normal; color: var(--text-3); }
.meters.has-bands .meter-row { grid-template-columns: minmax(80px, 30%) minmax(0, 1fr) 150px; }
.map-legend { font-size: 11px; color: #6e7885; }
.map-legend .ramp { border-radius: 2.5px; background: linear-gradient(90deg, #dbe5f7, #a0bce9, #5b8def, #2a62e8, #145dfb); }
.tile .grid { border: 0; border-radius: 0; }
.tile .grid table { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.tile .grid th { padding: 8px 10px; border-bottom: 0; background: #e9edf3; color: #6e7885; font-size: 11px; font-weight: 400; }
.tile .grid th:first-child { border-radius: 6px 0 0 6px; }
.tile .grid th:last-child { border-radius: 0 6px 6px 0; }
.tile .grid td { padding: 9px 10px; border-bottom: 1px solid #dfe5ed; }

/* ---------- The Data tab, as in V4's data workspace ---------- */
#v-data { background: linear-gradient(180deg, #e9ecf0, #eef1f4 420px, #f3f5f8); }
#v-data .page-in { max-width: 1240px; padding: 26px 32px 60px; }
.sd-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 22px; }
.sd-title { margin: 0; font: 380 34px/1.12 var(--font); letter-spacing: -.045em; color: var(--text); }
.sd-context { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 8px 0 0; font-size: 11px; line-height: 1.4; color: var(--text-2); }
.sd-context > span:not(.mbadge) { opacity: .5; }
.sd-context > .ic { color: #527b67; }
.sd-context .mbadge.sm { height: 20px; padding: 0 8px 0 3px; font-size: 10.5px; }
.sd-context .mbadge.sm .app-mark { width: 14px; height: 14px; }
.sd-context .mbadge.sm .app-mark img { width: 9px; }
.sd-tabs { display: flex; align-items: center; gap: 2px; flex: none; padding: 1px; border: 1px solid #ffffffb3; border-radius: 7px; background: var(--panel); box-shadow: 0 1px 2px #26354709, 0 4px 14px #26354705; }
.sd-tabs > button { height: 38px; min-width: 72px; padding: 0 16px; border: 0; border-radius: 5px; background: transparent; font: 300 12px/1.2 var(--font); color: #9198a2; white-space: nowrap; cursor: pointer; }
.sd-tabs > button:hover { background: #e8eef8; color: var(--text); }
.sd-tabs > button[aria-current="page"] { background: #145dfb; color: #fff; box-shadow: 0 1px 2px #12377714; }
.sd-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 5px 0 18px; font-size: 11px; color: var(--text-2); }
.sd-eyebrow { display: block; font-size: 10px; font-weight: 400; letter-spacing: .055em; text-transform: uppercase; color: var(--text-2); }
.sd-topline .sd-eyebrow { color: #145dfb; }
.sd-card { margin-bottom: 22px; border: 1px solid #ffffffb3; border-radius: 12px; background: var(--panel); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; overflow: hidden; }
.sd-empty { padding: 45px 24px; text-align: center; color: var(--text-2); }
.sd-empty h3 { margin: 0 0 8px; font-size: 15px; font-weight: 400; color: var(--text); }
.sd-empty p { max-width: 54ch; margin: 0 auto; font-size: 12px; }
.sd-more { margin-top: 20px; }
.sd-more > summary { font-size: 11px; color: var(--text-2); cursor: pointer; }
.dtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dtile { display: flex; flex-direction: column; align-items: stretch; min-width: 0; min-height: 280px; padding: 24px; border: 1px solid #ffffffb3; border-radius: 12px; background: var(--panel); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; font: inherit; color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.dtile:hover { border-color: #145dfb55; background: #e8eef8; box-shadow: 0 8px 24px #1d35600b; }
.dtile-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; color: var(--text-2); }
.dtile-icon { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid #e4e9ef; border-radius: 7px; background: #fbfcfd; color: #145dfb; }
.dtile .sd-eyebrow { margin-bottom: 6px; }
.dtile > strong { font-size: 21px; font-weight: 400; line-height: 1.3; letter-spacing: -.025em; }
.dtile-desc { display: -webkit-box; min-height: 40px; max-width: 40ch; margin-top: 10px; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-size: 12px; line-height: 1.65; color: var(--text-2); }
.dtile-detail { display: flex; flex-direction: column; gap: 8px; margin: 20px 0 22px; font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dtile-detail > span { display: flex; align-items: center; gap: 7px; }
.dtile-action { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; border-top: 1px solid #dfe5ed; font-size: 12px; color: #145dfb; }
@media (max-width: 1100px) { .dtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .dtiles { grid-template-columns: 1fr; } .sd-head { flex-direction: column; align-items: flex-start; } }
/* One dataset */
.sd-crumbs { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; font-size: 11px; color: var(--text-2); }
.sd-crumbs a { color: inherit; }
.sd-crumbs a:hover { color: #145dfb; text-decoration: none; }
.sd-crumbs > span { opacity: .42; font-weight: 300; }
.sd-crumbs b { font-weight: 400; color: var(--text); }
.sd-head.ds { align-items: flex-start; margin-bottom: 18px; }
.ds-h { min-width: 0; }
#v-data .btn { height: auto; min-height: 36px; padding: 8px 13px; border: 1px solid #e4e9ef; border-radius: 7px; background: #fff; font-size: 12px; font-weight: 400; color: var(--text); }
#v-data .btn:hover { border-color: #e4e9ef; background: #e8eef8; color: var(--text); }
#v-data .btn.primary { border-color: #145dfb; background: #145dfb; color: #fff; box-shadow: 0 1px 2px #145dfb1a; }
#v-data .btn.primary:hover { background: #0e50e0; }
#v-data .btn.icon { justify-content: center; width: 36px; padding: 0; }
#v-data .btn.danger:hover { color: var(--bad); }
.ul-tabs { display: flex; align-items: center; gap: 5px; margin: 0 0 20px; border-bottom: 1px solid #dfe5ed; }
.ul-tabs > button { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 10px 18px; border: 0; border-bottom: 2px solid transparent; background: transparent; font: inherit; font-size: 12px; color: var(--text-2); cursor: pointer; }
.ul-tabs > button > span { font-size: 10px; opacity: .75; font-variant-numeric: tabular-nums; }
.ul-tabs > button:hover { background: #fbfcfd99; }
.ul-tabs > button[aria-current="page"] { border-bottom-color: #145dfb; color: #145dfb; }
.ds-desc { max-width: 780px; margin: 0 0 20px; font-size: 12px; line-height: 1.6; color: var(--text-2); }
.ds-summary { display: grid; grid-template-columns: 1.65fr repeat(3, minmax(0, 1fr)); }
.ds-hero { padding: 23px 24px; background: linear-gradient(135deg, #145dfb06, transparent); }
.row-h { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-2); }
.row-h .ic { color: #145dfb; }
.ds-ring-row { display: flex; align-items: center; gap: 24px; margin: 17px 0 14px; }
.ds-ring { display: grid; place-items: center; flex: 0 0 128px; width: 128px; height: 128px; border-radius: 50%; }
.ds-ring > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100px; height: 100px; border-radius: 50%; background: #f5f7f9; }
.ds-ring strong { font-size: 25px; font-weight: 400; line-height: 1.2; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.ds-ring span { font-size: 10px; color: var(--text-2); }
.ds-legend { display: flex; flex: 1; flex-direction: column; gap: 12px; margin: 0; }
.ds-legend > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 10px; line-height: 1.5; }
.ds-legend dt { display: flex; align-items: center; gap: 7px; color: var(--text-2); }
.ds-legend i { width: 7px; height: 7px; border-radius: 2px; background: #dbe3ed; }
.ds-legend i[data-k="full"] { background: #145dfb; }
.ds-legend i[data-k="gaps"] { background: #83abff; }
.ds-legend dd { margin: 0; font-size: 11px; font-variant-numeric: tabular-nums; }
.ds-hero > p { margin: 0; font-size: 10px; line-height: 1.5; color: var(--text-2); }
.ds-stat { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 9px; min-width: 0; margin: 24px 0; padding: 0 23px; border-left: 1px solid #dfe5ed; }
.ds-stat > span { font-size: 11px; line-height: 1.4; color: var(--text-2); }
.ds-stat > strong { font-size: 35px; font-weight: 400; line-height: 1.3; letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ds-stat > strong.sm { font-size: 20px; line-height: 1.35; letter-spacing: -.025em; }
.ds-stat > strong.ok { color: var(--ok); }
.ds-stat > strong.bad { color: var(--bad); }
.ds-stat > small { min-height: 17px; font-size: 10px; line-height: 1.7; color: var(--text-2); }
@media (max-width: 1100px) { .ds-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ds-hero { grid-column: 1 / -1; border-bottom: 1px solid #dfe5ed; } .ds-stat:nth-child(2) { border-left: 0; } }
.ds-glance { margin-bottom: 22px; }
.sd-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px; }
.sd-sec-h > div { display: flex; align-items: center; gap: 11px; }
.sd-sec-h > div > .ic { flex: none; color: #145dfb; }
.sd-sec-h h3 { margin: 0; font-size: 14px; font-weight: 450; letter-spacing: -.012em; }
.sd-sec-h p { margin: 5px 0 0; font-size: 11px; line-height: 1.5; color: var(--text-2); }
.sd-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 24px; border-top: 1px solid #dfe5ed; }
.sd-seg { display: flex; gap: 3px; padding: 3px; border-radius: 7px; background: #fbfcfd; }
.sd-seg > button { display: flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid transparent; border-radius: 5px; background: none; font: inherit; font-size: 10px; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.sd-seg > button > span { font-size: 9px; opacity: .75; }
.sd-seg > button[aria-pressed="true"] { border-color: #e4e9ef; background: #e9edf2; color: var(--text); box-shadow: 0 1px 3px #152c4510; }
.sd-find { display: flex; align-items: center; gap: 7px; width: 210px; padding: 7px 9px; border: 1px solid #e4e9ef; border-radius: 7px; background: #e9edf2; color: var(--text-2); }
.sd-find:focus-within { border-color: #97b8fa; box-shadow: 0 0 0 2px #145dfb0e; }
.sd-find input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 11px; color: var(--text); }
.sd-tscroll { overflow-x: auto; }
.sd-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 11px; line-height: 1.5; }
.sd-table thead th { padding: 11px 20px; border-bottom: 1px solid #dfe5ed; background: #e9edf3; font-size: 10px; font-weight: 400; color: var(--text-2); text-align: left; white-space: nowrap; }
.sd-table tbody th, .sd-table td { padding: 14px 20px; border-bottom: 1px solid #dfe5ed; font-weight: 400; text-align: left; vertical-align: middle; font-variant-numeric: tabular-nums; }
.sd-table tbody tr:last-child > * { border-bottom: 0; }
.sd-table tbody tr:hover { background: #145dfb05; }
.sd-fname { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.sd-fname .ic { color: #145dfb; }
.fill-ok { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border: 1px solid #145dfb18; border-radius: 4px; background: #145dfb09; color: #145dfb; white-space: nowrap; }
.fill-part { color: #9b6553; white-space: nowrap; }
.fill-none { color: var(--text-3); }
.sd-totals { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 20px; border-top: 1px solid #dfe5ed; font-size: 10px; color: var(--text-2); }
.sd-totals .link { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #145dfb; }
.sd-card .asks { display: flex; flex-direction: column; gap: 0; padding: 0 12px 12px; }
.sd-card .asks button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 9px 12px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 12px; color: var(--text); text-align: left; cursor: pointer; }
.sd-card .asks button:hover { background: #e8eef8; color: #145dfb; }
.sd-card .asks .ic { flex: none; color: #145dfb; }
.sd-card .notes { margin: 0; padding: 0 24px 22px 42px; font-size: 12px; line-height: 1.6; color: var(--text-2); }
.sd-card .checks { gap: 10px; padding: 0 24px 22px; }
.sd-card .check { font-size: 12px; }
.sd-card .origin { gap: 10px; padding: 0 24px 22px; font-size: 12px; }
/* The records sheet: sticky header with column letters, row numbers, light zebra rows, spreadsheet rules */
.sheet { overflow: visible; }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #dfe5ed; }
.sheet-search { display: flex; align-items: center; gap: 9px; flex: 1 1 210px; max-width: 350px; min-height: 36px; padding: 7px 10px; border: 1px solid transparent; border-radius: 7px; color: var(--text-2); }
.sheet-search:focus-within { border-color: #93b4f5; background: #fff; box-shadow: 0 0 0 3px #145dfb0a; }
.sheet-search input { width: 100%; padding: 4px 0; border: 0; outline: 0; background: transparent; font: 400 12px var(--font); color: var(--text); }
.sheet-meta { font-size: 10px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.grid.sheet-grid { max-height: clamp(340px, calc(100dvh - 370px), 760px); border: 0; border-bottom: 1px solid #dfe5ed; border-radius: 0; scrollbar-width: thin; scrollbar-color: #b9c6d8 transparent; }
.sheet-grid table { width: auto; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11px; line-height: 1.4; color: var(--text); }
.sheet-grid th, .sheet-grid td { height: 40px; max-width: 260px; padding: 9px 12px; border-right: 1px solid #dce4ee; border-bottom: 1px solid #dce4ee; font-weight: 400; }
.sheet-grid thead th { z-index: 3; height: 46px; background: #e9eef5; font-size: 11px; color: #4b5f78; }
.sheet-grid .col-l { display: block; margin-bottom: 2px; font-size: 9px; color: #91a0b4; }
.sheet-grid td { background: #f7f9fc; }
.sheet-grid tbody tr:nth-child(even) td { background: #f0f4f9; }
.sheet-grid td:hover { box-shadow: inset 0 0 0 1px #8bb1fb; }
.sheet-grid .rn { position: sticky; left: 0; z-index: 2; width: 56px; min-width: 56px; padding: 0 8px; border-right-color: #cbd6e5; background: #edf1f7 !important; font-size: 9px; color: #8a98ac; text-align: center; }
.sheet-grid thead .rn { z-index: 5; background: #e6ecf4 !important; }
.sheet-grid .muted { color: #b5c1d0; }
.sheet-foot { display: flex; align-items: center; gap: 22px; min-height: 48px; padding: 11px 17px; font-size: 10.5px; color: var(--text-2); }
.sheet-foot > span { margin-right: auto; }
.sheet-empty { margin: 0; padding: 45px 24px; font-size: 12px; color: var(--text-2); text-align: center; }
#v-data .adv { font-size: 11px; color: var(--text-2); }
/* Managed by Merra: each collection as a card, sources as rows inside it */
#v-data .coll { margin: 0 0 22px; padding: 24px; border: 1px solid #ffffffb3; border-radius: 12px; background: var(--panel); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; }
#v-data .coll h2 { margin: 4px 0 6px; font-size: 21px; font-weight: 400; letter-spacing: -.025em; }
#v-data .coll > p { font-size: 12px; line-height: 1.6; color: var(--text-2); }
#v-data .eyebrow { font-size: 10px; letter-spacing: .055em; text-transform: uppercase; color: #145dfb; }
#v-data .srcs { border: 1px solid #dfe5ed; border-radius: 10px; background: #ffffff9c; }
#v-data .src:hover { background: #e8eef8; }
#v-data .src h4 { font-size: 13px; font-weight: 450; }
#v-data .src p { font-size: 12px; }
#v-data .src small { font-size: 11px; }
#v-data .srcs.live-g { border: 0; background: none; }
#v-data .srcs.live-g .src { border: 1px solid #dfe5ed; border-radius: 10px; background: #ffffff9c; }
#v-data .packs-h { margin: 34px 0 14px; padding-top: 0; border-top: 0; }
#v-data .packs-h h2 { font-size: 14px; font-weight: 450; }
#v-data .packs-h p { font-size: 11px; }
#v-data .feat h3 { font-size: 14px; font-weight: 450; }
.tip { transform: translateY(calc(-100% - 12px)); max-width: min(380px, 100%); white-space: normal; }
.tip span { align-items: flex-start; }
.tip span i { margin-top: 3px; }
.tip em { white-space: nowrap; }

/* Data tab: projects (what one chat built) and sources, as V4 catalog tiles */
.dtile.group { min-height: 0; cursor: default; }
.dtile.group:hover { border-color: #ffffffb3; background: var(--panel); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; }
.dtile.group .dtile-desc { -webkit-line-clamp: 2; min-height: 0; }
.dt-list { display: flex; flex-direction: column; gap: 1px; margin: 16px -10px 0; }
.dt-row { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 7px 10px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 12.5px; color: var(--text); text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.dt-row > .ic:first-child { flex: none; color: #145dfb; }
.dt-row > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-row > em { flex: none; font-size: 10.5px; font-style: normal; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dt-row > .ic:last-child { flex: none; color: #b5c1d0; }
.dt-row:hover { background: #e8eef8; color: #145dfb; }
.dt-row:hover > .ic:last-child { color: #145dfb; }
.dt-row.quiet { color: var(--text-2); }
.dt-row.quiet > .ic:first-child { color: #9aa7b8; }
.dt-work > summary { padding: 7px 10px; font-size: 11px; color: var(--text-2); cursor: pointer; }
.dtile.group .dtile-detail { margin: 16px 0 18px; }
button.dtile-action { width: 100%; border: 0; border-top: 1px solid #dfe5ed; background: none; font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
button.dtile-action:hover { text-decoration: underline; }
.src-tile { min-height: 236px; }
.dtile-icon.logo { background: #fff; }
.dtile-icon.logo img { display: block; max-width: 34px; max-height: 34px; object-fit: contain; }
.live-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px; border: 1px solid #dce9e0; border-radius: 5px; background: #edf6f0; font-size: 10px; color: #47775f; }
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: #3f9a6b; }
.live-tag.soon { border-color: #e4e9ef; background: #f4f6f9; color: var(--text-2); }
.src-tile.soon { min-height: 0; border-style: dashed; border-color: #cfd8e3; background: #fbfcfd99; box-shadow: none; cursor: default; }
.src-tile.soon .dtile-icon { color: var(--text-3); }
div.src-tile:hover, .src-tile.soon:hover { border-color: #ffffffb3; background: var(--panel); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; cursor: default; }
.src-tile.soon:hover { border-color: #cfd8e3; background: #fbfcfd99; box-shadow: none; }
#v-data .sd-topline + .dtiles { margin-bottom: 30px; }
.pmark.logo { padding: 2px; background: #fff; box-shadow: inset 0 0 0 1px #e4e9ef; }
/* A logo fills its badge and never more: every size of mark gets a fixed box */
.pmark.logo { width: 38px; min-width: 0; padding: 3px; overflow: hidden; }
.pmark.logo.sm { width: 18px; height: 18px; padding: 1px; border-radius: 4px; }
.pmark.logo.xs { width: 16px; height: 16px; padding: 1px; border-radius: 4px; }
.pmark.logo img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: none; max-height: none; object-fit: contain; }
.sd-crumbs > a + span, .sd-crumbs > span + a { }
.ds-sibs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: -6px 0 16px; font-size: 11px; color: var(--text-2); }
.ds-sibs .sd-seg { flex-wrap: wrap; background: #ffffff8c; }
.ds-sibs .sd-seg > button { font-size: 11px; }
/* Automatic updates, as cards on the Data page */
#v-data .upds { gap: 16px; }
#v-data .upd { padding: 22px 24px; border: 1px solid #ffffffb3; border-radius: 12px; background: var(--panel); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; }
#v-data .upd.off { background: #f4f6f9; }
#v-data .upd-main h3 { font-size: 14px; font-weight: 450; letter-spacing: -.012em; }
#v-data .upd-main p, #v-data .upd-row { font-size: 11.5px; }
#v-data .upd-row { border-top-color: #dfe5ed; }
#v-data .upd select { height: 32px; border-color: #e4e9ef; border-radius: 7px; font-size: 12px; }
#v-data details.more > summary { font-size: 11px; color: var(--text-2); }

/* ---------- Data attached to a message, and projects ---------- */
.composer { position: relative; }
.comp-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.att-btn { display: grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 0; border: 1px solid #e4e9ef; border-radius: 7px; background: #fff; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.att-btn:hover, .att-btn[aria-expanded="true"] { border-color: #cadbff; background: #eff5ff; color: #145dfb; }
.comp-proj { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 260px; font-size: 11.5px; color: var(--text-2); }
.comp-proj span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-proj .ic { flex: none; color: #145dfb; }
.comp-proj:hover { color: #145dfb; text-decoration: none; }
.att-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 2px 0; }
.att-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 320px; height: 26px; padding: 0 4px 0 8px; border: 1px solid #d6e3fb; border-radius: 6px; background: #f1f6ff; font-size: 12px; color: #1d3f86; }
.att-chip > .ic { flex: none; color: #145dfb; }
.att-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-chip button { display: grid; place-items: center; flex: none; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 4px; background: none; color: #6b84b8; cursor: pointer; }
.att-chip button:hover { background: #dfe9fd; color: #145dfb; }
.msg-user.has-att { flex-direction: column; align-items: flex-end; }
.msg-att { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 88%; margin: 6px 0 0; }
.msg-att .att-chip { padding-right: 8px; }
.att-pop { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 30; display: flex; flex-direction: column; gap: 8px; width: min(440px, 100%); max-height: min(420px, 60vh); padding: 10px; border: 1px solid #e0e5ec; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px #253b5510, 0 16px 40px #253b5518; }
.att-pop .sd-find { width: 100%; background: #f4f6f9; }
.att-list { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
.att-row { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 6px 9px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 12.5px; color: var(--text); text-align: left; cursor: pointer; }
.att-row > .ic { flex: none; color: #145dfb; }
.att-row > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-row > em { flex: none; font-size: 10.5px; font-style: normal; color: var(--text-2); font-variant-numeric: tabular-nums; }
.att-row.proj { margin-top: 4px; font-weight: 500; }
.att-row.proj:first-child { margin-top: 0; }
.att-row.ds { padding-left: 30px; }
.att-row:hover { background: #e8eef8; color: #145dfb; }
.att-row.on { background: #eef4ff; }
.att-row.on::after { content: "Added"; flex: none; font-size: 10px; color: #145dfb; }
.att-none { margin: 0; padding: 16px 8px; font-size: 12px; color: var(--text-2); text-align: center; }
/* Project tiles and the project page */
.dtile-title { padding: 0; border: 0; background: none; font: inherit; font-size: 21px; font-weight: 400; line-height: 1.3; letter-spacing: -.025em; color: var(--text); text-align: left; cursor: pointer; }
.dtile-title:hover { color: #145dfb; }
.dt-files { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px 2px; }
.dt-files > em { font-size: 10.5px; font-style: normal; color: var(--text-2); }
.dt-file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 28px; padding: 0 8px 0 3px; border: 1px solid #e4e9ef; border-radius: 6px; background: #fff; font-size: 11px; color: var(--text); }
.dt-file:hover { border-color: #cadbff; color: #145dfb; text-decoration: none; }
.dt-file img { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; }
.dt-file .fmt, .pj-thumb .fmt { height: 16px; margin: 0; padding: 0 4px; font-size: 8px; }
.dt-file > span:last-child { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-table tbody tr { cursor: pointer; }
.pj-table .pj-go { width: 28px; color: #b5c1d0; }
.pj-table tbody tr:hover .pj-go { color: #145dfb; }
.pj-work { padding: 4px 14px 14px; border-top: 1px solid #dfe5ed; }
.pj-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; padding: 0 24px 22px; }
.pj-file { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 12px 10px 10px; border: 1px solid #e4e9ef; border-radius: 10px; background: #ffffffb3; color: var(--text); transition: border-color .15s, background .15s; }
.pj-file:hover { border-color: #cadbff; background: #f4f8ff; text-decoration: none; }
.pj-file > .ic { flex: none; color: #b5c1d0; }
.pj-thumb { display: grid; place-items: center; flex: none; width: 52px; height: 52px; overflow: hidden; border: 1px solid #e4e9ef; border-radius: 7px; background: #f4f6f9; }
.pj-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pj-thumb.scene { background: #edf3ff; color: #145dfb; }
.pj-name { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.pj-name b { overflow: hidden; font-size: 12.5px; font-weight: 450; text-overflow: ellipsis; white-space: nowrap; }
.pj-name b::first-letter { text-transform: uppercase; }
.pj-name small { font-size: 10.5px; color: var(--text-2); }
.pj-chats { display: flex; flex-direction: column; gap: 1px; padding: 0 14px 14px; }

/* ---------- Data: datasets as rows, files as cards ---------- */
.sd-toolbar.top { border-top: 0; border-bottom: 1px solid #dfe5ed; }
.ds-hint { font-size: 11px; color: var(--text-2); }
.ds-table tbody tr { cursor: pointer; }
.ds-table tbody th small { display: block; margin: 3px 0 0 20px; font-size: 10px; font-weight: 400; color: var(--text-2); }
.ds-table .sd-fname > span { overflow: hidden; text-overflow: ellipsis; }
.ds-row.kid th, .ds-row.kid td { padding-top: 9px; padding-bottom: 9px; border-bottom-color: #e8edf3; background: #fbfcfd66; }
.ds-row.kid .sd-fname { padding-left: 6px; color: var(--text); }
.ds-row.kid .sd-fname .ic { color: #6f97f5; }
.ds-elbow { flex: none; width: 10px; height: 12px; margin: -6px 0 0 2px; border-left: 1px solid #c9d4e3; border-bottom: 1px solid #c9d4e3; border-bottom-left-radius: 3px; }
.ds-table td .link { font-size: 11px; text-align: left; }
.ds-work { padding: 4px 14px 14px; border-top: 1px solid #dfe5ed; }
.fl-bar { margin-bottom: 16px; padding: 0; border-top: 0; }
.fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.fl-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px 10px 14px; border: 1px solid #ffffffb3; border-radius: 12px; background: var(--panel); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.fl-card:hover, .fl-card:focus-visible { border-color: #145dfb55; box-shadow: 0 8px 24px #1d35600b; outline: none; }
.fl-thumb { display: grid; place-items: center; height: 138px; margin-bottom: 8px; overflow: hidden; border: 1px solid #e4e9ef; border-radius: 8px; background: #f4f6f9; }
.fl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fl-thumb .fmt { height: 24px; padding: 0 8px; font-size: 11px; }
.fl-thumb.scene { background: linear-gradient(160deg, #edf3ff, #dfe9fd); }
.fl-name { overflow: hidden; padding: 0 2px; font-size: 13px; font-weight: 450; text-overflow: ellipsis; white-space: nowrap; }
.fl-name::first-letter { text-transform: uppercase; }
.fl-card small { padding: 0 2px; font-size: 10.5px; color: var(--text-2); }
.fl-from .link { font-size: 10.5px; }
.att-row.top { margin-top: 4px; font-weight: 450; }
.att-row.top:first-child { margin-top: 0; }

/* Each finding's sources: a row of publisher logos, each a link, with the name on hover */
.f-srcs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 9px; font-size: 10.5px; color: var(--text-3); }
.f-src { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid #e4e9ef; border-radius: 6px; background: #fff; text-decoration: none; transition: border-color .15s, transform .15s; }
.f-src:hover { border-color: #9dbcf9; transform: translateY(-1px); text-decoration: none; }
.f-logo { display: block; width: 15px; height: 15px; border-radius: 3px; object-fit: contain; }
.f-mono { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 3px; background: #e9edf3; font-size: 7.5px; font-weight: 600; font-style: normal; letter-spacing: -.02em; color: #5d6b7c; }
.f-basis { margin-left: 2px; color: var(--text-3); }
.f-how { margin: 6px 0 0; font-size: 12px; line-height: 1.55; color: var(--text-2); }

/* Datasets and files as tiles */
.sd-topline-r { display: flex; align-items: center; gap: 14px; }
.sd-topline-r .sd-find { width: 220px; padding: 6px 9px; background: #ffffffb3; }
.ds-tile { min-height: 0; cursor: default; }
.ds-tile:hover { border-color: #ffffffb3; background: var(--panel); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; }
.ds-tile .dtile-desc { -webkit-line-clamp: 2; min-height: 0; }
.dt-cap { display: block; padding: 0 10px 4px; font-size: 10px; letter-spacing: .055em; text-transform: uppercase; color: var(--text-2); }
.ds-tile .dtile-detail { margin: 16px 0 18px; }
.ds-tile .dtile-detail .link { font-size: 11px; text-align: left; }
.ds-work { margin-top: 16px; padding: 0; border-top: 0; }
.fl-thumb { position: relative; height: 150px; background: #fff; }
.fl-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.fl-thumb.image img, .fl-thumb.scene img { object-position: center; }
.fl-paper { display: none; }
.fl-thumb.none img { display: none; }
.fl-thumb.none .fl-paper { position: absolute; inset: 14px 26px 0; display: flex; flex-direction: column; gap: 7px; padding: 16px 14px; border: 1px solid #e4e9ef; border-bottom: 0; border-radius: 4px 4px 0 0; background: #fff; box-shadow: 0 -1px 6px #26354708; }
.fl-paper i { display: block; height: 5px; border-radius: 3px; background: #e9edf2; }
.fl-paper i:nth-child(2) { width: 82%; }
.fl-paper i:nth-child(3) { width: 64%; }
.fl-paper b { margin-top: auto; padding-bottom: 12px; font-size: 10.5px; font-weight: 400; color: var(--text-2); }
.slot-err .error { display: flex; flex-direction: column; gap: 6px; }
.err-raw > summary { font-size: 11px; color: var(--text-3); cursor: pointer; }
.err-raw code { display: block; margin-top: 4px; font-size: 11px; color: var(--text-3); white-space: pre-wrap; word-break: break-word; }

/* Datasets: small tiles, or a list */
.ds-views[data-view-as="grid"] .ds-list, .ds-views[data-view-as="list"] .ds-grid { display: none; }
.ds-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ds-tile { display: flex; flex-direction: column; gap: 6px; min-height: 0; padding: 16px 18px; cursor: pointer; }
.ds-tile:focus-visible { outline: 2px solid #145dfb; outline-offset: 2px; }
.dst-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dtile-icon.sm { width: 32px; height: 32px; border-radius: 7px; }
.dst-live { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #edf6f0; color: #3f8a63; }
.ds-tile > strong { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 15px; font-weight: 450; line-height: 1.35; letter-spacing: -.012em; }
.dst-meta { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dst-kids { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.dst-kid { height: 22px; padding: 0 8px; border: 1px solid #e4e9ef; border-radius: 5px; background: #ffffffb3; font: inherit; font-size: 10.5px; color: var(--text-2); cursor: pointer; }
.dst-kid:hover { border-color: #bed3fb; color: #145dfb; }
.ds-switch { padding: 2px; background: #ffffff8c; }
.ds-switch > button { padding: 4px 7px; }
.sd-topline-r { display: inline-flex; align-items: center; gap: 12px; }
.ds-list tbody tr { cursor: pointer; }
.ds-list tbody th { display: flex; align-items: center; gap: 8px; }
.ds-list tbody th .ic { flex: none; color: #145dfb; }
.ds-list tr.kid th { color: var(--text-2); }
.ds-indent { display: inline-block; width: 14px; }

/* A source pulled place by place: where it is ready */
.src-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.src-stats .ds-stat:first-child { border-left: 0; }
.src-table td .flag { height: 20px; font-size: 10.5px; }
.src-table a { color: #145dfb; }
.src-add { margin: 4px 0 30px; }
.src-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; margin-top: 14px; padding: 18px; border: 1px solid #ffffffb3; border-radius: 12px; background: var(--panel); }
.src-form label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--text-2); }
.src-form label.wide { grid-column: span 2; }
.src-form input, .src-form select { height: 34px; padding: 0 10px; border: 1px solid #e4e9ef; border-radius: 7px; background: #fff; font: inherit; font-size: 12px; color: var(--text); }
.src-form input:focus, .src-form select:focus { outline: 0; border-color: #97b8fa; box-shadow: 0 0 0 2px #145dfb0e; }
.src-go { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.src-result { font-size: 12px; color: var(--text-2); }
@media (max-width: 900px) { .src-form, .src-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Findings as V4 figures (satin-impact-figure): small tiles, the number large and light */
.found .stats { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.stat.fig { display: flex; flex-direction: column; gap: 0; min-width: 0; padding: 13px 12px 12px; border: 1px solid #ffffffb3; border-radius: 8px; background: #ffffff9c; box-shadow: none; }
.fig-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 22px; margin-bottom: 10px; }
.fig-st { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-2); }
.fig-st i { width: 7px; height: 7px; border-radius: 50%; background: #b5c1d0; }
.fig-st.clear i { background: #2f9e64; } .fig-st.caution i { background: #d9962b; } .fig-st.issue i { background: #d64561; }
.fig-top .f-srcs { margin: 0; gap: 4px; flex-wrap: nowrap; }
.fig-top .f-src { width: 20px; height: 20px; border-radius: 5px; }
.fig-top .f-logo { width: 13px; height: 13px; }
.fig-top .f-basis { margin: 0 2px 0 0; font-size: 10.5px; }
.fig-val { font-size: 29px; font-weight: 400; line-height: 1.15; letter-spacing: -.035em; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fig-val.long { font-size: 21px; letter-spacing: -.02em; }
.fig-what { display: block; margin-top: 5px; font-size: 11.5px; line-height: 1.45; color: var(--text-2); }
.fig-how { margin-top: 8px; }
.fig-how > summary { font-size: 10.5px; color: var(--text-3); cursor: pointer; list-style: none; }
.fig-how > summary::-webkit-details-marker { display: none; }
.fig-how > summary::before { content: '+ '; }
.fig-how[open] > summary::before { content: '– '; }
.fig-how .f-how { font-size: 11.5px; }
/* Managed by Merra: compact source tiles */
#v-data [data-dpane="managed"] .dtiles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
#v-data [data-dpane="managed"] .sd-topline + .dtiles { margin-bottom: 26px; }
.src-tile { min-height: 0; padding: 16px 18px; }
.src-tile .dtile-top { margin-bottom: 12px; }
.src-tile .dtile-icon { width: 36px; height: 36px; }
.src-tile .dtile-icon.logo img { max-width: 26px; max-height: 26px; }
.src-tile .sd-eyebrow { margin-bottom: 3px; font-size: 9.5px; }
.src-tile > strong { font-size: 15px; font-weight: 450; line-height: 1.3; letter-spacing: -.012em; }
.src-tile .dtile-desc { min-height: 0; margin-top: 4px; -webkit-line-clamp: 2; font-size: 11.5px; line-height: 1.55; }
.src-tile .dtile-detail { margin: 10px 0 0; font-size: 10.5px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #3f9a6b; box-shadow: 0 0 0 3px #3f9a6b1f; }
.fig-st i { display: inline-block; flex: none; }
.fig-top .f-srcs { flex-direction: row; align-items: center; }
.fig-st { gap: 6px; white-space: nowrap; }
.fig-st em { font-style: normal; color: var(--text-3); }
.fig-top .f-srcs { flex: none; }
.fig-top { justify-content: flex-start; min-height: 20px; margin-bottom: 12px; }
.dtile-icon.merra { border: 0; background: #145dfb; }
.dtile-icon.merra img { width: 20px; height: auto; }

.f-merra { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 4px; background: #145dfb; }
.f-merra img { width: 10px; height: auto; }
.pmark.logo.merra { background: #145dfb; box-shadow: none; }
.pmark.logo.merra img { width: 70%; height: auto; }

.dst-from { font-size: 10.5px; color: var(--text-3); }
.ds-working { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; font-size: 11px; color: var(--text-2); }
.ds-working > span { margin-right: 4px; }
.ds-working .dst-kid em { font-style: normal; color: var(--text-3); }

.ds-upd { min-height: 30px !important; padding: 5px 11px !important; }
.ds-upd em { font-style: normal; color: #3f8a63; }
.ds-tables { display: flex; align-items: center; gap: 10px; margin: -4px 0 16px; font-size: 11px; color: var(--text-2); }
.ds-tables .sd-seg { background: #ffffff8c; }
.ds-tables .sd-seg > button { font-size: 11.5px; padding: 6px 11px; }

/* Managed by Merra, laid out like V4 Prospects: toolbar, a table of one fixed height, the pager under it */
.cat-tools { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; }
.cat-filter { flex: 1; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; background: #ffffff8c; }
.cat-filter::-webkit-scrollbar { display: none; }
.cat-filter > button { flex: none; font-size: 11.5px; padding: 7px 12px; }
.cat-find { flex: none; width: 220px; background: #ffffffb3; }
.cat-switch { flex: none; background: #ffffff8c; }
.cat-switch > button { display: grid; place-items: center; padding: 7px 9px; }
.cat-shell { overflow: hidden; border: 1px solid #ffffffb3; border-radius: 14px; background: linear-gradient(165deg, #fbfcfd 3%, #f3f5f8 72%, #eef1f5); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; }
.cat-head, .cat-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 200px 120px; align-items: center; gap: 14px; padding: 0 20px; }
.cat-head { height: 38px; border-bottom: 1px solid #dfe5ed; background: #eaeef3; font-size: 11px; color: #6e7885; }
.cat-body { position: relative; height: clamp(280px, calc(100dvh - 282px), 1200px); overflow: hidden; }
.cat-grid { display: block; }
.cat-row { width: 100%; height: 56px; margin: 0; border: 0; border-bottom: 1px solid #dfe5ed; border-radius: 0; background: transparent; box-shadow: none; font: inherit; color: #303740; text-align: left; }
button.cat-row { cursor: pointer; }
button.cat-row:hover { background: #ffffff8c; }
.cat-logo { display: grid; place-items: center; width: 30px; height: 30px; overflow: hidden; border: 1px solid #e4e9ef; border-radius: 7px; background: #fff; }
.cat-logo img { display: block; max-width: 20px; max-height: 20px; object-fit: contain; }
.cat-logo.merra { border: 0; background: #145dfb; }
.cat-logo.merra img { width: 15px; max-height: none; }
.cat-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cat-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 450; }
.cat-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #6e7885; }
.cat-pub, .cat-cov { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: #6e7885; }
.cat-none { margin: 48px 0; font-size: 12px; color: #6e7885; text-align: center; }
.cat-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 11px; color: #76808f; font-variant-numeric: tabular-nums; }
.cat-nav { display: flex; align-items: center; gap: 10px; }
.cat-nav button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #fff; border-radius: 7px; background: #f7f9fc; color: #303740; cursor: pointer; }
.cat-nav button:first-child .ic { transform: rotate(180deg); }
.cat-nav button:disabled { opacity: .4; cursor: default; }
.cat-pg { min-width: 38px; text-align: center; }
/* Tiles: the same height, no table chrome */
.cat-wrap[data-view-as="grid"] .cat-shell { overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; }
.cat-wrap[data-view-as="grid"] .cat-head { display: none; }
.cat-wrap[data-view-as="grid"] .cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.cat-wrap[data-view-as="grid"] .cat-row { display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: 30px minmax(0, 1fr); grid-template-areas: 'logo pub' 'name name'; align-items: start; gap: 12px 10px; height: 118px; padding: 14px 16px; border: 1px solid #ffffffb3; border-radius: 12px; background: linear-gradient(165deg, #fbfcfd 3%, #f3f5f8 72%, #eef1f5); box-shadow: inset 0 1px 0 #fff, 0 2px 5px #26354705; }
.cat-wrap[data-view-as="grid"] .cat-row[hidden] { display: none; }
.cat-wrap[data-view-as="grid"] button.cat-row:hover { border-color: #145dfb40; }
.cat-wrap[data-view-as="grid"] .cat-logo { grid-area: logo; }
.cat-wrap[data-view-as="grid"] .cat-pub { grid-area: pub; align-self: center; justify-self: end; max-width: 100%; font-size: 10.5px; }
.cat-wrap[data-view-as="grid"] .cat-name { grid-area: name; }
.cat-wrap[data-view-as="grid"] .cat-name small { display: -webkit-box; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.45; }
.cat-wrap[data-view-as="grid"] .cat-cov { display: none; }
@media (max-width: 900px) { .cat-head, .cat-row { grid-template-columns: 30px minmax(0, 1fr) 130px; } .cat-head span:last-child, .cat-cov { display: none; } .cat-find { width: 160px; } }

/* A live chart in the chat, built like a V4 chart card */
.chartcard { display: block; padding: 18px 20px 14px; border: 1px solid #ffffffb3; border-radius: 14px; background: linear-gradient(165deg, #fbfcfd 3%, #f3f5f8 72%, #eef1f5); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; }
.cc-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cc-h h4 { margin: 0; font-size: 14px; font-weight: 450; letter-spacing: -.01em; color: #303740; }
.cc-h span { flex: none; font-size: 11px; color: #6e7885; }
.chartcard .chart { position: relative; height: 260px; }
.chartcard .chart.short { height: 230px; }
.chartcard .legend { margin: 0 0 8px; }
.chartcard .bars { margin-top: 4px; }
.chart.grouped .band { fill: #145dfb0d; }
.cc-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #dfe5ed; font-size: 10.5px; color: #6e7885; }
.cc-foot .f-srcs { display: flex; gap: 4px; margin: 0; }
.cc-foot .cc-names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-foot .cc-note { margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8a94a1; }

/* A live map in the chat */
.mapcard { display: block; padding: 18px 20px 14px; border: 1px solid #ffffffb3; border-radius: 14px; background: linear-gradient(165deg, #fbfcfd 3%, #f3f5f8 72%, #eef1f5); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; }
.lm { position: relative; height: 460px; overflow: hidden; border: 1px solid #dfe5ed; border-radius: 10px; background: #eef1f5; }
.lm-map { position: absolute; inset: 0; }
.lm-err { padding: 40px; text-align: center; }
.lm-base { position: absolute; top: 10px; left: 10px; z-index: 2; background: #ffffffe6; box-shadow: 0 2px 8px #26354714; }
.lm-base > button { font-size: 11px; padding: 6px 11px; }
.lm-legend { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: flex; flex-direction: column; gap: 6px; max-width: 260px; max-height: calc(100% - 70px); overflow: auto; padding: 11px 12px; border: 1px solid #ffffffb3; border-radius: 10px; background: #fbfcfdf0; box-shadow: 0 6px 20px #2635471a; font-size: 11px; color: #303740; }
.lm-legend label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.lm-legend input { width: 13px; height: 13px; margin: 0; accent-color: #145dfb; }
.lm-legend label i { flex: none; width: 11px; height: 11px; border-radius: 3px; opacity: .8; }
.lm-legend label span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-legend label em { font-style: normal; color: #6e7885; font-variant-numeric: tabular-nums; }
.lm-legend ol { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 0; padding: 7px 0 0; border-top: 1px solid #dfe5ed; list-style: none; }
.lm-legend li { display: flex; align-items: center; gap: 7px; }
.lm-legend li b { flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #145dfb; color: #fff; font-size: 9px; font-weight: 600; }
.lm-legend li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-pin { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #145dfb; box-shadow: 0 2px 8px #14325f40; color: #fff; font: 600 11px/1 inherit; cursor: pointer; }
.lm-pin:hover { transform: scale(1.12); }
.lm-pop { position: absolute; z-index: 3; display: flex; flex-direction: column; gap: 3px; max-width: 240px; padding: 9px 11px; transform: translate(-50%, calc(-100% - 14px)); border: 1px solid #dfe5ed; border-radius: 8px; background: #fafbfd; box-shadow: 0 8px 25px #253b5620; font-size: 11px; color: #303740; pointer-events: none; }
.lm-pop b { font-weight: 500; }
.lm-pop span { color: #6e7885; }
.mapcard .maplibregl-ctrl-group { border-radius: 8px; box-shadow: 0 2px 8px #26354714; }
.mapcard .maplibregl-ctrl-attrib { font-size: 9px; }
.lm .lm-map { position: absolute !important; top: 0; left: 0; width: 100%; height: 100%; }
.cat-logo.mono i { font-size: 9px; font-weight: 600; font-style: normal; color: #5d6b7c; }
.lm-floors { position: absolute; top: 52px; left: 10px; z-index: 2; max-width: calc(100% - 80px); overflow-x: auto; scrollbar-width: none; background: #ffffffe6; box-shadow: 0 2px 8px #26354714; }
.lm-floors > button { flex: none; font-size: 11px; padding: 6px 11px; }
.lm-base, .lm-floors { background: #fbfcfd; }

/* Live map pins, as V4 draws them */
.lm-site { display: block; padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 3px 6px rgba(37, 99, 235, .45)) drop-shadow(0 1px 3px rgba(0, 0, 0, .18)); }
.lm-site:hover { transform: scale(1.08); }
.lm-bizpin, .lm-cluster { position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer; }
.lm-biz { display: grid; place-items: center; width: 30px; height: 30px; overflow: hidden; border-radius: 9px; background: #fff; box-shadow: 0 0 0 2px #cbd5e1, 0 4px 10px -2px rgba(16, 24, 40, .32); transition: transform .14s ease, box-shadow .14s ease; }
.lm-biz img { width: 22px; height: 22px; object-fit: contain; }
.lm-bizpin:hover .lm-biz, .lm-cluster:hover .lm-biz { transform: scale(1.12); box-shadow: 0 0 0 3px #8a97a8, 0 6px 14px -3px rgba(16, 24, 40, .4); }
.lm-mono { display: grid; place-items: center; width: 100%; height: 100%; font-size: 10.5px; font-weight: 600; letter-spacing: -.01em; }
.lm-cluster .lm-biz { width: 34px; height: 34px; border-radius: 10px; }
.lm-cluster em { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); display: grid; place-items: center; min-width: 22px; height: 17px; padding: 0 5px; border-radius: 9px; background: #0f172a; box-shadow: 0 0 0 2px #fff; color: #fff; font: 600 10px/1 inherit; font-style: normal; font-variant-numeric: tabular-nums; }
.lm-cluster:hover em { background: #2563eb; }
.lm-pin { width: 22px; height: 22px; font-size: 10px; }
.lm-pop { gap: 4px; min-width: 150px; max-width: 240px; padding: 11px 12px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px #e2e8f0, 0 12px 32px -8px rgba(16, 24, 40, .4); }
.lm-pop b { font-size: 12.5px; font-weight: 600; color: #0f172a; }
.lm-pop small { font-size: 11px; color: #94a3b8; }
.lm-pop .lm-addr { display: flex; align-items: center; gap: 5px; color: #334155; }
.lm-pop .lm-addr .ic { flex: none; color: #475569; }
.lm-pop .lm-cap { margin-bottom: 2px; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: #94a3b8; }
.lm-pop .lm-row { color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-keys { display: flex; gap: 12px; padding-top: 6px; border-top: 1px solid #dfe5ed; color: #6e7885; }
.lm-legend > .lm-keys:first-child { padding-top: 0; border-top: 0; }
.lm-key { display: inline-flex; align-items: center; gap: 6px; }
.lm-keytile { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: #fff; box-shadow: 0 0 0 1.5px #cbd5e1; }

/* The live map's chrome, as V4's map: a bar of white controls at the top left, a key card at the
   bottom left, zoom at the bottom right, hover cards in white */
.lm .lm-base, .lm .lm-floors { position: static; max-width: none; box-shadow: none; }
.lm-bar { position: absolute; top: 12px; left: 12px; right: 60px; z-index: 3; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; pointer-events: none; }
.lm-bar > * { pointer-events: auto; }
.lm-dd { position: relative; }
.lm-chip, .lm-seg { height: 30px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px #0f172a0d; }
.lm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 14px; font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .025em; text-transform: uppercase; color: #475569; cursor: pointer; }
.lm-chip:hover { border-color: #cbd5e1; color: #1e293b; }
.lm-chip[aria-expanded="true"] { border-color: #94a3b8; color: #0f172a; }
.lm-caret { display: inline-grid; color: #94a3b8; transform: rotate(90deg); transition: transform .15s; }
.lm-chip[aria-expanded="true"] .lm-caret { transform: rotate(-90deg); }
.lm-seg { display: flex; align-items: stretch; overflow: hidden; padding: 0; }
.lm-seg > i { align-self: center; width: 1px; height: 18px; background: #e2e8f0; }
.lm-seg > button { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 0; border-radius: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .025em; text-transform: uppercase; color: #475569; cursor: pointer; white-space: nowrap; }
.lm-seg > button:hover { background: #f8fafc; color: #1e293b; }
.lm-seg > button[aria-pressed="true"] { background: #dbeafe; color: #1d4ed8; }
.lm-seg .ic { flex: none; }
.lm-layers { position: absolute; top: calc(100% + 5px); left: 0; width: 248px; max-height: 320px; overflow-y: auto; padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; box-shadow: 0 20px 25px -5px #0f172a1a, 0 8px 10px -6px #0f172a1a; }
.lm-h { margin: 0 0 6px; padding: 0 2px; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; }
.lm-opt { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 12px; text-align: left; color: #94a3b8; cursor: pointer; }
.lm-opt:hover { background: #f8fafc; }
.lm-opt[aria-pressed="true"] { background: #f1f5f9; color: #1e293b; }
.lm-opt i { flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--c); opacity: .35; }
.lm-opt[aria-pressed="true"] i { opacity: .9; }
.lm-opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-opt em { font-style: normal; font-size: 10.5px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.lm .lm-legend { left: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 7px; min-width: 150px; max-width: 250px; padding: 13px 16px 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #ffffffeb; box-shadow: 0 4px 14px #0f172a14; font-size: 12.5px; color: #334155; }
.lm-legend .lm-h { margin-bottom: 3px; font-size: 10px; letter-spacing: .08em; color: #64748b; }
.lm-legend > span { display: flex; align-items: center; gap: 10px; }
.lm-sq { flex: none; width: 14px; height: 14px; border: 2px solid var(--c); border-radius: 3px; background: color-mix(in srgb, var(--c) 12%, transparent); }
.lm-sq.lm-sqtile { border: 0; background: #fff; box-shadow: 0 0 0 1.5px #cbd5e1; }
.lm-legend svg { flex: none; margin: 0 1px; }
.mapcard .maplibregl-ctrl-bottom-right { margin: 0 12px 12px 0; }
.mapcard .maplibregl-ctrl-bottom-right .maplibregl-ctrl-group { margin: 0; border: 1px solid #e2e8f0; border-radius: 9px; box-shadow: 0 1px 2px #0f172a0d; }
.mapcard .maplibregl-ctrl-group button { width: 32px; height: 32px; }
.mapcard .maplibregl-ctrl-attrib { margin: 0 56px 0 0 !important; }
.lm-legend .lm-dot { flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #145dfb; color: #fff; font-size: 9px; font-weight: 600; }

/* ================= V4 Satin, from EconMatch's code (satin-design-language.md and satin/*.css) ================= */
:root {
  --canvas: linear-gradient(180deg, #e4e7eb, #e9ecf0);
  --v4-panel: linear-gradient(165deg, #fbfcfd 3%, #f3f5f8 72%, #eef1f5);
  --v4-edge: #ffffffb3; --v4-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705;
  --v4-ink: #303740; --v4-muted: #6e7885; --v4-rule: #dfe5ed; --v4-rule-2: #e1e6ed;
  --v4-control: #e9edf2; --v4-control-edge: #e4e9ef; --v4-method: #f7f9fb; --v4-method-edge: #dce3eb;
  --v4-hover: #e8eef8; --v4-head: #e9edf3; --v4-row-hover: #eaf0fa;
  --glass: linear-gradient(145deg, rgba(251, 252, 253, .84), rgba(228, 233, 240, .72));
  --glass-edge: rgba(251, 252, 253, .82);
  --glass-shadow: inset 0 1px 0 rgba(251, 252, 253, .8), 0 10px 30px -14px rgba(30, 40, 42, .24), 0 1px 3px rgba(30, 40, 42, .06);
  --glass-blur: blur(16px) saturate(.8);
}

/* Canvas and shell: the grey Satin canvas; the sidebar is a panel floating on it */
body { background: #e6e9ed; }
.main { background: var(--canvas); }
.app { grid-template-columns: 260px minmax(0, 1fr); }
.side { margin: 12px 0 12px 12px; padding: 16px 10px 10px; border: 1px solid var(--v4-edge); border-radius: 12px; background: var(--v4-panel); box-shadow: 0 1px 2px #26354709, 0 4px 14px #26354705; }
.side-new { background: #145dfb; color: #fff; font-weight: 500; border-radius: 7px; box-shadow: 0 1px 2px #145dfb14; }
.side-new .ic { color: #fff; }
.side-new:hover { background: #1d4ed8; }
.side-tab { border-radius: 7px; color: var(--v4-ink); }
.side-tab:hover { background: var(--v4-hover); }
.side-tab.is-on { background: #145dfb0d; color: #145dfb; }
.side-tab.is-on .ic { color: #145dfb; }
.side-sec { font-size: 9px; font-weight: 500; letter-spacing: .09em; color: var(--v4-muted); }
.chats button { border-radius: 7px; color: var(--v4-ink); font-size: 12.5px; }
.chats button:hover { background: var(--v4-hover); }
.chats button.is-on { background: #145dfb0d; }
.chats button em { color: #8a94a1; }

/* Page titles and the top tabs, as V4's dashboard chrome and its centred tabs */
.sd-title, .page-h h1 { font: 380 34px/1.12 var(--font); letter-spacing: -.045em; color: var(--v4-ink); }
.sd-head .sd-seg, .data-tabs { gap: 2px; padding: 1px; border-radius: 7px; background: var(--v4-panel); box-shadow: 0 1px 2px #26354709, 0 4px 14px #26354705; }
.sd-head .sd-seg > button { height: 38px; padding: 0 16px; border: 0; border-radius: 5px; font-size: 12px; font-weight: 300; color: var(--v4-muted); }
.sd-head .sd-seg > button:hover { background: var(--v4-hover); color: var(--v4-ink); }
.sd-head .sd-seg > button[aria-pressed="true"] { background: #145dfb; color: #fff; box-shadow: 0 1px 2px #12377714; }

/* Cards on the canvas: the Satin panel */
.sd-card, .chartcard, .mapcard, .filecard.scene, .filecard.pageframe, .cat-shell { border: 1px solid var(--v4-edge); border-radius: 12px; background: var(--v4-panel); box-shadow: var(--v4-shadow); }

/* Answers: V4 Figures (summary B): label above, restrained number, logos where V4 puts the icon chip */
.stats { gap: 14px; }
.stat.fig.v4 { gap: 0; min-height: 132px; padding: 18px 20px 16px; border: 1px solid #fcfcfd; border-radius: 12px; background: var(--v4-panel); box-shadow: var(--v4-shadow); }
.fig-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 26px; }
.stat.fig.v4 .fig-what { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-size: 11px; line-height: 1.45; color: var(--v4-muted); }
.stat.fig.v4 .f-srcs { flex: none; margin: 0; gap: 4px; flex-wrap: nowrap; }
.stat.fig.v4 .f-src { width: 26px; height: 26px; border: 0; border-radius: 7px; background: #e8efff; }
.stat.fig.v4 .f-logo { width: 15px; height: 15px; }
.stat.fig.v4 .fig-val { margin-top: 11px; font-size: clamp(26px, 2.4vw, 33px); font-weight: 350; line-height: 1.15; letter-spacing: -.035em; color: var(--v4-ink); }
.stat.fig.v4 .fig-val.long { font-size: 19px; font-weight: 400; letter-spacing: -.02em; }
.stat.fig.v4 .fig-how { margin-top: auto; padding-top: 10px; font-size: 10.5px; color: var(--v4-muted); }
/* The source strip under the figures, with V4's View methodology button */
.fig-strip { display: flex; align-items: center; gap: 10px; min-height: 46px; margin-top: 12px; padding: 3px 2px; color: var(--v4-muted); }
.fig-strip > .ic { flex: none; stroke-width: 1.5; }
.fig-strip > span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.fig-strip b { font-size: 11px; font-weight: 500; color: var(--v4-ink); }
.fig-strip small { font-size: 10px; line-height: 1.4; color: var(--v4-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4-method { display: inline-flex; align-items: center; gap: 8px; padding: 5px 9px; border: 1px solid var(--v4-method-edge); border-radius: 7px; background: var(--v4-method); font: inherit; font-size: 11px; color: var(--v4-ink); cursor: pointer; white-space: nowrap; }
.v4-method:hover, .v4-method[aria-expanded="true"] { background: var(--v4-hover); color: #145dfb; }
.v4-method[aria-expanded="true"] .ic { transform: rotate(90deg); }
.found-more { margin-top: 4px; padding: 12px 14px; border: 1px solid var(--v4-rule); border-radius: 12px; background: #ffffff8c; font-size: 12.5px; color: var(--v4-ink); }

/* Chart and map cards: V4 card header and footer */
.cc-h h4 { font-size: 14px; font-weight: 500; letter-spacing: -.02em; color: var(--v4-ink); }
.cc-h span { font-size: 11px; color: var(--v4-muted); }
.chartcard, .mapcard { padding: 14px 18px 0; overflow: hidden; }
.cc-foot { margin: 12px -18px 0; padding: 8px 18px; border-top: 1px solid var(--v4-rule-2); background: linear-gradient(100deg, #eef1f5, #f3f5f8); }
.chartcard > .chart, .chartcard > .bars { margin-bottom: 12px; }
.mapcard .lm { margin-bottom: 14px; border-color: var(--v4-rule); }

/* Map chrome: V4's glass controls */
.lm-chip, .lm-seg, .lm-layers, .lm .lm-legend, .mapcard .maplibregl-ctrl-bottom-right .maplibregl-ctrl-group, .lm-pop {
  border: 1px solid var(--glass-edge); background: var(--glass); box-shadow: var(--glass-shadow); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.lm-chip, .lm-seg > button { color: var(--v4-ink); }
.lm-seg > button:hover { background: #fbfcfdd9; }
.lm-seg > button[aria-pressed="true"] { background: #dbeafe; color: #1d4ed8; }
.lm-layers { width: 248px; padding: 12px; border-radius: 10px; }
.lm-opt { gap: 8px; padding: 6px 10px; margin-bottom: 2px; border-radius: 0; font-size: 11.5px; font-weight: 500; line-height: 1; color: #475569; }
.lm-opt:hover { background: #f8fafc; }
.lm-opt[aria-pressed="true"] { background: #f1f5f9; color: #0f172a; font-weight: 600; }
.lm-opt i { width: 12px; height: 12px; border-radius: 0; opacity: .85; }
.lm-opt[aria-pressed="true"] i { opacity: 1; }
.lm-opt em { font-size: 10px; color: #94a3b8; }
.lm-h { margin-bottom: 4px; font-size: 9px; font-weight: 700; letter-spacing: .1em; color: #94a3b8; }
.lm .lm-legend { left: 12px; bottom: 12px; gap: 4px; min-width: 0; padding: 10px 14px; border-radius: 12px; font-size: 11px; color: var(--v4-ink); transition: left .16s ease-out; }
@media (prefers-reduced-motion: reduce) { .lm .lm-legend { transition: none; } }
.lm-legend .lm-h { margin-bottom: 4px; font-size: 9px; letter-spacing: .08em; color: var(--v4-muted); }
.lm-legend > span { gap: 8px; }
.lm-sq { width: 12px; height: 12px; border: 2px solid var(--c); border-radius: 2px; background: #fff; }
.lm-legend svg { width: 10px; height: 12px; }
.lm-legend .lm-dot { width: 13px; height: 13px; font-size: 8px; }
.mapcard .maplibregl-ctrl-bottom-right .maplibregl-ctrl-group { border-radius: 9px; overflow: hidden; }
.mapcard .maplibregl-ctrl-group button + button { border-top-color: var(--v4-rule); }
.lm-pop { width: 234px; padding: 12px 14px 10px; border-radius: 12px; gap: 3px; }
.lm-pop b { font-size: 13px; font-weight: 700; color: var(--v4-ink); }
.lm-pop small { font-size: 11px; color: var(--v4-muted); }
/* Pins and clusters: V4's tiles, monograms and badges */
.lm-biz { width: 30px; height: 30px; border-radius: 11px; box-shadow: 0 0 0 2px #cbd5e1, 0 4px 10px -2px rgba(16, 24, 40, .32); }
.lm-bizpin:hover .lm-biz { transform: scale(1.12); box-shadow: 0 0 0 3px #848a91, 0 4px 10px -2px rgba(16, 24, 40, .32); }
.lm-mono { color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .01em; }
.lm-cluster { filter: drop-shadow(0 5px 14px rgba(16, 24, 40, .3)); }
.lm-cluster .lm-biz { width: 34px; height: 34px; border-radius: 12px; box-shadow: 0 0 0 2px #cbd5e1; }
.lm-cluster:hover .lm-biz { transform: scale(1.07); box-shadow: 0 0 0 3px #2563eb; }
.lm-cluster em { bottom: -8px; height: 18px; min-width: 0; padding: 0 6px; border-radius: 9px; font-size: 10.5px; font-weight: 700; }

/* Data page: Quiet rules tables, V4 pagination and buttons */
.cat-head { background: var(--v4-head); color: var(--v4-muted); font-size: 11px; font-weight: 400; border-bottom-color: var(--v4-rule); }
.cat-row { border-bottom-color: var(--v4-rule-2); }
button.cat-row:hover, .cat-row:hover { background: var(--v4-row-hover); }
.cat-name b { font-weight: 450; font-size: 12.5px; color: var(--v4-ink); }
.cat-foot { color: var(--v4-muted); }
.cat-nav button { width: 27px; height: 27px; border: 1px solid var(--v4-method-edge); background: var(--v4-method); border-radius: 7px; color: var(--v4-ink); }
.cat-nav button:hover:not(:disabled) { background: var(--v4-hover); color: #145dfb; }
.cat-nav button:disabled { opacity: .35; }
.cat-filter, .cat-switch { background: var(--v4-panel); box-shadow: 0 1px 2px #26354709, 0 4px 14px #26354705; }
.cat-filter > button[aria-pressed="true"], .cat-switch > button[aria-pressed="true"] { background: #145dfb; color: #fff; border-color: transparent; }
.cat-find, .sd-find { border: 1px solid var(--v4-method-edge); border-radius: 7px; background: var(--v4-method); }
.btn, .ds-upd { border: 1px solid var(--v4-method-edge) !important; border-radius: 7px !important; background: var(--v4-method) !important; color: var(--v4-ink) !important; font-size: 12px; font-weight: 500; }
.btn:hover, .ds-upd:hover { background: var(--v4-hover) !important; color: #145dfb !important; }
.sd-table thead th { height: 34px; background: var(--v4-head); color: var(--v4-muted); font-size: 11px; font-weight: 400; border-bottom: 1px solid var(--v4-rule); }
.sd-table tbody td, .sd-table tbody th { border-bottom: 1px solid var(--v4-rule-2); font-size: 12px; }
.sd-table tbody tr:hover { background: var(--v4-row-hover); }

/* Sources under a chart or a map: one quiet line, small logos then names, no box */
.cc-foot { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; padding: 0; border: 0; background: none; font-size: 10.5px; color: var(--v4-muted); }
.cc-foot .f-srcs { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 3px; margin: 0; }
.cc-foot .f-src { width: 18px; height: 18px; border: 1px solid #e4e9ef; border-radius: 5px; background: #fff; }
.cc-foot .f-logo { width: 12px; height: 12px; }
.cc-foot .f-mono, .cc-foot .f-merra { width: 12px; height: 12px; font-size: 6.5px; }
.cc-foot .cc-names { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-foot .cc-note { flex: 1 1 0; min-width: 0; margin-left: 10px; text-align: right; color: #8a94a1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mapcard .lm { margin-bottom: 0; }
.stat.fig.v4 .f-srcs { flex-direction: row; align-items: center; }

/* V4's source footer (SatinSourceFooter) and Sources & methodology window (dashboard-methodology-window.css) */
.v4-foot { display: flex; align-items: center; gap: 12px; min-height: 46px; margin-top: 12px; padding: 3px 2px; color: var(--v4-muted); }
.v4-foot.band { margin: 14px -18px 0; padding: 12px 18px; border-top: 1px solid var(--v4-rule-2); background: linear-gradient(100deg, #eef1f5, #f3f5f8); border-radius: 0 0 11px 11px; }
.v4-foot > .ic { flex: none; stroke-width: 1.5; color: var(--v4-muted); }
.v4-foot > span { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.v4-foot b { font-size: 12px; font-weight: 500; color: var(--v4-ink); }
.v4-foot small { font-size: 11px; line-height: 1.4; color: var(--v4-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4-foot .v4-method { flex: none; padding: 7px 10px 7px 12px; font-size: 11.5px; background: #fbfcfd; }
.chartcard, .mapcard { padding-bottom: 0; }
.mapcard .lm, .chartcard > .chart, .chartcard > .bars { margin-bottom: 0; }
.v4-more { margin-top: 10px; padding: 0; border: 0; background: none; font: inherit; font-size: 11.5px; color: #145dfb; cursor: pointer; }
.found-extra { margin-top: 14px; }
.v4-dialog { width: min(680px, calc(100vw - 32px)); max-height: min(820px, calc(100dvh - 48px)); padding: 0; overflow: hidden; border: 1px solid #fff; border-radius: 12px; background: var(--v4-panel); color: var(--v4-ink); box-shadow: 0 24px 80px #17253630, 0 4px 16px #17253612; font-family: var(--font); }
.v4-dialog[open] { display: flex; flex-direction: column; animation: v4-in .18s ease-out; }
.v4-dialog::backdrop { background: #202d3e47; backdrop-filter: blur(5px); }
@keyframes v4-in { from { opacity: 0; transform: translateY(7px) scale(.992); } to { opacity: 1; transform: none; } }
.v4-dlg-h { display: flex; align-items: flex-start; gap: 14px; padding: 26px 26px 22px; }
.v4-dlg-h > div { flex: 1; min-width: 0; }
.v4-dlg-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--v4-edge); border-radius: 7px; background: #ffffff9c; color: #145dfb; }
.v4-dlg-icon .ic { stroke-width: 1.5; }
.v4-dlg-eyebrow { margin: 0 0 5px; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--v4-muted); }
.v4-dlg-h h2 { margin: 0; font-size: 22px; font-weight: 400; line-height: 1.25; letter-spacing: -.035em; }
.v4-dlg-desc { margin: 7px 0 0; font-size: 12px; line-height: 1.6; color: var(--v4-muted); }
.v4-dlg-close { display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 1px solid var(--v4-control-edge); border-radius: 7px; background: #fbfcfd; color: var(--v4-muted); cursor: pointer; }
.v4-dlg-close:hover { background: var(--v4-hover); color: var(--v4-ink); }
.v4-dlg-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 26px 26px; }
.v4-m-sources { margin-bottom: 8px; padding: 16px 18px; border: 1px solid var(--v4-rule); border-radius: 7px; background: linear-gradient(100deg, #eef1f5, #f3f5f8); }
.v4-m-sources > p:first-child { margin: 0 0 7px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--v4-muted); }
.v4-m-sources > p:last-child, .v4-m-item > p { margin: 0; font-size: 13px; line-height: 1.75; font-weight: 350; color: var(--v4-ink); }
.v4-m-item { padding: 19px 0; border-bottom: 1px solid var(--v4-rule); }
.v4-m-item:last-child { border-bottom: 0; }
.v4-m-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.v4-m-head > p { margin: 0; font-size: 14px; font-weight: 450; color: var(--v4-ink); }
.v4-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 4px; background: var(--v4-control); font-size: 9px; font-weight: 400; letter-spacing: .025em; text-transform: uppercase; color: var(--v4-muted); text-decoration: none; }
.v4-chip.link { background: #145dfb08; color: #145dfb; }
.v4-chip.link:hover { background: #145dfb13; text-decoration: none; }
.v4-chip .f-logo, .v4-chip .f-mono, .v4-chip .f-merra { width: 12px; height: 12px; font-size: 6px; }

/* The V4 reference cards in the chat: no second frame around them, and our drawings inside their body */
.v4-hf.filecard { display: block; padding: 0; border: 0; background: none; box-shadow: none; overflow: visible; }
.v4-hf .hf-body .chart { position: relative; height: 260px; }
.v4-hf .hf-body .chart.short { height: 230px; }
.v4-hf .hf-body .legend { margin: 0 0 10px; }
.v4-hf.mapcard .hf-body { padding: 18px 26px 22px; }
.v4-hf.mapcard .lm { margin: 0; border: 1px solid #e1e6ed; border-radius: 10px; }
.v4-hf .hf-source > .ic { width: 17px; height: 17px; stroke-width: 1.5; color: var(--hf-muted); }
.v4-hf .hf-method-button .ic { width: 13px; height: 13px; color: var(--hf-muted); }
.v4-hf .hf-method-button:hover .ic { color: #145dfb; }
/* The answer's figures panel (V4 sc-shell): our figure labels can be longer, the logos take the icon's place */
.found.v4-sc { margin: 0; }
/* On a narrow window the figures go two to a row and a value may wrap, so none runs into the next (V4 keeps 3 or 4 a row on desktop) */
@media (max-width: 640px) {
  .v4-sc .sc-figures, .v4-sc .sc-figures.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4-sc .sc-figure-value { white-space: normal; overflow-wrap: break-word; }
}
.v4-sc .sc-header h2 { font-size: 19px; line-height: 1.35; letter-spacing: -.02em; }
.v4-sc .sc-figures { margin-top: 18px; }
.v4-sc .sc-figure-top > span:first-child { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.v4-sc .sc-figure .f-srcs { align-self: flex-end; display: flex; flex-direction: row; gap: 3px; margin: 0; }
.v4-sc .sc-figure .f-src { display: grid; place-items: center; width: 22px; height: 22px; padding: 3px; border: 0; border-radius: 4px; background: #e9efff; }
.v4-sc .sc-figure .f-logo { width: 15px; height: 15px; }
.v4-sc .sc-figure-value.long { font-size: 17px; white-space: normal; letter-spacing: -.015em; }
.v4-sc .v4-embedded .hf-stage { padding: 0; background: transparent; min-height: 0; display: block; }
.v4-sc .v4-embedded .hf-footer { border-radius: 0 0 11px 11px; }
.v4-sc .v4-embedded .hf-source-row { padding: 15px 22px; min-height: 68px; }
.v4-sc .v4-more { margin: 10px 0 0; }

/* A chart or map thumbnail on a step line is a small square like the others, never a chart's own size */
.thumb-s.k-chart, .thumb-s.k-livemap { position: static; display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; padding: 0; color: #145dfb; }
.thumb-s.k-chart .ic, .thumb-s.k-livemap .ic { width: 16px; height: 16px; }
.found.v4-sc { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }

/* ===== V4 data workspace (EconMatch community/data/data-workspace.css, satin-dashboard-chrome.css, satin-breadcrumbs.css) ===== */
.sd-workspace-header { display: flex; align-items: center; gap: 24px; min-height: 103px; margin: 0 0 6px; padding: 20px 0 23px; }
.sd-header-identity { flex: 1; min-width: 0; }
.sd-header-heading { position: relative; }
.sd-breadcrumbs { position: absolute; left: 0; bottom: calc(100% + 5px); font: 400 11px/1.4 var(--font); color: var(--v4-muted); }
.sd-breadcrumbs ol { display: flex; align-items: center; gap: 9px; margin: 0; padding: 0; list-style: none; }
.sd-breadcrumbs li { display: flex; align-items: center; gap: 9px; }
.sd-breadcrumbs a { color: var(--v4-muted); text-decoration: none; }
.sd-breadcrumbs a:hover { color: #145dfb; text-decoration: none; }
.sd-breadcrumb-divider { opacity: .42; font-weight: 300; }
.sd-breadcrumb-current { color: var(--v4-ink); }
.sd-page-title { margin: 0; font: 380 34px/1.12 var(--font); letter-spacing: -.045em; color: var(--v4-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-page-context { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 11px; color: var(--v4-muted); }
.sd-page-verified { display: inline-flex; color: #527b67; }
.sd-page-verified .ic { stroke-width: 1.5; }
.sd-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sd-button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 8px 13px; border: 1px solid #e4e9ef; border-radius: 7px; background: #fff; font: 400 12px/1.3 var(--font); color: var(--v4-ink); cursor: pointer; text-decoration: none; }
.sd-button:hover { background: #e8eef8; color: #145dfb; text-decoration: none; }
.sd-button.icon { padding: 8px 10px; }
.sd-button-primary { border-color: #145dfb; background: #145dfb; color: #fff; box-shadow: 0 1px 2px #145dfb1a; }
.sd-button-primary:hover { background: #0e50e0; border-color: #0e50e0; color: #fff; }
.data-dataset-subnav { display: flex; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.data-workspace-tabs { flex: 1; display: flex; gap: 5px; margin: 0; border-bottom: 1px solid #dfe5ed; }
.data-workspace-tabs button { min-height: 42px; padding: 10px 18px; border: 0; border-bottom: 2px solid transparent; background: transparent; font: inherit; font-size: 12px; color: var(--v4-muted); cursor: pointer; }
.data-workspace-tabs button:hover { background: #fbfbfd; }
.data-workspace-tabs button[aria-current="page"] { border-bottom-color: #145dfb; color: #145dfb; }
.data-workspace-tabs button:focus-visible { outline: 2px solid #145dfb; outline-offset: 2px; }
.data-sheet { position: relative; border: 1px solid #fcfcfd; border-radius: 12px; background: linear-gradient(165deg, #fbfcfd 3%, #f3f5f8 72%, #eef1f5); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; overflow: hidden; }
.data-sheet-toolbar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #dfe5ed; }
.data-search { display: flex; align-items: center; gap: 9px; flex: 1 1 210px; max-width: 350px; min-height: 36px; padding: 7px 10px; border: 1px solid transparent; border-radius: 7px; color: var(--v4-muted); }
.data-search:focus-within { border-color: #93b4f5; background: #fff; box-shadow: 0 0 0 3px #145dfb0a; }
.data-search input { flex: 1; min-width: 0; padding: 4px 0; border: 0; background: transparent; font: 400 12px var(--font); color: var(--v4-ink); outline: none; }
.data-search input::-webkit-search-cancel-button { display: none; }
.data-sheet-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 11px; color: var(--v4-muted); }
.data-highlight-control { display: flex; align-items: center; gap: 7px; min-height: 36px; white-space: nowrap; }
.data-highlight-control input { width: 13px; height: 13px; margin: 0; accent-color: #145dfb; }
.data-columns { display: flex; align-items: center; gap: 7px; padding: 5px 0; }
.data-columns > span { font-size: 10px; opacity: .8; }
.data-icon-button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid #e4e9ef; border-radius: 6px; background: #e9edf2; color: var(--v4-muted); cursor: pointer; }
.data-icon-button:hover { background: #e8eef8; color: #145dfb; }
.data-sheet-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 10px 18px; font-size: 10px; color: var(--v4-muted); }
.data-sheet-context { display: flex; align-items: center; gap: 18px; }
.data-legend { display: flex; align-items: center; gap: 13px; }
.data-legend > span { display: flex; align-items: center; gap: 5px; }
.data-legend i { width: 8px; height: 8px; border: 1px solid #00000012; border-radius: 2px; background: #b5c1d0; }
.data-about-button { display: flex; align-items: center; gap: 5px; padding: 4px 0; border: 0; background: none; font: inherit; color: var(--v4-muted); cursor: pointer; }
.data-about-button:hover { color: #145dfb; }
.data-cell-bar { display: flex; min-height: 33px; border-top: 1px solid #dfe5ed; border-bottom: 1px solid #dfe5ed; background: #fbfbfd; font-size: 10.5px; color: var(--v4-muted); }
.data-cell-coordinate { display: grid; place-items: center; flex: none; width: 55px; border-right: 1px solid #dfe5ed; color: var(--v4-ink); font-variant-numeric: tabular-nums; }
.data-cell-value { flex: 1; min-width: 0; padding: 7px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table-scroll { height: clamp(340px, calc(100dvh - 370px), 760px); min-height: 300px; overflow: auto; overscroll-behavior: contain; border-bottom: 1px solid #dfe5ed; scrollbar-width: thin; scrollbar-color: #b9c6d8 transparent; }
.data-grid { table-layout: fixed; border-collapse: separate; border-spacing: 0; min-width: 100%; font: 400 11px/1.4 var(--font); color: var(--v4-ink); }
.data-grid th, .data-grid td { height: 40px; padding: 0; border-right: 1px solid #dce4ee; border-bottom: 1px solid #dce4ee; font-weight: 400; overflow: hidden; text-align: left; }
.data-grid thead th { position: sticky; top: 0; z-index: 3; height: 46px; background: #e9eef5; }
.data-grid thead th button { display: flex; align-items: center; gap: 8px; width: 100%; height: 100%; padding: 7px 12px; border: 0; background: none; font: 400 11px var(--font); color: #4b5f78; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; }
.data-grid thead th button:hover { background: #e1e9f4; }
.data-grid thead th[aria-sort="ascending"] button, .data-grid thead th[aria-sort="descending"] button { color: #145dfb; }
.data-grid thead th[aria-sort="ascending"] .ic { transform: rotate(-90deg); }
.data-grid thead th[aria-sort="descending"] .ic { transform: rotate(90deg); }
.data-column-letter { font-size: 9px; color: #91a0b4; }
.data-grid .data-row-number { position: sticky; left: 0; z-index: 2; width: 78px; background: #edf1f7; border-right-color: #cbd6e5; color: #8a98ac; font-size: 9px; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-grid thead .data-row-number { z-index: 5; background: #e6ecf4; }
.data-grid .data-row-number input { width: 14px; height: 14px; margin: 0 8px 0 10px; vertical-align: middle; accent-color: #145dfb; }
.data-grid .data-row-number button { min-width: 30px; height: 38px; padding: 0; border: 0; background: none; font: inherit; color: inherit; vertical-align: middle; }
.data-grid td { background: #f7f9fc; cursor: cell; }
.data-grid tbody tr:nth-child(even) td { background: #f0f4f9; }
.data-grid td > span { display: block; padding: 9px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-grid td:hover { box-shadow: inset 0 0 0 1px #8bb1fb; }
.data-grid td[data-selected] { box-shadow: inset 0 0 0 2px #145dfb !important; }
.data-grid .data-null { color: #b5c1d0; }
.data-grid tr[data-row-selected] td { box-shadow: inset 0 0 0 999px #145dfb0a; }
.data-grid tr[data-row-selected] .data-row-number { background: #dce9ff; color: #145dfb; }
.data-sheet-footer { display: flex; align-items: center; gap: 22px; min-height: 48px; padding: 11px 17px; font-size: 10.5px; color: var(--v4-muted); }
.data-sheet-footer > span { margin-right: auto; }
.data-sheet-footer label { display: flex; align-items: center; gap: 7px; }
.data-sheet-footer select { padding: 3px 5px; border: 1px solid #e4e9ef; border-radius: 5px; background: #e9edf2; font: inherit; color: var(--v4-ink); }
.data-sheet-footer nav { display: flex; align-items: center; gap: 12px; }
.data-sheet-footer nav button { display: grid; place-items: center; width: 25px; height: 25px; padding: 0; border: 1px solid #e4e9ef; border-radius: 5px; background: #e9edf2; color: var(--v4-muted); cursor: pointer; }
.data-sheet-footer nav button:first-child .ic { transform: rotate(180deg); }
.data-sheet-footer nav button:disabled { opacity: .35; cursor: default; }

/* Chat rows, as V4's Merra assistant sidebar: a menu (Rename, Delete) on hover, rename in place */
.chats li.chat-row { position: relative; display: flex; align-items: center; border-radius: 8px; }
.chats li.chat-row > button[data-chat] { flex: 1; min-width: 0; }
.chats li.chat-row:hover, .chats li.chat-row.is-on { background: #eff6ff; }
.chats li.chat-row:hover > button[data-chat], .chats li.chat-row.is-on > button[data-chat] { background: transparent; }
.chat-more { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; margin-right: 2px; padding: 0; border: 0; border-radius: 6px; background: none; color: #94a3b8; cursor: pointer; opacity: 0; }
.chats li.chat-row:hover .chat-more, .chats li.chat-row.menu-open .chat-more, .chat-more:focus-visible { opacity: 1; }
.chats li.chat-row:hover > button[data-chat] em, .chats li.chat-row.menu-open > button[data-chat] em { display: none; }
.chat-more:hover, .chat-more[aria-expanded="true"] { background: #dbeafe; color: #334155; }
.chat-rename { flex: 1; min-width: 0; display: flex; align-items: center; height: 36px; padding: 0 10px; }
.chat-rename input { flex: 1; min-width: 0; height: 28px; margin-left: -4px; padding: 0 4px; border: 1px solid #2563eb; border-radius: 4px; background: #fff; font: inherit; font-size: 13px; color: #1e293b; outline: none; }

/* Heatmap, in V4's blues */
.heat { position: relative; }
.heat-scroll { overflow-x: auto; scrollbar-width: thin; }
.heat table { border-collapse: separate; border-spacing: 2px; min-width: 100%; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.heat thead th { padding: 0 4px 6px; font-weight: 400; font-size: 11px; color: #69727c; text-align: center; white-space: nowrap; }
.heat tbody th { max-width: 220px; padding: 0 14px 0 0; font-weight: 400; font-size: 12px; color: #2d3339; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat td { min-width: 44px; height: 30px; padding: 0 8px; border-radius: 3px; text-align: right; cursor: default; }
.heat td.none { background: #eceff4; }
.heat td:hover { box-shadow: inset 0 0 0 1.5px #145dfb; }
.heat .map-legend { margin-top: 12px; }
.chats li.chat-row > .chat-more { flex: none; width: 32px; height: 32px; padding: 0; gap: 0; justify-content: center; }
.chats li.chat-row > .chat-menu button::before { display: none; }

/* The source line under a card is one line at most, cut with an ellipsis; the full text is in the methodology window */
.v4-hf .hf-source { flex: 1 1 auto; min-width: 0; }
.v4-hf .hf-source-copy { min-width: 0; }
.v4-hf .hf-source-copy strong, .v4-hf .hf-source-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The chart library page */
.gallery { display: flex; flex-direction: column; gap: 28px; max-width: 960px; padding-bottom: 40px; }
.gallery-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 10px; }
.gallery-h h2 { margin: 0; font-size: 13px; font-weight: 500; color: var(--v4-ink); }
.gallery-h p { margin: 0; font-size: 11px; color: var(--v4-muted); }
/* Under the welcome title: one quiet line */
.w-sub { margin: 14px 0 0; font-size: 15px; color: var(--v4-muted); }
.w-sub { margin: 14px 0 22px; }

/* ===== Claude's structure, our look ===== */
/* Outputs: what was drawn comes first (charts, maps, 3D, pictures), each full width; then the files, datasets and
   updates, one equal row each, stacked, as Claude lists the files it made */
.outs { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.outs > * { order: 1; }
.outs > .row-out { order: 2; }
.out.row-out { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-width: 0; max-width: none; min-height: 64px; margin: 0; padding: 11px 12px 11px 12px; border: 1px solid #ffffffb3; border-radius: 12px; background: linear-gradient(165deg, #fbfcfd 3%, #f3f5f8 72%, #eef1f5); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; font: inherit; text-align: left; color: var(--v4-ink); cursor: pointer; text-decoration: none; }
.out.row-out:hover { border-color: #145dfb40; text-decoration: none; }
.ro-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: #e8efff; color: #145dfb; }
.ro-icon.fmt { font-size: 10px; font-weight: 700; letter-spacing: .02em; color: #fff; background: #145dfb; }
.ro-icon.fmt.csv, .ro-icon.fmt.xlsx { background: #0f9f6e; }
.ro-icon.fmt.pdf { background: #d6455d; }
.ro-icon.fmt.docx { background: #2a62e8; }
.ro-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ro-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: none; font-size: 13.5px; font-weight: 500; line-height: 1.35; color: var(--v4-ink); }
.ro-text small { font-size: 11.5px; color: var(--v4-muted); }
.ro-act { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid #dce3eb; border-radius: 7px; background: #f7f9fb; font-size: 12px; color: var(--v4-ink); white-space: nowrap; }
.out.row-out:hover .ro-act { background: #e8eef8; color: #145dfb; }

/* Home: V4 Merra's suggestion rows */
.w-sugs { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.w-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; padding: 0 22px 0 24px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; font: inherit; font-size: 14px; text-align: left; color: #475569; cursor: pointer; transition: border-color .14s, color .14s; }
.w-row .ic { flex: none; color: #94a3b8; }
.w-row:hover { border-color: #bfdbfe; color: #1d4ed8; }
.w-row:hover .ic { color: #2563eb; }

/* Effort: a picker at the right of the box, opening upward, as Claude's model picker */
.composer-foot { display: flex; align-items: center; justify-content: space-between; }
.comp-right { display: inline-flex; align-items: center; gap: 8px; }
.effort-pick { position: relative; }

/* Usage: a small pop-up over the sidebar's last line, as Claude's usage limits */

/* The account, at the foot of the sidebar under the usage line, as in Claude and V4 (not clickable yet) */
.side-account { display: flex; align-items: center; gap: 10px; margin: auto 0 0; padding: 9px 10px; border-top: 1px solid var(--v4-rule); color: var(--v4-ink); cursor: default; }
.acct-av { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: #e8efff; color: #145dfb; font-size: 12.5px; font-weight: 500; }
.acct-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.acct-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 500; }
.acct-t small { font-size: 11px; color: var(--v4-muted); }
.side-account .ic { flex: none; transform: rotate(90deg); color: #a7b0bc; }

/* A list in a reply: V4's quiet-rules table, full width like the other cards */
.v4-st.filecard { display: block; padding: 0; border: 0; background: none; box-shadow: none; overflow: visible; }
.v4-st .st-table-wrap { overflow-x: auto; }
.v4-st .st-table th, .v4-st .st-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.v4-st .st-loading { margin: 0; padding: 18px 2px; font-size: 12px; color: #69727c; }
.v4-st .st-missing { color: #b5c1d0; }
.v4-st .hf-footer { border-top: 1px solid #e1e6ed; border-radius: 0 0 12px 12px; background: linear-gradient(100deg, #eef1f5, #f3f5f8); }
.v4-st .hf-source-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 24px; min-height: 68px; }
.v4-st .hf-source { display: flex; align-items: center; gap: 11px; min-width: 0; color: #69727c; }
.v4-st .hf-source > .ic { width: 17px; height: 17px; stroke-width: 1.5; }
.v4-st .hf-source-copy { display: flex; flex-direction: column; gap: 3px; }
.v4-st .hf-source-copy strong { font-size: 12px; font-weight: 500; color: #303740; }
.v4-st .hf-source-copy small { font-size: 11px; color: #69727c; }
.v4-st .hf-method-button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #dce3eb; border-radius: 6px; background: #f7f9fb; font: inherit; font-size: 12px; color: #303740; cursor: pointer; white-space: nowrap; }
.v4-st .hf-method-button:hover { background: #f1f5ff; border-color: #ccdafa; }
.v4-st .hf-method-button .ic { width: 13px; height: 13px; color: #69727c; }
.v4-st.dslist .st-table td, .v4-st.dslist .st-table th { text-align: left; }

/* ===== V4 audit, first fixes ===== */
/* Primary buttons stay blue everywhere (satin-interface.css:49-50) */
.btn.primary { background: #145dfb !important; border-color: #145dfb !important; color: #fff !important; }
.btn.primary:hover { background: #0e50e0 !important; border-color: #0e50e0 !important; color: #fff !important; }
/* Home, as V4's Merra assistant: a centred 460px column, 40px down; a 13px subline; quiet starter rows */
.welcome-in { width: min(460px, calc(100% - 48px)); padding: 40px 0 24px; gap: 0; }
.w-mark { margin-bottom: 24px; }
.w-sub { margin: 12px 0 24px; font-size: 13px; line-height: 1.6; color: #62748e; }
.w-sugs { max-width: none; gap: 8px; }
.w-row { min-height: 46px; padding: 0 16px 0 18px; border-radius: 8px; font-size: 12.5px; }
/* Sidebar, as V4's: New chat is pale blue with blue text; one selected look; the section heading at 11px */
.side-new { background: #eff6ff; color: #1447e6; font-weight: 600; box-shadow: none; }
.side-new .ic { color: #1447e6; }
.side-new:hover { background: #dbeafe; }
.side-tab.is-on, .chats li.chat-row.is-on { background: #eff6ff; color: #1447e6; }
.side-sec { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: #62748e; }
/* Every screen, the chat included, sits on the same grey Satin canvas */
/* Send is grey and off on an empty box (MerraAssistant.tsx:512-515) */
.send:disabled { background: #e2e8f0; color: #90a1b9; cursor: default; box-shadow: none; }
/* Catalog topics: one quiet row beside the search box; it scrolls sideways, with a soft fade on the right */
.cat-tools { align-items: center; }
.cat-filter { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 2px; padding: 3px; border-radius: 9px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.cat-filter > button { flex: none; height: 30px; padding: 0 12px; font-size: 12px; font-weight: 500; border-radius: 7px; white-space: nowrap; }
.cat-find { flex: none; width: 220px; }
/* Map key, as V4's legend (satin-map-controls.css:56-65): sentence-case 12px/500 title, roomier panel */
.lm .lm-legend { padding: 14px 15px; border-radius: 13px; }
.lm-legend .lm-h { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #303740; margin-bottom: 6px; }
.lm-sq { border-radius: 4px; }

/* A business's card on the map: its contacts as links, and the way to its record (held open by a click) */
.lm-pop.is-held { pointer-events: auto; max-width: 300px; }
.lm-pop .lm-kvs { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; padding-top: 7px; border-top: 1px solid #eef2f6; }
.lm-pop .lm-kv { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px; font-size: 11.5px; color: #334155; }
.lm-pop .lm-kv em { font-style: normal; color: #94a3b8; }
.lm-pop .lm-kv a { color: #145dfb; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-pop .lm-kv a:hover { text-decoration: underline; }
.lm-pop .lm-acts { display: flex; gap: 6px; margin-top: 8px; }
.lm-pop .lm-act { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 1px solid #dce3eb; border-radius: 6px; background: #f7f9fb; font: inherit; font-size: 11.5px; color: #303740; text-decoration: none; cursor: pointer; }
.lm-pop .lm-act.is-primary { background: #145dfb; border-color: #145dfb; color: #fff; }
.lm-pop .lm-act:hover { filter: brightness(.97); }
.lm-pop .lm-hint { margin-top: 3px; font-size: 10.5px; color: #94a3b8; }

/* Sources & methodology: each source leads with its publisher's logo tile (as on the Data library cards),
   then its title, then its links, then what was taken from it */
.v4-m-item.has-logo { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; }
.v4-m-logo { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px #e2e8f0, 0 2px 6px -2px rgba(16, 24, 40, .12); overflow: hidden; }
.v4-m-logo .f-logo { width: 26px; height: 26px; object-fit: contain; border-radius: 4px; }
.v4-m-logo .f-mono { width: 44px; height: 44px; border-radius: 10px; font-size: 14px; letter-spacing: .02em; background: #1e3a8a; color: #fff; }
.v4-m-logo .f-merra { width: 44px; height: 44px; border-radius: 10px; }
.v4-m-main { min-width: 0; }
.v4-m-title { margin: 2px 0 8px; font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--v4-ink); }
.v4-m-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.v4-m-body { margin: 0; font-size: 13px; line-height: 1.65; font-weight: 350; color: #475569; }

/* ===== Sidebar, as in Claude's app: resizable, closable, chats in folders ===== */
.app { grid-template-columns: var(--side-w, 260px) minmax(0, 1fr); }
.side { position: relative; }
.side-grip { position: fixed; top: 12px; bottom: 12px; left: calc(var(--side-w, 260px) - 5px); width: 10px; cursor: col-resize; z-index: 30; }
.side-grip::after { content: ''; position: absolute; top: 14px; bottom: 14px; left: 4px; width: 2px; border-radius: 2px; background: transparent; transition: background .15s; }
@media (max-width: 900px) { .side-grip { display: none; } }
.side-grip:hover::after, body.resizing .side-grip::after { background: #145dfb55; }
body.resizing { cursor: col-resize; user-select: none; }
.brand { position: relative; }
.side-collapse { margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: #64748b; cursor: pointer; }
.side-collapse:hover { background: #eef2f7; color: #0f172a; }
.side-sec-f { display: flex; align-items: center; justify-content: space-between; }
.sec-add { display: grid; place-items: center; width: 22px; height: 22px; margin-right: 2px; border: 0; border-radius: 6px; background: transparent; color: #64748b; cursor: pointer; }
.sec-add:hover { background: #eef2f7; color: #0f172a; }
.folders { display: flex; flex-direction: column; gap: 1px; }
.folders:empty { display: none; }
.cf-h { position: relative; display: flex; align-items: center; border-radius: 8px; }
.cf-h:hover { background: #f1f5f9; }
.cf-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 6px 0 8px; border: 0; background: transparent; font: inherit; font-size: 13px; color: #1e293b; text-align: left; cursor: pointer; }
.cf-toggle .cf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-toggle em { font-style: normal; font-size: 11px; color: #94a3b8; }
.cf-toggle .ic { color: #64748b; flex: none; }
.cf-chev { display: grid; place-items: center; width: 12px; transition: transform .15s; transform: rotate(90deg); color: #94a3b8; }
.cf.is-shut .cf-chev { transform: rotate(0deg); }
.cf.is-shut .cf-list { display: none; }
.cf-list { margin: 0 0 4px 14px; padding-left: 8px; border-left: 1px solid #e8edf3; }
.cf-list .empty { padding: 6px 8px; font-size: 12px; color: #94a3b8; }
.cf-h .chat-more { opacity: 0; }
.cf-h:hover .chat-more, .cf.menu-open .chat-more { opacity: 1; }
.cf-new { margin: 2px 0 4px; }

/* The sidebar fits the window: its top and the account row stay put, and only the folders and chats scroll */
.side { overflow: hidden; }
.side > .folders, .side > .chats { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
.side > .chats { flex: 1 1 auto; }
.side > .side-account { flex: none; }
/* Nothing but the two lists gives up height: a long list of chats used to squeeze the New chat button itself */
.side > :not(.folders):not(.chats) { flex-shrink: 0; }

/* What a schedule Merra set up will run, under its card until the user turns it on */
.upd-steps { margin-top: 10px; font-size: 13px; color: var(--muted, #5b6472); }
.upd-steps summary { cursor: pointer; }
.upd-steps ol { margin: 8px 0 0 18px; padding: 0; }
.upd-steps pre { white-space: pre-wrap; word-break: break-word; margin: 4px 0; font-size: 12px; max-height: 220px; overflow: auto; }

/* Map options: a radio heading per option over its indented parts; parts of an option not shown are faded */
.lm-layers .lm-h-opt { margin-top: 10px; }
.lm-opt-h { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 2px; padding: 6px 10px; border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 600; line-height: 1; text-align: left; color: #475569; cursor: pointer; }
.lm-opt-h:hover { background: #f8fafc; }
.lm-opt-h i { flex: none; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #94a3b8; }
.lm-opt-h[aria-pressed="true"] { color: #0f172a; }
.lm-opt-h[aria-pressed="true"] i { background: #145dfb; box-shadow: inset 0 0 0 1.5px #145dfb, inset 0 0 0 3.5px #fff; }
.lm-opt.lm-sub { padding-left: 30px; }
.lm-opt[data-idle] { opacity: .45; }
/* The key: the option shown as a small heading, and an × on each layer that turns it off */
.lm-legend .lm-h.lm-h-opt { margin: 6px 0 1px; font-size: 10.5px; font-weight: 600; color: #64748b; }
.lm-legend .lm-k { flex: 1; min-width: 0; }
.lm-x { flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin: -3px -6px -3px 2px; padding: 0; border: 0; border-radius: 4px; background: none; color: #b6c0cc; cursor: pointer; }
.lm-x:hover { background: #f1f5f9; color: #334155; }
.lm-x:focus-visible { outline: 2px solid #145dfb; outline-offset: 0; }
/* Layers by what they are: a heading per group, a mark drawn as the layer is on the map, and a tick in the
   menu for a layer that is on. The menu is for turning layers on and off; the key says what is showing. */
.lm-g { margin: 10px 0 3px; padding: 0 2px; font-size: 10.5px; font-weight: 600; color: #64748b; }
.lm-h + .lm-g { margin-top: 2px; }
.lm-legend .lm-g { margin: 5px 0 -1px; padding: 0; }
.lm-legend .lm-h + .lm-g { margin-top: 0; }
.lm-sw { flex: none; }
.lm-legend .lm-sw { width: 18px; height: 12px; margin: 0; }
.lm-layers { width: 276px; }
.lm-opt { align-items: center; line-height: 1.3; }
.lm-opt span { white-space: normal; overflow: visible; }
.lm-opt .lm-ck { display: grid; place-items: center; box-sizing: border-box; width: 14px; height: 14px; border: 1.5px solid #b6c0cc; border-radius: 4px; background: #fff; color: transparent; opacity: 1; }
.lm-opt[aria-pressed="true"] .lm-ck { border-color: #145dfb; background: #145dfb; color: #fff; opacity: 1; }
.lm-opt, .lm-opt[aria-pressed="true"] { font-weight: 500; }
.lm-opt[aria-pressed="true"] { background: none; }
.lm-opt:hover, .lm-opt[aria-pressed="true"]:hover { background: #f8fafc; }
.lm-opt:not([aria-pressed="true"]) .lm-sw { opacity: .4; }


/* ===== Plans, usage and checkout ===== */
/* The account row at the foot of the sidebar opens this page */
button.side-account { width: 100%; border: 0; border-top: 1px solid var(--v4-rule); background: none; font: inherit; text-align: left; cursor: pointer; }
button.side-account:hover .acct-t b { color: #145dfb; }
.pl-head { margin-bottom: 20px; }
.pl-crumb { margin-bottom: 8px; }
.pl-crumb a { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--v4-muted); }
.pl-crumb a:hover { color: #145dfb; text-decoration: none; }
.pl-flash { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid #cfe5d8; border-radius: 8px; background: #f2faf5; font-size: 13px; color: var(--ok); }

/* Usage limits, laid out as Claude's are: what is measured and when it resets, a thin bar, the share used */
.ul { margin-bottom: 34px; padding: 20px 24px 14px; border: 1px solid var(--v4-edge); border-radius: 12px; background: var(--v4-panel); box-shadow: var(--v4-shadow); }
.ul-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.ul-h h2 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: -.01em; color: var(--v4-ink); }
.ul-h span { font-size: 13px; color: var(--v4-muted); }
.ul-row { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(0, 1.5fr) 112px; align-items: center; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--v4-rule-2); }
.ul-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ul-what b { font-size: 13.5px; font-weight: 500; color: var(--v4-ink); }
.ul-what small { font-size: 12px; color: var(--v4-muted); }
.ul-bar { height: 6px; border-radius: 3px; background: #e2e7ee; overflow: hidden; }
.ul-bar i { display: block; height: 100%; min-width: 0; border-radius: 3px; background: #145dfb; transition: width .3s ease; }
.ul-bar.is-none { background: none; }
.ul-pct { font-size: 12.5px; color: var(--v4-muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ul-foot { display: flex; align-items: center; gap: 6px; padding-top: 12px; font-size: 12px; color: var(--v4-muted); }
.ul-refresh { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--v4-muted); cursor: pointer; }
.ul-refresh:hover { background: var(--v4-hover); color: #145dfb; }

/* The plans, side by side */
.pl-top { margin: 0 0 20px; }
.pl-top > span:last-child { max-width: 90ch; font-size: 12.5px; text-align: right; }
.pl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.pl-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 26px 20px 20px; border: 1px solid var(--v4-rule); border-radius: 12px; background: #fff; }
.pl-card.is-api { border-color: #111a2e; background: #111a2e; color: #fff; }
.pl-name { display: flex; align-items: center; gap: 8px; min-height: 24px; margin: 0 0 10px; font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: #145dfb; }
.pl-card.is-api .pl-name { font-size: 15px; font-weight: 400; letter-spacing: -.01em; text-transform: none; color: #fff; }
.pl-name .app-mark { width: 24px; height: 24px; border-radius: 7px; }
.pl-name .app-mark img { width: 14px; }
.pl-for { min-height: 42px; margin: 0; font-size: 14px; line-height: 1.5; color: var(--v4-ink); }
.pl-card.is-api .pl-for { color: #dbe4f3; }
.pl-price { display: flex; flex-direction: column; gap: 2px; margin: 18px 0 20px; padding-bottom: 20px; border-bottom: 1px solid var(--v4-rule); }
.pl-card.is-api .pl-price { border-bottom-color: #ffffff24; }
.pl-price b { font-size: 32px; font-weight: 380; line-height: 1.1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.pl-price small { font-size: 11.5px; color: var(--v4-muted); }
.pl-card.is-api .pl-price small { color: #9fb0cc; }
.pl-inc { margin: 0 0 12px; font-size: 13px; font-weight: 500; }
.pl-list { display: flex; flex-direction: column; gap: 11px; margin: 0 0 22px; padding: 0; list-style: none; }
.pl-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; line-height: 1.45; color: var(--v4-ink); }
.pl-list li .ic { flex: none; margin-top: 2px; color: #145dfb; }
.pl-card.is-api .pl-list li { color: #e6ecf7; }
.pl-card.is-api .pl-list li .ic { color: #8fb4ff; }
.pl-go, .pl-mine { width: 100%; height: 38px; margin-top: auto; justify-content: center; }
.pl-mine { display: flex; align-items: center; gap: 7px; border: 1px solid transparent; font-size: 12.5px; font-weight: 500; color: #145dfb; }
.pl-card.is-api .pl-mine { color: #8fb4ff; }
.pl-card.is-mine:not(.is-api) { border-color: #145dfb; }

/* The library every plan includes */
.pl-lib { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 22px; margin-top: 22px; padding: 22px 26px; border: 1px solid var(--v4-rule); border-radius: 12px; background: #fff; }
.pl-lib b { font-size: 38px; font-weight: 300; line-height: 1; letter-spacing: -.04em; color: #145dfb; }
.pl-lib p { margin: 0; font-size: 13.5px; color: var(--v4-ink); }
.pl-logos { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--v4-rule-2); }
.pl-logos img { width: 26px; height: 26px; object-fit: contain; }
.pl-note { margin: 16px 0 0; font-size: 11.5px; color: var(--v4-muted); }

/* Checkout: the plan on the left, the order on the right */
.co { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.co-plan { padding: 24px 26px 8px; border: 1px solid var(--v4-edge); border-radius: 12px; background: var(--v4-panel); box-shadow: var(--v4-shadow); }
.co-plan h2 { margin: 8px 0 4px; font-size: 22px; font-weight: 400; letter-spacing: -.025em; }
.co-plan .pl-for { min-height: 0; margin-bottom: 20px; color: var(--v4-muted); }
.co-sum { display: flex; flex-direction: column; padding: 22px 22px 18px; border: 1px solid var(--v4-rule); border-radius: 12px; background: #fff; }
.co-sum h2 { margin: 0 0 10px; font-size: 15px; font-weight: 500; }
.co-line, .co-total { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 0; font-size: 13.5px; }
.co-line b, .co-total b { font-weight: 500; font-variant-numeric: tabular-nums; }
.co-line.is-quiet { padding: 5px 0; font-size: 12.5px; color: var(--v4-muted); }
.co-total { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--v4-rule); font-size: 15px; }
.co-pay { width: 100%; height: 42px; margin-top: 16px; justify-content: center; font-size: 13.5px; }
.co-note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--v4-muted); }
.co-err { margin: 12px 0 0; }
@media (max-width: 1180px) { .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; } .pl-for { min-height: 0; } }
@media (max-width: 860px) { .co { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .pl-grid { grid-template-columns: minmax(0, 1fr); }
  .pl-top { flex-direction: column; align-items: flex-start; gap: 6px; } .pl-top > span:last-child { text-align: left; }
  .ul { padding: 16px 16px 10px; }
  .ul-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .ul-row .ul-bar { grid-column: 1 / -1; order: 3; }
  .ul-row .ul-bar.is-none { display: none; }
  .pl-lib { grid-template-columns: minmax(0, 1fr); padding: 18px; }
}

/* ===== Phone and tablet =====
   Under 900px the sidebar becomes a drawer that slides over the page, opened from a bar across the top.
   Everything else keeps its look and gives up its side margins. */
.m-bar, .side-scrim { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); height: 100vh; height: 100dvh; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 70; display: flex; width: min(86vw, 330px); margin: 0; padding: calc(14px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
    border-radius: 0 14px 14px 0; background: linear-gradient(165deg, #fbfcfd 3%, #f3f5f8 72%, #eef1f5); transform: translateX(-105%); visibility: hidden; transition: transform .22s ease, visibility 0s .22s; }
  .app.m-open .side { transform: none; visibility: visible; box-shadow: 0 24px 70px #14213a40; transition: transform .22s ease; }
  .app.m-open .side-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: #0f172b59; }
  .side-grip { display: none !important; }
  .m-bar { position: relative; z-index: 20; display: flex; align-items: center; gap: 6px; flex: none; min-height: 52px; padding: env(safe-area-inset-top) 8px 0; border-bottom: 1px solid var(--v4-rule); background: #fbfcfd; }
  .m-menu, .m-new { display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 9px; background: none; color: #475569; cursor: pointer; }
  .m-menu:active, .m-new:active { background: var(--v4-hover); }
  .m-title { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; min-width: 0; font-size: 15px; }
  .m-title b { font-weight: 400; letter-spacing: -.02em; }
  .m-title sup { margin-left: 3px; font-size: 9px; color: #145dfb; vertical-align: 6px; }
  .m-title .app-mark { width: 26px; height: 26px; border-radius: 8px; }
  .m-title .app-mark img { width: 15px; }
  /* Rows a finger can hit, and menus that show without a pointer hovering over them */
  .side-new { height: 44px; } .side-tab, .chats button, .cf-toggle { height: 42px; font-size: 14px; }
  .chat-more, .cf-h .chat-more { opacity: 1; }
  .chats li.chat-row > button[data-chat] em { display: none; }
  /* Pages, chat and the message box use the full width */
  .page-in { padding: 22px 16px calc(48px + env(safe-area-inset-bottom)); }
  .thread { width: min(var(--col), calc(100% - 28px)); padding: 18px 0 20px; gap: 22px; }
  .welcome-in { width: min(var(--col), calc(100% - 32px)); padding-top: 7vh; }
  .composer { width: min(var(--col), calc(100% - 20px)); margin: 6px auto calc(10px + env(safe-area-inset-bottom)); }
  .composer textarea { font-size: 16px; }   /* smaller type makes iPhones zoom the page when the box is tapped */
  .send, .att-btn { width: 38px; height: 38px; } .effort-btn { height: 38px; }
  .msg-user div { max-width: 92%; padding: 10px 15px; font-size: 15px; }
  .sd-title, .page-h h1, .sd-page-title { font-size: 28px; white-space: normal; }
  .sd-workspace-header { min-height: 0; padding: 4px 0 16px; flex-wrap: wrap; gap: 12px; }
  .sd-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .sd-tabs, .sd-head .sd-seg { max-width: 100%; overflow-x: auto; }
  .banner { margin: 10px 12px 0; }
  /* Cards in a chat stay as wide as the chat: the list of files is one column that never wraps, so a wide
     table inside a card scrolls sideways within it instead of stretching the card past the screen */
  .outs { flex-wrap: nowrap; }
  .outs > *, .v4-st .st-card, .v4-hf .hf-card { min-width: 0; max-width: 100%; }
  .v4-st .st-stage, .v4-hf .hf-stage { padding: 12px 10px 14px; }
  .v4-st .st-table-wrap { margin: 0 12px; -webkit-overflow-scrolling: touch; }
  .sd-topline { flex-wrap: wrap; gap: 10px 16px; }
  .sd-topline-r { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; width: 100%; }
  .sd-topline-r .sd-find { order: 5; flex: 1 1 100%; width: auto; }
  /* Wide tables scroll sideways inside the page instead of pushing it wider */
  .page-in > .table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .gallery-h { flex-direction: column; align-items: flex-start; gap: 2px; }
  input, select, .sheet-search input, .sd-find input { font-size: 16px; }
}
@media (max-width: 560px) {
  .w-title { font-size: 24px; } .w-sub { font-size: 14px; }
  .sd-title, .page-h h1, .sd-page-title { font-size: 25px; }
  .out { min-width: 0; width: 100%; } .out b { max-width: 100%; }
  .dtile { min-height: 0; padding: 18px; }
}

/* ===== The server's picture of a 3D model or a chart, for a report: the drawing alone, edge to edge ===== */
.render-shot { width: 100vw; height: 100vh; overflow: hidden; background: #fff; }
.render-shot .filecard { border: 0; border-radius: 0; box-shadow: none; }
.render-shot .scene-bar, .render-shot .layers, .render-shot .scene-tip, .render-shot .north { display: none !important; }
.render-shot .scene-v { height: 100vh; min-height: 0; }
.render-shot .chartcard { width: 100vw; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; background: #fff; }

/* The map alone, for a report (#render-map/<file>/print): no title bar, buttons or footer; the key stays */
.render-map.print { width: 100vw !important; height: 100vh; overflow: hidden; }
.render-map.print .mapcard, .render-map.print .hf-stage, .render-map.print .hf-card, .render-map.print .hf-body { padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: #fff !important; max-width: none !important; min-height: 0 !important; }
.render-map.print .hf-header, .render-map.print .hf-footer, .render-map.print .lm-bar, .render-map.print .hf-method-panel { display: none !important; }
.render-map.print .lm { height: 100vh !important; border: 0 !important; border-radius: 0 !important; margin: 0 !important; }
.render-map.print .maplibregl-ctrl-bottom-right .maplibregl-ctrl-group { display: none !important; }

/* ===== Thumbs up and down under an answer, and the Feedback page ===== */
.rate { gap: 3px; }
.rate-btn { width: 30px; height: 28px; border-radius: 7px; }
.rate-btn.is-on[data-rate="down"] { background: #fdecee; color: #b4233b; }
.rate-btn.is-on[data-rate="up"] { background: #e8f5ee; color: #0b6b40; }
.rate-msg { margin-left: 8px; font-size: 12px; color: var(--v4-muted); }
.rate-msg.is-ok { color: #0b6b40; }
.rate-msg.is-bad { color: #b4233b; }
.rate-note { flex-basis: 100%; display: block; width: min(100%, 620px); margin-top: 8px; }
.rate-note[hidden] { display: none; }
.rate-note textarea { display: block; width: 100%; min-height: 76px; padding: 10px 12px; border: 1px solid var(--v4-rule); border-radius: 9px; outline: 0; background: #fff; font: 400 13.5px/1.55 var(--font); color: var(--v4-ink); resize: vertical; transition: border-color .15s, box-shadow .15s; }
.rate-note textarea::placeholder { color: #8591a0; }
.rate-note textarea:focus { border-color: #93b4f5; box-shadow: 0 0 0 3px #145dfb14; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.rate-save { height: 32px; padding: 0 14px; flex: none; }
.rate-save:disabled { opacity: .6; }
.rate-hint { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.45; color: var(--v4-muted); }
.rate-hint a { color: var(--v4-ink); text-decoration: underline; text-underline-offset: 2px; }
.rate-left { flex: none; font-size: 11.5px; color: #b4233b; font-variant-numeric: tabular-nums; }
.fb-about { max-width: 72ch; margin: -6px 0 22px; font-size: 13.5px; line-height: 1.6; color: var(--v4-muted); }
.fbs { display: flex; flex-direction: column; border: 1px solid var(--v4-rule); border-radius: 12px; background: #fff; overflow: hidden; }
.fb { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 16px 18px; border-top: 1px solid var(--v4-rule-2); }
.fb:first-child { border-top: 0; }
.fb-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #e8f5ee; color: #0b6b40; }
.fb.is-down .fb-mark { background: #fdecee; color: #b4233b; }
.fb-q { margin: 3px 0 0; font-size: 14px; font-weight: 500; line-height: 1.45; color: var(--v4-ink); overflow-wrap: anywhere; }
.fb-n { margin: 7px 0 0; font-size: 13.5px; line-height: 1.6; color: #475569; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-n.is-none { color: var(--v4-muted); font-style: italic; }
.fb-m { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 9px 0 0; font-size: 11.5px; color: var(--v4-muted); }
.fb-m a { color: var(--v4-ink); }
@media (max-width: 640px) { .rate-row { flex-wrap: wrap; } .rate-hint { flex-basis: 100%; order: 3; } .fb { padding: 14px; } }

/* ---- Files added to a message ---- */
.att-chip.is-file { border-color: #e0e5ec; background: #f6f8fb; color: var(--v4-ink, #303740); text-decoration: none; }
.att-chip.is-file > .ic { color: #6b7a8c; }
a.att-chip.is-file:hover { border-color: #cadbff; background: #eff5ff; color: #145dfb; }
.att-chip.busy { opacity: .6; }
.att-chip.busy > span::after { content: " …"; }
.att-pic { flex: none; width: 18px; height: 18px; border-radius: 3px; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px #e0e5ec; }
.msg-att .att-chip.is-file { height: 30px; }
.msg-att .att-pic { width: 22px; height: 22px; }
.att-up { margin: 0 0 2px; font-weight: 450; }
.att-up > em { color: var(--text-2); }
.composer.dropping { border-color: #145dfb; box-shadow: 0 0 0 3px #145dfb1f; }

/* ---- A table in an answer: a card like the app's other tables. Words are never broken inside a cell (the
   answer's own text may break anywhere, which squeezed a short column down to a sliver), and numbers stay
   on one line, set to the right. On a narrow screen the table scrolls sideways inside its card. ---- */
.md-table { max-width: 100%; margin: 6px 0 16px; overflow-x: auto; border: 1px solid #ffffffb3; border-radius: 12px; background: var(--panel, #fff); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #8896a00a, 0 2px 5px #26354705; }
.md-table table { width: 100%; border-collapse: collapse; margin: 0; font-size: 13.5px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.md-table th, .md-table td { padding: 11px 18px; border-bottom: 1px solid #dfe5ed; text-align: left; vertical-align: top; overflow-wrap: normal; word-break: normal; hyphens: none; }
.md-table thead th { padding: 10px 18px; background: #e9edf3; font-size: 11px; font-weight: 500; letter-spacing: .02em; color: var(--text-2); white-space: nowrap; vertical-align: bottom; }
.md-table tbody tr:last-child > * { border-bottom: 0; }
.md-table td:first-child { color: var(--v4-ink, var(--text)); }
.md-table th.num, .md-table td.num { text-align: right; white-space: nowrap; }
.md-table td { min-width: 4.5em; }
.md-table tr.grp td { padding-top: 9px; padding-bottom: 9px; background: #f4f6fa; font-size: 12.5px; color: var(--text-2); }
.md-table tr.grp td:first-child { color: var(--v4-ink, var(--text)); }
.md-table tr.tot td { border-top: 1px solid #c9d3e0; font-weight: 500; color: var(--v4-ink, var(--text)); }
.md-table tbody tr:not(.grp):hover { background: #145dfb05; }
@media (max-width: 900px) {
  .md-table table { font-size: 13px; }
  .md-table th, .md-table td { padding: 10px 14px; }
  .md-table table[data-cols="3"] { min-width: 460px; }
  .md-table table:not([data-cols="1"]):not([data-cols="2"]):not([data-cols="3"]) { min-width: 560px; }
}

/* ---- Export on a map, a 3D model or a chart: one quiet button and a short list of file kinds, one click each ---- */
.xp { position: relative; display: inline-flex; }
.xp-btn > span { line-height: 1; }
.v4-hf .hf-tool.xp-btn { width: auto; gap: 6px; padding: 0 11px; font-size: 12px; font-weight: 450; }
.xp-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 184px; max-width: calc(100vw - 44px); padding: 5px; border: 1px solid #e0e5ec; border-radius: 9px; background: #fff; box-shadow: 0 4px 12px #253b5510, 0 16px 40px #253b5514; text-align: left; }
.xp-h { margin: 0; padding: 6px 9px 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--text-3); }
.xp-wait { margin: 0; padding: 6px 9px; font-size: 12px; color: var(--text-2); }
.xp-err { max-width: 220px; color: var(--bad, #a91534); }
.xp-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; height: 32px; padding: 0 9px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 13px; color: var(--v4-ink, var(--text)); text-align: left; white-space: nowrap; cursor: pointer; }
.xp-row .ic { flex: none; color: transparent; }
.xp-row:hover, .xp-row:focus-visible { background: #f1f5fd; color: #145dfb; outline: 0; }
.xp-row:hover .ic, .xp-row:focus-visible .ic { color: #145dfb; }
.xp-row.is-busy { cursor: progress; opacity: .55; }
.xp-row.is-bad { color: var(--bad, #a91534); }
.render-shot .xp, .render-map .xp { display: none !important; }
@media (pointer: coarse) { .xp-row { height: 40px; } }

/* ---- A table's download button, at its top right as on any card; the table scrolls under it on a narrow screen ---- */
.md-table { position: relative; overflow: hidden; }
.md-table-s { overflow-x: auto; }
.md-dl { position: absolute; top: 5px; right: 7px; z-index: 2; display: grid; place-items: center; width: 28px; height: 26px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--text-2); cursor: pointer; transition: background-color .16s, border-color .16s, color .16s; }
.md-dl:hover, .md-dl:focus-visible { border-color: #d6e0ee; background: #fff; color: #145dfb; outline: 0; }
.md-dl.is-done { color: var(--ok, #1a7f4b); }
.md-table thead th:last-child, .md-table td.num:last-child { padding-right: 46px; }
.md-table td.nw, .md-table th.nw { white-space: nowrap; }
@media (pointer: coarse) { .md-dl { width: 36px; height: 32px; top: 2px; } }

/* ---- Full screen: a map or a 3D model fills the window. In a chat the message box floats over its foot and the
   reply above the box, so the map keeps its size; the map's key moves up out of their way. ---- */
body.has-full { overflow: hidden; }
#fullLayer { position: fixed; inset: 0; z-index: 300; display: none; background: var(--bg, #e6e9ee); }
body.has-full #fullLayer { display: block; }
.full-stage { position: absolute; inset: 10px; }
.full-stage > .filecard { width: 100%; height: 100%; max-width: none; margin: 0; }
.full-hole { visibility: hidden; }
.full-stage .mapcard .hf-stage { height: 100%; min-height: 0; padding: 0; }
.full-stage .mapcard .hf-card { display: flex; flex-direction: column; height: 100%; max-width: none; }
.full-stage .mapcard .hf-header { padding: 12px 16px 0; }
.full-stage .mapcard .hf-body { display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 10px 14px 14px; }
.full-stage .mapcard .lm { flex: 1; height: auto; min-height: 0; }
.full-stage .mapcard .hf-footer, .full-stage .mapcard .hf-source-row, .full-stage .mapcard .hf-method-panel { display: none; }
.full-stage .scene { display: flex; flex-direction: column; }
.full-stage .scene .scene-v { flex: 1; height: auto; min-height: 0; }
.full-stage .scene .scene-tip { display: none; }
.mapcard:not(.is-full) .lm-only-full { display: none; }
.lm-seg [data-3d] { padding: 0 12px; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: #475569; cursor: pointer; }
.lm-seg [data-3d][aria-pressed="true"] { background: #eff6ff; color: #145dfb; }
/* with the message box at the foot, the key sits under the controls and the zoom buttons at the top right */
#fullLayer.has-dock .full-stage .lm-legend { top: 54px; bottom: auto; max-height: calc(100% - 250px); }
#fullLayer.has-dock .full-stage .maplibregl-ctrl-bottom-right { top: 0; bottom: auto; }
.full-float { position: absolute; left: 50%; bottom: 30px; z-index: 6; display: flex; flex-direction: column; gap: 8px; width: min(760px, calc(100% - 44px)); transform: translateX(-50%); pointer-events: none; }
.full-float > * { pointer-events: auto; }
.full-dock:empty { display: none; }
.full-dock .composer { width: 100%; margin: 0; border-color: #d5dde8; box-shadow: 0 6px 18px #1f2d3d1f, 0 1px 3px #1f2d3d14; }
.full-reply { position: relative; max-height: 38vh; border: 1px solid #d5dde8; border-radius: 14px; background: #fffffff5; box-shadow: 0 6px 18px #1f2d3d1f, 0 1px 3px #1f2d3d14; overflow: hidden; }
.full-reply-b { max-height: 38vh; padding: 14px 44px 14px 18px; overflow-y: auto; }
.full-reply-b > * + * { margin-top: 10px; }
.full-reply-b .plan { max-width: none; margin: 0; }
.full-reply-x { position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text-3); cursor: pointer; }
.full-reply-x:hover { background: #f1f4f9; color: var(--text); }
.full-doing { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--text-2); }
.full-doing em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--text-3); }
.render-shot .xp-full, .render-map .xp-full { display: none !important; }
@media (max-width: 900px) {
  .full-stage { inset: 6px; }
  .full-stage .mapcard .hf-header { padding: 10px 12px 0; }
  .full-stage .mapcard .hf-body { padding: 8px 8px 10px; }
  .full-float { bottom: 18px; width: calc(100% - 24px); }
  .full-reply, .full-reply-b { max-height: 32vh; }
}

/* ---- A map's tooltip, in the form of EconMatch V4's map card (cluster-map.css, .cm-card): glass, a small line
   naming what it is with its mark, the name at 17px, the figures that matter large, the rest as pairs, a last line
   under a rule ---- */
.lm .lm-pop { gap: 0; width: 280px; min-width: 0; max-width: calc(100% - 16px); padding: 14px 15px 12px; border: 1px solid #ffffffd9; border-radius: 12px; background: #fbfcfdec; -webkit-backdrop-filter: blur(20px) saturate(1.08); backdrop-filter: blur(20px) saturate(1.08); box-shadow: 0 10px 28px #1e2d401c, 0 1px 3px #1e2d4010; font: 400 12px/1.4 'Outfit', sans-serif; color: #303740; font-variant-numeric: tabular-nums; }
.lm .lm-pop.is-below { transform: translate(-50%, 0); }
.lm .lm-pop.is-held { max-width: calc(100% - 16px); }
.tp { display: flex; flex-direction: column; min-width: 0; }
.tp-eb { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 10px; letter-spacing: .02em; color: #69727c; }
.tp-eb > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-ic { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #145dfb24; border-radius: 7px; background: #145dfb0f; color: #145dfb; font-style: normal; }
.tp-ic.is-sw { border-color: color-mix(in srgb, var(--tp) 26%, transparent); background: color-mix(in srgb, var(--tp) 12%, #fff); }
.tp-ic.is-sw > i { width: 10px; height: 10px; border-radius: 3px; background: var(--tp); box-shadow: inset 0 0 0 1px #0f172a2e; }
.tp-ic.is-sw { border-color: #dfe5ea; }
.lm-pop .tp-t { display: block; font-size: 16px; font-weight: 500; line-height: 1.25; letter-spacing: -.02em; color: #303740; text-wrap: pretty; overflow-wrap: anywhere; }
.lm-pop .tp-sub { margin: 3px 0 0; font-size: 11px; line-height: 1.4; color: #69727c; }
.lm-pop .tp-addr { display: flex; align-items: flex-start; gap: 5px; }
.lm-pop .tp-addr .ic { flex: none; margin-top: 2px; }
.tp-hub { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #dfe5ea; }
.tp-hub.is-one { grid-template-columns: 1fr; }
.tp-hub > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tp-hub > div + div { padding-left: 14px; border-left: 1px solid #dfe5ea; }
.lm-pop .tp-hub span { font-size: 10px; color: #69727c; }
.lm-pop .tp-hub b { font-size: 20px; font-weight: 400; line-height: 1.15; letter-spacing: -.035em; color: #303740; white-space: nowrap; }
.lm-pop .tp-hub b small { margin-left: 3px; font-size: 11px; letter-spacing: 0; color: #69727c; }
.lm-pop .tp-hub em { font-style: normal; font-size: 9.5px; color: #8a939d; }
.tp-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; margin: 11px 0 0; padding-top: 10px; border-top: 1px solid #dfe5ea; }
.tp-rows > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tp-rows > div.is-wide { grid-column: 1 / -1; }
.tp-rows dt { font-size: 9.5px; color: #69727c; }
.tp-rows dd { margin: 0; font-size: 12px; line-height: 1.35; color: #303740; overflow-wrap: anywhere; }
.tp-rows a { color: #145dfb; text-decoration: none; }
.tp-rows a:hover { text-decoration: underline; }
.lm-pop .tp-foot { margin: 11px 0 0; padding-top: 8px; border-top: 1px solid #e3e8ed; font-size: 10px; color: #69727c; }
.tp-list { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: #303740; }
.tp-list li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-list .tp-more { color: #69727c; }
.tp-acts { display: flex; gap: 6px; margin-top: 12px; }
.tp-act { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid #dce3eb; border-radius: 7px; background: #f7f9fb; font: 500 11.5px/1 'Outfit', sans-serif; color: #303740; text-decoration: none; cursor: pointer; }
.tp-act.is-primary { border-color: #145dfb; background: #145dfb; color: #fff; }
.tp-act:hover { filter: brightness(.97); }

/* ---- Beside a full-screen view: the numbers behind it and what the chat made. After V4's map view: a glass panel
   over the right of a map (clamp(340px, 32vw, 460px), 14px corners), a 64px header with a blue tile, numbered
   sections, stat tiles, quiet rows, a source line at the foot; a tab at its left edge puts it away ---- */
.full-rail { position: absolute; top: 10px; right: 10px; bottom: 10px; z-index: 7; display: flex; width: clamp(320px, 30vw, 420px); transition: transform .22s ease-out; }
.full-rail[hidden] { display: none; }
.rail-in { display: flex; flex: 1; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid #ffffffb3; border-radius: 14px; background: linear-gradient(165deg, #fbfcfdf5 3%, #f3f5f8f2 72%, #eef1f5f2); -webkit-backdrop-filter: blur(20px) saturate(1.08); backdrop-filter: blur(20px) saturate(1.08); box-shadow: inset 0 1px 0 #fff, 0 10px 30px -14px #1e282a3d, 0 1px 3px #1e2d4012; font-family: 'Outfit', sans-serif; color: #303740; }
#fullLayer.rail-shut .full-rail { transform: translateX(calc(100% + var(--rail-right, 10px))); }
.rail-tab { position: absolute; top: 50%; left: -24px; display: grid; place-items: center; width: 24px; height: 54px; margin-top: -27px; padding: 0; border: 1px solid #dfe5ed; border-right: 0; border-radius: 8px 0 0 8px; background: #fbfcfdf2; color: #6e7885; cursor: pointer; box-shadow: -4px 4px 12px -6px #1e282a33; }
.rail-tab:hover { color: #145dfb; }
#fullLayer.rail-shut .rail-tab .ic { transform: rotate(180deg); }
.rail-h { display: flex; flex: none; align-items: center; gap: 11px; min-height: 64px; padding: 12px 18px; border-bottom: 1px solid #dfe5ed; }
.rail-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(145deg, #3075ff, #145dfb); color: #fff; }
.rail-tt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rail-tt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; letter-spacing: -.01em; }
.rail-tt small { font-size: 10.5px; color: #6e7885; }
.rail-seg { display: flex; flex: none; gap: 2px; margin: 12px 16px 2px; padding: 2px; border-radius: 7px; background: #e9edf2; }
.rail-seg[hidden] { display: none; }
.rail-seg button { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 8px; border: 0; border-radius: 5px; background: none; font: 400 12px/1 'Outfit', sans-serif; color: #6e7885; cursor: pointer; }
.rail-seg button[aria-selected="true"] { background: #fff; color: #303740; box-shadow: 0 1px 3px #28394e0b, 0 0 0 1px #28394e08; }
.rail-seg em { font-style: normal; font-size: 10.5px; color: #8a939d; }
.rail-b { flex: 1; min-height: 0; padding: 4px 16px 14px; overflow-y: auto; overscroll-behavior: contain; }
.rl-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 12px 0 4px; }
.rl-tiles.n1 { grid-template-columns: minmax(0, 1fr); }
.rl-tiles.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rl-tile { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 8px 9px 9px; border: 1px solid #ffffffb3; border-radius: 8px; background: #ffffff9c; box-shadow: 0 1px 2px #26354706; }
.rl-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: #6e7885; }
.rl-tile b { font-size: 19px; font-weight: 400; line-height: 1.15; letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rl-tile b small { margin-left: 3px; font-size: 11px; letter-spacing: 0; color: #6e7885; }
.rl-tile em { font-style: normal; font-size: 9.5px; color: #69727c; }
.rl-facts { display: flex; flex-direction: column; margin: 8px 0 0; }
.rl-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #e6ebf1; font-size: 11.5px; }
.rl-facts dt { color: #6e7885; }
.rl-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.rl-sec { padding: 14px 0 4px; }
.rl-sec + .rl-sec { margin-top: 6px; border-top: 1px solid #dfe5ed; }
.rl-sec-h { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 10px; }
.rl-sec-h > div { flex: 1; min-width: 0; }
.rl-ix { flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 5px; background: linear-gradient(150deg, #edf2fc, #e0e9f9); font: 500 10px/1 'Outfit', sans-serif; font-style: normal; color: #145dfb; }
.rl-sec-h h3 { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: -.01em; }
.rl-sec-h p { margin: 2px 0 0; font-size: 10.5px; color: #6e7885; }
.rl-dl { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #dfe5ed; border-radius: 7px; background: #ffffffc7; color: #6e7885; cursor: pointer; }
.rl-dl:hover { border-color: #d6e2f8; background: #eff5ff; color: #145dfb; }
.rl-parts { display: flex; gap: 2px; height: 10px; margin: 2px 0 12px; overflow: hidden; border-radius: 3px; }
.rl-parts i { min-width: 2px; }
.rl-solo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; padding: 7px 10px; border-radius: 7px; background: #edf3ff; font-size: 11px; color: #303740; }
.rl-solo b { font-weight: 500; }
.rl-solo button { padding: 0; border: 0; background: none; font: 500 11px/1 'Outfit', sans-serif; color: #145dfb; cursor: pointer; }
.rl-rows { display: flex; flex-direction: column; }
.rl-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 38px; grid-template-areas: "sw l v p" ". bar bar bar"; align-items: center; column-gap: 9px; row-gap: 5px; width: 100%; padding: 8px 6px; border: 0; border-radius: 6px; background: none; font: 400 11.5px/1.3 'Outfit', sans-serif; color: #303740; text-align: left; }
.rl-row + .rl-row { border-top: 1px solid #e6ebf1; }
button.rl-row { cursor: pointer; }
button.rl-row:hover { background: #e8eef8; }
.rl-row[aria-pressed="true"] { background: #edf3ff; }
.rl-rows.has-solo .rl-row[aria-pressed="false"] { opacity: .45; }
.rl-row.is-none { color: #9aa3ad; }
.rl-sw { grid-area: sw; width: 10px; height: 10px; border-radius: 3px; box-shadow: inset 0 0 0 1px #0f172a24; }
.rl-l { grid-area: l; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-v { grid-area: v; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rl-v small { margin-left: 3px; font-size: 10px; color: #6e7885; }
.rl-p { grid-area: p; text-align: right; font-variant-numeric: tabular-nums; color: #6e7885; }
.rl-bar { grid-area: bar; display: block; height: 4px; border-radius: 2px; background: #e6ebf1; overflow: hidden; }
.rl-bar > i { display: block; height: 100%; border-radius: 2px; }
.rl-places { display: flex; flex-direction: column; }
.rl-place { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 6px; border: 0; border-radius: 6px; background: none; font: inherit; color: #303740; text-align: left; cursor: pointer; }
.rl-place + .rl-place { border-top: 1px solid #e6ebf1; }
.rl-place:hover { background: #e8eef8; }
.rl-n { flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: #145dfb; font-size: 9.5px; font-weight: 500; color: #fff; }
.rl-n.is-pin { border-radius: 5px; background: #edf3ff; color: #145dfb; }
.rl-place > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rl-place b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 400; }
.rl-place small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; color: #6e7885; }
.rl-tbl { max-height: 52vh; overflow: auto; border-radius: 6px; }
.rl-tbl table { width: 100%; border-collapse: collapse; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.rl-tbl thead th { position: sticky; top: 0; padding: 6px 8px; background: #e9edf3; font-size: 10px; font-weight: 400; color: #6e7885; text-align: left; }
.rl-tbl tbody th { padding: 7px 8px; font-weight: 400; text-align: left; }
.rl-tbl td { padding: 7px 8px; color: #303740; }
.rl-tbl tbody tr + tr > * { border-top: 1px solid #e6ebf1; }
.rl-tbl .num { text-align: right; white-space: nowrap; }
.rl-tbl small { color: #9aa3ad; }
.rl-none { margin: 8px 0 0; font-size: 10.5px; color: #6e7885; }
.rl-foot { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 14px; padding: 11px 12px; border: 0; border-top: 1px solid #e1e6ed; border-radius: 0 0 8px 8px; background: linear-gradient(100deg, #eef1f5, #f3f5f8); font: inherit; color: #303740; text-align: left; cursor: pointer; }
.rl-foot > .ic { flex: none; color: #6e7885; }
.rl-foot > span { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
.rl-foot b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 500; }
.rl-foot small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: #6e7885; }
.rl-foot em { flex: none; font-style: normal; font-size: 10.5px; color: #145dfb; }
.mk-list { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.mk { border: 1px solid #ffffffb3; border-radius: 9px; background: #ffffff8c; }
.mk.is-on { border-color: #cfdcf7; background: #f4f8ff; box-shadow: inset 2px 0 0 #145dfb; }
.mk-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; font: inherit; color: #303740; text-align: left; cursor: pointer; }
.mk-row:hover { background: #e8eef8; }
.mk-th { position: relative; flex: none; display: grid; place-items: center; width: 46px; height: 38px; overflow: hidden; border: 1px solid #e1e6ed; border-radius: 6px; background: #eef1f5; color: #6e7885; }
.mk-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.mk-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mk-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 400; text-transform: capitalize; }
.mk-t small { font-size: 10.5px; color: #6e7885; }
.mk-t { flex: 1; }
.mk-row > .ic:last-child { flex: none; color: #b3bcc7; }
.mk-row:hover > .ic:last-child { color: #145dfb; }
.mk-v em { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-style: normal; font-size: 10.5px; line-height: 1.35; color: #69727c; }
.mk-v em::before { content: '“'; } .mk-v em::after { content: '”'; }
.mk-vs { margin: 0 10px 8px 32px; padding: 0 0 0 12px; border-left: 1px solid #dfe5ed; list-style: none; }
.mk-v { position: relative; display: flex; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: none; font: inherit; color: #303740; text-align: left; cursor: pointer; }
.mk-v:hover { background: #e8eef8; }
.mk-v > i { position: absolute; left: -16.5px; top: 11px; width: 8px; height: 8px; border: 1.5px solid #b9c4d2; border-radius: 50%; background: #f6f8fa; }
.mk-v.is-on > i { border-color: #145dfb; background: #145dfb; }
.mk-v > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mk-v b { display: flex; align-items: baseline; gap: 6px; font-size: 11.5px; font-weight: 500; }
.mk-v b small { font-weight: 400; }
.mk-v.is-on b { color: #145dfb; }
.mk-v small { font-size: 10px; color: #6e7885; }
/* the numbers worked out from a map's own shapes: a chart in groups (areas, lines, points), the figures written on
   its shapes, and its sources; never the legend's list of layers again */
.rl-l small { margin-left: 6px; font-size: 10px; color: #8a939d; }
.rl-g { display: flex; justify-content: space-between; gap: 10px; margin: 12px 0 2px; padding: 0 6px; font-size: 10px; letter-spacing: .02em; color: #8a939d; }
.rl-sec-h + .rl-g { margin-top: 0; }
.rl-figs, .rl-srcs { display: flex; flex-direction: column; }
.rl-fig { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 6px; border: 0; border-radius: 6px; background: none; font: inherit; color: #303740; text-align: left; cursor: pointer; }
.rl-fig + .rl-fig, .rl-src + .rl-src { border-top: 1px solid #e6ebf1; }
.rl-fig:hover { background: #e8eef8; }
.rl-fig > .rl-sw { flex: none; }
.rl-ft { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
.rl-ft b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 400; }
.rl-fv { display: flex; flex: none; gap: 12px; }
.rl-fv > span { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.rl-fv small { font-size: 9.5px; color: #8a939d; }
.rl-fv b { font-size: 13px; font-weight: 400; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rl-fv em { margin-left: 3px; font-style: normal; font-size: 10px; color: #6e7885; }
.rl-src { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 6px; color: #303740; text-decoration: none; }
.rl-src:hover { background: #e8eef8; color: #145dfb; text-decoration: none; }
.rl-src > span { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
.rl-src b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 400; }
.rl-src small { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 10.5px; line-height: 1.35; color: #6e7885; }
.rl-src > .ic { flex: none; color: #8a939d; }
.rl-how { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 8px; padding: 9px 10px; border: 1px solid #dfe5ed; border-radius: 8px; background: #ffffffa6; font: 400 11.5px/1.2 'Outfit', sans-serif; color: #303740; text-align: left; cursor: pointer; }
.rl-how:hover { border-color: #d6e2f8; background: #eff5ff; color: #145dfb; }
.rl-how .ic { flex: none; color: #145dfb; }
/* over a map or a model the panel floats inside their frame; anything else stands beside it */
#fullLayer.has-rail:not(.rail-over):not(.rail-shut) .full-stage { right: calc(var(--rail-room, 0px) + 8px); }
#fullLayer.has-rail.rail-over:not(.rail-shut) .full-stage .maplibregl-ctrl-bottom-right { right: calc(var(--rail-w, 0px) + 12px); }
#fullLayer.has-rail .full-float { left: calc((100% - var(--rail-room, 0px)) / 2); width: min(760px, calc(100% - var(--rail-room, 0px) - 44px)); }
#fullLayer.rail-shut .full-float { left: 50%; width: min(760px, calc(100% - 44px)); }
/* a picture, a chart or a document full screen: as large as the window allows */
.filecard.pic { position: relative; }
.pic-v { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pic-tools { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.filecard.pic:hover .pic-tools, .filecard.pic:focus-within .pic-tools, .filecard.pic.is-full .pic-tools { opacity: 1; }
.pic-tool { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid #dfe5ed; border-radius: 7px; background: #ffffffe6; color: #6e7885; cursor: pointer; box-shadow: 0 1px 3px #1e2d4012; }
.pic-tool:hover { border-color: #d6e2f8; background: #eff5ff; color: #145dfb; }
@media (pointer: coarse) { .pic-tools { opacity: 1; } .pic-tool { width: 40px; height: 40px; } }
.full-stage > .filecard.pic { display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; background: #fff; }
.full-stage > .filecard.pic .pic-v { flex: 1; min-height: 0; cursor: default; }
.full-stage > .filecard.pic img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.full-stage > .chartcard { overflow: auto; }
/* in a chat, the message box floats over the foot of a map; anything else stops above it */
#fullLayer.has-dock:not(.rail-over) .full-stage { bottom: 122px; }
.full-stage > .chartcard .chart, .full-stage > .chartcard .chart.short { height: min(60vh, 620px); }
.full-stage > .docview { display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; background: #fff; }
.full-stage > .docview iframe { flex: 1; width: 100%; min-height: 0; border: 0; }
.docview-b { flex: 1; display: grid; place-items: center; padding: 24px; }
.render-shot .pic-tools, .render-map .pic-tools, .render-shot .full-rail { display: none !important; }
/* the chat's own way to the list: a quiet button at its top right */
.chat-made { position: sticky; top: 12px; z-index: 6; display: flex; align-items: center; gap: 7px; height: 32px; margin: 12px 16px -44px auto; padding: 0 11px; border: 1px solid #dfe5ed; border-radius: 8px; background: #ffffffd9; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font: 400 12px/1 'Outfit', sans-serif; color: #303740; cursor: pointer; box-shadow: 0 1px 3px #1e2d4010; }
.chat-made[hidden] { display: none; }
.chat-made:hover { border-color: #d6e2f8; background: #eff5ff; color: #145dfb; }
.chat-made em { min-width: 18px; padding: 2px 5px; border-radius: 5px; background: #e9edf2; font-style: normal; font-size: 10.5px; text-align: center; color: #6e7885; }
.chat-made[aria-expanded="true"] { border-color: #cfdcf7; background: #eff5ff; color: #145dfb; }
.chat-made[aria-expanded="true"] em { background: #dce7fd; color: #145dfb; }
@media (max-width: 900px) {
  .full-rail { left: 10px; width: auto; top: auto; height: 46vh; }
  #fullLayer.rail-shut .full-rail { transform: translateY(calc(100% + 10px)); }
  .rail-tab { top: -24px; left: 50%; width: 54px; height: 24px; margin: 0 0 0 -27px; border: 1px solid #dfe5ed; border-bottom: 0; border-radius: 8px 8px 0 0; }
  .rail-tab .ic { transform: rotate(90deg); }
  #fullLayer.rail-shut .rail-tab .ic { transform: rotate(-90deg); }
  #fullLayer.has-rail:not(.rail-over):not(.rail-shut) .full-stage { right: 6px; bottom: calc(46vh + 16px); }
  #fullLayer.has-rail .full-float, #fullLayer.rail-shut .full-float { left: 50%; width: calc(100% - 24px); }
  .chat-made span { display: none; }
}

/* ---- On a server: who is signed in, under the account row (public/app.js signedIn) ---- */
.side-signed { display: flex; align-items: center; gap: 10px; padding: 0 10px 8px 52px; font-size: 11px; color: var(--v4-muted, #6e7885); }
.side-signed span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-signed a { color: #145dfb; text-decoration: none; }
.side-signed button { padding: 0; border: 0; background: none; font: inherit; color: var(--v4-muted, #6e7885); cursor: pointer; }
.side-signed button:hover, .side-signed a:hover { color: #145dfb; }
.stopped-note { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; background: #e6e9eee6; }
.stopped-note > div { max-width: 420px; padding: 26px 26px 22px; border: 1px solid #ffffffb3; border-radius: 14px; background: linear-gradient(165deg, #fbfcfd 3%, #f3f5f8 72%, #eef1f5); box-shadow: 0 10px 30px -14px #1e282a3d; }
.stopped-note b { font-size: 17px; font-weight: 500; color: #303740; }
.stopped-note p { margin: 8px 0 16px; color: #6e7885; }
.stopped-note button { height: 38px; padding: 0 14px; border: 1px solid #d5dde8; border-radius: 8px; background: #fff; font: inherit; cursor: pointer; }

/* ---- Beside the chat: everything it made, as Claude opens its artifacts. The chat keeps the rest of the window and
   stays usable; the panel is V4's glass, with the list, or one item with what was asked for, its numbers and its
   versions. Under 900px it slides over the chat. ---- */
.main { --chat-side-w: clamp(340px, 31vw, 440px); }
.main[data-screen="chat"].made-open { padding-right: var(--chat-side-w); }
.chat-side { position: absolute; top: 0; right: 0; bottom: 0; z-index: 40; display: flex; flex-direction: column; width: var(--chat-side-w); border-left: 1px solid #dfe5ed; background: linear-gradient(165deg, #fbfcfd 3%, #f3f5f8 72%, #eef1f5); box-shadow: inset 1px 0 0 #fff, -10px 0 30px -22px #1e282a3d; font-family: 'Outfit', sans-serif; color: #303740; transform: translateX(100%); visibility: hidden; transition: transform .22s ease-out, visibility 0s linear .22s; }
.chat-side[hidden], .main:not([data-screen="chat"]) .chat-side { display: none; }
.main.made-open .chat-side { transform: none; visibility: visible; transition: transform .22s ease-out; }
.chat-side .rail-h { padding-right: 12px; }
.cs-x { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-left: auto; padding: 0; border: 0; border-radius: 7px; background: none; color: #6e7885; cursor: pointer; }
.cs-x:hover { background: #e8eef8; color: #145dfb; }
.chat-side .rail-b { flex: 1; min-height: 0; padding: 2px 16px 18px; overflow-y: auto; overscroll-behavior: contain; }
.cs-back { display: inline-flex; align-items: center; gap: 4px; margin: 14px 0 0; padding: 0; border: 0; background: none; font: 500 11px/1 'Outfit', sans-serif; color: #145dfb; cursor: pointer; }
.cs-item { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.cs-item .mk-th { width: 52px; height: 46px; }
.cs-item > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cs-item b { font-size: 15px; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; text-transform: capitalize; overflow-wrap: anywhere; }
.cs-item small { font-size: 10.5px; color: #6e7885; }
.cs-ask { margin: 12px 0 0; padding: 9px 11px; border: 1px solid #ffffffb3; border-radius: 8px; background: #ffffff9c; box-shadow: 0 1px 2px #26354706; font-size: 12px; line-height: 1.4; color: #303740; }
.cs-ask small { display: block; margin-bottom: 2px; font-size: 10px; color: #6e7885; }
.cs-h { margin: 20px 0 6px; font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: #8a939d; }
.chat-side .mk-vs { margin: 0 0 4px 6px; }
.cs-acts { display: flex; gap: 6px; margin-top: 12px; }
.cs-act { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid #dce3eb; border-radius: 7px; background: #f7f9fb; font: 500 11.5px/1 'Outfit', sans-serif; color: #303740; text-decoration: none; cursor: pointer; }
.cs-act:hover { border-color: #d6e2f8; background: #eff5ff; color: #145dfb; text-decoration: none; }
.cs-act.is-primary { border-color: #145dfb; background: #145dfb; color: #fff; }
.cs-act.is-primary:hover { background: #0f52e6; color: #fff; }
.cs-pic { display: block; width: 100%; max-height: 300px; margin-top: 12px; object-fit: contain; border: 1px solid #e1e6ed; border-radius: 8px; background: #fff; }
.cs-note { margin: 0; font-size: 11px; color: #6e7885; }
@media (max-width: 1100px) { .main { --chat-side-w: 320px; } }
@media (max-width: 900px) {
  .main[data-screen="chat"].made-open { padding-right: 0; }
  .chat-side { width: min(420px, calc(100% - 28px)); box-shadow: -18px 0 40px -14px #1e282a4d; }
}
@media (prefers-reduced-motion: reduce) { .chat-side, .main.made-open .chat-side { transition: none; } }

/* ---- The menu on a chat or a folder, in V4's popover look: rows of one height, each with its mark, a quiet rule
   before Delete; "Move to folder" opens the folders in place, with a way back ---- */
.chat-menu { position: absolute; right: 4px; top: 36px; z-index: 20; width: 224px; padding: 5px; border: 1px solid #e3e8ef; border-radius: 10px; background: #fff; box-shadow: 0 14px 30px -10px #1e2d4033, 0 2px 6px #1e2d4010; font-family: 'Outfit', sans-serif; }
.chat-menu button, .chats li.chat-row > .chat-menu button { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 9px; border: 0; border-radius: 6px; background: none; font: 400 13px/1 'Outfit', sans-serif; color: #303740; text-align: left; cursor: pointer; }
.chats li.chat-row > .chat-menu button::before { display: none; }
.chat-menu button > .ic { flex: none; color: #6e7885; }
.chat-menu button:hover, .chat-menu button:focus-visible { background: #f1f4f8; outline: none; }
.chat-menu button > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-menu button .cm-end { margin-left: auto; color: #a7b0bc; }
.chat-menu button[aria-current="true"] .cm-end { color: #145dfb; }
.chat-menu button.danger, .chat-menu button.danger > .ic { color: #c8341f; }
.chat-menu button.danger:hover { background: #fdf1ef; }
.chat-menu-rule { margin: 5px 4px; border-top: 1px solid #edf0f4; }
.chat-menu .cm-h { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; font-size: 11px; color: #6e7885; }
.chat-menu .cm-h button, .chats li.chat-row > .chat-menu .cm-h button { flex: none; width: 24px; height: 24px; margin-left: -4px; padding: 0; justify-content: center; color: #6e7885; }
.chat-menu .cm-h button > .ic { transform: none; }
.chat-menu .cm-none { padding: 6px 9px; font-size: 12px; color: #8a939d; }

/* ---- The app's own dialog, in place of the browser's alert, confirm and prompt: V4's glass dialog, a title, a line
   on what will happen, a field when something is named, Cancel and the action ---- */
.v4-dialog.v4-ask { width: min(420px, calc(100vw - 32px)); }
.ask-f { display: flex; flex-direction: column; padding: 22px 22px 18px; font-family: 'Outfit', sans-serif; }
.ask-t { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: -.015em; color: #1f2937; }
.ask-p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: #5b6573; overflow-wrap: anywhere; }
.ask-l { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; font-size: 12px; color: #5b6573; }
.ask-in { height: 40px; padding: 0 12px; border: 1px solid #d9e0e8; border-radius: 8px; background: #fff; font: 400 14px/1 'Outfit', sans-serif; color: #1f2937; outline: none; transition: border-color .15s, box-shadow .15s; }
.ask-in:focus { border-color: #145dfb; box-shadow: 0 0 0 3px #145dfb24; }
.ask-in::placeholder { color: #a7b0bc; }
.ask-b { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.ask-btn { height: 36px; padding: 0 16px; border: 1px solid #dce3eb; border-radius: 8px; background: #fff; font: 500 13px/1 'Outfit', sans-serif; color: #303740; cursor: pointer; }
.ask-btn:hover { background: #f4f6f9; }
.ask-btn.is-primary { border-color: #145dfb; background: #145dfb; color: #fff; }
.ask-btn.is-primary:hover { background: #0f52e6; }
.ask-btn.is-danger { border-color: #c8341f; background: #c8341f; }
.ask-btn.is-danger:hover { background: #b12d1a; }
.ask-btn:disabled { opacity: .45; cursor: default; }
.ask-btn:focus-visible { outline: 2px solid #145dfb; outline-offset: 2px; }

/* a short notice when something did not work, at the foot of the window, gone after a few seconds */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 400; max-width: min(460px, calc(100vw - 32px)); padding: 11px 16px; border: 1px solid #ffffffd9; border-radius: 10px; background: #1f2937f2; font: 400 13px/1.45 'Outfit', sans-serif; color: #fff; box-shadow: 0 12px 30px -10px #0f172a66; opacity: 0; pointer-events: none; transform: translate(-50%, 8px); transition: opacity .18s, transform .18s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* the sidebar stays: on a wide screen it cannot be put away (its width can still be dragged); on a phone it is a menu
   that this button closes */
@media (min-width: 901px) { .side-collapse { display: none; } }

/* ---- Under the message box, as in Claude: how much of this week's usage is spent; it opens Plans and usage ---- */
.composer:has(+ .comp-usage:not([hidden])) { margin-bottom: 8px; }
.comp-usage { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; width: min(var(--col), calc(100% - 48px)); margin: 0 auto 12px; font: 400 11.5px/1 'Outfit', sans-serif; color: #8a939d; text-decoration: none; }
.comp-usage[hidden], .main:not([data-screen="new"]):not([data-screen="chat"]) .comp-usage { display: none; }
.comp-usage:hover { color: #145dfb; text-decoration: none; }
.cu-bar { display: block; width: 44px; height: 4px; overflow: hidden; border-radius: 2px; background: #e2e7ee; }
.cu-bar > i { display: block; height: 100%; border-radius: 2px; background: #145dfb; }
.comp-usage.is-high .cu-bar > i { background: #d97706; }
@media (max-width: 900px) { .comp-usage { margin-bottom: calc(8px + env(safe-area-inset-bottom)); } }

/* ---- Voice: the microphone beside Send. Listening, it turns blue and breathes, and the box is edged in blue ---- */
.mic-btn { display: grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 0; border: 1px solid #e4e9ef; border-radius: 7px; background: #fff; color: #5b6573; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.mic-btn[hidden] { display: none; }
.mic-btn:hover { border-color: #cadbff; background: #eff5ff; color: #145dfb; }
.mic-btn.is-on { border-color: #145dfb; background: #145dfb; color: #fff; animation: mic-breathe 1.6s ease-in-out infinite; }
@keyframes mic-breathe { 0%, 100% { box-shadow: 0 0 0 0 #145dfb40; } 50% { box-shadow: 0 0 0 5px #145dfb1f; } }
.composer.is-listening { border-color: #9dbcfd; box-shadow: 0 0 0 3px #145dfb14; }
@media (pointer: coarse) { .mic-btn { width: 38px; height: 38px; } }
@media (prefers-reduced-motion: reduce) { .mic-btn.is-on { animation: none; } }

/* ---- Archived, not deleted: the notice's Undo, the sidebar's last line, the list of archived chats, and the bar
   on an archived chat ---- */
.toast { display: flex; align-items: center; gap: 14px; pointer-events: none; }
.toast.is-on { pointer-events: auto; }
.toast-act { flex: none; padding: 0; border: 0; background: none; font: 500 13px/1 'Outfit', sans-serif; color: #9ec0ff; cursor: pointer; }
.toast-act:hover { color: #fff; }
.sec-add[hidden] { display: none; }
.arch-list { display: flex; flex-direction: column; max-height: min(420px, 55vh); margin: 14px 0 0; padding: 0; overflow-y: auto; list-style: none; border-top: 1px solid #edf0f4; }
.arch-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #edf0f4; }
.arch-t { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; padding: 4px 6px; border: 0; border-radius: 6px; background: none; font: inherit; text-align: left; cursor: pointer; }
.arch-t:hover { background: #f1f4f8; }
.arch-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 400; color: #303740; }
.arch-t small { font-size: 11px; color: #8a939d; }
.ask-btn.arch-r { flex: none; height: 30px; padding: 0 12px; font-size: 12px; }
.arch-x { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: none; color: #8a939d; cursor: pointer; }
.arch-x:hover { background: #fdf1ef; color: #c8341f; }
.arch-list .arch-none { justify-content: center; padding: 18px 0; font-size: 12.5px; color: #8a939d; border: 0; }
.arch-bar { position: sticky; top: 12px; z-index: 5; display: flex; align-items: center; gap: 9px; width: min(var(--col), calc(100% - 48px)); margin: 12px auto 0; padding: 9px 12px; border: 1px solid #e3e8ef; border-radius: 10px; background: #fbfcfdf2; font: 400 12.5px/1.3 'Outfit', sans-serif; color: #5b6573; box-shadow: 0 1px 3px #1e2d4010; }
.arch-bar[hidden] { display: none; }
.arch-bar .ic { flex: none; color: #8a939d; }
.arch-bar span { flex: 1; min-width: 0; }
.arch-bar button { flex: none; height: 28px; padding: 0 12px; border: 1px solid #145dfb; border-radius: 7px; background: #145dfb; font: 500 12px/1 'Outfit', sans-serif; color: #fff; cursor: pointer; }
.arch-bar button:hover { background: #0f52e6; }

/* ---- The model picker, opening up from the box as an AI app's does: a glass card, each model's name with the plan it
   comes with in blue capitals (as on the plan cards), one quiet line under it, the chosen one tinted with a check, and
   a way to compare plans at the foot ---- */
.effort-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px 0 11px; border: 0; border-radius: 7px; background: none; font: 500 12.5px/1 'Outfit', sans-serif; color: #303740; cursor: pointer; transition: background-color .15s; }
.effort-btn .ic { transform: rotate(90deg); color: #8a939d; transition: transform .15s; }
.effort-btn:hover, .effort-btn[aria-expanded="true"] { background: #eef2f7; }
.effort-btn[aria-expanded="true"] .ic { transform: rotate(-90deg); }
.effort.effort-menu { position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 30; display: flex; flex-direction: column; gap: 2px; width: 292px; padding: 6px; border: 1px solid #e3e8ef; border-radius: 14px; background: #fffffff7; -webkit-backdrop-filter: blur(18px) saturate(1.1); backdrop-filter: blur(18px) saturate(1.1); box-shadow: 0 22px 48px -18px #1e2d4047, 0 4px 12px -4px #1e2d401a, inset 0 1px 0 #fff; transform-origin: bottom right; animation: em-in .16s ease-out; }
.effort.effort-menu[hidden] { display: none; }
@keyframes em-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.em-h { padding: 8px 12px 6px; font: 500 10.5px/1 'Outfit', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8a939d; }
.effort.effort-menu button { display: grid; grid-template-columns: minmax(0, 1fr) 18px; align-items: center; gap: 12px; width: 100%; height: auto; min-height: 54px; padding: 9px 12px; border: 0; border-radius: 9px; background: none; box-shadow: none; font-family: 'Outfit', sans-serif; text-align: left; color: #1f2937; cursor: pointer; transition: background-color .12s; }
.effort.effort-menu button:hover, .effort.effort-menu button:focus-visible { background: #f3f6fa; outline: none; }
.effort.effort-menu button[aria-checked="true"] { background: #f1f6ff; box-shadow: none; }
.em-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.em-t b { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; letter-spacing: -.01em; color: #1f2937; }
.em-t b > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-tag { flex: none; padding: 3px 5px 2px; border: 1px solid #d6e3ff; border-radius: 4px; background: #eef4ff; font: 600 9px/1 'Outfit', sans-serif; font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: #145dfb; }
.em-t small { font-size: 12px; color: #6e7885; }
.effort.effort-menu button .ok { visibility: hidden; color: #145dfb; }
.effort.effort-menu button[aria-checked="true"] .ok { visibility: visible; }
.effort.effort-menu button:disabled { opacity: .45; cursor: default; }
.em-foot { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 0; padding: 10px 12px 6px; border-top: 1px solid #edf0f4; font: 400 12px/1 'Outfit', sans-serif; color: #6e7885; text-decoration: none; }
.em-foot:hover { color: #145dfb; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .effort.effort-menu { animation: none; } .effort-btn .ic { transition: none; } }


/* ---- The panel beside a chat, laid out as Claude's panel beside a session: a few rows for the chat's settings, then
   sections under plain headings (Context with its meter, Outputs, Data, Background tasks), rows of one height with a
   mark, a name and a quiet value at the right, rules between sections ---- */
.chat-side .rail-b { padding: 6px 14px 22px; }
.chat-side .rail-tt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-top { padding: 6px 0 10px; }
.cs-row { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; margin: 0; padding: 0 8px; border: 0; border-radius: 8px; background: none; font: 400 13.5px/1.25 'Outfit', sans-serif; color: #303740; text-align: left; text-decoration: none; }
button.cs-row, a.cs-row { cursor: pointer; }
button.cs-row:hover, a.cs-row:hover, button.cs-row:focus-visible, a.cs-row:focus-visible { background: #e9eef5; color: #303740; text-decoration: none; outline: none; }
.cs-row > .ic { flex: none; color: #6e7885; }
.cs-row .cs-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-row .cs-l::first-letter { text-transform: uppercase; }
.cs-row em { flex: none; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; font-size: 12.5px; color: #8a939d; font-variant-numeric: tabular-nums; }
.cs-row .cs-link { color: #6e7885; }
button.cs-row:hover .cs-link { color: #145dfb; }
.cs-row > .ic:last-child:not(:first-child) { color: #a7b0bc; transition: transform .15s; }
.cs-row[aria-expanded="true"] > .ic:last-child:not(:first-child) { transform: rotate(90deg); }
.cs-sec { padding: 14px 0 8px; border-top: 1px solid #e3e8ef; }
.cs-sh { display: flex; align-items: center; gap: 6px; width: 100%; margin: 0 0 6px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; font: 500 13.5px/1.2 'Outfit', sans-serif; letter-spacing: -.005em; color: #1f2937; text-align: left; }
.cs-sh > em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 400; color: #8a939d; }
.cs-sh.is-btn { margin-bottom: 0; cursor: pointer; }
.cs-sh.is-btn:hover { background: #e9eef5; }
.cs-sh.is-btn > .ic { color: #8a939d; transition: transform .15s; }
.cs-sh.is-btn[aria-expanded="true"] > .ic { transform: rotate(90deg); }
.cs-meter { display: inline-flex; align-items: center; gap: 9px; margin-left: auto; }
.cs-meter em { font-style: normal; font-size: 12.5px; font-weight: 400; color: #6e7885; font-variant-numeric: tabular-nums; }
.cs-bar { display: block; width: 40px; height: 8px; overflow: hidden; border-radius: 4px; background: #e2e7ee; }
.cs-bar > i { display: block; min-width: 8px; height: 100%; border-radius: 4px; background: #145dfb; }
.cs-ctx { margin: 6px 8px 4px; padding: 10px 12px; border: 1px solid #ffffffb3; border-radius: 9px; background: #ffffffa6; font-size: 12px; color: #5b6573; }
.cs-ctx p { margin: 0 0 8px; line-height: 1.45; }
.cs-ctx dl { display: grid; gap: 6px; margin: 0; }
.cs-ctx dl > div { display: flex; justify-content: space-between; gap: 12px; }
.cs-ctx dt { color: #8a939d; }
.cs-ctx dd { margin: 0; text-align: right; color: #303740; overflow-wrap: anywhere; }
.cs-none { margin: 2px 8px 6px; font-size: 12.5px; color: #8a939d; }
.cs-none:empty { display: none; }
.cs-more { display: block; margin: 2px 0 0; padding: 6px 8px; border: 0; background: none; font: 400 13px/1 'Outfit', sans-serif; color: #6e7885; cursor: pointer; }
.cs-more:hover { color: #145dfb; }
.cs-row.is-live { gap: 11px; }
.cs-spin { flex: none; width: 14px; height: 14px; margin: 0 1px; border: 2px solid #c9d8f8; border-top-color: #145dfb; border-radius: 50%; animation: cs-spin .8s linear infinite; }
@keyframes cs-spin { to { transform: rotate(360deg); } }
.cs-stop { flex: none; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: #1f2937; color: #fff; cursor: pointer; }
.cs-stop:hover { background: #c8341f; }
.cs-replies { margin: 2px 0 4px 35px; padding: 0 0 0 12px; border-left: 1px solid #dfe5ed; list-style: none; }
.cs-replies li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px 5px 0; font-size: 12.5px; color: #303740; }
.cs-replies em { font-style: normal; color: #8a939d; font-variant-numeric: tabular-nums; white-space: nowrap; }
.arch-t.is-text { cursor: default; }
.arch-t.is-text:hover { background: none; }
.arch-t.is-text b { white-space: normal; line-height: 1.4; }
@media (prefers-reduced-motion: reduce) { .cs-spin { animation-duration: 2.4s; } }
