/* frerk.co/trek: a 1990s Star Trek fan page, in the style of the TNG computer screens.
   One post only; the rest of the site keeps style.css. No external fonts or images. */
:root {
  --orange: #ff9900; --peach: #ffcc99; --lav: #cc99cc; --purple: #9999ff;
  --blue: #99ccff; --red: #cc6666; --gold: #ffcc66; --tan: #ff9966;
  --text: #dfe5ff; --dim: #8f96b8;
  --lcars: "Helvetica Neue", "Arial Narrow", "Roboto Condensed", "Liberation Sans Narrow", Arial, sans-serif;
  --nineties: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  --arm: 22px; --col: 160px; --fillet: 28px;
}
* { box-sizing: border-box; }
html { background: #000; -webkit-text-size-adjust: 100%; }
body.trek { margin: 0; background: #000; color: var(--text); font: 16px/1.65 Verdana, Geneva, "DejaVu Sans", sans-serif; overflow-x: hidden; }

.stars { position: fixed; inset: 0; z-index: -1; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='207' cy='196' r='1.0' fill-opacity='0.70'/%3E%3Ccircle cx='24' cy='387' r='0.5' fill-opacity='0.94'/%3E%3Ccircle cx='415' cy='381' r='0.8' fill-opacity='0.62'/%3E%3Ccircle cx='70' cy='299' r='0.6' fill-opacity='0.95'/%3E%3Ccircle cx='76' cy='89' r='1.2' fill-opacity='0.91'/%3E%3Ccircle cx='73' cy='125' r='1.1' fill-opacity='0.69'/%3E%3Ccircle cx='408' cy='48' r='1.1' fill-opacity='0.67'/%3E%3Ccircle cx='110' cy='306' r='0.6' fill-opacity='0.99'/%3E%3Ccircle cx='301' cy='122' r='0.6' fill-opacity='0.72'/%3E%3Ccircle cx='71' cy='339' r='0.9' fill-opacity='0.79'/%3E%3Ccircle cx='2' cy='201' r='1.2' fill-opacity='0.74'/%3E%3Ccircle cx='102' cy='232' r='1.5' fill-opacity='0.79'/%3E%3Ccircle cx='190' cy='284' r='0.6' fill-opacity='0.99'/%3E%3Ccircle cx='78' cy='160' r='0.4' fill-opacity='0.86'/%3E%3Ccircle cx='292' cy='34' r='0.5' fill-opacity='0.76'/%3E%3Ccircle cx='405' cy='385' r='1.2' fill-opacity='0.89'/%3E%3Ccircle cx='398' cy='244' r='1.3' fill-opacity='0.93'/%3E%3Ccircle cx='69' cy='410' r='0.8' fill-opacity='0.84'/%3E%3Ccircle cx='105' cy='106' r='0.4' fill-opacity='0.91'/%3E%3Ccircle cx='139' cy='183' r='0.6' fill-opacity='0.97'/%3E%3Ccircle cx='63' cy='104' r='0.9' fill-opacity='0.98'/%3E%3Ccircle cx='394' cy='233' r='1.2' fill-opacity='0.84'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='148' cy='98' r='0.8' fill-opacity='0.80'/%3E%3Ccircle cx='128' cy='232' r='0.5' fill-opacity='0.62'/%3E%3Ccircle cx='190' cy='232' r='0.4' fill-opacity='0.73'/%3E%3Ccircle cx='229' cy='206' r='0.8' fill-opacity='0.42'/%3E%3Ccircle cx='2' cy='233' r='0.7' fill-opacity='0.55'/%3E%3Ccircle cx='32' cy='181' r='0.8' fill-opacity='0.83'/%3E%3Ccircle cx='224' cy='86' r='0.9' fill-opacity='0.80'/%3E%3Ccircle cx='83' cy='77' r='0.9' fill-opacity='0.41'/%3E%3Ccircle cx='88' cy='185' r='0.4' fill-opacity='0.66'/%3E%3Ccircle cx='145' cy='170' r='0.5' fill-opacity='0.47'/%3E%3Ccircle cx='239' cy='33' r='0.4' fill-opacity='0.37'/%3E%3Ccircle cx='105' cy='53' r='0.7' fill-opacity='0.47'/%3E%3Ccircle cx='84' cy='4' r='0.7' fill-opacity='0.49'/%3E%3Ccircle cx='160' cy='130' r='0.7' fill-opacity='0.69'/%3E%3Ccircle cx='52' cy='163' r='0.5' fill-opacity='0.40'/%3E%3Ccircle cx='149' cy='221' r='0.6' fill-opacity='0.82'/%3E%3Ccircle cx='37' cy='105' r='0.9' fill-opacity='0.59'/%3E%3Ccircle cx='1' cy='223' r='0.4' fill-opacity='0.69'/%3E%3Ccircle cx='173' cy='137' r='0.4' fill-opacity='0.48'/%3E%3Ccircle cx='159' cy='174' r='0.7' fill-opacity='1.00'/%3E%3Ccircle cx='34' cy='206' r='0.7' fill-opacity='0.99'/%3E%3Ccircle cx='100' cy='153' r='0.7' fill-opacity='0.65'/%3E%3Ccircle cx='141' cy='5' r='0.9' fill-opacity='0.95'/%3E%3Ccircle cx='38' cy='61' r='0.5' fill-opacity='0.79'/%3E%3Ccircle cx='134' cy='9' r='0.5' fill-opacity='0.80'/%3E%3Ccircle cx='87' cy='178' r='0.6' fill-opacity='0.83'/%3E%3Ccircle cx='149' cy='132' r='0.8' fill-opacity='0.77'/%3E%3Ccircle cx='171' cy='144' r='0.8' fill-opacity='0.41'/%3E%3Ccircle cx='30' cy='53' r='0.5' fill-opacity='0.81'/%3E%3Ccircle cx='164' cy='211' r='0.8' fill-opacity='0.63'/%3E%3Ccircle cx='1' cy='115' r='0.4' fill-opacity='0.88'/%3E%3Ccircle cx='228' cy='188' r='0.4' fill-opacity='0.61'/%3E%3Ccircle cx='82' cy='98' r='0.7' fill-opacity='0.80'/%3E%3Ccircle cx='36' cy='13' r='0.7' fill-opacity='0.39'/%3E%3Ccircle cx='36' cy='178' r='0.4' fill-opacity='0.70'/%3E%3Ccircle cx='142' cy='218' r='0.9' fill-opacity='0.67'/%3E%3Ccircle cx='116' cy='67' r='0.4' fill-opacity='0.47'/%3E%3Ccircle cx='107' cy='129' r='0.9' fill-opacity='0.61'/%3E%3Ccircle cx='25' cy='116' r='0.5' fill-opacity='0.81'/%3E%3Ccircle cx='163' cy='78' r='0.4' fill-opacity='0.80'/%3E%3Ccircle cx='143' cy='154' r='0.5' fill-opacity='0.75'/%3E%3Ccircle cx='30' cy='82' r='0.4' fill-opacity='0.85'/%3E%3Ccircle cx='123' cy='125' r='0.5' fill-opacity='0.49'/%3E%3Ccircle cx='145' cy='233' r='0.7' fill-opacity='0.36'/%3E%3Ccircle cx='136' cy='109' r='0.4' fill-opacity='0.81'/%3E%3Ccircle cx='53' cy='12' r='0.6' fill-opacity='0.79'/%3E%3C/g%3E%3C/svg%3E"); background-color: #000;
  animation: drift 240s linear infinite; }
@keyframes drift { from { background-position: 0 0, 0 0; } to { background-position: -840px 420px, -240px 120px; } }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 6px 10px; z-index: 20; font-family: var(--lcars); font-weight: 700; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid #ffff00; outline-offset: 2px; }

/* ---------------------------------------------------------------- the console frame */
.console { max-width: 1080px; margin: 0 auto; padding: 12px 12px 96px; display: grid;
  grid-template-columns: var(--col) minmax(0, 1fr); grid-template-rows: 64px auto 56px; }
.elbow, .seg, .btn { font-family: var(--lcars); font-stretch: condensed; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #000; }
.top-elbow { grid-area: 1 / 1; background: var(--orange); border-top-left-radius: 56px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 12px 4px; }
.top-elbow a { color: #000; text-decoration: none; font-size: 17px; }
.bottom-elbow { grid-area: 3 / 1; background: var(--lav); border-bottom-left-radius: 48px; }
.arm { position: relative; display: flex; gap: 6px; min-width: 0; }
.top-arm { grid-area: 1 / 2; align-items: flex-start; }
.bottom-arm { grid-area: 3 / 2; align-items: flex-end; }
.arm::before { content: ""; position: absolute; left: 0; width: var(--fillet); height: var(--fillet); }
.top-arm::before { top: var(--arm); background: radial-gradient(circle at 100% 100%, transparent calc(var(--fillet) - .5px), var(--orange) var(--fillet)); }
.bottom-arm::before { bottom: var(--arm); background: radial-gradient(circle at 100% 0, transparent calc(var(--fillet) - .5px), var(--lav) var(--fillet)); }
.seg { height: var(--arm); font-size: 14px; line-height: var(--arm); padding: 0 10px; white-space: nowrap; overflow: hidden; text-align: right; }
.top-arm .s1 { flex: 1 1 30%; background: var(--orange); }
.top-arm .s2 { flex: 0 1 auto; background: var(--peach); }
.top-arm .s3 { flex: 0 0 48px; background: var(--purple); }
.top-arm .s4 { flex: 0 0 auto; background: var(--red); border-radius: 0 11px 11px 0; }
.bottom-arm .s1 { flex: 1 1 40%; background: var(--lav); }
.bottom-arm .s3 { flex: 0 1 auto; background: var(--blue); }
.bottom-arm .s4 { flex: 0 0 40px; background: var(--gold); border-radius: 0 11px 11px 0; }

.side { grid-area: 2 / 1; display: flex; flex-direction: column; gap: 5px; padding: 5px 0; }
.btn { display: flex; align-items: flex-end; justify-content: flex-end; gap: 6px; min-height: 52px; padding: 0 12px 5px; border: 0; border-radius: 0;
  font-size: 16px; text-decoration: none; text-align: right; cursor: pointer; }
.btn small { font-size: 11px; opacity: .7; }
a.btn:hover, button.btn:hover { filter: brightness(1.15); }
a.btn:active, button.btn:active { background: #fff; }
.c1 { background: var(--peach); } .c2 { background: var(--lav); } .c3 { background: var(--tan); }
.c4 { background: var(--blue); } .c5 { background: var(--gold); cursor: default; } .c6 { background: var(--purple); cursor: default; }
.side .grow { flex: 1 1 auto; min-height: 40px; }
body.midi-on #midi-toggle { background: var(--orange); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { filter: brightness(1.35); } }

.screen { grid-area: 2 / 2; min-width: 0; padding: 26px 8px 34px 40px; }

/* ---------------------------------------------------------------- 1997 */
.marquee { overflow: hidden; background: #000080; border: 3px ridge #c0c0c0; margin: 0 0 26px; }
.marquee p { margin: 0; padding: 4px 0; white-space: nowrap; display: inline-block; padding-left: 100%;
  font: 700 15px var(--nineties); color: #ffff00; animation: marquee 26s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.marquee:hover p { animation-play-state: paused; }
hr.rainbow { border: 0; height: 6px; margin: 30px 0; background: linear-gradient(90deg, #f00, #f90, #ff0, #0f0, #0ff, #00f, #f0f); }
.blink, .engage { animation: blink 1.1s steps(1, end) infinite; }
@keyframes blink { 50% { visibility: hidden; } }

.log-head .meta { margin: 0 0 6px; font-family: var(--lcars); font-stretch: condensed; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--lav); font-size: 15px; }
.log-head .meta span + span::before { content: " \2022  "; color: var(--orange); }
.log-head h1 { margin: 0; font-family: var(--lcars); font-stretch: condensed; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  color: var(--orange); font-size: clamp(2.3rem, 6.5vw, 3.9rem); line-height: 1; outline: none; }
.log-head .dek { margin: 10px 0 0; color: var(--peach); font-size: 18px; }
.engage { margin: 14px 0 0; font: 700 14px var(--nineties); color: #00ff66; }
.engage[hidden], body.midi-on .engage { display: none; }

/* ---------------------------------------------------------------- the log */
.prose { max-width: 42em; }
.prose p { margin: 0 0 1.05em; }
.prose > p:first-child { text-align: center; color: var(--lav); margin-bottom: 1.6em; }
.prose strong { color: var(--peach); }
.prose em { color: #ffe3c4; }
.prose a { color: var(--blue); }
.prose a:visited { color: var(--lav); }
.prose .sd { font-family: "Courier New", Courier, monospace; font-size: 15px; color: var(--blue); padding-left: 14px; border-left: 4px solid var(--purple); }
.prose .sd em { color: inherit; }
.prose .who { font-family: var(--lcars); font-stretch: condensed; font-weight: 700; font-style: normal; text-transform: uppercase; letter-spacing: .06em; color: var(--orange); }
.prose strong .who { color: var(--orange); }
.prose ul { padding-left: 1.4em; list-style-type: "\2726  "; }
.prose li::marker { color: var(--gold); }
.prose img { max-width: 100%; height: auto; border: 3px ridge #c0c0c0; }

/* ---------------------------------------------------------------- the bottom of every good fan page */
.nineties { text-align: center; font-family: "Times New Roman", Times, serif; font-size: 17px; color: #fff; }
.nineties p { margin: 0 0 16px; }
.construction { background: repeating-linear-gradient(-45deg, #ffcc00 0 14px, #000 14px 28px); padding: 8px; border: 2px solid #ffcc00; }
.construction span { background: #000; color: #ffcc00; padding: 2px 12px; font: 700 15px var(--lcars); font-stretch: condensed; text-transform: uppercase; letter-spacing: .12em; }
.digits { display: inline-block; font: 700 18px "Courier New", Courier, monospace; letter-spacing: 4px; color: #33ff33; background: #000; border: 3px inset #888; padding: 0 2px 0 6px; }
.blink { font-family: var(--nineties); color: #ff66ff; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.badge { width: 88px; height: 31px; display: inline-flex; flex-direction: column; justify-content: center; align-items: center; border: 2px outset #ddd;
  font: 9px/1.05 Verdana, Geneva, sans-serif; text-transform: uppercase; overflow: hidden; }
.badge b { font-size: 11px; letter-spacing: .02em; }
.b1 { background: #000080; color: #ffff00; } .b2 { background: #c0c0c0; color: #000; } .b3 { background: #fff; color: #0000aa; }
.b4 { background: #006600; color: #ccffcc; } .b5 { background: #000; color: var(--orange); border-color: var(--orange); }
.webring a { color: #00ffff; }
.webring a:visited { color: #ff99ff; }
.disclaimer { font: 11px/1.4 Verdana, Geneva, sans-serif; color: var(--dim); max-width: 34em; margin-inline: auto !important; }

/* ---------------------------------------------------------------- the embedded player */
.midi-box { position: fixed; right: 12px; bottom: 12px; z-index: 10; display: flex; align-items: center; gap: 6px; padding: 4px 6px;
  background: #c0c0c0; color: #000; border: 2px outset #fff; box-shadow: 2px 2px 0 #000; font: 12px Tahoma, Geneva, Verdana, sans-serif; }
.midi-box .file { font-weight: 700; }
.midi-box .status { color: #333; font-style: italic; min-width: 6.2em; }
.midi-box button, .midi-box a { width: 24px; height: 22px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  background: #c0c0c0; color: #000; border: 2px outset #fff; font: 11px Tahoma, Geneva, sans-serif; text-decoration: none; cursor: pointer; }
.midi-box button:active, .midi-box a:active { border-style: inset; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; width: 18px; }
.eq i { width: 3px; height: 3px; background: #008000; }
body.midi-on .eq i { animation: eq .5s ease-in-out infinite alternate; }
body.midi-on .eq i:nth-child(2) { animation-delay: -.2s; } body.midi-on .eq i:nth-child(3) { animation-delay: -.35s; } body.midi-on .eq i:nth-child(4) { animation-delay: -.1s; }
@keyframes eq { from { height: 3px; } to { height: 14px; } }

/* ---------------------------------------------------------------- phones: the console folds into bars */
@media (max-width: 720px) {
  body.trek { font-size: 15.5px; }
  .console { padding: 10px 10px 92px; grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: 40px auto auto 32px; row-gap: 6px; }
  .top-elbow { border-radius: 20px 0 0 20px; padding: 0 10px; align-items: center; }
  .top-elbow a { font-size: 15px; }
  .top-arm, .bottom-arm { align-items: stretch; }
  .arm::before { display: none; }
  .seg { height: auto; line-height: 40px; }
  .top-arm .s2 { display: none; }
  .side { grid-area: 2 / 1 / 3 / 3; flex-direction: row; flex-wrap: wrap; padding: 0; }
  .btn { flex: 1 1 auto; min-height: 36px; padding: 0 12px 4px; font-size: 14px; }
  .btn small, .side .filler { display: none; }
  .side .btn:first-child { border-radius: 18px 0 0 18px; }
  .side .c4 { border-radius: 0 18px 18px 0; }
  .screen { grid-area: 3 / 1 / 4 / 3; padding: 18px 4px 24px; }
  .bottom-elbow { grid-area: 4 / 1; border-radius: 0 0 0 16px; }
  .bottom-arm { grid-area: 4 / 2; }
  .bottom-arm .seg { line-height: 32px; font-size: 13px; }
  .marquee { margin-bottom: 20px; }
  .midi-box { right: 8px; bottom: 8px; left: 8px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .stars, .blink, .engage, .eq i, body.midi-on #midi-toggle { animation: none !important; }
  .marquee p { animation-duration: 40s; }
}
