/* ------------------------------------------------------------------------- */
/* Helix AFK - shared website and dashboard styles                            */
/* ------------------------------------------------------------------------- */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/dm-sans.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: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/dm-sans-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: "DM Serif Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/dm-serif-display.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: "DM Serif Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/dm-serif-display-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: "Cascadia Code";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/cascadia-code.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: "Cascadia Code";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/cascadia-code-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 {
  --bg: #18151c;
  --bg-soft: #1c1921;
  --panel: #201b25;
  --panel-2: #252129;
  --panel-3: #2b2630;
  --panel-4: #332e39;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #f7f4f8;
  --text-soft: #d9d3dd;
  --muted: #a99fab;
  --muted-2: #807785;
  --pink: #f4add4;
  --pink-strong: #ff9ad2;
  --pink-dim: #2c2029;
  --green: #8fd6a9;
  --green-dim: #1b2a20;
  --amber: #e8b86d;
  --amber-dim: #2a2114;
  --red: #ef9797;
  --red-dim: #2a1719;
  --serif: "DM Serif Display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, monospace;
  --header-h: 72px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(128, 44, 95, 0.18), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(700px 420px at 82% 18%, rgba(90, 36, 74, 0.12), transparent 70%),
    radial-gradient(650px 450px at 15% 60%, rgba(65, 27, 57, 0.09), transparent 70%);
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* Every heading is a display serif; body copy, buttons and navigation are DM Sans. */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--serif);
  font-weight: 400;
}

button,
input,
select,
textarea,
.btn,
.site-nav,
.mobile-nav,
.footer-nav {
  font-family: var(--sans);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(244, 173, 212, 0.3);
  color: #fff;
}

.shell {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--pink);
  color: #211017;
  font-weight: 600;
}
.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kicker,
.micro-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1.5;
  text-transform: uppercase;
}

.micro-label {
  font-size: 9px;
  letter-spacing: 0.18em;
}

/* Small technical labels and module details use Cascadia Code. */
.kicker,
.micro-label,
.field-label,
.stat-card span,
.detail-list dt,
.detail-list dd,
.summary-meta,
.injector-meta,
.save-state,
.status,
.account-badge,
.key-chip,
.device-code,
.link-status,
code,
kbd,
samp,
pre {
  font-family: var(--mono);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.98;
}

.accent {
  color: var(--pink);
  font-style: italic;
}

.section {
  padding-top: 126px;
}

.section-title {
  margin-top: 18px;
  font-size: clamp(42px, 6.1vw, 68px);
}

.section-copy {
  max-width: 620px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 15px;
}

.section > .kicker {
  text-align: center;
}
.section > .section-title,
.section > .section-copy {
  text-align: center;
  margin-inline: auto;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn:focus-visible,
.icon-btn:focus-visible,
.tab:focus-visible,
.nav-toggle:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}
.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}
.btn-pink {
  background: var(--pink);
  color: #211017;
  box-shadow: 0 8px 22px rgba(244, 173, 212, 0.12);
}
.btn-pink:hover {
  background: #ffb7e2;
}
.btn-quiet,
.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
}
.btn-quiet:hover,
.btn-ghost:hover {
  border-color: rgba(244, 173, 212, 0.42);
  background: rgba(244, 173, 212, 0.06);
  color: var(--text);
}
.btn-danger {
  border-color: rgba(239, 151, 151, 0.3);
  background: var(--red-dim);
  color: var(--red);
}
.btn-danger:hover {
  border-color: rgba(239, 151, 151, 0.55);
  background: #341b1e;
}
.btn-small {
  min-height: 36px;
  padding: 0 15px;
  font-size: 12px;
}
.btn-block {
  width: 100%;
}
.btn.is-loading .btn-label {
  opacity: 0;
}
.btn.is-loading .btn-spinner {
  display: block;
}
.btn-spinner {
  display: none;
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(33, 16, 23, 0.3);
  border-top-color: #211017;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.btn.is-loading {
  position: relative;
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease;
}
.icon-btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.icon-btn svg {
  width: 16px;
  height: 16px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--pink);
  font-size: 12.5px;
  font-weight: 500;
}
.text-link:hover {
  color: #ffc3e8;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(24, 21, 28, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1600px, calc(100% - 104px));
  min-height: var(--header-h);
  margin-inline: auto;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.035em;
  white-space: nowrap;
}
.brand-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  object-fit: contain;
}
.brand-word em {
  color: var(--pink);
  font-style: normal;
  font-weight: 500;
}
.brand-small {
  font-size: 15px;
}
.brand-small .brand-mark {
  width: 26px;
  height: 26px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.site-nav a {
  padding: 8px 13px;
  border-radius: 6px;
  color: var(--text-soft);
  font-size: 11.5px;
  transition:
    color 150ms ease,
    background-color 150ms ease;
}
.site-nav a:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}
.site-nav a.is-current {
  background: var(--pink-dim);
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span:not(.sr-only) {
  display: block;
  height: 1px;
  margin: 4px 0;
  background: var(--text);
}
.mobile-nav {
  display: none;
  padding: 10px 24px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.mobile-nav a,
.mobile-signout {
  display: block;
  width: 100%;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.mobile-signout {
  color: var(--pink);
}

/* ------------------------------------------------------------------------- */
/* Home                                                                       */
/* ------------------------------------------------------------------------- */

.hero {
  padding-top: 88px;
  text-align: center;
}
.hero .kicker {
  margin-bottom: 18px;
}
.hero h1 {
  max-width: 930px;
  margin-inline: auto;
  font-size: clamp(68px, 11.1vw, 132px);
  line-height: 0.9;
}
.hero-copy {
  max-width: 590px;
  margin: 27px auto 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 25px;
  color: var(--muted-2);
  font-size: 10.5px;
}
.hero-trust span {
  position: relative;
}
.hero-trust span + span::before {
  content: "/";
  position: absolute;
  left: -14px;
  color: rgba(255, 255, 255, 0.16);
}

.preview-wrap {
  max-width: 1120px;
  margin: 58px auto 0;
  padding: 1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, rgba(244, 173, 212, 0.22), rgba(255, 255, 255, 0.04) 38%, rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}
.preview-card {
  padding: 23px 25px 17px;
  border-radius: calc(var(--radius-lg) - 1px);
  background:
    radial-gradient(600px 250px at 20% 0%, rgba(244, 173, 212, 0.055), transparent 65%),
    #1b1720;
  text-align: left;
}
.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.preview-head h2 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.preview-head p {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 10px;
}
.preview-tabs {
  display: flex;
  gap: 6px;
  margin-top: 22px;
}
.preview-tabs span {
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--muted-2);
  font-size: 9px;
}
.preview-tabs .is-active {
  background: var(--pink-dim);
  color: var(--text-soft);
}
.preview-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.preview-account {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 13px;
  min-height: 54px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.018);
}
.preview-cube {
  color: var(--muted);
}
.preview-cube svg {
  width: 20px;
  height: 20px;
}
.preview-account-copy {
  display: grid;
  gap: 1px;
}
.preview-account-copy strong {
  font-size: 11.5px;
  font-weight: 500;
}
.preview-account-copy small {
  color: var(--muted-2);
  font-size: 9.5px;
}
.mini-btn {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-soft);
  font-size: 9.5px;
}
.mini-btn-pink {
  border-color: transparent;
  background: var(--pink);
  color: #211017;
}
.preview-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 15px;
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 48px;
}
.feature-card {
  min-height: 220px;
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.018), transparent);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--pink);
}
.feature-icon svg {
  width: 24px;
  height: 24px;
}
.feature-card h3 {
  margin-top: 57px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.feature-card p {
  max-width: 230px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px;
  margin: 58px 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  padding-top: 15px;
  border-top: 1px solid var(--line-strong);
}
.step-number {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.13em;
}
.steps h3 {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 500;
}
.steps p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.split-card {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 48px;
  padding: 43px 45px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(550px 300px at 5% 100%, rgba(244, 173, 212, 0.055), transparent 65%),
    var(--panel);
}
.split-copy .kicker,
.split-copy .display,
.split-copy p {
  text-align: left;
}
.split-copy .display {
  margin-top: 13px;
  font-size: clamp(42px, 5vw, 58px);
}
.split-copy > p:not(.kicker) {
  max-width: 440px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12.5px;
}
.split-copy .btn {
  margin-top: 25px;
}
.split-options {
  display: grid;
  gap: 10px;
}
.option-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 68px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  transition:
    border-color 150ms ease,
    background-color 150ms ease;
}
.option-card:hover {
  border-color: rgba(244, 173, 212, 0.34);
  background: rgba(244, 173, 212, 0.045);
}
.option-card.is-active {
  background: var(--pink-dim);
}
.option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--pink);
}
.option-icon svg {
  width: 22px;
  height: 22px;
}
.option-card strong,
.option-card small {
  display: block;
}
.option-card strong {
  font-size: 11.5px;
  font-weight: 500;
}
.option-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}
.option-arrow {
  color: var(--muted);
  font-size: 13px;
}

