/* Personal account, 2026-11: dashboard format from the owner's reference, in the public site's
   colours (owner, 2026-11-04): same surfaces, text and blue glass ribbons as the home page. */
html[data-acct=dark]{color-scheme:dark;--surface:#131c2a;--ink:#f0f2f6;--muted:#a5aab5;--accent:#f0f2f6;--on-accent:#16191e;--panel:rgba(19,28,42,.6);--card:rgba(26,37,55,.56);--card-2:#1e2b40;--solid:#172234;--line:rgba(240,242,246,.11);--line-2:rgba(240,242,246,.22);--lit:rgba(240,242,246,.07);--tint:#6ebeff;--tint-soft:rgba(73,154,239,.16)}
html[data-acct=light]{color-scheme:light;--surface:#f2f7fc;--ink:#17191d;--muted:#5c626b;--accent:#17191d;--on-accent:#fafafa;--panel:rgba(255,255,255,.62);--card:rgba(255,255,255,.68);--card-2:#f1f3f6;--solid:#fff;--line:rgba(23,25,29,.09);--line-2:rgba(23,25,29,.2);--lit:rgba(23,25,29,.045);--tint:#2f7fe6;--tint-soft:rgba(59,136,239,.11)}
html[data-acct],html[data-acct] body{background:var(--surface);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Helvetica Neue",Arial,sans-serif}
/* Same glass ribbons and colours as the home page, driven by the account theme switch. */
html[data-acct] .ice-glass{position:fixed;inset:0 0 auto;height:166vh;z-index:0;display:block;overflow:hidden;pointer-events:none}
html[data-acct] .ice-ribbon-one{opacity:1}
html[data-acct] .ice-ribbon-two{opacity:.7}
html[data-acct] .ice-ribbon-three{opacity:.6}
html[data-acct=dark] .ice-ribbon{box-shadow:0 9px 20px #7da7e41a,0 19px 26px #155ac34a,inset 0 -7px 16px #499aef55,inset 0 -12px 4px #a8d4ff30;background:linear-gradient(175deg,transparent 45%,#19375466 64%,#2465b54d 86%,#789eca33)}
html[data-acct=light] .ice-ribbon{box-shadow:0 9px 20px #fff,0 19px 26px #3b88ef45,inset 0 -7px 16px #6ebeff75,inset 0 -12px 4px #ffffffb0;background:linear-gradient(175deg,transparent 45%,#effaff80 64%,#b6d8ff8c 86%,#fff)}
html[data-acct] .account-shell,html[data-acct] .login-header,html[data-acct] .login-main,html[data-acct] .login-footer{position:relative;z-index:1}
html[data-acct=dark] .ui-icon{filter:invert(1)}
html[data-acct=light] .ui-icon{filter:none}
html[data-acct=dark] .brand-mark{filter:brightness(0) invert(1)}
html[data-acct=light] .brand-mark{filter:none}
html[data-acct=light] .happ-mark{filter:invert(1)}
html[data-acct=dark] .happ-mark{filter:none}

/* shell */
html[data-acct] .account-shell{display:grid;grid-template-columns:272px minmax(0,1fr);min-height:100dvh;background:none;padding:0}
html[data-acct] .account-sidebar{position:sticky;top:14px;align-self:start;height:calc(100dvh - 28px);margin:14px 0 14px 14px;padding:24px 16px 16px;background:var(--panel);-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px);border:1px solid var(--line)!important;border-radius:28px;display:flex;flex-direction:column;gap:18px;overflow:auto}
html[data-acct] .sidebar-top{padding:0 8px}
html[data-acct] .sidebar-top p{display:none}
html[data-acct] .brand-home{font-size:17px;font-weight:600;letter-spacing:0;gap:10px}
html[data-acct] .brand-home .brand-mark{width:24px;height:24px}
html[data-acct] .side-cta{width:100%}
html[data-acct] .account-navigation{display:flex;flex-direction:column;gap:3px;padding:0}
html[data-acct] .account-navigation a{display:flex;align-items:center;gap:11px;min-height:40px;padding:0 12px;border:1px solid transparent;border-radius:999px;background:none;color:var(--muted);font-size:14px;font-weight:500}
html[data-acct] .account-navigation a:hover{color:var(--ink);background:var(--lit)}
html[data-acct] .account-navigation a[aria-current=page]{color:var(--ink);background:var(--tint-soft);border-color:var(--line-2)}
html[data-acct] .account-navigation .ui-icon{width:17px;height:17px;opacity:.75}
#side-meters{padding:14px 8px 0;margin-top:auto}
.v2-side-label{margin:0 0 10px;color:var(--muted);font-size:12px}
.v2-side-plan{display:flex;align-items:center;gap:9px;margin:0 0 10px;font-size:14px}
.v2-meter{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:8px;margin:7px 0;font:11px/1 ui-monospace,"SF Mono",Menlo,monospace;color:var(--muted)}
.v2-meter i{display:block;height:1px;background:var(--line-2);position:relative}
.v2-meter u{position:absolute;left:0;top:-.5px;height:2px;background:var(--tint);text-decoration:none}
.v2-meter b{font-weight:400;color:var(--ink);min-width:24px;text-align:right}
.v2-side-status{margin:10px 0 0;font:11px/1.2 ui-monospace,"SF Mono",Menlo,monospace;color:var(--muted)}
html[data-acct] .sidebar-bottom{padding:0;margin:0}
html[data-acct] .sidebar-support{display:flex;align-items:center;justify-content:center;min-height:42px;padding:0 14px;background:none;border:1px solid var(--line-2);border-radius:999px;font-size:13px;color:var(--ink)}
html[data-acct] .sidebar-support:hover{background:var(--lit)}
html[data-acct] .sidebar-support>span{display:none}
html[data-acct] .sidebar-support strong{font-weight:500}

/* workspace */
html[data-acct] .account-workspace{min-width:0;display:flex;flex-direction:column;background:none}
html[data-acct] .account-topbar{min-height:0;padding:22px 40px 0;display:flex;justify-content:flex-end;background:none}
html[data-acct] #breadcrumb{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
html[data-acct] .account-identity{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--muted)}
html[data-acct] .account-identity .lang-toggle{margin:0}
html[data-acct] .avatar-button{width:34px;height:34px;background:var(--card-2);color:var(--ink);border:1px solid var(--line)}
.theme-toggle{display:inline-grid;place-items:center;width:34px;height:34px;padding:0;border:1px solid color-mix(in srgb,var(--ink) 16%,transparent);border-radius:50%;background:none;color:var(--ink);cursor:pointer}
.theme-toggle:hover{background:var(--lit)}
.theme-toggle svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
html[data-acct=dark] .theme-toggle .moon,html[data-acct=light] .theme-toggle .sun{display:none}
html[data-acct] .account-identity .quiet-link{display:inline-flex;align-items:center;gap:7px;height:34px;margin:0;padding:0 14px;border:1px solid var(--line-2);border-radius:999px;color:var(--ink);font-size:13px}
html[data-acct] .account-identity .quiet-link .ui-icon{width:13px;height:13px}
html[data-acct] .account-main{width:100%;max-width:1240px;padding:18px 40px 36px;margin:0}
html[data-acct] .account-footer{margin-top:auto;padding:0 40px 24px;border:0;background:none;color:var(--muted);font-size:12px;display:flex;justify-content:space-between;max-width:1240px}

/* page head */
.v2-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:26px}
.v2-eyebrow{margin:0 0 10px;font:500 11px/1.2 ui-monospace,"SF Mono",Menlo,monospace;letter-spacing:.2em;text-transform:uppercase;color:var(--tint)}
html[data-acct] .v2-title{margin:0;font-size:clamp(40px,4.8vw,68px);font-weight:200;letter-spacing:-.015em;line-height:1.1}
.v2-title span{color:var(--muted)}
.v2-lead{margin:12px 0 0;color:var(--muted);font-size:15px;line-height:1.5}

/* cards */
.v2-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:18px;align-items:start;margin-bottom:18px}
.v2-col,.v2-stack{display:flex;flex-direction:column;gap:18px;min-width:0}
.v2-stack{max-width:820px}
.v2-card{position:relative;padding:28px;background:var(--card);-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px);border:1px solid var(--line);border-radius:28px;min-width:0}
.v2-card-lit{background:radial-gradient(120% 130% at 100% 0,var(--tint-soft),transparent 62%),var(--card);border-color:var(--line-2)}
.v2-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.v2-card-title{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
html[data-acct] .v2-card-title h2{margin:0;font-size:18px;font-weight:400;letter-spacing:0}
.v2-dot{display:block;flex:none;width:6px;height:6px;border-radius:50%;background:var(--tint)}
.v2-status{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;background:var(--lit);font-size:12px;color:var(--muted)}
.v2-status i{width:6px;height:6px;border-radius:50%;background:var(--muted)}
.v2-status.is-on{color:var(--ink)}
.v2-status.is-on i{background:#34c759}
.v2-mono{margin:6px 0 0;font:12px/1.4 ui-monospace,"SF Mono",Menlo,monospace;color:var(--muted);white-space:nowrap}
.v2-label{margin:30px 0 4px;font:11px/1.2 ui-monospace,"SF Mono",Menlo,monospace;letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.v2-big{display:flex;align-items:baseline;gap:8px}
.v2-big b{font-size:clamp(68px,8vw,104px);font-weight:200;letter-spacing:-.02em;line-height:1.02}
.v2-big span{color:var(--muted);font-size:15px}
.v2-price{margin:20px 0}
.v2-price b{font-size:clamp(40px,4vw,56px);letter-spacing:-.01em}
.v2-ticks{display:grid;grid-template-columns:repeat(30,1fr);gap:0;align-items:end;height:12px;margin-top:14px;border-bottom:1px solid var(--line-2)}
.v2-ticks i{display:block;width:1px;height:5px;background:var(--line-2)}
.v2-ticks i.on{height:11px;width:2px;background:var(--tint)}
.v2-scale{display:flex;justify-content:space-between}
.v2-text{margin:12px 0 18px;color:var(--muted);font-size:14px;line-height:1.6}
.v2-pill{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;min-height:38px;padding:0 16px;border:1px solid var(--line-2);border-radius:999px;background:none;color:var(--ink);font-family:inherit;font-size:13px;font-weight:500;line-height:1;letter-spacing:0;white-space:nowrap;cursor:pointer;transition:background .2s,transform .2s}
.v2-pill:hover{background:var(--lit);transform:translateY(-1px)}
.v2-pill .ui-icon{width:14px;height:14px}
.v2-pill-solid{background:var(--ink);border-color:var(--ink);color:var(--surface)}
.v2-pill-solid:hover{background:var(--ink);opacity:.88}
html[data-acct=dark] .v2-pill-solid .ui-icon{filter:none}
html[data-acct=light] .v2-pill-solid .ui-icon{filter:invert(1)}
.v2-pill-small{min-height:30px;padding:0 12px;font-size:12px}

/* gauge */
.v2-gauge{position:relative;width:min(100%,260px);margin:24px auto 6px}
.v2-gauge svg{display:block;width:100%;height:auto;overflow:visible}
.v2-gauge path{fill:none;stroke-width:7;stroke-linecap:round}
.v2-gauge .track{stroke:var(--line)}
.v2-gauge .fill{stroke:var(--tint)}
.v2-gauge-value{position:absolute;left:0;right:0;bottom:2px;display:flex;align-items:baseline;justify-content:center;gap:6px}
.v2-gauge-value b{font-size:60px;font-weight:200;letter-spacing:-.01em;line-height:1}
.v2-gauge-value span{color:var(--muted);font-size:17px}
.v2-gauge-word{margin:12px 0 0;text-align:center;font-size:15px}
.v2-gauge-card .v2-mono{text-align:center}

/* lists */
.v2-devices{list-style:none;margin:16px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.v2-devices li{display:flex;align-items:center;gap:12px;padding:12px 14px;background:var(--lit);border-radius:16px}
.v2-device-dot{flex:none;width:6px;height:6px;border-radius:50%;background:var(--tint)}
.v2-device-main{flex:1;min-width:0}
.v2-device-main strong{display:block;font-size:14px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v2-device-main p{margin:2px 0 0;color:var(--muted);font-size:12px}
.v2-devices .v2-mono{margin:0}
.v2-empty{padding:22px 0 4px}
html[data-acct] .v2-empty h3{margin:0 0 8px;font-size:16px;font-weight:500}
.v2-empty p{margin:0 0 16px;color:var(--muted);font-size:14px;line-height:1.6}
.v2-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:18px}
.v2-row strong{font-size:14px;font-weight:500}
.v2-row p{margin:4px 0 0;color:var(--muted);font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.v2-row .v2-mono{margin:0}
html[data-acct] .connect-apps{display:flex;gap:10px;margin:0 0 18px}
html[data-acct] .connect-apps img{width:32px;height:32px;border-radius:9px;object-fit:contain}

/* plans */
.v2-periods{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin:0 0 18px;padding:4px;border:1px solid var(--line);border-radius:999px;background:var(--card);-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px)}
.v2-periods label{cursor:pointer}
.v2-periods input{position:absolute;opacity:0;pointer-events:none}
.v2-periods span{display:flex;align-items:center;justify-content:center;min-height:40px;border-radius:999px;color:var(--muted);font-size:13px;font-weight:500}
.v2-periods input:checked+span{background:var(--ink);color:var(--surface)}
.v2-periods input:focus-visible+span{outline:2px solid var(--ink);outline-offset:2px}
.v2-plans{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.v2-plans .v2-pill{width:100%;min-height:46px}
.v2-features{list-style:none;margin:20px 0 0;padding:0;display:grid;gap:10px;color:var(--muted);font-size:13px}
.v2-features li{display:flex;align-items:center;gap:9px}
.v2-features .ui-icon{width:14px;height:14px;flex:none}
.v2-note{margin:16px 4px 0;color:var(--muted);font-size:12px;line-height:1.6}

/* dialog, toast, loading */
html[data-acct] .account-dialog{background:var(--solid);color:var(--ink);border:1px solid var(--line-2);border-radius:26px}
html[data-acct] .account-dialog::backdrop{background:rgba(0,0,0,.6)}
html[data-acct] .account-dialog p{color:var(--muted)}
html[data-acct] .account-dialog #dialog-title{font-weight:500;letter-spacing:0}
html[data-acct] .account-dialog select,html[data-acct] .connection-link,html[data-acct] .auth-form input{background:var(--card-2);color:var(--ink);border:1px solid var(--line-2)}
html[data-acct] .dialog-preview-note{background:var(--lit);color:var(--muted);border:0}
html[data-acct] .account-button.primary{background:var(--ink);color:var(--surface)}
html[data-acct=dark] .account-button.primary .ui-icon{filter:none}
html[data-acct] .account-button.secondary{background:none;color:var(--ink);border-color:var(--line-2)}
html[data-acct] .text-button{color:var(--ink)}
html[data-acct] .toast{background:var(--ink);color:var(--surface)}
html[data-acct] .account-loading{background:var(--surface);color:var(--muted)}

/* login */
html[data-acct] .login-page{background:var(--surface)}
html[data-acct] .login-header{display:flex;align-items:center;gap:10px}
html[data-acct] .login-header .brand-home{margin-right:auto}
html[data-acct] .login-header .lang-toggle{margin:0}
html[data-acct] .login-header .quiet-link{margin:0}
html[data-acct] .login-content h1{font-size:clamp(34px,3.6vw,46px);font-weight:200;letter-spacing:-.015em;line-height:1.15}
html[data-acct] .login-existing{color:var(--muted)}
html[data-acct] .auth-note,html[data-acct] #login-description{color:var(--muted)}
#telegram-login{margin-top:10px}

@media(max-width:1020px){
  html[data-acct] .account-shell{display:block}
  html[data-acct] .account-sidebar{position:static;height:auto;margin:10px;padding:16px;gap:12px;border-radius:24px;overflow:visible}
  html[data-acct] .account-navigation{flex-direction:row;overflow-x:auto;scrollbar-width:none}
  html[data-acct] .account-navigation a{flex:none}
  #side-meters,html[data-acct] .sidebar-bottom{display:none}
  html[data-acct] .account-topbar{padding:6px 20px 0}
  html[data-acct] .account-main{padding:14px 20px 28px}
  html[data-acct] .account-footer{padding:0 20px 20px}
  .v2-grid,.v2-plans{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:560px){
  html[data-acct] #account-email,html[data-acct] .account-identity .quiet-link{display:none}
  .v2-head{flex-direction:column;align-items:stretch}
  .v2-card{padding:22px;border-radius:24px}
  .v2-card-top{flex-direction:column}
  .v2-periods{border-radius:22px;grid-template-columns:repeat(2,1fr)}
  .v2-row{flex-direction:column;align-items:flex-start}
  .v2-devices li{flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){.v2-pill{transition:none}.v2-pill:hover{transform:none}}

/* Telegram linking dialog: two marks joined by a line that runs, then settles on a check */
html[data-acct] .account-dialog:has(.v2-link){width:min(440px,calc(100vw - 32px));padding:30px 32px 28px;border-radius:30px;text-align:center;background:radial-gradient(90% 70% at 50% 0,var(--tint-soft),transparent 70%),var(--solid)}
html[data-acct] .account-dialog:has(.v2-link) .dialog-heading{position:static;display:block;margin:0}
html[data-acct] .account-dialog:has(.v2-link) #dialog-title{margin:0;padding:0 18px;font-size:27px;font-weight:300;letter-spacing:-.01em;line-height:1.2;text-wrap:balance}
html[data-acct] .account-dialog:has(.v2-link) #close-dialog{position:absolute;top:18px;right:18px}
.v2-link{display:flex;flex-direction:column;align-items:center;margin-top:12px}
.v2-link-visual{order:-1;display:flex;align-items:center;justify-content:center;margin:0 0 -2px}
.account-dialog:has(.v2-link) .dialog-heading{order:0}
.v2-link-visual{width:100%;margin:6px 0 2px}
.v2-link-badge{display:grid;place-items:center;flex:none;width:58px;height:58px;border:1px solid var(--line-2);border-radius:18px;background:var(--lit);color:var(--ink)}
.v2-link-badge .brand-mark{width:28px;height:28px}
.v2-link-badge .pill-icon{width:26px;height:26px}
.v2-link-line{position:relative;flex:0 1 110px;height:32px;margin:0 8px;background:linear-gradient(90deg,var(--line-2) 50%,transparent 50%) center/9px 2px repeat-x}
.v2-link-line>i{position:absolute;top:50%;left:0;width:8px;height:8px;margin-top:-4px;border-radius:50%;background:var(--tint);box-shadow:0 0 12px var(--tint);animation:v2-run 1.5s ease-in-out infinite}
.v2-link-visual.is-done .v2-link-line{background:linear-gradient(#34c759,#34c759) center/100% 2px no-repeat;animation:v2-fade .3s ease both}
.v2-link-visual.is-done .v2-link-line>i{display:none}
.v2-link-visual.is-done .v2-link-badge{border-color:#34c759}
.v2-link-line svg{position:absolute;top:50%;left:50%;width:34px;height:34px;margin:-17px 0 0 -17px;fill:var(--solid);stroke:#34c759;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.v2-link-line circle{stroke-dasharray:151;stroke-dashoffset:151;transform:rotate(-90deg);transform-origin:center;animation:v2-draw .5s ease-out forwards}
.v2-link-line path{fill:none;stroke-dasharray:36;stroke-dashoffset:36;animation:v2-draw .3s .4s ease-out forwards}
html[data-acct] .v2-link-text{max-width:320px;margin:16px 0 22px;color:var(--muted);font-size:14px;line-height:1.55}
.v2-link-open{width:100%;min-height:50px;font-size:15px}
.v2-link-open .pill-icon{width:18px;height:18px}
html[data-acct] .v2-link-status{display:inline-flex;align-items:center;justify-content:center;gap:9px;margin:16px 0 0;color:var(--muted);font:12px/1.4 ui-monospace,"SF Mono",Menlo,monospace}
.v2-link-status>i{flex:none;width:6px;height:6px;border-radius:50%;background:var(--tint);animation:v2-pulse 1.4s ease-in-out infinite}
.v2-link-status .text-button{padding:0;font:inherit;text-decoration:underline}
@keyframes v2-run{0%{left:0;opacity:0}15%,85%{opacity:1}100%{left:calc(100% - 8px);opacity:0}}
@keyframes v2-draw{to{stroke-dashoffset:0}}
@keyframes v2-pulse{50%{opacity:.25;transform:scale(.7)}}
@keyframes v2-fade{from{opacity:0}}
@media(prefers-reduced-motion:reduce){.v2-link-line>i{animation:none;left:calc(50% - 4px)}.v2-link-status>i,.v2-link-visual.is-done .v2-link-line{animation:none}.v2-link-line circle,.v2-link-line path{animation:none;stroke-dashoffset:0}}
