/* =============================================================================
   PBO DTS Public UI — government adaptation of The Verge design system
   See DESIGN.md “PBO government adaptation” for token mapping.
   ============================================================================= */

:root {
  --pub-canvas: #0c1b2a;
  --pub-canvas-soft: #132536;
  --pub-paper: #ffffff;
  --pub-paper-soft: #f7fafc;
  --pub-line: #d7e2ea;
  --pub-line-strong: #b8c9d6;
  --pub-text: #122033;
  --pub-text-soft: #4d6476;
  --pub-text-on-dark: #f4f8fb;
  --pub-muted-on-dark: #9eb3c4;
  --pub-accent: #14b8a6;
  --pub-accent-deep: #0f766e;
  --pub-navy: #1e3a8a;
  --pub-hover-link: #2563eb;
  --pub-radius-sm: 4px;
  --pub-radius-md: 20px;
  --pub-radius-lg: 24px;
  --pub-radius-pill: 40px;
  --pub-font: "Space Grotesk", "Segoe UI", sans-serif;
  --pub-display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --pub-mono: "JetBrains Mono", "Courier New", monospace;
  --pub-max: 1100px;
  --pub-gutter: clamp(1.75rem, 6vw, 4rem);
}

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

.pub-body,
body.landing-body,
body.pub-auth-body,
body.pub-misc-body {
  margin: 0;
  font-family: var(--pub-font);
  color: var(--pub-text);
  background: var(--pub-paper-soft);
  scroll-behavior: smooth;
}

.pub-shell,
.shell {
  width: 100%;
  max-width: var(--pub-max);
  margin-inline: auto;
  padding-inline: var(--pub-gutter);
  box-sizing: border-box;
}

/* Keep nav/hero content inset and centered on wide viewports */
.topnav {
  padding-inline: var(--pub-gutter);
}

.topnav > .shell {
  max-width: var(--pub-max);
  padding-inline: 0;
}

.hero > .shell {
  max-width: var(--pub-max);
  padding-inline: 0;
  margin-inline: auto;
  align-self: center;
}

.pub-kicker,
.kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--pub-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--pub-accent);
}

.pub-display {
  font-family: var(--pub-display);
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 0.95;
}

.pub-btn,
.hero-btn,
.btn-linkish,
.track-cta,
.btn-auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  border-radius: var(--pub-radius-pill);
  border: 1px solid transparent;
  font-family: var(--pub-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.pub-btn-outline,
.hero-btn.is-alt,
.btn-linkish {
  background: transparent;
  color: var(--pub-text-on-dark);
  border-color: rgba(255, 255, 255, 0.55);
}

.pub-btn-outline:hover,
.hero-btn.is-alt:hover,
.btn-linkish:hover {
  color: var(--pub-hover-link);
  border-color: var(--pub-hover-link);
}

.pub-btn-primary,
.hero-btn.is-main,
.btn-linkish.is-primary,
.track-cta,
.btn-auth {
  background: var(--pub-accent);
  color: #04120f;
  border-color: var(--pub-accent);
}

.pub-btn-primary:hover,
.hero-btn.is-main:hover,
.btn-linkish.is-primary:hover,
.track-cta:hover,
.btn-auth:hover {
  background: #ffffff;
  color: #04120f;
  border-color: #c2c2c2;
}

.pub-btn-outline-dark {
  background: transparent;
  color: var(--pub-text);
  border-color: var(--pub-line-strong);
}

.pub-btn-outline-dark:hover {
  color: var(--pub-hover-link);
  border-color: var(--pub-hover-link);
}

/* ----- Nav ----- */
.pub-nav,
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 27, 42, 0.92);
  backdrop-filter: blur(10px);
}

.topnav.scrolled {
  background: rgba(12, 27, 42, 0.98);
}

.topnav-wrap {
  min-height: 76px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--pub-text-on-dark);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #fff;
  padding: 0.2rem;
}

