/* Tweakcraft. The colours come from the old site (the blues, the mint of its titles) and from the logo (the wood
   of its plank). One sheet for every page; the pages themselves are written by build.py. */

@font-face { font-family: 'Nunito'; src: url('../fonts/nunito-400-800.woff2') format('woff2'); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Pixelify Sans'; src: url('../fonts/pixelify-sans-400-700.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Zilla Slab'; src: url('../fonts/zilla-slab-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Zilla Slab'; src: url('../fonts/zilla-slab-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ground: #112733;
  --band: #124d6d;
  --card: #224e66;
  --card-band: #1d5878;
  --inset: #0e3a53;
  --line: #2f6f92;
  --rule: #224e66;
  --bar: #163d55;
  --bar-line: #3888b8;
  --sub: #1d506e;
  --active: #2a6a8e;
  --foot: #0c1d27;
  --accent: #60c4b2;
  --link: #8fdccd;
  --text: #eaf3f6;
  --soft: #d7e6ec;
  --dim: #c5d8e0;
  --faint: #a9c3cf;
  --cream: #ffe2a8;
  --wood: #b89858;
  --wood-edge: #483818;
  --wood-shadow: #2a1d0c;
  --ink: #20160a;
  --body: 'Nunito', 'Trebuchet MS', Verdana, sans-serif;
  --display: 'Zilla Slab', Georgia, serif;
  --pixel: 'Pixelify Sans', ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.55; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.12; color: #fff; }
p, ul, ol, figure { margin: 0; }
a { color: var(--link); }
a:hover { color: #fff; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
[hidden] { display: none !important; }
.icon { flex: 0 0 auto; }

.skip { position: absolute; left: -999px; top: 12px; z-index: 10; padding: 8px 12px; border-radius: 6px; background: var(--cream); color: var(--ink); font-weight: 800; }
.skip:focus { left: 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap.narrow { max-width: 860px; }
.stack { display: flex; flex-direction: column; gap: 40px; }
.stack.tight { gap: 14px; }
.stack.wide { gap: 56px; }
.grid { display: grid; gap: 20px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.grid.two-wide { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 40px; align-items: start; }

main > section, main > header { padding: 88px 0; }
main > section.band, .band { background: var(--band); }

/* The bar, with the logo hanging over its edge as on the old site */
.bar { background: var(--bar); border-bottom: 3px solid var(--bar-line); }
.bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; min-height: 68px; }
.logo { display: block; align-self: flex-start; position: relative; z-index: 2; margin-bottom: -34px; }
.logo img { display: block; width: 135px; height: 102px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; flex: 1 1 160px; min-width: 0; }
.nav a, .sub a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 8px; color: #fff; text-decoration: none; font-weight: 800; }
.nav a:hover, .sub a:hover, .nav a.is-active, .sub a[aria-current] { background: var(--active); }
.nav a[aria-expanded="true"] .icon { transform: rotate(180deg); }
.sub { display: none; background: var(--sub); border-bottom: 1px solid #2c6485; }
.sub.open { display: block; }
.sub .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-left: 211px; }
.sub a { font-size: 15px; font-weight: 700; }

/* The server's address as a wooden sign: a click copies it */
.sign { display: inline-flex; align-items: center; gap: 12px; min-height: 46px; margin-left: auto; padding: 4px 14px; background: var(--wood); color: var(--ink); border: 3px solid var(--wood-edge); border-radius: 8px; box-shadow: 0 4px 0 var(--wood-shadow); cursor: pointer; }
.sign:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--wood-shadow); }
.sign .addr { font-family: var(--pixel); font-size: 19px; font-weight: 700; }
.sign .act { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; }
.sign .icon + .icon, .sign.copied .act .icon:first-child { display: none; }
.sign.copied .icon + .icon { display: inline; }
.sign.big { min-height: 58px; margin-left: 0; padding: 6px 20px; gap: 14px; }
.sign.big .addr { font-size: 24px; }
.sign.big .act { font-size: 15px; }
.ghost { display: inline-flex; align-items: center; min-height: 58px; padding: 0 22px; border: 2px solid var(--link); border-radius: 8px; color: #fff; text-decoration: none; font-weight: 800; }
.ghost:hover { background: rgba(143, 220, 205, 0.14); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.actions.center { justify-content: center; }
.more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; }

/* Type */
.eyebrow { font-family: var(--pixel); font-size: 18px; font-weight: 500; letter-spacing: 0.04em; color: var(--accent); }
.eyebrow.gold { color: var(--cream); }
.lead { max-width: 60ch; font-size: 19px; color: var(--soft); }
.intro { display: flex; flex-direction: column; gap: 10px; max-width: 68ch; }
.intro p { color: var(--soft); }
h2 { font-size: clamp(30px, 3.4vw, 42px); color: var(--accent); }
h2.accent { font-size: 28px; }
h3 { font-size: 23px; line-height: 1.2; }
.strong, strong { font-weight: 800; color: #fff; }
.dated { font-size: 15px; font-weight: 700; color: var(--cream); }
code { font-family: var(--pixel); font-size: 0.94em; font-weight: 500; padding: 2px 8px; border-radius: 6px; border: 1px solid #2c6485; background: var(--foot); color: var(--cream); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips code { padding: 4px 10px; }
.pair { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.pair code { padding: 4px 10px; }
.notice { padding: 14px 18px; border-radius: 12px; background: var(--wood); color: var(--ink); font-weight: 700; }

/* Cards */
.card { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 16px; background: var(--card-band); border: 1px solid var(--line); color: var(--soft); }
.card.on-ground { background: var(--card); }
.card.inset { gap: 18px; background: var(--inset); }
.card h2 { font-size: 24px; line-height: 1.2; color: #fff; }
.card ul, .doc ul, .topic-block ol, .topic-block ul { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.steps { list-style: none; margin: 0; padding: 0; }
/* Not the pixel face: its 2 and 5 read as an 8 at this size. */
.num { font-family: var(--display); font-size: 36px; font-weight: 700; line-height: 1; color: var(--cream); }

/* Home */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: 560px; padding: 0; }
main > section.hero { padding: 0; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero-shade { position: absolute; inset: 0; background: rgba(13, 32, 43, 0.74); }
.hero-body { position: relative; width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-top: 96px; padding-bottom: 88px; }
.hero h1 { max-width: 16ch; font-size: clamp(38px, 5.4vw, 68px); line-height: 1.05; text-wrap: balance; }
.hero .lead { max-width: 56ch; }
.facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; font-weight: 700; color: var(--dim); }
.hero-credit { position: absolute; right: 16px; bottom: 12px; padding: 4px 10px; border-radius: 6px; background: rgba(13, 32, 43, 0.85); font-size: 13px; color: var(--dim); }
.pillars { gap: 40px; }
.pillar { display: flex; flex-direction: column; gap: 12px; color: var(--dim); }
.pillar .icon { color: var(--accent); }
.pillar h3 { font-size: 25px; }
.split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.arrows { display: flex; gap: 10px; }
.round { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: var(--card-band); color: #fff; cursor: pointer; }
.round:hover, .topic:hover { background: #226486; }
.carousel { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; min-height: 236px; }
.topic { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 148px; height: 148px; padding: 10px; border: 3px solid transparent; border-radius: 20px; background: var(--card-band); color: #fff; text-align: center; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.15; cursor: pointer; transition: width 0.2s, height 0.2s; }
.topic .icon { color: var(--link); }
.topic.is-near { width: 178px; height: 178px; font-size: 18px; }
.topic.is-active { width: 228px; height: 228px; font-size: 22px; border-color: var(--accent); }
.topic.is-far { display: none; }
.panel { display: none; padding: 32px; border-radius: 18px; }
.panel.is-active { display: flex; }
.panel h3 { font-size: 28px; }
.panel > p { max-width: 68ch; }
.since { gap: 48px; align-items: center; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.since p { color: var(--soft); }
.photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.photos figure { position: relative; overflow: hidden; border-radius: 14px; aspect-ratio: 4 / 3; background: var(--card); }
.photos img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photos figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; background: rgba(13, 32, 43, 0.8); font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--link); }
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { border-radius: 12px; background: var(--card-band); border: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 14px 20px; cursor: pointer; list-style: none; font-size: 18px; font-weight: 800; color: #fff; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding: 0 20px 18px; color: var(--soft); }
.closing { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.closing h2 { font-size: clamp(32px, 4vw, 50px); color: #fff; }
.closing p { max-width: 52ch; color: var(--soft); }

/* The other pages */
.page-head { background: var(--band); padding: 80px 0 56px; }
main > header.page-head { padding: 80px 0 56px; }
.page-head h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.05; }
.page-head + section { padding-top: 64px; }
.doc { display: flex; flex-direction: column; gap: 40px; color: var(--soft); }
.doc section { display: flex; flex-direction: column; gap: 12px; }
.doc h2 { font-size: 28px; line-height: 1.15; }
.scroll { overflow-x: auto; }
table { width: 100%; min-width: 520px; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
th { color: var(--cream); font-weight: 800; }

.jump { position: sticky; top: 0; z-index: 3; background: var(--sub); border-bottom: 1px solid #2c6485; }
.jump .wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px; color: #fff; text-decoration: none; font-size: 15px; font-weight: 700; }
.jump a:hover { background: var(--active); }
.topic-block { scroll-margin-top: 56px; }
main > section.topic-block { padding: 72px 0; }
.topic-title { display: flex; align-items: center; gap: 14px; }
.topic-title .icon { color: var(--accent); }
.topic-block .lead { max-width: 52ch; }
.topic-block h3 { margin-top: 8px; }
.topic-block ol, .topic-block ul { color: var(--soft); }
.topic-block .card h3 { margin-top: 0; }
.tags { list-style: none; padding: 0 !important; flex-direction: row !important; flex-wrap: wrap; gap: 8px !important; margin-top: 8px; }
.tags li { padding: 4px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 15px; font-weight: 700; color: #fff; }

.games { margin-top: 56px; }
.topic-block ul.events { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.event { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
/* A game's screenshot, or a plain tile until there is one (site/img/events/). */
.event-shot { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: var(--inset); color: var(--line); }
.event-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.event-shot .icon { width: 56px; height: 56px; }
.event-text { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; color: var(--soft); }
.topic-block .event-text h3 { margin-top: 0; font-size: 22px; }

.search { display: flex; flex-direction: column; gap: 6px; max-width: 420px; margin-top: 10px; }
.search label { font-weight: 800; }
.search input { min-height: 48px; padding: 0 14px; border: 2px solid var(--line); border-radius: 8px; background: var(--foot); color: #fff; font: inherit; }
.search input::placeholder { color: var(--faint); }
.cmd-group { display: flex; flex-direction: column; gap: 14px; }
.cmd-group h2 { font-size: 28px; }
.cmds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cmds li { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 6px 24px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.cmd-names { display: flex; flex-wrap: wrap; gap: 6px; }
.cmd-names code { padding: 4px 10px; white-space: normal; }
.cmd-what { color: var(--soft); }
.votes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.vote { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 18px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: #fff; text-decoration: none; font-weight: 800; }
.vote span { font-size: 14px; color: var(--cream); }
a.vote:hover { background: #226486; }
.vote.is-off { color: var(--dim); }
.vote.is-off span { color: var(--faint); font-weight: 700; }
/* The same sites on the homepage: two rows of five to click through, each in a tab of its own. */
.votegrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.votegrid li { display: flex; }
.votetile { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; min-height: 112px; padding: 14px 16px; border-radius: 14px; background: var(--card-band); border: 2px solid var(--line); color: #fff; text-decoration: none; font-size: 16px; font-weight: 800; line-height: 1.25; overflow-wrap: break-word; }
a.votetile:hover { background: #226486; border-color: var(--bar-line); }
.votetile .num { font-family: var(--display); font-size: 22px; line-height: 1; color: var(--cream); }
.votetile .state { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--cream); }
.votetile .state svg + svg { display: none; }
.votetile.is-done { background: var(--inset); border-color: var(--accent); }
.votetile.is-done .state { color: var(--accent); }
.votetile.is-done .state svg { display: none; }
.votetile.is-done .state svg + svg { display: block; }
.votetile.is-off { color: var(--dim); }
.votetile.is-off .state { color: var(--faint); }
.votehint { max-width: 76ch; font-size: 15px; color: var(--dim); }
.votehint [data-vote-count] { margin-right: 6px; font-weight: 800; color: var(--accent); }

/* Footer */
.foot { background: var(--foot); border-top: 3px solid var(--bar-line); }
.foot .wrap { display: flex; flex-direction: column; gap: 32px; padding-top: 48px; padding-bottom: 28px; }
.foot-cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 56px; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex: 1 1 320px; max-width: 46ch; color: var(--faint); }
.foot-name { font-family: var(--display); font-weight: 700; font-size: 22px; color: #fff; }
.foot nav { display: flex; flex-direction: column; gap: 2px; }
.foot-head { font-weight: 800; color: #fff; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-brand a { font-weight: 800; }
.foot-note { padding-top: 20px; border-top: 1px solid var(--rule); font-size: 15px; font-weight: 700; color: #cfe0e7; }

@media (max-width: 960px) {
  .votegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .votetile { min-height: 96px; }
}
@media (max-width: 720px) {
  main > section, main > header { padding: 64px 0; }
  .logo { margin-bottom: 0; }
  .logo img { width: 106px; height: 80px; }
  .sub .wrap { padding-left: 24px; }
  .sign { margin-left: 0; }
  .cmds li { grid-template-columns: minmax(0, 1fr); }
  .topic, .topic.is-near, .topic.is-active { width: 100%; height: auto; min-height: 64px; flex-direction: row; justify-content: flex-start; padding: 12px 16px; font-size: 18px; }
  .topic.is-far { display: flex; }
  .carousel .topic { order: 0 !important; }
  .carousel { min-height: 0; gap: 8px; }
  .arrows { display: none; }
  .hero-credit { position: relative; right: auto; bottom: auto; align-self: flex-start; margin: 0 24px 16px; }
  .hero { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .topic { transition: none; }
}
