/* BioCrafted Portal: the title screen, the menu and the account pages.
 *
 * The board's look (css/portal.css), kept to its own file: warm white on near-black,
 * hairlines, letter-spaced capitals, bracket keys, cards open at two corners. No film grain
 * (the owner, 3 Dec: "remove the graininess in general"; the menu followed the board).
 * The menu is a game's title menu: a world turning behind it, the choices down the left. */

@font-face { font-family: "Inter"; src: url("/fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/SpaceGrotesk-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/SpaceGrotesk-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
/* Big titles: Unbounded, light (SIL Open Font Licence, fonts/Unbounded-OFL.txt; the owner's pick, 1 Dec) */
@font-face { font-family: "Unbounded"; src: url("/fonts/Unbounded-Variable.ttf") format("truetype"); font-weight: 200 900; font-display: swap; }

@property --line { syntax: "<color>"; inherits: true; initial-value: rgba(244, 242, 238, 0.2); }

:root {
  --void: #060608;
  --ink: #f4f2ee;
  --i90: rgb(244 242 238 / 0.9);
  --i80: rgb(244 242 238 / 0.8);
  --i65: rgb(244 242 238 / 0.65);
  --i55: rgb(244 242 238 / 0.55);
  --i40: rgb(244 242 238 / 0.4);
  --i28: rgb(244 242 238 / 0.28);
  --i20: rgb(244 242 238 / 0.2);
  --i14: rgb(244 242 238 / 0.14);
  --i08: rgb(244 242 238 / 0.08);
  --i05: rgb(244 242 238 / 0.05);
  --signal: #ff6b5e;
  --ally: #6fb1ff;
  --text: "Inter", "Helvetica Neue", Arial, sans-serif;
  --head: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --display: "Unbounded", "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --out: cubic-bezier(0.23, 1, 0.32, 1);
  --frame: 18px;
  --open: 12px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--i90);
  font: 400 14px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--i90); text-decoration: none; background: linear-gradient(var(--i28), var(--i28)) 0 100% / 100% 1px no-repeat; transition: background-size 0.2s, color 0.2s; }
a:hover { color: var(--ink); background-image: linear-gradient(var(--i80), var(--i80)); }
::selection { background: rgb(244 242 238 / 0.85); color: var(--void); }
:focus-visible { outline: 1px solid var(--i55); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; letter-spacing: 0.2em; text-transform: uppercase; font-size: 11px; color: var(--i55); }

/* Type */

.lbl { font: 400 10px/1.2 var(--text); letter-spacing: 0.26em; text-transform: uppercase; color: var(--i40); }
.lbl.bad, .bad { color: var(--signal); }
.lbl.good { color: var(--ally); }
.h1 { margin: 0; font: 300 clamp(26px, 2.5vw, 34px)/1.15 var(--display); letter-spacing: 0.005em; color: var(--ink); text-wrap: balance; overflow-wrap: anywhere; }
.h2 { margin: 0; font: 500 12px/1.3 var(--head); letter-spacing: 0.3em; text-transform: uppercase; color: var(--i90); }
.lead { margin: 0; max-width: 46ch; font-size: 15px; line-height: 1.55; color: var(--i65); }
.small { font-size: 12.5px; color: var(--i55); }
kbd {
  display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px;
  font: 500 9.5px/1 var(--head); letter-spacing: 0.04em; color: var(--i80);
  border: 1px solid var(--i20); border-radius: 2px; vertical-align: middle;
}

/* The backdrop: stars, a world turning, and the frame */

