/* Gregory site: styled after a Discord channel (dark-first, with a light theme). */

:root {
  --bg: #313338;          /* channel background */
  --bg-raised: #2b2d31;   /* embeds, cards */
  --bg-deep: #1e1f22;     /* header bar, code, inputs */
  --hover: #2e3035;
  --border: #3f4147;
  --text: #dbdee1;
  --heading: #f2f3f5;
  --muted: #949ba4;
  --accent: #5865f2;
  --accent-text: #ffffff;
  --link: #00a8fc;
  --green: #23a55a;
  --mention-bg: rgba(88, 101, 242, 0.3);
  --mention-text: #c9cdfb;
  --shadow: 0 1px 0 rgba(4, 4, 5, 0.2), 0 1.5px 0 rgba(6, 6, 7, 0.05), 0 2px 0 rgba(4, 4, 5, 0.05);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ffffff; --bg-raised: #f2f3f5; --bg-deep: #e3e5e8; --hover: #f2f3f5;
    --border: #e1e2e4; --text: #313338; --heading: #060607; --muted: #5c5e66;
    --link: #006ce7; --mention-bg: rgba(88, 101, 242, 0.15); --mention-text: #4752c4;
    --shadow: 0 1px 0 rgba(6, 6, 7, 0.08);
  }
}
:root[data-theme="light"] {
  --bg: #ffffff; --bg-raised: #f2f3f5; --bg-deep: #e3e5e8; --hover: #f2f3f5;
  --border: #e1e2e4; --text: #313338; --heading: #060607; --muted: #5c5e66;
  --link: #006ce7; --mention-bg: rgba(88, 101, 242, 0.15); --mention-text: #4752c4;
  --shadow: 0 1px 0 rgba(6, 6, 7, 0.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--heading); }
code {
  font: 0.875em/1.4 Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", Menlo, monospace;
  background: var(--bg-deep); padding: 2px 5px; border-radius: 4px;
}

