/* Standalone Ball Knowledge article pages — mirrors the in-site reader. */
:root {
  --yellow: #ffc400;
  --ink: #14120e;
}
* { box-sizing: border-box; }
html { background: #faf8f1; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: #2b2822;
  font-family: "DM Sans", -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.6;
  background-color: #faf8f1;
  background-image:
    linear-gradient(rgba(250,248,241,.80), rgba(250,248,241,.80)),
    url('../../bk-desk-bg.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
@keyframes bkPageIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
img { max-width: 100%; }
a { color: #8a6d00; }

/* Top bar */
.bk-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid #e3ddd0;
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 241, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.bk-topbar a { text-decoration: none; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.bk-topbar .bk-back { color: #14120e; }
.bk-topbar .bk-brand { color: #14120e; font-family: "Barlow Condensed", Impact, sans-serif; font-size: 1.15rem; letter-spacing: .12em; }
.bk-topbar .bk-brand img { height: 34px; width: 34px; object-fit: cover; border-radius: 7px; display: block; }
.bk-topbar .bk-brand span { color: var(--yellow); }

/* Reader */
.bk-reader { max-width: 760px; margin: 0 auto; padding: 40px 20px 0; animation: bkPageIn .55s ease both; }
@media (prefers-reduced-motion: reduce) { .bk-reader { animation: none; } }
.bk-article-head { text-align: center; margin-bottom: clamp(36px, 5vw, 56px); }
.bk-rule { width: 72px; height: 5px; background: var(--yellow); margin: 0 auto 26px; border-radius: 3px; }
.eyebrow {
  margin: 0 0 18px; color: #1c1a16; opacity: .62;
  font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.bk-article-head h2 {
  font-family: 'Newsreader', Georgia, serif; font-weight: 500;
  font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.1; letter-spacing: -0.015em;
  margin: 0 0 18px; color: var(--ink); text-wrap: balance;
}
.bk-dek { color: #57524a; font-size: 1.02rem; line-height: 1.65; margin: 0 0 22px; }
.bk-byline { color: #8a8478; font-size: .92rem; margin: 0; }

/* Figures */
.bk-figure { margin: 0 0 2.8em; }
.bk-figure img { width: 100%; height: auto; display: block; border-radius: 14px; box-shadow: 0 18px 50px rgba(28, 26, 22, .12); }
.bk-figure video { width: 100%; height: auto; display: block; border-radius: 14px; box-shadow: 0 18px 50px rgba(28, 26, 22, .12); background: #000; }
.bk-figure figcaption { color: #8a8478; font-size: .85rem; text-align: center; padding-top: 12px; font-style: italic; }
.bk-figure.bk-hero { width: min(960px, 94vw); margin-left: 50%; transform: translateX(-50%); }
.bk-figure.bk-fig-wide { width: min(1000px, 94vw); margin-left: 50%; transform: translateX(-50%); }

/* Reading well */
.bk-reading { position: relative; }
.bk-reading::before {
  content: ""; position: absolute; inset: -40px clamp(-120px, -8vw, -16px); z-index: 0; pointer-events: none;
  background: #faf8f1;
}
.bk-reading > * { position: relative; z-index: 1; }
.bk-prose { max-width: 740px; margin: 0 auto; font-size: 1.12rem; line-height: 1.82; color: #2b2822; }
.bk-prose p { margin: 0 0 1.55em; }
.bk-prose > p:first-of-type::first-letter {
  font-family: 'Newsreader', Georgia, serif; font-weight: 600;
  font-size: 3.4em; line-height: .85; float: left; padding: 6px 10px 0 0; color: var(--ink);
}
.bk-prose h3 {
  font-family: 'Newsreader', Georgia, serif; font-weight: 600;
  font-size: 1.55rem; line-height: 1.25; color: var(--ink); margin: 2.4em 0 .7em;
}
.bk-prose a { color: #8a6d00; text-decoration: underline; text-underline-offset: 3px; }
.bk-closer {
  font-family: 'Newsreader', Georgia, serif; font-style: italic;
  font-size: 1.35rem; line-height: 1.55; color: var(--ink);
  border-left: 4px solid var(--yellow); padding-left: 1.1em; margin: 2.6em 0 0;
}
.bk-watch { text-align: center; margin: 0 0 1.55em; }

/* Endmatter */
.bk-end-div { border: none; border-top: 1px solid #e3ddd0; margin: 64px auto 36px; max-width: 740px; }
.bk-author { text-align: center; color: #8a8478; font-size: .95rem; margin: 0 0 26px; }
.bk-end-share { text-align: center; margin: 0 0 54px; }
.bk-share-btn {
  background: none; border: 1px solid #d8d0bd; border-radius: 999px; cursor: pointer;
  font: 700 .85rem "DM Sans", sans-serif; letter-spacing: .05em; color: #14120e;
  padding: 10px 22px;
}
.bk-share-btn:hover { border-color: var(--yellow); }
.bk-related { max-width: 740px; margin: 0 auto 54px; }
.bk-related h3 { font-family: 'Newsreader', Georgia, serif; font-weight: 600; font-size: 1.5rem; color: var(--ink); margin: 0 0 22px; text-align: center; }
.bk-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; text-align: left; }
.bk-rel-card {
  display: block; background: #fffdf8; border: 1px solid #e9e2d2; border-radius: 14px; overflow: hidden;
  text-decoration: none; color: inherit; box-shadow: 0 10px 30px rgba(28,26,22,.06);
}
.bk-rel-card img { width: 100%; height: 120px; object-fit: cover; display: block; }
.bk-rel-kicker { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #8a6d00; font-weight: 700; padding: 14px 16px 0; }
.bk-rel-title { display: block; font-family: 'Newsreader', Georgia, serif; font-size: 1.05rem; line-height: 1.35; color: var(--ink); padding: 6px 16px 16px; }
.bk-end-cta { text-align: center; margin: 0 0 8px; }
.bk-read-btn {
  display: inline-block; background: #14120e; color: #faf8f1; border: none; cursor: pointer;
  font: 700 .92rem 'DM Sans', sans-serif; letter-spacing: .04em;
  padding: 14px 30px; border-radius: 999px; text-decoration: none;
}

/* Discuss + newsletter */
.bk-news-strip { margin: 44px 0 0; padding: 28px 20px 6px; border-top: 1px solid #e3ddd0; text-align: center; }
.bk-news-lede { margin: 0 0 16px; color: var(--ink); font-size: 1.05rem; }
.bk-news-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.bk-news-form input[type="email"] {
  flex: 1 1 220px; max-width: 320px; padding: 12px 18px; border: 1px solid #d8d0bd;
  border-radius: 999px; font: inherit; font-size: .95rem; background: #fff; color: var(--ink);
}
.bk-news-msg { font-size: .9rem; color: #6f6a5e; min-height: 1.4em; }
.bk-discord-line { margin: 16px 0 0; font-size: .95rem; color: #6f6a5e; }
.bk-discord-line a { color: #14120e; font-weight: 700; }

.bk-footer { text-align: center; color: #8a8478; font-size: .85rem; padding: 48px 20px 60px; }
.bk-footer a { color: #14120e; font-weight: 700; text-decoration: none; }

/* Comments (ported from the main site) */
.bk-c-check { display: flex; align-items: center; gap: 10px; margin: 12px 2px 14px; font-size: .88rem; color: #57524a; cursor: pointer; }
.bk-c-check input { width: 16px; height: 16px; accent-color: #8a6d00; flex: none; }
.bk-comments { margin-top: 60px; border-top: 1px solid #e9e2d2; padding-top: 40px; }
.bk-c-title { font-family: 'Newsreader', Georgia, serif; font-weight: 500; font-size: 1.6rem; color: #14120e; margin: 0 0 20px; }
.bk-c-count { color: #8a8478; font-size: 1.1rem; }
.bk-c-note { color: #6b655a; font-size: .95rem; line-height: 1.6; margin: 0 0 18px; }
.bk-c-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.bk-c-tabs button { background: none; border: 1px solid #d8d0bd; border-radius: 999px; padding: 8px 18px; font: 600 .82rem 'DM Sans', sans-serif; color: #6b655a; cursor: pointer; }
.bk-c-tabs button.on { background: #14120e; border-color: #14120e; color: #faf8f1; }
.bk-c-input, .bk-c-area { display: block; width: 100%; box-sizing: border-box; background: #fffdf8; border: 1px solid #d8d0bd; border-radius: 12px; padding: 12px 16px; font: 1rem 'DM Sans', sans-serif; color: #14120e; margin-bottom: 12px; }
.bk-c-input:focus, .bk-c-area:focus { outline: none; border-color: #8a6d00; }
.bk-c-area { resize: vertical; min-height: 90px; }
.bk-c-err { color: #a33b2e; font-size: .9rem; margin: 12px 0 0; }
.bk-c-ok { color: #2e7d4f; font-size: .9rem; margin: 12px 0 0; }
.bk-c-link { background: none; border: none; padding: 0; color: #8a6d00; font: inherit; cursor: pointer; text-decoration: underline; }
.bk-c-list { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; }
.bk-c-item { background: #fffdf8; border: 1px solid #e9e2d2; border-radius: 14px; padding: 16px 18px; }
.bk-c-meta { font-size: .82rem; color: #8a8478; margin: 0 0 8px; }
.bk-c-meta strong { color: #14120e; }
.bk-c-text { color: #2b2822; font-size: .98rem; line-height: 1.65; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 680px) {
  body {
    background-image:
      linear-gradient(rgba(250,248,241,.88), rgba(250,248,241,.88)),
      url('../../bk-desk-bg-mobile.jpg');
  }
  .bk-figure.bk-hero, .bk-figure.bk-fig-wide { width: 100%; margin-left: 0; transform: none; }
  .bk-related-grid { grid-template-columns: 1fr; }
  .bk-rel-card img { height: 160px; }
}
