/* Layout tweaks for the landing page cover */
:root {
    --cover-deep: #242341;
    --cover-accent: #ff6688;
    --cover-light: #ffffff;
    --cover-max-height: 640px;
}

/* Use Open Sans for landing page text */
h1, h2, h3, h4, h5, h6,
.download-label,
.download-sub,
.format-help,
.page-content,
.toc-list ul li a {
    font-family: 'Open Sans', system-ui, sans-serif;
}

.cover-hero {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 0.9fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
    justify-content: center;
    padding: clamp(2.5rem, 5vw, 4.5rem);
    background:
        radial-gradient(circle at 20% 25%, rgba(255, 102, 136, 0.25), transparent 45%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15), transparent 40%),
        linear-gradient(135deg, var(--cover-deep) 0%, #2e294f 45%, var(--cover-accent) 100%);
}

.cover-card {
    width: min(55vw, 520px);
    max-height: var(--cover-max-height);
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.cover-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    max-height: var(--cover-max-height);
    margin: 0 auto;
    border-radius: 0;
}

.info-stack {
    width: min(40vw, 440px);
    min-width: 280px;
    display: grid;
    gap: 1rem;
    max-height: var(--cover-max-height);
    overflow: hidden;
}

.description-card,
.download-stack {
    background-color: var(--pico-background-color);
    border-radius: 18px;
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: 0 16px 40px rgba(36, 35, 65, 0.18);
    backdrop-filter: blur(2px);
    color: #1c1a2d;
}

.description-card {
    overflow: auto;
}

.download-stack {
    overflow: auto;
}

.download-stack h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.download-grid {
    display: grid;
    gap: 0.75rem;
}

.download-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    background: linear-gradient(120deg, #ffffff 0%, #f7f1ff 50%, #ffe9f1 100%);
    box-shadow: 0 12px 24px rgba(36, 35, 65, 0.12);
    color: inherit;
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.download-card:hover,
.download-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(36, 35, 65, 0.16);
}

.download-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 1.35rem;
    background: linear-gradient(150deg, var(--cover-deep), #2e2a50, var(--cover-accent));
    color: #fff;
}

.download-label {
    font-weight: 700;
}

.download-sub {
    font-size: 0.9rem;
    color: #433f60;
}

@media (max-width: 900px) {
    .cover-hero {
        grid-template-columns: 1fr;
    }
    .info-stack,
    .cover-card {
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
    }
}

.page-content {
    max-width: 900px;
    margin: 1.5rem auto;
    padding: 0 1.25rem 2.5rem;
    text-align: left;
}

.format-help {
    margin-top: 1rem;
}

.format-guide table {
    width: 100%;
    text-align: left;
}

.format-guide th[scope="row"] {
    white-space: nowrap;
}

.site-footer {
    margin-top: 1.5rem;
    background:
        radial-gradient(circle at 20% 25%, rgba(255, 102, 136, 0.25), transparent 45%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15), transparent 40%),
        linear-gradient(135deg, var(--cover-deep) 0%, #2e294f 45%, var(--cover-accent) 100%);
    width: 100%;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.25rem 1.5rem;
    text-align: center;
}

.footer-inner p {
    color: white;
    font-size: 0.75rem;
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
}

.footer-inner p:last-child {
    margin-bottom: 0;
}

/* Table of Contents Styling */
.toc-list {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.toc-list h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--cover-deep);
}

.toc-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 0.25rem;
  list-style-type: none;
}

.toc-list a {
  display: block;
  text-decoration: none;
  color: rgb(36, 35, 63);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: underline;
}

.toc-list a:hover {
  background-color: white;
  color: rgb(237, 112, 137);
}

/* Dark mode: improve link visibility in TOC */
@media (prefers-color-scheme: dark) {
  .toc-list a {
    color: rgb(183, 219, 224);
  }

  .toc-list h3 {
    color: white;
  }
}

.subtitle {
  font-weight: 300;
}

/* style links in table */

table a {
    text-decoration: none;
}

table a:hover {
    color:rgb(237, 112, 137)
}


/* Visually hidden but accessible to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
