/* Shared appearance for the cabinet, Mini App and connection pages. */
:root {
  color-scheme: light;
  --page-bg: #edf0f4;
  --panel-solid: #f8f9fa;
  --ink: #161b20;
  --muted: #4c5861;
  --faint: var(--muted);
  --accent: #165b97;
  --button-ink: #ffffff;
  --line: #cbd2d6;
  --control: #e3e8eb;
  --hover: #d9e1e5;
  --danger-ink: #bc2632;
  --danger-paint: #fff0f0;
  --success-ink: #285e49;
  --backdrop: rgb(31 38 44 / 33%);
  --ambient-cool: rgb(139 168 184 / 52%);
  --ambient-warm: rgb(191 183 172 / 40%);
  --card-film: rgb(253 254 253 / 59%);
  --quiet-film: rgb(246 248 247 / 76%);
  --nav-film: rgb(251 252 250 / 82%);
  --sheet-film: rgb(248 249 248 / 90%);
  --tariff-base: #e3e9eb;
  --tariff-film: rgb(190 207 210 / 44%);
  --rim: rgb(40 60 71 / 11%);
  --inner-fill: rgb(70 91 103 / 8%);
  --lens-fill: rgb(87 115 131 / 14%);
  --surface-depth: 0 12px 34px -22px rgb(35 50 58 / 26%);
  --glass-shadow: 0 5px 22px -8px rgb(35 50 58 / 22%);
  --curve: cubic-bezier(.2,.8,.2,1);
  --host-top: 0px; --host-bottom: 0px; --host-left: 0px; --host-right: 0px;
  --app-height: 100svh;
  /* The device reel consumes these semantic material tokens. */
  --matte-control: var(--control); --matte-soft-fill: var(--control);
  --clean-shadow: #00000012;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none; line-height: 1.5; background: var(--page-bg);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  /* Black ground, charcoal content and a raised navigation layer. Neutral
     channels keep the material black even when multiple films overlap. */
  --page-bg: #000000; --panel-solid: #171717; --ink: #f5f5f5;
  --muted: #b5b5b5; --accent: #f2f2f2; --button-ink: #0a0a0a;
  --line: #333333; --control: #242424; --hover: #303030;
  --danger-ink: #ffaba6; --danger-paint: #361c1c;
  --success-ink: #a5d6b5;
  --backdrop: rgb(0 0 0 / 64%); --clean-shadow: #00000066;
  --ambient-cool: rgb(255 255 255 / 5.5%);
  --ambient-warm: rgb(255 255 255 / 2.5%);
  --card-film: rgb(22 22 22 / 76%);
  --quiet-film: rgb(24 24 24 / 84%);
  --nav-film: rgb(15 15 15 / 92%);
  --sheet-film: rgb(18 18 18 / 98%);
  --tariff-base: var(--panel-solid);
  --tariff-film: var(--card-film);
  --rim: rgb(255 255 255 / 11%);
  --inner-fill: rgb(255 255 255 / 5%);
  --lens-fill: rgb(255 255 255 / 9.5%);
  --surface-depth: 0 16px 36px -23px rgb(0 0 0 / 80%);
  --glass-shadow: 0 8px 25px -10px rgb(0 0 0 / 80%);
}

/* Surfaces share the same opaque fallback. Optical filters stay on the few
   containing surfaces, outside the scrolling rows and animated device models. */
:root {
  --card-paint: var(--panel-solid);
  --nav-paint: var(--panel-solid);
  --quiet-paint: var(--panel-solid);
  --sheet-paint: var(--panel-solid);
  --sheet-environment: none;
  --tariff-paint: var(--tariff-base);
  --card-filter: none;
  --nav-filter: none;
  --scrim-filter: none;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --card-paint: var(--card-film);
    --nav-paint: var(--nav-film);
    --quiet-paint: var(--quiet-film);
    --sheet-paint: var(--sheet-film);
    --sheet-environment:
      radial-gradient(ellipse 88% 75% at 97% 18%,color-mix(in srgb,var(--ambient-cool) 55%,transparent),transparent 88%),
      radial-gradient(ellipse 82% 71% at 7% 85%,color-mix(in srgb,var(--ambient-warm) 40%,transparent),transparent 90%);
    --tariff-paint: var(--tariff-film);
    --card-filter: blur(18px);
    --nav-filter: blur(22px);
    --scrim-filter: blur(5px);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 280px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100svh; color: var(--ink); font-size: 17px; -webkit-font-smoothing: antialiased; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: 34px; line-height: 1.15; letter-spacing: -.035em; font-weight: 700; }
