/* tcgmcp.com — single stylesheet, mobile-first, no build step.
   System font stack only. No text-shadow. No webfonts. No external requests. */

:root {
  --bg: #0a0c0f;
  --bg-elev: #12151a;
  --bg-elev-2: #171b21;
  --border: #23272f;
  --text: #edeff2;
  --text-dim: #9aa2ac;
  --text-dimmer: #676f7a;
  --accent: #7c9eff;
  --accent-dim: #3d5a8a;
  --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: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

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) ---------- */

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

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--text);
}

.cursor-blink {
  display: inline-block;
  width: 9px;
  height: 0.95em;
  background: var(--accent);
  border-radius: 1px;
  transform: translateY(0.08em);
}

@media (prefers-reduced-motion: no-preference) {
  .cursor-blink {
    animation: blink 1.1s steps(1) infinite;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

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

.cta {
  margin-top: 8px;
}

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

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

.copy-btn {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 90px;
  padding: 0 18px;
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  background: var(--accent);
  color: #0a0c0f;
  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;
}

/* ---------- client install grid ---------- */

.client-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 560px) {
  .client-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 880px) {
  .client-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.client-card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.client-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.client-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.client-name {
  font-weight: 600;
  font-size: 15px;
}

.btn-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #0a0c0f;
  font-weight: 600;
  font-size: 14px;
  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);
}

.client-card details {
  margin-top: -2px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.client-card summary {
  list-style: none;
  cursor: pointer;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}

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

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

.client-card details[open] summary::after {
  content: "\2212";
}

.client-card .client-body {
  padding-top: 6px;
}

.client-card .client-body p {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}

.client-card .client-body 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: 14px;
  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: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  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: blink 0.9s steps(1) 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: 88px 0 56px;
  }

  .wordmark {
    font-size: 34px;
  }

  .tagline {
    font-size: 20px;
  }

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

  .section {
    padding: 56px 0;
  }
}
