/* spin-stats.space — classic template. Change only this :root block to restyle. */
:root {
  --primary: #db2777;
  --accent: #fbbf24;
  --bg: #1a0b16;
  --surface: #2a1a25;
  --surface-2: #352531;
  --text: #fbe7f3;
  --muted: #a6939f;
  --border: #473742;
  --link: #fbbf24;
  --font-head: "Righteous", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16.5px/1.7 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.25; margin: 0 0 .5em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.banner { background: var(--primary); color: #fff; }
.banner .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 22px; padding-bottom: 22px; }
.banner .logo { background: #fff; border-radius: 10px; padding: 8px 14px; }
.banner .logo img { height: 30px; width: auto; }
.banner .tagline { font-size: 15px; opacity: .9; text-align: right; max-width: 380px; }
.menu { background: var(--surface); border-bottom: 1px solid var(--border); }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; }
.menu a { display: block; padding: 13px 16px; color: var(--text); font: 600 15px var(--font-head); white-space: nowrap; border-bottom: 3px solid transparent; }
.menu a:hover { border-bottom-color: var(--accent); text-decoration: none; }

.body-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding-top: 36px; padding-bottom: 56px; }

.welcome { border-bottom: 2px solid var(--border); padding-bottom: 22px; margin-bottom: 26px; }
.welcome h1 { font-size: clamp(28px, 4vw, 38px); }
.welcome p { margin: 0; color: var(--muted); font-size: 18px; }

