/* SIGNN++ project page
   ---------------------------------------------------------------------
   Palette is taken from the subject rather than from a theme: the deep
   blue of an exposed night frame for the hero, a cool paper white for
   reading, and the single green the method itself uses to mark a star it
   has identified. Green appears only where something has been identified
   -- graph rings in the hero, best values in the tables -- so the colour
   carries meaning instead of decorating.
   --------------------------------------------------------------------- */

:root {
  --sky-deep: #0C1524;
  --sky:      #16253D;
  --ink:      #1B2231;
  --ink-soft: #55606F;
  --paper:    #F5F7F9;
  --rule:     #D6DCE4;
  --signal:   #3C9E68;   /* identified */
  --link:     #245C86;

  --measure: 68ch;
  --gap: clamp(1rem, 3.5vw, 2.5rem);

  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  line-height: 1.66;
}

h1, h2, h3, .venue, .btn, .step, th, .copy, .findings, .pipeline b {
  font-family: var(--sans);
}

a { color: var(--link); }
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--paper); color: var(--ink); padding: .6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  isolation: isolate;
  background: radial-gradient(120% 90% at 50% 0%, var(--sky) 0%, var(--sky-deep) 70%);
  color: #EAF0F7;
  padding: clamp(3.5rem, 9vw, 7rem) var(--gap) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

.hero-sky {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0;
}

/* The graph runs behind the title, so the title needs its own darkness to
   sit on. A radial scrim keeps the sky visible at the edges of the hero and
   opaque under the words, which is what the text needs to stay legible at
   any viewport width. */
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(58% 62% at 50% 44%,
    rgba(10, 18, 32, .94) 0%, rgba(10, 18, 32, .78) 42%,
    rgba(10, 18, 32, .28) 68%, transparent 84%);
}
.hero-sky .stars circle { fill: #F3F7FF; }
.hero-sky .rings circle {
  fill: none; stroke: var(--signal); stroke-width: 2.4; opacity: .85;
}
.hero-sky .edges line {
  stroke: #63A4DC; stroke-width: 2; opacity: .45;
}

/* One orchestrated moment on load: the graph assembles itself once. */
@media (prefers-reduced-motion: no-preference) {
  .hero-sky .edges line {
    stroke-dasharray: 100; stroke-dashoffset: 100;
    animation: draw 1.1s cubic-bezier(.4, 0, .2, 1) forwards;
  }
  .hero-sky .rings circle {
    opacity: 0; animation: pop .5s ease-out .95s forwards;
  }
  .hero-sky .edges line:nth-child(3n)   { animation-delay: .12s; }
  .hero-sky .edges line:nth-child(3n+1) { animation-delay: .28s; }
  .hero-sky .edges line:nth-child(3n+2) { animation-delay: .44s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes pop  { from { opacity: 0; transform: scale(.7); transform-origin: center; }
                    to   { opacity: .85; } }
}

.hero-body { position: relative; z-index: 2; max-width: 56rem;
             margin-inline: auto; text-align: center; }

.venue {
  margin: 0 0 1.4rem;
  font-size: .9rem; font-weight: 500; letter-spacing: .01em;
  color: #9FB6CF;
}

.hero h1 {
  margin: 0 0 1.2rem;
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .95;
}
.hero-sub {
  display: block;
  margin-top: .7rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.05rem, 2.6vw, 1.55rem);
  letter-spacing: 0;
  line-height: 1.3;
  color: #C6D5E6;
}

.authors { margin: 0 0 2rem; color: #9FB6CF; font-size: .98rem; }

.links { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

.btn {
  display: inline-block;
  padding: .55rem 1.25rem;
  border: 1px solid rgba(206, 224, 244, .35);
  border-radius: 2rem;
  color: #EAF0F7; text-decoration: none;
  font-size: .95rem; font-weight: 500;
  background: rgba(255, 255, 255, .05);
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: rgba(255, 255, 255, .13); border-color: rgba(206, 224, 244, .6); }
.btn.pending {
  opacity: .42; pointer-events: none; text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* ------------------------------------------------------------- sections */

main { padding-bottom: 4rem; }

.band {
  max-width: 54rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gap) 0;
}
.teaser-band { padding-top: clamp(2rem, 4vw, 3rem); }

.band h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  font-weight: 600; letter-spacing: -.02em;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--ink);
}
.band h3 {
  margin: 2.6rem 0 .5rem;
  font-size: 1.16rem; font-weight: 600; letter-spacing: -.01em;
}
.band p { max-width: var(--measure); }
.lede { margin: .2rem 0 1rem; color: var(--ink-soft); }
.note {
  margin-top: .9rem;
  font-size: .95rem; color: var(--ink-soft);
  border-left: 2px solid var(--rule); padding-left: .9rem;
}

/* ------------------------------------------------------------- figures */

.figure { margin: 0 0 1rem; }
.figure figcaption {
  margin-top: .7rem;
  font-size: .92rem; line-height: 1.55; color: var(--ink-soft);
  max-width: var(--measure);
}

/* Placeholder that names the file it is waiting for, so the page is
   self-documenting while the figures are still being exported. */
.slot {
  display: grid; place-content: center; gap: .4rem;
  aspect-ratio: 16 / 7;
  border: 1px dashed #A9B5C4;
  border-radius: 3px;
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(27,34,49,.035) 11px 22px);
  color: var(--ink-soft);
  font-family: var(--sans); font-size: .95rem; text-align: center;
  padding: 1.5rem;
}
.slot::after {
  content: "drop in " attr(data-slot);
  font-size: .8rem; opacity: .72;
}
.figure img { width: 100%; height: auto; display: block; border-radius: 3px; }

