/* The tutorials: the page around the game's look (Project/Web/page.css) */
@font-face { font-family: Digitek; src: url(../DIGITEK.ttf); }
:root { --panel: #004770; --deep: #00304c; --edge: #3f7493; --text: #e6eef4; --dim: #a9bdca; --accent: #8cff8c; --glow: #5fdcff; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; color: var(--text); font: 17px/1.6 system-ui, sans-serif; background: #1c1c1c url(../background.png); }
a { color: var(--accent); }
h1, h2, h3 { font-family: Digitek, monospace; font-weight: normal; letter-spacing: 1px; text-transform: uppercase; line-height: 1.2; }
h2 { margin: 0 0 14px; font-size: 28px; color: #fff; text-shadow: 0 0 10px var(--glow); }
h3 { margin: 18px 0 8px; font-size: 20px; color: var(--glow); }
p { margin: 0 0 12px; }
code { padding: 1px 5px; border-radius: 3px; background: var(--deep); }

header { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 10px 20px; background: #0c1f2bf2; border-bottom: 2px solid var(--edge); }
header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; flex: 1; }
header nav a { color: var(--text); text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
header nav a:hover, header nav a.on { color: #fff; border-color: var(--accent); }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; font: 18px Digitek, monospace; text-decoration: none; text-transform: uppercase; }
.brand img { height: 30px; }
.play { padding: 5px 14px; border-radius: 16px; background: var(--accent); color: #052b12; font-weight: 600; text-decoration: none; }
.play:hover { background: #fff; }

.hero { padding: 40px 20px 28px; text-align: center; }
.hero h1 { margin: 0 0 8px; font-size: clamp(36px, 7vw, 60px); color: #fff; text-shadow: 0 0 18px var(--glow); }
.hero p { margin: 0 auto; max-width: 640px; font-size: 19px; }

.layout { display: flex; gap: 20px; align-items: flex-start; justify-content: center; max-width: 1120px; margin: 0 auto; padding: 0 16px 24px; }
main { flex: 1; min-width: 0; max-width: 880px; display: grid; gap: 18px; }
section { padding: 22px 26px; border: 2px solid var(--edge); border-radius: 10px; background: var(--panel); }
.toc { position: sticky; top: 76px; flex: 0 0 190px; display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 2px solid var(--edge); border-radius: 10px; background: var(--deep); font-size: 15px; }
.toc b { margin-bottom: 4px; color: var(--dim); font-weight: normal; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); }

figure { margin: 14px 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 0 0 2px #0c1f2b, 0 4px 16px #0009; }
figcaption { margin-top: 6px; color: var(--dim); font-size: 14px; text-align: center; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps > li { position: relative; padding-left: 50px; counter-increment: step; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #052b12; font: 20px/36px Digitek, monospace; text-align: center; }
.steps h3 { margin-top: 5px; }

.keys { width: 100%; margin: 10px 0 14px; border-collapse: collapse; background: var(--deep); border-radius: 6px; overflow: hidden; }
.keys th, .keys td { padding: 7px 12px; text-align: left; vertical-align: top; }
.keys th { width: 34%; font-weight: 600; color: #fff; }
.keys tr + tr > * { border-top: 1px solid #0c5a86; }

.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 8px; margin: 12px 0; }
.pieces > div { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 6px; background: var(--deep); }
.pieces p { margin: 0; font-size: 15px; line-height: 1.35; }
.pieces b { display: block; color: #fff; }
/* A piece, in the game's own art: its pixels kept sharp */
.piece { flex: none; width: 52px; height: 52px; object-fit: contain; image-rendering: auto; border-radius: 4px; }

.tip { margin: 12px 0; padding: 10px 14px; border-left: 4px solid var(--accent); border-radius: 0 6px 6px 0; background: var(--deep); }
.tip b { color: var(--accent); margin-right: 6px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.cards a { display: block; padding: 12px 12px 16px; border: 2px solid var(--edge); border-radius: 10px; background: var(--panel); color: var(--text); text-decoration: none; transition: transform .12s, border-color .12s; }
.cards a:hover { transform: translateY(-3px); border-color: var(--accent); }
.cards img { display: block; width: 100%; border-radius: 6px; }
.cards h2 { margin: 12px 4px 4px; }
.cards p { margin: 0 4px; }

.next { justify-self: end; padding: 8px 18px; border-radius: 20px; background: var(--accent); color: #052b12; font-weight: 600; text-decoration: none; }
.next:hover { background: #fff; }
footer { padding: 16px 20px 30px; color: var(--dim); text-align: center; }

@media (max-width: 860px) {
  header { position: static; }
  html { scroll-padding-top: 12px; }
  .cards { grid-template-columns: 1fr; }
  .toc { display: none; }
  .split { grid-template-columns: 1fr; }
  section { padding: 16px; }
  .keys th { width: 42%; }
  .steps > li { padding-left: 0; padding-top: 42px; }
}
