/* Landing page — cvt-styled overview that leads to the assistant. Theme-blind: reads --cvt-* slots. */
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--cvt-color-surface, #0b1a27);
  color: var(--cvt-color-text, #e9f1ff);
  font-family: var(--cvt-font-family, "Segoe UI", system-ui, sans-serif);
  line-height: 1.55;
}
.home { max-width: 900px; margin: 0 auto; padding: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem) 3rem; display: grid; gap: 1.2rem; }
.home-hero h1 { margin: 0 0 0.4rem; font-size: clamp(1.6rem, 4vw, 2.4rem); font-family: var(--cvt-font-serif, Georgia, serif); }
.home-hero p { margin: 0 0 0.6rem; max-width: 62ch; color: var(--cvt-color-text-muted, rgba(233, 241, 255, 0.75)); }

.home-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.1rem 1.3rem;
  border-radius: var(--cvt-shape-radius, 18px);
  background: color-mix(in srgb, var(--cvt-color-surface-muted, #102536) 72%, transparent);
  border: 1px solid var(--cvt-color-border, rgba(152, 204, 229, 0.18));
  transition: border-color 120ms ease, transform 120ms ease;
}
.home-card:hover { border-color: color-mix(in srgb, var(--cvt-color-accent, #62c7ff) 55%, transparent); transform: translateY(-2px); }
.home-card h2, .home-card h3 { margin: 0 0 0.3rem; }
.home-card p { margin: 0; color: var(--cvt-color-text-muted, rgba(233, 241, 255, 0.75)); }

/* The server writes data-auth-state from a verified cookie. Login-required panels stay discoverable
   and clickable (the click starts OAuth), but visibly recede while the visitor is anonymous. */
html[data-auth-state="anonymous"] [data-auth-required] {
  opacity: 0.42;
  filter: grayscale(0.35) saturate(0.55);
}
html[data-auth-state="anonymous"] [data-auth-required]:hover {
  opacity: 0.56;
}
html[data-auth-state="anonymous"] [data-auth-required] select:disabled,
html[data-auth-state="anonymous"] [data-auth-required] button:disabled {
  cursor: not-allowed;
}

.home-primary {
  background: color-mix(in srgb, var(--cvt-color-accent, #62c7ff) 16%, transparent);
  border-color: color-mix(in srgb, var(--cvt-color-accent, #62c7ff) 45%, transparent);
}
.home-primary h2 { color: var(--cvt-color-accent-strong, #a7dfff); font-size: 1.5rem; }

.home-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.proto-row { display: flex; gap: 0.5rem; margin-top: 0.6rem; align-items: center; }
.proto-row select {
  flex: 1 1 auto; min-width: 0; padding: 0.35rem 0.5rem; border-radius: 10px;
  background: var(--cvt-color-surface, #0b1a27); color: var(--cvt-color-text, #e9f1ff);
  border: 1px solid var(--cvt-color-border, rgba(152, 204, 229, 0.3));
  font: inherit;
}
.proto-row .proto-open {
  padding: 0.35rem 0.8rem; border-radius: 999px; text-decoration: none; font-weight: 600;
  white-space: nowrap;   /* a wrapped label turns the pill into a circle */
  color: var(--cvt-color-accent-strong, #a7dfff);
  border: 1px solid color-mix(in srgb, var(--cvt-color-accent, #62c7ff) 45%, transparent);
}
.proto-row .proto-open:hover { background: color-mix(in srgb, var(--cvt-color-accent, #62c7ff) 16%, transparent); }

.home-story {
  position: relative;
  margin-top: 0.8rem;
  padding: 1.2rem 1.3rem 1.4rem;
  border-radius: var(--cvt-shape-radius, 18px);
  border: 1px solid color-mix(in srgb, var(--cvt-color-candle-glow, #f0b46e) 35%, transparent);
  background: color-mix(in srgb, var(--cvt-color-surface-deep, #06131f) 55%, transparent);
  background-size: cover; background-position: center;   /* a generated map image drops in via background-image */
  overflow: hidden;
}
.home-story .sea { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-story-head, .home-story-tiles { position: relative; }
.home-story-link { text-decoration: none; }
.home-story-link:hover h2 { text-decoration: underline; }
.home-story-head h2 { margin: 0 0 0.2rem; font-family: var(--cvt-font-serif, Georgia, serif); color: var(--cvt-color-candle-glow, #f0b46e); }
.home-story-head p { margin: 0 0 0.9rem; color: var(--cvt-color-text-muted, rgba(233,241,255,0.75)); }
.home-story-tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.home-story-tiles .home-card { background: color-mix(in srgb, var(--cvt-color-surface-muted, #102536) 82%, transparent); }

.home-artefacts { margin-top: 0.5rem; font-size: 0.9rem; color: var(--cvt-color-text-muted, rgba(233, 241, 255, 0.75)); }
.home-artefacts a { color: var(--cvt-color-accent, #62c7ff); text-decoration: none; }
.home-artefacts a:hover { text-decoration: underline; }

/* ── card links are READING material first (FW 2026-07-19): dragging across their text SELECTS it
   instead of dragging the link — the cause of "selection broken on the cards" (a mousedown-drag
   inside an <a> starts a link drag by default). ── */
a.home-card, .home-story-link, .proto-open { -webkit-user-drag: none; user-select: text; }

/* ── named assistant views under the primary card (✳ = a view of the one assistant) ── */
.home-views { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 4px; }
.home-views a { text-decoration: none; font-size: 0.82rem; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  color: var(--cvt-color-accent-strong, #a7dfff);
  border: 1px solid color-mix(in srgb, var(--cvt-color-accent, #62c7ff) 32%, transparent);
  background: color-mix(in srgb, var(--cvt-color-accent, #62c7ff) 10%, transparent);
  -webkit-user-drag: none; }
.home-views a:hover { background: color-mix(in srgb, var(--cvt-color-accent, #62c7ff) 20%, transparent); }


/* the blinking NEW neon sign on the happy-path voyages tile (FW 2026-08-06) */
.neon-new {
  display: inline-block; margin-right: 9px; padding: 1px 9px;
  border: 1.5px solid #ff2ec4; border-radius: 7px;
  color: #ff2ec4; font-weight: 800; letter-spacing: 0.09em; font-size: 0.78em;
  text-shadow: 0 0 6px #ff2ec4, 0 0 14px rgba(255, 46, 196, 0.8);
  box-shadow: 0 0 9px rgba(255, 46, 196, 0.55), inset 0 0 7px rgba(255, 46, 196, 0.3);
  animation: neon-blink 1.7s steps(1) infinite;
}
@keyframes neon-blink { 0%, 8%, 11%, 74%, 78%, 100% { opacity: 1; } 9%, 10% { opacity: 0.35; } 75%, 77% { opacity: 0.2; } }
@media (prefers-reduced-motion: reduce) { .neon-new { animation: none; } }


/* the failing-tests signal chip (FW 2026-08-06): a matched red island — fill and ink together */
.test-signal { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #c0392b; color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; cursor: help; vertical-align: middle; }
