:root {
  --bg: #07090d; --bg2: #0d1117; --card: #121821; --card2: #18202b; --line: #232d3a;
  --text: #e8edf3; --muted: #8b98a8; --dim: #5d6b7c;
  --accent: #5eead4; --accent2: #38bdf8; --warn: #fbbf24; --bad: #f87171; --good: #4ade80; --violet: #a78bfa;
  --r: 14px; --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
body { background: radial-gradient(1200px 600px at 20% -10%, #0f2a2a55, transparent), radial-gradient(900px 500px at 100% 0%, #1b1f4a55, transparent), var(--bg); min-height: 100vh; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

.top { display: flex; align-items: center; gap: 14px; padding: 16px 28px; border-bottom: 1px solid #ffffff0d; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; font-size: 16px; }
.logo i { width: 26px; height: 26px; border-radius: 8px; background: conic-gradient(from 210deg, var(--accent), var(--accent2), var(--violet), var(--accent)); display: inline-block; box-shadow: 0 0 22px #5eead455; }
.pill { font-size: 11px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.demo { border-color: #fbbf2455; color: var(--warn); }
.top .sp { flex: 1; }
.top a.btn { padding: 7px 14px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); color: var(--text); }

.wrap { display: grid; grid-template-columns: 420px 1fr; gap: 28px; padding: 24px 28px 40px; max-width: 1360px; margin: 0 auto; align-items: start; }
@media (max-width: 980px) { .wrap { grid-template-columns: 1fr; justify-items: center; } .console { width: 100%; } }

/* phone */
.phone { width: 400px; height: 820px; border-radius: 54px; padding: 12px; background: linear-gradient(145deg, #2a313c, #0b0e13); box-shadow: 0 30px 80px #000c, inset 0 0 0 1px #ffffff14; position: sticky; top: 20px; }
@media (max-width: 440px) { .phone { width: 100%; height: 86vh; border-radius: 36px; padding: 8px; } }
.screen { position: relative; width: 100%; height: 100%; border-radius: 44px; overflow: hidden; background: var(--bg2); display: flex; flex-direction: column; }
.status { height: 46px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0; font-size: 13px; font-weight: 600; }
.island { width: 110px; height: 30px; background: #000; border-radius: 20px; }
.views { flex: 1; overflow: hidden; position: relative; }
.view { position: absolute; inset: 0; overflow-y: auto; padding: 6px 18px 24px; display: none; scrollbar-width: none; }
.view::-webkit-scrollbar { display: none; }
.view.on { display: block; }
.tabs { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 10px 22px; border-top: 1px solid #ffffff0f; background: #0b0f15ee; }
.tabs button { padding: 8px 0 4px; font-size: 11px; color: var(--dim); display: flex; flex-direction: column; align-items: center; gap: 5px; }
.tabs button b { width: 22px; height: 4px; border-radius: 4px; background: currentColor; opacity: .35; }
.tabs button.on { color: var(--accent); }
.tabs button.on b { opacity: 1; box-shadow: 0 0 10px var(--accent); }

h1.scr { font-size: 26px; line-height: 1.15; margin: 8px 0 4px; letter-spacing: -.4px; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--accent); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 10px 0; }
.card h3 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.card h3 small { margin-left: auto; color: var(--dim); font-weight: 400; font-size: 11px; }
.hero { background: linear-gradient(135deg, #0e3b3a, #12243f 60%, #241a45); border: 1px solid #5eead433; border-radius: 20px; padding: 16px; margin: 6px 0 12px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, #5eead433, transparent 70%); }
.hero .big { font-size: 20px; font-weight: 700; margin: 4px 0; }
.hero .meta { color: #b9c6d6; font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-p { width: 100%; padding: 12px; border-radius: 12px; font-weight: 650; background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #04161a; margin-top: 8px; }
.btn-p:disabled { opacity: .5; cursor: progress; }
.btn-s { padding: 8px 12px; border-radius: 10px; background: var(--card2); border: 1px solid var(--line); font-size: 12px; }
details.inputs summary { cursor: pointer; color: var(--muted); font-size: 12px; margin: 6px 0; }
details.inputs .grid2 { margin-top: 6px; }
label.f { font-size: 11px; color: var(--dim); display: block; margin-bottom: 3px; }

.tag { font-size: 10px; padding: 2px 7px; border-radius: 99px; background: #fbbf2418; color: var(--warn); border: 1px solid #fbbf2433; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; }
.tag.g { background: #4ade8018; color: var(--good); border-color: #4ade8033; }
.tag.b { background: #38bdf818; color: var(--accent2); border-color: #38bdf833; }
.tag.r { background: #f8717118; color: var(--bad); border-color: #f8717133; }
.opt { border-top: 1px solid var(--line); padding: 10px 0; }
.opt:first-of-type { border-top: 0; padding-top: 0; }
.opt .h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; font-weight: 600; }
.opt .h span:first-child { flex: 1 1 140px; min-width: 0; }
.opt .h span:last-child { color: var(--accent); white-space: nowrap; font-size: 12.5px; }
.opt p { margin: 3px 0; color: var(--muted); font-size: 12.5px; }
.opt .w { color: #fcd38d; font-size: 12px; }
.check { display: flex; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.check:first-of-type { border-top: 0; }
.check input { width: 16px; height: 16px; flex: none; margin-top: 2px; accent-color: var(--accent); }
.check small { display: block; color: var(--dim); font-size: 11.5px; }
.when { font-size: 10.5px; color: var(--violet); text-transform: uppercase; letter-spacing: .8px; margin: 10px 0 2px; font-weight: 600; }
ul.pts { margin: 6px 0; padding-left: 18px; color: #c9d3df; font-size: 13px; }
ul.pts li { margin: 4px 0; }
.nums { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nums span { background: #f8717114; border: 1px solid #f8717133; border-radius: 8px; padding: 4px 8px; font-size: 12px; }
.src { display: flex; flex-direction: column; gap: 4px; }
.src a { font-size: 12px; color: var(--accent2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src a::before { content: '↗ '; color: var(--dim); }
.bar { height: 8px; border-radius: 6px; background: var(--card2); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 6px; }
.bud { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 12.5px; margin: 7px 0; }
.bud .bar { grid-column: 1 / -1; height: 5px; }
.bud small { grid-column: 1 / -1; color: var(--dim); font-size: 11px; }
.place { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.place:first-of-type { border-top: 0; }
.place .ic { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #04161a; text-transform: uppercase; }
.place b { display: block; font-size: 13px; }
.place p { margin: 1px 0; color: var(--muted); font-size: 12px; }
.loading { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; padding: 14px 4px; }
.spin { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.err { color: var(--bad); font-size: 13px; padding: 10px; border: 1px solid #f8717144; border-radius: 10px; background: #f871710d; margin: 10px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chips button { font-size: 11.5px; padding: 6px 10px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); color: #c9d3df; text-align: left; }
.chips button:hover { border-color: var(--accent); }
.bubble { background: var(--card2); border-radius: 14px; padding: 10px 12px; margin: 8px 0; font-size: 13px; white-space: pre-wrap; }
.bubble.me { background: #0f3b3a; margin-left: 40px; }
.bubble .rt { font-size: 10px; color: var(--violet); text-transform: uppercase; letter-spacing: .8px; display: block; margin-bottom: 4px; }

/* intercom */
.ic-langs { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; }
.ic-langs .me { flex: 1; text-align: center; padding: 9px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-weight: 600; }
.ic-langs select { flex: 1; text-align: center; font-weight: 600; }
.mic { width: 120px; height: 120px; border-radius: 50%; margin: 10px auto 6px; display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: .5px;
  background: radial-gradient(circle at 35% 30%, #7ff3e0, #0ea5a0 60%, #0b5f63); color: #032; box-shadow: 0 0 0 10px #5eead414, 0 0 50px #5eead444; transition: transform .15s; }
.mic.live { background: radial-gradient(circle at 35% 30%, #fecaca, #ef4444 60%, #7f1d1d); color: #fff; box-shadow: 0 0 0 calc(10px + var(--lvl, 0) * 26px) #f8717122, 0 0 60px #f8717166; }
.mic:disabled { filter: grayscale(.7); opacity: .6; }
.ic-state { text-align: center; color: var(--muted); font-size: 12px; min-height: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; text-align: center; }
.stats b { display: block; font-size: 17px; font-family: var(--mono); }
.stats small { color: var(--dim); font-size: 10.5px; }
.tr { display: flex; flex-direction: column; gap: 6px; }
.tr .l { background: var(--card); border-radius: 12px; padding: 8px 10px; font-size: 13px; }
.tr .l small { display: block; font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .6px; }
.tr .l.out { background: #12243f; border: 1px solid #38bdf833; }
.banner { font-size: 12px; padding: 9px 11px; border-radius: 10px; background: #fbbf2412; border: 1px solid #fbbf2440; color: #fde68a; margin: 8px 0; }

/* sheet */
.sheet-bg { position: absolute; inset: 0; background: #000a; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 5; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto; background: #10151d; border-radius: 26px 26px 0 0; border-top: 1px solid #ffffff1c; padding: 10px 18px 26px; transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.9,.3,1); z-index: 6; }
.sheet.on { transform: none; }
.sheet-bg.on { opacity: 1; pointer-events: auto; }
.grab { width: 40px; height: 5px; background: #ffffff30; border-radius: 4px; margin: 0 auto 12px; }
.why { font-size: 13px; padding: 10px 12px; border-radius: 12px; background: #a78bfa14; border: 1px solid #a78bfa40; margin: 6px 0 12px; }
.tier { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 8px 0; background: var(--card); position: relative; }
.tier.cur { border-color: #5eead466; }
.tier.sug { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet), 0 10px 30px #a78bfa22; }
.tier .h { display: flex; align-items: baseline; gap: 8px; }
.tier .h b { font-size: 15px; }
.tier .h span { margin-left: auto; font-weight: 700; font-size: 16px; }
.tier .h span small { color: var(--dim); font-weight: 400; font-size: 11px; }
.tier p { margin: 2px 0 6px; color: var(--muted); font-size: 12px; }
.tier ul { margin: 0; padding-left: 16px; font-size: 12px; color: #c9d3df; }
.tier .badge { position: absolute; top: -9px; right: 12px; font-size: 10px; padding: 2px 8px; border-radius: 99px; background: var(--violet); color: #1a1033; font-weight: 700; }
.tier button { margin-top: 8px; }
.fine { font-size: 11px; color: var(--dim); text-align: center; margin-top: 10px; }

/* console */
.console { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel { background: #0d1219cc; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; backdrop-filter: blur(8px); }
.panel h2 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.panel h2 .sp { flex: 1; }
.panel .hint { color: var(--dim); font-size: 12px; margin: 0 0 12px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg button { padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-align: center; }
.seg button b { display: block; font-size: 13px; }
.seg button small { color: var(--dim); font-size: 11px; }
.seg button.on { border-color: var(--accent); background: #5eead414; box-shadow: 0 0 0 1px var(--accent) inset; }
.ctxrow { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 12px; }
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.meter { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.meter .t { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.meter .v { font-family: var(--mono); font-size: 15px; margin: 4px 0 6px; }
.meter.full .bar i { background: linear-gradient(90deg, var(--warn), var(--bad)); }
.trace { font-family: var(--mono); font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.trace div { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; padding: 6px 8px; border-radius: 8px; background: var(--card); }
.trace .s { color: var(--violet); }
.trace .ms { color: var(--dim); }
.trace .empty { display: block; color: var(--dim); background: none; }
table.ev { width: 100%; border-collapse: collapse; font-size: 12px; font-family: var(--mono); }
table.ev th { text-align: left; color: var(--dim); font-weight: 500; padding: 4px 6px; border-bottom: 1px solid var(--line); }
table.ev td { padding: 5px 6px; border-bottom: 1px solid #ffffff08; white-space: nowrap; }
table.ev td.st-ok { color: var(--good); } table.ev td.st-error { color: var(--bad); } table.ev td.st-upgrade, table.ev td.st-confirm_required { color: var(--violet); }
.scroll-x { overflow-x: auto; }
.foot { color: var(--dim); font-size: 12px; text-align: center; padding: 10px 0 30px; }
