/* TF3 Guide — wiki theme (migrated from tf3guide.site, palette matched to old globals.css) */
:root {
  --bg: hsl(210 20% 98%);
  --card: hsl(0 0% 100%);
  --fg: hsl(213 30% 15%);
  --muted: hsl(212 18% 94%);
  --muted-fg: hsl(215 12% 40%);
  --border: hsl(213 16% 88%);
  --primary: hsl(208 78% 58%);
  --signal: hsl(32 92% 54%);
  --signal-dark: hsl(28 85% 40%);
  --dark: hsl(214 25% 8%);
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: hsl(214 25% 8%);
    --card: hsl(213 22% 11%);
    --fg: hsl(210 20% 96%);
    --muted: hsl(213 18% 17%);
    --muted-fg: hsl(213 12% 66%);
    --border: hsl(213 16% 20%);
    --primary: hsl(211 72% 46%);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h2 { font-size: 1.9rem; margin: 0 0 .6rem; }
h3 { font-size: 1.25rem; margin: 0 0 .5rem; }
.shell { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; color: var(--signal-dark); }
.brand svg { color: var(--signal); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .92rem; font-weight: 500; }
.site-nav a { color: var(--muted-fg); }
.site-nav a:hover { color: var(--fg); text-decoration: none; }
@media (max-width: 860px) { .site-nav { display: none; } }

.site-main { min-height: 60vh; }

/* hero */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--dark); color: #fff; }
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, hsl(214 25% 8% / .75), hsl(214 25% 8% / .6), hsl(214 25% 8% / .9)); }
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 56px 16px 64px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: hsl(32 92% 54% / .15); color: var(--signal);
  border: 1px solid hsl(32 92% 54% / .4); border-radius: 999px;
  padding: 6px 16px; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
}
.hero-title { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; margin: 20px auto 0; max-width: 900px; }
.hero-accent { color: var(--signal); }
.hero-desc { max-width: 640px; margin: 20px auto 0; color: hsl(0 0% 100% / .85); font-size: 1.05rem; }
.trailer { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 26px; color: #fff; }
.trailer:hover { text-decoration: none; }
.trailer-thumbwrap { position: relative; display: block; max-width: 560px; border-radius: var(--radius); overflow: hidden; border: 1px solid hsl(0 0% 100% / .2); }
.trailer-thumbwrap img { display: block; }
.trailer-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; color: #fff; background: hsl(214 25% 8% / .35); transition: background .2s;
}
.trailer:hover .trailer-play { background: hsl(214 25% 8% / .15); }
.trailer-meta { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; }
.trailer-label { font-weight: 600; color: #fff; }
.trailer-source { color: hsl(0 0% 100% / .6); font-size: .78rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.btn { display: inline-block; border-radius: 10px; padding: 12px 24px; font-size: .92rem; font-weight: 600; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--signal); color: #fff; box-shadow: 0 8px 20px hsl(32 92% 30% / .35); }
.btn-primary:hover { background: var(--signal-dark); }
.btn-ghost { background: hsl(0 0% 100% / .1); color: #fff; border: 1px solid hsl(0 0% 100% / .3); }
.btn-ghost:hover { background: hsl(0 0% 100% / .2); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 24px; }
.stat-chip {
  background: hsl(0 0% 100% / .1); border: 1px solid hsl(0 0% 100% / .2);
  border-radius: 999px; padding: 6px 14px; font-size: .85rem; color: hsl(0 0% 100% / .9);
}
.hero-fan { max-width: 640px; margin: 26px auto 0; font-size: .92rem; color: hsl(0 0% 100% / .75); text-align: left; display: flex; gap: 8px; }
.hero-sources { max-width: 760px; margin: 18px auto 0; display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: center; font-size: .88rem; color: hsl(0 0% 100% / .7); }
.hero-sources a { color: hsl(0 0% 100% / .7); text-decoration: underline; text-underline-offset: 3px; }
.hero-sources a:hover { color: #fff; }
.hero-sources-label { font-weight: 600; color: hsl(0 0% 100% / .85); }
.hero-disclaimer { max-width: 760px; margin: 22px auto 0; font-size: .78rem; line-height: 1.55; color: hsl(0 0% 100% / .45); }

/* home body */
.home-body { padding: 56px 16px 8px; display: block; }
.home-section { margin-bottom: 72px; }
.section-label {
  margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--signal-dark);
}
.split-2 { display: grid; gap: 36px; grid-template-columns: 1.1fr 1fr; align-items: start; }
@media (max-width: 960px) { .split-2 { grid-template-columns: 1fr; } }
.section-lead { color: var(--muted-fg); max-width: 700px; }
.section-lead.center { text-align: center; margin-left: auto; margin-right: auto; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); margin-top: 20px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 480px; text-align: left; }
th { background: var(--muted); padding: 12px 16px; font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--muted-fg); }
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { color: var(--fg); font-weight: 500; }
.code-cell { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; font-size: .84rem; }
.inline-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 16px; font-size: .9rem; align-items: center; }
.inline-links-label { font-weight: 600; color: color-mix(in srgb, var(--fg) 80%, transparent); }
.inline-links a { font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.updates-card { padding: 24px; }
.timeline { list-style: none; margin: 18px 0 0; padding: 0 0 0 22px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 20px; }
.timeline li { position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -30px; top: 4px; width: 12px; height: 12px;
  border-radius: 999px; background: var(--signal); border: 2px solid var(--bg);
}
.tag {
  display: inline-block; border-radius: 999px; padding: 2px 8px;
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
}
.tag-milestone { background: var(--signal); color: #fff; }
.tag-major { background: hsl(0 65% 51%); color: #fff; }
.tag-minor { background: var(--muted); color: var(--muted-fg); }
.timeline-link { display: block; margin-top: 6px; font-size: .92rem; font-weight: 500; color: var(--fg); line-height: 1.4; }
.timeline-date { display: block; margin-top: 4px; font-size: .78rem; color: var(--muted-fg); }
.text-link { display: inline-block; margin-top: 20px; font-size: .9rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* cards */
.card-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); margin-top: 24px; }
@media (max-width: 1020px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.link-card { display: flex; flex-direction: column; color: var(--fg); transition: transform .2s, border-color .2s, box-shadow .2s; }
.link-card:hover { text-decoration: none; transform: translateY(-2px); border-color: color-mix(in srgb, var(--signal) 60%, var(--border)); box-shadow: 0 10px 24px hsl(214 25% 8% / .1); }
.card-strip { position: relative; display: block; height: 96px; overflow: hidden; flex-shrink: 0; }
.card-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-num {
  position: absolute; left: 16px; bottom: 8px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--signal); color: #fff; font-weight: 700; font-size: .85rem;
  box-shadow: 0 4px 12px hsl(214 25% 8% / .3);
}
.card-num.static { position: static; flex-shrink: 0; }
.card-icon {
  position: absolute; left: 16px; bottom: 8px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: color-mix(in srgb, var(--card) 95%, transparent);
  color: var(--signal-dark); border: 1px solid var(--border);
}
.card-body { display: flex; flex-direction: column; padding: 18px 18px 20px; }
.card-body h3, .card-body strong { margin: 0; font-size: 1rem; }
.card-desc { margin-top: 6px; font-size: .88rem; color: var(--muted-fg); line-height: 1.55; }
.loop-steps { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.loop-step { padding: 24px; }
.loop-head { display: flex; align-items: center; gap: 12px; }
.loop-head h3 { margin: 0; font-size: 1.2rem; }
.loop-para { margin: 12px 0 0; max-width: 820px; color: var(--muted-fg); }
.about-split { margin-top: 24px; }
.about-para { margin: 0 0 16px; color: var(--muted-fg); }
.about-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.img-credit { margin: 8px 0 0; font-size: .78rem; color: var(--muted-fg); }
.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.fact { padding: 14px 16px; }
.fact-label { display: block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-fg); }
.fact-value { display: block; margin-top: 4px; font-size: .92rem; line-height: 1.4; }

/* ad slot */
.ad-slot { max-width: 768px; margin: 0 auto 72px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.ad-label { margin: 0 0 8px; font-size: .64rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-fg); }

/* FAQ (home only; article FAQ renders in body prose) */
.faq-block { max-width: 768px; margin: 0 auto 72px; }
.faq-title { text-align: center; font-size: 2.1rem; }
.faq-list { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 14px 18px; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: .98rem; }
.faq-item p { margin: 10px 0 0; color: var(--muted-fg); font-size: .93rem; }

/* CTA banner */
.cta-banner { position: relative; isolation: isolate; overflow: hidden; border-radius: 16px; color: #fff; margin-bottom: 16px; }
.cta-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.cta-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, hsl(214 25% 8% / .8), hsl(214 25% 8% / .7), hsl(214 25% 8% / .85)); }
.cta-inner { padding: 64px 24px; text-align: center; }
.cta-inner h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0; }
.cta-inner p { max-width: 560px; margin: 16px auto 0; color: hsl(0 0% 100% / .85); }

