/* Light-first, per the GrokBot teardown: white ground, ivory cards,
   hairline borders, one sparing accent. Deliberately single-theme. */
:root {
  --bg: #ffffff;
  --card: hsl(40 18% 97%);
  --card-2: #f2f2f2;
  --fg: #0a0a0a;
  --fg-soft: #252525;
  --muted: hsl(216 4% 45%);
  --border: rgba(0, 0, 0, 0.10);
  --border-faint: rgba(0, 0, 0, 0.05);
  --accent: hsl(22 100% 46%);
  --dur: 0.14s;
  --spring: cubic-bezier(0.25, 1, 0.5, 1);
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  padding: 0;
}
.frame {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 0 1rem;
}

/* --- Hero (landing v2) --- */
.hero { position: relative; padding: 6.5rem 2.5rem 4.5rem; }
.hero-inner { max-width: 40rem; margin: 0 auto; text-align: center; }
.hero h1 {
  font-size: clamp(2.25rem, 8vw, 4rem);
  line-height: 0.99;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 1.1rem;
}
.hero .eyebrow { margin-bottom: 1.1rem; letter-spacing: 0.08em; }
.hero .lede { max-width: 29rem; margin: 0 auto 2.4rem; }
.chip { position: absolute; }
.chip-1 { top: 4.5rem; left: 9%; animation: bob 4200ms ease-in-out infinite alternate; }
.chip-2 { top: 3.2rem; right: 12%; animation: bob 4200ms ease-in-out 900ms infinite alternate; }
.chip-3 { top: 15rem; left: 4%; animation: bob 4200ms ease-in-out 1600ms infinite alternate; }
.chip-4 { top: 19rem; right: 6%; animation: bob 4200ms ease-in-out 500ms infinite alternate; }
.chip-5 { top: 29rem; left: 12%; animation: bob 4200ms ease-in-out 2300ms infinite alternate; }
@keyframes bob { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-11px) rotate(1.5deg); } }
@keyframes blink {
  0%, 90%, 100% { transform: scaleY(1) rotate(5deg); }
  93% { transform: scaleY(0.15) rotate(5deg); }
  96% { transform: scaleY(1) rotate(5deg); }
}
.hero-mark i { animation: blink 5600ms ease-in-out infinite; transform-origin: center; }
.chip-2 .hero-mark i { animation-delay: 1400ms; }
.chip-3 .hero-mark i { animation-delay: 2600ms; }
.chip-4 .hero-mark i { animation-delay: 700ms; }
.chip-5 .hero-mark i { animation-delay: 3600ms; }
.chip-inner { transition: transform 140ms var(--spring); }
@media (hover: hover) and (pointer: fine) {
  .chip:hover .chip-inner.r-neg { transform: rotate(-9deg) scale(1.12); }
  .chip:hover .chip-inner.r-pos { transform: rotate(9deg) scale(1.12); }
}
.chip-inner {
  display: flex; align-items: flex-end; gap: 3px; padding: 7px 9px;
  background: #ffffff; border: 1px solid var(--border);
  border-radius: 999px 999px 999px 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.chip-inner.r-neg { transform: rotate(-6deg); }
.chip-inner.r-pos { transform: rotate(6deg); }
.hero-mark { position: relative; display: block; width: 24px; height: 21px; }
.hero-mark.blob { border-radius: 53% 47% 56% 44% / 58% 62% 38% 42%; }
.hero-mark.blob2 { border-radius: 47% 53% 44% 56% / 42% 38% 62% 58%; }
.hero-mark.round { border-radius: 50%; }
.hero-mark.square { border-radius: 26%; }
.hero-mark i {
  position: absolute;
  background: #1c1c1c;
  border-radius: 999px;
}
.command-card {
  max-width: 37.5rem; margin: 0 auto; text-align: left;
  background: #ffffff; border: 1px solid var(--border); border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.07);
  display: flex; flex-direction: column; gap: 0.6rem;
}
.command-card label { font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; }
.presets {
  display: flex; align-items: center; justify-content: center;
  gap: 0.45rem; flex-wrap: wrap; margin-top: 0.85rem;
}
.presets .plabel { font-size: 0.8125rem; font-style: italic; color: var(--muted); }
.preset-chip {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 999px; padding: 6px 13px 6px 9px; cursor: pointer;
  font-family: var(--sans); font-size: 0.8125rem; font-weight: 500;
  border: 1px solid transparent;
  transition: background 140ms var(--spring), transform 140ms var(--spring), box-shadow 140ms var(--spring);
}
.preset-chip .chip-mark { position: relative; display: block; width: 18px; height: 15px; flex: none; }
.preset-chip .chip-mark i { position: absolute; display: block; background: #1c1c1c; border-radius: 999px; }
.preset-chip.p-pink { background: hsl(345 70% 61% / 0.12); border-color: hsl(345 70% 61% / 0.4); color: hsl(345 60% 38%); }
.preset-chip.p-purple { background: hsl(258 88% 66% / 0.12); border-color: hsl(258 88% 66% / 0.4); color: hsl(258 50% 44%); }
.preset-chip:active { transform: scale(0.97); }
.preset-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .preset-chip:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08); }
  .preset-chip.p-pink:hover { background: hsl(345 70% 61% / 0.2); }
  .preset-chip.p-purple:hover { background: hsl(258 88% 66% / 0.2); }
}
.postlink {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  text-decoration: none; margin-left: auto; white-space: nowrap;
}
.postlink:hover { color: var(--fg-soft); }
.command-card textarea {
  width: 100%; min-height: 5.5rem; box-sizing: border-box;
  border: none; outline: none; background: transparent; color: var(--fg);
  font-family: var(--sans); font-size: 1rem; line-height: 1.5;
  padding: 2px; resize: vertical;
}
.card-foot {
  display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap;
  border-top: 1px solid var(--border-faint); padding-top: 0.85rem;
}
.card-foot .charcount { margin-left: auto; }
.linkbtn {
  background: none; border: none; padding: 4px 2px; cursor: pointer;
  font-family: var(--sans); font-size: 0.875rem; font-weight: 500;
  color: var(--muted);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.linkbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.hint-line { font-size: 0.78rem; color: var(--muted); margin: 0.9rem 0 0; }
.hero .status { margin-top: 1rem; min-height: 3.4em; }
.hero .progress { margin-left: auto; margin-right: auto; }
.hero .reading-voice { margin-left: auto; margin-right: auto; }

/* --- Voices wall --- */
.voices { padding: 1rem 0 2rem; }
.voices-head { max-width: 44rem; margin: 0 auto 1.4rem; padding: 0 2.5rem; }
.voices-head .eyebrow { margin-bottom: 0.5rem; }
.voices-head h2 { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; margin: 0; }
#wall { display: flex; flex-direction: column; gap: 12px; }
.marquee { overflow: hidden; padding: 4px 0; }
.track {
  display: flex; gap: 12px; width: max-content; padding-right: 12px;
  animation: drift 80s linear infinite;
}
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (hover: hover) and (pointer: fine) {
  .marquee:hover .track { animation-play-state: paused; }
}
.wall-card {
  width: 300px; flex: none; box-sizing: border-box;
  background: var(--card); border: 1px solid var(--border-faint);
  border-radius: 12px; padding: 14px 16px;
}
.wall-card .who { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.wall-card .who .name { font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wall-card .who .at { font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; }
.wall-card .mini-mark { position: relative; display: block; width: 24px; height: 21px; flex: none; }
.wall-card p {
  font-size: 13px; line-height: 1.5; color: var(--fg-soft); margin: 0;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}

/* --- Responsive: intentional phone layout, not stacked desktop --- */
@media (max-width: 720px) {
  .hero { padding: 4.5rem 1.25rem 3rem; }
  .chip-3, .chip-4, .chip-5 { display: none; }
  .chip-1 { top: 1.4rem; left: 4%; }
  .chip-2 { top: 1.1rem; right: 4.5%; }
  .chip-inner { padding: 5px 7px; }
  .hero-mark { width: 18px; height: 16px; }
  .command-card { padding: 1rem; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 0.65rem; }
  .card-foot .pill.primary { width: 100%; text-align: center; }
  .card-foot .linkbtn { align-self: flex-start; }
  .card-foot .charcount { margin-left: 0; align-self: flex-end; margin-top: -1.6rem; }
  .voices-head { padding: 0 1.25rem; }
  .wall-card { width: 260px; }
  .frame { padding-left: 1.25rem; padding-right: 1.25rem; }
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}
h1 {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.8rem;
  text-wrap: balance;
}
.lede { color: var(--muted); margin: 0 0 2rem; max-width: 38rem; }
.lede a { color: inherit; }

.mode-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pill {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.55em 1.15em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur) var(--spring), transform var(--dur) var(--spring);
}
.pill.primary { background: #111110; color: #ffffff; }
.pill.secondary { background: transparent; color: var(--fg); border-color: rgba(0, 0, 0, 0.18); }
.pill:active:not(:disabled) { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .pill.primary:hover:not(:disabled) { background: #2b2b2b; transform: translateY(-1px); }
  .pill.secondary:hover:not(:disabled) { background: rgba(0, 0, 0, 0.04); }
  .pick-card:hover { background: var(--card-2); }
  .history button:hover { color: var(--fg); }
}
.pill:disabled { opacity: 0.45; cursor: default; }
.pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.criteria-box {
  background: var(--card);
  border: 1px solid var(--border-faint);
  border-radius: 12px;
  padding: 1.1rem;
  margin-bottom: 1.5rem;
}
.criteria-box label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.5rem; }
.criteria-box textarea {
  width: 100%;
  min-height: 5.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.45;
  padding: 0.7rem 0.8rem;
  resize: vertical;
}
.criteria-box textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.charcount { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; margin-top: 0.35rem; }
.criteria-actions { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.6rem; flex-wrap: wrap; }
.hint { font-size: 0.8125rem; color: var(--muted); }

.status { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 1rem 0; min-height: 1.2em; }
.status.error { color: hsl(4 63% 42%); }
.progress { max-width: 24rem; height: 3px; border-radius: 999px; background: rgba(0, 0, 0, 0.06); overflow: hidden; margin-bottom: 0.6rem; }
.progress-fill { width: 40%; height: 100%; border-radius: 999px; background: var(--accent); animation: slide 1400ms cubic-bezier(0.77, 0, 0.175, 1) infinite; }
@keyframes slide { from { transform: translateX(-260%); } to { transform: translateX(360%); } }
.reading-line { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.reading-voice { font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); margin-top: 0.45rem; max-width: 28rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.6rem 0 0.9rem; flex-wrap: wrap; }
.results-head h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; margin: 0; }

.picks { display: grid; gap: 0.55rem; padding: 0; margin: 0; list-style: none; }
.pick-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--border-faint);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  transition: background var(--dur) var(--spring);
}
.mark { position: relative; width: 34px; height: 30px; flex: none; margin-top: 2px; }
.mark i, .mini-mark i {
  position: absolute;
  display: block;
  background: #1c1c1c;
  border-radius: 999px;
}
.pick-body { min-width: 0; }
.pick-who { display: flex; gap: 0.45rem; align-items: baseline; flex-wrap: wrap; }
.pick-who .name { font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; }
.pick-who .handle { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-decoration: none; }
.pick-who .handle:hover { color: var(--fg-soft); }
.pick-reason { font-size: 0.875rem; color: var(--fg-soft); margin: 0.15rem 0 0; }
.pick-snippet {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0.15rem 0 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

.history { margin-top: 2.5rem; border-top: 1px solid var(--border-faint); padding-top: 1.2rem; }
.history h2 { font-size: 0.9375rem; font-weight: 600; margin: 0 0 0.6rem; }
.history ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.3rem; }
.history button {
  background: none;
  border: none;
  padding: 0.2rem 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}
/* Results entrance: one quiet rise, staggered for the first six cards */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-only { from { opacity: 0; } to { opacity: 1; } }
.picks > li { animation: rise 300ms cubic-bezier(0.23, 1, 0.32, 1) both; }
.picks > li:nth-child(1) { animation-delay: 0ms; }
.picks > li:nth-child(2) { animation-delay: 40ms; }
.picks > li:nth-child(3) { animation-delay: 80ms; }
.picks > li:nth-child(4) { animation-delay: 120ms; }
.picks > li:nth-child(5) { animation-delay: 160ms; }
.picks > li:nth-child(6) { animation-delay: 200ms; }
.picks > li:nth-child(n+7) { animation-delay: 240ms; }

footer {
  margin-top: 3rem;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
footer a { color: inherit; }
/* Reduced motion: remove movement, keep gentle opacity */
@media (prefers-reduced-motion: reduce) {
  * { transition-property: background, color, opacity !important; }
  .picks > li { animation: fade-only 200ms ease both; animation-delay: 0ms; }
  .pill:active:not(:disabled) { transform: none; }
  .progress-fill { animation: none; width: 100%; opacity: 0.35; }
  .track, .chip, .hero-mark i { animation: none; }
}