#backdrop { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; transition: opacity 0.8s var(--out); }
body.reading #backdrop { opacity: 0.38; }
.frame { position: fixed; inset: var(--frame); z-index: 40; pointer-events: none; border: 1px solid var(--i05); }
.frame .fc { position: absolute; width: 12px; height: 12px; border: 0 solid var(--i40); }
.frame .tl { left: -1px; top: -1px; border-left-width: 1px; border-top-width: 1px; }
.frame .tr { right: -1px; top: -1px; border-right-width: 1px; border-top-width: 1px; }
.frame .bl { left: -1px; bottom: -1px; border-left-width: 1px; border-bottom-width: 1px; }
.frame .br { right: -1px; bottom: -1px; border-right-width: 1px; border-bottom-width: 1px; }
.frame .fn { position: absolute; background: var(--i28); }
.frame .fn.t { top: -1px; left: 50%; width: 1px; height: 7px; }
.frame .fn.b { bottom: -1px; left: 50%; width: 1px; height: 7px; }
.frame .fn.l { left: -1px; top: 50%; width: 7px; height: 1px; }
.frame .fn.r { right: -1px; top: 50%; width: 7px; height: 1px; }

/* The page: the wordmark and you along the top, the menu down the left, the screen */

#menu {
  position: relative; z-index: 10; min-height: 100%;
  padding: calc(var(--frame) + 26px) calc(var(--frame) + 30px) calc(var(--frame) + 24px);
  display: grid; grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: auto 1fr auto; column-gap: 56px;
  grid-template-areas: "top top" "nav main" "foot foot";
}
#menu.bare { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main" "foot"; }
.top { grid-area: top; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 44px; }
.wm { display: inline-flex; align-items: baseline; gap: 14px; white-space: nowrap; background: none; }
.wm b { font: 500 13px/1 var(--head); letter-spacing: 0.46em; text-transform: uppercase; color: var(--ink); }
.wm span { font: 400 9.5px/1 var(--text); letter-spacing: 0.32em; text-transform: uppercase; color: var(--i40); }
.wm:hover { background: none; }
.you { display: inline-flex; align-items: center; gap: 10px; background: none; }
.you .lbl { color: var(--i65); }
.you:hover .lbl { color: var(--ink); }
.helm { width: 15px; height: 15px; flex: none; color: var(--i65); }
nav.nav { grid-area: nav; display: flex; flex-direction: column; gap: 2px; align-self: start; position: sticky; top: 40px; }
main.main, .main { grid-area: main; min-width: 0; max-width: 820px; }
.foot { grid-area: foot; display: flex; flex-wrap: wrap; gap: 8px 26px; padding-top: 40px; }
.foot a, .foot span { font: 400 9.5px/1 var(--text); letter-spacing: 0.24em; text-transform: uppercase; color: var(--i28); background: none; }
.foot a:hover { color: var(--i80); }
.foot span.made { font-size: 11px; letter-spacing: 0.02em; text-transform: none; }

/* A menu item: capitals, brackets round the one you are on, a line under its name */

