/* Roger mockups v2 — Cord look only. Tokens copied from the Cord prototype (p40 + live-dark):
 * light  bg #F2F2F7  ink #000  sub #8A8A8E  accent #0A84FF  card #fff     line #E5E5EA  soft #E9E9EE  radius 12px
 * dark   bg #1C1C1E  ink #fff  sub #8E8E93  accent #0A84FF  card #2C2C2E  line rgba(84,84,88,.65)  soft #3A3A3C */
.rdev { --r: 12px; --acc: #0A84FF; --acc-ink: #fff; --ok: #34C759; --warn: #FF9500; --danger: #FF3B30;
  --font: -apple-system, "SF Pro Text", Inter, system-ui, "Segoe UI", Roboto, sans-serif;
  position: relative; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.3;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
.rdev.light { --bg: #F2F2F7; --ink: #000; --sub: #8A8A8E; --card: #fff; --ln: #E5E5EA; --soft: #E9E9EE; --them: #E9E9EB; --bar: rgba(249,249,249,.94); --track: #E9E9EE; --sw: #D1D1D6; color-scheme: light; }
.rdev.dark  { --bg: #1C1C1E; --ink: #fff; --sub: #8E8E93; --card: #2C2C2E; --ln: rgba(84,84,88,.65); --soft: #3A3A3C; --them: #2C2C2E; --bar: rgba(28,28,30,.94); --track: #3A3A3C; --sw: #48484A; color-scheme: dark;
  --ok: #30D158; --warn: #FF9F0A; --danger: #FF453A; }
.rdev *, .rdev *::before, .rdev *::after { box-sizing: border-box; }
.rdev :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; -webkit-tap-highlight-color: transparent; }
.rdev :where(button):disabled { cursor: default; }
.rdev :where(input, textarea) { font: inherit; color: inherit; }
.rdev :where(h1, h2, h3, p, ul) { margin: 0; }
.rdev .ic { width: 22px; height: 22px; flex: none; }

.rdev.framed.k-phone { border-radius: 46px; box-shadow: 0 0 0 9px #0b0b0c, 0 30px 70px -20px rgba(0,0,0,.35); }
.rdev.framed.k-desktop { border-radius: 12px; box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 30px 70px -24px rgba(0,0,0,.3); }
.rdev.dark.framed.k-desktop { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 30px 70px -24px rgba(0,0,0,.6); }

.app { position: absolute; inset: 0; display: flex; flex-direction: column; }
.sbar { height: 46px; flex: none; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 30px 6px; font-size: 15px; font-weight: 600; }
.sb-i { display: flex; gap: 5px; } .sb-i .ic { width: 17px; height: 17px; }
.page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.bare.k-phone .page { padding-top: max(env(safe-area-inset-top), 8px); }
.scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 28px; -webkit-overflow-scrolling: touch; }

/* large title */
.lt { padding: 8px 20px 10px; flex: none; }
.lt-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.lt h1 { font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.lt p { color: var(--sub); font-size: 15px; margin-top: 2px; }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--acc); font-size: 17px; margin: 0 0 6px -8px; padding: 4px 8px 4px 2px; }
.back .ic { width: 24px; height: 24px; }
.ib { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--acc); flex: none; }
.ib.sm { width: 32px; height: 32px; color: var(--sub); } .ib.sm .ic { width: 20px; height: 20px; }
.ib.acc { background: var(--acc); color: #fff; }
.ib-sp { width: 38px; flex: none; }

/* groups + rows */
.gh { font-size: 13px; font-weight: 600; color: var(--sub); margin: 26px 6px 8px; }
.group { background: var(--card); border-radius: var(--r); overflow: hidden; }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 16px; }
.row + .row { border-top: .5px solid var(--ln); }
.row-main { flex: 1; min-width: 0; }
.row-main b { display: block; font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main b.wrap { white-space: normal; line-height: 1.3; }
.row-main small { display: block; color: var(--sub); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main b.wrap + small { white-space: normal; }
.row-val { color: var(--sub); font-size: 15px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.row .chev { width: 16px; height: 16px; color: var(--sub); opacity: .6; }
.row .tick { color: var(--acc); }
.row .ok { color: var(--ok); width: 20px; height: 20px; }
.thread { min-height: 66px; }
.thread.sel { background: color-mix(in srgb, var(--acc) 12%, var(--card)); }
.av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--sub); font-size: 18px; font-weight: 600; flex: none; }
.av.roger { background: var(--acc); color: #fff; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; align-self: flex-start; padding-top: 4px; }
.row-side em { font-style: normal; font-size: 13px; color: var(--sub); }
.row-side u { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); }
.ev-t { width: 46px; color: var(--sub); font-size: 15px; font-variant-numeric: tabular-nums; flex: none; }
.cb { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--sub); display: grid; place-items: center; flex: none; opacity: .8; }
.cb .ic { width: 14px; height: 14px; stroke-width: 3; }
.todo.done .cb { background: var(--acc); border-color: var(--acc); color: #fff; opacity: 1; }
.todo.done b { color: var(--sub); text-decoration: line-through; }
.foot { color: var(--sub); font-size: 13px; padding: 12px 8px; line-height: 1.4; }
.textbtn { display: block; margin: 22px auto 0; padding: 8px 14px; color: var(--acc); font-size: 15px; font-weight: 500; text-align: center !important; }
.textbtn.danger { color: var(--danger); }
.sw { width: 51px; height: 31px; border-radius: 99px; background: var(--sw); position: relative; flex: none; transition: background .2s; }
.sw i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: transform .2s; }
.sw.on { background: var(--ok); } .sw.on i { transform: translateX(20px); }

