:root {
  color-scheme: dark;
  --ink: #f8fafc;
  --muted: #9aa7ba;
  --muted-strong: #c1cad8;
  --surface: rgba(14, 18, 31, 0.82);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --violet: #8b5cf6;
  --violet-light: #b794f6;
  --cyan: #22d3ee;
  --coral: #fb7185;
  --green: #34d399;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #070a13;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -5%, rgba(139, 92, 246, 0.2), transparent 32rem),
    radial-gradient(circle at 96% 12%, rgba(34, 211, 238, 0.11), transparent 27rem),
    #070a13;
}

body.theme-dev {
  --violet: #14b8a6;
  --violet-light: #5eead4;
  --cyan: #facc15;
  --coral: #fb923c;
  --surface: rgba(8, 28, 34, 0.84);
  background:
    radial-gradient(circle at 12% -5%, rgba(20, 184, 166, 0.24), transparent 32rem),
    radial-gradient(circle at 96% 12%, rgba(250, 204, 21, 0.13), transparent 27rem),
    #061318;
}

body.theme-dev .brand-symbol,
body.theme-dev .wordmark-symbol {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent 60%),
    linear-gradient(135deg, #0d9488, #0e7490);
  box-shadow: 0 12px 32px rgba(13, 148, 136, 0.32);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.ambient {
  position: absolute;
  z-index: 0;
  width: 30rem;
  height: 30rem;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(22px);
  opacity: 0.55;
}

.ambient-one {
  top: -16rem;
  left: -10rem;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.62), transparent 67%);
  animation: ambient-drift 12s ease-in-out infinite alternate;
}

.ambient-two {
  right: -12rem;
  bottom: -18rem;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.38), transparent 67%);
  animation: ambient-drift 15s ease-in-out -4s infinite alternate-reverse;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: var(--violet-light);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.status-dot,
.availability span {
  display: inline-block;
  width: 0.46rem;
  height: 0.46rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.08), 0 0 15px rgba(52, 211, 153, 0.66);
}

.brand-lockup,
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.78rem;
  width: fit-content;
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-lockup strong,
.wordmark strong {
  font-weight: 800;
}

.brand-symbol,
.wordmark-symbol {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.88rem;
  color: white;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(135deg, #9d6cff, #6246e5);
  box-shadow: 0 12px 32px rgba(102, 70, 229, 0.32);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.login-layout {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: clamp(1rem, 4vw, 3.5rem);
  place-items: center;
  isolation: isolate;
}

.login-stage {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(72rem, 100%);
  min-height: min(45rem, calc(100vh - 5rem));
  overflow: hidden;
  grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 0.85fr);
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: rgba(9, 12, 22, 0.72);
  box-shadow: var(--shadow);
  isolation: isolate;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.login-stage::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(125deg, rgba(139, 92, 246, 0.08), transparent 44%);
  pointer-events: none;
}

.login-story {
  display: flex;
  min-height: 100%;
  padding: clamp(2rem, 5vw, 4.5rem);
  justify-content: space-between;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.story-copy {
  padding: 4rem 0;
}

.story-copy h1,
.portal-heading h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3.2rem, 6vw, 5.65rem);
  font-weight: 760;
  letter-spacing: -0.075em;
  line-height: 0.94;
}

.story-copy h1 span,
.portal-heading h1 span {
  color: transparent;
  background: linear-gradient(105deg, #ffffff 5%, var(--violet-light) 43%, var(--cyan) 92%);
  background-clip: text;
  -webkit-background-clip: text;
}

.story-copy > p:last-child {
  max-width: 34rem;
  margin: 1.8rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.75;
}

.trust-row {
  display: flex;
  gap: 1.75rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.trust-row span {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.trust-row i {
  color: var(--violet-light);
  font-size: 0.62rem;
  font-style: normal;
}

.login-panel {
  position: relative;
  display: flex;
  padding: clamp(2rem, 5vw, 4rem);
  justify-content: center;
  flex-direction: column;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.055), transparent 46%),
    rgba(10, 14, 25, 0.68);
}

.panel-icon {
  display: grid;
  width: 4.2rem;
  height: 4.2rem;
  margin-bottom: 2rem;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.38);
  border-radius: 1.35rem;
  background: rgba(139, 92, 246, 0.09);
  box-shadow: inset 0 0 30px rgba(139, 92, 246, 0.08);
}