.faq-section {
  text-align: center;
}
.faq-section .section-title {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.faq-section > .kicker {
  text-align: center;
}
.faq-list {
  max-width: 1120px;
  margin: 43px auto 0;
  text-align: left;
}
.faq-list details {
  border-bottom: 1px solid var(--line);
}
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  color: var(--text-soft);
  font-size: 11.5px;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary span {
  position: relative;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}
.faq-list summary span::before,
.faq-list summary span::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 12px;
  height: 1px;
  background: var(--muted);
}
.faq-list summary span::after {
  transform: rotate(90deg);
  transition: transform 150ms ease;
}
.faq-list details[open] summary span::after {
  transform: rotate(0);
}
.faq-list details p {
  max-width: 620px;
  padding: 0 0 19px;
  color: var(--muted);
  font-size: 11.5px;
}

.final-cta {
  padding-top: 145px;
  padding-bottom: 98px;
  text-align: center;
}
.final-cta .display {
  font-size: clamp(45px, 6.2vw, 72px);
}
.final-cta p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12.5px;
}
.final-cta .btn {
  margin-top: 27px;
}

.site-footer {
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 30px;
  min-height: 106px;
}
.footer-nav {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 11px;
}
.footer-nav a:hover {
  color: var(--text);
}
.copyright {
  color: var(--muted-2);
  font-size: 9px;
  text-align: right;
}

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

.auth-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}
.auth-main {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: clamp(36px, 8vw, 105px);
  flex: 1;
  padding-top: 54px;
  padding-bottom: 54px;
}
.auth-story h1 {
  margin-top: 20px;
  font-size: clamp(60px, 8vw, 97px);
}
.auth-copy {
  max-width: 475px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}
.auth-points {
  display: grid;
  gap: 18px;
  margin: 38px 0 0;
  padding: 0;
  list-style: none;
}
.auth-points li {
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}
.point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--pink);
}
.point-icon svg {
  width: 16px;
  height: 16px;
}
.auth-points strong,
.auth-points small {
  display: block;
}
.auth-points strong {
  font-size: 11.5px;
  font-weight: 500;
}
.auth-points small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}
.auth-card {
  position: relative;
  padding: 36px 35px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(440px 240px at 100% 0%, rgba(244, 173, 212, 0.065), transparent 65%),
    var(--panel);
  box-shadow: var(--shadow);
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(244, 173, 212, 0.1), transparent 30%);
  mask: linear-gradient(#000, transparent 50%);
  -webkit-mask: linear-gradient(#000, transparent 50%);
}
.auth-title {
  margin-top: 10px;
  font-size: 44px;
}
.auth-sub {
  margin-top: 13px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}
.auth-discord {
  margin-top: 20px;
}
.auth-discord[hidden] {
  display: none;
}
.btn-discord {
  gap: 9px;
  border-color: #5865f2;
  background: #5865f2;
  color: #fff;
  box-shadow: 0 8px 22px rgba(88, 101, 242, 0.16);
}
.btn-discord:hover {
  border-color: #4752c4;
  background: #4752c4;
}
.btn-discord .discord-mark {
  width: 17px;
  height: 17px;
  flex: none;
  fill: currentColor;
}
.auth-discord-note {
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}
.auth-form {
  margin-top: 27px;
}
.auth-form .field + .field {
  margin-top: 15px;
}
.auth-form .input {
  padding-left: 40px;
}
.auth-switch {
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.auth-switch-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
.auth-switch-btn:hover {
  color: var(--pink);
}
.field {
  display: grid;
  gap: 7px;
}
.field-label {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 500;
}
.field-hint {
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}
.input-wrap {
  position: relative;
  display: block;
}
.input-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}
.input-icon svg {
  width: 17px;
  height: 17px;
}
.input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-size: 12.5px;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}
.input::placeholder {
  color: #6d5864;
}
.input:hover {
  border-color: rgba(255, 255, 255, 0.22);
}
.input:focus {
  outline: none;
  border-color: rgba(244, 173, 212, 0.66);
  background: rgba(255, 255, 255, 0.038);
  box-shadow: 0 0 0 3px rgba(244, 173, 212, 0.09);
}
.key-input {
  padding-left: 40px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.auth-form .btn {
  margin-top: 21px;
}
.form-error,
.inline-error {
  margin-top: 13px;
  padding: 9px 11px;
  border: 1px solid rgba(239, 151, 151, 0.25);
  border-radius: 6px;
  background: var(--red-dim);
  color: var(--red);
  font-size: 11px;
  line-height: 1.5;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 25px 0 15px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-help {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}
.auth-card .text-link {
  margin-top: 11px;
}
.auth-security {
  margin-top: 25px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.55;
}
.dot-live {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(125, 204, 159, 0.09);
  vertical-align: 1px;
}
.auth-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 21px;
  padding-bottom: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9.5px;
}
.auth-footer a {
  color: var(--muted);
}

/* ------------------------------------------------------------------------- */
/* Dashboard                                                                  */
/* ------------------------------------------------------------------------- */

.dash-main {
  padding-top: 57px;
  padding-bottom: 55px;
}
.dash-loading {
  display: grid;
  place-items: center;
  min-height: 52vh;
  gap: 15px;
  color: var(--muted);
  font-size: 12px;
}
.loader {
  width: 25px;
  height: 25px;
  border: 2px solid rgba(244, 173, 212, 0.16);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
.dash-locked {
  display: grid;
  place-items: center;
  min-height: 60vh;
}
.locked-card {
  width: min(480px, 100%);
  padding: 36px 35px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(440px 240px at 100% 0%, rgba(244, 173, 212, 0.065), transparent 65%),
    var(--panel);
  box-shadow: var(--shadow);
}
.locked-title {
  margin-top: 12px;
  font-size: clamp(34px, 5vw, 44px);
}
.locked-card .section-copy {
  margin: 13px 0 0;
  text-align: left;
  font-size: 11.5px;
}
.locked-user {
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 11px;
}
.redeem-form {
  margin-top: 24px;
}
.redeem-form .input {
  padding-left: 40px;
}
.redeem-form .btn {
  margin-top: 18px;
}
.locked-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.locked-foot .auth-security {
  margin: 0;
  padding: 0;
  border: 0;
  text-align: left;
}
.dash-intro .display {
  margin-top: 18px;
  font-size: clamp(45px, 6.1vw, 68px);
}
.dash-intro .section-copy {
  margin-left: 0;
  text-align: left;
  margin-top: 14px;
  font-size: 12.5px;
}
.account-summary {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 31px;
  padding: 28px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(244, 173, 212, 0.035), transparent 60%), var(--panel);
}
.summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--text-soft);
}
.summary-icon svg {
  width: 24px;
  height: 24px;
}
.summary-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.summary-copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.summary-copy span {
  color: var(--muted);
  font-size: 10.5px;
}
.summary-meta {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}
.summary-meta > * {
  flex-shrink: 0;
  min-width: 0;
}
.key-chip {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  min-width: 80px;
}
.access-pill {
  padding: 8px 16px;
  border: 1px solid rgba(125, 204, 159, 0.2);
  border-radius: 999px;
  background: var(--green-dim);
  color: var(--green);
  font-size: 9px;
  white-space: nowrap;
  min-width: 80px;
}
.access-pill.is-off {
  border-color: rgba(232, 184, 109, 0.2);
  background: var(--amber-dim);
  color: var(--amber);
}
.access-pill.is-blocked {
  border-color: rgba(239, 151, 151, 0.2);
  background: var(--red-dim);
  color: var(--red);
}

