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

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f8;
  --surface: #ffffff;
  --text: #171717;
  --text-mid: #4b5563;
  --text-muted: #6b7280;
  --border: #d9dde3;
  --border-soft: #eceff3;
  --button: #1f2933;
  --button-hover: #111827;
  --radius: 8px;
  --nav-height: 68px;
  --purple: #64748B;
  --purple-light: #94A3B8;
  --purple-pale: #E2E8F0;
  --avatar-a: #D9DEE5;
  --avatar-b: #AAB2BD;
  --avatar-c: #7A828E;
  --avatar-shadow: rgba(100, 116, 139, .28);
  --logo-glow: rgba(148, 163, 184, .22);
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: 'Sora', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
}

nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 48px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(12px);
}

nav.scrolled {
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.logo-wordmark {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.logo-tagline {
  max-width: 190px;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-links a,
.nav-link-compact {
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover,
.nav-link-compact:hover {
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-right form {
  margin: 0;
}

.nav-cta,
.btn-primary,
.btn-secondary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.nav-cta,
.btn-primary {
  color: #ffffff;
  background: var(--button);
}

.nav-cta:hover,
.btn-primary:hover {
  background: var(--button-hover);
}

button.nav-cta {
  appearance: none;
}

.btn-secondary {
  color: var(--text);
  background: #ffffff;
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-soft);
}

.lang-dropdown {
  position: relative;
}

.lang-trigger {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--text-mid);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  cursor: pointer;
}

.lang-trigger:hover {
  color: var(--text);
  border-color: #b6bdc7;
}

.lang-chevron {
  width: 10px;
  height: 6px;
  transition: transform 0.18s ease;
}

.lang-dropdown.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  display: none;
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 150px;
  padding: 6px;
  margin: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
  list-style: none;
}

.lang-dropdown.open .lang-menu {
  display: block;
}

.lang-option {
  width: 100%;
  padding: 9px 10px;
  color: var(--text-mid);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.lang-option:hover,
.lang-option.active {
  color: var(--text);
  background: var(--bg-soft);
}

.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu-backdrop {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0;
  z-index: 98;
  background: rgba(17, 24, 39, 0.25);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mobile-menu-backdrop.open {
  opacity: 1;
}

.mobile-menu {
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  position: fixed;
  inset-block-start: var(--nav-height);
  inset-inline: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 22px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.12);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
}

.mobile-menu.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}

.mobile-menu a {
  padding: 12px 0;
  color: var(--text-mid);
  border-bottom: 1px solid var(--border-soft);
  font-size: 15px;
  text-decoration: none;
}

.mobile-menu form {
  margin: 0;
}

.mobile-menu button.nav-link-compact {
  width: 100%;
  padding: 12px 0;
  color: var(--text-mid);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  text-align: start;
}

.account-page {
  min-height: calc(100vh - var(--nav-height));
  padding-top: var(--nav-height);
  background: var(--bg);
}

.account-page-centered {
  display: grid;
  place-items: center;
  padding-inline: 24px;
  padding-bottom: 64px;
}

.account-hub-page {
  padding: calc(var(--nav-height) + 42px) 24px 72px;
  background: var(--bg-soft);
}

.account-hero {
  min-height: 58vh;
  display: flex;
  align-items: center;
  padding: 96px 48px 72px;
  border-bottom: 1px solid var(--border-soft);
}

.account-hero-inner {
  width: min(720px, 100%);
}

.account-eyebrow {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.account-hero h1,
.account-card h1,
.contact-card h1 {
  margin: 0;
  color: var(--text);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
}

.account-lead,
.account-card p,
.contact-card p {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--text-mid);
  font-size: 16px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.app-links-section {
  padding: 32px 48px 80px;
}

.app-links-inner {
  width: min(980px, 100%);
}

.app-links-inner h2 {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.app-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  color: var(--text-mid);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.app-links a:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.account-card,
.contact-card,
.auth-card,
.dashboard-card {
  width: min(680px, 100%);
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.auth-card {
  width: min(440px, 100%);
}

.account-card .btn-primary {
  margin-top: 26px;
}

.auth-card h1,
.dashboard-card h1 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.16;
}

.auth-card p,
.dashboard-card p {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--text-mid);
  font-size: 15px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 22px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text-mid);
  font-size: 13px;
  font-weight: 600;
}

.form-field input,
.pw-field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Sora', sans-serif;
  font-size: 15px;
}

.form-field input:focus,
.pw-field input:focus {
  border-color: #9ca3af;
  outline: 3px solid rgba(156, 163, 175, 0.2);
}

.pw-field {
  position: relative;
  display: block;
}

.pw-field input {
  padding-inline-end: 74px;
}

.pw-toggle {
  position: absolute;
  inset-block: 6px;
  inset-inline-end: 6px;
  min-width: 58px;
  padding: 0 10px;
  color: var(--text-mid);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.pw-toggle:hover {
  color: var(--text);
  border-color: var(--border);
}

.field-hint {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-mid);
  font-size: 14px;
}

.form-check input {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  accent-color: var(--button);
}

.form-message {
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}

.form-message-error {
  color: #7f1d1d;
  background: #fef2f2;
  border-color: #fecaca;
}

.form-message-info {
  color: #374151;
  background: #f9fafb;
  border-color: var(--border);
}

.form-message-success {
  color: #14532d;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.auth-switch {
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 14px;
}

.auth-inline-link {
  margin: -4px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.auth-switch a {
  color: var(--text);
  font-weight: 600;
}

.auth-inline-link a {
  color: var(--text);
  font-weight: 600;
}

.dashboard-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 9px 12px;
  color: var(--text-mid);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  font-size: 13px;
}

.dashboard-meta strong {
  color: var(--text);
  font-weight: 700;
  text-transform: capitalize;
}

.dashboard-section {
  margin-top: 32px;
}

.dashboard-section h2 {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.dashboard-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.dashboard-header h1 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.16;
}

.dashboard-header .account-eyebrow {
  margin: 0 0 14px;
}

.dashboard-header p {
  max-width: 660px;
  margin: 14px 0 0;
  color: var(--text-mid);
  font-size: 16px;
}

.dashboard-signout {
  flex: 0 0 auto;
  margin-top: 4px;
}

.dashboard-continue,
.dashboard-panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.06);
}

