/* Public AI Check lander. Jess glass, scoped here so the product token ledger stays untouched. */
.ai-lander {
  --edge: conic-gradient(from 120deg, #5dc9e5, #a6bdf2, #c7a0e8, #f0a9cb, #f4bd94, #f0d993, #9dddd5, #5dc9e5);
  --edge-line: linear-gradient(90deg, #6bcde3 0%, #adaeee 25%, #e5abd6 50%, #ebc69c 75%, #b5ded3 100%);
  --cream: #f6f1e6;
  --ink: #1c2430;
  --muted: #526575;
  --panel: #292b38;
  --paper: #fffcf8;
  --line: #ffffffcc;
  min-height: 100svh;
  color: var(--ink);
  background:
    linear-gradient(90deg, #6bcde32e 0%, #adaeee2e 25%, #e5abd62e 50%, #ebc69c2e 75%, #b5ded32e 100%),
    var(--cream);
  font-family: var(--font-ui), sans-serif;
}
.ai-lander * { box-sizing: border-box; }
.ai-lander .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.lander-head {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 40px;
  background: #fff;
}
.wordmark {
  color: #0f2d3f;
  font-family: var(--font-display), sans-serif;
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.book-link {
  color: #223449;
  font-size: 12px;
  text-decoration: none;
  background: #f5f6f1d9;
  border-radius: 14px;
  padding: 12px 18px;
}
.book-link:hover { background: #f5f6f1; }
.stage {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 72px;
}
.ai-lander[data-lander="working"] .stage,
.ai-lander[data-lander="score"] .stage {
  justify-content: flex-start;
  min-height: 0;
}
.chat-mark { display: block; width: 56px; height: 71px; margin: 0 auto 22px; }
.chat-panel {
  width: min(550px, 100%);
  padding: 20px;
  border-radius: 24px;
  color: #f3f5f8;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    var(--edge) border-box;
  border: 2px solid transparent;
  box-shadow: 0 22px 45px -8px #1a1f3038, inset 0 1px 1px #ffffff38;
}
.chat-panel.stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.bubble {
  margin: 0;
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  background: #ffffff14;
  font-size: 13px;
  line-height: 1.35;
}
.score-chat { width: 100%; margin-bottom: 14px; }
.score-chat .bubble { background: #3d404f; }
.speaker, .speaker-line { margin: 0; }
.speaker { font-size: 11px; color: #a6abb8; }
.speaker-line { font-size: 15px; color: #f2f2f7; }
.prompt {
  margin: 0 0 22px;
  padding: 18px 16px;
  border-radius: 19px;
  background: #ffffff14;
  font-family: var(--font-display), sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.35;
}
.prompt.is-caret:after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -2px;
  background: #6bcde3;
  animation: caret 0.7s steps(2) infinite;
}
.reply {
  margin: 4px 4px 22px;
  font-family: var(--font-display), sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.35;
}
.hint, .foot, .tap, .preview-note, .how, .example-line {
  color: #b5bac8;
  font-size: 12px;
  text-align: center;
}
.foot { color: var(--muted); margin: 28px 0 0; }
.paste, .book-form { display: flex; gap: 10px; align-items: stretch; }
.paste input, .book-form input, .book-card input {
  min-width: 0;
  flex: 1;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  background: #ffffff14;
  color: #f3f5f8;
  font: 15px/1.4 var(--font-ui), sans-serif;
}
.book-card input {
  width: 100%;
  background: #f4f1ea;
  color: var(--ink);
}
.send, .ghost, .stop, .text, .try-example {
  font: 14px/1 var(--font-ui), sans-serif;
  cursor: pointer;
}
.send {
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  background: #f4f1ea;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ghost, .text, .stop, .try-example {
  border: 0;
  background: none;
  color: #d5d8e0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.try-example { display: block; margin: 16px auto 0; color: #b5bac8; }
.note { margin: 14px 0 0; font-size: 13px; color: #f3f5f8; }
.work, .score-wrap { width: min(640px, 100%); }
.work { display: flex; flex-direction: column; align-items: center; }
.work .chat-panel { width: min(550px, 100%); border-radius: 24px 24px 0 0; }
.work .drawer { width: min(528px, 100%); border-radius: 0 0 24px 24px; }
.drawer, .score-card, .story, .book-card {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 40px -24px #1a1f3030;
}
.drawer { padding: 0 0 18px; overflow: hidden; }
.score-card { padding: 20px 22px 22px; }
.work-light {
  margin: 0;
  padding: 18px 16px 12px;
  text-align: center;
  font-size: 12px;
  color: #2e6f95;
  background: linear-gradient(90deg, #6bcde338, #e5abd638, #b5ded338);
}
.drawer-body { padding: 8px 28px 0; }
.drawer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.drawer-foot .example-line, .drawer-foot .stop { margin: 0; }
.drawer .state, .kicker, .ready-line {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.drawer h2, .score-head h2, .story h2, .book-copy h2 {
  margin: 0 0 8px;
  font-family: var(--font-display), sans-serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.03em;
}
.look { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.still-row { display: flex; gap: 16px; align-items: center; margin: 4px 0 14px; }
.p-mark {
  position: relative;
  width: 132px;
  height: 163px;
  margin: 0;
  flex: none;
  filter: drop-shadow(0 16px 18px #1a1f3040);
}
.p-edge, .p-fill {
  position: absolute;
  -webkit-mask: url(/ai-check/p-glyph.svg) center / contain no-repeat;
  mask: url(/ai-check/p-glyph.svg) center / contain no-repeat;
}
.p-edge {
  inset: 0;
  background: var(--edge);
}
.p-fill {
  inset: 4px;
  background: var(--edge);
  overflow: hidden;
}
.p-fill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.seen { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; }
.seen p { margin: 0; font-size: 12px; font-weight: 500; color: #333845; }
.seen-row { display: flex; gap: 6px; }
.seen-row img { width: 52px; height: 30px; object-fit: cover; border-radius: 4px; }
.seen-row img[data-on="1"] { box-shadow: 0 0 0 2px #8cccfa; }
.seen-row img[data-dim="1"] { opacity: 0.35; }
.seen-caption { font-size: 11px; font-weight: 400; color: #737885; }
.step-line { margin: 8px 0; font-size: 13px; }
.bar { height: 3px; border-radius: 2px; background: #dae3e4; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--edge-line); }
.example-line { color: var(--muted); margin: 12px 0 0; }
.stop { display: block; margin: 16px auto 0; color: var(--muted); }
.score-head { display: flex; gap: 22px; align-items: flex-start; margin: 8px 0 18px; }
.score-side { flex: none; text-align: center; }
.score-side h2 { margin: 8px 0 0; font-size: 28px; }
.finding { flex: 1; min-width: 0; }
.ring {
  width: 168px;
  height: 168px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(from -90deg, #6bcde3 0%, #adaeee calc(var(--score) * 0.25%), #e5abd6 calc(var(--score) * 0.5%), #ebc69c calc(var(--score) * 0.75%), #b5ded3 calc(var(--score) * 1%), #e6e1d8 0);
  flex: none;
}
.ring div {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: var(--paper);
  display: grid;
  place-items: center;
  text-align: center;
}
.ring strong {
  font-family: var(--font-display), sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
}
.ring span, .host { display: block; color: var(--muted); font-size: 12px; }
.bands { display: flex; gap: 10px; padding: 0; margin: 10px 0 0; list-style: none; font-size: 12px; color: #9aa3ad; }
.bands li[data-on="1"] { color: var(--ink); }
.finding p { margin: 0 0 8px; }
.finding blockquote {
  margin: 8px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f3efe8;
  font-size: 14px;
}
.after { font-size: 14px; }
.engines, .engine-rows, .checks, .reach ul { list-style: none; padding: 0; margin: 0; }
.engines { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3efe8;
  font-size: 12px;
}
.chip img { width: 16px; height: 16px; border-radius: 4px; }
.mark-fallback {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  background: #e7e1d8;
  font-size: 9px;
}
.reach { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.reach ul { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.layer-card {
  margin: 10px 0;
  padding: 14px 16px 12px;
  border: 1px solid #e4e0f2;
  border-radius: 14px;
  background: #fff;
}
.layer-card[data-open="1"] { background: #fbfaff; border-color: #ccbff2; }
.layer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.layer-name { font-size: 16px; font-weight: 500; }
.layer-points { margin-left: auto; color: #6b707d; font-size: 14px; }
.layer-hide, .layer-chevron { color: #6b707d; font-size: 13px; }
.mini { height: 4px; margin: 10px 0 8px; border-radius: 2px; background: #ebebf0; overflow: hidden; }
.mini span {
  display: block;
  height: 100%;
  width: calc(var(--fill) * 1%);
  border-radius: 2px;
  background: linear-gradient(90deg, #8cccfa, #cca6f2, #facc99);
}
.ask { margin: 0; color: #6b707d; font-size: 12px; }
.video-row > div { min-width: 0; overflow-wrap: anywhere; }
.video-row { display: flex; gap: 14px; align-items: center; margin: 12px 0 16px; }
.video-row img, .video-fallback { width: 128px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; background: #efeae2; }
.video-kicker { margin: 0; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.video-title { margin: 2px 0; font-size: 15px; font-weight: 500; }
.video-meta { margin: 0; font-size: 12px; color: var(--muted); }
.checks li, .engine-rows li {
  display: grid;
  gap: 4px 10px;
  grid-template-columns: auto 1fr auto;
  padding: 10px 0;
  border-top: 1px solid #e3e5eb;
  font-size: 13px;
}
.engine-rows li { grid-template-columns: auto 1fr; align-items: center; }
.engine-rows { margin-top: 8px; }
.checks { margin-top: 8px; }
.source, .pts { color: #6b707d; font-size: 12px; }
.source { grid-column: 1 / -1; }
.fix { color: #5c4db2; font-size: 12px; font-weight: 500; margin: 0; grid-column: 1 / -1; }
.mark-yes { color: #218c5c; }
.mark-no { color: #c74040; }
.mark-couldnt_check { color: #b2801a; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3efe8;
  letter-spacing: 0;
  text-transform: none;
}
.story { width: 100%; margin-top: 18px; padding: 8px 22px 18px; }
.book {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  padding: 80px 24px 120px;
  overflow: hidden;
}
.floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 90px;
  object-fit: cover;
  pointer-events: none;
}
.book-copy { text-align: center; margin-bottom: 18px; }
.book-copy p { color: var(--muted); }
.book-card {
  position: relative;
  width: min(420px, 100%);
  padding: 28px;
}
.book-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display), sans-serif;
  font-size: 28px;
  font-weight: 400;
}
.book-card p { color: var(--muted); }
.book-card label { display: block; margin: 12px 0 6px; font-size: 13px; }
.book-card .send { width: 100%; margin-top: 12px; background: var(--panel); color: #f3f5f8; }
.book-card .note { color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .prompt.is-caret:after { animation: none; }
  .p-fill img { animation: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .p-mark.is-still .p-fill img { animation: p-push 18s ease-in-out infinite alternate; }
}
@keyframes caret { 50% { opacity: 0; } }
@keyframes p-push { from { transform: scale(1); } to { transform: scale(1.08); } }