.tabs {
  display: flex;
  gap: 7px;
  margin: 29px 0 38px;
}
.tab {
  min-height: 35px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}
.tab:hover {
  color: var(--text-soft);
}
.tab.is-active {
  border-color: var(--line);
  background: var(--pink-dim);
  color: var(--text);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 27px;
}
.section-head .display {
  font-size: 36px;
}
.section-head .section-copy {
  margin-top: 7px;
  font-size: 11px;
}
.head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 18px;
  padding: 15px 17px;
  border: 1px solid rgba(232, 184, 109, 0.26);
  border-radius: 8px;
  background: var(--amber-dim);
}
.notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  border: 1px solid rgba(232, 184, 109, 0.35);
  border-radius: 50%;
  color: var(--amber);
  font-size: 11px;
  font-weight: 600;
}
.notice strong {
  display: block;
  color: #efd09e;
  font-size: 11.5px;
  font-weight: 500;
}
.notice p {
  margin-top: 3px;
  color: #bda174;
  font-size: 10.5px;
}
.notice .text-link {
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--amber);
  font-size: 10.5px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 17px;
}
.stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}
.stat-card span {
  color: var(--muted);
  font-size: 10.5px;
}
.stat-card strong {
  color: var(--text-soft);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.account-list {
  display: grid;
  gap: 10px;
}
.account-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}
.account-card:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
}
.account-card.is-selected {
  border-color: rgba(244, 173, 212, 0.27);
  background: linear-gradient(90deg, rgba(244, 173, 212, 0.045), transparent 50%), var(--panel);
}
.account-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--muted);
}
.account-icon svg {
  width: 22px;
  height: 22px;
}
.account-card.is-online .account-icon {
  color: var(--pink);
}
.account-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.account-copy strong {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-copy .account-reason {
  color: var(--red);
  font-size: 9.5px;
  white-space: normal;
}
.account-session {
  display: grid;
  gap: 2px;
  text-align: right;
}
.account-session strong {
  font-size: 10.5px;
  font-weight: 500;
}
.account-session small {
  color: var(--muted-2);
  font-size: 9px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  white-space: nowrap;
}
.status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status-online {
  background: var(--green-dim);
  color: var(--green);
}
.status-connecting,
.status-queued,
.status-reconnecting,
.status-paused {
  background: var(--amber-dim);
  color: var(--amber);
}
.status-auth,
.status-server,
.status-error {
  background: var(--red-dim);
  color: var(--red);
}
.status-offline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}
.account-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.account-actions > * {
  flex-shrink: 0;
  min-width: 0;
}
.account-actions .btn {
  min-width: 68px;
}
.icon-action {
  width: 31px;
  height: 31px;
  border-radius: 6px;
}
.icon-action svg {
  width: 14px;
  height: 14px;
}
.icon-action.is-on {
  border-color: rgba(244, 173, 212, 0.27);
  color: var(--pink);
}

.empty-state {
  display: grid;
  place-items: center;
  padding: 58px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
}
.empty-icon {
  color: var(--pink);
}
.empty-icon svg {
  width: 30px;
  height: 30px;
}
.empty-state h3 {
  margin-top: 15px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
}
.empty-state p {
  max-width: 355px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}
.empty-state .btn {
  margin-top: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 11px;
  margin-top: 18px;
}
.panel-card {
  padding: 23px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.panel-head .display {
  margin-top: 3px;
  font-size: 28px;
}
.panel-head .micro-label {
  display: block;
  margin-top: 4px;
}
.save-state {
  color: var(--green);
  font-size: 9.5px;
}
.settings-form {
  margin-top: 21px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.field-wide {
  grid-column: 1 / -1;
}
.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.form-foot p {
  max-width: 370px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.5;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 21px 0 0;
}
.detail-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.detail-list dt {
  color: var(--muted);
  font-size: 10px;
}
.detail-list dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 10px;
  text-align: right;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}
.inline-error {
  margin-top: 12px;
}

.macros-card,
.chat-card,
.alerts-card {
  margin-top: 11px;
}
.alerts-card {
  grid-column: 1 / -1;
}
.tiny-note {
  color: var(--muted-2);
  font-size: 9.5px;
}
.macro-list {
  display: grid;
  gap: 9px;
  margin-top: 19px;
}
.macro-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.018);
}
.macro-copy {
  min-width: 0;
}
.macro-copy strong {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
}
.macro-copy p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}
.switch {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  margin-left: auto;
  cursor: pointer;
}
.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.switch-track {
  width: 38px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}
.switch-track::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin: 2px;
  border-radius: 50%;
  background: var(--muted);
  transition:
    transform 160ms ease,
    background-color 160ms ease;
}
.switch input:checked + .switch-track {
  border-color: transparent;
  background: var(--pink);
}
.switch input:checked + .switch-track::after {
  background: #211017;
  transform: translateX(16px);
}
.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}
.macro-row.is-disabled {
  opacity: 0.55;
}

.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.field-grow {
  flex: 1;
}

.dash-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 35px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.dash-footer a:hover {
  color: var(--pink);
}

