@import url("https://fonts.googleapis.com/css2?family=Questrial&display=swap");

:root {
  color-scheme: light;
  font-family: "Questrial", "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.5;
  color: #14121F;
  background: #F4F6FA;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #14121F;
  --muted: #5D5870;
  --border: #D6D8E6;
  --plum: #5A2455;
  --warm: #D0A061;
  --nav-bg: #100E1F;
  --nav-bg-raised: #1B152B;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #F4F6FA;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 14px clamp(20px, 5vw, 72px);
  color: #FFFFFF;
  background: linear-gradient(115deg, var(--nav-bg) 0%, var(--nav-bg-raised) 70%, #2E144C 100%);
  border-bottom: 1px solid rgba(214, 216, 230, 0.14);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand-link img { display: block; width: min(112px, 34vw); height: auto; }
.brand-link span { padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, 0.22); }
.preview-label { color: rgba(255, 255, 255, 0.7); font-size: 0.76rem; letter-spacing: 0.04em; }

.app-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px clamp(20px, 5vw, 72px) 72px;
}

.markdown-page { width: 100%; }
.page-heading { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; color: var(--plum); font-size: clamp(2.25rem, 5vw, 3.4rem); font-weight: 400; line-height: 1.05; letter-spacing: -0.055em; }

.resource-section { margin-top: 38px; }
.resource-section h2 { margin-bottom: 0; padding-bottom: 10px; color: var(--plum); border-bottom: 2px solid var(--plum); font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.resource-list { margin: 0; padding: 0; border-bottom: 1px solid var(--border); list-style: none; }
.resource-list li + li { border-top: 1px solid var(--border); }

.resource-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 14px 8px;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.resource-link:hover,
.resource-link:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 3px 0 0 var(--warm);
}

.resource-link:focus-visible { box-shadow: inset 3px 0 0 var(--warm), inset 0 0 0 2px rgba(136, 139, 212, 0.3); }
.resource-main { display: flex; min-width: 0; align-items: baseline; gap: 24px; }
.resource-main strong { color: var(--plum); font-size: 1rem; font-weight: 700; }
.resource-url { overflow: hidden; color: var(--muted); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.resource-arrow { color: var(--warm); font-size: 1.2rem; line-height: 1; }

/* Adapted from the Registry helix and flow-cell loader. */
.loading-screen { display: none; }
.js .loading-screen { position: fixed; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(16, 14, 31, 0.76); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 1; transition: opacity 0.36s ease; }
.js .loading-screen.is-hidden { pointer-events: none; opacity: 0; }
.loader-graphic { display: grid; justify-items: center; gap: 16px; }
.helix-spinner { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: 48px; height: 56px; perspective: 800px; }
.helix-strand { position: relative; width: 100%; height: 3px; animation: rotate-helix 1.4s ease-in-out infinite; }
.helix-strand::before, .helix-strand::after { content: ""; position: absolute; top: -2px; width: 7px; height: 7px; border-radius: 50%; background: #A78BFA; box-shadow: 0 0 8px rgba(167, 139, 250, 0.8); }
.helix-strand::before { left: 0; }
.helix-strand::after { right: 0; background: #C4B5FD; box-shadow: 0 0 8px rgba(196, 181, 253, 0.8); }
.helix-strand:nth-child(1) { animation-delay: 0s; }
.helix-strand:nth-child(2) { animation-delay: 0.12s; }
.helix-strand:nth-child(3) { animation-delay: 0.24s; }
.helix-strand:nth-child(4) { animation-delay: 0.36s; }
.helix-strand:nth-child(5) { animation-delay: 0.48s; }
.helix-strand:nth-child(6) { animation-delay: 0.6s; }
.helix-strand:nth-child(7) { animation-delay: 0.72s; }
.flowcell-container { display: flex; gap: 8px; padding: 8px 11px; border: 1px solid rgba(116, 96, 212, 0.4); border-radius: 9px; background: rgba(27, 23, 46, 0.8); }
.flowcell-lane { position: relative; width: 9px; height: 44px; overflow: hidden; border-radius: 5px; background: rgba(92, 80, 145, 0.25); }
.flowcell-lane::after { content: ""; position: absolute; top: -50%; left: 0; right: 0; height: 50%; border-radius: 5px; background: linear-gradient(180deg, transparent 0%, #A78BFA 50%, #5C5091 100%); opacity: 0.95; filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.6)); animation: lane-pulse 1.4s ease-in-out infinite; }
.flowcell-lane:nth-child(1)::after { animation-delay: 0s; }
.flowcell-lane:nth-child(2)::after { animation-delay: 0.25s; }
.flowcell-lane:nth-child(3)::after { animation-delay: 0.5s; }
.flowcell-lane:nth-child(4)::after { animation-delay: 0.15s; }
@keyframes rotate-helix { 0% { transform: rotateY(0deg); opacity: 0.35; } 50% { transform: rotateY(180deg); opacity: 1; } 100% { transform: rotateY(360deg); opacity: 0.35; } }
@keyframes lane-pulse { 0% { top: -50%; opacity: 0.2; } 50% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
@media (max-width: 640px) { .app-main { padding-top: 32px; } .resource-main { align-items: flex-start; flex-direction: column; gap: 3px; } }
