.public-shell {
  min-height: 100vh;
  background: var(--color-public-page);
}

.public-shell .page-container {
  width: 100%;
  padding: 0;
}

.document-page {
  min-height: calc(100vh - 4.5rem);
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  background:
    linear-gradient(135deg, rgba(65, 105, 225, 0.10), rgba(255, 221, 87, 0.10)),
    var(--color-public-page);
}

.document-card {
  width: min(100%, 62rem);
  display: grid;
  grid-template-columns: minmax(15rem, 0.78fr) minmax(0, 1.22fr);
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.document-preview {
  min-height: 28rem;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    linear-gradient(160deg, var(--color-brand-surface), var(--color-primary) 72%, var(--color-accent));
}

.document-preview--muted {
  background:
    linear-gradient(160deg, var(--color-neutral-text), var(--color-muted) 72%, var(--color-border-strong));
}

.document-preview__sheet {
  width: min(100%, 16rem);
  aspect-ratio: 0.72;
  display: grid;
  align-content: start;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.24);
}

.document-preview__format {
  width: fit-content;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-sm);
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
  font-size: 0.75rem;
  font-weight: 800;
}

.document-preview__sheet strong {
  font-size: 1.25rem;
  line-height: 1.2;
}

.document-preview__sheet span:not(.document-preview__format) {
  height: 0.625rem;
  border-radius: var(--radius-pill);
  background: #e5e7eb;
}

.document-preview__sheet span:nth-of-type(3) {
  width: 82%;
}

.document-preview__sheet span:nth-of-type(4) {
  width: 64%;
}

.document-content {
  display: grid;
  align-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
}

.document-content__eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--color-primary-dark);
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
}

.document-content__title {
  margin: 0;
  color: var(--color-heading);
  font-size: clamp(2rem, 5vw, 3.75rem);
  line-height: 1;
}

.document-content__copy {
  max-width: 32rem;
  margin: var(--space-5) 0 0;
  color: var(--color-muted);
  font-size: 1.0625rem;
}

.document-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-8) 0 0;
}

.document-meta div {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.document-meta dt {
  margin: 0 0 var(--space-1);
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.document-meta dd {
  margin: 0;
  color: var(--color-heading);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-8) 0 0;
}

.document-actions__primary {
  min-width: 12rem;
}

.document-note {
  margin: var(--space-5) 0 0;
  color: var(--color-muted);
  font-size: 0.875rem;
}

@media (max-width: 760px) {
  .document-page {
    place-items: stretch;
  }

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

  .document-preview {
    min-height: 14rem;
  }

  .document-preview__sheet {
    width: min(100%, 11rem);
  }

  .document-meta {
    grid-template-columns: 1fr;
  }
}

.intro-splash {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 5vw, 3rem);
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary) 55%, var(--color-accent));
  animation: intro-splash-out 1.6s ease-in forwards;
}

.intro-splash__title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 850;
  opacity: 0;
  transform: scale(0.75);
  animation: intro-splash-title-in 0.6s ease-out 0.1s forwards;
}

@keyframes intro-splash-out {
  0% {
    opacity: 1;
    transform: scale(1.3);
    pointer-events: auto;
  }

  55% {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }

  100% {
    opacity: 0;
    transform: scale(1);
    pointer-events: none;
  }
}

@keyframes intro-splash-title-in {
  from {
    opacity: 0;
    transform: scale(0.75);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-splash {
    animation: none;
    opacity: 0;
    pointer-events: none;
  }
}

.public-welcome {
  --welcome-overlay-strong: rgba(0, 34, 68, 0.78);
  --welcome-overlay-mid: rgba(0, 34, 68, 0.34);
  --welcome-overlay-soft: rgba(0, 34, 68, 0.08);
  --welcome-primary-bg: #ffffff;
  --welcome-primary-text: #002244;
  --welcome-secondary-bg: rgba(255, 255, 255, 0.10);
  --welcome-secondary-border: rgba(255, 255, 255, 0.72);
  --welcome-secondary-text: #ffffff;
  --welcome-action-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.26);
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-items: end;
  padding: min(12vh, 7rem) clamp(1.25rem, 5vw, 5rem);
  color: #ffffff;
}

.public-welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, var(--welcome-overlay-strong), var(--welcome-overlay-mid) 45%, var(--welcome-overlay-soft)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.30), transparent 55%);
}

.public-welcome__carousel,
.public-welcome__slide {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.public-welcome__slide {
  opacity: 0;
  animation: public-carousel 40s infinite;
  animation-fill-mode: forwards;
  transform: scale(1.03);
}

.public-welcome__slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.public-welcome__slide:nth-child(2) {
  animation-delay: 5s;
}

.public-welcome__slide:nth-child(3) {
  animation-delay: 10s;
}

.public-welcome__slide:nth-child(4) {
  animation-delay: 15s;
}

.public-welcome__slide:nth-child(5) {
  animation-delay: 20s;
}

.public-welcome__slide:nth-child(6) {
  animation-delay: 25s;
}

.public-welcome__slide:nth-child(7) {
  animation-delay: 30s;
}

.public-welcome__slide:nth-child(8) {
  animation-delay: 35s;
}

.public-welcome__content {
  max-width: 48rem;
}

.public-welcome__eyebrow,
.public-welcome__title,
.public-welcome__copy,
.public-welcome__actions {
  opacity: 0;
  transform: translateY(0.75rem);
  animation: public-welcome-rise 0.7s ease-out forwards;
}

.public-welcome__eyebrow {
  margin: 0 0 var(--space-3);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  animation-delay: 0.05s;
}

.public-welcome__title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  line-height: 0.95;
  font-weight: 850;
  animation-delay: 0.15s;
}