/* injector tab */
.injector-card {
  display: flex;
  gap: 23px;
  padding: 40px 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(520px 300px at 8% 100%, rgba(244, 173, 212, 0.055), transparent 68%),
    var(--panel);
}
.injector-icon {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  width: 36px;
  flex: 0 0 auto;
  color: var(--pink);
}
.injector-icon svg {
  width: 28px;
  height: 28px;
}
.injector-copy .display {
  font-size: 33px;
}
.injector-copy .micro-label {
  margin-top: 6px;
}
.injector-copy > p:not(.micro-label):not(.field-hint) {
  max-width: 490px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 11.5px;
}
.injector-meta {
  display: flex;
  gap: 23px;
  margin-top: 19px;
  color: var(--muted);
  font-size: 9.5px;
}
.injector-copy .btn {
  margin-top: 20px;
}
.injector-note {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 11px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.feature-icon.small {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}
.feature-icon.small svg {
  width: 20px;
  height: 20px;
}
.injector-note strong,
.injector-note span {
  display: block;
}
.injector-note strong {
  font-size: 11.5px;
  font-weight: 500;
}
.injector-note span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}
.injector-note .btn {
  margin-left: auto;
  flex: 0 0 auto;
}

/* ------------------------------------------------------------------------- */
/* Modal and toasts                                                           */
/* ------------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 4, 0.75);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.modal-card {
  position: relative;
  width: min(500px, 100%);
  padding: 31px 31px 23px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(450px 240px at 100% 0%, rgba(244, 173, 212, 0.06), transparent 65%),
    var(--panel);
  box-shadow: var(--shadow);
}
.modal-small {
  max-width: 410px;
}
.modal-title {
  margin-top: 9px;
  font-size: 36px;
}
.modal-copy {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
}
.device-code {
  margin-top: 21px;
  padding: 16px 14px;
  border: 1px dashed rgba(244, 173, 212, 0.32);
  border-radius: 7px;
  background: rgba(244, 173, 212, 0.04);
  color: var(--pink);
  font-family: var(--mono);
  font-size: clamp(20px, 5vw, 27px);
  letter-spacing: 0.17em;
  text-align: center;
}
.modal-card .btn-block {
  margin-top: 12px;
}
.link-status {
  margin-top: 13px;
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
}
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 23px;
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--panel-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.36);
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.5;
  animation: toast-in 180ms ease both;
  pointer-events: auto;
}
.toast::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--pink);
}
.toast.is-success::before {
  background: var(--green);
}
.toast.is-error {
  border-color: rgba(239, 151, 151, 0.28);
}
.toast.is-error::before {
  background: var(--red);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------------------------------------------------- */
/* 404                                                                        */
/* ------------------------------------------------------------------------- */

.not-found {
  display: grid;
  place-items: center;
  min-height: 72vh;
  text-align: center;
}
.not-found .display {
  margin-top: 15px;
  font-size: clamp(58px, 9vw, 100px);
}
.not-found p {
  max-width: 440px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
}
.not-found .btn {
  margin-top: 24px;
}

/* ------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* ------------------------------------------------------------------------- */

@media (max-width: 1000px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }
  .site-nav {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .mobile-nav:not([hidden]) {
    display: block;
  }
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature-card {
    min-height: 195px;
  }
  .feature-card h3 {
    margin-top: 43px;
  }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }
  .split-card {
    gap: 34px;
  }
  .auth-main {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 610px;
  }
  .auth-story h1 {
    font-size: 76px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .account-card {
    grid-template-columns: 38px minmax(0, 1fr) auto auto;
  }
  .account-session {
    display: none;
  }
}

@media (max-width: 760px) {
  .shell,
  .header-inner {
    width: calc(100% - 34px);
  }
  .header-inner {
    min-height: 62px;
  }
  .site-header .btn-small {
    min-height: 32px;
    padding: 0 12px;
  }
  .header-actions {
    gap: 7px;
  }
  .hero {
    padding-top: 59px;
  }
  .hero h1 {
    font-size: clamp(56px, 17vw, 82px);
  }
  .hero-copy {
    font-size: 13px;
  }
  .hero-trust {
    display: none;
  }
  .preview-wrap {
    margin-top: 39px;
  }
  .preview-card {
    padding: 18px 15px 13px;
  }
  .preview-head h2 {
    font-size: 21px;
  }
  .preview-head .micro-label {
    display: none;
  }
  .preview-account {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 10px;
  }
  .preview-account .mini-btn {
    display: none;
  }
  .section {
    padding-top: 84px;
  }
  .section-title {
    font-size: clamp(39px, 11vw, 55px);
  }
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 33px;
  }
  .feature-card {
    min-height: 0;
    padding: 23px 21px;
  }
  .feature-card h3 {
    margin-top: 30px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 38px;
  }
  .split-card {
    grid-template-columns: 1fr;
    padding: 29px 23px;
  }
  .split-copy .display {
    font-size: 45px;
  }
  .faq-section .section-title {
    text-align: left;
  }
  .final-cta {
    padding-top: 95px;
    padding-bottom: 65px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 26px;
    padding-bottom: 25px;
  }
  .copyright {
    text-align: left;
  }
  .auth-main {
    padding-top: 34px;
    padding-bottom: 34px;
  }
  .auth-story h1 {
    font-size: clamp(54px, 15vw, 72px);
  }
  .auth-card {
    padding: 27px 21px 23px;
  }
  .auth-title {
    font-size: 37px;
  }
  .auth-footer {
    flex-direction: column;
    gap: 5px;
    padding-bottom: 20px;
  }
  .dash-main {
    padding-top: 37px;
  }
  .dash-intro .display {
    font-size: clamp(42px, 12vw, 58px);
  }
  .account-summary {
    flex-wrap: wrap;
    padding: 15px 16px;
  }
  .summary-meta {
    width: 100%;
    margin-left: 48px;
    flex-wrap: wrap;
  }
  .summary-meta .btn {
    margin-left: auto;
  }
  .tabs {
    margin: 23px 0 28px;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .head-actions {
    justify-content: flex-start;
  }
  .section-head .display {
    font-size: 32px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .stat-card {
    min-height: 52px;
  }
  .account-card {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    row-gap: 8px;
    gap: 8px 11px;
    padding: 13px;
  }
  .account-card .status {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }
  .account-session {
    display: none;
  }
  .account-actions {
    grid-column: 3;
    grid-row: 2;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }
  .account-actions .btn {
    min-width: 56px;
  }
  .account-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field-wide {
    grid-column: auto;
  }
  .form-foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .panel-card {
    padding: 19px 17px;
  }
  .panel-head {
    gap: 12px;
  }
  .panel-head .display {
    font-size: 25px;
  }
  .panel-head .tiny-note {
    display: none;
  }
  .injector-card {
    padding: 28px 21px;
    gap: 13px;
  }
  .injector-copy .display {
    font-size: 28px;
  }
  .injector-note {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .injector-note .btn {
    margin-left: 41px;
  }
  .chat-form {
    align-items: stretch;
    flex-direction: column;
  }
  .dash-footer {
    font-size: 9px;
  }
  .modal-card {
    padding: 27px 21px 20px;
  }
  .toast-stack {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

/* ------------------------------------------------------------------------- */
/* Dashboard redesign components                                             */
/* ------------------------------------------------------------------------- */

/* Breathing room between the account summary and the accounts section.
   Without it the tall serif heading (line-height .98) overflows upwards and
   collides with the summary card's bottom border. */
.dash-main .tab-panel {
  margin-top: 46px;
}
.dash-main .section-head {
  align-items: flex-start;
}
.dash-main .section-head .btn {
  margin-top: 2px;
}

.btn-pill {
  border-radius: 999px;
  padding: 0 18px;
  min-height: 34px;
  font-size: 12px;
}
.btn-pill.btn-pink {
  background: var(--pink);
  color: #211017;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 27px;
  flex-wrap: wrap;
}
.section-head .display {
  font-size: 36px;
  margin: 0;
}
.section-head .section-copy {
  margin-top: 7px;
  font-size: 11px;
}

.head-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 18px 0 0;
}
.stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}
.stat-card span {
  color: var(--muted);
  font-size: 10.5px;
}
.stat-card strong {
  color: var(--text-soft);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

/* Dashboard account cards: icon | name+server | status | action */
.account-list {
  display: grid;
  gap: 10px;
}
.account-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  transition: border-color 160ms ease, background-color 160ms ease;
}
.account-card:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
}
.account-card.is-selected {
  border-color: rgba(244, 173, 212, 0.27);
  background: linear-gradient(90deg, rgba(244, 173, 212, 0.045), transparent 50%), var(--panel);
}
.account-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  flex: 0 0 auto;
}
.account-icon svg {
  width: 22px;
  height: 22px;
}
.account-card.is-online .account-icon {
  color: var(--pink);
}
.account-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.account-copy strong {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-copy .account-reason {
  color: var(--red);
  font-size: 9.5px;
  white-space: normal;
}
.account-session {
  display: none;
}
.account-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.account-actions > * {
  flex-shrink: 0;
  min-width: 0;
}
.account-actions .btn {
  min-width: 68px;
}

.tabs {
  display: flex;
  gap: 6px;
  margin: 30px 0 34px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}
.tab {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
  border-bottom: 2px solid transparent;
}
.tab:hover {
  color: var(--text-soft);
}
.tab.is-active {
  border-color: var(--pink);
  background: var(--pink-dim);
  color: var(--text);
}

/* Settings form: two-column with wide label */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.field-wide {
  grid-column: 1 / -1;
}
.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.form-foot p {
  max-width: 370px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.5;
}

/* Detail list */
.detail-list {
  display: grid;
  gap: 10px;
  margin: 21px 0 0;
}
.detail-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.detail-list dt {
  color: var(--muted);
  font-size: 10px;
}
.detail-list dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 10px;
  text-align: right;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}