h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.025em; font-weight: 650; }
h3 { font-size: 17px; line-height: 1.4; font-weight: 600; }
button,input,textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .42; cursor: default; }
button,a,summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration-thickness: 1px; text-underline-offset: 3px; }
button,a,input,textarea,summary,[tabindex] { outline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: color-mix(in srgb,var(--accent) 24%,transparent); }
.muted,.small,.eyebrow { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 13px; font-weight: 500; }
.sr-only,.reel-announcement { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 18px; border-radius: 14px; background: var(--accent); color: var(--button-ink); }
.skip-link:focus { top: 16px; }
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--page-bg); }
.light-field {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 88% 75% at 97% 18%, var(--ambient-cool), transparent 88%),
    radial-gradient(ellipse 82% 71% at 7% 85%, var(--ambient-warm), transparent 90%);
}
.app-shell { max-width: 1080px; margin: auto; padding: 0 32px; }
.topbar { height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { display: flex; align-items: center; width: 96px; min-height: 44px; line-height: 0; flex: none; }
.wordmark svg { width: 100%; height: auto; stroke: none; mix-blend-mode: multiply; filter: grayscale(1) invert(1) contrast(1.15); }
:root[data-theme="dark"] .wordmark svg { mix-blend-mode: lighten; filter: grayscale(1) contrast(1.15); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button,.avatar { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--muted); transition: transform .16s var(--curve); }
.icon-button svg { width: 21px; height: 21px; }
.avatar { background: var(--control); color: var(--ink); font-size: 15px; font-weight: 600; }
.icon-button:hover:not(:disabled),.avatar:hover { background: var(--hover); color: var(--ink); }
.icon-button:active:not(:disabled) { transform: scale(.94); }
.topbar-action { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; color: var(--accent); }

/* Navigation can pick up the color of the content scrolling beneath it. */
#workspace { position: relative; }
.dock {
  position: absolute; left: 50%; top: -77px; transform: translateX(-50%); z-index: 5;
  display: flex; isolation: isolate; padding: 5px; gap: 2px; border-radius: 99px;
  border: 1px solid var(--rim);
  background: var(--nav-paint);
  -webkit-backdrop-filter: var(--nav-filter); backdrop-filter: var(--nav-filter);
  box-shadow: var(--glass-shadow);
}
.dock button { display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; min-height: 44px; padding: 10px 16px; gap: 7px; border: 0; border-radius: 99px; background: none; color: var(--muted); font-size: 13px; font-weight: 500; }
.dock button[aria-current] { color: var(--accent); }
.dock-indicator { position: absolute; inset: 0 auto auto 0; height: 0; width: 0; border-radius: 99px; background: var(--lens-fill); pointer-events: none; transition: transform .24s var(--curve),width .24s var(--curve),height .24s var(--curve); }
#main { min-height: calc(100svh - 100px); padding: 32px 0 72px; outline: none; }
.workspace-section,.matte-home { max-width: 940px; margin: 0 auto; }
.section-heading,.home-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 24px; min-height: 48px; }
.section-caption { color: var(--muted); font-size: 14px; margin-top: 6px; }
.home-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(240px,1fr); align-items: start; gap: 32px; }
.home-primary,.home-secondary { min-width: 0; }
.frosted,.surface,.section-glass,.quiet-surface {
  position: relative;
  border-radius: 28px;
  border: 1px solid var(--rim);
  background: var(--card-paint);
  box-shadow: var(--surface-depth);
}
.frosted,.surface,.section-glass {
  -webkit-backdrop-filter: var(--card-filter);
  backdrop-filter: var(--card-filter);
}
.quiet-surface { background: var(--quiet-paint); }
.connection-workspace { overflow: hidden; }
.connection-focus { padding: 18px 28px 10px; }
.home-device-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin: 0 -7px 2px; }
.home-device-picker { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 0; padding: 8px; border: 0; border-radius: 12px; background: none; color: var(--muted); font-size: 14px; }
.home-device-picker>svg:first-child { width: 19px; height: 19px; }
.home-device-picker>.home-picker-chevron { width: 13px; height: 13px; }
.home-device-picker:hover:not(:disabled) { background: var(--control); color: var(--ink); }
.status-line { color: var(--muted); font-size: 14px; line-height: 1.5; }
.matte-home .reel-status { text-align: center; margin: 1px 0 0; min-height: 21px; font-size: 14px; }
.access-pill { color: var(--muted); font-size: 14px; line-height: 1.5; }
.inactive,.destructive,.form-error { color: var(--danger-ink); }
.matte-home .connection-focus>.access-pill { display: block; margin-top: 3px; text-align: center; font-size: 13px; }
.home-import,.matte-home .home-import { margin-top: 22px; }
.button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 12px 18px; border: 0; border-radius: 99px; font-size: 16px; font-weight: 600; line-height: 1.35; transition: transform .16s var(--curve),opacity .16s; }
.button svg { width: 20px; height: 20px; }
.button:active:not(:disabled) { transform: scale(.98); }
.primary { background: var(--accent); color: var(--button-ink); }
.primary:hover:not(:disabled) { filter: brightness(.96); }
.secondary { background: var(--inner-fill); color: var(--ink); font-weight: 500; }
.secondary:hover:not(:disabled) { background: var(--hover); }
.danger { background: var(--danger-paint); color: var(--danger-ink); }
.compact { min-height: 44px; padding: 10px 16px; font-size: 15px; }
.home-import>.primary { width: 100%; min-height: 52px; justify-content: space-between; padding: 14px 20px; }
.home-import-note,.home-empty-note { color: var(--muted); font-size: 13px; text-align: center; margin: 9px 0 0; line-height: 1.5; }
.home-empty-note { display: none; }
.empty-profile .home-empty-note { display: block; }
.empty-profile .home-import-note,.empty-profile .home-transfer,.empty-profile .home-detail-tools,.empty-profile .device-insights-entry,.empty-profile .home-device-toolbar { display: none; }
.access-expired .home-transfer,.access-expired .home-detail-tools { display: none; }
.access-expired .reel-status { color: var(--danger-ink); }
.home-transfer,.quick-actions { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 8px; margin-top: 18px; }
.home-transfer .button,.quick-actions .button { min-height: 44px; padding: 10px 8px; font-size: 14px; font-weight: 500; }
.home-transfer svg,.quick-actions svg { width: 18px; height: 18px; }
.quick-actions .button { gap: 6px; font-size: 13px; }
.quick-actions .button>span { white-space: nowrap; }
.device-insights-entry { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin-top: 14px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--muted); text-align: left; font-size: 13px; }
.device-insights-entry>span:first-child { display: flex; gap: 8px; flex-wrap: wrap; }
.device-insights-entry strong { font-weight: 500; color: var(--muted); font-size: 13px; }
.device-insights-link { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.device-insights-link svg { width: 13px; height: 13px; }
.device-insights-entry:hover:not(:disabled) { color: var(--ink); }
.home-detail-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.methods-entry { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 10px 0; border: 0; background: none; color: var(--muted); font-size: 13px; text-align: left; }
.methods-entry svg { width: 13px; height: 13px; }
.methods-number { padding: 1px 5px; border-radius: 5px; background: var(--control); font-size: 12px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 0; border: 0; background: none; color: var(--accent); font-size: 15px; line-height: 1.4; }
.text-button svg { width: 18px; height: 18px; }
.text-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.pass-pager { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; }
.pass-pager .text-button { font-size: 14px; }
.home-guide { padding: 25px 4px; }
.home-guide h2 { font-size: 20px; }
.home-guide .steps { margin: 25px 0 8px; }
.home-guide-link,.home-install { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; width: 100%; padding: 10px 0; border: 0; background: none; text-align: left; color: var(--accent); font-size: 15px; }
.home-guide-link>span { display: grid; gap: 2px; }
.home-guide-link strong { font-size: 15px; font-weight: 500; }
.home-guide-link>span>span { color: var(--muted); font-size: 13px; }
.home-guide-link svg,.home-install svg { width: 17px; height: 17px; }

/* Compact spatial selector; no simulated lettering, floor ring or nested glass. */
.matte-home .device-reel { height: 182px; margin: 0 -28px; border-radius: 0; }
.reel-track:before,.reel-emblem,.reel-screen:before,.reel-contact { display: none; }
.reel-slot { height: 166px; top: 0; }
.reel-model { height: 119px; transform: scale(.82); transform-origin: 50% 0; margin-bottom: -1px; }
.reel-hardware { border-color: color-mix(in srgb,var(--ink) 30%,var(--panel-solid)); background: var(--control); box-shadow: 3px 5px 10px var(--clean-shadow); }
.reel-screen { background: color-mix(in srgb,var(--accent) 8%,var(--panel-solid)); border-color: color-mix(in srgb,var(--ink) 10%,transparent); }
.reel-name { height: 45px; font-size: 22px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.reel-scale { bottom: 6px; }
.matte-home.empty-profile .device-reel { height: 160px; }

/* Inset grouped lists keep information on a single quiet content plane. */
.device-library { padding: 18px 20px 2px; }
.device-library-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.device-library-tools>.text-button { flex: none; }
.search-field { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; padding: 0 12px; background: var(--control); border-radius: 13px; color: var(--muted); }
.search-field svg { width: 19px; height: 19px; }
.search-field input { width: 100%; min-width: 0; min-height: 44px; border: 0; outline: 0; background: none; color: var(--ink); font-size: 16px; }
.search-field input::placeholder { color: var(--muted); opacity: 1; }
.search-field:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-field .icon-button { margin-right: -10px; }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.config-card { display: flex; align-items: center; gap: 5px; min-width: 0; min-height: 86px; border-bottom: 1px solid var(--line); }
.config-select { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 85px; padding: 12px 0; border: 0; border-radius: 10px; background: none; color: var(--ink); text-align: left; }
.config-description { display: grid; gap: 3px; flex: 1; min-width: 0; }
.config-description b { font-size: 16px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.config-description small { color: var(--muted); font-size: 13px; }
.config-description .config-usage { font-size: 12px; }
.config-select>svg { width: 17px; height: 17px; color: var(--muted); }
.config-select[aria-current]>svg { color: var(--accent); }
.small-icon,.material-symbol { display: inline-grid; place-items: center; width: 40px; height: 44px; flex: none; border-radius: 12px; background: var(--control); color: var(--muted); }
.is-selected .small-icon { color: var(--accent); }
.device-selection { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; background: var(--panel-solid); }
.selection-count { margin-right: auto; color: var(--muted); font-size: 14px; }
.device-selection .text-button { font-size: 14px; }
.device-check { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border: 1.5px solid var(--muted); border-radius: 50%; }
.device-check svg { width: 17px; height: 17px; opacity: 0; }
[aria-checked="true"] .device-check { background: var(--accent); border-color: var(--accent); color: var(--button-ink); }
[aria-checked="true"] .device-check svg { opacity: 1; }
.is-marked { background: color-mix(in srgb,var(--accent) 7%,transparent); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 16px; }
.pagination:empty { display: none; }
.empty-state,.admin-empty { display: grid; grid-column: 1/-1; justify-items: center; align-content: center; text-align: center; gap: 16px; padding: 36px 12px; }
.empty-state>svg,.admin-empty>svg { width: 32px; height: 32px; color: var(--muted); }
.empty-state h2,.admin-empty h2 { font-size: 19px; }
.empty-inline { padding: 20px 0; color: var(--muted); font-size: 15px; }
.device-row { display: flex; align-items: center; gap: 12px; min-height: 56px; width: 100%; padding: 12px 8px; border: 0; border-bottom: 1px solid var(--line); background: none; border-radius: 10px; color: var(--ink); text-align: left; font-size: 16px; }
.device-row>span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.device-row>svg:last-child { width: 17px; height: 17px; color: var(--accent); }
.device-row:hover:not(:disabled) { background: var(--control); }
.device-picker { margin-top: 12px; }

.access-layout,.help-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 24px; }
.access-card,.help-guide { padding: 26px; }
.access-identity,.material-heading { display: flex; align-items: center; gap: 14px; }
.access-identity>div { min-width: 0; }
.access-identity h2 { overflow-wrap: anywhere; }
.access-identity .access-pill { display: block; margin-top: 4px; }
.access-metrics { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin: 28px 0 24px; }
.access-date>span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 14px; }
.access-date>strong { font-size: 26px; letter-spacing: -.03em; font-weight: 600; font-variant-numeric: tabular-nums; }
.access-devices { display: grid; grid-template-columns: 1fr 18px; align-content: center; align-items: center; gap: 6px; min-height: 60px; padding: 0 0 0 16px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--ink); text-align: left; }
.access-devices>span { grid-column: 1/-1; color: var(--muted); font-size: 14px; }
.access-devices>strong { font-size: 18px; font-weight: 600; white-space: nowrap; }
.access-devices>svg { width: 17px; height: 17px; color: var(--muted); }
.access-card>.primary,.help-guide>.primary { width: 100%; justify-content: space-between; }
.account-admin { width: 100%; margin-top: 6px; }
.account-details { margin-top: 18px; border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.account-details summary,.insights-disclosure summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; font-size: 14px; color: var(--muted); }
summary>svg { width: 15px; height: 15px; transition: transform .18s; }
details[open]>summary>svg { transform: rotate(180deg); }
.account-secondary { display: grid; gap: 18px; }
.appearance-settings { padding: 0 20px; }
.appearance-setting { display: flex; align-items: center; gap: 12px; min-height: 56px; width: 100%; padding: 10px 0; border: 0; background: none; color: var(--ink); text-align: left; font-size: 15px; }
.appearance-current { margin-left: auto; color: var(--muted); font-size: 14px; }
.preference { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 58px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.preference input { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 51px; height: 31px; margin: 0; border: 0; border-radius: 99px; background: var(--hover); transition: background .18s; cursor: pointer; }
.preference input:after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #00000026; transition: transform .18s var(--curve); }
.preference input:checked { background: #248a3d; }
.preference input:checked:after { transform: translateX(20px); }
.account-usage { padding: 22px; }
.account-usage-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.account-usage-heading h2 { font-size: 15px; font-weight: 500; color: var(--muted); }
.traffic-total { font-size: 25px; font-weight: 600; letter-spacing: -.03em; }
.data-list { margin: 16px 0 0; }
.data-list>div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.data-list>div:last-child { border-bottom: 0; }
.data-list dt { color: var(--muted); }
.data-list dd { display: flex; align-items: center; gap: 5px; margin: 0; text-align: right; overflow-wrap: anywhere; }
.usage-note,.account-renewal { color: var(--muted); font-size: 14px; margin-top: 12px; }
.account-secondary>#logout { justify-self: center; color: var(--muted); }
.signin-entry { justify-content: space-between; width: 100%; }
.steps { list-style: none; margin: 25px 0; padding: 0; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 4px 12px; margin-bottom: 22px; font-size: 15px; }
.steps li:last-child { margin-bottom: 0; }
.steps li:before { counter-increment: step; content: counter(step) / ''; grid-row: span 2; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--control); color: var(--muted); font-size: 13px; font-weight: 600; }
.steps b { font-size: 16px; font-weight: 600; }
.steps li>span,.steps li>a { grid-column: 2; color: var(--muted); }
.steps a { display: inline-flex; align-items: center; gap: 5px; color: var(--accent) !important; min-height: 44px; }
.steps svg { width: 16px; height: 16px; }
.help-questions-group { padding: 22px 22px 4px; }
.help-questions-group>h2 { font-size: 18px; margin-bottom: 8px; }
.help-questions details { border-bottom: 1px solid var(--line); }
.help-questions details:last-child { border-bottom: 0; }
.help-questions summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; min-height: 54px; font-size: 15px; font-weight: 500; }
.help-questions p,.details-content { color: var(--muted); padding: 0 0 18px; font-size: 15px; line-height: 1.6; }
.help-questions p { margin-top: 0; }

