/* FatCat Tech — shared site styles */

:root {
  --bg-1: #0f2027;
  --bg-2: #203a43;
  --bg-3: #2c5364;
  --text: #eef3f6;
  --muted: #a7bcc7;
  --accent: #ffcc00;
  --accent-ink: #1a1a1a;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.11);
  --border: rgba(255, 255, 255, 0.14);
  --me: rgba(255, 204, 0, 0.10);
  --me-border: rgba(255, 204, 0, 0.45);
  --ok: #10a37f;
  --danger: #d9534f;
  --radius: 14px;
  --maxw: 860px;
  --chatgpt: #10a37f;
  --gemini: #4c8df6;
  --claude: #d97757;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg-1) linear-gradient(135deg, var(--bg-1), var(--bg-2) 50%, var(--bg-3)) fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header / footer ---------- */

.site-header {
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}
.brand b { color: var(--accent); }
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  padding: 2px;
}
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
}
.nav a:hover, .nav a[aria-current] { color: var(--text); background: var(--surface-strong); }

main { flex: 1; padding: 32px 0 56px; }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 20px 16px;
  border-top: 1px solid var(--border);
}

/* ---------- Shared bits ---------- */

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); margin: 0 0 0.3em; }

.lead { color: var(--muted); font-size: 1.12rem; margin: 0 0 1em; }
.small { color: var(--muted); font-size: 0.85rem; }
.empty { color: var(--muted); font-style: italic; }
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-strong); filter: none; }
.btn-small { padding: 4px 12px; font-size: 0.9rem; }
.btn-danger { background: var(--danger); color: #fff; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.source {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
}
.source-chatgpt { background: var(--chatgpt); color: #fff; }
.source-gemini  { background: var(--gemini);  color: #fff; }
.source-claude  { background: var(--claude);  color: #fff; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 8px 0 0; }
.tag {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 9px;
}

.notice { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; }
.notice-ok  { background: rgba(16, 163, 127, 0.18); border: 1px solid rgba(16, 163, 127, 0.6); }
.notice-err { background: rgba(217, 83, 79, 0.18); border: 1px solid rgba(217, 83, 79, 0.6); }
.notice ul { margin: 0; padding-left: 20px; }

/* ---------- Homepage ---------- */

.hero { text-align: center; padding: 8px 0 8px; }
.hero-logo {
  width: 168px;
  height: 168px;
  margin: 0 auto 18px;
  display: block;
  background: #fff;
  border-radius: 28px;
  padding: 8px;
  box-shadow: 0 0 0 4px var(--accent), 0 14px 40px rgba(0, 0, 0, 0.45);
}
.hero .lead { max-width: 560px; margin: 0 auto; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.cards .card h2 { margin: 0 0 6px; font-size: 1.3rem; }
.cards .card p { margin: 0 0 14px; }

.mini-list { list-style: none; padding: 0; margin: 0 0 16px; }
.mini-list li { padding: 6px 0; border-top: 1px solid var(--border); }
.mini-list li:first-child { border-top: 0; }
.mini-list a { color: var(--text); text-decoration: none; font-weight: 600; }
.mini-list a:hover { color: var(--accent); }

/* ---------- Chat index ---------- */

.chat-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.chat-link {
  display: block;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.chat-link:hover { border-color: var(--accent); background: var(--surface-strong); }
.chat-link h2 { font-size: 1.25rem; margin: 0 0 4px; }
.chat-link p { margin: 8px 0 0; color: var(--muted); }

/* ---------- Conversation ---------- */

.conversation { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }

.turn-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 4px 4px;
}

.bubble {
  padding: 14px 18px;
  overflow-wrap: anywhere;
  position: relative;
}
.bubble > :first-child { margin-top: 0; }
.bubble > :last-child { margin-bottom: 0; }

.turn-me { align-self: flex-end; max-width: min(88%, 640px); }
.turn-me .turn-label { text-align: right; color: var(--accent); }
.turn-me .bubble {
  background: var(--me);
  border: 1px solid var(--me-border);
  border-radius: var(--radius) var(--radius) 4px var(--radius);
}

.turn-ai .bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) var(--radius) 4px;
}

.turn-note .bubble {
  background: rgba(255, 204, 0, 0.05);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.turn-note .turn-label { color: var(--accent); }

.bubble.is-collapsed {
  max-height: 420px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
  mask-image: linear-gradient(to bottom, #000 65%, transparent);
}
.show-more { margin-top: 8px; }

.bubble h3, .bubble h4, .bubble h5, .bubble h6 { margin: 1.2em 0 0.4em; }
.bubble h3 { font-size: 1.2rem; }
.bubble h4 { font-size: 1.08rem; }
.bubble h5, .bubble h6 { font-size: 1rem; }
.bubble ul, .bubble ol { padding-left: 1.4em; }
.bubble li + li { margin-top: 0.25em; }
.bubble hr { border: 0; border-top: 1px solid var(--border); margin: 1.2em 0; }
.bubble blockquote {
  margin: 0 0 1em;
  padding-left: 12px;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

code { font-family: 'Cascadia Code', Consolas, 'Courier New', monospace; font-size: 0.9em; }
:not(pre) > code { background: rgba(0, 0, 0, 0.3); padding: 1px 5px; border-radius: 5px; }
pre {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  line-height: 1.45;
  overflow-wrap: normal;
}

.table-wrap { overflow-x: auto; margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; vertical-align: top; }
th { background: var(--surface-strong); }

/* ---------- Comments ---------- */

.comments { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }
.comments h2 { margin-top: 0; }
.comment { margin-bottom: 12px; padding: 12px 16px; }
.comment-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.comment-head strong { color: var(--text); }
.comment-body { margin: 0; overflow-wrap: anywhere; }

.form { display: grid; gap: 14px; margin-top: 20px; }
.form label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.95rem; }
.form label .small { font-weight: 400; }
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
}
.form textarea { min-height: 140px; resize: vertical; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Honeypot: hidden from people, visible to naive bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Admin ---------- */

.admin-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.actions form { margin: 0; }
.hash-box { font-family: 'Cascadia Code', Consolas, monospace; word-break: break-all; user-select: all; }

@media (max-width: 560px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .turn-me { max-width: 94%; }
  .bubble { padding: 12px 14px; }
}

/* ---------- Product pages (Useful Tools) ---------- */

.breadcrumb { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }

.product-head { display: flex; align-items: center; gap: 14px; }
.product-head h1 { margin: 0; }
.product-head .lead { margin: 4px 0 0; }

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin: 20px 0 32px;
  border-bottom: 1px solid var(--border);
}
.subnav a {
  padding: 8px 12px;
  margin-bottom: -1px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.subnav a:hover { color: var(--text); }
.subnav a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }

.prose { max-width: 720px; }
.prose h2 { font-size: 1.35rem; margin: 2em 0 0.5em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin: 1.5em 0 0.4em; }
.updated { color: var(--muted); font-size: 0.9rem; margin: -0.5em 0 2em; }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 32px; }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); }