.inline-error {
  margin-top: 12px;
}

/* Macros + chat cards */
.macros-card,
.chat-card,
.alerts-card {
  margin-top: 11px;
}
.alerts-card {
  grid-column: 1 / -1;
}
.tiny-note {
  color: var(--muted-2);
  font-size: 9.5px;
}
.macro-list {
  display: grid;
  gap: 9px;
  margin-top: 19px;
}
.macro-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.018);
}
.macro-copy {
  min-width: 0;
}
.macro-copy strong {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
}
.macro-copy p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}
.switch {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  margin-left: auto;
  cursor: pointer;
}
.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.switch-track {
  width: 38px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  transition: background-color 160ms ease, border-color 160ms ease;
}
.switch-track::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin: 2px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 160ms ease, background-color 160ms ease;
}
.switch input:checked + .switch-track {
  border-color: transparent;
  background: var(--pink);
}
.switch input:checked + .switch-track::after {
  background: #211017;
  transform: translateX(16px);
}
.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}
.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.field-grow {
  flex: 1;
}

/* Injector tab */
.injector-card {
  display: flex;
  gap: 23px;
  padding: 40px 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(520px 300px at 8% 100%, rgba(244, 173, 212, 0.055), transparent 68%),
    var(--panel);
}
.injector-icon {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  width: 36px;
  flex: 0 0 auto;
  color: var(--pink);
}
.injector-icon svg {
  width: 28px;
  height: 28px;
}
.injector-copy .display {
  font-size: 33px;
}
.injector-copy .micro-label {
  margin-top: 6px;
}
.injector-copy > p:not(.micro-label):not(.field-hint) {
  max-width: 490px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 11.5px;
}
.injector-meta {
  display: flex;
  gap: 23px;
  margin-top: 19px;
  color: var(--muted);
  font-size: 9.5px;
}
.injector-copy .btn {
  margin-top: 20px;
}
.injector-note {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 11px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.feature-icon.small {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}
.feature-icon.small svg {
  width: 20px;
  height: 20px;
}
.injector-note strong,
.injector-note span {
  display: block;
}
.injector-note strong {
  font-size: 11.5px;
  font-weight: 500;
}
.injector-note span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}
.injector-note .btn {
  margin-left: auto;
  flex: 0 0 auto;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 4, 0.75);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.modal-card {
  position: relative;
  width: min(500px, 100%);
  padding: 31px 31px 23px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(450px 240px at 100% 0%, rgba(244, 173, 212, 0.06), transparent 65%),
    var(--panel);
  box-shadow: var(--shadow);
}
.modal-small {
  max-width: 410px;
}
.modal-title {
  margin-top: 9px;
  font-size: 36px;
}
.modal-copy {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
}
.device-code {
  margin-top: 21px;
  padding: 16px 14px;
  border: 1px dashed rgba(244, 173, 212, 0.32);
  border-radius: 7px;
  background: rgba(244, 173, 212, 0.04);
  color: var(--pink);
  font-family: var(--mono);
  font-size: clamp(20px, 5vw, 27px);
  letter-spacing: 0.17em;
  text-align: center;
}
.modal-card .btn-block {
  margin-top: 12px;
}
.link-status {
  margin-top: 13px;
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
}
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 23px;
}

/* Toasts */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--panel-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.36);
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.5;
  animation: toast-in 180ms ease both;
  pointer-events: auto;
}
.toast::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--pink);
}
.toast.is-success::before {
  background: var(--green);
}
.toast.is-error {
  border-color: rgba(239, 151, 151, 0.28);
}
.toast.is-error::before {
  background: var(--red);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------------------------------------------------- */
/* Page entrance: slide up + fade in on load / navigation                    */
/* ------------------------------------------------------------------------- */

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.js .reveal {
  opacity: 0;
  transform: translateY(30px);
}
.reveal-animate {
  animation: slideUpFade 700ms ease-out forwards;
}

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

/* ------------------------------------------------------------------------- */
/* Account toolbar, remembered device and per-account pickers                */
/* ------------------------------------------------------------------------- */

.account-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 18px 0;
}

.account-toolbar .head-actions {
  margin: 0;
  gap: 10px;
}

.head-actions .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.panel-head {
  flex-wrap: wrap;
}

.account-pick {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  min-width: 0;
}

.account-pick .micro-label {
  margin: 0;
  white-space: nowrap;
}

.account-pick .select {
  width: auto;
  min-width: 150px;
  max-width: 230px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 11px;
  cursor: pointer;
}

.form-foot-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.form-foot-actions .text-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
}

.form-foot-actions .text-link:hover {
  color: var(--text-soft);
  text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Custom form controls
   Native Chrome selects and toggles are replaced so the dashboard never
   shows a white popup, a blue highlight, or a default OS slider.
   ------------------------------------------------------------------------- */
.select,
select.input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 36px;
  color-scheme: dark;
  background-color: rgba(255, 255, 255, 0.025);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23b9a4b0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
  cursor: pointer;
  text-overflow: ellipsis;
}

.select:hover,
select.input:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background-color: rgba(255, 255, 255, 0.038);
}

