/* shadcn/ui's light "zinc" theme, written as plain CSS */
:root {
  --background: #ffffff;
  --foreground: #09090b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --border: #e4e4e7;
  --input: #d4d4d8;
  --ring: #a1a1aa;
  --primary: #18181b;
  --destructive: #dc2626;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --radius: 8px;
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 720px; margin: 0 auto; padding: 64px 16px 72px; }
a { color: inherit; text-underline-offset: 4px; }
h1 { font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.lead { font-size: 16px; color: var(--muted-foreground); margin-bottom: 24px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Drop zone */
#drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer;
  border: 1px dashed var(--input); border-radius: var(--radius); padding: 40px 16px; text-align: center;
  overflow: hidden; transition: background .15s, border-color .15s; }
#drop:hover, #drop.over { background: var(--muted); border-color: var(--ring); }
#drop:focus-within { outline: 2px solid var(--ring); outline-offset: 2px; }
#drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
#drop strong { font-size: 14px; font-weight: 500; }
#drop span { color: var(--muted-foreground); font-size: 13px; }
#loader { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; transition: opacity .3s; }
#loader .fill { height: 100%; width: 0; background: var(--primary); transition: width .15s; }
#loader.indeterminate .fill { width: 30%; animation: slide 1.1s ease-in-out infinite; }
#loader.done { opacity: 0; }
#loader.failed .fill { width: 100%; background: var(--destructive); }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

.examples { color: var(--muted-foreground); font-size: 13px; margin: 12px 0 0; text-align: center; }
.examples button { font: inherit; font-weight: 500; color: var(--foreground); background: none; border: 0; padding: 0;
  cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
#status { color: var(--muted-foreground); font-size: 13px; text-align: center; min-height: 20px; margin: 4px 0 0; }

/* List of checked replays */
#results { margin-top: 24px; }
.count { font-size: 14px; font-weight: 500; margin: 0 0 8px; }
.replays { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.replays > li + li { border-top: 1px solid var(--border); }
.replays > li { transition: background .2s; }
.replays > li.open { background: #fafafa; }
.replays button { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto 16px; column-gap: 12px; row-gap: 2px;
  align-items: center; width: 100%; padding: 12px 16px; font: inherit; color: inherit; text-align: left;
  background: none; border: 0; cursor: pointer; transition: background .15s; }
.replays button:hover:not(:disabled) { background: var(--muted); }
.replays button:disabled { cursor: default; }
.replays button:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }

.replays .icon { grid-row: 1 / 3; width: 16px; height: 16px; color: var(--muted-foreground); }
.replays .icon svg { display: block; width: 100%; height: 100%; }
.icon.bot { color: var(--destructive); }
.icon.unclear { color: var(--warning); }
.replays .icon .spinner { width: 14px; height: 14px; margin: 1px; }
.replays .title, .replays .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replays .title { font-weight: 500; }
.replays .vs { color: var(--muted-foreground); font-weight: 400; }
.race { display: inline-block; margin-left: 4px; padding: 0 4px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 10px; font-weight: 600; line-height: 14px; color: var(--muted-foreground); vertical-align: 1px; }
.replays .sub { grid-column: 2; font-size: 13px; color: var(--muted-foreground); }
.replays .date, .replays .time { text-align: right; font-size: 13px; color: var(--muted-foreground); white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.chevron { grid-row: 1 / 3; grid-column: 4; width: 16px; height: 16px; color: var(--muted-foreground); transition: transform .2s; }
.chevron svg { display: block; width: 100%; height: 100%; }
.open .chevron { transform: rotate(180deg); }

/* Badges, as shadcn's: small rounded labels */
.badge { display: inline-block; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; font-size: 12px;
  font-weight: 500; line-height: 18px; margin-right: 6px; vertical-align: 1px; white-space: nowrap; }
.badge.bot { background: var(--destructive); color: #fff; }
.badge.unclear { background: var(--warning-soft); color: var(--warning); border-color: #fde68a; }
.badge.none { background: var(--muted); color: var(--foreground); }

/* Opened row: slides open by animating the grid track from 0 to its content height */
.opened { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .2s ease; }
.open > .opened { grid-template-rows: 1fr; }
.opened .inner { overflow: hidden; padding: 0 16px 0 44px; }
.open > .opened .inner { padding-bottom: 12px; }
.opened .file { font-size: 12px; color: var(--muted-foreground); margin: 8px 0 0; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius); }
.compare { border-collapse: collapse; width: 100%; font-size: 13px; }
.compare th, .compare td { text-align: left; padding: 8px 12px; vertical-align: top; }
.compare thead th { vertical-align: bottom; border-bottom: 1px solid var(--border); font-weight: 400; }
.compare tbody tr + tr > * { border-top: 1px solid var(--border); }
.compare tbody th { font-weight: 500; color: var(--muted-foreground); white-space: nowrap; width: 1%; }
.compare td { color: var(--muted-foreground); }
.compare td.found { color: var(--destructive); font-weight: 500; }
.compare td.partial { color: var(--warning); font-weight: 500; }
.pname { display: block; font-weight: 500; color: var(--foreground); overflow-wrap: anywhere; }
.pmeta { display: block; font-size: 12px; color: var(--muted-foreground); }
.pverdict { display: inline-block; margin-top: 6px; }

.date .short { display: none; }
@media (max-width: 520px) {
  .opened .inner { padding-left: 16px; }
  .compare th, .compare td { padding: 8px; }
  .date .long, .replays .time { display: none; }
  .date .short { display: inline; }
  .replays .sub { grid-column: 2 / 4; }
}
@media (prefers-reduced-motion: reduce) { .opened, .chevron { transition: none; } }

.spinner { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* "How does it decide?", styled as a shadcn accordion item */
.about { margin-top: 40px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--muted-foreground); }
.about summary, .faq summary { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; cursor: pointer;
  list-style: none; font-weight: 500; color: var(--foreground); }
.about summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.about summary:hover, .faq summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.about summary::after, .faq summary::after { content: ""; width: 7px; height: 7px; margin-right: 4px; border-right: 1.5px solid var(--muted-foreground);
  border-bottom: 1.5px solid var(--muted-foreground); transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.about[open] summary::after, .faq [open] summary::after { transform: translateY(2px) rotate(-135deg); }
.about[open], .faq [open] { padding-bottom: 8px; }
.signs { display: grid; grid-template-columns: 200px 1fr; gap: 16px 24px; align-items: center; margin: 4px 0 20px; }
.signs svg { width: 100%; height: auto; }
.signs svg text { fill: var(--muted-foreground); font-size: 11px; }
.signs svg text.small { font-size: 9px; }
.signs h3 { font-size: 14px; font-weight: 500; color: var(--foreground); margin: 0 0 2px; }
.signs p { margin: 0; }
.tick-person rect, .tick-person circle { fill: var(--ring); }
.tick-bot rect, .tick-bot circle { fill: var(--primary); }
.box-person { fill: none; stroke: var(--ring); stroke-dasharray: 3 2; }
.box-bot rect { fill: none; stroke: var(--primary); stroke-dasharray: 3 2; }
.key rect { fill: var(--muted); stroke: var(--border); }
.signs svg .key text { fill: var(--muted-foreground); font-size: 10px; text-anchor: middle; }
.tested { font-size: 12px; }
@media (max-width: 520px) {
  .signs { grid-template-columns: 1fr; gap: 8px; }
  .signs svg { max-width: 240px; }
  .signs div { margin-bottom: 16px; }
}
footer { margin-top: 24px; color: var(--muted-foreground); font-size: 12px; }

/* Site navigation */
nav.site { max-width: 720px; margin: 0 auto; padding: 20px 16px 0; display: flex; justify-content: space-between;
  align-items: center; gap: 16px; font-size: 14px; }
nav.site a { color: var(--muted-foreground); text-decoration: none; }
nav.site a:hover, nav.site a[aria-current] { color: var(--foreground); }
nav.site .brand { font-weight: 600; color: var(--foreground); }
nav.site span { display: flex; gap: 16px; }
nav.site + main { padding-top: 40px; }

/* Questions */
.faq { margin-top: 40px; color: var(--muted-foreground); }
.faq h2 { font-size: 18px; font-weight: 600; color: var(--foreground); margin: 0 0 4px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq p { margin: 0 0 8px; }
.faq a, .about a { color: var(--foreground); }

/* Long-form pages: About and How Pluto Plays */
.prose { font-size: 16px; line-height: 1.65; }
.prose h1 { font-size: 30px; margin: 0 0 8px; }
.prose h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin: 40px 0 12px; }
.prose h3 { font-size: 17px; font-weight: 600; margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--foreground); }
.prose .lead { font-size: 18px; }
.prose .meta { font-size: 14px; color: var(--muted-foreground); }
.prose em { color: var(--muted-foreground); }
.prose code { font-family: ui-monospace, Menlo, monospace; font-size: 0.88em; background: var(--muted); padding: 1px 4px; border-radius: 4px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 20px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-weight: 500; color: var(--muted-foreground); }
.prose img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.prose .figure { margin: 24px 0; }
.prose .figure p:has(> img) { margin: 0 0 6px; }
.prose .caption { font-size: 13px; line-height: 1.5; color: var(--muted-foreground); }
.prose .note, .prose .recap, .prose .term { margin: 20px 0; padding: 14px 16px 2px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 15px; background: #fafafa; }
.prose .note::before, .prose .recap::before, .prose .term::before { display: block; font-size: 12px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 6px; }
.prose .note::before { content: "In plain terms"; }
.prose .recap::before { content: "So far"; }
.prose .term::before { content: "Words used here"; }
.prose .note em, .prose .recap em, .prose .term em { color: inherit; }
.toc { margin: 24px 0 8px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; }
.toc strong { display: block; font-weight: 500; margin-bottom: 6px; }
.toc ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
.toc li { margin: 0 0 4px; break-inside: avoid; }
.toc a { color: var(--muted-foreground); text-decoration: none; }
.toc a:hover { color: var(--foreground); text-decoration: underline; }
.download { display: inline-block; font-size: 14px; font-weight: 500; padding: 6px 12px; border: 1px solid var(--border);
  border-radius: 6px; text-decoration: none; color: var(--foreground); }
.download:hover { background: var(--muted); }
@media (max-width: 520px) { .toc ul { columns: 1; } .prose h1 { font-size: 26px; } }
