.docs-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

.doc-card {
  min-height: 270px;
  display: grid;
  grid-template-rows: 2.25rem 3.25rem 1fr;
  align-content: start;
  gap: 0.85rem;
}

.doc-card > span {
  margin: 0;
  align-self: start;
  line-height: 1.35;
}

.doc-card h3 {
  margin: 0;
  align-self: start;
}

.doc-card p {
  margin: 0;
  align-self: start;
}

.project-profile {
  margin-bottom: 1rem;
  padding: 1.35rem;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-sm);
}

.profile-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(280px, 1fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.1rem;
}

.profile-heading h3 {
  margin: 0;
  font-size: 1.45rem;
}

.profile-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.profile-grid label {
  min-width: 0;
  display: grid;
  gap: 0.42rem;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 850;
}

.profile-grid input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 0.72rem 0.82rem;
  color: var(--text);
  background: var(--surface-elevated);
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-grid input::placeholder {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.profile-grid input:hover {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
}

html[data-theme="dark"] .button.primary,
html[data-theme="dark"] .tool-actions button:not(.secondary-button):not(.text-button),
html[data-theme="dark"] .brand-mark {
  color: #07111f;
}

html[data-theme="dark"] .eyebrow.light {
  color: #a8b7da;
}

html[data-theme="dark"] .timeline li.current::before {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 14%, transparent);
}

html[data-theme="dark"] .preview-progress span {
  background: linear-gradient(90deg, #55d6a5, var(--primary));
}

.hero::after {
  content: "";
  position: absolute;
  top: 43%;
  right: clamp(-2rem, -0.5vw, 1rem);
  z-index: 0;
  width: min(48vw, 620px);
  aspect-ratio: 1;
  pointer-events: none;
  background: url("hero-orbit.svg") center / contain no-repeat;
  opacity: 0.42;
  transform: translateY(-50%);
  animation: hero-orbit-float 10s ease-in-out infinite alternate;
}

.hero-grid {
  z-index: 1;
}

html[data-theme="dark"] .hero::after {
  opacity: 0.44;
}

@media (min-width: 1041px) {
  .hero {
    padding-top: 3.5rem;
    padding-bottom: 4rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(3rem, 4vw, 4rem);
    line-height: 1.03;
    text-wrap: balance;
  }

  .hero-text {
    margin-top: 1.1rem;
    font-size: clamp(1rem, 1.3vw, 1.12rem);
    line-height: 1.55;
  }

  .hero-actions {
    margin-top: 1.3rem;
  }

  .hero-points {
    margin-top: 1rem;
  }

  .hero-panel {
    padding: 1.1rem;
  }

  .preview-progress {
    margin: 0.75rem 0 0.9rem;
  }

  .preview-list {
    gap: 0.5rem;
  }

  .preview-item {
    gap: 0.75rem;
    padding: 0.72rem;
  }

  .preview-icon {
    width: 1.9rem;
    height: 1.9rem;
  }

  .panel-note {
    margin-top: 0.65rem;
  }
}

@media (min-width: 1200px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(470px, 520px);
    gap: clamp(2.5rem, 4vw, 4rem);
  }
}

@media (min-width: 1041px) and (max-height: 900px) {
  .hero {
    padding-top: 2.75rem;
    padding-bottom: 3rem;
  }

  .status-pill {
    margin-bottom: 1rem;
  }

  .eyebrow {
    margin-bottom: 0.55rem;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 3.75vw, 3.75rem);
  }

  .hero-text {
    margin-top: 0.9rem;
  }

  .hero-actions {
    margin-top: 1.1rem;
  }

  .hero-points {
    margin-top: 0.85rem;
  }
}

@keyframes hero-orbit-float {
  from {
    transform: translateY(calc(-50% - 5px));
  }

  to {
    transform: translateY(calc(-50% + 7px));
  }
}

@media (max-width: 1180px) {
  .docs-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .hero::after {
    top: 29%;
    right: -8rem;
    width: min(76vw, 560px);
    opacity: 0.2;
  }

  html[data-theme="dark"] .hero::after {
    opacity: 0.34;
  }
}

@media (max-width: 900px) {
  .docs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-heading {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
}

@media (max-width: 760px) {
  .docs-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .doc-card {
    min-height: auto;
    grid-template-rows: auto;
    gap: 0.65rem;
  }

  .doc-card h3 {
    margin-top: 0.35rem;
  }

  .project-profile {
    padding: 1.1rem;
  }

  .hero::after {
    top: 20%;
    right: -12rem;
    width: 430px;
    opacity: 0.13;
  }

  html[data-theme="dark"] .hero::after {
    opacity: 0.22;
  }
}

@media (max-width: 520px) {
  .hero::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::after {
    animation: none;
    transform: translateY(-50%);
  }
}

@media print {
  .project-profile {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #999999;
    background: #ffffff;
    box-shadow: none;
    break-inside: avoid;
  }

  .profile-heading {
    display: block;
    margin-bottom: 0.75rem;
  }

  .profile-heading > p {
    margin-top: 0.25rem;
    color: #333333;
  }

  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1rem;
  }

  .profile-grid input {
    min-height: 0;
    border: 0;
    border-bottom: 1px solid #999999;
    border-radius: 0;
    padding: 0.25rem 0;
    color: #000000;
    background: #ffffff;
  }
}