/* progress bars */
.bar { display: block; flex: 1; height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar.thin { height: 4px; margin-top: 7px; width: 150px; flex: none; }
.bar b { display: block; height: 100%; border-radius: 99px; background: var(--acc); transition: width 1.4s linear; }
.bar.st-stuck b { background: var(--warn); }
.bar.st-paused b, .bar.st-stopped b { background: var(--sub); opacity: .7; }
.bar.st-done b { background: var(--ok); }
.pct { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }

/* job card */
.job { background: var(--card); border-radius: 14px; padding: 14px 16px 14px; cursor: pointer; text-align: left; }
.job-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.job-name b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.job-name span { display: block; font-size: 13px; color: var(--sub); margin-top: 1px; }
.job-top .ib { margin: -6px -8px 0 0; }
.pg { display: flex; align-items: center; gap: 12px; margin: 12px 0 9px; }
.job-bot { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.jstep { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jeta { color: var(--sub); font-size: 13px; white-space: nowrap; align-self: center; }
.job.st-stuck .jstep { color: var(--warn); }
.job.st-paused .jstep, .job.st-stopped .jstep { color: var(--sub); }

/* working-on strip */
.strip { display: block; width: 100%; background: var(--card); border-radius: var(--r); padding: 11px 16px 13px; margin: 2px 0 6px; }
.strip-h { display: flex; justify-content: space-between; align-items: center; color: var(--sub); font-size: 13px; font-weight: 600; }
.strip-h .ic { width: 14px; height: 14px; opacity: .6; }
.sj { display: grid; grid-template-columns: minmax(0, 1fr) 74px 38px; align-items: center; gap: 10px; margin-top: 10px; }
.sj .sn { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sj .sn i { font-style: normal; color: var(--sub); font-size: 13px; font-weight: 400; margin-left: 6px; }
.sj .bar { height: 5px; } .sj .pct { font-size: 13px; color: var(--sub); min-width: 0; }

/* tab bar */
.tabs { flex: none; display: flex; padding: 6px 8px calc(6px + max(env(safe-area-inset-bottom), 0px)); background: var(--bar); border-top: .5px solid var(--ln); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.framed .tabs { padding-bottom: 22px; }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--sub); font-size: 10.5px; font-weight: 500; text-align: center !important; }
.tabs button .ic { width: 25px; height: 25px; }
.tabs button.on { color: var(--acc); }

/* chat */
.chead { display: flex; align-items: center; gap: 4px; padding: 4px 8px 6px; flex: none; }
.chead .back { margin: 0; padding: 6px 8px; }
.ctitle { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center !important; padding: 2px 0; min-width: 0; }
.ctitle b { font-size: 17px; font-weight: 600; }
.ctitle small { font-size: 12px; color: var(--acc); }
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; display: flex; flex-direction: column; }
.msg.me { align-self: flex-end; align-items: flex-end; } .msg.them { align-self: flex-start; }
.msg.wide { align-self: stretch; max-width: none; }
.bub { padding: 9px 14px; border-radius: 19px; font-size: 16px; line-height: 1.35; background: var(--them); }
.me .bub { background: var(--acc); color: #fff; border-bottom-right-radius: 6px; }
.them .bub { border-bottom-left-radius: 6px; }
.bub ul { margin-top: 6px; padding-left: 18px; } .bub li { margin: 2px 0; }
.bub.voice { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; }
.vplay { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; flex: none; }
.vplay .ic { width: 16px; height: 16px; }
.wave { display: flex; align-items: center; gap: 2.5px; height: 24px; } .wave i { display: block; width: 3px; border-radius: 2px; background: rgba(255,255,255,.85); }
.vdur { font-size: 13px; opacity: .9; font-variant-numeric: tabular-nums; }
.vtext { font-size: 12.5px; color: var(--sub); margin: 4px 6px 0; max-width: 260px; text-align: right; }
.typing { display: flex; gap: 4px; padding: 13px 14px; } .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--sub); opacity: .5; animation: bl 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bl { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }

.card { background: var(--card); border-radius: 14px; padding: 14px 16px; }
.ask b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.ask small { display: block; color: var(--sub); font-size: 13px; margin-top: 4px; }
.ask-btns { display: flex; gap: 10px; margin-top: 14px; } .ask-btns .btn { flex: 1; }
.ask-done { display: flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--ok); font-size: 15px; font-weight: 600; }
.ask-done .ic { width: 18px; height: 18px; stroke-width: 2.6; } .ask-done.no { color: var(--sub); }
.q-h { display: flex; justify-content: space-between; color: var(--sub); font-size: 13px; }
.q { display: block; font-size: 18px; font-weight: 600; margin: 8px 0 14px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { padding: 10px 16px; border-radius: 99px; background: var(--soft); font-size: 15px; font-weight: 500; transition: background .15s, color .15s; }
.opt:hover { background: var(--acc); color: #fff; }
.qa { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 15px; } .qa small { color: var(--sub); font-size: 14px; } .qa span { font-weight: 600; color: var(--acc); }
.card > b:first-child { display: block; font-size: 16px; font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: var(--r); background: var(--acc); color: #fff !important; font-size: 16px; font-weight: 600; text-align: center !important; }
.btn.quiet { background: var(--soft); color: var(--ink) !important; }
.btn.block { display: flex; width: 100%; height: 50px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 14px; }

/* composer + commands */
.composer { position: relative; flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px calc(10px + max(env(safe-area-inset-bottom), 0px)); }
.framed.k-phone .composer { padding-bottom: 22px; }
.cmd { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); color: var(--acc); font-size: 21px; font-weight: 600; display: grid; place-items: center; flex: none; text-align: center !important; }
.cmd.on { background: var(--acc); color: #fff; }
.field { flex: 1; display: flex; align-items: center; height: 40px; background: var(--card); border: .5px solid var(--ln); border-radius: 20px; padding: 0 4px 0 15px; min-width: 0; }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; }
.field input::placeholder { color: var(--sub); opacity: .8; }
.field [data-slot] { display: flex; }
.mic, .send { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.mic { color: var(--sub); } .mic .ic { width: 21px; height: 21px; }
.send { background: var(--acc); color: #fff; } .send .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.picker { position: absolute; left: 12px; right: 12px; bottom: 100%; margin-bottom: -2px; background: var(--card); border-radius: 16px; padding: 6px; box-shadow: 0 10px 34px rgba(0,0,0,.18), 0 0 0 .5px var(--ln); z-index: 5; max-height: 330px; overflow: auto; }
.rdev.dark .picker { background: #3A3A3C; }
.prow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 10px; }
.prow:hover { background: var(--soft); } .rdev.dark .prow:hover { background: #48484A; }
.prow .ic { color: var(--acc); width: 20px; height: 20px; }
.prow b { font-size: 15px; font-weight: 600; } .prow small { margin-left: auto; color: var(--sub); font-size: 13px; }
.none { padding: 14px; color: var(--sub); font-size: 14px; }
.rec { flex: 1; display: flex; align-items: center; gap: 10px; height: 44px; background: var(--card); border-radius: 22px; padding: 0 6px 0 16px; }
.rec b { font-variant-numeric: tabular-nums; font-size: 15px; } .rec-l { flex: 1; color: var(--sub); font-size: 14px; }
.rdot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: bl 1.2s infinite; }

/* sheets */
.scrim { position: absolute; inset: 0; background: rgba(0,0,0,.35); z-index: 20; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--card); border-radius: 24px 24px 0 0; padding: 8px 20px 22px; max-height: 88%; overflow-y: auto; box-shadow: 0 -12px 40px rgba(0,0,0,.18); }
.rdev.dark .sheet { background: #2C2C2E; }
.framed.k-phone .sheet { padding-bottom: 30px; }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--ln); margin: 0 auto 14px; }
.sheet-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sheet-h h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.sheet-h small { color: var(--sub); font-size: 14px; display: block; margin-top: 2px; }
.sheet-h .ib { margin: -2px -8px 0 0; }
.big { display: flex; align-items: baseline; gap: 12px; margin: 20px 0 10px; }
.big b { font-size: 42px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.big span { color: var(--sub); font-size: 15px; }
.sheet .pg { margin: 0; } .sheet .bar { height: 10px; }
.steps { list-style: none; padding: 0; margin: 20px 0 22px; }
.stp { display: flex; gap: 14px; align-items: flex-start; padding: 9px 0; font-size: 16px; }
.stp .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ln); display: grid; place-items: center; flex: none; margin-top: 0; }
.rdev.dark .stp .dot { border-color: #636366; }
.stp.done .dot { background: var(--acc); border-color: var(--acc); color: #fff; } .stp.done .dot .ic { width: 13px; height: 13px; stroke-width: 3.2; }
.stp.run .dot { border-color: var(--acc); box-shadow: inset 0 0 0 4px var(--card); background: var(--acc); }
.stp.todo { color: var(--sub); }
.sheet.menu { padding: 8px 14px 24px; }
.mi { display: block; width: 100%; padding: 15px 8px; text-align: center !important; font-size: 18px; color: var(--acc); }
.mi + .mi { border-top: .5px solid var(--ln); } .mi.danger { color: var(--danger); }
.sheet textarea { display: block; width: 100%; margin: 16px 0; padding: 12px 14px; border: 0; border-radius: var(--r); background: var(--soft); font-size: 16px; line-height: 1.4; resize: none; outline: none; }
.toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 40; background: rgba(30,30,32,.94); color: #fff; padding: 10px 16px; border-radius: 99px; font-size: 14px; font-weight: 600; white-space: nowrap; }

/* setup */
.ob { flex: 1; display: flex; flex-direction: column; padding: 16px 24px 30px; min-height: 0; }
.ob-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.ob-hero.top { justify-content: flex-start; padding-top: 50px; }
.ob-hero h1 { font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.ob-hero p { color: var(--sub); font-size: 17px; line-height: 1.4; max-width: 300px; } .ob-hero p b { color: var(--ink); }
.ob-logo { width: 88px; height: 88px; border-radius: 24px; background: var(--acc); color: #fff; display: grid; place-items: center; font-size: 46px; font-weight: 700; margin-bottom: 8px; }
.ob-logo.ok { background: var(--ok); } .ob-logo .ic { width: 44px; height: 44px; stroke-width: 2.6; }
.ob-hero .group { width: 100%; text-align: left; margin-top: 18px; }
.ob-foot { display: flex; flex-direction: column; gap: 6px; }
.framed.k-phone .ob { padding-bottom: 36px; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; } .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ln); } .dots i.on { background: var(--acc); }
.dlbar { text-align: center; } .dlbar .bar { height: 10px; margin-bottom: 10px; } .dlbar small { color: var(--sub); font-size: 14px; }
.ob-foot .textbtn { margin-top: 4px; }

/* desktop */
.app.dk { flex-direction: row; }
.rail { width: 84px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0; }
.rail-logo { width: 38px; height: 38px; border-radius: 11px; background: var(--acc); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 19px; margin-bottom: 14px; }
.rail button { width: 62px; padding: 9px 0 7px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--sub); font-size: 11px; font-weight: 500; text-align: center !important; }
.rail button:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.rail button.on { color: var(--acc); background: var(--card); }
.dk-split { flex: 1; min-width: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.dk-list { display: flex; flex-direction: column; min-height: 0; padding-top: 6px; }
.dk-chat { display: flex; flex-direction: column; min-height: 0; border-left: .5px solid var(--ln); }
.dk-chat .chead { padding: 10px 18px 6px; } .dk-chat .ctitle { align-items: flex-start; text-align: left !important; }
.dk-chat .msgs { padding: 12px 28px 16px; } .dk-chat .msg { max-width: 68%; } .dk-chat .msg.wide { align-self: flex-start; width: 460px; max-width: 80%; }
.dk-chat .composer { padding: 10px 24px 20px; } .dk-chat .picker { left: 24px; right: auto; width: 360px; }
.dk-page { flex: 1; min-width: 0; max-width: 720px; margin: 0 auto; width: 100%; padding-top: 18px; }
.dk-center { flex: 1; max-width: 440px; margin: 0 auto; }
.dk-page .lt h1 { font-size: 32px; }
.k-desktop .sheet { left: auto; top: 0; bottom: 0; right: 0; width: 420px; max-height: none; border-radius: 0; padding: 26px 26px 26px; box-shadow: -12px 0 40px rgba(0,0,0,.14); }
.k-desktop .sheet .grab { display: none; }
.k-desktop .sheet.menu { top: 50%; left: 50%; right: auto; bottom: auto; width: 320px; transform: translate(-50%, -50%); border-radius: 16px; padding: 6px 12px; }
.k-desktop .toast { bottom: 40px; }
.k-desktop .sj { grid-template-columns: minmax(0, 1fr) 52px 34px; gap: 8px; }
.k-desktop .sj .sn i { display: none; }
.k-desktop .ob { padding-top: 60px; }