.mi { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 12px 16px; text-align: left; color: var(--i55); transition: color 0.2s; }
.mi > b { font: 500 12px/1.2 var(--head); letter-spacing: 0.32em; text-transform: uppercase; }
.mi > span { font: 400 9.5px/1.2 var(--text); letter-spacing: 0.24em; text-transform: uppercase; color: var(--i28); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi:hover, .mi:focus-visible, .mi.on { color: var(--ink); outline: none; }
.mi.on > span, .mi:hover > span { color: var(--i55); }
.mi .bk { position: absolute; inset: 0; pointer-events: none; }
.mi:hover .bk i, .mi:focus-visible .bk i, .mi.on .bk i { opacity: 1; transform: none; }
.mi.on .bk i { border-color: var(--i80); }
.mi .dot { position: absolute; right: 12px; top: 13px; width: 5px; height: 5px; border-radius: 50%; background: var(--signal); }
.mi.quiet > b { font-size: 10.5px; color: var(--i40); }
.mi.quiet:hover > b { color: var(--ink); }
.navgap { height: 18px; }

.bk i { position: absolute; width: 6px; height: 6px; border: 0 solid var(--i65); opacity: 0; transition: opacity 0.18s, transform 0.28s var(--out); }
.bk i:nth-child(1) { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; transform: translate(-3px, -3px); }
.bk i:nth-child(2) { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; transform: translate(3px, -3px); }
.bk i:nth-child(3) { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; transform: translate(-3px, 3px); }
.bk i:nth-child(4) { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; transform: translate(3px, 3px); }

/* The title screen */

.title { display: flex; flex-direction: column; justify-content: center; gap: 30px; min-height: 62vh; max-width: 520px; }
.title .wm b { font-size: 30px; letter-spacing: 0.5em; }
.title .wm span { font-size: 12px; letter-spacing: 0.42em; }
.title .wm { flex-direction: column; gap: 16px; }
.title .lead { font-size: 16px; }
.title .choices { display: flex; flex-direction: column; gap: 4px; margin-left: -16px; margin-top: 8px; }
.title .choices .mi > b { font-size: 13px; }

/* Keys: words in brackets */

.kbtn { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 11px 15px; font: 500 10px/1 var(--head); letter-spacing: 0.28em; text-transform: uppercase; color: var(--i65); white-space: nowrap; background: rgb(6 6 8 / 0.55); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.kbtn .bk { position: absolute; inset: 0; pointer-events: none; }
.kbtn .bk i { opacity: 1; transform: none; border-color: var(--i40); }
.kbtn:hover { background: var(--i05); color: var(--ink); }
.kbtn.main { color: var(--ink); }
.kbtn.main .bk i { border-color: var(--i80); }
.kbtn.bad { color: var(--signal); }
.kbtn.bad .bk i { border-color: rgb(255 107 94 / 0.6); }
.kbtn[disabled], .kbtn.busy { opacity: 0.45; pointer-events: none; }
.kbtn kbd { margin: -4px -5px -4px 0; }
.keys { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; }
.linkbtn { font: 400 10px/1.2 var(--text); letter-spacing: 0.24em; text-transform: uppercase; color: var(--i55); padding: 4px 0; background: linear-gradient(var(--i20), var(--i20)) 0 100% / 100% 1px no-repeat; }
.linkbtn:hover { color: var(--ink); }

/* A screen: its name, a line under it, then what it holds */

.screen { display: flex; flex-direction: column; gap: 26px; animation: rise 0.5s var(--out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.screen > header { display: flex; flex-direction: column; gap: 10px; }
.narrow { max-width: 420px; }
.rule { height: 1px; background: var(--i14); border: 0; margin: 4px 0; }
.note { padding: 12px 14px; border-left: 2px solid var(--i28); background: rgb(244 242 238 / 0.03); font-size: 13px; color: var(--i65); }
.note.bad { border-left-color: var(--signal); color: var(--i80); }
.note.good { border-left-color: var(--ally); color: var(--i80); }
.note .keys { margin-top: 10px; }

/* Forms: a label, a line to write on */

form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field input:not([type="checkbox"]), .field textarea, .field select {
  width: 100%; padding: 8px 0 9px; border: 0; border-bottom: 1px solid var(--i28); border-radius: 0; background: transparent;
  font-size: 15.5px; color: var(--ink); outline: none; transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus { border-bottom-color: var(--i80); }
.field input::placeholder { color: var(--i28); }
.field .hint { font-size: 12px; color: var(--i40); }
.field .err { font-size: 12.5px; color: var(--signal); min-height: 0; }
.field.bad input { border-bottom-color: var(--signal); }
.formerr { font-size: 13px; color: var(--signal); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 24px; }
.row .v { font: 400 10.5px/1.2 var(--text); letter-spacing: 0.2em; text-transform: uppercase; color: var(--i90); text-align: right; }

/* A card: a thin frame left open at two corners */

.card {
  --line: var(--i20);
  --fill: rgb(12 12 15 / 0.82);
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; text-align: left;
  background:
    linear-gradient(var(--line), var(--line)) top right / calc(100% - var(--open)) 1px no-repeat,
    linear-gradient(var(--line), var(--line)) top right / 1px calc(100% - var(--open)) no-repeat,
    linear-gradient(var(--line), var(--line)) bottom left / calc(100% - var(--open)) 1px no-repeat,
    linear-gradient(var(--line), var(--line)) bottom left / 1px calc(100% - var(--open)) no-repeat,
    var(--fill);
  transition: --line 0.22s, transform 0.28s var(--out);
}
button.card:hover, a.card:hover, .card.on { --line: var(--i65); }
button.card:focus-visible { --line: var(--i80); outline: none; }

/* Save slots: your files */

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 18px; }
.slot { min-height: 176px; justify-content: space-between; cursor: pointer; }
.slot .plate { display: flex; align-items: baseline; gap: 10px; }
.slot .plate b { font: 700 12px/1 var(--head); color: var(--i80); }
.slot .nm { font: 500 13px/1.35 var(--head); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink); overflow-wrap: anywhere; }
.slot .crew { display: flex; gap: 5px; }
.slot .meta { display: flex; flex-direction: column; gap: 7px; }
.slot .badge { align-self: flex-start; padding: 4px 7px; border: 1px solid var(--i28); font: 500 8.5px/1 var(--head); letter-spacing: 0.28em; color: var(--i80); text-transform: uppercase; }
.slot .badge.paid { border-color: var(--i65); color: var(--ink); }
.slot .gear { position: absolute; right: 12px; top: 12px; padding: 6px; color: var(--i40); }
.slot .gear:hover { color: var(--ink); }
.slot.empty { align-items: center; justify-content: center; --line: var(--i14); --fill: rgb(12 12 15 / 0.4); color: var(--i40); }
.slot.empty:hover { color: var(--ink); }
.slot.empty b { font: 500 11px/1 var(--head); letter-spacing: 0.3em; text-transform: uppercase; }

/* Choices drawn as cards: personal or shared, how to start */

.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.opt { cursor: pointer; gap: 8px; }
.opt b { font: 500 11px/1.2 var(--head); letter-spacing: 0.3em; text-transform: uppercase; color: var(--i80); }
.opt span { font-size: 13px; color: var(--i55); }
.opt.on { --line: var(--i80); --fill: rgb(244 242 238 / 0.045); }
.opt.on b { color: var(--ink); }
.opt .tick { position: absolute; right: 14px; top: 14px; width: 9px; height: 9px; border: 1px solid var(--i40); border-radius: 50%; }
.opt.on .tick { background: var(--ink); border-color: var(--ink); }

/* Tabs, as the game's dossier has them */

.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--i14); }
.tab { position: relative; padding: 0 0 10px; font: 400 10px/1 var(--text); letter-spacing: 0.26em; text-transform: uppercase; color: var(--i55); }
.tab:hover { color: var(--i90); }
.tab.on { color: var(--ink); }
.tab.on::after { content: ""; position: absolute; left: 0; right: 0.26em; bottom: -1px; height: 1px; background: var(--i80); }

/* People in a file */

.people { display: flex; flex-direction: column; }
.person { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--i08); }
.person .who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.person .who b { font-weight: 400; color: var(--i90); }
.person .who span { font-size: 12px; color: var(--i40); overflow: hidden; text-overflow: ellipsis; }
.person .acts { display: flex; gap: 14px; align-items: center; }
.copy { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--i14); font: 400 12.5px/1.3 var(--text); color: var(--i80); overflow: hidden; }
.copy code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: inherit; }

