/* Pool page styles. Fonts, base colours, menu and footer come from the site's
   /assets/css/main.css (via the default layout); this only adds the pool's own pieces,
   using the site's colour tokens (--bg, --surface, --text, --muted, --line, --link). */
.pvsnp {
  --card: var(--surface);
  --border: var(--line);
  --accent: var(--link);
  --eq: #2c5282;     /* P = NP: deep blue */
  --neq: #155e75;    /* P ≠ NP: the site's teal */
  --never: #8c3f24;  /* not resolved: the site's link rust */
  --grid: #ece6da;
}

.pvsnp {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}
.pvsnp header { margin-bottom: 1.5rem; }
.pvsnp h1 { margin-top: 0; text-wrap: balance; }
.pvsnp .pool { margin: 0.25rem 0 0; color: var(--muted); }
.pvsnp .pool strong {
  color: var(--text);
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  margin-right: 0.25rem;
}

.pvsnp h2 { font-size: 1.25rem; margin: 0 0 0.4rem; }
.pvsnp .muted { color: var(--muted); font-size: 0.95rem; margin: 0 0 1rem; }

.pvsnp .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  position: relative;
}
.pvsnp .rules ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.pvsnp .rules li { margin-bottom: 0.4rem; }

.pvsnp .eq { color: var(--eq); }
.pvsnp .neq { color: var(--neq); }
.pvsnp .never { color: var(--never); }

/* Timeline */
.pvsnp .chart { width: 100%; overflow: hidden; cursor: crosshair; touch-action: manipulation; margin: 0.5rem 0 0.75rem; }
.pvsnp .chart svg { display: block; width: 100%; height: auto; }
.pvsnp .chart text { fill: var(--muted); font-size: 12px; pointer-events: none; }
.pvsnp .chart text.side { font-size: 13px; font-weight: 700; }
.pvsnp .chart text.side.eq { fill: var(--eq); }
.pvsnp .chart text.side.neq { fill: var(--neq); }
.pvsnp .tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--text);
  color: var(--bg);
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 0.4rem 0.6rem;
  border-radius: 3px;
  max-width: 260px;
  z-index: 2;
}
.pvsnp .tip-names { margin-top: 2px; }
.pvsnp .tip-hint { opacity: 0.75; font-size: 0.8rem; margin-top: 2px; }

/* Sign-up popup */
.pvsnp dialog {
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--card);
  color: var(--text);
  padding: 1.5rem;
  width: min(460px, calc(100vw - 32px));
  font-size: 1rem;
}
.pvsnp dialog::backdrop { background: rgba(43, 38, 32, 0.5); }
.pvsnp dialog h2 { font-size: 1.15rem; line-height: 1.35; margin: 0 0 0.4rem; }
.pvsnp .field { display: block; border: 0; padding: 0; margin: 0 0 1rem; }
.pvsnp .field > span, .pvsnp legend { display: block; font-weight: 700; margin-bottom: 0.35rem; padding: 0; }
.pvsnp input[type="date"] {
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.35rem 0.5rem;
}
.pvsnp .answers { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.pvsnp .choice { display: flex; align-items: center; gap: 0.5rem; }
.pvsnp .message { margin: 0.5rem 0 0; min-height: 1.5em; font-size: 0.95rem; color: var(--muted); }
.pvsnp .actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }

.pvsnp button,
.pvsnp a.button {
  font: inherit;
  font-size: 0.95rem;
  border-radius: 3px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.pvsnp a.button { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.pvsnp a.button:hover { background: var(--link-hover); border-color: var(--link-hover); color: #fff; }
.pvsnp a.button[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.pvsnp button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.pvsnp button.secondary:hover { border-color: var(--muted); }
.pvsnp a.button:focus-visible,
.pvsnp button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
