/* NEXEL brand tokens and Commissioner display axes from the official site. */
@font-face {
  font-family: Commissioner;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/Commissioner.ttf') format('truetype');
}

:root {
  color-scheme: dark;
  font-family: Commissioner, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-synthesis: none;
  --bg: #090909;
  --surface: #141414;
  --surface-raised: #1c1c1c;
  --text: #f4f4f4;
  --muted: #a4a4a4;
  --accent: #e7e7e7;
  --accent-light: #bababa;
  --line: rgb(255 255 255 / 10%);
  --radius: 14px;
  --font-display-axes: 'FLAR' 65, 'VOLM' 25;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-padding-bottom: 110px; }
body { margin: 0; min-height: 100dvh; background: var(--bg); }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; border: 0; color: inherit; background: none; }
button:disabled { cursor: not-allowed; opacity: .48; }
button, a { -webkit-user-select: none; user-select: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { color: #090909; background: #dddddd; }
[hidden] { display: none !important; }
svg { flex: none; }
button svg, button img { pointer-events: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 550; }
h1 { font-size: 36px; line-height: 1.12; letter-spacing: -1.5px; font-variation-settings: var(--font-display-axes); }
h2 { font-size: 23px; line-height: 1.25; letter-spacing: -.6px; }
h3 { font-size: 15px; line-height: 1.4; letter-spacing: -.15px; }
p { line-height: 1.65; }

/* The official parallel flow lines stay behind the content, never across text. */
.brand-background { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.brand-background img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.shell { position: relative; z-index: 1; max-width: 520px; min-height: 100dvh; margin: 0 auto; padding: calc(21px + var(--safe-top)) 23px calc(111px + var(--safe-bottom)); }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 34px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 750; letter-spacing: 1.2px; line-height: 1; }
.wordmark img { width: 31px; height: 31px; }
.profile-trigger { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 0; text-align: left; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 37px; height: 37px; border-radius: 50%; border: 1px solid #383838; background: #1c1c1c; color: #eeeeee; font-size: 12px; font-weight: 600; }
.profile-copy { display: flex; flex-direction: column; gap: 3px; }
.profile-copy strong { font-size: 10px; font-weight: 550; color: #dddddd; }
.profile-copy small { font-size: 9px; color: #8e8e8e; }
.frontend-label { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 12px; margin: -13px 0 25px; border: 1px solid #363636; border-radius: 8px; background: #161616; color: #dddddd; font-size: 10px; }
.frontend-label small { color: #a4a4a4; font-size: 9px; }
main { animation: enter .2s ease-out; }
.eyebrow { font-size: 10px; font-weight: 550; letter-spacing: 1.6px; color: var(--muted); text-transform: uppercase; }
.intro { margin-bottom: 24px; }
.intro h1 { margin-top: 10px; }
.intro p { font-size: 12px; color: var(--muted); margin-top: 11px; }
.hero { position: relative; overflow: hidden; background: #141414; border: 1px solid #303030; border-radius: 20px; padding: 23px; margin-bottom: 20px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 30px; position: relative; z-index: 1; }
.hero > .badge { margin-bottom: 26px; }
.hero-index { font-size: 9px; letter-spacing: 1.4px; color: #848484; }
.hero h2 { font-size: 31px; line-height: 1.15; letter-spacing: -1px; font-weight: 500; position: relative; z-index: 1; font-variation-settings: var(--font-display-axes); }
.hero h2 span { color: #a4a4a4; }
.hero p { position: relative; z-index: 1; max-width: 255px; margin-top: 12px; font-size: 12px; color: #a4a4a4; }
.hero .primary { position: relative; z-index: 1; display: flex; justify-content: space-between; width: 100%; margin-top: 24px; }
.hero-mark { position: absolute; top: 69px; right: -14px; width: 155px; height: 155px; opacity: .045; pointer-events: none; }
.hero-details { display: flex; gap: 26px; padding-top: 21px; margin-top: 21px; border-top: 1px solid var(--line); position: relative; z-index: 1; }
.hero-details span { display: block; font-size: 10px; color: #969696; margin-bottom: 6px; }
.hero-details strong { display: block; font-size: 13px; font-weight: 550; }
.badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 5px 9px; border: 1px solid #363636; border-radius: 100px; background: #1a1a1a; color: #bcbcbc; font-size: 10px; font-weight: 450; line-height: 1.4; }
.badge::before { content: ''; width: 4px; height: 4px; background: #aaaaaa; border-radius: 50%; }
.badge.good { color: #e7e7e7; }
.badge.good::before { background: #eeeeee; }
.badge.bad::before { background: transparent; border: 1px solid #aaaaaa; }
.primary { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 13px 21px; border: 1px solid #e8e8e8; border-radius: 100px; background: #e8e8e8; color: #000000; font-size: 12px; font-weight: 600; line-height: 1.5; transition: background .2s, border-color .2s; }
.primary:hover { background: #c9c9c9; border-color: #c9c9c9; }
.secondary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 15px; border: 1px solid #414141; border-radius: 100px; background: transparent; color: #eeeeee; font-size: 12px; font-weight: 500; line-height: 1.5; transition: background .2s, border-color .2s; }
.secondary:hover { background: #1b1b1b; border-color: #888888; }
.danger { color: #bcbcbc; border-style: dashed; border-color: #535353; }
.full { width: 100%; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 27px 0 15px; }
.section-head h2 { font-size: 15px; font-weight: 550; letter-spacing: -.2px; }
.section-head span, .section-head button { color: #888888; font-size: 10px; }
.connect-banner { display: flex; align-items: center; gap: 14px; width: 100%; padding: 19px; border: 1px solid #3a3a3a; border-radius: var(--radius); background: #141414; text-align: left; margin-bottom: 12px; }
.connect-banner .tile-icon { margin: 0; background: #eeeeee; color: #111111; width: 39px; height: 39px; border: 0; }
.connect-banner > span { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.connect-banner strong { font-size: 13px; font-weight: 550; }
.connect-banner small { font-size: 10px; color: #a4a4a4; }
.connect-banner > svg { color: #ababab; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; position: relative; min-height: 128px; padding: 17px; border: 1px solid #2b2b2b; border-radius: var(--radius); background: #141414; text-align: left; transition: border-color .2s, background .2s; }
.tile:hover, .connect-banner:hover { border-color: #777777; background: #191919; }
.tile-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-bottom: 18px; border: 1px solid #363636; border-radius: 11px; background: #1a1a1a; color: #dddddd; }
.tile strong { font-size: 12px; font-weight: 550; }
.tile small { font-size: 10px; line-height: 1.5; color: var(--muted); margin-top: 5px; }
.tile-arrow { position: absolute; top: 17px; right: 16px; color: #737373; }
.note { display: flex; align-items: flex-start; gap: 10px; padding: 15px 0; border-top: 1px solid #2b2b2b; color: var(--muted); font-size: 11px; line-height: 1.7; margin: 20px 0; }
.note svg { color: #b8b8b8; margin-top: 3px; }
.note.warning, .note.error { padding: 15px; border: 1px solid #3c3c3c; border-radius: 11px; background: #191919; color: #c4c4c4; }
.note.error { border-left: 3px solid #dddddd; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.card { margin: 13px 0; padding: 22px; border: 1px solid #2e2e2e; border-radius: var(--radius); background: #141414; }
.card p, .card small { color: var(--muted); font-size: 12px; }
.card h3 { margin-bottom: 7px; }
.card .row + .row { margin-top: 15px; }
.price { margin: 23px 0 12px; font-size: 43px; font-weight: 450; letter-spacing: -1.8px; line-height: 1.1; font-variation-settings: var(--font-display-axes); }
.price span { color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.plan-card { background: #111111; padding: 23px; }
.plan-card.featured { border-color: #d3d3d3; background: #181818; }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.plan-head h2 { margin-top: 6px; font-size: 25px; font-weight: 550; }
.plan-head .badge { font-size: 9px; flex: none; }
.plan-card ul { list-style: none; padding: 0; margin: 22px 0 25px; border-top: 1px solid var(--line); padding-top: 18px; font-size: 12px; line-height: 2.2; color: #bababa; }
.plan-card li::before { content: '✓'; margin-right: 9px; color: #dddddd; }
nav { position: fixed; z-index: 10; bottom: 0; left: 50%; transform: translateX(-50%); width: min(520px, 100%); display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 12px 15px calc(12px + var(--safe-bottom)); border-top: 1px solid #2e2e2e; background: rgb(13 13 13 / 96%); backdrop-filter: blur(20px); }
nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 45px; padding: 5px 0; border-radius: 10px; color: #858585; font-size: 9px; font-weight: 450; }
nav button.active { color: #f4f4f4; background: #222222; }
nav svg { width: 19px; height: 19px; }
.pagebar { display: flex; align-items: center; gap: 11px; margin-bottom: 25px; }
.back { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid #303030; background: #171717; color: #cccccc; }
.pagebar h1 { min-width: 0; font-size: 25px; line-height: 1.15; font-weight: 500; letter-spacing: -.8px; }
.pagebar .home { flex: none; margin-left: auto; padding: 10px 0 10px 4px; color: #969696; font-size: 10px; }
label { display: block; margin: 17px 0 8px; font-size: 11px; color: #bababa; }
input, select { width: 100%; min-width: 0; min-height: 47px; padding: 13px 14px; border: 1px solid #363636; border-radius: 8px; background: #141414; color: #eeeeee; font-size: 13px; outline: none; }
input:focus, select:focus { border-color: #c0c0c0; box-shadow: 0 0 0 1px #c0c0c0; }
input::placeholder { color: #777777; }
input[type=checkbox] { width: 17px; min-height: 17px; margin-top: 2px; accent-color: #e8e8e8; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 17px 0 22px; font-size: 11px; line-height: 1.7; }
.check a { text-decoration: underline; text-underline-offset: 3px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tabs { display: flex; gap: 5px; padding: 4px; margin: 22px 0; border: 1px solid #303030; border-radius: 100px; background: #111111; }
.tabs button { flex: 1; padding: 11px 8px; border-radius: 100px; color: #969696; font-size: 11px; }
.tabs .selected { color: #eeeeee; background: #2a2a2a; }
.line { height: 1px; margin: 21px 0; background: var(--line); }
.empty { text-align: center; padding: 35px 22px; }
.empty .tile-icon { width: 47px; height: 47px; margin: 0 auto 20px; border-radius: 50%; }
.empty h2 { font-size: 21px; margin-bottom: 12px; }
.empty p { color: var(--muted); font-size: 12px; }
.empty button { margin-top: 25px; }
.muted { color: var(--muted); font-size: 12px; }
.progress { height: 3px; margin-top: 24px; overflow: hidden; border-radius: 5px; background: #353535; }
.progress span { display: block; height: 100%; width: var(--progress, 0%); background: #dddddd; }
.metric { font-size: 22px; font-weight: 550; }
.metric small { font-size: 12px; color: var(--muted); font-weight: 400; }
.device-icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border: 1px solid #363636; border-radius: 10px; background: #1c1c1c; color: #dddddd; font-size: 12px; }
.device-info { flex: 1; min-width: 0; }
.device-info h3 { overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.actions button { flex: 1; font-size: 10px; padding-inline: 11px; }
.location-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #eeeeee; }
.location-dot.offline { background: transparent; border: 1px solid #9a9a9a; }
.steps { padding-left: 21px; color: #bcbcbc; font-size: 12px; line-height: 1.85; }
.steps li { padding-left: 4px; margin: 11px 0; }
.loading { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--muted); font-size: 12px; }
.loading::before { content: ''; width: 25px; height: 25px; border: 1px solid #383838; border-top-color: #eeeeee; border-radius: 50%; animation: spin .8s linear infinite; }
.footer { margin: 27px 0 10px; text-align: center; color: #777777; font-size: 9px; letter-spacing: 1.3px; }
.order-total { font-size: 42px; letter-spacing: -1.8px; font-weight: 450; margin: 20px 0 14px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 7px; }
.pill-row button { padding: 9px 12px; border: 1px solid #353535; border-radius: 100px; background: #1a1a1a; font-size: 11px; }
.pill-row button.selected { color: #f4f4f4; border-color: #aaaaaa; background: #2a2a2a; }
dialog { width: min(440px, calc(100% - 36px)); padding: 24px; border: 1px solid #4a4a4a; border-radius: 18px; background: #141414; color: var(--text); box-shadow: 0 20px 100px rgb(0 0 0 / 45%); }
dialog::backdrop { background: rgb(0 0 0 / 80%); backdrop-filter: blur(5px); }
dialog h2 { margin-bottom: 15px; font-size: 23px; }
dialog p { font-size: 12px; color: #bcbcbc; margin-bottom: 20px; }
dialog button { margin-top: 11px; }
#toast { position: fixed; z-index: 40; bottom: calc(100px + var(--safe-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); padding: 14px 18px; border: 1px solid #484848; border-radius: 13px; background: #242424; color: #eeeeee; font-size: 12px; box-shadow: 0 10px 35px rgb(0 0 0 / 35%); }
code { font-size: 12px; overflow-wrap: anywhere; }
.link-code { text-align: center; padding: 24px; margin: 16px 0; border: 1px solid #363636; border-radius: 10px; background: #0e0e0e; color: #eeeeee; font-size: 25px; letter-spacing: 5px; font-weight: 550; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 800px) {
  .shell { border-inline: 1px solid #242424; background: rgb(9 9 9 / 90%); padding-top: 30px; }
  .brand-background img { opacity: 1; }
}
@media (max-width: 360px) {
  .shell { padding-inline: 17px; }
  .profile-copy { display: none; }
  h1 { font-size: 33px; }
  .hero { padding: 20px; }
  .hero h2 { font-size: 28px; }
  .hero-details { gap: 20px; }
  .tile { padding: 15px; }
  .pagebar { gap: 8px; }
  .pagebar h1 { font-size: 22px; }
  .card { padding: 19px; }
  .plan-head .badge { font-size: 8px; padding-inline: 7px; }
  .price { font-size: 39px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