.public-welcome__copy {
  max-width: 32rem;
  margin: var(--space-5) 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.25rem);
  animation-delay: 0.3s;
}

.public-welcome__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: var(--space-6) 0 0;
  animation-delay: 0.45s;
}

.public-welcome__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10.5rem;
  min-height: 3.125rem;
  padding: 0.875rem 1.75rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--welcome-primary-bg);
  color: var(--welcome-primary-text);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.18);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
}

.public-welcome__cta:hover {
  color: var(--welcome-primary-text);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--welcome-action-shadow);
}

.public-welcome__cta--secondary {
  background: var(--welcome-secondary-bg);
  color: var(--welcome-secondary-text);
  border-color: var(--welcome-secondary-border);
  backdrop-filter: blur(8px);
}

.public-welcome__cta--secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
  color: #ffffff;
}

.public-welcome__learn-more {
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 0.125rem;
  transition: border-color 0.15s ease-out, color 0.15s ease-out;
}

.public-welcome__learn-more:hover {
  color: #ffffff;
  text-decoration: none;
  border-color: #ffffff;
}

.public-welcome__cta:focus-visible,
.public-welcome__learn-more:focus-visible {
  outline: 3px solid rgba(255, 221, 87, 0.65);
  outline-offset: 4px;
}

@keyframes public-welcome-rise {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.public-welcome__dots {
  position: absolute;
  right: clamp(1.25rem, 5vw, 5rem);
  bottom: clamp(1.25rem, 5vw, 3rem);
  display: flex;
  gap: var(--space-2);
}

.public-welcome__dots span {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.42);
  animation: public-carousel-dot 40s infinite;
  animation-fill-mode: forwards;
}

.public-welcome__dots span:nth-child(2) {
  animation-delay: 5s;
}

.public-welcome__dots span:nth-child(3) {
  animation-delay: 10s;
}

.public-welcome__dots span:nth-child(4) {
  animation-delay: 15s;
}

.public-welcome__dots span:nth-child(5) {
  animation-delay: 20s;
}

.public-welcome__dots span:nth-child(6) {
  animation-delay: 25s;
}

.public-welcome__dots span:nth-child(7) {
  animation-delay: 30s;
}

.public-welcome__dots span:nth-child(8) {
  animation-delay: 35s;
}

@keyframes public-carousel {
  0%,
  16% {
    opacity: 1;
    transform: scale(1);
  }

  22%,
  96% {
    opacity: 0;
    transform: scale(1.03);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes public-carousel-dot {
  0%,
  16% {
    background: #ffffff;
    transform: scale(1.2);
  }

  22%,
  100% {
    background: rgba(255, 255, 255, 0.42);
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .public-welcome__slide,
  .public-welcome__dots span,
  .public-welcome__eyebrow,
  .public-welcome__title,
  .public-welcome__copy,
  .public-welcome__actions {
    animation: none;
  }

  .public-welcome__slide:first-child {
    opacity: 1;
    transform: scale(1);
  }

  .public-welcome__dots span:first-child {
    background: #ffffff;
    transform: scale(1.2);
  }

  .public-welcome__eyebrow,
  .public-welcome__title,
  .public-welcome__copy,
  .public-welcome__actions {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .public-welcome {
    min-height: 100vh;
    padding-bottom: 5.5rem;
  }

  .public-welcome::before {
    background:
      linear-gradient(90deg, var(--welcome-overlay-strong), var(--welcome-overlay-mid)),
      linear-gradient(0deg, rgba(0, 0, 0, 0.30), transparent 55%);
  }

  .public-welcome__actions {
    align-items: stretch;
    gap: var(--space-3);
  }

  .public-welcome__cta {
    width: 100%;
  }

  .public-welcome__dots {
    right: auto;
    left: clamp(1.25rem, 5vw, 5rem);
  }
}

@media (prefers-color-scheme: dark) {
  .public-welcome {
    --welcome-overlay-strong: rgba(2, 12, 28, 0.82);
    --welcome-overlay-mid: rgba(3, 22, 48, 0.46);
    --welcome-overlay-soft: rgba(3, 22, 48, 0.16);
    --welcome-primary-bg: #eef3ff;
    --welcome-primary-text: #061225;
    --welcome-secondary-bg: rgba(17, 24, 39, 0.42);
    --welcome-secondary-border: rgba(238, 243, 255, 0.68);
    --welcome-secondary-text: #f8fafc;
    --welcome-action-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.46);
  }
}

@media (prefers-reduced-motion: reduce) {
  .public-welcome__slide,
  .public-welcome__dots span {
    animation: none;
  }

  .public-welcome__slide:first-child {
    opacity: 1;
  }
}
