/* coolguy.live/ld60/gdd/: the design document of Counterweight. The game's palette; the site CSP allows no inline
   scripts or outside fonts, so plain HTML with a system face. Pictures come from ../art/img. */
:root {
  --soot: #161412; --coal: #1d1b18; --iron: #36332f; --grey: #6f695f; --ash: #c7c1b0;
  --paper: #eee6d3; --brass: #d9b665; --brass-dk: #8a6f33; --red: #ad1d18;
  --sans: Bahnschrift, "DIN Alternate", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--soot); scroll-behavior: smooth; }
body { margin: 0; background: var(--soot); color: var(--ash); font: 400 18px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }
a { color: var(--brass); }
.in { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

.top { padding: 64px 0 40px; border-bottom: 1px solid var(--iron); background: radial-gradient(ellipse 70% 120% at 20% 0%, rgba(217, 182, 101, .07), transparent 70%); }
.kicker { margin: 0 0 18px; color: var(--ash); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; }
.title { width: min(100%, 620px); }
.lead { max-width: 720px; margin: 24px 0 30px; color: var(--paper); font-size: 23px; line-height: 1.42; }
.cta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.play { display: inline-block; padding: 20px 56px 18px; background: var(--brass); color: var(--soot); font: 700 28px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; box-shadow: 0 6px 0 var(--brass-dk), 0 0 48px rgba(217, 182, 101, .25); transition: transform .08s, box-shadow .08s, background .15s; }
.play:hover { background: #e6c67a; box-shadow: 0 6px 0 var(--brass-dk), 0 0 64px rgba(217, 182, 101, .42); }
.play:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--brass-dk); }
.play:focus-visible, .toc a:focus-visible { outline: 3px solid var(--paper); outline-offset: 4px; }
.meta { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ash); }

.toc { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 22px; padding-bottom: 22px; font-size: 15px; letter-spacing: .06em; }
.toc a { text-decoration: none; color: var(--ash); border-bottom: 1px solid transparent; }
.toc a:hover { color: var(--brass); border-color: var(--brass); }

section { padding: 56px 0 8px; border-top: 1px solid var(--iron); }
section:first-child { border-top: 0; }
h2 { margin: 0 0 24px; color: var(--brass); font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
h3 { margin: 0 0 10px; color: var(--paper); font-size: 20px; font-weight: 600; }
p { margin: 0 0 18px; }
ul, ol { margin: 0 0 18px; padding-left: 22px; }
li { margin-bottom: 8px; }
li::marker { color: var(--brass); }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 48px; }
.note { color: var(--ash); border-left: 3px solid var(--brass-dk); padding: 2px 0 2px 16px; }
figure { margin: 0; }
figcaption { margin-top: 10px; font-size: 16px; color: var(--ash); }
figcaption b { color: var(--paper); }
.wide { margin: 18px 0 24px; }

table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 17px; }
th { text-align: left; color: var(--grey); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 0 12px 10px 0; border-bottom: 1px solid var(--iron); }
td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--iron); vertical-align: top; }
td:first-child { color: var(--paper); font-weight: 600; white-space: nowrap; }

.shifts { display: grid; gap: 14px; margin: 8px 0 22px; }
.shifts article { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: center; background: var(--coal); }
.shifts b { display: block; margin-bottom: 4px; color: var(--paper); font-size: 19px; }
.shifts span { display: block; padding-right: 18px; }
.sum { font-size: 19px; }
.sum b { color: var(--brass); font-size: 40px; margin-right: 10px; vertical-align: -5px; }

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 46px; margin-bottom: 14px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--brass-dk); color: var(--brass); font-weight: 600; font-size: 15px; }
.branches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 8px 0 24px; }

.funnel { display: grid; gap: 6px; margin: 6px 0 28px; }
.funnel div { position: relative; padding: 9px 12px; color: var(--paper); font-size: 16px; z-index: 0; }
.funnel div::before { content: ""; position: absolute; inset: 0 auto 0 0; width: max(var(--w), 6px); background: var(--iron); z-index: -1; }
.funnel div:last-child::before { background: var(--brass-dk); }
.funnel span { display: inline-block; min-width: 44px; color: var(--brass); font-weight: 700; font-size: 20px; }

.dec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dec article { background: var(--coal); padding: 18px 20px 4px; border-top: 2px solid var(--brass-dk); }
.dec b { display: block; margin-bottom: 6px; color: var(--paper); font-size: 19px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 32px 0 26px; }
.stats div { font-size: 15px; line-height: 1.35; }
.stats b { display: block; margin-bottom: 6px; color: var(--brass); font-size: 40px; line-height: 1; }

.docs { list-style: none; padding: 0; }
.docs li { display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: baseline; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--iron); }
.docs a { font-size: 19px; text-decoration: none; }
.docs a:hover { text-decoration: underline; }
.docs span { font-size: 15px; color: var(--grey); }