.gallery { display: grid; gap: 1.6rem; }
.gallery .slot { aspect-ratio: 4 / 3; }
@media (min-width: 46rem) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

/* ------------------------------------------------------------ pipeline */

.pipeline {
  list-style: none; margin: 0 0 2rem; padding: 0;
  display: grid; gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.pipeline li {
  background: var(--paper);
  padding: 1rem 1.1rem;
  font-size: .95rem; line-height: 1.5;
}
.pipeline b { display: block; margin: .3rem 0 .25rem; font-weight: 600; }
.step {
  font-size: .8rem; font-weight: 600; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 52rem) {
  .pipeline { grid-template-columns: repeat(4, 1fr); }
}

/* ---------------------------------------------------------------- adds */

.adds { margin: 0; }
.adds dt {
  margin-top: 1.4rem;
  font-family: var(--sans); font-weight: 600; font-size: 1.02rem;
}
.adds dd { margin: .35rem 0 0; max-width: var(--measure); }

.findings { max-width: var(--measure); padding-left: 1.1rem; }
.findings li { margin-bottom: .5rem; }

/* -------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; margin: .4rem 0 0; }

table {
  width: 100%; border-collapse: collapse;
  font-family: var(--sans); font-size: .9rem;
  font-variant-numeric: tabular-nums;
}
thead th {
  text-align: left; font-weight: 600;
  padding: .5rem .7rem;
  border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}
tbody th, tbody td {
  padding: .45rem .7rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
tbody th { font-weight: 600; white-space: nowrap; }
tbody tr.ours th, tbody tr.ours td { background: rgba(60, 158, 104, .07); }

/* Green marks a winning value, the same way it marks an identified star. */
td.best { font-weight: 600; color: #256E47; }
td.best::before { content: "\2022\00a0"; color: var(--signal); }
td.ok { color: #3D7F5C; }

/* -------------------------------------------------------------- bibtex */

.bib {
  margin: 0; padding: 1rem 1.1rem;
  background: #10192A; color: #D7E3F1;
  border-radius: 3px; overflow-x: auto;
  font-size: .85rem; line-height: 1.5;
}
.copy {
  margin-top: .7rem; padding: .45rem 1rem;
  font-size: .9rem; font-weight: 500;
  color: var(--ink); background: transparent;
  border: 1px solid var(--ink); border-radius: 2rem;
  cursor: pointer;
}
.copy:hover { background: var(--ink); color: var(--paper); }

/* ---------------------------------------------------------------- foot */

.foot {
  margin-top: 3rem; padding: 1.5rem var(--gap);
  border-top: 1px solid var(--rule);
  font-size: .88rem; color: var(--ink-soft); text-align: center;
}
.foot p { max-width: none; margin: 0; }