.post { display: grid; grid-template-columns: 180px 1fr; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.post .img { aspect-ratio: 4 / 3; border-radius: 8px; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.post .cat { font: 700 12px/1 var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--link); }
.post h2 { font-size: 22px; margin: 6px 0; }
.post h2 a { color: var(--text); }
.post p { margin: 0 0 8px; color: var(--muted); font-size: 15.5px; }
.post .more { font-weight: 600; font-size: 14px; }
.empty { color: var(--muted); padding: 18px 0; }
.block-title { font-size: 21px; margin: 34px 0 6px; padding-left: 12px; border-left: 4px solid var(--primary); }

.widget { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px 22px; margin-bottom: 22px; }
.widget h3 { font-size: 16px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.widget p { margin: 0; color: var(--muted); font-size: 15px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 7px 0; border-bottom: 1px dotted var(--border); font-size: 15px; }
.widget li:last-child { border-bottom: 0; }

.entry-head h1 { font-size: clamp(30px, 4.5vw, 42px); }
.entry-head .dek { color: var(--muted); font-size: 19px; margin: 0 0 10px; }
.meta { color: var(--muted); font-size: 14px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.prose h2 { font-size: 25px; margin-top: 1.7em; }
.prose h3 { font-size: 20px; margin-top: 1.4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15em; }
.prose pre { background: var(--surface-2); padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.prose pre code { background: none; padding: 0; }
.prose .box { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: 8px; padding: 16px 20px; margin: 1.5em 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th { background: var(--primary); color: #fff; font-family: var(--font-head); }
.prose th, .prose td { text-align: left; padding: 9px 12px; border: 1px solid var(--border); }

.site-foot { background: var(--surface); border-top: 3px solid var(--primary); color: var(--muted); font-size: 14px; }
.site-foot .container { padding-top: 26px; padding-bottom: 36px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.site-foot a { color: var(--muted); }

@media (max-width: 900px) {
  .body-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .banner .container { flex-direction: column; align-items: flex-start; }
  .banner .tagline { text-align: left; }
  .post { grid-template-columns: minmax(0, 1fr); }
  .post .img { aspect-ratio: 16 / 7; }
}

/* Righteous has a single weight: keep headings at 400 */
h1, h2, h3, .menu a, .post .cat, .widget h3, .prose th { font-weight: 400; }

/* 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: Spin Stats — neon reels ===== */
:root { --pink: #f472b6; --amber: #fbbf24; --glow: rgba(219, 39, 119, .55); --line: rgba(251, 231, 243, .1); }
body { min-height: 100vh; background: radial-gradient(1000px 520px at 50% -220px, rgba(219, 39, 119, .24), transparent 70%), var(--bg); }
.tool-teaser b, .tool-cta b, .tool-big b, .prose .related-h { font-weight: 400; }
.ss-hero + .tool-teaser { margin: 0 0 16px; }
.banner { background: linear-gradient(90deg, #1a0b16, #2c0f24 55%, #1a0b16); border-bottom: 1px solid rgba(219, 39, 119, .45); box-shadow: 0 12px 40px -24px var(--glow); }
.banner .logo { background: transparent; padding: 0; }
.banner .tagline { color: #f9a8d4; opacity: 1; }
.menu { background: #1f0d1a; border-bottom-color: var(--line); }
.menu a { font: 600 14.5px var(--font-body); color: #f5d0e6; border-bottom-width: 2px; }
.menu a:hover { color: #fff; border-bottom-color: var(--primary); text-shadow: 0 0 12px rgba(219, 39, 119, .9); }
@media (max-width: 600px) {
  .menu ul { flex-wrap: wrap; gap: 0 2px; overflow: visible; }
  .menu a { padding: 9px 10px; font-size: 13.5px; }
}

.ss-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: center; border-bottom: 0; }
.ss-kicker { display: inline-block; font: 600 12px/1.3 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 12px; }
.ss-hero h1 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.12; color: #fff; text-shadow: 0 0 26px rgba(219, 39, 119, .55); }
.ss-machine { margin: 0; padding: 14px 14px 12px; border-radius: 22px; background: linear-gradient(180deg, #3b1030, #22091c); border: 2px solid var(--amber); box-shadow: 0 0 0 4px rgba(251, 191, 36, .12), 0 0 44px -8px var(--glow), inset 0 0 30px rgba(0, 0, 0, .5); }
.ss-lights { display: flex; justify-content: space-between; padding: 0 8px 10px; }
.ss-lights i { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: ss-bulb 1.6s infinite; }
.ss-lights i:nth-child(even) { background: var(--pink); box-shadow: 0 0 8px var(--pink); animation-delay: .8s; }
@keyframes ss-bulb { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .ss-lights i { animation: none; } }
.ss-reels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ss-reel { text-align: center; padding: 18px 6px 12px; border-radius: 12px; background: linear-gradient(180deg, #d9cfd5 0%, #fff 20%, #fff 80%, #d9cfd5 100%); box-shadow: inset 0 6px 10px rgba(0, 0, 0, .22), inset 0 -6px 10px rgba(0, 0, 0, .22); }
.ss-reel b { display: block; font: 400 clamp(19px, 2.4vw, 27px)/1.1 var(--font-head); color: #9d174d; white-space: nowrap; }
.ss-reel span { display: block; margin-top: 6px; font: 600 10.5px/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: #6b4a5e; }
.ss-machine figcaption { margin-top: 10px; font-size: 12.5px; color: #d6b8ca; text-align: center; }
.ss-sections { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 6px 0 8px; }
.ss-sections a { display: block; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.ss-sections a:hover { border-color: var(--primary); box-shadow: 0 0 26px -6px var(--glow); text-decoration: none; }
.ss-sections i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; margin-bottom: 10px; font: 400 18px/1 var(--font-head); font-style: normal; color: #1a0b16; background: radial-gradient(circle at 35% 30%, #fde68a, var(--amber) 60%, #b45309); box-shadow: 0 0 0 3px rgba(251, 191, 36, .2); }
.ss-sections b { display: block; font: 400 18px/1.2 var(--font-head); color: #fff; }
.ss-sections span { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.block-title { border-left-color: var(--primary); color: #fff; }
.post { border-bottom-color: var(--line); }
.post .img { display: flex; align-items: flex-end; padding: 10px 12px; border-radius: 12px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 33.333%), linear-gradient(135deg, #831843, #db2777 55%, #f59e0b); }
.post .img span { font: 400 15px/1.2 var(--font-head); color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.post .cat { color: var(--amber); font-family: var(--font-body); font-weight: 600; }
.post h2 a { color: #fff; }
.widget { background: var(--surface); border-color: var(--line); border-radius: 14px; }
.widget h3 { color: #fff; border-bottom-color: var(--primary); }
.widget li { border-bottom-color: var(--line); }
.widget:last-child { border-color: rgba(251, 191, 36, .45); }
.ss-rg { color: var(--muted); font-size: 14.5px; margin-top: 22px; }
.site-foot { background: #140810; border-top: 2px solid var(--primary); }
.hub-posts { margin-top: 4px; }

.entry-head .ss-kicker { margin-bottom: 10px; }
.entry-head h1 { color: #fff; }
.meta { border-bottom-color: var(--line); }
.prose h2 { color: #fff; }
.prose h2::after { content: ""; display: block; width: 48px; height: 3px; margin-top: 8px; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--amber)); }
.prose th { background: #831843; }
.prose th, .prose td { border-color: var(--line); }
.prose td { font-variant-numeric: tabular-nums; }
.prose tr:nth-child(even) td { background: rgba(255, 255, 255, .025); }
.prose .box { border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 12px; }
.prose .ss-example, .prose .ss-warn { border-radius: 12px; padding: 16px 20px; margin: 1.5em 0; background: var(--surface); border: 1px solid var(--line); }
.prose .ss-example { border-left: 4px solid var(--pink); }
.prose .ss-warn { border-left: 4px solid #f87171; background: rgba(248, 113, 113, .07); }
.prose .box p:last-child, .prose .ss-example p:last-child, .prose .ss-warn p:last-child { margin-bottom: 0; }
.prose .box > p > strong:first-child { color: var(--amber); }
.prose .ss-example > p > strong:first-child { color: var(--pink); }
.prose .ss-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 1.4em 0; }
.prose .ss-stats div { padding: 14px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.prose .ss-stats b { display: block; font: 400 30px/1.1 var(--font-head); color: var(--amber); }
.prose .ss-stats span { font-size: 13.5px; color: var(--muted); }
.prose ul.ss-takeaways { list-style: none; padding: 0; }
.prose ul.ss-takeaways li { position: relative; padding-left: 28px; }
.prose ul.ss-takeaways li::before { content: "★"; position: absolute; left: 0; color: var(--amber); }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--pink); color: #f5d0e6; font-size: 19px; }
.prose .ss-note, .ss-note { font-size: 14px; color: var(--muted); }
.sources { font-size: 15px; }

@media (max-width: 900px) {
  .ss-hero { grid-template-columns: minmax(0, 1fr); }
  .ss-machine { max-width: 420px; }
  .ss-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== 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); }