footer { max-width: 1040px; margin: 0 auto; padding: 56px 24px 40px; color: var(--grey); font-size: 14px; text-align: center; }

/* the one-page sheet under the title */
.sheet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 40px 0 0; background: var(--iron); border: 1px solid var(--iron); }
.sheet div { background: var(--soot); padding: 14px 16px; }
.sheet dt { color: var(--grey); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.sheet dd { margin: 0; color: var(--paper); font-size: 16px; line-height: 1.35; }

/* player feedback */
.voice { display: grid; gap: 14px; margin: 8px 0 30px; }
.vbar { display: grid; grid-template-columns: 120px 1fr; grid-template-rows: auto auto; column-gap: 20px; align-items: center; }
.vbar b { grid-row: 1 / 3; color: var(--brass); font-size: 30px; line-height: 1; white-space: nowrap; }
.vbar i { display: block; height: 10px; background: linear-gradient(to right, var(--brass) var(--p), var(--iron) var(--p)); }
.vbar span { margin-top: 6px; font-size: 16px; color: var(--ash); }
.vbar.warn b { color: var(--paper); }
.vbar.warn i { background: linear-gradient(to right, var(--red) var(--p), var(--iron) var(--p)); }
blockquote { margin: 0 0 36px; padding: 22px 26px; background: var(--coal); border-left: 3px solid var(--brass); color: var(--paper); font-size: 26px; line-height: 1.3; }
blockquote cite { display: block; margin-top: 12px; color: var(--ash); font-size: 15px; font-style: normal; line-height: 1.45; }
.sub { margin-top: 8px; }
table.fb td:first-child { white-space: normal; width: 34%; }
table.fb td:last-child { color: var(--brass); white-space: nowrap; font-size: 15px; }

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 30px; }
.pillars article { position: relative; background: var(--coal); padding: 22px 20px 6px; border-top: 2px solid var(--brass); }
.pillars span { display: block; color: var(--brass); font-size: 14px; font-weight: 600; letter-spacing: .14em; margin-bottom: 8px; }
.pillars b { display: block; color: var(--paper); font-size: 21px; margin-bottom: 8px; }
.crit ul { margin-bottom: 8px; }

/* the shift loop */
.loop { list-style: none; padding: 0; margin: 4px 0 24px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; counter-reset: l; }
.loop li { counter-increment: l; position: relative; margin: 0; padding: 16px 14px 14px; background: var(--coal); border-right: 1px solid var(--soot); font-size: 15px; line-height: 1.35; }
.loop li::before { content: counter(l, decimal-leading-zero); display: block; color: var(--brass); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.loop li::after { content: ""; position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; background: var(--coal); border-top: 1px solid var(--brass-dk); border-right: 1px solid var(--brass-dk); transform: translateY(-50%) rotate(45deg); z-index: 1; }
.loop li:last-child::after { display: none; }
.loop b { display: block; color: var(--paper); font-size: 17px; margin-bottom: 4px; }

/* progression matrix */
.grid-wrap { overflow-x: auto; margin: 0 0 24px; }
table.matrix { min-width: 680px; margin: 0; }
.matrix th { text-align: center; color: var(--paper); font-size: 14px; letter-spacing: .04em; text-transform: none; }
.matrix th small { display: block; color: var(--grey); font-size: 12px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; }
.matrix td { text-align: center; padding: 9px 6px; font-size: 14px; border-left: 1px solid var(--soot); }
.matrix td:first-child { text-align: left; padding-left: 0; font-size: 15px; border-left: 0; }
.matrix td.on { background: var(--iron); color: var(--ash); }
.matrix td.new { background: var(--brass); color: var(--soot); font-weight: 700; }
.matrix tr.num td { color: var(--paper); font-weight: 600; background: transparent; }
.matrix tr.num td:first-child { color: var(--ash); font-weight: 600; }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 22px; }
.shots figcaption { font-size: 15px; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .in { padding: 0 16px; }
  .top { padding: 40px 0 28px; }
  .lead { font-size: 19px; }
  .play { display: block; width: 100%; text-align: center; font-size: 26px; padding: 20px 24px 18px; }
  section { padding-top: 44px; }
  .cols, .branches, .dec, .pillars, .shots { grid-template-columns: 1fr; }
  .sheet { grid-template-columns: 1fr 1fr; }
  .vbar { grid-template-columns: 92px 1fr; column-gap: 14px; }
  .vbar b { font-size: 24px; }
  blockquote { font-size: 21px; padding: 18px 18px; }
  .loop { grid-template-columns: 1fr 1fr; gap: 8px; }
  .loop li { border-right: 0; }
  .loop li::after { display: none; }
  table.fb td:first-child { width: auto; }
  .shifts article { grid-template-columns: 1fr; gap: 12px; padding-bottom: 14px; }
  .shifts span { padding: 0 14px; }
  .shifts b { padding: 0 14px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  table { font-size: 16px; }
  td:first-child { white-space: normal; }
  footer { padding: 44px 16px 32px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .play { transition: none; } }