.panel-icon span {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 0.75rem;
  color: white;
  background: linear-gradient(135deg, var(--violet), #5f46dd);
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.34);
  font-size: 0.72rem;
  font-weight: 900;
}

.login-panel h1,
.login-panel h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.login-copy {
  margin: 1rem 0 1.8rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 1.4rem 0 0;
  color: #758195;
  font-size: 0.72rem;
  line-height: 1.55;
}

.privacy-note span {
  padding-top: 0.08rem;
  color: var(--green);
  font-size: 0.55rem;
}

.notice {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(251, 113, 133, 0.3);
  border-radius: 0.9rem;
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.08);
  font-size: 0.83rem;
  line-height: 1.5;
}

.notice-info {
  border-color: rgba(34, 211, 238, 0.3);
  color: #bae6fd;
  background: rgba(34, 211, 238, 0.08);
}

.notice-success {
  border-color: rgba(52, 211, 153, 0.3);
  color: #a7f3d0;
  background: rgba(52, 211, 153, 0.08);
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  padding: 0.78rem 1rem;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: 0;
  border-radius: 0.9rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  color: white;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 48%),
    linear-gradient(110deg, #9a69f8, #6547e6);
  box-shadow: 0 15px 38px rgba(101, 71, 230, 0.34);
}

.button-primary:hover {
  box-shadow: 0 18px 46px rgba(101, 71, 230, 0.48);
}

.button-wide {
  width: 100%;
  min-height: 3.5rem;
  padding-inline: 1.2rem;
  justify-content: space-between;
}

.button-arrow {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1rem;
  transition: transform 180ms ease;
}

.button:hover .button-arrow {
  transform: translate(2px, -1px);
}

.button-secondary {
  justify-content: space-between;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
}

.button-secondary:hover {
  border-color: rgba(183, 148, 246, 0.5);
  background: rgba(139, 92, 246, 0.12);
}

.button-quiet {
  min-height: 2.25rem;
  padding: 0.58rem 0.82rem;
  border: 1px solid var(--line);
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.73rem;
}

.button-quiet:hover {
  border-color: var(--line-strong);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 4.8rem;
  padding: 0.8rem clamp(1rem, 4vw, 3.5rem);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 19, 0.74);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.account-actions form {
  margin: 0;
}

.account-name {
  display: inline-flex;
  min-height: 2.3rem;
  padding: 0.55rem 0.8rem;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.75rem;
  font-weight: 700;
}

.account-name .status-dot {
  width: 0.38rem;
  height: 0.38rem;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
}

.portal-main {
  position: relative;
  width: min(78rem, calc(100% - 2rem));
  min-height: calc(100vh - 9rem);
  margin: 0 auto;
  padding: clamp(4.5rem, 8vw, 7.5rem) 0 5rem;
}

.portal-ambient {
  top: 5rem;
  right: -18rem;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent 65%);
}

.portal-heading {
  position: relative;
  z-index: 1;
  display: flex;
  margin-bottom: clamp(3rem, 7vw, 5.5rem);
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.portal-heading h1 {
  max-width: 13ch;
  font-size: clamp(3.3rem, 7.5vw, 6.7rem);
}

.portal-intro {
  max-width: 35rem;
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.portal-metric {
  display: flex;
  min-width: 12rem;
  padding: 1rem 0 0;
  align-items: center;
  gap: 0.9rem;
  border-top: 1px solid var(--line-strong);
}

.portal-metric strong {
  font-size: 3.3rem;
  font-weight: 300;
  letter-spacing: -0.07em;
  line-height: 1;
}

.portal-metric span {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.45;
  text-transform: uppercase;
}

.app-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.app-card {
  --card-accent: var(--violet);
  --card-accent-rgb: 139, 92, 246;
  position: relative;
  display: flex;
  min-height: 35rem;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.06), transparent 38%),
    rgba(14, 18, 31, 0.78);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.2);
  isolation: isolate;
  transition:
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 260ms ease,
    box-shadow 260ms ease;
}

