:root {
  --bg:#101211; --card:#191c19; --card2:#222621; --text:#f1f3ec; --muted:#a0a79b;
  --accent:#c4f275; --accent-ink:#203009; --line:#30362e; --danger:#ffb4a9; --warning:#e7cc8e;
  --radius:22px; --safe-top:0px; --safe-bottom:0px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color-scheme:dark;
  font-synthesis:none; -webkit-font-smoothing:antialiased;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html { scroll-behavior:smooth; scroll-padding-top:24px; }
body { margin:0; background:var(--bg); color:var(--text); }
body.light { --bg:#f5f6f0; --card:#fff; --card2:#edf0e7; --text:#20271b; --muted:#5c6754; --accent:#547b20; --accent-ink:#fff; --line:#d9dfd0; --danger:#ac3426; --warning:#856117; color-scheme:light; }
button,input,textarea,select { font:inherit; }
button,a,input,textarea,select { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; border:0; }
button:disabled { opacity:.48; cursor:default; }
button[aria-busy=true] { cursor:wait; }
a { color:var(--accent); text-underline-offset:4px; }
button,a { touch-action:manipulation; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
svg { width:22px; height:22px; flex-shrink:0; vertical-align:middle; }
.shell { max-width:1040px; margin:auto; padding:calc(22px + max(env(safe-area-inset-top), var(--safe-top))) 32px calc(30px + env(safe-area-inset-bottom)); }
.header { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:0 0 28px; border-bottom:1px solid var(--line); margin-bottom:32px; }
.brand { display:flex; align-items:center; gap:12px; font-size:25px; letter-spacing:-1px; color:var(--text); text-decoration:none; font-weight:750; }
.brand-mark { width:33px; height:38px; color:var(--accent); }
.brand-light { font-weight:400; }
.header-actions { display:flex; align-items:center; gap:10px; }
.avatar { width:35px; height:35px; border-radius:50%; background:var(--card2); border:1px solid var(--line); display:grid; place-items:center; font-size:13px; font-weight:650; color:var(--muted); }
.quiet,.icon-button { color:var(--muted); background:transparent; border-radius:12px; min-height:44px; padding:10px 12px; }
.quiet:hover,.icon-button:hover { background:var(--card2); color:var(--text); }
.icon-button { display:grid; place-items:center; width:44px; padding:10px; font-size:27px; }
.muted,.caption,.eyebrow,.note { color:var(--muted); }
.caption { font-size:14px; line-height:1.6; }
.eyebrow { display:block; text-transform:uppercase; letter-spacing:1.8px; font-size:11px; font-weight:650; }
h1,h2,h3,p { overflow-wrap:anywhere; }
h1 { font-size:clamp(32px,4.5vw,46px); line-height:1.1; letter-spacing:-1.8px; font-weight:550; margin:12px 0 14px; }
h2 { font-size:23px; line-height:1.25; font-weight:550; letter-spacing:-.6px; margin:0 0 12px; }
h3 { font-size:16px; line-height:1.4; font-weight:600; margin:0 0 6px; }
p { line-height:1.65; }
.page-heading { margin-bottom:28px; }
.page-heading p { margin-bottom:0; }
.card { padding:26px; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); min-width:0; }
.card + .card { margin-top:14px; }
.home-grid { display:grid; grid-template-columns:1.35fr 1fr; gap:18px; }
.home-grid .card + .card { margin-top:0; }
.hero { position:relative; overflow:hidden; background:linear-gradient(135deg,#293526,var(--card) 75%); border-color:#536246; }
.light .hero { background:linear-gradient(135deg,#ebf5db,var(--card)); border-color:#c5d7ae; }
.hero h2 { margin:26px 0 8px; font-size:29px; letter-spacing:-1px; }
.hero::after { content:""; width:190px; height:210px; border:1px solid #c4f27513; border-radius:90px 90px 120px 120px; position:absolute; right:-60px; top:60px; transform:rotate(28deg); pointer-events:none; }
.hero .actions { position:relative; z-index:1; }
.row { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.row.wrap { flex-wrap:wrap; }
.badge { display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border-radius:30px; color:var(--accent); background:color-mix(in srgb,var(--accent) 9%,transparent); font-size:11px; line-height:1.3; white-space:nowrap; }
.badge.gray { color:var(--muted); background:var(--card2); }
.badge.amber { color:var(--warning); background:color-mix(in srgb,var(--warning) 8%,transparent); }
.dot { height:5px; width:5px; border-radius:50%; background:currentColor; }
.stats { display:flex; gap:44px; margin:25px 0; }
.number { font-size:38px; line-height:1.2; letter-spacing:-1.5px; font-weight:450; font-variant-numeric:tabular-nums; }
.number small { font-size:15px; color:var(--muted); letter-spacing:0; }
.primary,.secondary,.danger { display:flex; justify-content:center; align-items:center; gap:10px; width:100%; padding:15px 18px; min-height:50px; border-radius:13px; font-weight:600; font-size:14px; text-decoration:none; text-align:center; transition:background .15s,transform .15s; }
.primary { background:var(--accent); color:var(--accent-ink); border:1px solid var(--accent); }
.primary:hover:enabled { filter:brightness(1.06); }
.secondary { background:var(--card2); color:var(--text); border:1px solid var(--line); }
.secondary:hover:enabled { border-color:var(--muted); }
.danger { background:color-mix(in srgb,var(--danger) 8%,transparent); color:var(--danger); border:1px solid color-mix(in srgb,var(--danger) 30%,transparent); }
.auto { width:auto; flex-shrink:0; }
.actions { display:grid; gap:10px; margin-top:20px; }
.actions.inline { grid-template-columns:1fr 1fr; }
.note { font-size:12px; line-height:1.65; }
.install-card { display:flex; flex-direction:column; justify-content:space-between; }
.install-card .step { margin:15px 0; }
.step { display:flex; gap:13px; align-items:flex-start; margin:20px 0; }
.step > strong { width:27px; height:27px; border-radius:50%; display:grid; place-items:center; flex-shrink:0; font-size:11px; color:var(--accent); background:var(--card2); border:1px solid var(--line); }
.step p { margin:0; font-size:14px; line-height:1.5; }
.step .caption { font-size:12px; }
.section-head { display:flex; justify-content:space-between; align-items:center; gap:15px; margin:36px 0 16px; }
.section-head h2 { margin:0; }
.segmented { display:flex; gap:4px; border:1px solid var(--line); padding:4px; background:var(--card); border-radius:12px; width:fit-content; }
.segmented button { min-height:38px; padding:9px 17px; color:var(--muted); background:transparent; border-radius:8px; font-size:13px; }
.segmented button.selected { background:var(--card2); color:var(--text); }
.plans { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:15px; }
.plan { display:flex; flex-direction:column; align-items:flex-start; text-align:left; position:relative; border:1px solid var(--line); border-radius:18px; padding:21px; color:var(--text); background:var(--card); gap:9px; min-width:0; }
.plan.selected { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 5%,var(--card)); }
.plan .choice { width:17px; height:17px; border-radius:50%; border:1px solid var(--line); position:absolute; right:17px; top:19px; }
.plan.selected .choice { border:5px solid var(--accent); background:var(--accent-ink); }
.plan h3 { padding-right:18px; }
.price { font-size:31px; letter-spacing:-1px; font-weight:500; }
.price small { color:var(--accent); font-size:18px; }
.plan .caption { font-size:12px; }
.plan-summary { display:flex; align-items:center; gap:24px; margin-top:18px; }
.plan-summary > div { flex:1; }
.plan-summary .primary { width:auto; min-width:270px; }
.benefits { display:flex; gap:20px; flex-wrap:wrap; margin-top:23px; color:var(--muted); font-size:12px; }
.benefits span { display:flex; align-items:center; gap:7px; }
.benefits svg { width:15px; height:15px; color:var(--accent); }
.referral { display:flex; align-items:center; gap:18px; padding:24px 26px; margin-top:32px; }
.referral .device-icon { color:var(--accent); }
.referral > div { flex:1; }
.referral p { margin:0; }
.referral h3 { margin-bottom:4px; }
.referral .secondary { width:auto; }
.list { list-style:none; margin:0; padding:0; }
.list > li { border-bottom:1px solid var(--line); padding:17px 0; }
.list > li:first-child { padding-top:0; }
.list > li:last-child { padding-bottom:0; border-bottom:0; }
.list .row + .row { margin-top:7px; }
.order-actions { display:flex; gap:10px; margin-top:13px; }
.order-actions button { width:auto; min-height:40px; padding:9px 13px; font-size:12px; }
.success { color:var(--accent); }
.small { font-size:12px; }
.empty { display:flex; flex-direction:column; align-items:center; text-align:center; padding:32px 15px; color:var(--muted); gap:10px; }
.empty svg { width:32px; height:32px; margin-bottom:8px; opacity:.7; }
.empty p { max-width:350px; margin:0; font-size:14px; }
.empty .primary { width:auto; margin-top:12px; }
.device-row { display:flex; align-items:center; gap:14px; }
.device-icon { width:46px; height:46px; border:1px solid var(--line); border-radius:14px; display:grid; place-items:center; flex-shrink:0; background:var(--card2); }
.device-main { flex:1; min-width:0; }
.device-main h3 { margin-bottom:7px; }
.device-actions { display:flex; gap:10px; margin-top:24px; }
.device-actions .primary { flex:1; }
.device-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.device-grid .card + .card { margin:0; }
.help-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start; }
.help-grid .card + .card { margin-top:0; }
.help-grid h2 { margin-bottom:22px; }
.faq { border-bottom:1px solid var(--line); padding:16px 0; }
.faq:last-child { border-bottom:0; }
.faq summary { cursor:pointer; font-size:14px; line-height:1.5; }
.faq p { font-size:13px; color:var(--muted); margin-bottom:0; }
input,textarea,select { width:100%; min-width:0; padding:13px 14px; color:var(--text); border:1px solid var(--line); background:var(--bg); border-radius:11px; font-size:16px; }
textarea { resize:vertical; min-height:125px; line-height:1.6; }
input[type=checkbox] { width:19px; height:19px; flex-shrink:0; accent-color:var(--accent); }
label.field { display:block; font-size:13px; color:var(--muted); margin:17px 0 8px; }
.check { display:flex; align-items:flex-start; gap:10px; font-size:13px; line-height:1.6; margin:18px 0; }
.check input { margin:2px 0 0; }
.form-error { color:var(--danger); font-size:13px; line-height:1.6; margin:12px 0; }
.char-count { text-align:right; font-size:11px; color:var(--muted); margin-top:6px; }
.ticket-text { white-space:pre-wrap; }
.ticket-reply { border-left:2px solid var(--accent); margin-top:16px; padding:0 0 0 14px; }
.warning { border-color:color-mix(in srgb,var(--warning) 40%,var(--line)); margin-top:16px; }
.warning h3 { color:var(--warning); }
.admin-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.admin-stats .card + .card { margin-top:0; }
.admin-stats .number { font-size:32px; }
.user-item { display:block; width:100%; text-align:left; color:var(--text); background:transparent; padding:17px 0; border-bottom:1px solid var(--line); }
.user-item:last-child { border-bottom:0; }
.user-item:hover { color:var(--accent); }
.user-item .caption { display:block; margin-top:5px; }
.nav { display:flex; gap:6px; padding:5px; border:1px solid var(--line); background:var(--card); border-radius:17px; margin:36px auto 0; max-width:420px; }
.nav button { display:flex; align-items:center; justify-content:center; gap:8px; flex:1; min-height:47px; border-radius:12px; font-size:12px; font-weight:550; background:transparent; color:var(--muted); }
.nav button[aria-current=page] { background:var(--card2); color:var(--accent); }
.nav svg { width:18px; height:18px; }
footer { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:34px; padding-top:20px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; }
footer > span:first-child { font-weight:650; }
footer .quiet { font-size:11px; padding:8px; }
dialog { width:min(520px,calc(100% - 24px)); max-height:calc(100vh - 40px); max-height:calc(100dvh - 40px); padding:32px; color:var(--text); background:var(--card); border:1px solid var(--line); border-radius:24px; box-shadow:0 20px 90px #0007; }
dialog::backdrop { background:#080b09c9; backdrop-filter:blur(6px); }
.modal-close { position:absolute; right:9px; top:9px; }
#modal-content { padding-top:15px; }
#modal-content h2 { padding-right:12px; font-size:25px; }
#modal-content > .primary { margin-top:18px; }
#modal-content .card { padding:18px; }
.key { font-size:11px; line-height:1.6; font-family:ui-monospace,SFMono-Regular,monospace; overflow-wrap:anywhere; max-height:125px; overflow:auto; background:var(--bg); border:1px solid var(--line); padding:14px; border-radius:12px; user-select:all; }
.qr { width:100%; max-width:310px; display:block; margin:20px auto 0; border:12px solid #fff; border-radius:14px; }
#toast { position:fixed; left:50%; bottom:calc(100px + max(env(safe-area-inset-bottom), var(--safe-bottom))); transform:translate(-50%,12px); width:max-content; max-width:calc(100% - 32px); padding:14px 20px; background:var(--text); color:var(--bg); border-radius:14px; box-shadow:0 6px 32px #0003; font-size:13px; line-height:1.5; pointer-events:none; opacity:0; z-index:100; transition:opacity .2s,transform .2s; }
#toast.visible { opacity:1; transform:translate(-50%,0); }
.loading { text-align:center; padding:70px 20px; min-height:350px; }
.loading h1 { font-size:28px; }
.loader { display:block; width:28px; height:28px; margin:0 auto 25px; border:2px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite; }
.connection-banner { background:var(--card2); padding:13px 17px; border:1px solid var(--line); border-radius:12px; margin-bottom:20px; font-size:13px; line-height:1.5; }
.demo-bar { display:flex; justify-content:space-between; align-items:center; gap:15px; padding:12px max(20px,calc((100vw - 976px)/2)); background:#28361b; color:#e0efcc; font-size:12px; }
.demo-bar strong { display:block; margin-bottom:4px; }
.demo-bar span { font-size:11px; opacity:.8; }
.demo-bar label { display:flex; align-items:center; gap:9px; flex-shrink:0; }
.demo-bar select { width:auto; font-size:12px; padding:8px; background:#1d2815; color:#e0efcc; border-color:#48563c; }
.skip-link { position:absolute; left:16px; top:-100px; padding:12px; background:var(--accent); color:var(--accent-ink); z-index:101; }
.skip-link:focus { top:10px; }
.noscript { margin:40px; }
.mt14 { margin-top:14px; }.mt23 { margin-top:23px; }
@keyframes spin { to { transform:rotate(360deg); } }
@media(min-width:760px) { .nav { position:fixed; bottom:22px; left:50%; transform:translateX(-50%); width:420px; z-index:10; box-shadow:0 12px 35px #0003; margin:0; } .shell { padding-bottom:100px; } }
@media(max-width:759px) {
  .shell { padding-left:20px; padding-right:20px; padding-bottom:calc(100px + max(env(safe-area-inset-bottom),var(--safe-bottom))); }
  .header { margin-bottom:25px; padding-bottom:20px; }
  .home-grid,.help-grid { grid-template-columns:1fr; gap:14px; }
  .install-card { padding:22px; }
  .install-card .step { margin:10px 0; }
  .card { padding:23px; }
  .hero { padding:25px; }
  .hero h2 { font-size:27px; }
  .plans { gap:8px; }
  .plan { padding:18px 12px; gap:6px; }
  .plan h3 { font-size:12px; padding-right:0; padding-top:18px; white-space:nowrap; }
  .plan .choice { right:12px; top:14px; width:13px; height:13px; }
  .plan.selected .choice { border-width:4px; }
  .price { font-size:28px; }
  .plan .caption { font-size:10px; }
  .plan-summary { flex-direction:column; gap:10px; align-items:stretch; }
  .plan-summary .primary { width:100%; min-width:0; }
  .plan-summary .caption { margin:0; }
  .benefits { gap:12px; font-size:11px; }
  .section-head > .caption { display:none; }
  .section-head h2 { font-size:21px; }
  .referral { padding:20px; gap:12px; flex-wrap:wrap; }
  .referral .secondary { width:100%; margin-top:5px; }
  .device-grid { grid-template-columns:1fr; }
  .nav { position:fixed; bottom:0; left:0; right:0; margin:0; max-width:none; padding:8px 12px calc(8px + max(env(safe-area-inset-bottom),var(--safe-bottom))); border-radius:20px 20px 0 0; z-index:20; box-shadow:0 -10px 35px #0002; }
  .nav button { flex-direction:column; gap:4px; min-height:50px; font-size:10px; }
  footer > span:nth-child(2) { max-width:150px; text-align:center; line-height:1.5; }
  .demo-bar { flex-wrap:wrap; gap:9px; padding:12px 20px; }
  .demo-bar label { width:100%; justify-content:space-between; }
  .demo-bar select { flex:1; max-width:240px; }
  .admin-stats { gap:8px; }
  .admin-stats .card { padding:16px 12px; }
  .admin-stats .caption { font-size:11px; }
  .admin-stats .number { font-size:29px; }
  dialog { padding:27px 23px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; scroll-behavior:auto!important; } }

@media(max-width:420px) { .header-actions { gap:2px; } .avatar { display:none; } #admin-toggle { font-size:11px; padding:8px; } .header-actions .icon-button { width:38px; } }

.primary[aria-busy=true]::after,.secondary[aria-busy=true]::after { content:""; width:14px; height:14px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:spin .8s linear infinite; flex-shrink:0; }
#refresh[aria-busy=true] svg { animation:spin 1s linear infinite; }
.referral-balance { font-size:12px; color:var(--muted); margin:10px 0 0!important; }
.referral-balance strong { color:var(--accent); font-weight:550; }
.referral-layout { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:18px; }
.referral-layout .card + .card { margin-top:0; }
.referral-hero h2 { max-width:620px; }
.referral-metrics { display:flex; flex-wrap:wrap; gap:36px; margin:28px 0 22px; }
.referral-metrics .eyebrow { margin-bottom:10px; }
.bonus-progress { height:8px; border-radius:8px; background:var(--card2); margin:24px 0 18px; overflow:hidden; }
.bonus-progress span { display:block; height:100%; background:var(--accent); border-radius:inherit; }
.bot-preview { white-space:pre-wrap; overflow-wrap:anywhere; padding:20px; border-radius:16px; background:var(--card2); font-size:14px; line-height:1.7; margin-top:20px; }
@media(max-width:759px) { .referral-layout { grid-template-columns:1fr; } .referral-metrics { gap:25px; } .referral-metrics .number { font-size:31px; } .nav button { font-size:10px; } }
.demo-referral-actions { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-top:18px; }
.demo-referral-actions .note { flex:1; min-width:200px; }

@media(max-width:759px) { .referral-metrics { display:grid; grid-template-columns:1.2fr 1fr; gap:16px; } .referral-metrics .number { font-size:29px; } .referral-metrics .number small { font-size:12px; } .referral-metrics .eyebrow { letter-spacing:1px; } }
