/* prokrunker.com
   Colours are the client's own tokens, from src/shared/ui/tokens.ts. */

:root {
  --bg:        #0d0e12;
  --surface:   #16181d;
  --border:    #262930;
  --border-hi: #363b45;

  --text-hi:   #f2f3f5;
  --text:      #c8ccd4;
  --text-dim:  #8b919c;
  --text-faint:#6b7078;

  --accent:    #6d8cff;
  --accent-hi: #8da5ff;

  --ff: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ff-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-hi); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

code {
  font-family: var(--ff-mono);
  font-size: .87em;
  background: #1c1f26;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .08em .34em;
  color: var(--text-hi);
}

.wrap {
  max-width: 780px;
  margin-inline: auto;
  padding-inline: 22px;
}

/* ---------- nav ---------- */

.nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 54px;
}
.brand {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-hi);
  letter-spacing: .01em;
}
.brand:hover { text-decoration: none; }
.slash { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}
.nav-links a { color: var(--text-dim); }
.nav-links a:hover { color: var(--text-hi); text-decoration: none; }
.nav-cta { color: var(--accent-hi) !important; }

@media (max-width: 560px) {
  .nav-links { gap: 14px; font-size: 13px; }
  .nav-links a:nth-child(3) { display: none; }
}

/* ---------- layout ---------- */

main { padding: 44px 0 20px; }

section { margin-bottom: 52px; }

h2 {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 650;
  color: var(--text-hi);
  letter-spacing: .005em;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}

h3 {
  margin: 30px 0 12px;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-hi);
}

p { margin: 0 0 14px; }

.intro p { max-width: 66ch; }
.intro b { color: var(--text-hi); font-weight: 650; }

.meta {
  font-size: 13.5px;
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.note {
  font-size: 13.5px;
  color: var(--text-dim);
  border-left: 2px solid var(--border-hi);
  padding-left: 14px;
  max-width: 68ch;
  margin-bottom: 0;
}
.note b { color: var(--text); }

/* ---------- buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 14px;
}

.btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 550;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hi); }

.btn-ghost { border-color: var(--border-hi); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-faint); }

/* ---------- lists ---------- */

.list {
  margin: 0;
  padding-left: 19px;
  max-width: 70ch;
}
.list li { margin-bottom: 6px; }
.list li::marker { color: var(--text-faint); }

.keys {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 8px 20px;
  font-size: 14px;
  color: var(--text-dim);
}

kbd {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  color: var(--text);
  background: #1c1f26;
  border: 1px solid var(--border-hi);
  border-radius: 3px;
  padding: 2px 6px;
  margin-right: 5px;
}
.keys kbd + kbd { margin-left: -3px; }

/* ---------- figures ---------- */

figure { margin: 0 0 26px; }
figure img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #000;
}
figcaption {
  margin-top: 9px;
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- before/after compare ---------- */

.compare-stage {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  background: #000;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.compare-stage .compare-img {
  width: 100%;
  border: 0;
  border-radius: 0;
  image-rendering: pixelated;
}

/* Clip rather than resize. Giving the overlay a width would scale the image
   inside it as the handle moves; an inset clip-path leaves the image at full
   stage width and just hides part of it, so both halves stay in register. */
.compare-overlay {
  position: absolute;
  inset: 0;
  clip-path: inset(0 45% 0 0);
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 55%;
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  cursor: ew-resize;
}
.compare-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
}

.compare-tag {
  position: absolute;
  bottom: 9px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(13, 14, 18, .8);
  border: 1px solid var(--border-hi);
  padding: 2px 7px;
  border-radius: 3px;
  pointer-events: none;
}
.compare-tag-l { left: 9px; }
.compare-tag-r { right: 9px; }

/* ---------- download ---------- */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dl {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 17px 18px;
  color: var(--text);
}
.dl:hover { text-decoration: none; border-color: var(--border-hi); }

.dl h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 650;
  color: var(--text-hi);
}
.dl p { margin: 0; font-size: 13.5px; color: var(--text-dim); }

.dl-primary { border-color: #3d4a75; }
.dl-primary:hover { border-color: var(--accent); }

.dl-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  font-family: var(--ff-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}
.dl-size { white-space: nowrap; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 40px;
  margin-top: 12px;
}
.footer p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--text-faint);
}
.footer a { color: var(--text-dim); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 14px !important;
}
.footer-links a { color: var(--accent-hi); }

@media (max-width: 560px) {
  main { padding-top: 32px; }
  section { margin-bottom: 40px; }
}
