/* tcgmcp.com — single stylesheet, mobile-first, no build step.
   Follows the tcgmcp brand style guide (mint accent + JetBrains Mono; see
   docs/designs/tcgmcp-hero-redesign/). JetBrains Mono loads from the Google
   Fonts CDN (the one external request); system-ui for body/labels. */

:root {
  --bg: #0a0c0f;
  --bg-elev: #12151a;
  --bg-elev-2: #171b21;
  --border: #23272f;
  --text: #edeff2;
  --text-dim: #9aa2ac;
  --text-dimmer: #676f7a;
  /* tcgmcp brand accent: mint. See docs/designs/tcgmcp-hero-redesign/. */
  --accent: #6ee7b7;
  --accent-dim: #2f7d5f;
  --accent-ink: #0c1a15;
  /* accent at low alpha, for tinted surfaces (cart card, step badges) */
  --accent-tint: rgba(110, 231, 183, 0.14);
  --accent-tint-soft: rgba(110, 231, 183, 0.04);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    Consolas, "Liberation Mono", monospace;
  --user-bubble: #1b2430;
  --assistant-bubble: #14171c;
  --radius: 10px;
  --max-w: 760px;
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

code,
pre,
.mono {
  font-family: var(--mono);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: none;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- hero (above the fold) ---------- */

/* The hero runs wider than the rest of the page (--max-w, 760px) so the
   pitch + connect panel sit side by side on desktop. Sections below the
   fold keep the narrow reading column. */
.hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}

.hero-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* auto-fit + minmax collapses to a single stacked column below ~740px with
   no media query — pitch on top, connect panel below. */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  align-items: start;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Brand lockup (inline SVG, brand_assets/logo-horizontal.svg). Aspect 3:1. */
.brand-logo {
  display: block;
  height: 44px;
  width: auto;
}

.hero-headline {
  margin: 0;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--text);
}

.tagline {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-dim);
  margin: 0;
  max-width: 44ch;
  letter-spacing: -0.01em;
}

/* feature chips */

.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-chip {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
}

/* illustrative decklist → cart flow (decorative) */

.demo-flow {
  margin-top: 2px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}

.demo-card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius);
  padding: 13px 14px;
}

.demo-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dimmer);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}

.demo-body {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
}

.demo-muted {
  color: var(--text-dimmer);
}

.demo-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 22px;
}

@media (prefers-reduced-motion: no-preference) {
  .demo-arrow {
    animation: float-arrow 1.6s ease-in-out infinite;
  }
}

@keyframes float-arrow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

.demo-card.demo-cart {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 15px;
  background: linear-gradient(160deg, var(--accent-tint), var(--accent-tint-soft));
  border-color: rgba(110, 231, 183, 0.3);
}

.demo-cart-label {
  color: #8ff0c8;
}

.demo-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.demo-cart-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.demo-cart-count {
  font-size: 12px;
  color: var(--text-dim);
}

.demo-cart-total {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}

/* decklist card, styled as a terminal window
   (brand_assets/terminal-cards-implementation.md) */

.term-card {
  background: #0a0b0f;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  overflow: hidden;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}

/* Monochrome dots, not macOS traffic-lights — keeps it on-brand. */
.term-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a3d44;
}

.term-file {
  font-family: var(--mono);
  font-size: 11px;
  color: #6f747f;
  margin-left: 4px;
}

.term-body {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  color: #cfd2d9;
  padding: 12px 15px 14px;
}

.term-prompt {
  display: flex;
  align-items: center;
  gap: 2px;
}

.term-caret-glyph {
  color: var(--accent);
}

/* 2px bar (not a text cursor) so blink timing is fully controlled. */
.term-caret {
  width: 2px;
  height: 15px;
  background: #cfd2d9;
  margin-left: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  .term-caret {
    animation: caretBlink 1.1s step-end infinite;
  }
}

@keyframes caretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Narrow screens: the 3-column decklist → cart grid gets cramped (the cart
   total collides). Stack the two cards and drop the arrow. */