.app-card-tone-2 {
  --card-accent: var(--cyan);
  --card-accent-rgb: 34, 211, 238;
}

.app-card-tone-3 {
  --card-accent: var(--coral);
  --card-accent-rgb: 251, 113, 133;
}

.app-card:hover {
  border-color: rgba(var(--card-accent-rgb), 0.4);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
  transform: translateY(-7px);
}

.card-glow {
  position: absolute;
  z-index: -1;
  top: -10rem;
  left: 50%;
  width: 30rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--card-accent-rgb), 0.24), transparent 66%);
  filter: blur(10px);
  transform: translateX(-50%);
  transition: opacity 260ms ease, transform 360ms ease;
}

.app-card:hover .card-glow {
  opacity: 1.35;
  transform: translateX(-50%) scale(1.12);
}

.app-visual {
  position: relative;
  display: grid;
  min-height: 21rem;
  padding: 4rem 2rem 1rem;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--card-accent-rgb), 0.15), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}

.app-visual::after {
  position: absolute;
  inset: 16% 12%;
  content: "";
  border: 1px solid rgba(var(--card-accent-rgb), 0.12);
  border-radius: 50%;
  transform: rotate(-14deg);
}

.app-visual img {
  position: relative;
  z-index: 2;
  width: auto;
  max-width: min(75%, 15rem);
  max-height: 16.5rem;
  object-fit: contain;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.42));
  transition: transform 350ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.app-card:hover .app-visual img {
  transform: translateY(-5px) rotate(1deg) scale(1.035);
}

.availability,
.app-index {
  position: absolute;
  z-index: 3;
  top: 1.2rem;
}

