/* The Qube account site, in the website's own look (Cutline: src/styles/tokens.css and
   globals.css, docs/brand/brand-guide.md in the website repo). Light only, like the site,
   with dark Night bands. The fonts are the site's own files, served from here
   (web/fonts/README.md), so nothing loads from anywhere else. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Code Pro";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-code-pro-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Code Pro";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-code-pro-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  --qube-orange: #fd6325;
  --qube-orange-link: #ac2401;
  --qube-orange-on-dark: #ff9964;
  --qube-coal: #16171a;
  --qube-night: #101216;
  --qube-slate: #475467;
  --qube-ash: #8c9299;
  --qube-mist: #d9dde2;
  --qube-warm-white: #f8f7f6;
  --qube-white: #ffffff;
  --qube-border-dark: #2b3038;
  --qube-text-muted: #5f6670;
  --qube-text-muted-dark: #a7adb5;

  --good: #168857;
  --good-soft: #e7f5ee;
  --bad: #b42318;
  --bad-soft: #fdeceb;
  --warm-soft: #fff1e9;
  --field-border: #8c9299;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-code: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --content: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --r-s: 0.65rem;
  --r-m: 1rem;
  --r-l: 1.5rem;
  --shadow-s: 0 1px 2px rgb(22 23 26 / 5%), 0 8px 24px rgb(22 23 26 / 5%);
  --shadow-m: 0 24px 70px rgb(22 23 26 / 14%);
  --ring: 0 0 0 3px var(--qube-warm-white), 0 0 0 6px var(--qube-orange-link);
}

/* A profile's color: its tile, its card's cutline, its choices. The same eight everywhere. */
[data-color="0"] { --p: #fd6325; --p-ink: #16171a; --p-soft: #ffece2; }
[data-color="1"] { --p: #2864dc; --p-ink: #ffffff; --p-soft: #e8effc; }
[data-color="2"] { --p: #168857; --p-ink: #ffffff; --p-soft: #e7f5ee; }
[data-color="3"] { --p: #7650d4; --p-ink: #ffffff; --p-soft: #efeafb; }
[data-color="4"] { --p: #e5a134; --p-ink: #16171a; --p-soft: #fbf1de; }
[data-color="5"] { --p: #c7366d; --p-ink: #ffffff; --p-soft: #fae8ef; }
[data-color="6"] { --p: #0d7f80; --p-ink: #ffffff; --p-soft: #e0f2f1; }
[data-color="7"] { --p: #16171a; --p-ink: #f8f7f6; --p-soft: #eceef0; }

*, *::before, *::after { box-sizing: border-box; }

html {
  min-width: 20rem;
  background: var(--qube-warm-white);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  margin: 0;
  color: var(--qube-coal);
  background: var(--qube-warm-white);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.625;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; outline: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

a {
  color: var(--qube-orange-link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-color: var(--qube-orange); }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

::selection { color: var(--qube-coal); background: rgb(253 99 37 / 30%); }

/* Headings take the focus when a view or a step changes (for screen readers); no ring for that. */
[tabindex="-1"]:focus { outline: none; }

.icon { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon .fill { fill: currentColor; stroke: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* --- Header ------------------------------------------------------------------------------------- */

.skip {
  position: fixed; z-index: 1000; top: 0.75rem; left: 0.75rem;
  padding: 0.65rem 0.85rem; color: var(--qube-warm-white); background: var(--qube-coal);
  border-radius: var(--r-s); font-size: 0.875rem; font-weight: 700; text-decoration: none;
}
.skip:not(:focus) {
  width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.top {
  position: relative;
  z-index: 50;
  background: var(--qube-warm-white);
  border-bottom: 1px solid rgb(217 221 226 / 80%);
}
.top-inner {
  display: flex;
  width: min(100%, var(--content));
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.95rem;
  color: var(--qube-coal);
  border-radius: 0.35rem;
  text-decoration: none;
}
.brand .logo { width: 11.75rem; height: auto; }
.brand-tag {
  padding: 0.2rem 0 0.2rem 0.95rem;
  color: var(--qube-text-muted);
  border-left: 1px solid var(--qube-mist);
  font: 650 0.75rem/1.4 var(--font-code);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; }
.nav-wide { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding-inline: 0.8rem;
  color: var(--qube-coal);
  background: none;
  border: 0;
  border-radius: var(--r-s);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.nav-link:hover, .nav-link[aria-current="page"] { background: var(--qube-white); }
.nav-link[aria-current="page"]::after {
  width: 0.35rem; height: 0.35rem; margin-left: 0.5rem;
  background: var(--qube-orange); border-radius: 50%; content: "";
}
.who {
  max-width: 16rem;
  margin: 0 0.4rem 0 1rem;
  padding-left: 1rem;
  overflow: hidden;
  color: var(--qube-text-muted);
  border-left: 1px solid var(--qube-mist);
  font: 500 0.75rem/1.4 var(--font-code);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu { position: relative; display: none; }
.menu-button {
  display: inline-flex; width: 3rem; height: 3rem; align-items: center; justify-content: center;
  color: var(--qube-coal); background: var(--qube-white); border: 1px solid var(--qube-mist);
  border-radius: var(--r-s); cursor: pointer; list-style: none;
}
.menu-button::-webkit-details-marker { display: none; }
.menu[open] .menu-button { border-color: var(--qube-coal); }
.menu-panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + 0.5rem);
  right: 0;
  display: grid;
  width: min(20rem, calc(100vw - 2 * var(--gutter)));
  padding: 0.6rem;
  background: var(--qube-white);
  border: 1px solid var(--qube-mist);
  border-radius: var(--r-m);
  box-shadow: var(--shadow-m);
}
.menu-who {
  margin: 0;
  padding: 0.5rem 0.75rem 0.75rem;
  overflow: hidden;
  color: var(--qube-text-muted);
  border-bottom: 1px solid var(--qube-mist);
  font: 500 0.75rem/1.5 var(--font-code);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-panel .nav-link { justify-content: space-between; min-height: 3rem; font-size: 1rem; }

/* --- Dark bands --------------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--qube-warm-white);
  background: var(--qube-night);
}
.hero-art {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: var(--qube-night) url("/cutline-wide.webp") right center / auto 100% no-repeat;
}
.hero-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgb(8 9 12 / 94%) 0%, rgb(8 9 12 / 80%) 42%, rgb(8 9 12 / 18%) 100%);
}
.hero-inner {
  width: min(100%, var(--content));
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(2.5rem, 5.5vw, 4rem);
}
.hero.split .hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 27rem);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--qube-orange-link);
  font: 700 0.75rem/1.4 var(--font-code);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero .eyebrow { color: var(--qube-orange-on-dark); }
.hero .card .eyebrow { color: var(--qube-orange-link); }
.hero h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 0.96;
  outline: none;
}
.hero.split h1 { max-width: 11ch; font-size: clamp(2.9rem, 5.7vw, 4.7rem); letter-spacing: -0.06em; line-height: 0.95; }
.hero .lede {
  max-width: 36rem;
  margin: 1.35rem 0 0;
  color: var(--qube-mist);
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  line-height: 1.6;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.9rem; }
.hero-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; }
.hero-head .hero-actions { margin-top: 0; }

/* --- Page --------------------------------------------------------------------------------------- */

.page {
  width: min(100%, var(--content));
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) clamp(3.5rem, 8vw, 6rem);
}
.page.narrow { width: min(100%, calc(42rem + 2 * var(--gutter))); }
.page > * + * { margin-top: 1.25rem; }
.back { display: inline-flex; align-items: center; gap: 0.45rem; }
.back .icon { width: 1.1rem; height: 1.1rem; }

.card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.3rem, 3.2vw, 2rem);
  color: var(--qube-coal);
  background: var(--qube-white);
  border: 1px solid var(--qube-mist);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-s);
}
.card h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; font-weight: 680; letter-spacing: -0.015em; line-height: 1.3; }
.card > p, .card .muted { color: var(--qube-text-muted); }
.card p { margin-bottom: 0.9rem; }
.card.cut::before {
  position: absolute;
  z-index: 1;
  top: -3.2rem;
  right: -1.4rem;
  width: 1.4rem;
  height: 8rem;
  background: var(--p, var(--qube-orange));
  transform: rotate(-45deg);
  content: "";
}
.hero .card { box-shadow: 0 30px 80px rgb(0 0 0 / 35%); border-color: transparent; }
.card-icon {
  display: grid; width: 3rem; height: 3rem; place-items: center; margin-bottom: 1.1rem;
  color: var(--qube-orange-link); background: var(--warm-soft); border-radius: 0.9rem;
}
.card-icon .icon { width: 1.5rem; height: 1.5rem; }
.card-icon.good { color: var(--good); background: var(--good-soft); }
.card-icon.bad { color: var(--bad); background: var(--bad-soft); }

.label-code {
  margin: 1.6rem 0 0.35rem;
  color: var(--qube-text-muted);
  font: 650 0.7rem/1.4 var(--font-code);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Buttons ------------------------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1.1rem;
  color: var(--qube-coal);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-s);
  font-size: 0.925rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn .icon { width: 1.15rem; height: 1.15rem; }
.btn.primary { color: var(--qube-coal); background: var(--qube-orange); }
.btn.primary:hover { color: var(--qube-warm-white); background: var(--qube-coal); }
.btn.secondary { background: var(--qube-white); border-color: var(--qube-mist); }
.btn.secondary:hover { border-color: var(--qube-coal); }
.btn.danger { color: var(--qube-white); background: var(--bad); }
.btn.danger:hover { background: #8f1a12; }
.btn.danger-outline { color: var(--bad); background: var(--qube-white); border-color: #e7b4ae; }
.btn.danger-outline:hover { border-color: var(--bad); }
.btn.quiet {
  min-height: 2.75rem;
  padding: 0.45rem 0.2rem;
  color: var(--qube-orange-link);
  font-weight: 650;
}
.btn.quiet:hover span { text-decoration: underline; text-decoration-color: var(--qube-orange); text-underline-offset: 0.18em; }
.btn.quiet.bad { color: var(--bad); }
.btn.quiet.plain { color: var(--qube-coal); }
.btn.wide { width: 100%; }
.hero .btn.secondary { color: var(--qube-warm-white); background: transparent; border-color: #5b6069; }
.hero .btn.secondary:hover { color: var(--qube-orange-on-dark); border-color: var(--qube-orange-on-dark); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.btn:disabled:hover { color: inherit; }
.btn.primary:disabled:hover { color: var(--qube-coal); background: var(--qube-orange); }
.btn[aria-busy="true"] { cursor: progress; }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.75rem; }
.row.end { justify-content: flex-end; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.25rem; }

/* --- Forms -------------------------------------------------------------------------------------- */

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label, .legend { font-size: 0.9rem; font-weight: 650; line-height: 1.4; }
.hint { margin: 0; color: var(--qube-text-muted); font-size: 0.85rem; line-height: 1.5; }
input:not([type="checkbox"]):not([type="radio"]), select {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 0.95rem;
  color: var(--qube-coal);
  background: var(--qube-white);
  border: 1px solid var(--field-border);
  border-radius: var(--r-s);
}
input:not([type="checkbox"]):not([type="radio"]):hover { border-color: var(--qube-slate); }
input:not([type="checkbox"]):not([type="radio"]):focus-visible { border-color: var(--qube-coal); }
input::placeholder { color: #9aa0a7; }
input.code {
  min-height: 4rem;
  padding-inline: 0.5rem;
  font: 600 1.85rem/1 var(--font-code);
  letter-spacing: 0.32em;
  text-align: center;
  text-indent: 0.32em;
  text-transform: uppercase;
}
input.code::placeholder { color: #c3c8ce; letter-spacing: 0.32em; }
.form-error { min-height: 0; margin: 0; color: var(--bad); font-size: 0.9rem; font-weight: 650; }
.form-error:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset > legend { margin-bottom: 0.55rem; padding: 0; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--qube-warm-white);
  border-radius: var(--r-m);
  font-weight: 600;
  cursor: pointer;
}
.check + .row { margin-top: 1rem; }
.check input { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; accent-color: var(--qube-coal); flex: none; }

/* A choice among cards: who a profile is for, whose progress a device backs up. */
.choices { display: grid; gap: 0.6rem; }
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  background: var(--qube-white);
  border: 1px solid var(--qube-mist);
  border-radius: var(--r-m);
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.choice:hover { border-color: var(--qube-ash); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--qube-coal); box-shadow: inset 0 0 0 1px var(--qube-coal); }
.choice:has(input:focus-visible) { box-shadow: var(--ring); }
.choice.disabled { cursor: not-allowed; opacity: 0.6; }
.choice-text { display: grid; min-width: 0; gap: 0.1rem; flex: 1; }
.choice-title { font-weight: 680; line-height: 1.35; }
.choice-sub { color: var(--qube-text-muted); font-size: 0.85rem; line-height: 1.45; }
.choice-mark {
  display: grid; width: 1.35rem; height: 1.35rem; place-items: center; flex: none;
  border: 1.5px solid var(--qube-ash); border-radius: 50%;
}
.choice:has(input:checked) .choice-mark { background: var(--qube-coal); border-color: var(--qube-coal); }
.choice:has(input:checked) .choice-mark::after { width: 0.45rem; height: 0.45rem; background: var(--qube-white); border-radius: 50%; content: ""; }
.choice .glyph {
  display: grid; width: 2.6rem; height: 2.6rem; place-items: center; flex: none;
  color: var(--qube-slate); background: var(--qube-warm-white); border-radius: 0.8rem;
}

.swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0.5rem; max-width: 25rem; }
.swatch {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  color: var(--p-ink);
  background: var(--p);
  border-radius: 0.8rem;
  cursor: pointer;
}
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.swatch .icon { width: 1.2rem; height: 1.2rem; stroke-width: 2.6; opacity: 0; pointer-events: none; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--qube-white), 0 0 0 5px var(--qube-coal); }
.swatch:has(input:checked) .icon { opacity: 1; }
.swatch:has(input:focus-visible) { box-shadow: var(--ring); }

/* --- A profile's tile: its initial on its color, with the Q's 45-degree cut. -------------------- */

.tile { width: 3.25rem; height: 3.25rem; flex: none; }
.tile.s { width: 2.6rem; height: 2.6rem; }
.tile.l { width: 3.75rem; height: 3.75rem; }
.tile.xl { width: 4.5rem; height: 4.5rem; }
.tile-bg { fill: var(--p); }
.tile-ink { fill: var(--p-ink); font: 750 23px/1 var(--font-sans); letter-spacing: -0.02em; }

/* --- Your family -------------------------------------------------------------------------------- */

.profiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
  align-items: start;
  gap: 1.25rem;
}
.profile { display: grid; gap: 0; }
.profile-head { display: flex; align-items: center; gap: 1rem; padding-right: 2rem; }
.profile-head h2 { margin: 0; overflow-wrap: anywhere; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.45rem; }

.status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.55rem;
  color: var(--qube-coal);
  background: var(--qube-warm-white);
  border: 1px solid rgb(22 23 26 / 8%);
  border-radius: 999px;
  font: 700 0.66rem/1.35 var(--font-code);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status .dot {
  width: 0.42rem; height: 0.42rem; flex: none;
  background: var(--dot, var(--qube-ash)); border: 1px solid currentColor; border-radius: 50%;
}
.status.good { background: var(--good-soft); --dot: var(--good); }
.status.bad { background: var(--bad-soft); --dot: var(--bad); }
.status.warm { background: var(--warm-soft); --dot: var(--qube-orange); }
.status.tinted { background: var(--p-soft); --dot: var(--p); }

.devices { margin: 0; padding: 0; list-style: none; }
.device {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.1rem 0.9rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--qube-mist);
}
.device:first-child { border-top: 0; padding-top: 0.5rem; }
.device-icon {
  display: grid; width: 2.6rem; height: 2.6rem; place-items: center; flex: none;
  color: var(--qube-slate); background: var(--qube-warm-white); border-radius: 0.8rem;
}
.device > .device-icon { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
.device-name { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem; min-width: 0; font-weight: 680; line-height: 1.35; }
.device-meta { grid-column: 2; grid-row: 2; }
.device-name > span:first-child { overflow-wrap: anywhere; }
.meta {
  margin: 0;
  color: var(--qube-text-muted);
  font: 500 0.72rem/1.55 var(--font-code);
  letter-spacing: 0.02em;
}
.device-meta { margin: 0; color: var(--qube-text-muted); font-size: 0.875rem; line-height: 1.5; }
.device-actions { display: flex; gap: 0 1rem; grid-column: 3; grid-row: 1 / span 2; }
.device.off .device-name > span:first-child { color: var(--qube-text-muted); }
.empty { margin: 0.5rem 0 0; color: var(--qube-text-muted); }

.game-row { display: flex; align-items: flex-start; gap: 0.9rem; padding-top: 0.4rem; }
.game-row h3 { margin: 0.45rem 0 0; font-size: 1rem; font-weight: 650; }
.grow { min-width: 0; flex: 1; }
details.more.snapshots-box { margin-top: 0.2rem; border-top: 0; }
details.more.snapshots-box > summary {
  min-height: 2.5rem; justify-content: flex-start; gap: 0.35rem; padding-top: 0;
  color: var(--qube-orange-link); font-size: 0.875rem;
}
details.more.snapshots-box > summary .icon { width: 1rem; height: 1rem; }
.snapshots li { border-top: 1px solid var(--qube-mist); }
.snapshots li:first-child { border-top: 0; }
.snapshots .meta { display: inline; }

.callout {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-top: 1.25rem;
  padding: 1.1rem 1.15rem;
  background: var(--warm-soft);
  border: 1px solid #f7d4c2;
  border-radius: var(--r-m);
}
.callout > .icon { margin-top: 0.15rem; color: var(--qube-orange-link); }
.callout h3 { margin: 0 0 0.3rem; }
.callout p { margin: 0 0 0.6rem; color: var(--qube-coal); }
.callout .hint { margin-bottom: 0.85rem; }
.callout.bad { background: var(--bad-soft); border-color: #f1c6c1; }
.callout.bad > .icon { color: var(--bad); }
.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.notice > div { display: flex; align-items: center; gap: 0.9rem; }
.notice p { margin: 0; color: var(--qube-coal); }

details.more { margin-top: 1.4rem; border-top: 1px solid var(--qube-mist); }
details.more > summary {
  display: flex;
  min-height: 3rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  color: var(--qube-coal);
  font-size: 0.9rem;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
  border-radius: 0.35rem;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .icon { transition: transform 150ms ease; }
details.more[open] > summary .icon { transform: rotate(90deg); }
.more-list { display: grid; margin: 0.4rem 0 0; padding: 0; list-style: none; }
.more-list li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem;
  padding: 0.7rem 0; border-top: 1px solid var(--qube-mist);
}
.more-list li:first-child { border-top: 0; }
.more-list p { flex: 1 1 14rem; margin: 0; color: var(--qube-text-muted); font-size: 0.85rem; line-height: 1.5; }
.more-list .btn { flex: none; }

.snapshots { margin: 0.4rem 0 0; padding: 0; list-style: none; }
.snapshots li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; }

.profile-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 1.5rem; }

.add-tile {
  display: grid;
  min-height: 11rem;
  place-content: center;
  justify-items: center;
  gap: 0.35rem;
  width: 100%;
  color: var(--qube-coal);
  background: transparent;
  border: 1.5px dashed #b9bfc6;
  box-shadow: none;
  text-align: center;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.add-tile:hover { background: var(--qube-white); border-color: var(--qube-coal); }
.add-tile .add-icon {
  display: grid; width: 3rem; height: 3rem; margin-bottom: 0.5rem; place-items: center;
  color: var(--qube-coal); background: var(--qube-orange); border-radius: 0.9rem;
}
.add-text { display: grid; gap: 0.15rem; }
.add-title { font-size: 1.2rem; font-weight: 720; letter-spacing: -0.02em; }
.add-sub { color: var(--qube-text-muted); font-size: 0.9rem; }

/* Wide screens: one profile to a row, its devices beside its backups. */
@media (min-width: 60rem) {
  .profiles { grid-template-columns: minmax(0, 1fr); }
  .profile { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: clamp(2rem, 4.5vw, 4rem); }
  .profile > * { grid-column: 1 / -1; }
  .profile > .devices-block { grid-column: 1; }
  .profile > .games-block { grid-column: 2; }
  .add-tile { min-height: 7.5rem; display: flex; align-items: center; justify-content: center; gap: 1.1rem; text-align: left; }
  .add-tile .add-icon { margin: 0; }
}

/* --- Linking a device --------------------------------------------------------------------------- */

.steps-bar { display: flex; gap: 0.4rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.steps-bar li {
  display: flex; flex: 1; flex-direction: column; gap: 0.45rem;
  color: var(--qube-text-muted); font: 650 0.66rem/1.3 var(--font-code); letter-spacing: 0.06em; text-transform: uppercase;
}
.steps-bar li::before { height: 0.25rem; background: var(--qube-mist); border-radius: 999px; content: ""; }
.steps-bar li[data-state="done"]::before { background: var(--qube-coal); }
.steps-bar li[data-state="now"] { color: var(--qube-coal); }
.steps-bar li[data-state="now"]::before { background: var(--qube-orange); }

.screen {
  position: relative;
  overflow: hidden;
  margin: 0 0 1rem;
  padding: 1.35rem 1.25rem 1.25rem;
  color: var(--qube-warm-white);
  background: var(--qube-night);
  border-radius: var(--r-m);
}
.screen::before {
  position: absolute; top: -2.6rem; right: -1.1rem; width: 1.1rem; height: 6.5rem;
  background: var(--qube-orange); transform: rotate(-45deg); content: "";
}
.screen .meta { color: var(--qube-text-muted-dark); text-transform: uppercase; letter-spacing: 0.08em; }
.screen p { margin: 0; }
.code-tiles {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 0.7rem repeat(4, minmax(0, 1fr));
  align-items: center; gap: 0.3rem; max-width: 23rem; margin: 0.8rem 0 1rem;
}
.code-tiles span {
  display: grid; height: 3rem; place-items: center;
  color: var(--qube-warm-white); background: #1f232b; border: 1px solid #353b45; border-radius: 0.55rem;
  font: 650 1.45rem/1 var(--font-code);
}
.code-tiles .gap { background: none; border: 0; }
.code-tiles .gap::after { width: 0.5rem; height: 2px; background: var(--qube-text-muted-dark); content: ""; }
.screen-device { color: var(--qube-mist); }
.screen-device strong { color: var(--qube-warm-white); }

.done-mark {
  display: grid; width: 4rem; height: 4rem; margin-bottom: 1.2rem; place-items: center;
  color: var(--qube-white); background: var(--good); border-radius: 1.1rem;
}
.done-mark .icon { width: 2rem; height: 2rem; stroke-width: 2.6; }

/* --- Sign-in page ------------------------------------------------------------------------------- */

.signin-card h2 { font-size: clamp(1.45rem, 2.4vw, 1.75rem); }
.signin-card .alt {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.4rem;
  margin: 1.4rem 0 0;
  padding-top: 0.75rem;
  color: var(--qube-text-muted);
  border-top: 1px solid var(--qube-mist);
  font-size: 0.9rem;
}
.sent-to { font-weight: 650; color: var(--qube-coal); overflow-wrap: anywhere; }

.steps-section { display: grid; grid-template-columns: minmax(16rem, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); }
.steps-section h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 720; letter-spacing: -0.05em; line-height: 1; }
.steps-section .intro p:not(.eyebrow) { max-width: 28rem; margin: 1.25rem 0 0; color: var(--qube-text-muted); }
.steps-section .intro a { font-weight: 650; }
.step-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--qube-mist); }
.step-list li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.2rem 1rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--qube-mist);
}
.step-list .n { grid-row: span 2; color: var(--qube-orange-link); font: 700 0.75rem/1.9 var(--font-code); }
.step-list h3 { margin: 0; font-size: 1.15rem; font-weight: 680; letter-spacing: -0.02em; }
.step-list p { margin: 0; color: var(--qube-text-muted); }

/* --- Recovery codes ----------------------------------------------------------------------------- */

.codes {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  color: var(--qube-coal);
  background: var(--qube-warm-white);
  border: 1px dashed #b9bfc6;
  border-radius: var(--r-m);
  font: 600 1rem/2.05 var(--font-code);
  letter-spacing: 0.02em;
  white-space: pre;
}
.code-meter { display: flex; gap: 0.3rem; margin: 0.25rem 0 1rem; }
.code-meter span { width: 1.4rem; height: 0.45rem; background: var(--qube-mist); border-radius: 999px; }
.code-meter span.on { background: var(--qube-coal); }

/* --- Your account ------------------------------------------------------------------------------- */

.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); align-items: start; gap: 1.25rem; }
.sessions { margin: 0 0 1rem; padding: 0; list-style: none; }
.sessions li {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 0; border-top: 1px solid var(--qube-mist);
}
.sessions li:first-child { border-top: 0; }
.card.danger-zone { border-color: #efc2bd; }
.card.danger-zone h2 { color: var(--bad); }

/* --- Dialogs ------------------------------------------------------------------------------------ */

dialog.sheet {
  width: min(calc(100% - 2rem), 31rem);
  max-height: calc(100% - 2rem);
  padding: 0;
  overflow: auto;
  color: var(--qube-coal);
  background: var(--qube-white);
  border: 0;
  border-radius: var(--r-l);
  box-shadow: var(--shadow-m);
  overscroll-behavior: contain;
}
dialog.sheet::backdrop { background: rgb(16 18 22 / 58%); }
dialog.sheet[open] { animation: sheet-in 180ms ease-out; }
.sheet-body { position: relative; padding: clamp(1.4rem, 4vw, 2rem); }
.sheet-body h2 { margin: 0 0 0.6rem; padding-right: 2rem; font-size: 1.55rem; font-weight: 720; letter-spacing: -0.035em; line-height: 1.12; }
.sheet-body > p { color: var(--qube-text-muted); }
.sheet-close {
  position: absolute; top: 0.9rem; right: 0.9rem;
  display: grid; width: 2.75rem; height: 2.75rem; place-items: center;
  color: var(--qube-slate); background: none; border: 0; border-radius: 50%; cursor: pointer;
}
.sheet-close:hover { color: var(--qube-coal); background: var(--qube-warm-white); }
.sheet-actions { display: flex; flex-wrap: wrap-reverse; justify-content: flex-end; gap: 0.6rem; margin-top: 1.6rem; }
.sheet-preview { display: flex; align-items: center; gap: 1rem; margin: 0.25rem 0 1.25rem; }
.sheet-preview strong { font-size: 1.2rem; font-weight: 720; letter-spacing: -0.02em; overflow-wrap: anywhere; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(0.75rem) scale(0.985); } }

/* --- Toasts and loading ------------------------------------------------------------------------- */

.toasts {
  position: fixed;
  z-index: 100;
  right: 0;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 0;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding-inline: 1rem;
  pointer-events: none;
}
.toast {
  display: flex;
  max-width: 28rem;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.1rem;
  color: var(--qube-warm-white);
  background: var(--qube-coal);
  border-radius: var(--r-m);
  box-shadow: var(--shadow-m);
  font-size: 0.925rem;
  font-weight: 600;
  pointer-events: auto;
  animation: toast-in 200ms ease-out;
}
.toast .icon { color: var(--qube-orange-on-dark); }
.toast.bad { background: var(--bad); }
.toast.bad .icon { color: var(--qube-white); }
.toast.leaving { opacity: 0; transform: translateY(0.5rem); transition: opacity 250ms ease, transform 250ms ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(0.75rem); } }

.loading-bar {
  position: fixed; z-index: 200; top: 0; right: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--qube-orange) 50%, transparent 100%) 0 0 / 40% 100% no-repeat;
  opacity: 0; pointer-events: none; transition: opacity 150ms ease;
}
body.loading .loading-bar { opacity: 1; animation: loading 1.1s linear infinite; }
@keyframes loading { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* --- Footer ------------------------------------------------------------------------------------- */

.foot {
  position: relative;
  overflow: hidden;
  color: var(--qube-warm-white);
  background: var(--qube-night);
  border-top: 1px solid var(--qube-border-dark);
}
.foot-cut {
  position: absolute; top: -11rem; right: clamp(-8rem, -5vw, -3rem);
  width: 8rem; height: 27rem; background: var(--qube-orange); transform: rotate(-45deg);
}
.foot-inner {
  position: relative;
  display: grid;
  width: min(100%, var(--content));
  grid-template-columns: minmax(15rem, 1fr) minmax(0, 1.4fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  margin-inline: auto;
  padding: clamp(3.5rem, 7vw, 5.5rem) var(--gutter) 2rem;
}
.foot-brand img { width: min(12rem, 100%); height: auto; }
.foot-brand p { max-width: 22rem; margin: 1.3rem 0 0; color: var(--qube-text-muted-dark); }
.foot-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 2rem; }
.foot-nav h2 {
  margin: 0 0 0.75rem; color: var(--qube-text-muted-dark);
  font: 650 0.7rem/1.4 var(--font-code); letter-spacing: 0.08em; text-transform: uppercase;
}
.foot-nav ul { display: grid; gap: 0.2rem; margin: 0; padding: 0; list-style: none; }
.foot-nav a {
  display: inline-flex; min-height: 2.75rem; align-items: center;
  color: var(--qube-warm-white); font-size: 0.9rem; text-decoration: none;
}
.foot-nav a:hover { color: var(--qube-orange-on-dark); }
.foot-bottom {
  display: flex; flex-wrap: wrap; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 0.5rem 2rem;
  padding-top: 1.5rem; color: var(--qube-text-muted-dark); border-top: 1px solid var(--qube-border-dark); font-size: 0.75rem;
}
.foot-bottom p { margin: 0; }

/* --- Smaller screens ---------------------------------------------------------------------------- */

@media (max-width: 60rem) {
  .hero.split .hero-inner { grid-template-columns: 1fr; }
  .steps-section { grid-template-columns: 1fr; }
}

@media (max-width: 44rem) {
  .top-inner { min-height: 4.5rem; }
  .brand .logo { width: 9.75rem; }
  .brand-tag { padding-left: 0.75rem; font-size: 0.68rem; }
  .brand { gap: 0.75rem; }
  .nav-wide { display: none; }
  .menu { display: block; }
  .hero-art { background-position: 72% center; }
  .hero-shade { background: linear-gradient(180deg, rgb(8 9 12 / 70%) 0%, rgb(8 9 12 / 90%) 70%); }
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.4rem); line-height: 1; }
  .hero.split h1 { font-size: clamp(2.75rem, 12.5vw, 3.9rem); line-height: 1; }
  .foot-inner { grid-template-columns: 1fr; }
}