.select:focus,
select.input:focus {
  outline: none;
  border-color: rgba(244, 173, 212, 0.66);
  background-color: rgba(255, 255, 255, 0.038);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23f4add4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: 0 0 0 3px rgba(244, 173, 212, 0.09);
}

.select::-ms-expand {
  display: none;
}

.select option {
  background-color: #140d12;
  color: var(--text);
}

.select option:checked,
.select option:hover {
  background-color: #2a1923;
  color: var(--pink);
}

/* Custom slider: no OS track, no blue fill. dashboard.js keeps
   --range-progress in sync so the pink part follows the thumb. */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  color-scheme: dark;
  cursor: pointer;
  --range-progress: 0%;
}

input[type="range"]:focus {
  outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(244, 173, 212, 0.85) 0 var(--range-progress),
    rgba(255, 255, 255, 0.11) var(--range-progress) 100%
  );
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5.5px;
  border: 2px solid #211017;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 3px rgba(244, 173, 212, 0.14), 0 3px 10px rgba(0, 0, 0, 0.45);
  transition: box-shadow 140ms ease, transform 140ms ease;
}

input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.08);
  box-shadow: 0 0 0 5px rgba(244, 173, 212, 0.16), 0 3px 12px rgba(0, 0, 0, 0.5);
}

input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 5px rgba(244, 173, 212, 0.28), 0 3px 12px rgba(0, 0, 0, 0.5);
}

input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
}

input[type="range"]::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(244, 173, 212, 0.85);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid #211017;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 3px rgba(244, 173, 212, 0.14), 0 3px 10px rgba(0, 0, 0, 0.45);
}

input[type="range"]:focus-visible {
  outline: 2px solid rgba(244, 173, 212, 0.55);
  outline-offset: 4px;
  border-radius: 999px;
}

/* Selected account card: the whole card is the target that switches every
   per-account panel (settings, details, macros, chat). */
.account-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.account-card:focus-visible {
  outline: 2px solid rgba(244, 173, 212, 0.7);
  outline-offset: 2px;
}

.account-card.is-selected {
  border-color: rgba(244, 173, 212, 0.55);
  background:
    linear-gradient(90deg, rgba(244, 173, 212, 0.09), transparent 58%),
    var(--panel);
  box-shadow:
    0 0 0 1px rgba(244, 173, 212, 0.16),
    0 14px 34px rgba(0, 0, 0, 0.22);
}

.account-card.is-selected::before {
  content: "";
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--pink);
  box-shadow: 0 0 12px rgba(244, 173, 212, 0.55);
}

.account-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid rgba(244, 173, 212, 0.28);
  border-radius: 999px;
  background: rgba(244, 173, 212, 0.12);
  color: var(--pink);
  font-size: 8.5px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.account-pick .select {
  padding: 0 36px 0 12px;
}

.account-pick .picker {
  min-width: 150px;
  max-width: 230px;
}

.account-pick .picker-trigger {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
}

@media (max-width: 760px) {
  .account-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .account-toolbar .head-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .account-toolbar .head-actions .btn {
    flex: 1 1 0;
  }
  .account-pick {
    width: 100%;
    justify-content: space-between;
  }
  .account-pick .select {
    flex: 1 1 auto;
    max-width: none;
  }
  .account-pick .picker {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
  }
  .picker-menu {
    left: 0;
    right: auto;
    width: 100%;
    max-width: none;
  }
  .form-foot {
    flex-direction: column;
    align-items: flex-start;
  }
  .form-foot-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* -------------------------------------------------------------------------
   Custom dropdown (no native Chrome popup)
   dashboard.js wraps every select.input in .picker and paints the menu
   itself, so the open list is dark with a pink highlight instead of the
   white sheet + blue row that Chrome and Windows draw natively.
   ------------------------------------------------------------------------- */
.picker {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 0;
}

.picker-native {
  display: none;
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  appearance: none;
}

.picker-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.picker-trigger:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.picker-trigger:focus-visible,
.picker.is-open .picker-trigger {
  outline: none;
  border-color: rgba(244, 173, 212, 0.66);
  background: rgba(255, 255, 255, 0.038);
  box-shadow: 0 0 0 3px rgba(244, 173, 212, 0.09);
}

.picker-trigger:disabled,
.picker.is-disabled .picker-trigger {
  opacity: 0.55;
  cursor: not-allowed;
}

.picker-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease, border-color 160ms ease;
}

.picker.is-open .picker-chevron {
  border-color: var(--pink);
  transform: translateY(1px) rotate(225deg);
}

.picker-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 80;
  width: max-content;
  min-width: 100%;
  max-width: min(320px, 78vw);
  max-height: 284px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: #17121a;
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.4);
  animation: picker-in 120ms ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 173, 212, 0.3) transparent;
}

@keyframes picker-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.picker-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.picker-option > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker-option:hover,
.picker-option:focus-visible {
  outline: none;
  background: rgba(244, 173, 212, 0.1);
  color: var(--pink);
}

.picker-option.is-active {
  background: rgba(244, 173, 212, 0.07);
  color: var(--pink);
}

.picker-tick {
  flex: 0 0 auto;
  color: var(--pink);
  font-size: 11px;
  opacity: 0;
}

.picker-option.is-active .picker-tick {
  opacity: 1;
}

.picker-empty {
  margin: 0;
  padding: 10px 11px;
  color: var(--muted-2);
  font-size: 11.5px;
}

/* -------------------------------------------------------------------------
   No native browser chrome
   Chrome and Windows must never paint a white sheet, a blue highlight, a
   spin button or an OS scrollbar over the dark theme.
   ------------------------------------------------------------------------- */
html {
  -webkit-tap-highlight-color: transparent;
}

body {
  accent-color: var(--pink);
}

/* Number fields: no white spin arrows, type the port instead. */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Chrome autofill keeps a pale blue-yellow sheet unless it is covered. */
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus,
.input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #221b24 inset;
  box-shadow: 0 0 0 1000px #221b24 inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-out 0s;
}

/* Search/date decorations are OS-blue too. */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--pink);
}

/* Dark scrollbars everywhere: page, dropdown menu, textareas. */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 173, 212, 0.32) rgba(255, 255, 255, 0.045);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.045);
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(244, 173, 212, 0.34);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(244, 173, 212, 0.55);
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* The dashboard redesign block above re-declares the stats grid after the
   small-screen rules, so restate the stacked layout last to win the cascade. */
@media (max-width: 760px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .stat-card {
    min-height: 52px;
    gap: 14px;
  }

  .stat-card span {
    min-width: 0;
  }
}

/* ---------------------------------------------------------------------------
   Connection map: proxies on top, accounts on the bottom, drawn lines between.
   --------------------------------------------------------------------------- */