.dashboard-continue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 20px;
}

.dashboard-continue span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
}

.dashboard-continue strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 18px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
  margin-top: 18px;
}

.dashboard-panel {
  margin-top: 18px;
  padding: 22px;
}

.dashboard-grid .dashboard-panel {
  margin-top: 0;
}

.dashboard-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.3;
}

.dashboard-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-panel-heading p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.profile-list {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.profile-list div {
  display: grid;
  gap: 4px;
}

.profile-list dt {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.profile-list dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.status-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.status-badge {
  color: #14532d;
  background: #dcfce7;
}

.security-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-soft);
}

.security-row strong,
.security-row span {
  display: block;
}

.security-row strong {
  color: var(--text);
  font-size: 15px;
}

.security-row span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.status-pill {
  flex: 0 0 auto;
}

.security-row .status-pill {
  display: inline-flex;
  margin-top: 0;
}

.security-row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.status-pill-on {
  color: #14532d;
  background: #dcfce7;
}

.status-pill-off {
  color: #7f1d1d;
  background: #fee2e2;
}

.dashboard-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.dashboard-link-inline {
  margin-top: 0;
}

.billing-panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.billing-panel-actions form {
  margin: 0;
}

.dashboard-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.device-list {
  display: grid;
  gap: 10px;
}

.device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.device-row h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.device-row p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.btn-small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

.app-launcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.app-launcher a {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 14px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.app-launcher a:hover {
  background: #ffffff;
  border-color: var(--border);
}

.security-shell {
  width: min(920px, 100%);
}

.security-panel {
  margin-top: 0;
}

.ai-usage-panel .profile-list dd {
  line-height: 1.5;
}

.security-copy,
.security-state-row p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--text-mid);
  font-size: 15px;
}

.security-state-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.security-state-row h2 {
  margin: 0;
}

.security-form {
  max-width: 460px;
}

.pricing-shell {
  width: min(1080px, 100%);
}

