/* OSRS Replay download page and changelog. Colour tokens come from the app (app/src/styles.css). */

:root {
  color-scheme: dark;
  --bg: #12100d;
  --panel: #1b1713;
  --panel-2: #241e18;
  --panel-3: #2e261e;
  --line: #3a3027;
  --line-soft: #2a231c;
  --text: #ece2cc;
  --muted: #a39479; /* about 6:1 on --bg */
  --dim: #8f826c; /* small secondary text: about 4.9:1 on --bg */
  --gold: #e0b14a;
  --gold-hover: #ebc160;
  --gold-ink: #1b1408;
  --mono: 'Cascadia Mono', Consolas, ui-monospace, monospace;
  --font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --col: 760px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

/* Without this, .btn and the footer's display rules would show the hidden download blocks and source links */
[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.2;
}

a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--gold-hover);
}

b {
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

kbd {
  font-family: var(--mono);
  font-size: 0.78em;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 0.4em;
  color: var(--text);
  white-space: nowrap;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 0.05em 0.3em;
  overflow-wrap: anywhere;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--gold);
  color: var(--gold-ink);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  max-width: calc(var(--col) + 48px);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-head {
  border-bottom: 1px solid var(--line-soft);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 16.5px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.site-head nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
}

.site-head nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.site-head nav a:hover,
.site-head nav a[aria-current='page'] {
  color: var(--text);
}

.site-head nav .nav-dl {
  color: var(--gold);
}

.site-head nav .nav-dl:hover {
  color: var(--gold-hover);
}

/* ---------- Sections and type ---------- */

h1 {
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.15;
  font-weight: 700;
  margin: 40px 0 16px;
}

h2 {
  font-size: 26px;
  margin: 0 0 20px;
}

p {
  margin: 0;
}

.lead {
  font-size: 19px;
  margin-bottom: 24px;
}

.meta {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

/* Two classes, so it outranks .wrap's margin and padding */
main > .wrap + .wrap {
  border-top: 1px solid var(--line-soft);
  margin-top: 56px;
  padding-top: 48px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.btn:hover {
  color: var(--text);
  background: var(--panel-3);
}

.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-ink);
}

.btn-primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  color: var(--gold-ink);
}

.btn-lg {
  font-size: 17px;
  padding: 14px 22px;
}

/* ---------- Screenshot ---------- */

.shot {
  margin: 32px 0 0;
}

.shot a {
  display: block;
  border-radius: 6px;
  text-decoration: none;
}

.shot img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.shot figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Lists ---------- */

.points,
.faq ul {
  margin: 0;
  padding-left: 1.25em;
}

.points li + li,
.faq li + li {
  margin-top: 8px;
}

.points li::marker,
.faq li::marker,
.notes li::marker {
  color: var(--gold);
}

/* ---------- Download ---------- */

.dl + .dl {
  margin-top: 24px;
}

.note {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted);
}

#download > p {
  margin-top: 16px;
}

#download > .dl + p {
  margin-top: 28px;
}

.sha {
  margin-top: 10px;
  font-size: 13px;
  color: var(--dim);
}

.sha summary {
  cursor: pointer;
}

.sha summary:hover {
  color: var(--muted);
}

.sha code {
  color: var(--muted);
}

.sha .sha-full {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  max-width: 34em;
  line-height: 1.5;
  word-break: break-all;
  user-select: all;
}

/* What's new: the page's only panel */
.whatsnew {
  margin-top: 32px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.whatsnew h3 {
  margin: 0;
  font-size: 18px;
}

.whatsnew time {
  display: block;
  font-size: 14px;
  color: var(--dim);
}

.whatsnew > p {
  margin-top: 14px;
  font-size: 15px;
}

/* Release notes (Markdown from site-data.json and changelog.json, rendered by site.js) */
.notes {
  margin-top: 14px;
  font-size: 15px;
  color: var(--muted);
}

.notes h4 {
  margin: 14px 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.notes h4:first-child {
  margin-top: 0;
}

.notes ul,
.notes ol {
  margin: 0;
  padding-left: 1.25em;
}

/* On the changelog the notes sit inside the releases list, where browsers would draw nested-list circles */
.notes ul {
  list-style-type: disc;
}

.notes li + li {
  margin-top: 6px;
}

/* Older notes open most items with a bold label: keep it plain, so it reads as part of the sentence */
.notes b {
  font-weight: inherit;
  color: inherit;
}

.notes p + p,
.notes p + ul,
.notes p + ol,
.notes ul + p,
.notes ol + p {
  margin-top: 8px;
}

/* ---------- FAQ ---------- */

.faq h3 {
  margin: 28px 0 6px;
  font-size: 18px;
}

.faq ul {
  margin: 8px 0;
}

/* ---------- Footer ---------- */

.site-foot {
  margin-top: 72px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--dim);
}

.site-foot a {
  color: var(--muted);
}

.site-foot a:hover,
.site-foot a[aria-current='page'] {
  color: var(--text);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 14px;
  font-size: 14px;
}

.foot-links a {
  text-decoration: none;
}

.site-foot p + p {
  margin-top: 6px;
}

.site-foot .fan-credit {
  color: var(--muted);
}

/* ---------- Changelog page ---------- */

.releases-status {
  margin-top: 24px;
  color: var(--muted);
}

.releases {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
}

.release {
  padding: 28px 0;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 16px;
}

.release:first-child {
  border-top: 0;
  padding-top: 0;
}

.release-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.release-head h2 {
  margin: 0;
  font-size: 21px;
}

.release-head h2 a {
  color: var(--text);
  text-decoration: none;
}

.release-head h2 a:hover {
  color: var(--gold);
}

.release-tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}

.release-head time {
  margin-left: auto;
  font-size: 14px;
  color: var(--dim);
}

/* ---------- Screen sizes and motion ---------- */

@media (max-width: 640px) {
  .release-head time {
    margin-left: 0;
    flex-basis: 100%;
  }
}

@media (min-width: 640px) {
  .whatsnew {
    padding: 24px;
  }
}

@media (min-width: 768px) {
  h1 {
    margin-top: 56px;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 16px;
  }

  .btn-lg {
    display: block;
    width: 100%;
    text-align: center;
  }
}

@media (min-width: 1800px) {
  :root {
    --col: 860px;
  }

  body {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  a,
  .btn {
    transition: color 0.15s, background-color 0.15s, border-color 0.15s;
  }
}
