/* PETCan: a page set as a Commodore PET. The page is the PET's case, the text
   is on its screen: green phosphor on black behind a dark surround, capitals
   and reverse bars as the PET prints them. */
:root {
    --case: #d8d2c2;
    --case-dark: #b9b2a0;
    --bezel: #17171a;
    --screen: #030a04;
    --green: #3fe052;
    --bright: #8dff98;
    --dim: #1f8a30;
    --text: #6fe87d;
    --white: #e6e6dc;
    --amber: #ff9a1a;
    --plate: #1c2f6b;
    --px: "VT323", "Courier New", monospace;
    --mono: "IBM Plex Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { background: var(--case); }
body { margin: 0; color: var(--text); font-family: var(--mono); font-size: 16px; line-height: 1.65; }
a { color: var(--bright); }
a:hover { color: var(--white); }
a:focus-visible, .go:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.frame { max-width: 1120px; margin: 0 auto; padding: 18px 28px 40px; }
.back { display: inline-block; font-family: var(--px); font-size: 19px; text-transform: uppercase; letter-spacing: .06em;
    color: #55503f; text-decoration: none; padding: 2px 0 12px; }
.back:hover { color: #000; }

/* the monitor: a dark surround with round corners, the tube inside */
.monitor { background: var(--bezel); border-radius: 34px; padding: 26px; box-shadow: 0 2px 0 #fff8 inset, 0 18px 30px -18px #0008; }
.screen { position: relative; background: var(--screen); border-radius: 22px; padding: 38px 46px 50px; overflow: hidden;
    box-shadow: 0 0 60px #0f3a15 inset; }
.screen::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, .16) 3px 4px); }

.boot { font-family: var(--px); font-size: 22px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 30px; color: var(--green); line-height: 1.25; }
.boot b { display: block; font-weight: 400; }

h1 { font-family: var(--px); font-weight: 400; font-size: clamp(70px, 14vw, 170px); line-height: .8; margin: 0; color: var(--green);
    letter-spacing: .03em; text-shadow: 0 0 18px rgba(63, 224, 82, .45); }

/* the three phosphors, each with its afterglow */
.stripes { display: grid; grid-template-rows: 5fr 2fr 5fr 2fr 5fr 2fr; row-gap: 0; height: 44px; margin: 20px 0 22px; max-width: 520px; }
.stripes i:nth-child(1) { background: var(--green); } .stripes i:nth-child(2) { background: var(--dim); margin-bottom: 3px; }
.stripes i:nth-child(3) { background: var(--white); } .stripes i:nth-child(4) { background: #85857c; margin-bottom: 3px; }
.stripes i:nth-child(5) { background: var(--amber); } .stripes i:nth-child(6) { background: #7a4a10; }

.lede { font-size: 20px; line-height: 1.55; max-width: 32em; margin: 0 0 8px; color: var(--bright); }
.prompt { font-family: var(--px); text-transform: uppercase; font-size: 22px; margin: 22px 0 6px; color: var(--green); }
.prompt::after { content: ""; display: inline-block; width: .55em; height: .85em; background: var(--green); margin-left: .3em;
    vertical-align: -.08em; 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: 10px 8px 0 0; font-family: var(--px); text-transform: uppercase; background: var(--green);
    color: var(--screen); padding: 6px 16px; text-decoration: none; font-size: 22px; }
.go:hover { background: var(--bright); color: var(--screen); }

.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
figure { margin: 0; }
.shot { border: 8px solid #0d2a12; border-radius: 10px; background: #000; overflow: hidden; }
.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; }

/* a heading is a line of BASIC, its words in reverse as the RVS key prints them */
h2 { font-family: var(--px); text-transform: uppercase; font-size: 26px; font-weight: 400; color: var(--green); margin: 56px 0 14px; letter-spacing: .03em; line-height: 1.1; }
h2 .ln { color: var(--dim); }
h2 .rv { background: var(--green); color: var(--screen); padding: 0 .35em; }

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; display: grid; grid-template-columns: 6.4em 1fr; align-items: baseline; padding: 7px 0; border-bottom: 1px dashed rgba(63, 224, 82, .35); }
.list li b { font-family: var(--px); font-weight: 400; color: var(--bright); text-transform: uppercase; font-size: 19px; line-height: 1; }

.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; }

.listing { font-family: var(--px); text-transform: uppercase; font-size: 21px; line-height: 1.12; margin: 0; color: var(--green); white-space: pre-wrap; overflow-x: auto; }
.listing .rev { background: var(--green); color: var(--screen); }
.listing .hi { color: var(--bright); }
.menu { border: 8px solid #0d2a12; border-radius: 10px; padding: 16px 20px 18px; background: #000; }

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(63, 224, 82, .35); }
th { font-family: var(--px); font-weight: 400; font-size: 19px; line-height: 1.2; text-transform: uppercase; color: var(--bright); white-space: nowrap; width: 9em; }
thead th { color: var(--dim); border-bottom: 2px solid var(--dim); }
kbd { font-family: var(--px); font-size: 17px; text-transform: uppercase; background: var(--green); color: var(--screen); padding: 0 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: 19px; text-transform: uppercase; color: var(--bright); 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; }

/* under the monitor: the name plate, and the small square keys of the first PET */
.plate { display: flex; align-items: center; gap: 16px; margin: 20px 6px 0; }
.plate .name { background: var(--plate); color: #fff; font-family: var(--mono); font-weight: 600; font-size: 13px; letter-spacing: .18em;
    text-transform: uppercase; padding: 7px 16px; border-radius: 3px; white-space: nowrap; }
.plate .rule { flex: 1; height: 2px; background: var(--case-dark); }
.keys { display: grid; grid-template-columns: repeat(auto-fill, 26px); gap: 6px; justify-content: center; margin: 22px 6px 0; padding: 14px;
    background: #2a2a2e; border-radius: 8px; }
.keys i { height: 26px; border-radius: 4px; background: #e9e4d6; box-shadow: 0 2px 0 #8d8878; }

.footer { font-family: var(--px); text-transform: uppercase; font-size: 18px; color: #55503f; padding: 16px 8px 0; display: flex;
    justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 800px) {
    .frame { padding: 10px 10px 28px; }
    .monitor { padding: 12px; border-radius: 20px; }
    .screen { padding: 24px 16px 32px; border-radius: 12px; }
    .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; }
    .keys { display: none; }
}