.proxy-graph-card {
  margin: 16px 0 18px;
  padding: 16px 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(120% 130% at 50% 0%, rgba(244, 173, 212, 0.07), transparent 60%),
    var(--panel);
}
.proxy-graph-card[hidden] {
  display: none;
}
.proxy-graph-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.proxy-graph-head h3 {
  margin: 0 0 2px;
  font-size: 18px;
}
.proxy-graph-hint {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.proxy-graph-hint.is-armed {
  color: var(--pink);
}
.proxy-graph {
  position: relative;
  display: grid;
  gap: 58px;
  padding: 2px 0;
}
.proxy-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.proxy-line {
  fill: none;
  stroke: rgba(244, 173, 212, 0.45);
  stroke-width: 1.4;
  stroke-linecap: round;
  transition: stroke 160ms ease;
}
.proxy-line.is-direct {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-dasharray: 4 5;
}
.proxy-line-dot {
  fill: var(--pink);
}
.proxy-line-dot.is-direct {
  fill: var(--muted-2);
}
.proxy-node-row,
.proxy-graph-accounts {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}
.proxy-node-row {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: stretch;
}
.proxy-graph-accounts {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.proxy-node {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}
.proxy-node:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.proxy-node.is-selected {
  border-color: rgba(244, 173, 212, 0.55);
  background: rgba(244, 173, 212, 0.08);
  box-shadow: 0 0 0 1px rgba(244, 173, 212, 0.15);
}
.proxy-node-main {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: inherit;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.proxy-node-kicker {
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.proxy-node-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proxy-node-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proxy-node.is-proxy.is-running .proxy-node-kicker {
  color: var(--green);
}
.proxy-node.is-proxy:not(.is-running) .proxy-node-kicker {
  color: var(--red);
}
.proxy-node-test {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
}
.proxy-node-test:hover {
  border-color: var(--line-strong);
  color: var(--pink);
}
.proxy-node-test:disabled {
  opacity: 0.5;
  cursor: wait;
}
.proxy-node-test svg {
  width: 13px;
  height: 13px;
}
.account-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}
.account-node:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.account-node.is-selected {
  border-color: rgba(244, 173, 212, 0.45);
  background: rgba(244, 173, 212, 0.06);
}
.account-node-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.03);
}
.account-node.is-online .account-node-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(143, 214, 169, 0.12);
}
.account-node-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.account-node-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-node-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proxy-graph-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted-2);
  font-size: 10px;
  text-align: center;
}
@media (max-width: 760px) {
  .proxy-graph {
    gap: 46px;
  }
  .proxy-graph-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .proxy-graph-hint {
    white-space: normal;
  }
}

/* Keep the connection-map instructions in sentence case and let an account
   node be dragged up onto Direct or one of the proxies. */