.brand span {
  font-family: var(--pub-display);
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  line-height: 1;
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  border-radius: var(--pub-radius-pill);
  min-height: 40px;
  padding: 0.4rem 0.9rem;
  font-family: var(--pub-mono);
  font-size: 0.68rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.nav-collapsible {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  color: var(--pub-muted-on-dark);
  text-decoration: none;
  font-family: var(--pub-mono);
  font-size: 0.68rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: #fff;
  border-bottom-color: var(--pub-accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-left: 0.75rem;
  flex-shrink: 0;
}

/* ----- Landing hero ----- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(7rem, 13vh, 8.75rem) var(--pub-gutter) clamp(3.5rem, 9vh, 5.5rem);
  background: var(--pub-canvas);
  color: var(--pub-text-on-dark);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 85% 20%, rgba(20, 184, 166, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 45% at 10% 80%, rgba(30, 58, 138, 0.28), transparent 60%),
    linear-gradient(180deg, #0a1724 0%, var(--pub-canvas) 45%, #08131e 100%);
}

.hero-atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

.hero-atmosphere::after {
  content: "";
  position: absolute;
  width: min(52vw, 520px);
  height: min(52vw, 520px);
  right: -8%;
  top: 18%;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 50%;
  animation: heroPulse 8s ease-in-out infinite;
}

.hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(3rem, 7vw, 5rem);
  row-gap: 3rem;
  align-items: center;
}

.hero-left {
  max-width: 32rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-left .kicker {
  margin: 0 0 1.25rem;
}

.hero-brand {
  font-family: var(--pub-display);
  font-size: clamp(3.4rem, 7.5vw, 5.25rem);
  line-height: 0.9;
  letter-spacing: 1px;
  color: #fff;
  margin: 0 0 1.5rem;
  position: relative;
}

.hero-brand span {
  color: var(--pub-accent);
}

.hero-brand::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  margin-top: 1rem;
  background: var(--pub-accent);
  transform-origin: left center;
  animation: heroBar 0.8s ease 0.35s both;
}

.hero-title {
  font-family: var(--pub-font);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 500;
  line-height: 1.4;
  color: #e8f2f8;
  margin: 0 0 1rem;
  max-width: 28ch;
}

.hero-copy {
  color: var(--pub-muted-on-dark);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 40ch;
  margin: 0 0 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.hero-btn.is-ghost {
  background: transparent;
  color: var(--pub-muted-on-dark);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.hero-btn.is-ghost:hover {
  color: #fff;
  border-color: transparent;
  background: transparent;
}

.hero-stage {
  position: relative;
  min-height: 0;
  max-width: 28rem;
  width: 100%;
  justify-self: end;
  padding: 0.35rem 0 0.35rem 1.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-stage-kicker {
  margin: 0 0 1.25rem;
  font-family: var(--pub-mono);
  font-size: 0.68rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--pub-accent);
}

.hero-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  position: relative;
}

.hero-rail::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 0.65rem;
  bottom: 0.65rem;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(20, 184, 166, 0.75) 0,
    rgba(20, 184, 166, 0.75) 5px,
    transparent 5px,
    transparent 11px
  );
}

.hero-rail li {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  column-gap: 1rem;
  align-items: center;
  padding: 0.95rem 0;
  position: relative;
}

.hero-rail-num {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  border: 1px solid rgba(20, 184, 166, 0.55);
  background: var(--pub-canvas);
  color: var(--pub-accent);
  font-family: var(--pub-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-rail strong {
  display: block;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.12rem;
  line-height: 1.2;
}

.hero-rail span:not(.hero-rail-num) {
  color: var(--pub-muted-on-dark);
  font-size: 0.84rem;
  line-height: 1.4;
}

.hero-anim {
  opacity: 0;
  transform: translateY(18px);
  animation: heroRise 0.7s ease forwards;
}

.hero-anim-1 { animation-delay: 0.05s; }
.hero-anim-2 { animation-delay: 0.14s; }
.hero-anim-3 { animation-delay: 0.24s; }
.hero-anim-4 { animation-delay: 0.34s; }
.hero-anim-5 { animation-delay: 0.44s; }
.hero-anim-6 { animation-delay: 0.55s; }

@keyframes heroRise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroBar {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes heroPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.85;
  }
}

/* ----- Sections ----- */
.section {
  padding: 4.5rem 0;
  scroll-margin-top: 88px;
}

.section.is-soft {
  background: #eef5f9;
}

.section-heading {
  max-width: 640px;
  margin: 0 auto 2rem;
  text-align: center;
}

.section-heading h2 {
  margin: 0.55rem 0 0.65rem;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 700;
  color: var(--pub-text);
  line-height: 1.15;
}

.section-heading p {
  margin: 0;
  color: var(--pub-text-soft);
  line-height: 1.6;
}

.story-grid,
.feature-grid,
.contact-grid,
.team-grid {
  display: grid;
  gap: 1rem;
}

.story-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 1.25rem;
}

.feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

.contact-grid {
  grid-template-columns: repeat(3, 1fr);
}

.team-grid {
  grid-template-columns: repeat(4, 1fr);
}

.story-card,
.feature-card,
.contact-card,
.person,
.track-wrap,
.track-result-item {
  background: var(--pub-paper);
  border: 1px solid var(--pub-line);
  border-radius: var(--pub-radius-md);
}

.story-card,
.feature-card,
.contact-card {
  padding: 1.35rem;
}

.story-card .icon,
.feature-icon,
.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pub-canvas);
  color: var(--pub-accent);
  margin-bottom: 0.85rem;
}