@media (max-width: 34rem) {
  dialog.sheet {
    width: 100%;
    max-width: none;
    max-height: calc(100% - 1.5rem);
    margin: auto 0 0;
    border-radius: var(--r-l) var(--r-l) 0 0;
  }
  dialog.sheet[open] { animation: sheet-up 220ms ease-out; }
  .sheet-body { padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
  .sheet-actions { flex-direction: column-reverse; }
  .sheet-actions .btn { width: 100%; }
  .codes { padding: 0.85rem 0.9rem; font-size: 0.86rem; letter-spacing: 0; }
  .foot-nav { grid-template-columns: 1fr; }
  .code-tiles { gap: 0.22rem; }
  .code-tiles span { height: 2.6rem; font-size: 1.2rem; border-radius: 0.45rem; }
  .device { grid-template-columns: auto minmax(0, 1fr); }
  .device-actions { grid-column: 2; grid-row: 3; margin: 0.1rem 0 -0.4rem; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media (forced-colors: active) {
  :where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid CanvasText; outline-offset: 3px; box-shadow: none; }
  .hero { background: Canvas; color: CanvasText; }
  .hero-art, .hero-shade, .foot-cut, .card.cut::before, .screen::before { display: none; }
  .card, .choice, .menu-panel, dialog.sheet { border: 1px solid CanvasText; }
}

@media print {
  .top, .foot, .hero, .toasts, .loading-bar, .no-print { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; }
  .card { border: 0; box-shadow: none; }
  .codes { border: 1px solid #000; background: #fff; }
}
