/* C64Can: a page set as a Commodore 64's screen. Border, screen and letters are the
   C64's own colours; the text of paragraphs is a little lighter than its light blue,
   so that it reads well on the blue. */
:root {
    --border: #7c70da;
    --screen: #3e31a2;
    --light: #a59df0;
    --text: #d4d0ff;
    --white: #ffffff;
    --yellow: #edf171;
    --green: #a9ff9f;
    --cyan: #75cec8;
    --red: #c46c71;
    --orange: #f78200;
    --px: "Silkscreen", "Courier New", monospace;
    --mono: "IBM Plex Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { background: var(--border); }

body {
    margin: 0;
    color: var(--text);
    font-family: var(--mono);
    font-size: 16px;
    line-height: 1.65;
}

a { color: var(--white); }
a:hover { color: var(--yellow); }
a:focus-visible, .go:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.frame { max-width: 1080px; margin: 0 auto; padding: 18px 28px 40px; }

.back {
    display: inline-block;
    font-family: var(--px);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--screen);
    text-decoration: none;
    padding: 6px 0 14px;
}
.back:hover { color: var(--white); }

.screen { background: var(--screen); padding: 36px 44px 48px; }

.boot {
    font-family: var(--px);
    font-size: 15px;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-align: center;
    margin: 0 0 30px;
    color: var(--light);
}
.boot b { display: block; font-weight: 400; }

h1 {
    font-family: var(--px);
    font-weight: 700;
    font-size: clamp(46px, 9.5vw, 108px);
    line-height: .95;
    margin: 0;
    color: var(--white);
    letter-spacing: .02em;
}

.rainbow { display: flex; height: 14px; margin: 18px 0 22px; max-width: 520px; }
.rainbow i { flex: 1; }
.rainbow i:nth-child(1) { background: var(--red); }
.rainbow i:nth-child(2) { background: var(--orange); }
.rainbow i:nth-child(3) { background: var(--yellow); }
.rainbow i:nth-child(4) { background: var(--green); }
.rainbow i:nth-child(5) { background: var(--cyan); }

.lede { font-size: 20px; line-height: 1.55; max-width: 32em; margin: 0 0 8px; color: var(--white); }

.prompt {
    font-family: var(--px);
    text-transform: uppercase;
    font-size: 15px;
    margin: 26px 0 10px;
    color: var(--light);
}
.prompt::after {
    content: "";
    display: inline-block;
    width: .75em;
    height: 1em;
    background: var(--light);
    margin-left: .3em;
    vertical-align: -.12em;
    animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .prompt::after { animation: none; } }

.go {
    display: inline-block;
    margin-top: 12px;
    font-family: var(--px);
    text-transform: uppercase;
    background: var(--light);
    color: var(--screen);
    padding: 10px 18px;
    text-decoration: none;
    font-size: 15px;
}
.go:hover { background: var(--white); color: var(--screen); }

.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }

figure { margin: 0; }
.shot { border: 10px solid var(--border); background: #000; }
.shot img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
figcaption { font-size: 13px; line-height: 1.5; color: var(--text); margin-top: 8px; }

h2 {
    font-family: var(--px);
    text-transform: uppercase;
    font-size: 19px;
    font-weight: 400;
    color: var(--yellow);
    margin: 56px 0 14px;
    letter-spacing: .03em;
}
h2 .ln { color: var(--light); }

p { max-width: 46em; margin: 0 0 14px; }

.list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 44px; }
.list li {
    break-inside: avoid;
    padding: 7px 0 7px 5.4em;
    text-indent: -5.4em;
    border-bottom: 1px dashed rgba(165, 157, 240, .4);
}
.list li b {
    font-family: var(--px);
    font-weight: 400;
    color: var(--white);
    display: inline-block;
    width: 5.4em;
    text-indent: 0;
    text-transform: uppercase;
    font-size: 13px;
}

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 18px 0 6px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 18px 0 6px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

/* a block of text as the C64 would print it */
.listing {
    font-family: var(--px);
    text-transform: uppercase;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
    color: var(--light);
    white-space: pre-wrap;
    overflow-x: auto;
}
.listing .rev { background: var(--light); color: var(--screen); }
.listing .hi { color: var(--white); }

.menu { border: 10px solid var(--border); padding: 16px 20px 18px; background: var(--screen); }

table { border-collapse: collapse; width: 100%; max-width: 52em; }
th, td { text-align: left; vertical-align: top; padding: 7px 14px 7px 0; border-bottom: 1px dashed rgba(165, 157, 240, .4); }
th {
    font-family: var(--px);
    font-weight: 400;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--white);
    white-space: nowrap;
    width: 11em;
}
thead th { color: var(--light); border-bottom: 2px solid var(--light); }

kbd {
    font-family: var(--px);
    font-size: 12px;
    text-transform: uppercase;
    background: var(--light);
    color: var(--screen);
    padding: 1px 6px;
}

.dir { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 36px; margin-top: 10px; }
.dir h3 { font-family: var(--px); font-weight: 400; font-size: 13px; text-transform: uppercase; color: var(--white); margin: 0 0 6px; }
.dir ul { list-style: none; margin: 0; padding: 0; }
.dir li { font-size: 14.5px; padding: 2px 0; }
.dir a { text-decoration: none; }
.dir a:hover { text-decoration: underline; }

.footer {
    font-family: var(--px);
    text-transform: uppercase;
    font-size: 12px;
    color: var(--screen);
    padding: 16px 2px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.footer a { color: var(--screen); }
.footer a:hover { color: var(--white); }

@media (max-width: 800px) {
    .frame { padding: 10px 12px 28px; }
    .screen { padding: 24px 18px 32px; }
    .hero, .row2, .row3, .split, .dir { grid-template-columns: 1fr; }
    .hero { gap: 26px; }
    .list { columns: 1; }
    .lede { font-size: 18px; }
    th { width: auto; white-space: normal; }
}