.story-card h3,
.feature-card h4,
.contact-card h4 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.story-card p,
.feature-card p,
.contact-card p {
  margin: 0;
  color: var(--pub-text-soft);
  line-height: 1.55;
  font-size: 0.92rem;
}

.contact-card a {
  color: var(--pub-navy);
  font-weight: 600;
  text-decoration: none;
}

.contact-card a:hover {
  color: var(--pub-hover-link);
}

/* Timeline / StoryStream-inspired process */
.pub-timeline,
.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  position: relative;
}

.flow-board .flow-steps::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    var(--pub-navy) 0,
    var(--pub-navy) 6px,
    transparent 6px,
    transparent 12px
  );
}

.flow-board {
  border: 1px solid var(--pub-line);
  border-radius: var(--pub-radius-lg);
  background: var(--pub-paper);
  padding: 1.4rem;
}

.flow-steps {
  grid-template-columns: 1fr;
}

.flow-steps li,
.pub-timeline-item {
  position: relative;
  margin-left: 2.4rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--pub-line);
  border-radius: var(--pub-radius-md);
  background: var(--pub-paper-soft);
}

.flow-steps li::before,
.pub-timeline-item::before {
  content: "";
  position: absolute;
  left: -1.85rem;
  top: 1.15rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pub-accent);
  border: 2px solid var(--pub-canvas);
}

.flow-steps li strong {
  display: block;
  font-family: var(--pub-mono);
  font-size: 0.7rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--pub-navy);
  margin-bottom: 0.3rem;
}

.flow-steps li span {
  color: var(--pub-text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.person {
  overflow: hidden;
}

.person-head {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pub-canvas);
  color: var(--pub-accent);
  font-family: var(--pub-display);
  font-size: 1.4rem;
}

.person-body {
  padding: 0.9rem 1rem 1.05rem;
  display: grid;
  gap: 0.2rem;
}

.person-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.person-role,
.person-title {
  color: var(--pub-text-soft);
  font-size: 0.78rem;
}

/* Track */
.track-wrap {
  padding: 1.35rem;
  max-width: 820px;
  margin: 0 auto;
}

.track-tabs {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.track-tab {
  border: 1px solid var(--pub-line-strong);
  background: transparent;
  color: var(--pub-text-soft);
  border-radius: var(--pub-radius-pill);
  min-height: 40px;
  padding: 0.4rem 1rem;
  font-family: var(--pub-mono);
  font-size: 0.68rem;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  cursor: pointer;
}

.track-tab.is-active {
  background: var(--pub-canvas);
  border-color: var(--pub-canvas);
  color: #fff;
  box-shadow: inset 0 -2px 0 0 var(--pub-accent);
}

.field,
.track-wrap .field {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--pub-line-strong);
  border-radius: var(--pub-radius-sm);
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.65rem;
  font-family: var(--pub-font);
  font-size: 0.95rem;
  background: #fff;
  color: var(--pub-text);
}

.field:focus {
  outline: none;
  border-color: var(--pub-accent);
}

.track-cta {
  width: 100%;
  margin-top: 0.25rem;
}

.track-result-wrap {
  margin-top: 1rem;
  display: none;
}

#trackResultList {
  display: grid;
  gap: 0.75rem;
}