@media (max-width: 520px) {
  .demo-flow {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .demo-arrow {
    display: none;
  }
}

/* ---------- connect panel (right column) ---------- */

.connect-panel {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.connect-eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.endpoint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 6px 6px 12px;
}

.endpoint-url {
  flex: 1 1 200px;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  padding: 8px 0;
  display: flex;
  align-items: center;
}

.copy-btn {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 84px;
  padding: 0 16px;
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.copy-btn:hover {
  filter: brightness(1.08);
}

.copy-btn:active {
  filter: brightness(0.95);
}

.copy-btn.copied {
  background: #3fbf7f;
  border-color: #3fbf7f;
  color: #06120c;
}

.picker-label {
  margin: 20px 0 10px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- client picker (pure-CSS tab switcher) ---------- */

/* Radios are visually hidden but keyboard-focusable; the labels are the
   clickable chips. :checked drives both the active-chip style and which
   setup panel is visible via general-sibling selectors below. */
.client-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.client-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-radius: var(--radius);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-elev-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.client-chip:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.client-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: currentColor;
}

.client-icon svg {
  fill: currentColor;
  display: block;
}

.client-name {
  font-weight: 600;
}

/* focus ring on the label when its hidden radio is focused (keyboard nav) */
.client-radio:focus-visible + .client-picker .client-chip {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Active chip: match each radio to its label. */
#client-cursor:checked ~ .client-picker label[for="client-cursor"],
#client-vscode:checked ~ .client-picker label[for="client-vscode"],
#client-claude:checked ~ .client-picker label[for="client-claude"],
#client-claudecode:checked ~ .client-picker label[for="client-claudecode"],
#client-chatgpt:checked ~ .client-picker label[for="client-chatgpt"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* ---------- selected setup panel ---------- */

.client-setups {
  margin-top: 16px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
}

/* Hide every panel; reveal only the one whose radio is checked. */
.client-setup {
  display: none;
  flex-direction: column;
  gap: 12px;
}

#client-cursor:checked ~ .client-setups .client-setup[data-client="cursor"],
#client-vscode:checked ~ .client-setups .client-setup[data-client="vscode"],
#client-claude:checked ~ .client-setups .client-setup[data-client="claude"],
#client-claudecode:checked ~ .client-setups .client-setup[data-client="claudecode"],
#client-chatgpt:checked ~ .client-setups .client-setup[data-client="chatgpt"] {
  display: flex;
}

.setup-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.btn-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--accent-dim);
  cursor: pointer;
  transition: filter 0.15s ease;
  width: 100%;
}

.btn-install:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.btn-install:active {
  filter: brightness(0.95);
}

.btn-install.copied {
  background: #3fbf7f;
  border-color: #3fbf7f;
  color: #06120c;
}

.btn-install-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-install-secondary:hover {
  border-color: var(--accent-dim);
}

.setup-steps {
  list-style: none;
  margin: 4px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.setup-steps li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.step-badge {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-text {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-dim);
}

.setup-more {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.setup-more summary {
  list-style: none;
  cursor: pointer;
  min-height: 32px;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
}

.setup-more summary::-webkit-details-marker {
  display: none;
}

.setup-more summary::after {
  content: "+";
  color: var(--text-dim);
  font-weight: 400;
  font-size: 16px;
  margin-left: 8px;
}

.setup-more[open] summary::after {
  content: "\2212";
}

.setup-more p {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}

.setup-more code {
  font-size: 12px;
  word-break: break-all;
}

/* ---------- below the fold sections ---------- */

.section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type {
  border-bottom: none;
}

.section-title {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.section-sub {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0 0 22px;
}

/* transcripts — styled like the chat surfaces tcgmcp actually plugs into:
   your message as a right-aligned bubble, the assistant's reply flowing
   plainly on the left behind a small avatar mark. No "YOU / ASSISTANT"
   labels — alignment + avatar carry that, same as Claude/ChatGPT/Grok. */

.transcript {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 16px;
  margin-bottom: 24px;
  position: relative;
}

.transcript:last-child {
  margin-bottom: 0;
}

.transcript-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dimmer);
  margin-bottom: 12px;
}

.msg {
  font-size: 14px;
}

.msg + .msg {
  margin-top: 14px;
}

.msg.user {
  display: flex;
  justify-content: flex-end;
}

.msg.user .bubble {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: 88%;
}

.msg.user .prompt-text {
  background: var(--user-bubble);
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  padding: 10px 14px;
  white-space: pre-wrap;
  margin: 0;
}

.copy-prompt-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dimmer);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.copy-prompt-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text-dim);
}