/* Modal text has a denser surface than the controls floating around it. */
.sheet,.appearance-dialog { color: var(--ink); width: min(480px,calc(100% - 32px)); max-height: calc(var(--app-height) - var(--host-top) - var(--host-bottom) - 32px); margin: auto; padding: 24px; border: 1px solid var(--rim); border-radius: 28px; background: var(--sheet-paint); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: var(--nav-filter); backdrop-filter: var(--nav-filter); overflow: auto; overscroll-behavior: contain; }
.sheet::backdrop,.appearance-dialog::backdrop {
  background:var(--backdrop); -webkit-backdrop-filter:var(--scrim-filter); backdrop-filter:var(--scrim-filter);
}
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.dialog-heading h2 { min-width: 0; overflow-wrap: anywhere; font-size: 22px; }
.dialog-heading .icon-button { margin-right: -8px; background: var(--control); }
.dialog-form { display: grid; gap: 18px; }
.field-label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
.text-field,.copy-field { display: block; width: 100%; min-height: 48px; padding: 12px; border: 1px solid transparent; border-radius: 12px; background: var(--control); color: var(--ink); font-size: 16px; resize: vertical; }
.copy-field { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 14px; overflow-wrap: anywhere; }
.preset-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin-bottom: 20px; }
.preset { min-height: 44px; padding: 10px 7px; border: 0; border-radius: 12px; background: var(--control); color: var(--ink); font-size: 14px; }
.preset:hover { background: var(--hover); }
.preset[aria-pressed="true"] { color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.settings-actions { display: grid; margin-top: 18px; border-top: 1px solid var(--line); }
.settings-actions .text-button { justify-content: flex-start; min-height: 50px; }
.settings-actions .destructive { color: var(--danger-ink); }
.dialog-description { margin: 16px 0 20px; font-size: 15px; line-height: 1.6; }
#dialog-content>.button { width: 100%; margin-top: 10px; }
.form-error { margin-top: 12px; font-size: 15px; }
.delete-targets { list-style: none; padding: 0; margin: 0; max-height: 180px; overflow: auto; }
.delete-targets li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.delete-targets li:last-child { border-bottom: 0; }
.qr-frame { width: fit-content; max-width: 100%; background: #fff; border-radius: 20px; padding: 16px; margin: 12px auto 20px; }
.qr-frame img { display: block; max-width: 100%; height: auto; }
.method-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; font-size: 16px; }
.method-row svg { width: 19px; height: 19px; color: var(--muted); }
.method-options { margin-bottom: 24px; }
.method-subscription-label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 14px; }
.manual-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.toast { position: fixed; bottom: calc(24px + var(--host-bottom)); left: 50%; transform: translateX(-50%); z-index: 20; width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-solid); box-shadow: var(--glass-shadow); font-size: 15px; }
.loading>svg { animation: refresh-spin .8s linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
.boot-screen { display: grid; place-content: center; min-height: 45svh; color: var(--muted); text-align: center; font-size: 16px; }
.boot-screen>p:before { content: ''; display: block; width: 20px; height: 20px; margin: 0 auto 18px; border: 2px solid var(--line); border-top-color: var(--muted); border-radius: 50%; animation: refresh-spin .8s linear infinite; }
.entry-screen { max-width: 430px; margin: 60px auto; padding: 32px; }
.entry-screen h1 { font-size: 30px; }
.entry-screen>.muted { margin: 14px 0 26px; font-size: 16px; }
.entry-screen>.button { width: 100%; }

.appearance-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.appearance-option { position: relative; min-width: 0; padding: 0; border: 0; border-radius: 16px; background: none; text-align: center; color: var(--ink); }
.appearance-swatch { position: relative; display: grid; place-items: center; height: 114px; border: 2px solid var(--line); border-radius: 16px; }
.appearance-option[aria-checked="true"] .appearance-swatch { border-color: var(--accent); }
.swatch-system { color: #f5f7fa; background: linear-gradient(90deg,#e4e9eb 50%,#0b0b0b 50%); }
.swatch-light { background: #e4e9eb; color: #151b23; }
.swatch-dark { background: #0b0b0b; color: #f5f5f5; }
.swatch-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #88888818; }
.swatch-system .swatch-mark { background: #606068; }
.swatch-line,.swatch-pill { display: none; }
.appearance-caption { display: block; padding: 14px 0 6px; font-size: 14px; }
.appearance-caption svg { position: absolute; right: 6px; top: 6px; width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--accent); color: var(--button-ink); opacity: 0; }
.appearance-option[aria-checked="true"] .appearance-caption svg { opacity: 1; }

/* Device details and administration follow the same list hierarchy. */
.insights-view { display: grid; gap: 24px; }
.insights-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px; border-radius: 18px; background: var(--control); }
.insights-total { min-width: 0; }
.insights-total span { display: block; margin-bottom: 7px; font-size: 14px; color: var(--muted); }
.insights-total strong { font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.insights-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.insights-section-title>span,.insights-note { font-size: 14px; color: var(--muted); }
.insights-loading { color: var(--muted); font-size: 16px; }
.insights-facts { margin: 0; }
.insights-facts>div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.insights-facts dt { color: var(--muted); }
.insights-facts dd { margin: 0; text-align: right; }
.insights-chart { height: 94px; display: flex; align-items: end; gap: 3px; border-bottom: 1px solid var(--line); }
.insights-bar { flex: 1; min-width: 0; height: var(--bar-height,3px); background: var(--accent); border-radius: 3px 3px 0 0; }
.insights-bar[data-empty="true"] { background: var(--line); }
.insights-chart-labels { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 12px; }
.insights-client { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.insights-client-body { display: grid; gap: 3px; min-width: 0; }
.insights-client-body b { font-size: 15px; overflow-wrap: anywhere; }
.insights-client-body small { font-size: 13px; color: var(--muted); }
.insights-events { list-style: none; padding: 0; margin: 0; }
.insights-events li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; }
.insights-events time { color: var(--muted); text-align: right; }
.insights-disclosure { border-top: 1px solid var(--line); }
.overview-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 22px; padding: 20px 0 0; }
.metric { min-width: 0; padding: 0 20px; border-right: 1px solid var(--line); }
.metric:nth-child(3) { border-right: 0; }
.metric>span,.metric>b { display: block; }
.metric>b { font-size: 27px; margin-top: 6px; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.metric:nth-child(4) { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-top: 1px solid var(--line); padding: 12px 20px; margin-top: 18px; }
.metric:nth-child(4)>b { margin: 0; font-size: 14px; }
.overview-strip[data-ready="false"] .metric:last-child>b { color: var(--danger-ink); }
.admin-library { padding: 18px 20px 0; }
.admin-toolbar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; margin-bottom: 12px; }
.segmented { display: flex; gap: 3px; padding: 4px; border-radius: 13px; background: var(--control); }
.segmented button { flex: 1; min-height: 44px; padding: 9px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 14px; }
.segmented button[aria-pressed="true"] { background: var(--panel-solid); color: var(--ink); box-shadow: 0 1px 3px #00000012; }
.admin-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.admin-row:last-child { border-bottom: 0; }
.admin-inspect { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 88px; padding: 15px 0; border: 0; background: none; text-align: left; color: var(--ink); }
.admin-inspect>svg { width: 15px; height: 15px; color: var(--muted); }
.admin-row-body { display: grid; gap: 4px; flex: 1; min-width: 0; }
.admin-row-body b { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.admin-state,.admin-row-meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.admin-entry-symbol { display: grid; place-items: center; width: 40px; height: 44px; flex: none; border-radius: 12px; background: var(--control); color: var(--muted); font-size: 16px; }
.admin-row[data-state="active"] .admin-entry-symbol { color: var(--accent); }
.admin-row[data-state="blocked"] .admin-state { color: var(--danger-ink); }
.admin-feedback { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 88px; padding: 16px 0; color: var(--muted); font-size: 15px; }
.admin-form-intro,.admin-form-note,.admin-dialog-status { margin-bottom: 18px; color: var(--muted); font-size: 15px; }
.admin-presets { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.admin-dialog-actions { display: grid; gap: 10px; margin-top: 18px; }
.admin-data { margin-bottom: 20px; }
.admin-form-note { margin: 14px 0 0; font-size: 14px; }

/* Public and personal connection pages share the same controls. */
.landing { max-width: 1040px; margin: auto; padding: 0 32px; }
.landing-main { display: grid; place-items: center; min-height: calc(100svh - 180px); padding: 40px 0 70px; }
.landing-content { width: 100%; max-width: 460px; padding: 36px; }
.landing-content h1 { font-size: 34px; }
.landing-content>.muted { margin: 16px 0 28px; font-size: 17px; }
.landing-content>.primary { width: 100%; justify-content: space-between; }
.landing-links { display: flex; justify-content: center; margin-top: 12px; }
.landing-footer,.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; color: var(--muted); font-size: 14px; }
.standalone-connect { max-width: 480px; margin: auto; padding: 22px 0 40px; }
.connect-panel { padding: 26px; }
.panel-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.configuration-line { display: flex; align-items: center; gap: 12px; }
.device-symbol { display: grid; place-items: center; width: 44px; height: 48px; flex: none; border-radius: 13px; background: var(--control); color: var(--accent); }
.configuration-name { font-size: 28px; overflow-wrap: anywhere; }
.connect-panel .status-line { margin: 12px 0 24px; }
.connect-panel>.primary { width: 100%; justify-content: space-between; }
.feedback { font-size: 14px; color: var(--accent); }
.feedback:not(:empty) { margin-top: 16px; }
.connection-help { margin-top: 20px; padding: 8px 22px; border-radius: 24px; background: var(--quiet-paint); border: 1px solid var(--rim); }
.connection-footnote { margin-top: 20px; color: var(--muted); font-size: 14px; text-align: center; }
.connection-footnote a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); }

@media (max-width: 800px) {
  body.workspace-page { height: var(--app-height); min-height: 0; overflow: hidden; }
  .workspace-page .app-shell {
    --shell-left: max(20px,env(safe-area-inset-left),var(--host-left));
    --shell-right: max(20px,env(safe-area-inset-right),var(--host-right));
    --dock-bottom: max(10px,env(safe-area-inset-bottom),var(--host-bottom));
    height: 100%; padding: max(env(safe-area-inset-top),var(--host-top)) var(--shell-right) 0 var(--shell-left);
    display: flex; flex-direction: column;
  }
  .topbar { height: 72px; flex: none; }
  .wordmark { width: 88px; }
  .header-actions { gap: 4px; }
  #workspace { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  #workspace::after {
    content:''; position:absolute; z-index:4; pointer-events:none;
    bottom:0; left:calc(0px - var(--shell-left)); right:calc(0px - var(--shell-right));
    height:calc(100px + var(--dock-bottom));
    background:linear-gradient(to bottom,transparent,color-mix(in srgb,var(--page-bg) 72%,transparent) 36px,var(--page-bg) calc(100% - var(--dock-bottom) - 10px));
  }
  #main {
    flex: 1; min-height: 0; overflow: auto; overscroll-behavior-y: contain; scrollbar-width: none;
    margin-inline: calc(0px - var(--shell-left)) calc(0px - var(--shell-right));
    padding: 20px var(--shell-right) calc(88px + var(--dock-bottom)) var(--shell-left);
    scroll-padding-bottom: calc(84px + var(--dock-bottom));
  }
  #main::-webkit-scrollbar { display: none; }
  .dock { position: absolute; inset: auto 0 var(--dock-bottom); width: min(100%,360px); margin-inline: auto; transform: none; padding: 5px; gap: 0; }
  .dock button { flex: 1; flex-direction: column; gap: 3px; min-width: 0; min-height: 56px; padding: 7px 4px; font-size: 11px; line-height: 1.25; }
  .dock button svg { width: 23px; height: 23px; }
  .section-heading,.home-heading { min-height: 44px; margin-bottom: 22px; gap: 10px; }
  h1 { font-size: 30px; }
  .home-layout { grid-template-columns: minmax(0,1fr); gap: 0; }
  .connection-focus { padding: 14px 22px 6px; }
  .home-device-picker { font-size: 13px; }
  .home-transfer .button { font-size: 13px; gap: 7px; }
  .home-import,.matte-home .home-import { margin-top: 20px; }
  .home-import>.primary { font-size: 16px; }
  .device-insights-entry { margin-top: 10px; font-size: 13px; }
  .device-insights-entry strong { font-size: 13px; }
  .pass-pager { min-height: 50px; }
  .home-guide { padding: 8px 5px; }
  .home-guide>h2,.home-guide>.steps { display: none; }
  .home-guide-link>span>span { display: none; }
  .home-guide-link,.home-install { display: inline-flex; width: auto; font-size: 14px; }
  .home-guide-link { float: right; }
  .home-guide-link strong { font-size: 14px; font-weight: 400; }
  .home-guide-link svg { display: none; }
  .matte-home .device-reel { height: 160px; margin-inline: -22px; }
  .reel-slot { top: 0; height: 150px; }
  .reel-model { height: 101px; transform: scale(.7); margin-bottom: 0; }
  .reel-name { height: 42px; font-size: 20px; }
  .matte-home .reel-status { font-size: 13px; }
  .matte-home .connection-focus>.access-pill { font-size: 12px; }
  .matte-home.empty-profile .device-reel { height: 145px; }
  .workspace-section { max-width: 600px; }
  .config-grid { grid-template-columns: minmax(0,1fr); }
  .config-card:last-child { border-bottom: 0; }
  .config-description b { font-size: 16px; }
  .access-layout,.help-layout { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .access-card,.help-guide { padding: 24px; }
  .account-secondary { gap: 16px; }
  .sheet,.appearance-dialog { margin: auto auto max(12px,env(safe-area-inset-bottom),var(--host-bottom)); width: calc(100% - 24px); padding: 22px; max-height: calc(var(--app-height) - max(env(safe-area-inset-top),var(--host-top)) - max(env(safe-area-inset-bottom),var(--host-bottom)) - 24px); }
  .toast { bottom: calc(92px + max(env(safe-area-inset-bottom),var(--host-bottom))); }
  .keyboard-open .dock { display: none; }
  .keyboard-open #workspace::after { display:none; }
  .keyboard-open #main { padding-bottom: 20px; scroll-padding-bottom: 20px; }
  .admin-toolbar { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .admin-toolbar>.primary { width: 100%; justify-content: space-between; }
  .metric { padding: 0 14px; }
  .metric>b { font-size: 24px; }
  .metric>.small { font-size: 12px; }
  .entry-screen { margin: 40px auto; padding: 28px; width: 100%; }
  .landing { padding: 0 22px; }
  .landing-content { padding: 28px; }
  .landing-content h1 { font-size: 30px; }
  .landing-main { min-height: calc(100svh - 160px); }
  .connection-page .app-shell { padding: 0 20px; }
  .standalone-connect { padding-top: 10px; }
  .connect-panel { padding: 24px; }
}
@media (max-width: 370px) {
  .workspace-page .app-shell { --shell-left: max(14px,env(safe-area-inset-left),var(--host-left)); --shell-right: max(14px,env(safe-area-inset-right),var(--host-right)); }
  .topbar { height: 64px; }
  #main { padding-top: 14px; }
  h1 { font-size: 28px; }
  .section-heading,.home-heading { margin-bottom: 16px; }
  .connection-focus { padding-inline: 18px; }
  .matte-home .device-reel { margin-inline: -18px; height: 151px; }
  .reel-model { height: 94px; transform: scale(.64); }
  .reel-slot { top: 0; }
  .reel-name { font-size: 19px; }
  .home-import>.primary { font-size: 15px; padding-inline: 16px; }
  .home-transfer .button { font-size: 12px; gap: 6px; }
  .home-transfer svg { width: 17px; height: 17px; }
  .device-insights-entry>span:first-child { gap: 6px; }
  .device-insights-label,.device-insights-entry strong,.device-insights-link { font-size: 12px; }
  .device-library { padding-inline: 16px; }
  .device-library-tools { gap: 8px; }
  .device-library-tools>.text-button { font-size: 14px; }
  .device-selection .selection-count { flex-basis: 100%; }
  .device-selection>.danger { margin-left: auto; }
  .access-card,.help-guide { padding: 20px; }
  .access-date>strong { font-size: 23px; }
  .preset-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .appearance-options { gap: 8px; }
  .appearance-caption { font-size: 12px; }
  .appearance-swatch { height: 100px; }
  .admin-library { padding-inline: 16px; }
}
@media (max-width: 800px) and (max-height: 740px) {
  .miniapp .topbar { height: 54px; }
  .miniapp #main { padding-top: 10px; }
  .miniapp .home-heading { margin-bottom: 12px; }
  .miniapp .matte-home .device-reel { height: 136px; }
  .miniapp .reel-model { height: 83px; transform: scale(.56); }
  .miniapp .reel-slot { height: 127px; top: 0; }
  .miniapp .reel-name { font-size: 18px; height: 40px; }
  .miniapp .matte-home .home-import { margin-top: 12px; }
  .miniapp .home-device-toolbar { margin-bottom: 0; }
}
@media (min-width: 801px) {
  .miniapp { height: var(--app-height); min-height: 0; overflow: hidden; }
  .miniapp .app-shell { display: flex; flex-direction: column; height: 100%; padding-top: var(--host-top); }
  .miniapp .topbar { height: 70px; flex: none; }
  .miniapp #workspace { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .miniapp #main { flex: 1; min-height: 0; overflow: auto; }
  .miniapp .dock { position: relative; inset: auto; transform: none; align-self: center; order: 2; margin: 10px 0 calc(12px + var(--host-bottom)); }
}
:root[data-reduce-glass="true"] {
  --card-paint: var(--panel-solid);
  --nav-paint: var(--panel-solid);
  --quiet-paint: var(--panel-solid);
  --sheet-paint: var(--panel-solid);
  --sheet-environment: none;
  --tariff-paint: var(--tariff-base);
  --card-filter: none;
  --nav-filter: none;
  --scrim-filter: none;
  --inner-fill: var(--control);
  --lens-fill: var(--control);
}
:root[data-reduce-glass="true"] .light-field { display: none; }
@media (prefers-reduced-transparency: reduce),(prefers-contrast: more) {
  :root, :root[data-theme] {
    --card-paint: var(--panel-solid);
    --nav-paint: var(--panel-solid);
    --quiet-paint: var(--panel-solid);
    --sheet-paint: var(--panel-solid);
    --sheet-environment: none;
    --tariff-paint: var(--tariff-base);
    --card-filter: none;
    --nav-filter: none;
    --scrim-filter: none;
    --inner-fill: var(--control);
    --lens-fill: var(--control);
  }
  .light-field { display: none; }
}
@media (prefers-contrast: more) {
  :root { --muted: #38434a; --line: #858d93; --rim: #848c92; }
  :root[data-theme="dark"] { --muted: #dedede; --line: #8a8a8a; --rim: #909090; }
}
@media (prefers-reduced-motion: reduce) { *,*:before,*:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) {
  .dock,.sheet,.appearance-dialog,.section-glass,.frosted,.surface,.quiet-surface,.connection-help { background: Canvas; color: CanvasText; border: 1px solid CanvasText; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .dock button[aria-current] { color: Highlight; }
  .dock-indicator { background: none; border: 2px solid Highlight; }
  .primary,[aria-checked="true"] .device-check { background: Highlight; color: HighlightText; }
  .ambient { display: none; }
  #workspace::after { display:none; }
  .sheet::backdrop,.appearance-dialog::backdrop { -webkit-backdrop-filter:none; backdrop-filter:none; }
}