.track-result-item {
  padding: 1.1rem 1.15rem 1.2rem;
}

.track-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.badge-lite {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e8f4f2;
  color: var(--pub-accent-deep);
  font-family: var(--pub-mono);
  font-size: 0.62rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.track-title {
  font-weight: 700;
  margin-bottom: 0.65rem;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--pub-text);
}

.track-payee {
  margin: 0 0 0.75rem;
  color: var(--pub-text-soft);
  font-size: 0.78rem;
  line-height: 1.4;
}

.track-empty {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px dashed var(--pub-line-strong);
  border-radius: var(--pub-radius-sm);
  background: var(--pub-paper-soft);
  color: var(--pub-text-soft);
  font-size: 0.8rem;
}

.track-timeline {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  position: relative;
}

.track-timeline-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 0.75rem;
  position: relative;
  padding-bottom: 1rem;
}

.track-timeline-item:last-child {
  padding-bottom: 0;
}

.track-timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--pub-accent) 0%,
    var(--pub-line-strong) 100%
  );
}

.track-timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-top: 0.15rem;
  background: var(--pub-paper);
  border: 2px solid var(--pub-accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
  position: relative;
  z-index: 1;
}

.track-timeline-item.is-latest .track-timeline-dot {
  background: var(--pub-accent);
  border-color: var(--pub-accent-deep);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.18);
}

.track-timeline-body {
  min-width: 0;
  padding: 0.55rem 0.75rem 0.65rem;
  border: 1px solid var(--pub-line);
  border-radius: var(--pub-radius-sm);
  background: var(--pub-paper-soft);
}

.track-timeline-item.is-latest .track-timeline-body {
  border-color: rgba(20, 184, 166, 0.35);
  background: #f2fbf9;
}

.track-timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.25rem;
}

.track-timeline-slip {
  font-family: var(--pub-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--pub-navy);
  word-break: break-word;
}

.track-timeline-time {
  font-family: var(--pub-mono);
  font-size: 0.62rem;
  letter-spacing: 0.4px;
  color: var(--pub-text-soft);
  white-space: nowrap;
}

.track-timeline-remarks {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--pub-text);
  word-break: break-word;
}

.site-foot {
  background: var(--pub-canvas);
  color: var(--pub-muted-on-dark);
  padding: 2.2rem 0;
}

.site-foot .shell {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: center;
}

.site-foot .shell > div:last-child {
  text-align: right;
}

.site-foot h5 {
  color: #fff;
  font-family: var(--pub-display);
  font-size: 1.25rem;
  margin: 0 0 0.45rem;
}

.site-foot a {
  color: var(--pub-accent);
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--pub-hover-link);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ----- Auth ----- */
body.pub-auth-body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 50% at 12% 15%, rgba(20, 184, 166, 0.12), transparent 55%),
    radial-gradient(ellipse 45% 40% at 90% 80%, rgba(30, 58, 138, 0.22), transparent 55%),
    var(--pub-canvas);
}

.auth-screen,
.pub-auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-grid,
.pub-auth-grid {
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  border-radius: var(--pub-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #fff;
  animation: authIn 0.55s ease both;
}

.auth-grid-wide {
  max-width: 1120px;
  grid-template-columns: 0.95fr 1.15fr;
}

@keyframes authIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.auth-brand-panel,
.pub-auth-brand {
  color: var(--pub-text-on-dark);
  padding: 2.75rem 2.4rem;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(20, 184, 166, 0.18), transparent 55%),
    linear-gradient(165deg, #0a1724 0%, var(--pub-canvas) 55%, #132536 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
}

.auth-brand,
.pub-auth-brand .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
}

.auth-brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #fff;
  padding: 0.25rem;
}