.todo {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 1em;
  color: var(--muted);
  font-style: italic;
}
.todo-note { margin-top: 6px; font-style: normal; color: var(--accent); font-size: 0.9rem; }

.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }

.tool-icon {
  width: 56px;
  height: 56px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 1.6rem;
}

/* Logos with a white background sit on a white rounded panel */
.logo-panel {
  display: inline-block;
  margin: 0;
  padding: 8px 14px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  line-height: 0;
}
.logo-panel img { display: block; width: 200px; height: auto; }
/* Tool cards: every logo panel is the same size, whatever the logo's shape */
.logo-panel-small {
  box-shadow: none;
  width: 178px;
  height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.logo-panel-small img { width: 150px; }
.logo-panel-small .panel-icon { width: 80px; height: 80px; }
.logo-panel-small .panel-emoji { font-size: 3.5rem; line-height: 1; }
.logo-panel-small .panel-name {
  line-height: 1.1;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1b2a4a;
}
.download-meta { align-self: center; }
.tool-icon img { width: 44px; height: 44px; display: block; }

/* Screenshots on product pages */
.shot { margin: 24px 0 28px; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}
.shot figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 8px; text-align: center; }

.features li + li { margin-top: 0.45em; }

/* FAQ: one expandable question per row */
.faq { border-top: 1px solid var(--border); }
.faq:last-of-type { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  padding: 12px 4px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-weight: 700; }
.faq[open] summary::after { content: '\2212'; }
.faq summary:hover { color: var(--accent); }
.faq > :not(summary) { margin: 0 4px 14px; color: var(--text); }