:root {
  color-scheme: light;
  --knd-primary: #0f3d5e;
  --knd-accent: #0ea5a4;
  --knd-focus: #fbbf24;
}

html.app-theme-dark {
  color-scheme: dark;
  background: #070a18;
}

html { scroll-behavior: smooth; }

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

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: #fff;
  color: #111827;
  border-radius: .75rem;
  font-weight: 700;
}

.skip-link:focus { top: 1rem; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--knd-focus);
  outline-offset: 3px;
}

.landing-shell,
.dashboard-shell,
.auth-shell,
.marketing-shell {
  color-scheme: dark;
  background:
    radial-gradient(circle at 12% 8%, rgba(37, 99, 235, .16), transparent 30rem),
    radial-gradient(circle at 92% 72%, rgba(249, 115, 22, .10), transparent 28rem),
    linear-gradient(145deg, #070a18 0%, #0b1026 50%, #080b1a 100%);
  background-attachment: fixed;
}

.landing-shell { overflow-x: hidden; }
.auth-shell,
.marketing-shell { overflow-x: hidden; }

.landing-header,
.dashboard-header,
.auth-header,
.marketing-header {
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(7, 10, 24, .72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand-mark {
  position: relative;
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, .35);
  border-radius: .85rem;
  background: linear-gradient(145deg, rgba(59, 130, 246, .25), rgba(249, 115, 22, .15));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 30px rgba(37, 99, 235, .12);
}

.brand-mark::before,
.brand-mark span {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  border: 2px solid #7dd3fc;
  border-radius: .3rem;
  transform: rotate(45deg);
}

.brand-mark span {
  width: .45rem;
  height: .45rem;
  border-color: #fb923c;
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image:
    linear-gradient(rgba(148, 163, 184, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .12) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
}

.hero-orb--blue {
  top: 5%;
  left: -10%;
  background: rgba(37, 99, 235, .25);
}

.hero-orb--orange {
  right: -10%;
  bottom: 0;
  background: rgba(249, 115, 22, .18);
}

.hero-badge {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 12px 30px rgba(16, 185, 129, .06);
}

.gradient-text {
  color: transparent;
  background: linear-gradient(100deg, #38bdf8 3%, #818cf8 44%, #fb923c 86%);
  background-clip: text;
  -webkit-background-clip: text;
}

.check-icon {
  display: inline-grid;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(52, 211, 153, .35);
  border-radius: 999px;
  background: rgba(52, 211, 153, .12);
  color: #6ee7b7;
  font-size: .75rem;
  box-shadow: 0 0 18px rgba(52, 211, 153, .10);
}

.primary-cta {
  background: linear-gradient(100deg, #f97316 0%, #fb7185 52%, #ec4899 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 16px 38px rgba(244, 63, 94, .18);
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

.primary-cta:hover {
  transform: translateY(-2px);
  filter: saturate(1.12) brightness(1.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 20px 46px rgba(244, 63, 94, .26);
}

.terminal-stage {
  --floating-badge-edge: clamp(.15rem, 1.2vw, .75rem);
  --floating-badge-width: clamp(8rem, 29%, 9.5rem);
  min-width: 0;
  max-width: 100%;
  padding: 3rem 1rem 3.25rem;
}

.terminal-window {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 1.5rem;
  background: rgba(3, 7, 18, .88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 35px 90px rgba(0, 0, 0, .38), 0 0 80px rgba(37, 99, 235, .08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  min-width: 0;
  max-width: 100%;
}

.terminal-window::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 60px rgba(16, 185, 129, .025);
  pointer-events: none;
}

.terminal-bar {
  display: flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  padding: 0 1.25rem;
  background: rgba(15, 23, 42, .65);
}

.terminal-dot {
  width: .7rem;
  height: .7rem;
  border-radius: 999px;
}

.terminal-screen { padding: 1.75rem 1.5rem 2rem; }

.terminal-cursor {
  width: .55rem;
  height: 1rem;
  background: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, .65);
  animation: terminal-blink 1.1s steps(1) infinite;
}

@keyframes terminal-blink { 50% { opacity: .2; } }

.floating-badge {
  position: absolute;
  z-index: 20;
  display: flex;
  width: var(--floating-badge-width);
  align-items: center;
  gap: .7rem;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 1rem;
  padding: .75rem .9rem;
  background: rgba(15, 23, 42, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 18px 45px rgba(0, 0, 0, .25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: none;
}

.floating-badge > span:last-child { min-width: 0; }
.floating-badge strong,
.floating-badge small { display: block; }
.floating-badge strong {
  color: #f8fafc;
  font-size: clamp(.72rem, 1.5vw, .82rem);
  line-height: 1.2;
}
.floating-badge small {
  margin-top: .15rem;
  color: #94a3b8;
  font-size: clamp(.58rem, 1.2vw, .68rem);
  line-height: 1.25;
}

.floating-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: .7rem;
  background: linear-gradient(145deg, rgba(56, 189, 248, .22), rgba(249, 115, 22, .18));
  color: #7dd3fc;
  font-weight: 900;
}

.floating-badge--qr {
  top: var(--floating-badge-edge);
  right: var(--floating-badge-edge);
}
.floating-badge--secure {
  top: 50%;
  right: var(--floating-badge-edge);
  transform: translateY(-50%);
}
.floating-badge--vcf {
  right: var(--floating-badge-edge);
  bottom: var(--floating-badge-edge);
}

.feature-card,
.plan-card,
.dashboard-panel {
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 1.5rem;
  background: linear-gradient(145deg, rgba(30, 41, 59, .52), rgba(15, 23, 42, .34));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 22px 55px rgba(0, 0, 0, .12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.feature-card,
.plan-card {
  padding: 1.5rem;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.feature-card:hover,
.plan-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, .25);
  background: linear-gradient(145deg, rgba(30, 41, 59, .68), rgba(15, 23, 42, .44));
}

.feature-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, .20);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(56, 189, 248, .15), rgba(129, 140, 248, .12));
  color: #7dd3fc;
  font-size: 1.2rem;
  font-weight: 900;
}

.plan-card--featured {
  border-color: rgba(56, 189, 248, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 25px 70px rgba(37, 99, 235, .12);
}

/* Billing: membership is intentionally visible while checkout is temporarily unavailable. */
.billing-membership__eyebrow,
.billing-notify__label {
  margin: 0 0 .35rem;
  color: #0f766e;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.billing-plan {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.billing-plan--locked {
  border-color: rgba(100, 116, 139, .42);
  background: linear-gradient(145deg, rgba(248, 250, 252, .9), rgba(226, 232, 240, .72));
  filter: grayscale(.82);
  opacity: .82;
}

.billing-plan--locked::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, .25), transparent 45%);
  content: "";
  pointer-events: none;
}

.billing-plan > * { position: relative; z-index: 1; }

.billing-plan__badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 1px solid rgba(71, 85, 105, .45);
  border-radius: 999px;
  padding: .3rem .55rem;
  background: rgba(255, 255, 255, .9);
  color: #334155;
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
}

.billing-plan__heading { display: flex; min-width: 0; align-items: center; gap: .55rem; padding-right: 7rem; }
.billing-plan__lock { display: grid; width: 1.9rem; height: 1.9rem; flex: 0 0 auto; place-items: center; border: 1px solid rgba(71, 85, 105, .32); border-radius: .55rem; background: rgba(255, 255, 255, .6); font-size: .9rem; }
.billing-plan__cta:disabled { cursor: not-allowed; background: #94a3b8; color: #f8fafc; box-shadow: none; opacity: 1; }

.billing-notify {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, .9fr);
  gap: 1rem 1.5rem;
  align-items: center;
  border: 1px dashed rgba(20, 184, 166, .55);
  border-radius: .75rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(240, 253, 250, .92), rgba(255, 255, 255, .92));
}

.billing-notify__form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) auto; gap: .55rem; }
.billing-notify__form select,
.billing-notify__form input,
.billing-notify__form button { min-width: 0; min-height: 2.75rem; border-radius: .5rem; font: inherit; }
.billing-notify__form select,
.billing-notify__form input { border: 1px solid #cbd5e1; padding: .65rem .75rem; background: #fff; color: #0f172a; }
.billing-notify__form button { border: 1px solid #0f766e; padding: .65rem 1rem; background: #0f766e; color: #fff; font-weight: 750; white-space: nowrap; }
.billing-notify__form button:hover { background: #115e59; }
.billing-notify__status { grid-column: 1 / -1; min-height: 1.25rem; margin: 0; color: #475569; font-size: .82rem; }

@media (max-width: 700px) {
  .billing-notify { grid-template-columns: 1fr; }
  .billing-notify__form { grid-template-columns: 1fr; }
  .billing-notify__form button { width: 100%; }
}

.dashboard-link,
.dashboard-action {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  border-radius: .8rem;
  padding: .65rem .8rem;
  color: #94a3b8;
  font-size: .9rem;
  font-weight: 650;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.dashboard-link:hover,
.dashboard-link--active {
  background: rgba(56, 189, 248, .10);
  color: #e0f2fe;
}

.dashboard-link--active { box-shadow: inset 3px 0 0 #38bdf8; }

.dashboard-action {
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: #f8fafc;
  text-align: center;
}

.dashboard-action:hover {
  border-color: rgba(56, 189, 248, .30);
  background: rgba(56, 189, 248, .08);
}

.app-shell-page {
  min-height: 100vh;
  overflow-x: hidden;
  color: #f8fafc;
  background-color: #070a18;
}

/* Prevent legacy per-page chrome from flashing before the shared shell mounts. */
.app-shell-page > header:not(.app-shell__header) { display: none; }
.app-shell-page:not(.app-shell--ready) aside { visibility: hidden; }
.app-shell-page main#main:not(.app-shell__main) { opacity: 0; }

.app-shell__header-nav,
.app-shell__layout {
  width: min(100% - 2rem, 80rem);
  margin-inline: auto;
}

.app-shell__header-nav {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-shell__brand {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: .75rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: -.02em;
}

.app-shell__brand-domain { color: #38bdf8; }
.app-shell__layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.5rem 2.5rem;
}

.app-shell__sidebar {
  position: sticky;
  top: 7rem;
  height: fit-content;
  padding: .75rem;
}

.app-shell__nav { display: grid; gap: .2rem; }
.app-shell__sidebar-logout {
  display: none;
  width: 100%;
  min-height: 2.75rem;
  margin-top: .65rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: .8rem;
  color: #f8fafc;
  background: rgba(255,255,255,.05);
  font-weight: 750;
}
.app-shell__nav-label {
  padding: .5rem .75rem .75rem;
  color: #64748b;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.app-shell__main {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease-out, transform .18s ease-out;
  view-transition-name: app-main;
}
.app-shell__main > * { min-width: 0; max-width: 100%; }

.app-shell--ready .app-shell__main { opacity: 1; transform: none; }
.app-shell--navigating .dashboard-link { cursor: progress; }

::view-transition-group(app-main) { animation-duration: .18s; }
::view-transition-old(app-main) { animation: app-main-out .12s ease-out both; }
::view-transition-new(app-main) { animation: app-main-in .18s ease-out both; }

@keyframes app-main-out {
  to { opacity: 0; transform: translateY(-3px); }
}

@keyframes app-main-in {
  from { opacity: 0; transform: translateY(5px); }
}
.app-shell__logout,
.app-shell__menu-button {
  min-height: 2.75rem;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  padding: .65rem 1.25rem;
  color: #fff;
  background: rgba(255,255,255,.05);
  font-weight: 750;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.app-shell__logout:hover,
.app-shell__menu-button:hover { border-color: rgba(56,189,248,.45); background: rgba(56,189,248,.1); }
.app-shell__menu-button { display: none; margin-left: auto; }
.app-shell__textarea {
  border: 1px solid rgba(148,163,184,.3);
  color: #f8fafc;
  background: rgba(2,6,23,.55);
  resize: vertical;
}
html:not([data-site-theme="light"]) .app-shell-page .app-shell__main .bg-white {
  border-color: rgba(255,255,255,.1) !important;
  color: #f8fafc !important;
  background: rgba(15,23,42,.62) !important;
}
html:not([data-site-theme="light"]) .app-shell-page .app-shell__main .text-slate-950,
html:not([data-site-theme="light"]) .app-shell-page .app-shell__main .text-slate-900 { color: #f8fafc !important; }
html:not([data-site-theme="light"]) .app-shell-page .app-shell__main .text-slate-600 { color: #94a3b8 !important; }
html:not([data-site-theme="light"]) .app-shell-page .app-shell__main input,
html:not([data-site-theme="light"]) .app-shell-page .app-shell__main select,
html:not([data-site-theme="light"]) .app-shell-page .app-shell__main textarea {
  border-color: rgba(148,163,184,.3);
  color: #f8fafc;
  background: rgba(2,6,23,.55);
}

.theme-option {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 1rem;
  padding: .7rem;
  color: #f8fafc;
  background: rgba(15, 23, 42, .64);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.theme-option:hover,
.theme-option[aria-pressed="true"] {
  border-color: rgba(56, 189, 248, .65);
  background: rgba(30, 41, 59, .9);
  transform: translateY(-2px);
}

.theme-option[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .28), 0 14px 32px rgba(2, 6, 23, .24);
}

.theme-option__preview {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 10;
  place-items: center;
  overflow: hidden;
  border-radius: .7rem;
  background: linear-gradient(145deg, #eef2f7, #dbe4ef);
}

.theme-preview-host {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  pointer-events: none;
}

.theme-option__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.theme-option__preview--portrait .theme-option__image {
  width: auto;
  max-width: 100%;
}

.theme-option__name {
  display: block;
  margin-top: .8rem;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.theme-option__meta {
  display: block;
  margin-top: .25rem;
  color: #94a3b8;
  font-size: .8rem;
}

/* Shared public and authentication surfaces */
.auth-shell,
.marketing-shell {
  min-height: 100vh;
  color: #f8fafc;
}

.auth-shell::before,
.marketing-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .11;
  background-image:
    linear-gradient(rgba(148, 163, 184, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .14) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
  pointer-events: none;
}

.auth-header,
.marketing-header {
  position: relative;
  z-index: 30;
}

.auth-header nav,
.marketing-header nav {
  width: min(100% - 2rem, 80rem);
  margin-inline: auto;
}

.auth-header a { color: #e2e8f0; }
.auth-header a:hover { color: #fff; }
.auth-header .bg-white,
.auth-header .bg-slate-900 {
  border-color: rgba(255, 255, 255, .14) !important;
  background: rgba(255, 255, 255, .06) !important;
  color: #fff !important;
}

.site-brand {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: .75rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: -.02em;
}

.auth-main {
  width: min(100% - 2rem, 34rem);
  margin-inline: auto;
  padding-block: clamp(3rem, 8vw, 6rem);
}

.auth-main--wide { width: min(100% - 2rem, 64rem); }

.auth-eyebrow,
.site-eyebrow {
  color: #6ee7b7;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.auth-main h1,
.site-hero h1 {
  color: #fff;
  text-wrap: balance;
}

.auth-intro,
.site-lead {
  color: #94a3b8 !important;
  line-height: 1.75;
}

.auth-panel,
.site-panel {
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 1.5rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: linear-gradient(145deg, rgba(30, 41, 59, .72), rgba(15, 23, 42, .56));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 28px 70px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.auth-panel label,
.auth-panel h2,
.auth-panel p,
.auth-panel a,
.auth-panel button { color: inherit; }

.auth-panel input,
.auth-panel select,
.auth-panel textarea,
.dashboard-shell input,
.dashboard-shell select,
.dashboard-shell textarea {
  border-color: rgba(148, 163, 184, .22) !important;
  background: rgba(2, 6, 23, .52) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.auth-panel input::placeholder,
.auth-panel textarea::placeholder,
.dashboard-shell input::placeholder,
.dashboard-shell textarea::placeholder { color: #64748b; }

.auth-panel [data-field-error],
.dashboard-shell [data-field-error] { color: #fda4af !important; }

.auth-panel [data-form-status],
.dashboard-shell [data-form-status] { color: #cbd5e1; }

.auth-primary {
  color: #fff !important;
  background: linear-gradient(100deg, #f97316 0%, #fb7185 52%, #ec4899 100%) !important;
  box-shadow: 0 14px 34px rgba(244, 63, 94, .18);
  transition: transform .2s ease, filter .2s ease;
}

.auth-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }

.auth-secondary {
  border-color: rgba(255, 255, 255, .14) !important;
  background: rgba(255, 255, 255, .05) !important;
  color: #f8fafc !important;
}

.auth-link { color: #7dd3fc !important; }

.site-main {
  width: min(100% - 2rem, 76rem);
  margin-inline: auto;
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.site-hero {
  max-width: 52rem;
  margin-bottom: 3rem;
}

.site-content {
  display: grid;
  gap: 1.25rem;
}

.site-content h2 {
  margin-top: .35rem;
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
}

.site-content h3 { color: #e2e8f0; font-size: 1.05rem; font-weight: 750; }
.site-content p,
.site-content li { color: #a8b3c7; line-height: 1.75; }
.site-content a { color: #7dd3fc; text-decoration-thickness: .08em; text-underline-offset: .2em; }
.site-content ul { display: grid; gap: .5rem; padding-left: 1.25rem; list-style: disc; }

.site-grid {
  display: grid;
  gap: 1.25rem;
}

.site-meta { color: #64748b; font-size: .85rem; }

.site-nav-links,
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem 1rem;
}

.site-nav-links a,
.site-footer-links a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  color: #94a3b8;
  font-size: .875rem;
  font-weight: 650;
  transition: color .2s ease;
}

.site-nav-links a:hover,
.site-footer-links a:hover { color: #fff; }
.site-nav-links .site-nav-primary {
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding-inline: 1rem;
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, .09);
  background: rgba(2, 6, 23, .55);
}

.site-footer__inner {
  width: min(100% - 2rem, 80rem);
  margin-inline: auto;
  padding-block: 2rem;
  color: #64748b;
  font-size: .875rem;
}

/* Direct app routes keep the same dark shell before JavaScript navigation mounts. */
.dashboard-shell { color: #f8fafc !important; }
.dashboard-shell .bg-white,
.dashboard-shell .bg-slate-50,
.dashboard-shell .bg-slate-100 {
  background-color: rgba(15, 23, 42, .72) !important;
}
.dashboard-shell .border-slate-200,
.dashboard-shell .border-slate-300 { border-color: rgba(148, 163, 184, .18) !important; }
.dashboard-shell .text-slate-900,
.dashboard-shell .text-slate-800 { color: #f8fafc !important; }
.dashboard-shell .text-slate-700,
.dashboard-shell .text-slate-600,
.dashboard-shell .text-slate-500 { color: #94a3b8 !important; }

@media (min-width: 768px) {
  .site-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
}

@media (max-width: 767px) {
  .app-shell__header-nav,
  .app-shell__layout { width: min(100% - 1.25rem, 80rem); }
  .app-shell__menu-button { display: inline-flex; align-items: center; }
  .app-shell__logout { display: none; }
  .app-shell__layout { display: block; padding-top: 1rem; }
  .app-shell__sidebar { position: static; display: none; margin-bottom: 1rem; }
  .app-shell--menu-open .app-shell__sidebar { display: block; }
  .app-shell__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-shell__sidebar-logout { display: block; }
  [data-feedback-form] .justify-between {
    flex-direction: column;
    align-items: flex-start;
    overflow-wrap: anywhere;
  }
  [data-feedback-counter] { align-self: flex-end; }
}

@media (max-width: 640px) {
  .terminal-stage {
    --floating-badge-edge: .15rem;
    --floating-badge-width: calc(50% - .35rem);
    padding: 4rem 0 3.15rem;
  }
  .floating-badge { gap: .5rem; padding: .55rem .65rem; }
  .floating-badge--qr {
    top: var(--floating-badge-edge);
    right: auto;
    left: 0;
  }
  .floating-badge--secure {
    top: var(--floating-badge-edge);
    right: 0;
    transform: none;
  }
  .floating-badge--vcf {
    right: 0;
    bottom: var(--floating-badge-edge);
  }
  .floating-icon { width: 1.7rem; height: 1.7rem; }
  .site-nav-links a:not(.site-nav-primary) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell__main { transform: none; transition: none; }
  ::view-transition-group(app-main) { animation-duration: .01ms; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