.auth-brand span {
  font-family: var(--pub-display);
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.auth-brand-panel .kicker {
  position: relative;
  z-index: 1;
  margin-bottom: 0.65rem;
}

.auth-display {
  position: relative;
  z-index: 1;
  font-family: var(--pub-display);
  font-size: clamp(2.6rem, 5vw, 3.4rem);
  line-height: 0.92;
  letter-spacing: 0.5px;
  color: #fff;
  margin: 0 0 1rem;
  font-weight: 400;
}

.auth-display span {
  color: var(--pub-accent);
}

.auth-lead {
  position: relative;
  z-index: 1;
  color: var(--pub-muted-on-dark);
  margin: 0 0 1.5rem;
  line-height: 1.6;
  font-size: 0.98rem;
  max-width: 32ch;
}

.auth-points {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
  flex: 1;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  color: #d7e6f0;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-points li:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.auth-points i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 184, 166, 0.14);
  border: 1px solid rgba(20, 184, 166, 0.35);
  color: var(--pub-accent);
  flex-shrink: 0;
}

.auth-brand-foot {
  position: relative;
  z-index: 1;
  margin: 2rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--pub-mono);
  font-size: 0.66rem;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--pub-muted-on-dark);
}

.auth-form-panel,
.pub-auth-form {
  padding: 2.4rem 2.2rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-mobile-brand {
  display: none;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--pub-line);
}

.auth-mobile-brand .auth-brand {
  margin-bottom: 0;
  color: var(--pub-text);
}

.auth-form-wrap {
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
}

.auth-grid-wide .auth-form-wrap {
  max-width: 520px;
}

.auth-step {
  font-family: var(--pub-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--pub-accent-deep);
  margin: 0 0 0.45rem;
}

.auth-header h3 {
  color: var(--pub-text);
  font-weight: 700;
  font-size: 1.55rem;
  margin: 0 0 0.4rem;
}

.auth-header p {
  color: var(--pub-text-soft);
  font-size: 0.93rem;
  margin: 0 0 1.45rem;
  line-height: 1.5;
}

.auth-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.form-floating-outline .form-control,
.form-floating-outline .form-select,
.pub-auth-form .form-control {
  border-radius: var(--pub-radius-sm);
  border: 1px solid var(--pub-line-strong);
  min-height: 52px;
  font-size: 0.93rem;
  background: #fbfcfd;
}

.form-floating-outline textarea.form-control {
  min-height: 110px;
  padding-top: 1.35rem;
}

.form-floating-outline .form-control:focus,
.form-floating-outline .form-select:focus,
.pub-auth-form .form-control:focus {
  border-color: var(--pub-accent);
  box-shadow: 0 0 0 1px var(--pub-accent);
  background: #fff;
}

.form-floating-outline label {
  color: var(--pub-text-soft);
}

.auth-password-wrap,
.password-wrap {
  position: relative;
}

#togglePassword,
.auth-password-wrap .btn,
.password-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  color: #4d617d;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  cursor: pointer;
}

#togglePassword:hover,
.password-toggle:hover {
  color: var(--pub-accent-deep);
  background: rgba(20, 184, 166, 0.1);
}

.password-meter {
  height: 4px;
  border-radius: 999px;
  background: #e7eef4;
  margin-top: 0.55rem;
  overflow: hidden;
}

.password-meter span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--pub-accent);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.password-note {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--pub-text-soft);
}

.serial-chip,
.email-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--pub-line);
  background: var(--pub-paper-soft);
  color: var(--pub-text);
  font-family: var(--pub-mono);
  font-size: 0.75rem;
  margin-bottom: 1rem;
  word-break: break-all;
}

.auth-card {
  width: min(480px, 100%);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--pub-radius-lg);
  padding: 2.2rem 1.8rem;
  animation: authIn 0.55s ease both;
}

.auth-inner {
  text-align: center;
}

.auth-inner h3 {
  margin: 0 0 0.45rem;
  font-size: 1.45rem;
  color: var(--pub-text);
}

.auth-inner > p {
  color: var(--pub-text-soft);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.status-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.35);
  color: var(--pub-accent-deep);
  font-size: 1.8rem;
}