.copy-prompt-btn.copied {
  border-color: #3fbf7f;
  color: #3fbf7f;
}

.msg.assistant {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.msg.assistant .avatar {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg.assistant .content {
  flex: 1 1 auto;
  min-width: 0;
  opacity: 1;
  transition: opacity 0.25s ease;
}

/* display:none (not just opacity:0) so the reply takes zero space while
   pending — otherwise the page reserves the full price-table height up
   front and leaves a big gap next to the avatar until it's "typed". */
.msg.assistant.is-pending .content {
  display: none;
}

.msg.assistant.is-revealing .content {
  opacity: 0;
}

.msg.assistant .content > p:first-child {
  margin-top: 0;
}

/* Typing + thinking states — decorative, JS-driven (see the closing
   <script>). Content is fully present in the DOM from page load either
   way, so nothing here is load-bearing for non-JS/reduced-motion users. */

.msg.user.is-typing .prompt-text::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--text);
  animation: caretBlink 0.9s step-end infinite;
}

.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  margin-top: 2px;
}

.thinking-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-dimmer);
  font-style: normal;
  animation: thinking-bounce 1s ease-in-out infinite;
}

.thinking-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.thinking-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes thinking-bounce {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.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;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.price-table th,
.price-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.price-table th:last-child,
.price-table td:last-child {
  text-align: right;
}

.price-table td:nth-child(2) {
  white-space: normal;
}

.price-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.price-total {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.buy-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 14px;
}

.msg.assistant .content p {
  margin: 0 0 8px;
}

.unresolved-note {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
}

/* games strip */

.games-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chip {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  transform: translateY(-1px);
  border-color: var(--accent-dim);
  color: var(--text);
}

/* points */

.points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.point-card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius);
  padding: 16px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.point-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-dim);
  box-shadow: var(--shadow-md);
}

.point-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.point-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

/* faq */

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq details:first-child {
  border-top: 1px solid var(--border);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 2px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--text-dim);
  font-weight: 400;
  font-size: 18px;
  margin-left: 12px;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq .faq-body {
  margin: 0 0 16px;
  color: var(--text-dim);
  font-size: 14px;
  max-width: 60ch;
}

/* footer */

footer.site-footer {
  padding: 28px 0 48px;
  font-size: 14px;
  color: var(--text-dimmer);
}

footer.site-footer .footer-links {
  margin-top: 6px;
}

footer.site-footer .footer-links a {
  color: var(--text-dim);
  margin-right: 14px;
}

/* terms page */

.legal h1 {
  font-size: 24px;
  margin: 48px 0 8px;
}

.legal h2 {
  font-size: 17px;
  margin: 28px 0 8px;
}

.legal p,
.legal li {
  color: var(--text-dim);
  font-size: 15px;
}

.legal .updated {
  color: var(--text-dimmer);
  font-size: 14px;
  margin-bottom: 32px;
}

.back-link {
  display: inline-block;
  margin: 24px 0 0;
  font-size: 14px;
}

/* ---------- desktop / wider viewports ---------- */

@media (min-width: 640px) {
  .hero {
    padding: 72px 0 56px;
  }

  .wordmark {
    font-size: 28px;
  }

  .connect-panel {
    padding: 24px;
  }

  .points {
    grid-template-columns: repeat(3, 1fr);
  }

  .section {
    padding: 56px 0;
  }

  .transcript {
    margin-bottom: 36px;
  }
}