/* Plans, side by side */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.plan { gap: 14px; }
.price { display: flex; align-items: baseline; gap: 8px; }
.price b { font: 500 30px/1 var(--head); color: var(--ink); letter-spacing: 0.02em; }
.price span { color: var(--i55); font-size: 12.5px; }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plan li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; font-size: 13.5px; color: var(--i80); }
.plan li::before { content: ""; width: 7px; height: 7px; margin-top: 6px; border: 1px solid var(--i55); border-radius: 50%; }
.plan.paid li::before { background: var(--i80); border-color: var(--i80); }
.plan li small { display: block; color: var(--i40); font-size: 12px; }
.plan.current { --line: var(--i65); }

/* History of a file */

.versions { display: flex; flex-direction: column; }
.version { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--i08); }

/* Colours to pick, as helmets */

.palette { display: flex; flex-wrap: wrap; gap: 10px; }
.palette button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid transparent; }
.palette button.on { border-color: var(--i65); }
.palette .helm { width: 22px; height: 22px; }

/* The test checkout */

.testpay { gap: 18px; max-width: 440px; }
.warn { font: 500 9.5px/1.4 var(--head); letter-spacing: 0.3em; text-transform: uppercase; color: var(--signal); }

/* Something said for a moment */

.toast {
  position: fixed; left: 50%; bottom: calc(var(--frame) + 22px); z-index: 60; translate: -50% 20px; opacity: 0; pointer-events: none;
  padding: 11px 16px; background: rgb(14 14 18 / 0.96); border: 1px solid var(--i20); font-size: 13px; color: var(--i90);
  transition: opacity 0.25s, translate 0.35s var(--out);
}
.toast.on { opacity: 1; translate: -50% 0; }
.toast.bad { border-color: rgb(255 107 94 / 0.55); }

