.tn-shell {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 52vw);
  place-items: unset;
  padding: 0;
  overflow: hidden;
  background: var(--bg);
  background-image: none;
  color: var(--text);
  font-family: var(--font-ui, 'Montserrat', 'Avenir Next', system-ui, sans-serif);
}


.tn-shell-billboard {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  overflow: hidden;
  background: transparent;
}

.tn-shell-billboard-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 70% at 28% 42%, rgba(255, 255, 255, 0.08) 0%, transparent 58%),
    radial-gradient(ellipse 70% 60% at 72% 52%, rgba(161, 161, 170, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 50% 45% at 50% 18%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    linear-gradient(115deg, #09090b 0%, #141418 52%, #27272a 100%);
  pointer-events: none;
}

.tn-shell-billboard-glow {
  position: absolute;
  width: min(70%, 520px);
  height: min(55%, 420px);
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.03) 40%,
    transparent 70%
  );
  filter: blur(28px);
  opacity: 0.6;
  pointer-events: none;
}

@keyframes tn-word-sweep {
  0%   { background-position: 160% 0; opacity: 1; }
  88%  { background-position: -60% 0; opacity: 1; }
  100% { background-position: -60% 0; opacity: 0; }
}

@keyframes tn-word-reveal {
  from { color: color-mix(in srgb, #ffffff 38%, transparent); }
  55%  { color: color-mix(in srgb, #ffffff 38%, transparent); }
  to   { color: #ffffff; }
}

.tn-shell-billboard-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  user-select: none;
  pointer-events: none;
}

.tn-shell-billboard-wordmark {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  z-index: 2;
  font-family: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  font-size: clamp(3.5rem, 8.5vw, 7rem);
  font-weight: 400;
  font-kerning: normal;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

.tn-shell-billboard-logo {
  width: 0.82em;
  height: 0.82em;
  border-radius: 999px;
  flex-shrink: 0;
  image-rendering: auto;
  transform: translateY(0.02em);
  margin-right: 0.04em;
}

.tn-shell-billboard-logo-glow {
  position: absolute;
  width: 2.2em;
  height: 2.2em;
  left: 0;
  top: 50%;
  transform: translate(-18%, -50%);
  z-index: -1;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(161, 161, 170, 0.06) 40%,
    transparent 70%
  );
  filter: blur(22px);
  pointer-events: none;
}

.tn-shell-billboard-word {
  position: relative;
  z-index: 2;
  margin: 0;
  width: max-content;
  display: grid;
  place-items: center;
  text-align: center;
  font: inherit;
  line-height: 1;
}

.tn-shell-billboard-tagline {
  margin: 0;
  font-family: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  font-size: clamp(0.85rem, 1.6vw, 1.15rem);
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: transparent;
  background-image: linear-gradient(
    90deg,
    #a1a1aa 0%,
    #ffffff 50%,
    #a1a1aa 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.35)) drop-shadow(0 0 20px rgba(161, 161, 170, 0.25));
  animation: tn-tagline-shimmer 6s ease-in-out infinite;
  z-index: 2;
}

@keyframes tn-tagline-shimmer {
  0%   { background-position: 0% 0; }
  50%  { background-position: -100% 0; }
  100% { background-position: 0% 0; }
}

.tn-shell-billboard-word-fill,
.tn-shell-billboard-word-shine {
  grid-area: 1 / 1;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}

.tn-shell-billboard-word-fill {
  color: #ffffff;
}

.tn-shell-billboard-word-shine {
  color: transparent;
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    transparent 38%,
    color-mix(in srgb, #ffffff 55%, transparent) 46%,
    #ffffff 50%,
    color-mix(in srgb, #ffffff 55%, transparent) 54%,
    transparent 62%,
    transparent 100%
  );
  background-size: 220% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 18px color-mix(in srgb, #ffffff 45%, transparent));
  animation: tn-word-sweep 2.4s ease-in-out 1 forwards;
  pointer-events: none;
}


.tn-shell-rail {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2rem;
  min-height: 100dvh;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(2rem, 5vh, 3rem) clamp(1.75rem, 4vw, 3rem);
  padding-top: clamp(3.5rem, 12vh, 7rem);
  background: var(--bg);
  border: none;
  border-left: none;
  box-shadow: none;
  outline: none;
  transition: background-color 520ms var(--ease);
}

.tn-shell-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  width: 100%;
  margin-top: auto;
  padding-top: 1.15rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: normal;
  color: var(--text-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  transition: color 520ms var(--ease);
}

.tn-shell-meta-link {
  color: var(--text-2);
  text-decoration: none;
  transition: color 160ms ease;
}

.tn-shell-meta-link:focus-visible {
  color: var(--accent);
  outline: none;
}

@media (hover: hover) {
  .tn-shell-meta-link:hover {
    color: var(--accent);
  }
}

.tn-shell-meta-dot {
  color: var(--text-3);
}

.tn-shell-meta-credit {
  color: var(--text-2);
}

.tn-shell-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tn-shell-row {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  align-items: baseline;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 1.4rem 0.75rem;
  border: none;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background 120ms ease;
}

.tn-shell-row:disabled {
  cursor: default;
  opacity: 0.45;
}

.tn-shell-row:last-child,
.tn-shell-nav > li:last-child .tn-shell-row {
  border-bottom: 1px solid var(--line);
}

.tn-shell-nav > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tn-shell-nav > li .tn-shell-row {
  width: 100%;
}

.tn-shell-row:focus-visible {
  background: rgba(255, 255, 255, 0.03);
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}

@media (hover: hover) {
  .tn-shell-row:hover {
    background: rgba(255, 255, 255, 0.03);
  }
}

.tn-shell-row-idx {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  padding-top: 0.25rem;
}

@media (hover: hover) {
  .tn-shell-row:hover .tn-shell-row-idx {
    color: var(--text-2);
  }
}

.tn-shell-row-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.tn-shell-row-label {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}

.tn-shell-row-blurb {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.4;
}

@media (max-width: 960px) {
  .tn-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 72px minmax(0, 1fr);
    height: 100dvh;
  }

  .tn-shell-billboard {
    min-height: 0;
  }

  .tn-shell-billboard-wordmark {
    font-size: 1.8rem;
  }

  .tn-shell-billboard-brand {
    gap: 0;
  }

  .tn-shell-billboard-tagline {
    display: none;
  }

  .tn-shell-billboard-glow,
  .tn-shell-billboard-logo-glow {
    display: none;
  }

  .tn-shell-rail {
    max-width: none;
    min-height: 0;
    padding-top: 1.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* ── Compact density for short viewports ─────────────────────────── */

@media (max-height: 780px) {
  .tn-shell-row {
    padding: 0.85rem 0.55rem;
  }
  .tn-shell-row-label {
    font-size: 1.1rem;
  }
  .tn-shell-row-blurb {
    font-size: 0.78rem;
  }
}

/* ── Picker entrance & logout ───────────────────────────────────── */

@keyframes tn-up-sm {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tn-picker-entrance { animation: tn-up-sm .38s cubic-bezier(.22,1,.36,1) both; }
.tn-picker-entrance.tn-d1 { animation-delay: 80ms; }
.tn-picker-entrance.tn-d2 { animation-delay: 140ms; }
.tn-picker-entrance.tn-d3 { animation-delay: 200ms; }
.tn-picker-entrance.tn-d4 { animation-delay: 260ms; }
.tn-picker-entrance.tn-d5 { animation-delay: 320ms; }
.tn-picker-entrance.tn-d6 { animation-delay: 380ms; }
.tn-picker-entrance.tn-d7 { animation-delay: 440ms; }
.tn-picker-entrance.tn-d8 { animation-delay: 500ms; }

/* Fluid smoke canvas — shared between login and picker dark panels */
.tn-login-smoke {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.tn-picker-rail {
  position: relative;
}

.tn-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0.75rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
}

.tn-picker-heading {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.tn-logout {
  display: inline-flex;
  align-items: center;
  margin: -0.22rem 0 0 auto;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
@media (hover: hover) {
  .tn-logout:hover {
    color: var(--text);
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
  }
}

/* ── Reduced motion ─────────────────────────────────────────────── */

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

/* ── Screen-reader only ─────────────────────────────────────────── */

.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;
}
