/* crash-gaming.xyz — dashboard template. Change only this :root block to restyle. */
:root {
  --primary: #ef4444;
  --accent: #22c55e;
  --bg: #0b0b10;
  --surface: #1b1b20;
  --surface-2: #27272b;
  --text: #f4f4f5;
  --muted: #9b9b9e;
  --border: #3a3a3e;
  --link: #22c55e;
  --font-head: "Exo 2", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font-body); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }

.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

/* Sidebar */
.side { background: var(--surface); border-right: 1px solid var(--border); padding: 24px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo img { height: 32px; width: auto; margin: 0 6px 28px; }
.side-label { font: 700 11px/1 var(--font-head); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 22px 8px 10px; }
.side-nav { list-style: none; margin: 0; padding: 0; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-weight: 600; font-size: 15px; }
.side-nav a::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--primary); opacity: .7; }
.side-nav a:hover { background: var(--surface-2); text-decoration: none; }
.side-foot { margin-top: 28px; font-size: 13px; color: var(--muted); padding: 0 8px; }

/* Main column */
.main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 32px; border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.crumbs { color: var(--muted); font-size: 14px; }
.crumbs a { color: var(--muted); }
.pill { background: var(--primary); color: #fff; font: 700 12px/1 var(--font-head); padding: 7px 12px; border-radius: 999px; letter-spacing: .06em; text-transform: uppercase; }
.content { padding: 32px; max-width: 1080px; }

/* Home */
.intro h1 { font-size: clamp(34px, 5vw, 52px); text-transform: uppercase; }
.intro p { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 0 28px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 36px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--primary); border-radius: 10px; padding: 16px 18px; }
.tile:nth-child(even) { border-top-color: var(--accent); }
.tile b { display: block; font: 700 22px/1.2 var(--font-head); }
.tile span { color: var(--muted); font-size: 13px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 28px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 20px; margin: 0; text-transform: uppercase; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 110px 1fr auto; gap: 16px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.rows li:last-child { border-bottom: 0; }
.rows .tag { font: 700 12px/1 var(--font-head); text-transform: uppercase; color: var(--link); letter-spacing: .06em; }
.rows a { color: var(--text); font-weight: 600; }
.rows .when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.empty { padding: 26px 20px; color: var(--muted); text-align: center; }

/* Article & pages */
.doc-head { margin-bottom: 26px; max-width: 760px; }
.doc-head h1 { font-size: clamp(30px, 4.5vw, 44px); }
.doc-head .dek { color: var(--muted); font-size: 18px; margin: 0 0 12px; }
.meta { color: var(--muted); font-size: 14px; }
.doc { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: start; }
.doc.single { grid-template-columns: minmax(0, 760px); }
.prose h2 { font-size: 26px; margin-top: 1.6em; text-transform: uppercase; }
.prose h3 { font-size: 20px; margin-top: 1.4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15em; }
.prose li { margin-bottom: .35em; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--border); border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.prose th { background: var(--surface-2); font-family: var(--font-head); text-transform: uppercase; font-size: 13px; letter-spacing: .05em; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.prose tr:last-child td { border-bottom: 0; }
.facts { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; position: sticky; top: 84px; }
.facts h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts ul { margin: 0; padding-left: 18px; }
.facts li { margin-bottom: 8px; }

.foot { border-top: 1px solid var(--border); padding: 24px 32px 40px; color: var(--muted); font-size: 13px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.foot a { color: var(--muted); }

@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .facts { position: static; }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .side .logo img { margin: 0 0 12px; }
  .side-label, .side-foot { display: none; }
  .side-nav { display: flex; gap: 6px; overflow-x: auto; }
  .side-nav a { white-space: nowrap; }
  .topbar { position: static; padding: 12px 16px; }
  .content { padding: 22px 16px; }
  .rows li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .foot { padding: 20px 16px 32px; }
}

/* White text on the red pill needs a slightly darker red */
.pill { background: #dc2626; }

/* Long words and URLs wrap instead of widening the page on phones */
h1, h2, h3, p, li, td, th, dd, blockquote { overflow-wrap: break-word; }

/* ===== SITE IDENTITY: Crash Gaming — flight recorder ===== */
:root { --red: #ef4444; --green: #22c55e; --line: rgba(255, 255, 255, .08); }
body { background: radial-gradient(900px 480px at 85% -10%, rgba(239, 68, 68, .14), transparent 60%), var(--bg); }
h1, h2, h3 { font-weight: 800; letter-spacing: -.01em; }
.side { background: #111116; border-right-color: var(--line); }
.side-label { color: var(--red); }
.side-nav a { font-weight: 500; color: #d4d4d8; }
.side-nav a::before { width: 10px; height: 2px; border-radius: 1px; background: var(--green); opacity: 1; }
.side-nav a:hover { background: rgba(34, 197, 94, .1); color: #fff; }
.topbar { background: rgba(11, 11, 16, .85); backdrop-filter: blur(8px); border-bottom-color: var(--line); }
.pill { background: var(--red); white-space: nowrap; }

.cg-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 30px; align-items: center; margin: 4px 0 28px; }
.cg-eyebrow { font: 600 12.5px/1.4 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.cg-hero h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.04; margin: 12px 0 14px; text-transform: none; font-style: italic; }
.cg-hero p { color: #a1a1aa; font-size: 17.5px; margin: 0; }
.cg-chart { margin: 0; padding: 14px 14px 12px; border-radius: 16px; background: linear-gradient(180deg, #14141b, #0e0e13); border: 1px solid var(--line); box-shadow: 0 30px 60px -40px rgba(239, 68, 68, .6); }
.cg-chart svg { width: 100%; height: auto; overflow: visible; }
.cg-chart .grid line { stroke: rgba(255, 255, 255, .07); stroke-dasharray: 3 5; }
.cg-chart .axis { stroke: rgba(255, 255, 255, .25); }
.cg-chart .ticks text { font: 600 10px var(--font-body); fill: #71717a; text-anchor: end; }
.cg-chart .area { fill: url(#cg-fill); }
.cg-chart .curve { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 420; stroke-dashoffset: 0; animation: cg-draw 3.2s ease-out 1 both; }
.cg-chart .boom { fill: var(--red); stroke: rgba(239, 68, 68, .35); stroke-width: 10; animation: cg-boom 3.2s ease-out 1 both; }
.cg-chart .crash { font: italic 800 17px var(--font-head); fill: var(--red); text-anchor: end; animation: cg-boom 3.2s ease-out 1 both; }
@keyframes cg-draw { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
@keyframes cg-boom { 0%, 88% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cg-chart .curve, .cg-chart .boom, .cg-chart .crash { animation: none; } }
.cg-chart figcaption { margin-top: 8px; font-size: 13px; line-height: 1.5; color: #a1a1aa; }
.cg-chart figcaption b { color: #e4e4e7; }

.cg-tiles .tile { position: relative; border: 1px solid var(--line); border-top: 2px solid var(--red); background: #131318; border-radius: 12px; transition: transform .15s, border-color .15s; }
.cg-tiles .tile:nth-child(even) { border-top-color: var(--green); }
.cg-tiles .tile:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(255, 255, 255, .2); }
.cg-tiles i { display: block; font: italic 800 13px/1 var(--font-head); color: #71717a; margin-bottom: 10px; letter-spacing: .06em; }
.cg-tiles b { font-size: 19px; color: #fff; }
.cg-tiles + .tool-teaser { margin: -10px 0 28px; }

.panel { background: #121217; border-color: var(--line); border-radius: 14px; }
.panel-head { border-bottom-color: var(--line); }
.panel-head h2 { font-style: italic; letter-spacing: .02em; }
.rows li { border-bottom-color: var(--line); grid-template-columns: 170px 1fr auto; }
.rows li:hover { background: rgba(255, 255, 255, .03); }
.rows .tag { color: var(--green); }
.hub-panel .rows li { grid-template-columns: 1fr auto; }
.cg-rg { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px 18px; border-radius: 14px; border: 1px solid rgba(239, 68, 68, .4); background: rgba(239, 68, 68, .07); }
.cg-rg b { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--red); color: #fff; font: italic 800 17px/1 var(--font-head); }
.cg-rg p { margin: 0; color: #d4d4d8; font-size: 15px; }

.doc-head .cg-eyebrow { display: inline-block; margin-bottom: 12px; }
.doc-head h1 { text-transform: none; }
.prose h2 { text-transform: none; font-size: 25px; }
.prose h2::before { content: ""; display: inline-block; width: 18px; height: 3px; margin-right: 10px; vertical-align: middle; background: var(--red); border-radius: 2px; }
.prose h2#sources::before { background: var(--green); }
.prose th { background: rgba(34, 197, 94, .12); color: #dcfce7; text-transform: none; letter-spacing: .02em; }
.prose td { font-variant-numeric: tabular-nums; }
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; background: rgba(255, 255, 255, .08); padding: 2px 6px; border-radius: 5px; word-break: break-all; }
.prose .cg-idea, .prose .cg-example, .prose .cg-warn { border-radius: 12px; padding: 14px 18px; margin: 1.5em 0; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.prose .cg-idea { border-left: 3px solid var(--green); }
.prose .cg-example { border-left: 3px solid #a1a1aa; }
.prose .cg-warn { border-left: 3px solid var(--red); background: rgba(239, 68, 68, .07); }
.prose .cg-idea p:last-child, .prose .cg-example p:last-child, .prose .cg-warn p:last-child { margin-bottom: 0; }
.prose .note { font-size: 14px; color: var(--muted); }
.prose ul.cg-takeaways { list-style: none; padding: 0; }
.prose ul.cg-takeaways li { position: relative; padding-left: 26px; }
.prose ul.cg-takeaways li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.facts { background: #121217; border-color: rgba(34, 197, 94, .35); }
.facts h3 { color: var(--green); }
.facts li::marker { color: var(--red); }
.sources { font-size: 15px; }
.cg-note { font-size: 14px; color: var(--muted); }
.foot { border-top-color: var(--line); }

@media (max-width: 1000px) { .cg-hero { grid-template-columns: minmax(0, 1fr); } .cg-chart { max-width: 520px; } }
@media (max-width: 800px) {
  .side-nav { flex-wrap: wrap; gap: 4px; overflow: visible; }
  .side-nav a { padding: 5px 10px; font-size: 14px; background: rgba(255, 255, 255, .04); }
  .rows li { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) { .tiles { grid-template-columns: minmax(0, 1fr); gap: 10px; } .cg-rg { grid-template-columns: minmax(0, 1fr); } }

/* layout: a top bar instead of the sidebar */
.shell { grid-template-columns: minmax(0, 1fr); }
.side { position: sticky; top: 0; z-index: 6; height: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 26px; padding: 12px max(24px, calc((100vw - 1180px) / 2 + 24px)); border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; background: rgba(11, 11, 16, .93); backdrop-filter: blur(10px); }
.side .logo img { margin: 0; }
.side-label, .side-foot { display: none; }
.side-nav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.side-nav a { padding: 7px 11px; font-size: 14px; border-radius: 999px; }
.side-nav a::before { display: none; }
.topbar { position: static; padding: 12px max(24px, calc((100vw - 1180px) / 2 + 24px)); background: transparent; }
.content { max-width: 1180px; margin: 0 auto; padding: 28px 24px; }
.foot { max-width: 1180px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 800px) {
  .side { padding: 12px 16px; }
  .side-nav { margin-left: 0; width: 100%; }
  .side-nav a { background: rgba(255, 255, 255, .04); }
  .topbar { padding: 10px 16px; }
  .content { padding: 22px 16px; }
}

/* ===== TOOLS + READ NEXT (shared, uses the site's colours) ===== */
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; margin: 1.2em 0 1.6em; }
.tool-h { font-size: 17px; margin: 4px 0 12px; }
.tool-h ~ .tool-h { margin-top: 20px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.tool-grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tool label, .tool legend { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); font-family: var(--font-body); }
.tool input, .tool textarea { font: 400 16px/1.4 var(--font-body); color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0; }
.tool textarea { resize: vertical; }
.tool select { font: 400 16px/1.4 var(--font-body); color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; width: 100%; }
.tool input:focus, .tool textarea:focus { outline: 2px solid var(--link); outline-offset: 1px; }
.tool input.bad, .tool textarea.bad { border-color: #dc2626; background: #fef2f2; color: #7f1d1d; }
.tool fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 14px; margin: 0; min-width: 0; }
.tool legend { padding: 0 6px; color: var(--text); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tool button { font: 600 15px/1 var(--font-body); border: 0; border-radius: 8px; padding: 11px 16px; background: var(--primary); color: #fff; cursor: pointer; }
.tool button.secondary { background: transparent; color: var(--link); box-shadow: inset 0 0 0 1.5px var(--link); }
.tool-result { margin-top: 16px; }
.tool-result .table-wrap { margin-bottom: 0; }
.tool-big { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0 0 14px; }
.tool-big > div { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.tool-big b { display: block; font: 700 26px/1.15 var(--font-head); color: var(--text); font-variant-numeric: tabular-nums; }
.tool-big span { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); }
.tool-big .up { color: #b91c1c; } .tool-big .down { color: #047857; }
.tool-note { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.tool-verdict { font-weight: 600; margin: 0 0 12px; }
.tool .bar { display: block; height: 6px; margin-top: 4px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.tool .bar i { display: block; height: 100%; background: var(--primary); }
.tool td b { color: var(--text); }
.sg-matches { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 16px; }
.sg-match { display: grid; grid-template-columns: 1fr 52px 14px 52px 1fr; align-items: center; gap: 6px; font-size: 14px; }
.sg-match span:first-child { text-align: right; }
.sg-match input { text-align: center; padding: 8px 4px; }
.sg-match em { text-align: center; color: var(--muted); font-style: normal; }
.sg-table td:last-child { font-weight: 600; white-space: nowrap; }
.cp-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.cp-teams fieldset .tool-grid { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }

.tool-teaser { display: flex; align-items: center; gap: 16px; margin: 20px 0 6px; padding: 16px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.tool-teaser:hover { border-color: var(--link); text-decoration: none; }
.tool-teaser .ico { flex: none; width: 46px; height: 46px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font: 700 17px/1 var(--font-head); }
.tool-teaser b { display: block; font-family: var(--font-head); font-size: 19px; line-height: 1.25; }
.tool-teaser .t { display: block; color: var(--muted); font-size: 15px; line-height: 1.45; }
.tool-teaser::after { content: "→"; margin-left: auto; padding-left: 8px; color: var(--link); font-size: 22px; }
@media (max-width: 480px) {
  .tool-teaser { gap: 12px; padding: 14px 16px; align-items: flex-start; }
  .tool-teaser::after { display: none; }
  .tool-teaser .ico { width: 40px; height: 40px; font-size: 15px; }
  .tool-teaser b { font-size: 17px; }
}

.related { margin: 40px 0 8px; padding-top: 22px; border-top: 2px solid var(--border); }
.prose .related-h { font-size: 20px; margin: 0 0 8px; padding: 0; border: 0; text-transform: none; }
.prose .related-h::before, .prose .related-h::after { content: none; }
.related-list { list-style: none; padding: 0; margin: 0 0 18px; }
.related-list li { padding: 9px 0; border-bottom: 1px dashed var(--border); line-height: 1.4; }
.related-list a { font-weight: 600; }
.related-list span { color: var(--muted); font-size: 14px; }
.tool-cta { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); color: var(--text); text-decoration: none; }
.tool-cta:hover { text-decoration: none; border-color: var(--link); }
.tool-cta b { font-family: var(--font-head); font-size: 18px; }
.tool-cta b::after { content: " →"; color: var(--link); }
.tool-cta span { color: var(--muted); font-size: 15px; }

/* breadcrumbs + section pages */
.trail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 26px 0 -4px; font-size: 14px; color: var(--muted); font-family: var(--font-body); }
.trail a { color: var(--muted); text-decoration: none; }
.trail a:hover { color: var(--link); text-decoration: underline; }
.trail .sep { opacity: .55; }
.trail + .article-head, .trail + .page-head, .trail + .post-head, .trail + .entry-head { padding-top: 22px; }
.trail + .doc-title { margin-top: 18px; }
.prose:has(+ .hub-body) { padding-bottom: 0; }
.hub-body { margin: 6px 0 56px; }
.hub-h { font-size: 22px; margin: 30px 0 14px; }
.hub-empty { color: var(--muted); font-style: italic; padding: 10px 0; }
.hub-body .tool-cta { margin-top: 26px; }
.prose figure.chart { margin: 1.7em 0; }
.prose figure.chart img { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; border-radius: 10px; border: 1px solid var(--border); }
.prose figure.chart figcaption { max-width: 560px; margin: 8px auto 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
