/* ===========================================================
   The b2b page in MS-DOS mode (html.dos: the badge, ?dos, or a session
   already in text mode) — B2B SaaS as it would have shipped on a VGA card.

   The spirit stays: gradients everywhere, pills, glowing gradient text,
   the chat bubble, the toasts, the scroll reveals. Only the medium changes:
   the IBM VGA ROM font (dos.css) at whole pixels (16 / 32 / 48 px), the
   16 EGA colours, gradients as hard EGA bands, pills with staircase pixel
   corners, soft blurred shadows as hard black offsets, cards as text-mode
   windows. b2b.html and b2b.js are untouched.
   =========================================================== */

/* the badge: above the escape hatch, bottom right */
.b2b-badge.dos-badge { position: fixed; top: auto; right: 16px; bottom: 72px; z-index: 98; }
html.dos .b2b-badge { display: none; }

html.dos {
  /* every gradient, banded: EGA has no in-between */
  --dos-grad: linear-gradient(90deg, #5555ff 0 25%, #aa00aa 25% 50%, #ff55ff 50% 75%, #ff5555 75%);
  --dos-grad-d: linear-gradient(135deg, #0000aa 0 30%, #5555ff 30% 55%, #aa00aa 55% 80%, #ff55ff 80%);
  --dos-grad-v: linear-gradient(180deg, #000 0 34%, #0000aa 34% 67%, #000 67%);
  --dos-shadow: 8px 8px 0 #000;
  /* a pill, in pixels: two 4 px steps at every corner */
  --dos-pill: polygon(0 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px,
    calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px),
    calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%,
    8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px));
  --ink: #fff; --slate-600: #aaa; --slate-500: #aaa; --slate-400: #aaa; --slate-300: #aaa; --slate-200: #555;
  --slate-100: #0000aa; --slate-50: #000; --indigo: #55ffff; --indigo-600: #55ffff; --indigo-50: #0000aa;
  --violet: #ff55ff; --green-700: #55ff55; --green-100: #000; --amber-100: #000; --amber-700: #ffff55;
  --brand-grad: var(--dos-grad-d);
  --radius: 0;
}

/* ---- text mode ------------------------------------------- */
html.dos body {
  background: #000;
  color: #aaa;
  line-height: 1.25;
  -webkit-font-smoothing: none;
  font-synthesis: none;
}
html.dos body :not(.mso):not(.escape):not(.dos-exit):not(.dos-exit *) {
  font-family: "IBM VGA 8x16", ui-monospace, monospace !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
/* whole pixels only: everything 16 px, headings 32, the hero 48 */
html.dos body :not(.mso):not(h1):not(h2):not(h1 *):not(h2 *):not(.k-val):not(.price-amt):not(.n):not(.manifesto-line):not(.manifesto-line *):not(.escape):not(.dos-exit):not(.dos-exit *) { font-size: 16px !important; }
html.dos h1 { font-size: 48px !important; line-height: 1.17 !important; }
html.dos h2, html.dos .k-val, html.dos .price-amt, html.dos .orbital-grid .n { font-size: 32px !important; line-height: 1.25 !important; }
/* the manifesto: as big as the VGA font goes and then some — 6x, still whole pixels */
html.dos .manifesto-line, html.dos .manifesto-line span { font-size: 96px !important; line-height: 1.17 !important; }
html.dos .manifesto-line { max-width: none; }
html.dos .manifesto-line span.on { color: #fff; }
html.dos .manifesto-line span:last-child.on { background: var(--dos-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 900px) { html.dos .manifesto-line, html.dos .manifesto-line span { font-size: 64px !important; } }
@media (max-width: 560px) {
  html.dos h1 { font-size: 32px !important; }
  html.dos .manifesto-line, html.dos .manifesto-line span { font-size: 48px !important; }
}
html.dos h1, html.dos h2, html.dos h3 { color: #fff; }
html.dos ::selection { background: #aaa; color: #000; }
html.dos a:not(.escape) { color: #55ffff; }

/* gradient text: still a gradient, in four EGA bands */
html.dos :is(.grad-text, .orbital-grid .n, .price-amt) {
  background: var(--dos-grad) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* surfaces: black and blue; no blur, no soft shadow, no curve */
html.dos body * { border-radius: 0 !important; backdrop-filter: none !important; }
html.dos body *:not(.dos-exit):not(.escape) { box-shadow: none !important; }
html.dos .hdr { background: #0000aa !important; border-bottom: 4px double #aaa !important; }
html.dos .hero { background: var(--dos-grad-v) !important; }
html.dos .hero::before, html.dos .hero::after, html.dos .shotwrap::before { display: none !important; }
html.dos :is(.wall, .trust, .quote, .sec, .why, .faq, .final, .manifesto) { background: #000 !important; border-color: #555 !important; }
html.dos .band { background: #0000aa !important; }
html.dos .orbital { background: repeating-linear-gradient(180deg, #000 0 2px, #00002a 2px 4px) !important; }  /* scanlines, in orbit */
html.dos .ftr, html.dos .news-in { background: #0000aa !important; border-color: #aaa !important; color: #aaa; }

/* every card a text-mode window: blue, a double rule, a hard black shadow */
html.dos :is(.feat, .price, .q-card, .faq-list > *, .stack span, .float, .shot, .photo, .exit-card, .toast, .chat) {
  background: #0000aa !important;
  color: #aaa !important;
  border: 4px double #aaa !important;
  box-shadow: var(--dos-shadow) !important;
}
html.dos .shot .chrome { background: #aaa !important; color: #000 !important; border-bottom: 2px solid #000 !important; }
html.dos .shot :is(.side, .app-bar, .app, .app-main, .app-body) { background: #000 !important; color: #aaa !important; border-color: #555 !important; }
html.dos .shot .card { background: #0000aa !important; border: 2px solid #aaa !important; }
html.dos :is(.tbl th, .tbl td) { border-color: #555 !important; }
html.dos :is(.checks div, .price-list li, .road-t, .c-h, .feat p, .price-list, .q-card blockquote, .orbital-lede, .fine, .finer) { color: #aaa !important; }
html.dos .price { border-color: #ff55ff !important; }
html.dos .exit { background: rgba(0, 0, 0, .7) !important; }

/* the final call to action: the big gradient box, banded */
html.dos .final-in { background: var(--dos-grad-d) !important; box-shadow: var(--dos-shadow) !important; border: 4px double #fff !important; }
html.dos .final-in :is(h2, p) { color: #fff !important; }
html.dos .announce, html.dos .progress span { background: var(--dos-grad) !important; color: #fff !important; }

/* pills: still pills, in pixels */
html.dos :is(.b, .pill, .tag, .badge, .st, .chip-live, .price-flag, .chip-q) {
  clip-path: var(--dos-pill);
  border: 0 !important;
  padding-left: 16px !important; padding-right: 16px !important;
}
html.dos :is(.b-primary, .price-flag, .chip-live) { background: var(--dos-grad) !important; color: #fff !important; }
html.dos .b-ghost, html.dos .b-glass { background: #aaa !important; color: #000 !important; }
html.dos .b-white { background: #fff !important; color: #0000aa !important; }
html.dos :is(.pill, .tag, .badge, .chip-q) { background: #aaa !important; color: #000 !important; }
html.dos .st-ok { background: #00aa00 !important; color: #000 !important; }
html.dos .st-esc { background: #aa5500 !important; color: #000 !important; }
html.dos .b:hover { filter: brightness(1.3); transform: none; }

/* icon tiles and dots: flat EGA colours */
html.dos .ic-indigo { background: #5555ff !important; color: #fff !important; }
html.dos .ic-green  { background: #00aa00 !important; color: #fff !important; }
html.dos .ic-amber  { background: #aa5500 !important; color: #fff !important; }
html.dos .ic-sky    { background: #00aaaa !important; color: #fff !important; }
html.dos .ic-violet { background: #aa00aa !important; color: #fff !important; }
html.dos .ic-rose   { background: #aa0000 !important; color: #fff !important; }
html.dos :is(.avatar, .who .av, .dot) { background: var(--dos-grad-d) !important; }
html.dos .chat-dot { background: #55ff55 !important; }
html.dos :is(.chat-badge, .toast-live) { background: #ff5555 !important; animation: none !important; }
html.dos .donut { background: conic-gradient(#5555ff 0 78%, #ff55ff 78% 93%, #ffff55 93% 100%) !important; }
html.dos .road li::before { background: #55ffff !important; }
html.dos :is(.checks, .price-list) .mso { color: #55ff55 !important; }

/* pictures: a little coarser than life */
html.dos img { image-rendering: pixelated; filter: contrast(1.2) saturate(1.4); }
/* the render: its own 320 px, 16-colour EGA version (dos.js swaps it in), dithered */
html.dos img[data-dos-src] { filter: none; }

/* the way out: above the escape hatch, which keeps its own joke */
html.dos .dos-exit { bottom: 72px; }
@media (max-width: 560px) { html.dos .dos-exit { bottom: 64px; } }
