/* Site-wide pieces shared by every page: the nav brand byline, the inner-page
   nav, the footer, the cookie notice, and motion/accessibility defaults.
   Loaded after each page's own styles, so these rules are the ones that win. */

:root {
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --sf-bg: #1c1b18;
  --sf-text: rgba(255,255,255,.62);
  --sf-head: rgba(255,255,255,.92);
  --sf-line: rgba(255,255,255,.1);
  --sf-accent: #74c69d;
}

/* ── Brand: "TCG Speed Shipper / by Clujkeebs" ── */
.nav-brand { text-decoration: none; }
.nav-brand .brand-stack { display: flex; flex-direction: column; line-height: 1.05; }
.nav-brand .brand-name { font-family: 'DM Serif Display', serif; font-size: 16px; color: #fff; letter-spacing: -.01em; white-space: nowrap; }
.nav-brand .brand-by {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .06em;
  color: rgba(255,255,255,.55); margin-top: 3px; text-transform: none;
}

/* ── Inner pages (guides, blog, support, legal): one nav everywhere ── */
.site-nav { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; position: sticky; top: 0; z-index: 50; }
.site-nav .nav-links { display: flex; gap: 2px; margin-left: auto; }
.site-nav .nav-links a {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .02em; text-transform: uppercase;
  color: rgba(255,255,255,.6); text-decoration: none; padding: 8px 10px; border-radius: 8px;
  transition: color .15s, background .15s;
}
.site-nav .nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.site-nav .nav-links a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.1); }
.site-nav .nav-cta { margin-left: 4px; white-space: nowrap; transition: background .15s, transform .15s var(--ease-out); }
.site-nav .nav-cta:active { transform: scale(.97); }
@media (max-width: 640px) {
  .site-nav .nav-cta .cta-long { display: none; }
}
@media (max-width: 480px) {
  .site-nav .nav-cta { display: none; }
}
@media (max-width: 420px) {
  .site-nav { gap: 6px; padding: 0 10px; }
  .site-nav .nav-links a { padding: 8px 6px; font-size: 11px; }
  .nav-brand .brand-name { font-size: 14px; }
}
@media (max-width: 340px) { .site-nav .nav-links a[href="/support.html"] { display: none; } }

