/* Chalk Line RP - site styles. Plain CSS, no build step. */
:root {
  --bg: #0c101c;
  --bg-2: #101627;
  --panel: #161d31;
  --panel-2: #1d2641;
  --border: #2b3556;
  --chalk: #f8f6f0;
  --muted: #b8bfd0;
  --orange: #E8743B;
  --orange-dark: #c95f2a;
  --ok: #5fdc8c;
  --warn: #f2c14e;
  --radius: 14px;
  --font-head: Impact, 'Bahnschrift', 'Arial Narrow Bold', sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--orange); text-underline-offset: 3px; }
a:hover { color: #ff9560; }
p { margin: 0 0 1em; }
code { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 0.05em 0.4em; font-size: 0.95em; word-break: break-all; }
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-synthesis-weight: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
h3 { font-size: 1.3rem; }
.h-small { font-size: 1.2rem; margin: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.plain-list { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--chalk); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--orange); color: #0c101c; padding: 10px 16px; font-weight: 700; z-index: 100; border-radius: 8px; }
.skip:focus { top: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 22px;
  background: var(--chalk); color: #0c101c;
  font-family: var(--font-head); font-weight: 700; font-synthesis-weight: none;
  letter-spacing: 0.04em; text-transform: uppercase; font-size: 1.05rem;
  border: 2px solid var(--chalk); border-radius: 999px; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: #fff; color: #0c101c; transform: translateY(-2px); }
.btn-primary { background: var(--orange); border-color: var(--orange); }
.btn-primary:hover { background: #ff8a53; border-color: #ff8a53; }
.btn-ghost { background: transparent; color: var(--chalk); border-color: var(--chalk); }
.btn-ghost:hover { background: var(--chalk); color: #0c101c; }
.btn-small { min-height: 40px; padding: 6px 16px; font-size: 0.95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.2em; }
.center-row { justify-content: center; }

/* ---------- header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(12, 16, 28, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--chalk); text-decoration: none; font-family: var(--font-head); font-size: 1.35rem; letter-spacing: 0.04em; text-transform: uppercase; }
.brand img { border-radius: 8px; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a:not(.btn) { color: var(--chalk); text-decoration: none; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.site-nav a:not(.btn):hover { background: var(--panel-2); }
.site-nav a[aria-current="page"] { color: var(--orange); box-shadow: inset 0 -3px 0 var(--orange); border-radius: 8px 8px 0 0; }
.nav-toggle { display: none; min-height: 44px; padding: 8px 16px; background: transparent; color: var(--chalk); border: 2px solid var(--chalk); border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 760px) {
  .js .nav-toggle { display: inline-flex; align-items: center; }
  .js .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .js .site-nav.open { display: flex; }
  .js .site-nav a:not(.btn) { padding: 12px; }
  .js .site-nav .btn { margin-top: 6px; }
  .site-nav { width: 100%; }
}

/* ---------- chalk line divider (white line over an orange line) ---------- */
.chalk-divider { position: relative; height: 46px; overflow: hidden; }
.chalk-divider::before, .chalk-divider::after { content: ""; position: absolute; left: -5%; width: 110%; transform: rotate(-1.4deg); transform-origin: center; }
.chalk-divider::before { top: 24px; height: 9px; background: var(--orange); }
.chalk-divider::after { top: 15px; height: 4px; background: var(--chalk); opacity: 0.92; border-radius: 2px; }

/* ---------- hero ---------- */
.hero-banner { background: #0a0d17; }
.hero-banner img { display: block; width: 100%; max-height: 520px; aspect-ratio: 1920 / 520; object-fit: cover; object-position: center; }
@media (max-width: 700px) { .hero-banner img { aspect-ratio: 16 / 7; } }
.hero-text { padding-top: 36px; padding-bottom: 28px; }
.eyebrow { color: var(--orange); font-family: var(--font-head); letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 0.6em; font-size: 1rem; }
.lead { font-size: 1.2rem; max-width: 46em; color: var(--chalk); }

.page-head { padding: 44px 0 8px; background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.page-head .lead { color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: 52px 0; }
.section-alt { background: var(--bg-2); }
.section-lead { color: var(--muted); font-size: 1.1rem; max-width: 46em; }
.center .section-lead { margin-left: auto; margin-right: auto; }
.cta { padding: 56px 0 64px; background: linear-gradient(180deg, var(--bg), #181224); }

/* ---------- status strip ---------- */
.status-section { background: var(--bg-2); padding: 26px 0 30px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pill { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 4px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.pill .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.pill[data-state="live"] { border-color: var(--ok); }
.pill[data-state="live"] .dot { background: var(--ok); animation: pulse 2s ease-in-out infinite; }
.pill[data-state="demo"] { border-color: var(--warn); color: var(--warn); }
.pill[data-state="demo"] .dot { background: var(--warn); }
.pill[data-state="stale"] .dot { background: var(--warn); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(95, 220, 140, 0.5); } 50% { box-shadow: 0 0 0 7px rgba(95, 220, 140, 0); } }
.status-strip, .totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.totals { margin-top: 28px; }
.tile { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.tile-label { margin: 0; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.tile-value { margin: 4px 0 0; font-family: var(--font-head); font-size: 2.2rem; line-height: 1.1; letter-spacing: 0.02em; }
.status-note { margin: 14px 0 0; font-size: 0.95rem; }
.online-list { margin-top: 12px; }
.online-list summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.online-list ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 6px 16px; margin-top: 6px; }
.online-list li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--border); padding: 4px 0; }
.online-list .job { color: var(--muted); font-size: 0.9rem; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; margin: 28px 0; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px 8px; position: relative; overflow: hidden; }
.card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--orange); }
.card-num { font-family: var(--font-head); font-size: 2.4rem; color: var(--orange); margin: 0 0 0.1em; line-height: 1; }
.card h3 { margin-bottom: 0.4em; }

/* ---------- screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; margin-top: 24px; }
.shot { margin: 0; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.shot img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shot figcaption { padding: 10px 14px; font-family: var(--font-head); letter-spacing: 0.04em; text-transform: uppercase; }
.shot-wide { margin: 1.6em 0; }

/* ---------- steps ---------- */
.steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; counter-reset: step; }
.step { counter-increment: step; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; position: relative; }
.step::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--orange); color: #0c101c; font-family: var(--font-head); font-size: 1.6rem; margin-bottom: 12px; }

/* ---------- mini leaderboard ---------- */
.mini-lb { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 8px; }
.mini-lb li { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; }
.mini-lb .mini-msg { justify-content: center; color: var(--muted); text-align: center; }
.rank { font-family: var(--font-head); font-size: 1.5rem; min-width: 2.2ch; color: var(--orange); }
.mini-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mini-meta { color: var(--muted); white-space: nowrap; font-size: 0.95rem; }

/* ---------- tabs + table ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; border-bottom: 2px solid var(--border); margin-bottom: 0; -webkit-overflow-scrolling: touch; }
.tab { flex: 0 0 auto; min-height: 46px; padding: 8px 18px; background: var(--panel); color: var(--chalk); border: 1px solid var(--border); border-radius: 10px 10px 0 0; font-family: var(--font-head); font-size: 1.05rem; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.tab:hover { background: var(--panel-2); }
.tab[aria-selected="true"] { background: var(--orange); border-color: var(--orange); color: #0c101c; }
.tabpanel { background: var(--panel); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 8px 12px 16px; }
.table-wrap { overflow-x: auto; }
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th, .lb-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.lb-table th { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.lb-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.lb-table td.name { font-weight: 600; max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-table tbody tr:nth-child(-n+3) td.rank-cell { color: var(--orange); }
.lb-table .rank-cell { font-family: var(--font-head); font-size: 1.3rem; width: 3.5em; }
.lb-msg { margin: 18px 8px 4px; text-align: center; color: var(--muted); }
.lb-msg:empty { display: none; }
@media (max-width: 480px) { .lb-table th, .lb-table td { padding: 10px 6px; } .lb-table td.name { max-width: 9em; } .tile-value { font-size: 1.9rem; } }

/* ---------- rules / faq accordions ---------- */
.rules-intro { max-width: 46em; color: var(--muted); }
.rule-index { margin-bottom: 18px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); color: var(--chalk); text-decoration: none; font-size: 0.9rem; }
.chips a:hover { border-color: var(--orange); color: var(--orange); }
.rule-tools { display: flex; gap: 10px; margin: 0 0 16px; }
html:not(.js) .js-only { display: none; }
.rules { display: grid; gap: 10px; margin-bottom: 28px; }
.rule { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); scroll-margin-top: 84px; }
.rule[open] { border-color: var(--orange); }
.rule summary { display: flex; align-items: center; gap: 14px; cursor: pointer; padding: 14px 18px; list-style: none; min-height: 52px; }
.rule summary::-webkit-details-marker { display: none; }
.rule summary::after { content: "+"; margin-left: auto; font-family: var(--font-head); font-size: 1.6rem; color: var(--orange); line-height: 1; }
.rule[open] summary::after { content: "\2212"; }
.rule-num { font-family: var(--font-head); font-size: 1.5rem; color: var(--orange); min-width: 1.6ch; }
.rule-title { font-family: var(--font-head); font-size: 1.25rem; letter-spacing: 0.03em; text-transform: uppercase; }
.rule-body { padding: 0 18px 12px; }
.rule-body h3 { font-size: 1.05rem; color: var(--orange); margin: 1.2em 0 0.4em; }
.rule-body ul { margin: 0 0 1em; padding-left: 1.2em; }
.rule-body li { margin-bottom: 0.45em; }
.rule-body strong { color: #fff; }

/* ---------- jobs ---------- */
.job-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; margin-bottom: 28px; }
.job-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; border-top: 5px solid var(--orange); }
.job-card h2 { font-size: 1.6rem; }
.job-list { margin: 0; padding-left: 1.2em; }
.job-list li { margin-bottom: 0.4em; }

/* ---------- about ---------- */
.prose h2 { margin-top: 1.4em; }
.facts { display: grid; gap: 8px; margin: 0 0 1.6em; }
.facts div { display: grid; grid-template-columns: minmax(7em, 9em) 1fr; gap: 12px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.facts dt { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.04em; color: var(--orange); }
.facts dd { margin: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-2); margin-top: 0; }
.foot { display: grid; grid-template-columns: 1fr; gap: 24px; padding-top: 28px; padding-bottom: 12px; }
@media (min-width: 700px) { .foot { grid-template-columns: 2fr 1fr; } }
.foot-brand { font-family: var(--font-head); font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.2em; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px; }
.foot-links a { color: var(--chalk); display: inline-block; padding: 6px 0; }
.legal { padding-top: 12px; padding-bottom: 28px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--border); margin-top: 12px; }
.legal p { margin: 0 0 0.4em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 400px) {
  body { font-size: 1rem; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
  .site-nav .btn { width: 100%; }
}
