:root {
  --bg: #0b0f1a;
  --card: #151b2b;
  --text: #e8ecf5;
  --text-muted: #9aa4b8;
  --primary: #7c5cff;
  --accent: #22d3ee;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.08);
  --btn: #6d4dff;
  --link: #a78bfa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(880px 360px at 100% -8%, rgba(124, 92, 255, .22), transparent 62%),
    var(--bg);
  color-scheme: dark;
}

h1, h2, h3 {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
}

h1 { font-size: 36px; }
h2 { font-size: 28px; margin-top: 48px; }
h3 { font-size: 22px; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent); }

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 15, 26, .94);
  border-bottom: 1px solid rgba(232, 236, 245, .08);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  font-size: 16px;
}

.site-logo img,
.gf-site-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.main-nav { display: flex; gap: 8px; flex-wrap: wrap; }

.main-nav a {
  color: var(--text-muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 600;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(232, 236, 245, .06);
}

.site-main { padding: 48px 0 64px; }

.mast {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 180px;
  gap: 32px;
  align-items: center;
  margin-bottom: 32px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.lead {
  margin: 0;
  max-width: 70ch;
  color: var(--text-muted);
  font-size: 18px;
}

.actions { margin: 24px 0 0; }

.joint { margin: 0; justify-self: end; }
.joint svg { display: block; }

.panel,
.codes-band {
  background: var(--card);
  border: 1px solid rgba(232, 236, 245, .08);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.panel h2,
.codes-band h2,
.sheet-head h1 { margin-top: 0; }

.sheet-head { margin-bottom: 32px; }

.prose { max-width: 70ch; }
.prose p,
.page-body p { margin: 0 0 16px; }
.prose ul,
.prose ol,
.page-body ul,
.page-body ol { margin: 0 0 16px 24px; }
.prose li + li,
.page-body li + li { margin-top: 8px; }
.prose img,
.page-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
}

button,
.btn {
  background: var(--btn);
  color: #ffffff;
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 12px 24px;
  font-family: Inter, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

button:hover,
.btn:hover {
  background: #5b3fd4;
  color: #ffffff;
}

.update-notice {
  background: rgba(34, 211, 238, .1);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px 24px;
  margin: 0 0 24px;
}

.update-notice strong { color: var(--accent); }
.update-notice p { margin: 8px 0 0; color: var(--text); }

.codes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.code-card {
  background: var(--bg);
  border: 1px solid rgba(124, 92, 255, .45);
  border-radius: 12px;
  padding: 24px;
}

.code-card.placeholder {
  border-style: dashed;
  text-align: left;
}

.code-name {
  margin-bottom: 8px;
  color: var(--text);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.code-value {
  margin: 12px 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(34, 211, 238, .1);
  color: var(--accent);
  font-family: "Courier New", monospace;
  font-size: 18px;
  font-weight: 700;
  word-break: break-all;
}

.code-reward { color: var(--text-muted); font-size: 14px; }

.faq-list { display: grid; gap: 12px; }

.faq-item {
  background: var(--bg);
  border: 1px solid rgba(232, 236, 245, .08);
  border-radius: 12px;
  padding: 16px 24px;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
}

.faq-item[open] summary::after { content: "−"; }

.faq-answer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(232, 236, 245, .08);
  color: var(--text-muted);
}

.page-interactions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 32px 0;
}

.interaction-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

.interaction-buttons button {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(232, 236, 245, .2);
}

.interaction-buttons button:hover {
  background: rgba(232, 236, 245, .06);
  color: var(--text);
}

.interaction-buttons button[aria-pressed="true"],
.interaction-buttons button[data-gf-liked] {
  background: var(--btn);
  border-color: var(--btn);
  color: #ffffff;
}

.interaction-counts { color: var(--text-muted); font-size: 14px; }

.comments-section h2 { margin-top: 0; }

[data-gf-comment-form] {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.comment-form-fields { display: grid; gap: 12px; }

[data-gf-comment-form] input,
[data-gf-comment-form] textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid rgba(232, 236, 245, .16);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text);
  font: 16px/1.6 Inter, sans-serif;
}

[data-gf-comment-form] textarea { min-height: 120px; resize: vertical; }

.comment-message:not(:empty) {
  margin: 0;
  color: var(--accent);
  font-size: 14px;
}

[data-gf-comments] { display: grid; gap: 16px; }

.comment {
  background: var(--bg);
  border: 1px solid rgba(232, 236, 245, .08);
  border-radius: 12px;
  padding: 16px;
}

.comment[data-gf-owner] { border-color: rgba(124, 92, 255, .7); }

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.comment-header time { margin-left: auto; color: var(--text-muted); }

.owner-badge {
  background: var(--btn);
  color: #ffffff;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
}

.comment-actions button {
  background: transparent;
  color: var(--text-muted);
  min-height: 44px;
  padding: 8px 12px;
}

.comment-actions button:hover { background: transparent; color: var(--accent); }

[data-gf-c-replies] {
  margin: 16px 0 0 16px;
  padding-left: 16px;
  border-left: 2px solid rgba(232, 236, 245, .12);
}

.comments-empty { margin: 0; color: var(--text-muted); }

.site-footer {
  border-top: 1px solid rgba(232, 236, 245, .08);
  padding: 48px 0 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand p,
.footer-bottom,
.footer-col a,
.footer-col h3 { color: var(--text-muted); }

.footer-brand strong {
  color: var(--text);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 18px;
}

.footer-col h3 {
  margin: 0 0 12px;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li + li { margin-top: 8px; }
.footer-col a { font-size: 14px; }
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(232, 236, 245, .08);
  font-size: 14px;
  text-align: center;
}

[hidden] { display: none !important; }

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  .container { padding: 0 16px; }
  .header-content { align-items: flex-start; padding: 12px 0; }
  .mast { grid-template-columns: 1fr; gap: 24px; }
  .joint { justify-self: start; }
  .panel,
  .codes-band { padding: 24px 16px; }
  .actions .btn,
  [data-gf-comment-form] button[type="submit"] { width: 100%; }
  .footer-content { grid-template-columns: 1fr; }
}