/* article pages */
.article { padding: 28px 16px 64px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted-fg); margin-bottom: 22px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted-fg); }
.breadcrumb a:hover { color: var(--fg); }
.crumb-sep { color: color-mix(in srgb, var(--muted-fg) 60%, transparent); }
.crumb-here { color: var(--fg); }
.prose { max-width: 800px; margin: 0 auto; }
.legal .prose { max-width: 720px; }
.article-banner { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 24px; }
.article-title { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0; }
.article-meta { margin: 12px 0 0; font-size: .85rem; color: var(--muted-fg); }
.prose .ad-slot { margin: 36px auto; }
/* markdown body */
.prose h2 { font-size: 1.55rem; margin: 40px 0 14px; }
.prose h3 { font-size: 1.18rem; margin: 28px 0 10px; }
.prose p { margin: 14px 0; }
.prose ul, .prose ol { padding-left: 24px; margin: 14px 0; }
.prose li { margin: 6px 0; }
.prose blockquote { margin: 18px 0; padding: 12px 18px; border-left: 3px solid var(--signal); background: var(--muted); border-radius: 0 8px 8px 0; color: var(--muted-fg); }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; background: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.prose pre { background: var(--dark); color: hsl(210 20% 96%); border-radius: var(--radius); padding: 18px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose table { min-width: 0; }
.prose img { border-radius: var(--radius); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

/* 404 */
.nf { text-align: center; padding: 80px 0; }
.nf-code { font-size: 4rem; font-weight: 700; color: var(--signal); margin: 0; }
.nf-title { margin: 8px 0 0; }
.nf-desc { color: var(--muted-fg); max-width: 480px; margin: 14px auto 28px; }
.nf .hero-ctas { margin-top: 0; }

/* footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--border); background: var(--card); }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1.4fr repeat(4, 1fr); padding: 48px 16px 32px; }
@media (max-width: 1020px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { margin: 0; font-weight: 700; }
.footer-tagline { margin: 6px 0 12px; font-size: .85rem; color: var(--muted-fg); }
.footer-desc { margin: 0; font-size: .85rem; color: var(--muted-fg); line-height: 1.6; }
.footer-title { margin: 0 0 10px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--fg); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: .88rem; color: var(--muted-fg); }
.footer-col a:hover { color: var(--fg); }
.footer-base { border-top: 1px solid var(--border); padding: 18px 16px; }
.footer-base p { margin: 0; font-size: .8rem; color: var(--muted-fg); }

/* keyboard focus */
a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 4px;
}