/* Small screens */

@media (max-width: 860px) {
  #menu { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "nav" "main" "foot"; padding: calc(var(--frame) + 18px) calc(var(--frame) + 14px); }
  nav.nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 0; margin: -10px 0 26px -14px; }
  .mi { padding: 10px 12px; }
  .mi > span { display: none; }
  .navgap { display: none; }
  .top { padding-bottom: 26px; }
  .title { min-height: 54vh; }
  .title .wm b { font-size: 22px; }
}

.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* OORT by BioCraftEd: the logotype, the studio in its own casing beside it */
.wm { align-items: center; }
.wm svg.oort { width: auto; height: 19px; color: var(--ink); flex: none; overflow: visible; }
.wm span { font: 400 12.5px/1 var(--text); letter-spacing: 0.01em; text-transform: none; color: var(--i55); }
.title .wm svg.oort { height: 64px; }
.title .wm span { font-size: 16px; letter-spacing: 0.01em; }

/* Reports: what people sent from the board's Report key (BioCraftEd's own accounts) */
.reports { display: grid; gap: 16px; }
.report { gap: 12px; }
.report-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.report-text { margin: 0; font: 400 15px/1.55 var(--text); color: var(--i90); white-space: pre-wrap; overflow-wrap: anywhere; }
.report-from { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--i65); }
.report-place { display: grid; grid-template-columns: max-content 1fr; gap: 7px 16px; margin: 0; font-size: 12.5px; color: var(--i55); }
.report-place dt { align-self: center; }
.report-place dd { margin: 0; overflow-wrap: anywhere; }
.report .keys { justify-content: flex-end; }
.reports.done .report { opacity: 0.55; transition: opacity 0.2s; }
.reports.done .report:hover, .reports.done .report:focus-within { opacity: 0.9; }

/* A file's API keys (menu.js keysTab) */
.choices { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 2px; }
.choice { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 13px; color: var(--i80); cursor: pointer; }
.choice input { margin: 2px 0 0; accent-color: var(--ink); }
.field select { cursor: pointer; }
.field select option { background: var(--void); color: var(--ink); }
.choice input:disabled + span { color: var(--i40); }
.choice span { display: flex; flex-direction: column; gap: 2px; }
.choice code { font: 400 12.5px/1.3 var(--text); letter-spacing: 0.02em; color: var(--i90); }
.choice small { font-size: 12px; color: var(--i40); }
.planet { padding-left: 26px; }
.key .who span + span { color: var(--i28); }
.note .copy { margin-top: 10px; }