/* ── channel header ───────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px;
  background: var(--bg); box-shadow: var(--shadow); white-space: nowrap; overflow: hidden;
}
.topbar .hash { color: var(--muted); font-size: 24px; font-weight: 300; line-height: 1; }
.topbar .channel { color: var(--heading); font-weight: 600; }
.topbar .topic {
  color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis;
  border-left: 1px solid var(--border); padding-left: 12px; margin-left: 4px;
}
.topbar nav { margin-left: auto; display: flex; gap: 16px; font-size: 14px; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover, .topbar nav a[aria-current] { color: var(--heading); text-decoration: none; }

main { max-width: 800px; margin: 0 auto; padding: 40px 16px 24px; }

/* ── hero ─────────────────────────────────────────────────────────────────── */
.hero { display: flex; gap: 20px; align-items: center; margin-bottom: 28px; }
.hero .avatar { width: 80px; height: 80px; flex: none; }
.hero h1 {
  margin: 0; font-size: 40px; line-height: 1.1; color: var(--heading); letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.hero p { margin: 6px 0 0; font-size: 18px; color: var(--muted); }
.hero p.origin { margin-top: 4px; font-size: 14px; font-style: italic; }
.hero p.origin strong { color: inherit; }

.badge {
  display: inline-flex; align-items: center; gap: 3px; height: 16px; padding: 0 5px; border-radius: 4px;
  background: var(--accent); color: var(--accent-text);
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; line-height: 16px;
  vertical-align: middle;
}
.hero .badge { height: 22px; line-height: 22px; font-size: 13px; padding: 0 7px; }

/* ── chat mock ────────────────────────────────────────────────────────────── */
.chat {
  background: var(--bg-raised); border-radius: 8px; padding: 8px 0 12px; margin: 0 0 12px;
  border: 1px solid var(--border);
}
.msg { display: flex; gap: 16px; padding: 6px 16px; }
.msg:hover { background: var(--hover); }
.msg .avatar { width: 40px; height: 40px; flex: none; margin-top: 2px; }
.msg .body { min-width: 0; flex: 1; }
.msg .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.msg .name { color: var(--heading); font-weight: 500; }
.msg .time { color: var(--muted); font-size: 12px; }
.msg p { margin: 2px 0 0; }
.used {
  display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px;
  padding: 4px 16px 0 72px; position: relative;
}
.used::before {
  content: ""; position: absolute; left: 36px; top: 12px; width: 30px; height: 10px;
  border-left: 2px solid var(--border); border-top: 2px solid var(--border); border-top-left-radius: 6px;
}
.used .mini { width: 16px; height: 16px; border-radius: 50%; background: #3ba55d; flex: none; }
.used .cmd { color: var(--link); }
.mention { background: var(--mention-bg); color: var(--mention-text); border-radius: 3px; padding: 0 2px; font-weight: 500; }
.ephemeral { color: var(--muted); font-size: 12px; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.ephemeral a { color: var(--link); }

.event-card {
  margin-top: 8px; max-width: 432px; background: var(--bg-deep); border-radius: 8px; padding: 12px 16px;
}
.event-card .when { color: var(--green); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.event-card .title { color: var(--heading); font-weight: 700; font-size: 17px; margin: 2px 0; }
.event-card .where { color: var(--muted); font-size: 14px; }
.event-card .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.event-card .count { color: var(--muted); font-size: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 16px; border-radius: 4px;
  background: var(--accent); color: var(--accent-text); font-size: 14px; font-weight: 500;
}
.btn.secondary { background: #4e5058; color: #fff; }

.composer {
  display: flex; align-items: center; gap: 12px; margin: 8px 16px 0; padding: 11px 16px;
  background: var(--bg-deep); border-radius: 8px; color: var(--muted);
}
.composer .plus {
  width: 24px; height: 24px; border-radius: 50%; background: var(--muted); color: var(--bg-deep);
  display: grid; place-items: center; font-weight: 700; flex: none; line-height: 1;
}
.composer .typed { color: var(--text); }
.caret { display: inline-block; width: 1px; height: 1.1em; background: var(--text); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

.caption { color: var(--muted); font-size: 14px; margin: 0 0 32px; }

/* "Only you can see it": your view vs. everyone else's, side by side. */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.compare figure { margin: 0; display: flex; flex-direction: column; }
.compare figcaption { margin-bottom: 8px; }
.compare .chat { flex: 1; margin: 0; }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
}
.tag.you    { background: var(--accent); color: var(--accent-text); }
.tag.others { background: var(--bg-deep); color: var(--muted); }
/* Highlight the private reply so it stands out in the example (Discord itself doesn't tint it). */
.ephemeral-msg { background: var(--mention-bg); }
.ephemeral-msg:hover { background: var(--mention-bg); }
.nothing {
  margin: 12px 16px 4px; padding: 18px 12px; border: 2px dashed var(--border); border-radius: 8px;
  color: var(--muted); font-size: 14px; text-align: center;
}
.compare > .embed { margin-bottom: 0; }
ul.tight { margin: 6px 0 0; padding-left: 18px; font-size: 15px; }
ul.tight li { margin-bottom: 4px; }
.facts { padding-left: 20px; margin: 16px 0 0; }
.facts li { margin-bottom: 8px; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }

/* ── sections ─────────────────────────────────────────────────────────────── */
h2 {
  display: flex; align-items: center; gap: 8px; margin: 40px 0 12px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted);
}
h2 { scroll-margin-top: 64px; }  /* clear the sticky header when linked to directly */
h2::before { content: "⌄"; font-size: 16px; line-height: 0; position: relative; top: -3px; }
.lead { margin: 0 0 12px; }

/* Steps rendered like bot embeds: coloured left bar, raised surface. */
.embed {
  display: flex; gap: 14px; background: var(--bg-raised); border-left: 4px solid var(--accent);
  border-radius: 4px; padding: 12px 16px; margin-bottom: 8px;
}
.embed .num {
  flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-text);
  display: grid; place-items: center; font-size: 13px; font-weight: 700; margin-top: 1px;
}
.embed .title { color: var(--heading); font-weight: 600; }
.embed p { margin: 2px 0 0; font-size: 15px; }
.embed.green { border-left-color: var(--green); }
.embed.green .num { background: var(--green); }

/* Sync table */
.table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; vertical-align: top; }
th {
  background: var(--bg-raised); color: var(--muted); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.02em;
}
tr + tr td, tbody tr:first-child td { border-top: 1px solid var(--border); }
.note {
  display: flex; gap: 10px; margin: 12px 0 0; padding: 10px 14px; border-radius: 4px;
  background: var(--mention-bg); color: var(--text); font-size: 15px;
}

/* Commands, styled like the slash-command picker. */
.picker { background: var(--bg-raised); border-radius: 8px; padding: 8px; border: 1px solid var(--border); }
.picker .label {
  padding: 4px 8px 8px; color: var(--muted); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.02em; display: flex; align-items: center; gap: 8px;
}
.picker .label .avatar { width: 16px; height: 16px; }
.cmd-row { display: flex; gap: 12px; padding: 8px; border-radius: 4px; align-items: baseline; }
.cmd-row:hover { background: var(--hover); }
.cmd-row .name { color: var(--heading); font-weight: 600; white-space: nowrap; min-width: 116px; }
.cmd-row .desc { color: var(--muted); font-size: 15px; }
.cmd-row .req { display: inline-block; margin-left: 4px; font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; }

/* FAQ */
details {
  background: var(--bg-raised); border-radius: 8px; margin-bottom: 8px; padding: 0 16px;
}
summary {
  cursor: pointer; padding: 14px 0; color: var(--heading); font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details > :not(summary) { margin: 0 0 14px; }
details ul { padding-left: 20px; }
details li { margin-bottom: 4px; }

/* ── privacy page ─────────────────────────────────────────────────────────── */
.doc h1 { color: var(--heading); font-size: 32px; margin: 0 0 4px; line-height: 1.2; }
.doc .meta { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.doc h2 { margin-top: 36px; }
.doc p, .doc li { font-size: 16px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.pinned {
  background: var(--bg-raised); border-left: 4px solid var(--accent); border-radius: 4px; padding: 12px 16px;
}
.pinned .label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.pinned ul { margin: 8px 0 0; }

/* Ko-fi support card, above the footer on every page. */
.support {
  max-width: 768px; margin: 24px auto 0; padding: 16px 20px;
  background: var(--bg-raised); border-left: 4px solid var(--green); border-radius: 4px;
}
.support h3 { margin: 0 0 8px; font-size: 17px; color: var(--heading); }
.support p { margin: 0 0 10px; font-size: 15px; }
.support .btn { margin-top: 4px; text-decoration: none; }
.support .btn:hover { filter: brightness(1.1); }
@media (max-width: 800px) { .support { margin-left: 16px; margin-right: 16px; } }

footer {
  max-width: 800px; margin: 24px auto 0; padding: 20px 16px 40px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 14px;
}

@media (max-width: 560px) {
  main { padding-top: 28px; }
  .hero { gap: 14px; }
  .hero .avatar { width: 56px; height: 56px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 16px; }
  .topbar .topic { display: none; }
  .msg { gap: 12px; padding: 6px 12px; }
  .used { padding-left: 64px; }
  .used::before { left: 30px; }
  .cmd-row { flex-direction: column; gap: 0; }
  .cmd-row .name { min-width: 0; }
}