/* ── Resources switcher (Guides | Blog) ── */
.res-switch { display: inline-flex; gap: 4px; padding: 4px; background: #fff; border: 1px solid #e4e0d8; border-radius: 999px; margin-bottom: 1.5rem; }
.res-switch a {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; text-decoration: none; color: #6b6960;
  padding: 7px 16px; border-radius: 999px; transition: background .15s, color .15s;
}
.res-switch a[aria-current="page"] { background: #1c1b18; color: #fff; }
.res-switch a .n { opacity: .6; margin-left: 4px; }

/* ── Grouped post grid (blog index) ── */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.75rem; }
.chip-row a {
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: #4a473e; text-decoration: none;
  background: #fff; border: 1px solid #e4e0d8; padding: 6px 12px; border-radius: 999px; transition: border-color .15s, color .15s;
}
.chip-row a:hover { border-color: #2d6a4f; color: #2d6a4f; }
.post-section { margin: 0 0 2.5rem; scroll-margin-top: 72px; }
.post-section > h2 {
  font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 24px; margin: 0 0 .35rem; letter-spacing: -.01em;
}
.post-section > p.sec-dek { font-size: 14.5px; color: #6b6960; margin: 0 0 1rem; line-height: 1.6; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.post-grid .post-row { margin: 0; height: 100%; display: flex; flex-direction: column; }
.post-grid .post-row .t { font-size: 18px; }
.post-grid .post-row .cat { align-self: flex-start; }
.post-grid .post-row .meta { margin-top: auto; }
.post-row { transition: border-color .2s, box-shadow .2s var(--ease-out), transform .2s var(--ease-out); }
.post-row:hover { transform: translateY(-2px); }

/* ── Footer ── */
.sf { background: var(--sf-bg); color: var(--sf-text); margin-top: 4rem; font-family: 'Source Serif 4', Georgia, serif; text-align: left; }
.sf-inner { max-width: 1080px; margin: 0 auto; padding: 48px 20px 24px; }
.sf-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.sf-brand .brand-name { font-family: 'DM Serif Display', serif; font-size: 20px; color: #fff; display: block; }
.sf-brand .brand-by { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--sf-accent); display: block; margin: 4px 0 12px; }
.sf-brand p { font-size: 14px; line-height: 1.65; margin: 0 0 12px; color: var(--sf-text); max-width: 34ch; }
.sf-brand a.sf-mail { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.3); font-size: 14px; }
.sf-brand a.sf-mail:hover { border-bottom-color: #fff; }
.sf h4 {
  font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--sf-head); margin: 4px 0 14px;
}
.sf ul { list-style: none; padding: 0; margin: 0; }
.sf li { margin: 0 0 10px; }
.sf li a, .sf li button {
  color: var(--sf-text); text-decoration: none; font-size: 14px; background: none; border: 0; padding: 0; cursor: pointer;
  font-family: inherit; text-align: left; transition: color .15s;
}
.sf li a:hover, .sf li button:hover { color: #fff; }
.sf .sf-news { margin: 18px 0 0; max-width: 340px; }
.sf .sf-news .newsletter-row button { padding: 10px 18px; min-height: 40px; }
.sf-news .newsletter-label { color: var(--sf-head); text-align: left; }
.sf-news input { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.18) !important; color: #fff !important; }
.sf-news input::placeholder { color: rgba(255,255,255,.4); }
.sf-news #newsletter-msg { text-align: left; }
.sf-bottom {
  border-top: 1px solid var(--sf-line); margin-top: 36px; padding-top: 18px;
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: flex-start;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; line-height: 1.6; color: rgba(255,255,255,.42);
}
.sf-bottom p { margin: 0; max-width: 70ch; }
@media (max-width: 900px) { .sf-grid { grid-template-columns: repeat(2, 1fr); } .sf-brand { grid-column: 1 / -1; } }
@media (max-width: 380px) { .sf-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; } }

/* ── Cookie notice ── */
.cc {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; max-width: 560px; margin: 0 auto;
  background: #262521; color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3); font: 14px/1.55 'Source Serif 4', Georgia, serif;
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  transform: translateY(20px); opacity: 0; transition: transform .35s var(--ease-out), opacity .35s var(--ease-out);
}
.cc.show { transform: none; opacity: 1; }
.cc p { margin: 0 !important; flex: 1 1 280px; color: rgba(255,255,255,.86) !important; font-size: 14px !important; line-height: 1.55 !important; max-width: none !important; }
.cc a { color: #fff !important; }
.cc .cc-btns { display: flex; gap: 8px; margin-left: auto; }
.cc button {
  font: 600 13px 'Source Serif 4', Georgia, serif; border-radius: 999px; padding: 8px 16px; cursor: pointer; border: 1px solid rgba(255,255,255,.25);
  background: transparent; color: #fff; transition: background .15s, transform .15s var(--ease-out);
}
.cc button.primary { background: #2d6a4f; border-color: #2d6a4f; }
.cc button:hover { background: rgba(255,255,255,.1); }
.cc button.primary:hover { background: #40916c; }
.cc button:active { transform: scale(.97); }

/* ── Motion ── */
.js-ready .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js-ready .reveal.in { opacity: 1; transform: none; }
button:active:not(:disabled), .btn:active, .btn-dl:active, .nav-cta:active { transform: scale(.98); }

/* Visible keyboard focus everywhere (mouse clicks don't show it). */
:focus-visible { outline: 2px solid #40916c; outline-offset: 2px; border-radius: 4px; }

/* Respect "reduce motion" — no fades, slides, or staggered cards. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js-ready .reveal { opacity: 1; transform: none; }
}

/* Comfortable tap targets on touch screens. */
@media (pointer: coarse) {
  .sf li a, .sf li button { display: inline-block; padding: 4px 0; }
}
