/* Simulated browser runs (assets/js/browser.js): dark browser chrome, light fictional portals inside. */
.bx { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.bx-win { position: relative; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: #0d1219; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.bx-top { display: flex; align-items: center; gap: 12px; padding: 8px 12px 0; background: #121923; }
.bx-dots { display: flex; gap: 6px; } .bx-dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a4656; }
.bx-dots i:nth-child(1) { background: #ff5f57; } .bx-dots i:nth-child(2) { background: #febc2e; } .bx-dots i:nth-child(3) { background: #28c840; }
.bx-tabs { display: flex; gap: 4px; flex: 1; min-width: 0; }
.bx-tabs span { font-size: 12.5px; color: var(--muted); padding: 7px 14px; border-radius: 9px 9px 0 0; background: rgba(255,255,255,.03); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bx-tabs span.on { background: #1a2330; color: var(--text); }
.bx-speed { font: 600 12px var(--mono); color: #04222b; background: var(--cyan); border-radius: 6px; padding: 3px 8px; margin-bottom: 6px; }
.bx-url { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: #1a2330; color: var(--muted); border-bottom: 1px solid var(--line); }
.bx-addr { flex: 1; min-width: 0; font: 12.5px var(--mono); color: #c9d4e3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(0,0,0,.25); padding: 4px 10px; border-radius: 6px; }
.bx-drive { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cyan); white-space: nowrap; }
.bx-drive i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: bxPulse 1.4s ease-in-out infinite; }
.bx.finished .bx-drive { color: var(--green); } .bx.finished .bx-drive i { background: var(--green); box-shadow: none; animation: none; }
@keyframes bxPulse { 50% { opacity: .35; } }
.bx-vp { position: relative; overflow: hidden; background: #f4f6f9; }
.bx-view { position: absolute; left: 0; top: 0; width: 960px; height: 560px; transform-origin: 0 0; overflow: hidden; color: #1b2430; font: 14px/1.45 var(--sans); }
.bx-page { position: absolute; inset: 0; transition: opacity .25s; }
.bx-page.swap { opacity: 0; }
.bx-view a { color: inherit; text-decoration: none; }

/* agent cursor, toast, notes, approval */
.bx-cursor { position: absolute; left: 0; top: 0; z-index: 5; display: flex; align-items: flex-start; opacity: 0; transform: translate(480px, 280px); transition: transform .6s cubic-bezier(.3,.7,.2,1), opacity .3s; pointer-events: none; }
.bx-cursor.on { opacity: 1; }
.bx-cursor span { margin: 18px 0 0 -6px; font: 600 10.5px var(--mono); color: #04222b; background: var(--cyan); padding: 1px 6px; border-radius: 5px; }
.bx-cursor.down svg { transform: scale(.85); }
.bx-toast { position: absolute; left: 50%; bottom: 18px; z-index: 6; transform: translate(-50%, 20px); opacity: 0; background: #0f1722; color: #e8eef6; font-size: 13.5px; padding: 9px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: opacity .3s, transform .3s; white-space: nowrap; }
.bx-toast.on { opacity: 1; transform: translate(-50%, 0); }
.bx-note { position: absolute; right: 16px; top: 14px; z-index: 6; font: 600 12px var(--mono); color: #04222b; background: var(--cyan); padding: 4px 10px; border-radius: 6px; opacity: 0; transition: opacity .3s; }
.bx-note.on { opacity: 1; }
.bx-ask { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 7; display: none; gap: 6px; padding: 14px 16px; border-radius: 12px; background: #1b1508; border: 1px solid rgba(246,180,75,.55); color: #f5ead6; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.bx-ask.on { display: grid; animation: bxUp .35s ease both; }
.bx-ask p { margin: 0; font-size: 15px; font-weight: 600; }
.bx-ask div { display: flex; gap: 8px; }
.bx-ask-tag { font: 600 11px var(--mono); color: var(--amber); text-transform: uppercase; letter-spacing: .08em; }
@keyframes bxUp { from { opacity: 0; transform: translateY(10px); } }

/* fields shared by all portals */
.bx-in { position: relative; min-height: 36px; border: 1px solid #c9d2de; border-radius: 7px; background: #fff; padding: 7px 10px; font-size: 14px; color: #1b2430; transition: border-color .2s, box-shadow .2s; }
.bx-in .ph { color: #98a3b3; } .bx-in.filled .ph, .bx-in.focus .ph { display: none; }
.bx-in.focus { border-color: #2f6db3; box-shadow: 0 0 0 3px rgba(47,109,179,.18); }
.bx-in.focus .v::after { content: ""; display: inline-block; width: 1px; height: 15px; background: #1b2430; margin-left: 1px; vertical-align: -2px; animation: bxPulse 1s steps(1) infinite; }
.bx-in.pii .v, .pii .v { filter: blur(4.5px); }
.pressed { transform: translateY(1px); filter: brightness(.92); }
.hl { outline: 2px solid #f28c28; outline-offset: 1px; background: #fff4e6 !important; }
.waiting { animation: bxWait 1.2s ease-in-out infinite; }
@keyframes bxWait { 50% { box-shadow: 0 0 0 5px rgba(246,180,75,.35); } }

/* TerminalLink (fictional terminal operator) */
.tl { position: absolute; inset: 0; }
.tl-login { display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.tl-art { background: linear-gradient(160deg, #0f2742, #173a5e); color: #d7e3f1; padding: 34px 36px; display: flex; flex-direction: column; justify-content: space-between; }
.tl-brand { display: flex; align-items: center; gap: 10px; }
.tl-brand i { width: 26px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #f28c28 50%, #ffb35c 50%); }
.tl-brand b { font-size: 17px; color: #fff; }
.tl-port { width: 100%; }
.tl-art p { margin: 0; font-size: 14px; color: #a9bdd3; }
.tl-form { padding: 70px 56px; display: flex; flex-direction: column; gap: 8px; }
.tl-form h3 { font-size: 24px; margin: 0 0 14px; color: #0f2742; font-family: var(--sans); letter-spacing: -.01em; }
.tl-form label { font-size: 13px; color: #4a5768; margin-top: 6px; }
.tl-sub { margin: -6px 0 10px; color: #4a5768; }
.tl-form [data-k="code"] { font: 600 22px var(--mono); letter-spacing: .1em; text-align: center; }
.chk { display: flex; align-items: center; gap: 8px; color: #4a5768; font-size: 13px; margin: 8px 0; }
.chk i { width: 15px; height: 15px; border-radius: 4px; background: #2f6db3; }
.tl-btn { font: 600 14px var(--sans); border: 0; border-radius: 8px; padding: 10px 16px; background: #f28c28; color: #fff; cursor: default; }
.tl-btn.sm { padding: 8px 14px; } .tl-btn.ghost { background: #fff; color: #0f2742; border: 1px solid #c9d2de; }
.tl-a { font-size: 13px; color: #2f6db3; margin-top: 4px; }
.tl-app { background: #f4f6f9; display: flex; flex-direction: column; }
.tl-nav { display: flex; align-items: center; gap: 26px; padding: 12px 22px; background: #0f2742; color: #c9d7e8; }
.tl-nav nav { display: flex; gap: 18px; font-size: 13.5px; } .tl-nav nav a.on { color: #fff; border-bottom: 2px solid #f28c28; padding-bottom: 3px; }
.tl-user { margin-left: auto; font-size: 12.5px; }
.tl-main { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.tl-main h3 { margin: 0; font: 600 21px var(--sans); color: #0f2742; }
.tl-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; max-width: 620px; }
.tl-chips { display: flex; gap: 6px; } .tl-chips span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #e3e9f1; color: #34445a; }
.tl-results { background: #fff; border: 1px solid #dde3ec; border-radius: 10px; min-height: 260px; padding: 14px; }
.tl-empty { color: #7a8697; margin: 90px 0; text-align: center; }
.tl-sum { display: flex; gap: 12px; align-items: stretch; margin-bottom: 12px; }
.tl-sum > div { border: 1px solid #e3e8ef; border-radius: 8px; padding: 8px 12px; } .tl-sum span { display: block; font-size: 11.5px; color: #6b778a; } .tl-sum b { font-size: 15px; color: #0f2742; }
.tl-sum button { margin-left: auto; align-self: center; }
.tl-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tl-table th { text-align: left; font-size: 11.5px; color: #6b778a; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid #e3e8ef; }
.tl-table td { padding: 8px; border-bottom: 1px solid #eef1f5; }

/* ProviderGate (fictional health plan) */
.pp { position: absolute; inset: 0; }
.pp-login { display: grid; place-items: center; background: radial-gradient(circle at 20% 20%, #d7f0ec, #eef5f8 60%); }
.pp-card { width: 380px; background: #fff; border-radius: 14px; padding: 28px; box-shadow: 0 20px 50px rgba(15,118,110,.15); display: flex; flex-direction: column; gap: 8px; }
.pp-brand { display: flex; align-items: center; gap: 9px; } .pp-brand i { width: 24px; height: 24px; border-radius: 50%; background: conic-gradient(#0f766e 0 70%, #5eead4 0); }
.pp-brand b { color: #0f3d3a; font-size: 15px; } .pp-brand span { font-size: 12px; color: #0f766e; background: #ccfbf1; padding: 1px 8px; border-radius: 999px; }
.pp-card h3 { margin: 12px 0 6px; font: 600 21px var(--sans); color: #0f3d3a; }
.pp label { font-size: 12.5px; color: #4a5a68; margin-top: 4px; }
.pp-btn { font: 600 14px var(--sans); border: 0; border-radius: 8px; padding: 10px 16px; background: #0f766e; color: #fff; margin-top: 10px; }
.pp-fine { font-size: 12px; color: #6b7a88; }
.pp-app { background: #f3f7f8; display: flex; flex-direction: column; }
.pp-nav { display: flex; align-items: center; gap: 26px; padding: 12px 22px; background: #fff; border-bottom: 1px solid #dde7ea; }
.pp-nav nav { display: flex; gap: 18px; font-size: 13.5px; color: #4a5a68; } .pp-nav nav a.on { color: #0f766e; font-weight: 600; }
.pp-user { margin-left: auto; font-size: 12.5px; color: #4a5a68; }
.pp-main { padding: 18px 26px; }
.pp-main h3 { margin: 0 0 12px; font: 600 20px var(--sans); color: #0f3d3a; }
.pp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; background: #fff; border: 1px solid #dde7ea; border-radius: 12px; padding: 14px 16px; }
.pp-grid .w2 { grid-column: 1 / -1; } .pp-grid label { display: block; margin-bottom: 4px; }
.pp-drop { border: 1.5px dashed #9cc9c3; border-radius: 9px; padding: 10px; min-height: 48px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: #6b7a88; font-size: 13px; }
.pp-drop:has(.new) > span:first-child { display: none; }
.pp-actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.pp-result { margin-top: 8px; font-weight: 600; color: #0f766e; min-height: 1.4em; }

/* attachments (portal + mail) */
.pp-drop .new, .ml-att span { font-size: 12.5px; padding: 4px 10px 4px 26px; border-radius: 7px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 1h6l3 3v11H4z' fill='%23e5484d'/%3E%3C/svg%3E") 8px center / 13px no-repeat; border: 1px solid #d5dce6; color: #1b2430; }
.new { animation: bxUp .35s ease both; }

/* Mail (generic webmail) */
.ml { position: absolute; inset: 0; background: #fff; display: flex; flex-direction: column; }
.ml-top { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: center; padding: 10px 18px; border-bottom: 1px solid #e3e8ef; }
.ml-logo { font: 700 19px var(--sans); color: #2563eb; } .ml-top .bx-in { background: #eef2f7; border-color: transparent; border-radius: 999px; padding-left: 16px; }
.ml-me { font-size: 12.5px; color: #4a5768; }
.ml-body { flex: 1; display: grid; grid-template-columns: 140px 300px 1fr; min-height: 0; }
.ml-side { display: flex; flex-direction: column; padding: 10px; gap: 2px; font-size: 13.5px; color: #34445a; }
.ml-side a { padding: 6px 10px; border-radius: 0 999px 999px 0; display: flex; justify-content: space-between; } .ml-side a.on { background: #dbe7fe; color: #1d4ed8; font-weight: 600; }
.ml-list { list-style: none; margin: 0; padding: 0; border-left: 1px solid #eef1f5; border-right: 1px solid #eef1f5; overflow: hidden; }
.ml-list li { padding: 10px 14px; border-bottom: 1px solid #eef1f5; display: grid; gap: 1px; }
.ml-list li b { font-size: 13.5px; } .ml-list li span { font-size: 13px; color: #1b2430; } .ml-list li em { font-size: 12px; color: #6b778a; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-read { padding: 16px 20px; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.ml-empty { color: #8a95a6; margin: auto; }
.ml-msg h4 { margin: 0 0 6px; font: 600 18px var(--sans); }
.ml-from { margin: 0 0 8px; font-size: 12.5px; color: #4a5768; } .ml-msg p { margin: 0 0 8px; font-size: 13.5px; }
.ml-att { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.ml-acts { display: flex; gap: 8px; margin-top: 8px; } .ml-acts button, .ml-btn { font: 500 13px var(--sans); border: 1px solid #c9d2de; background: #fff; border-radius: 999px; padding: 6px 14px; }
.ml-compose { border: 1px solid #c9d6ec; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 8px 24px rgba(37,99,235,.08); }
.ml-hdr { margin: 0; font-size: 12.5px; color: #34445a; border-bottom: 1px solid #eef1f5; padding-bottom: 4px; } .ml-hdr span { color: #8a95a6; margin-right: 8px; }
.ml-text { min-height: 70px; font-size: 13.5px; line-height: 1.5; }
.ml-send { display: flex; align-items: center; gap: 10px; } .ml-btn { background: #2563eb; color: #fff; border-color: transparent; font-weight: 600; } .ml-fine { font-size: 12px; color: #8a95a6; }

/* side checklist */
.bx-side { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: rgba(255,255,255,.015); }
.bx-side h4 { margin: 0 0 10px; font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--cyan); }
.bx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: bx; }
.bx-list li { position: relative; padding: 9px 10px 9px 36px; border-radius: 9px; font-size: 14px; color: var(--dim); border: 1px solid transparent; transition: color .3s, background .3s, border-color .3s; }
.bx-list li::before { counter-increment: bx; content: counter(bx); position: absolute; left: 9px; top: 9px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2); font: 600 10.5px/16px var(--mono); text-align: center; color: var(--dim); }
.bx-list li.now { color: var(--text); background: rgba(88,214,240,.06); border-color: rgba(88,214,240,.25); }
.bx-list li.done { color: var(--text); }
.bx-list li.done::before { content: "✓"; background: var(--green); border-color: var(--green); color: #052012; }
.bx-clock { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.bx-clock b { font: 600 15px var(--mono); color: var(--text); }
.bx-fine { margin: 10px 0 0; font-size: 12px; color: var(--dim); }

@media (max-width: 1080px) { .bx { grid-template-columns: 1fr; } }
/* the approval sits outside the scaled viewport, so on phones it renders full size below the page */
@media (max-width: 640px) { .bx-ask { position: static; margin: 10px; } .bx-ask div { flex-wrap: wrap; } }