.hint-box {
  text-align: left;
  border: 1px solid var(--pub-line);
  border-radius: 12px;
  background: var(--pub-paper-soft);
  padding: 0.9rem 1rem;
  margin: 0 0 1.25rem;
}

.hint-box p {
  margin: 0;
  color: var(--pub-text-soft);
  font-size: 0.86rem;
  line-height: 1.5;
}

.form-check-input:checked {
  background-color: var(--pub-accent);
  border-color: var(--pub-accent);
}

.auth-link {
  color: var(--pub-navy);
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  color: var(--pub-hover-link);
}

.auth-footnote {
  color: var(--pub-text-soft);
  font-size: 0.9rem;
  margin: 1rem 0 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #8494aa;
  font-family: var(--pub-mono);
  font-size: 0.68rem;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  margin: 1.35rem 0 1rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--pub-line);
}

.btn.btn-auth,
.btn-auth {
  box-shadow: none !important;
  background: var(--pub-accent) !important;
  color: #04120f !important;
  border: 1px solid var(--pub-accent) !important;
  border-radius: var(--pub-radius-pill) !important;
  font-family: var(--pub-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.btn.btn-auth:hover,
.btn-auth:hover {
  background: #0f766e !important;
  border-color: #0f766e !important;
  color: #fff !important;
}

/* ----- Misc / error ----- */
body.pub-misc-body {
  min-height: 100vh;
  background: var(--pub-paper-soft);
}

.pub-misc-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.pub-misc-card {
  width: min(720px, 100%);
  background: #fff;
  border: 1px solid var(--pub-line);
  border-radius: var(--pub-radius-lg);
  padding: 2rem;
  text-align: center;
}

.pub-misc-code {
  font-family: var(--pub-display);
  font-size: clamp(3.5rem, 10vw, 5rem);
  line-height: 0.95;
  color: var(--pub-canvas);
  margin: 0 0 0.6rem;
}

.pub-misc-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.pub-misc-card p {
  color: var(--pub-text-soft);
  margin: 0 0 0.4rem;
}

.pub-misc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1.4rem;
}

.pub-misc-actions .pub-btn-primary {
  text-decoration: none;
}

.pub-misc-actions .pub-btn-outline-dark {
  text-decoration: none;
}

/* Responsive */
@media (max-width: 991.98px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .nav-collapsible {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    background: var(--pub-canvas);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--pub-radius-md);
    padding: 0.9rem;
  }

  .topnav.mobile-open .nav-collapsible {
    display: flex;
  }

  .nav-collapsible .nav-links,
  .nav-collapsible .nav-actions {
    flex-direction: column;
    width: 100%;
    margin: 0;
  }

  .hero {
    align-items: center;
    padding-top: 6.75rem;
    padding-bottom: 3rem;
  }

  .hero-stage {
    justify-self: stretch;
    max-width: none;
    padding-left: 0;
    border-left: 0;
  }

  .topnav {
    padding-inline: var(--pub-gutter);
  }

  .hero-grid,
  .story-grid,
  .feature-grid,
  .contact-grid,
  .team-grid,
  .auth-grid,
  .auth-grid-wide,
  .pub-auth-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 0;
    padding: 1.25rem 0 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .auth-brand-panel,
  .pub-auth-brand {
    display: none;
  }

  .auth-mobile-brand {
    display: block;
  }

  .auth-form-panel,
  .pub-auth-form {
    padding: 1.6rem 1.25rem;
  }

  .site-foot .shell {
    display: grid !important;
    grid-template-columns: 1fr !important;
    text-align: left !important;
  }

  .site-foot .shell > div:last-child {
    text-align: left !important;
  }
}

@media (max-width: 575.98px) {
  .hero-brand {
    font-size: clamp(3.4rem, 18vw, 4.4rem);
  }

  .hero-actions .hero-btn.is-main,
  .hero-actions .hero-btn.is-alt {
    width: 100%;
  }

  .hero-btn.is-ghost {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

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

  .feature-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .auth-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .track-timeline-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .track-timeline-time {
    white-space: normal;
  }
}