.proxy-graph-head .proxy-graph-copy {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 10.5px;
}
.proxy-graph-hint {
  text-transform: none;
  letter-spacing: 0.02em;
}
.proxy-drag-lines {
  z-index: 2;
}
.account-node {
  touch-action: none;
  cursor: grab;
}
.proxy-graph.is-dragging,
.proxy-graph.is-dragging * {
  user-select: none;
}
.proxy-graph.is-dragging .proxy-node-main,
.proxy-graph.is-dragging .account-node {
  cursor: grabbing;
}
.proxy-line.is-dragging {
  stroke: var(--pink-strong);
  stroke-width: 2;
  stroke-dasharray: 6 4;
}
.proxy-line-dot.is-dragging {
  fill: var(--pink-strong);
}
.account-node.is-drop-target,
.proxy-node.is-drop-target {
  border-color: var(--pink);
  background: rgba(244, 173, 212, 0.14);
  box-shadow:
    0 0 0 1px rgba(244, 173, 212, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------------------
   Mobile polish: bigger type, comfortable touch targets and layouts that use
   the full width of a phone instead of squeezing desktop columns.
   --------------------------------------------------------------------------- */

@media (max-width: 760px) {
  /* Small labels were 8-10px; lift them to a legible phone size. */
  .kicker {
    font-size: 11px;
  }
  .micro-label {
    font-size: 10.5px;
    letter-spacing: 0.16em;
  }
  .field-hint {
    font-size: 12px;
  }
  .tiny-note {
    font-size: 11px;
  }
  .status {
    padding: 5px 9px;
    font-size: 10.5px;
  }
  .account-badge {
    font-size: 9.5px;
  }
  .key-chip,
  .access-pill,
  .save-state {
    font-size: 10.5px;
  }
  .link-status {
    font-size: 12px;
  }
  .detail-list dt,
  .detail-list dd {
    font-size: 11.5px;
  }
  .detail-list div {
    gap: 12px;
  }
  .form-foot p {
    font-size: 11.5px;
  }
  .section-copy {
    font-size: 14px;
    line-height: 1.6;
  }

  /* Comfortable touch targets. */
  .nav-toggle {
    width: 44px;
    height: 44px;
  }
  .icon-btn {
    width: 44px;
    height: 44px;
  }
  .icon-btn svg {
    width: 18px;
    height: 18px;
  }
  .btn-small {
    min-height: 44px;
    padding: 0 15px;
    font-size: 13px;
  }
  .site-header .btn-small {
    min-height: 44px;
    padding: 0 15px;
  }
  .text-link {
    font-size: 13px;
  }
  .mobile-nav a,
  .mobile-signout {
    display: flex;
    align-items: center;
    min-height: 48px;
  }

  /* On the dashboard the header's Dashboard link targets the current page. */
  .dash-page .header-actions .btn-pill {
    display: none;
  }
  .brand {
    min-height: 44px;
  }

  /* Summary: one clean block instead of a wrapped desktop row. */
  .account-summary {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 16px;
  }
  .summary-icon {
    width: 38px;
    height: 38px;
  }
  .summary-copy {
    grid-column: 2;
  }
  .summary-copy strong {
    font-size: 15px;
  }
  .summary-copy span {
    font-size: 12px;
  }
  .summary-meta {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-left: 0;
  }
  .summary-meta .key-chip {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .summary-meta .access-pill {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .summary-meta .icon-btn {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    margin-left: 0;
  }
  .summary-meta .btn {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    margin-left: 0;
  }

  /* Stats */
  .stat-card {
    min-height: 56px;
    padding: 12px 16px;
  }
  .stat-card span {
    font-size: 12px;
  }
  .stat-card strong {
    font-size: 21px;
  }

  /* Connection map */
  .proxy-graph-card {
    padding: 15px 14px 17px;
  }
  .proxy-graph-head h3 {
    font-size: 20px;
  }
  .proxy-graph-head .proxy-graph-copy {
    font-size: 12px;
    line-height: 1.5;
  }
  .proxy-graph-hint {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
  }
  .proxy-graph {
    gap: 38px;
  }
  .proxy-node-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .proxy-node-main {
    padding: 11px 38px 11px 12px;
  }
  .proxy-node-kicker {
    font-size: 10px;
  }
  .proxy-node-main strong {
    font-size: 12.5px;
  }
  .proxy-node-main small {
    font-size: 10.5px;
  }
  .proxy-node-test {
    top: 4px;
    right: 4px;
    width: 36px;
    height: 36px;
  }
  .proxy-node-test svg {
    width: 16px;
    height: 16px;
  }
  .account-node {
    min-height: 58px;
    padding: 12px 14px;
  }
  .account-node-copy strong {
    font-size: 13px;
  }
  .account-node-copy small {
    font-size: 10.5px;
  }

  /* Account cards: actions move to their own full-width row and the name
     gets the room it needs. */
  .account-card {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    padding: 14px;
    row-gap: 10px;
  }
  .account-icon {
    grid-row: 1;
  }
  .account-copy strong {
    font-size: 14px;
  }
  .account-copy small {
    font-size: 11px;
  }
  .account-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-end;
    gap: 8px;
  }
  .account-actions .btn {
    min-width: 84px;
  }
  .account-actions .icon-btn {
    flex: 0 0 44px;
  }

  /* Forms: one column, and 16px fields so iOS does not zoom on focus. */
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field-wide {
    grid-column: auto;
  }
  .input,
  .select,
  select.input {
    font-size: 16px;
  }
  .field-label {
    font-size: 11.5px;
  }
  .form-foot {
    gap: 12px;
  }
  .form-foot-actions {
    gap: 12px;
  }
  .form-foot-actions .text-link {
    min-height: 44px;
    font-size: 12px;
  }
  .picker-trigger {
    min-height: 44px;
    font-size: 13px;
  }
  .account-pick .picker-trigger,
  .account-pick .select {
    min-height: 44px;
  }
  .account-pick .picker-trigger {
    font-size: 13px;
  }
  .picker-option {
    min-height: 44px;
    font-size: 13px;
  }
  .picker-menu {
    left: 0;
    right: auto;
    width: 100%;
    max-width: none;
  }
  .chat-form {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .chat-form .btn {
    width: 100%;
  }
  .macro-row {
    gap: 12px;
  }
  .switch,
  .switch-track {
    width: 46px;
    height: 26px;
  }
  .switch-track::after {
    width: 20px;
    height: 20px;
    margin: 2px;
  }
  .switch input:checked + .switch-track::after {
    transform: translateX(20px);
  }
  .panel-card {
    padding: 19px 16px;
  }
  .panel-head .display {
    font-size: 26px;
  }

  /* Dialogs stay inside the viewport, including short landscape screens. */
  .modal {
    padding: 12px;
  }
  .modal-card {
    width: 100%;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 24px 19px 19px;
  }
  .modal-title {
    font-size: 31px;
  }
  .modal-copy {
    font-size: 12.5px;
  }
  .modal-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .modal-foot .btn {
    width: 100%;
  }
  .modal-actions {
    flex-direction: column-reverse;
  }
  .modal-actions .btn {
    width: 100%;
  }
  .toast-stack {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: auto;
  }
  .toast {
    font-size: 12.5px;
  }

  /* Footer */
  .dash-footer {
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 11px;
  }
  .dash-footer a,
  .footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  /* Home */
  .hero-copy {
    font-size: 14px;
    line-height: 1.6;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }
  .preview-account-copy strong {
    font-size: 12.5px;
  }
  .preview-account-copy small {
    font-size: 11px;
  }
  .preview-head p {
    font-size: 12px;
  }
  .preview-tabs span {
    font-size: 10.5px;
  }
  .preview-account .status {
    font-size: 10.5px;
  }
  .preview-foot {
    font-size: 10px;
  }
  .feature-card p,
  .steps p {
    font-size: 13px;
    line-height: 1.6;
  }
  .steps h3 {
    font-size: 14px;
  }
  .step-number {
    font-size: 10px;
  }
  .faq-list summary {
    padding: 18px 0;
    font-size: 15px;
  }
  .faq-list details p {
    font-size: 13px;
    line-height: 1.6;
  }
  .final-cta p {
    font-size: 14px;
  }
  .final-cta .btn {
    width: 100%;
  }
  .footer-nav a {
    font-size: 12px;
  }

  /* Sign in: the form is the reason the page exists on a phone. */
  .auth-story {
    display: none;
  }
  .auth-main {
    gap: 0;
    padding-top: 24px;
  }
  .auth-card {
    padding: 24px 18px 21px;
  }
  .auth-title {
    font-size: 34px;
  }
  .auth-sub {
    font-size: 13px;
  }
  .auth-help {
    font-size: 12px;
  }
  .auth-security {
    font-size: 11.5px;
  }
  .auth-points small {
    font-size: 11.5px;
  }
  .auth-switch {
    flex-wrap: wrap;
    gap: 6px;
  }
  .auth-divider span {
    font-size: 10.5px;
  }
  .auth-switch-btn,
  .auth-card .text-link {
    min-height: 44px;
  }
  .auth-footer {
    font-size: 11px;
  }
  .auth-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  /* 404 */
  .not-found {
    min-height: calc(100dvh - 70px);
    padding: 32px 0;
  }
  .not-found p {
    font-size: 14px;
    line-height: 1.6;
  }
}

/* Narrow phones: keep long IPv6 addresses readable and the header compact. */
@media (max-width: 420px) {
  .shell,
  .header-inner {
    width: calc(100% - 26px);
  }
  .header-inner {
    min-height: 60px;
  }
  .brand-word {
    font-size: 16px;
  }
  .header-actions {
    gap: 6px;
  }
  .site-header .btn-pill {
    min-height: 40px;
    padding: 0 13px;
    font-size: 12px;
  }
  .summary-meta .key-chip {
    max-width: 100%;
  }
  .proxy-node-main strong,
  .proxy-node-main small,
  .account-node-copy small {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .account-copy strong {
    font-size: 13.5px;
  }
}

/* Tablets: keep the desktop layout but lift the smallest labels and targets
   so the same UI is comfortable on a 768-900px touch screen. */
@media (min-width: 761px) and (max-width: 900px) {
  .kicker {
    font-size: 11px;
  }
  .micro-label {
    font-size: 10.5px;
  }
  .status {
    font-size: 10px;
  }
  .account-badge {
    font-size: 9.5px;
  }
  .key-chip,
  .access-pill,
  .save-state {
    font-size: 10px;
  }
  .field-hint,
  .form-foot p {
    font-size: 10.5px;
  }
  .tiny-note {
    font-size: 10.5px;
  }
  .detail-list dt,
  .detail-list dd {
    font-size: 11px;
  }
  .proxy-graph-hint {
    font-size: 10.5px;
  }
  .proxy-node-kicker {
    font-size: 9.5px;
  }
  .proxy-node-main strong {
    font-size: 13px;
  }
  .proxy-node-main small,
  .account-node-copy small,
  .account-copy small {
    font-size: 10.5px;
  }
  .account-node-copy strong,
  .account-copy strong {
    font-size: 13px;
  }
  .btn-small {
    min-height: 42px;
    font-size: 12.5px;
  }
  .btn-pill {
    min-height: 40px;
  }
  .brand {
    min-height: 44px;
  }
  .form-foot-actions .text-link,
  .detail-actions .text-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    font-size: 12px;
  }
  .dash-footer a,
  .footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }
  .icon-btn,
  .account-actions .icon-btn {
    width: 40px;
    height: 40px;
  }
  .nav-toggle {
    width: 44px;
    height: 44px;
  }
  .proxy-node-test {
    width: 32px;
    height: 32px;
  }
  .proxy-node-main {
    padding-right: 32px;
  }
  .picker-trigger,
  .account-pick .picker-trigger {
    min-height: 40px;
  }
  .preview-account-copy strong {
    font-size: 12.5px;
  }
  .preview-account-copy small,
  .mini-btn,
  .preview-tabs span,
  .preview-foot {
    font-size: 10.5px;
  }
  .auth-switch-btn,
  .auth-card .text-link,
  .auth-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }
  .auth-divider span {
    font-size: 10.5px;
  }
  .dash-footer,
  .auth-footer {
    font-size: 10.5px;
  }
}

/* Touch devices should not keep a hover lift after a tap. */
@media (hover: none) {
  .btn:hover,
  .icon-btn:hover,
  .proxy-node:hover,
  .account-node:hover,
  .account-card:hover {
    transform: none;
  }
}