.pricing-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.plan-card-premium {
  padding-top: 34px;
  border: 2px solid var(--button);
  box-shadow: 0 20px 48px rgba(17, 24, 39, 0.12);
}

.plan-flag {
  position: absolute;
  top: 16px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  color: #ffffff;
  background: var(--button);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.plan-eyebrow {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.plan-card h2,
.billing-status-panel h1 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
}

.plan-tagline {
  margin: -8px 0 0;
  color: var(--text-mid);
  font-size: 15px;
}

.plan-features,
.plan-unlocks-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.45;
  list-style: none;
}

.plan-features li,
.plan-unlocks-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.plan-features li::before,
.plan-unlocks-list li::before {
  content: "";
  width: 7px;
  height: 12px;
  flex: 0 0 auto;
  margin-top: 3px;
  border: solid var(--button);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.plan-unlocks {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.plan-unlocks h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.plan-unlocks-list strong {
  color: var(--text);
}

.plan-action {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.plan-action form {
  display: grid;
  margin: 0;
}

.plan-action .btn-primary,
.plan-action .btn-secondary,
.plan-action .status-badge {
  width: 100%;
  justify-content: center;
}

.plan-action .status-badge {
  color: var(--text-mid);
  background: var(--bg-soft);
}

.pricing-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.pricing-toggle a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  color: var(--text-mid);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.pricing-toggle a.active {
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
}

.pricing-price {
  display: grid;
  gap: 4px;
}

.pricing-price strong {
  color: var(--text);
  font-size: 22px;
}

.pricing-price span {
  color: var(--text-muted);
  font-size: 13px;
}

.pricing-app-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.pricing-app-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.pricing-app-item span {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.pricing-app-item strong {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.pricing-app-item .pricing-app-soon {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.billing-status-panel {
  margin-top: 0;
}

.billing-plan-list {
  max-width: 360px;
}

.security-setup-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 22px;
}

.qr-box {
  width: 216px;
  min-height: 216px;
  display: grid;
  place-items: center;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.qr-box svg {
  display: block;
  width: 192px;
  height: 192px;
}

.manual-key {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.manual-key span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.manual-key code,
.backup-code-list code {
  font-family: 'JetBrains Mono', monospace;
}

.manual-key code {
  display: block;
  padding: 10px 12px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.backup-code-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.backup-code-list code {
  display: block;
  padding: 11px 12px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  font-size: 14px;
}

.cf-turnstile {
  min-height: 65px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text-mid);
  font-size: 13px;
  font-weight: 600;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Sora', sans-serif;
  font-size: 15px;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: #9ca3af;
  outline: 3px solid rgba(156, 163, 175, 0.2);
}

.visually-hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
}

footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 48px;
  background: #f9fafb;
  border-top: 1px solid var(--border-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.contact-link,
.footer-meta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-mid);
  font-size: 13px;
  text-decoration: none;
}

.contact-link:hover,
.footer-meta-link:hover {
  color: var(--text);
}

.contact-link svg {
  width: 16px;
  height: 16px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.footer-bottom-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.footer-dot {
  color: #b8bec7;
}

@media (max-width: 900px) {
  nav {
    padding: 0 24px;
  }

  .nav-links,
  .nav-link-compact,
  .nav-cta {
    display: none;
  }

  .hamburger {
    display: inline-flex;
  }

  .account-hero {
    min-height: auto;
    padding: 72px 24px 56px;
  }

  .account-hero h1,
  .account-card h1,
  .contact-card h1 {
    font-size: 34px;
  }

  .auth-card h1,
  .dashboard-card h1 {
    font-size: 26px;
  }

  .app-links-section {
    padding: 28px 24px 64px;
  }

  .dashboard-header,
  .dashboard-continue,
  .device-row,
  .security-state-row {
    flex-direction: column;
    align-items: stretch;
  }

  .security-row-actions {
    align-items: flex-start;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .security-setup-grid {
    grid-template-columns: 1fr;
  }

  .pricing-hero-card {
    grid-template-columns: 1fr;
  }

  .pricing-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-launcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  footer {
    padding: 24px;
  }
}

@media (max-width: 720px) {
  .pricing-plans {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .logo {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .logo-tagline {
    max-width: 130px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .account-card,
  .contact-card,
  .auth-card,
  .dashboard-card {
    padding: 24px;
  }

  .account-hub-page {
    padding-inline: 16px;
  }

  .dashboard-panel,
  .dashboard-continue {
    padding: 18px;
  }

  .ai-usage-panel .profile-list {
    gap: 12px;
  }

  .ai-usage-panel .profile-list dd {
    display: block;
  }

  .dashboard-header h1 {
    font-size: 25px;
  }

  .app-launcher {
    grid-template-columns: 1fr;
  }

  .pricing-app-grid {
    grid-template-columns: 1fr;
  }

  .backup-code-list {
    grid-template-columns: 1fr;
  }
}

/* Account console */
.console-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 72px;
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: start;
}

.console-shell:has(.console-detail[hidden]),
.console-shell:has(.console-detail:empty) {
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
}

.console-rail,
.console-middle,
.console-detail {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.06);
}

.console-rail {
  position: sticky;
  inset: auto;
  inset-block-start: calc(var(--nav-height) + 24px);
  z-index: 2;
  min-height: 0;
  display: block;
  align-self: start;
  justify-content: initial;
  gap: 0;
  padding: 12px;
  background: var(--surface);
  border-color: var(--border-soft);
  backdrop-filter: none;
}

.console-rail-list {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.console-rail-item {
  min-width: 0;
}

.console-rail-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.console-rail-link:hover,
.console-rail-link:focus-visible {
  color: var(--text);
  background: var(--bg-soft);
  outline: none;
}

.console-rail-link:focus-visible {
  border-color: #9ca3af;
}

.console-rail-link-active {
  color: var(--text);
  background: var(--purple-pale);
  border-color: rgba(100, 116, 139, 0.32);
}

.console-middle,
.console-detail {
  min-width: 0;
  padding: 24px;
}

.console-middle[aria-busy="true"] {
  opacity: 0.68;
}

.console-section {
  min-width: 0;
}

.console-section h1 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.16;
}

.console-section h1:focus {
  outline: none;
}

.console-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.console-detail[hidden],
.console-detail:empty {
  display: none;
}

@media (max-width: 1024px) {
  .console-shell,
  .console-shell:has(.console-detail[hidden]),
  .console-shell:has(.console-detail:empty) {
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  }

  .console-detail:not([hidden]) {
    position: fixed;
    inset-block: calc(var(--nav-height) + 18px) 18px;
    inset-inline-end: 18px;
    z-index: 120;
    width: min(360px, calc(100vw - 36px));
    overflow: auto;
  }
}

@media (max-width: 720px) {
  .console-shell,
  .console-shell:has(.console-detail[hidden]),
  .console-shell:has(.console-detail:empty) {
    width: min(100% - 32px, 640px);
    padding-block: 24px 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    overflow: clip;
  }

  .console-rail {
    inset-block-start: var(--nav-height);
    padding: 8px;
    overflow: hidden;
  }

  .console-rail-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
  }

  .console-rail-item {
    flex: 0 0 auto;
  }

  .console-rail-link {
    min-height: 38px;
    padding-inline: 12px;
  }

  .console-middle,
  .console-detail {
    padding: 20px;
  }

  body.console-section-open .console-middle {
    animation: console-section-in 180ms ease-out;
  }

  .console-section h1 {
    font-size: 25px;
  }

  .console-detail:not([hidden]) {
    inset: var(--nav-height) 0 0;
    width: auto;
    border-radius: 0;
  }
}

@keyframes console-section-in {
  from {
    opacity: 0.94;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

html[dir="rtl"] body.console-section-open .console-middle {
  animation-name: console-section-in-rtl;
}

@keyframes console-section-in-rtl {
  from {
    opacity: 0.94;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Console confirm dialog */
.console-confirm {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  color: var(--text);
  background: transparent;
}

.console-confirm::backdrop {
  background: rgba(17, 24, 39, 0.42);
}

.console-confirm-box {
  display: grid;
  gap: 18px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: 0 22px 60px rgba(17, 24, 39, 0.18);
}

.console-confirm-message {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

.console-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