.availability {
  left: 1.2rem;
  display: inline-flex;
  padding: 0.5rem 0.72rem;
  align-items: center;
  gap: 0.48rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(7, 10, 19, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 0.67rem;
  font-weight: 800;
}

.availability span {
  width: 0.35rem;
  height: 0.35rem;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
}

.app-index {
  right: 1.35rem;
  color: rgba(255, 255, 255, 0.24);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.app-content {
  display: flex;
  min-height: 14rem;
  padding: 1.7rem;
  flex: 1;
  flex-direction: column;
}

.app-label {
  margin: 0 0 0.65rem !important;
  color: var(--card-accent) !important;
  font-size: 0.65rem !important;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.app-content h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.app-content > p {
  margin: 0.9rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.app-content .button {
  width: 100%;
  margin-top: auto;
}

.portal-footer {
  display: flex;
  width: min(78rem, calc(100% - 2rem));
  min-height: 4rem;
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: #657187;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-footer span:last-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-footer i {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.58);
}

.access-main {
  padding-top: clamp(3.5rem, 7vw, 6rem);
}

.access-heading {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.access-heading h1 {
  max-width: 14ch;
}

.access-form {
  position: relative;
  z-index: 1;
}

.access-summary {
  display: flex;
  margin-bottom: 1.25rem;
  padding: 1rem 1.2rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.8rem;
}

.access-summary > span {
  color: var(--muted-strong);
  font-weight: 800;
}

.access-summary > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.access-user {
  display: inline-flex;
  padding: 0.42rem 0.65rem;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 700;
}

.access-user .status-dot {
  width: 0.34rem;
  height: 0.34rem;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.access-card {
  position: relative;
  display: flex;
  min-height: 16rem;
  padding: 1.5rem;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 48%),
    rgba(14, 18, 31, 0.74);
}

.access-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.access-card .app-index {
  position: static;
  padding-top: 0.25rem;
  color: var(--violet-light);
}

.access-card .app-label {
  margin-bottom: 0.42rem !important;
}

.access-card h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.access-card > p {
  margin: 1rem 0 1.1rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.access-choices {
  display: flex;
  margin: auto 0 0;
  padding: 0;
  gap: 0.6rem;
  border: 0;
  flex-wrap: wrap;
}

.access-choices legend {
  width: 100%;
  margin-bottom: 0.35rem;
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-choice {
  display: inline-flex;
  min-height: 2.5rem;
  padding: 0.55rem 0.75rem;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.access-choice:has(input:checked) {
  border-color: rgba(52, 211, 153, 0.45);
  color: #d1fae5;
  background: rgba(52, 211, 153, 0.1);
}

.access-choice input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--green);
}

.access-empty {
  color: var(--muted);
  font-size: 0.78rem;
}

.access-actions {
  display: flex;
  margin-top: 1.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.access-actions p {
  max-width: 42rem;
  margin: 0;
  color: #758195;
  font-size: 0.74rem;
  line-height: 1.55;
}

.access-actions .button {
  flex: 0 0 auto;
}

.login-panel-standalone {
  z-index: 1;
  width: min(30rem, 100%);
  min-height: 27rem;
  padding: clamp(2rem, 6vw, 4rem);
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.loading-orbit {
  position: relative;
  display: grid;
  width: 4.6rem;
  height: 4.6rem;
  margin-bottom: 2rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
}

.loading-orbit::before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(183, 148, 246, 0.22);
  border-top-color: var(--violet-light);
  border-radius: 50%;
  content: "";
  animation: spin 1.2s linear infinite;
}

.loading-orbit span {
  font-size: 0.7rem;
  font-weight: 900;
}

.error-code {
  margin: 0 0 -1rem;
  color: rgba(183, 148, 246, 0.13);
  font-size: clamp(6rem, 20vw, 10rem);
  font-weight: 900;
  letter-spacing: -0.12em;
  line-height: 0.85;
}

.error-panel .button {
  width: fit-content;
}

.is-hidden {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(34, 211, 238, 0.75);
  outline-offset: 4px;
}

@keyframes ambient-drift {
  to {
    transform: translate3d(2rem, 1rem, 0) scale(1.08);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .login-layout {
    align-items: start;
  }

  .login-stage {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .login-story {
    min-height: 30rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .story-copy {
    padding: 5rem 0;
  }

  .login-panel {
    min-height: 28rem;
  }

  .portal-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-metric {
    min-width: 0;
  }

  .app-card {
    min-height: 31rem;
  }

  .app-visual {
    min-height: 18rem;
  }
}

@media (max-width: 680px) {
  .login-layout {
    padding: 0;
  }

  .login-stage {
    width: 100%;
    border: 0;
    border-radius: 0;
  }

  .login-story {
    min-height: 100svh;
    padding: 1.5rem;
  }

  .story-copy {
    padding: 3rem 0;
  }

  .story-copy h1 {
    font-size: clamp(3rem, 16vw, 4.5rem);
  }

  .trust-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
  }

  .login-panel {
    order: -1;
    min-height: 100svh;
    padding: 2rem 1.5rem;
  }

  .login-panel-standalone {
    min-height: 100svh;
    border: 0;
    border-radius: 0;
  }

  .topbar {
    min-height: 4.3rem;
    padding: 0.7rem 1rem;
  }

  .wordmark > span:last-child,
  .account-name {
    display: none;
  }

  .portal-main {
    padding: 3.7rem 0 3.5rem;
  }

  .portal-heading {
    margin-bottom: 2.8rem;
  }

  .portal-heading h1 {
    font-size: clamp(3rem, 14.5vw, 4.5rem);
  }

  .portal-intro {
    font-size: 0.92rem;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-card {
    min-height: 30rem;
    border-radius: 1.35rem;
  }

  .app-visual {
    min-height: 18rem;
  }

  .app-content {
    min-height: 13rem;
    padding: 1.4rem;
  }

  .portal-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .access-summary,
  .access-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .access-summary > div {
    justify-content: flex-start;
  }

  .access-grid {
    grid-template-columns: 1fr;
  }

  .access-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

