/* SPDX-License-Identifier: MIT -- Amalthea website (the frame after Tonitor's, Norilsk's and Bigorna's;
   the skin from the appliance itself: black glass, cream, the horn's ember, Tracker mint and FX violet) */
:root {
  --bg: #050708;
  --plate: #0b0f12;          /* the content's plate */
  --plate2: #111719;
  --line: #1f2a30;
  --fg: #f2ede2;             /* the horn's cream */
  --cream: #f2ede2;
  --dim: #a3aeb4;            /* slate, as MUSICAL INSTRUMENTS on the boot screen */
  --slate: #55636b;
  --hot: #e8603c;            /* the horn's ember: the one accent */
  --mint: #6ee7dc;           /* TRACKER */
  --violet: #b39aff;         /* FX */
  --blood: #ff6b7d;          /* LIFEBLOOD */
  --link: #f6d7c8;
  --warn: #ff5a4a;
  --ok: #6ee7a8;
  --side: 250px;
  --max: 880px;
  --head: "Oxanium", "Arial Narrow", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--fg);
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  background-color: var(--bg);
  /* Jupiter's sky: a faint red moon low on the left, a fine star grid */
  background-image:
    radial-gradient(ellipse 60% 45% at 8% 100%, rgba(232, 96, 60, 0.10), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(242, 237, 226, 0.05) 1px, transparent 1.2px);
  background-size: auto, 26px 26px;
  background-attachment: fixed;
}
/* the boot screen's rule, across the top */
body::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 30;
  background: linear-gradient(90deg, var(--hot), #f08a5f 40%, var(--mint) 70%, var(--violet));
}
a { color: var(--link); text-decoration-color: rgba(232, 96, 60, 0.6); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: var(--hot); }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88em; }
code { background: var(--plate2); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.35em; }
pre { background: #070a0c; border: 1px solid var(--line); border-left: 3px solid var(--hot); border-radius: 4px;
      padding: 14px 16px; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; }
img { max-width: 100%; }

/* the frame: the menu down the left, the content on a plate beside it */
.layout { display: flex; min-height: 100vh; padding-top: 4px; }
.side {
  width: var(--side); flex: none; position: sticky; top: 4px; align-self: flex-start; height: calc(100vh - 4px);
  padding: 26px 20px; background: rgba(5, 7, 8, 0.92); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.brand { display: block; text-decoration: none; }
.brand img { display: block; width: 100%; height: auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 22px;
       margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.menu-btn, .menu-close, .menu-shade { display: none; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { color: var(--dim); text-decoration: none; padding: 7px 12px; border-left: 3px solid transparent;
              font-family: var(--head); font-weight: 600; font-size: 17px; letter-spacing: 0.16em; text-transform: uppercase; }
.side nav a:hover { color: var(--fg); background: var(--plate2); }
.side nav a[aria-current="page"] { color: var(--fg); background: var(--plate2); border-left-color: var(--hot); }
.donate { margin: auto 0 0; padding-top: 28px; border-top: 1px solid var(--line); display: flex; justify-content: center; }
.donate input[type="image"] { display: block; }
.donate-foot { display: none; }

.content { flex: 1; min-width: 0; padding: 28px 40px 0; }
main { max-width: var(--max); padding: 34px 40px 44px; background-color: rgba(11, 15, 18, 0.96);
       border: 1px solid var(--line); border-radius: 6px; }
main h1, main h2, main h3 { font-family: var(--head); text-transform: uppercase; color: var(--cream); font-weight: 600; }
main h1 { font-size: 40px; line-height: 1.1; margin: 0 0 16px; letter-spacing: 0.08em; }
main h2 { font-size: 27px; line-height: 1.15; margin: 50px 0 12px; padding-top: 16px; border-top: 1px solid var(--line);
          letter-spacing: 0.12em; }
main h2::after { content: ""; display: block; width: 72px; height: 3px; margin-top: 10px; background: var(--hot); }
main h3 { font-size: 20px; margin: 30px 0 8px; letter-spacing: 0.1em; color: var(--dim); }
main h2, main h3 { scroll-margin-top: 24px; }
p.note { color: var(--dim); font-size: 15px; }

/* home */
.hero { padding: 4px 0 6px; }
.hero .eyebrow { font-family: var(--head); color: var(--dim); letter-spacing: 0.32em; font-size: 15px; text-transform: uppercase; margin: 0 0 12px; }
.hero h1 { font-size: 34px; line-height: 1.2; max-width: 22em; margin: 0; letter-spacing: 0.04em; }
.hero p { color: var(--dim); font-size: 19px; max-width: 38em; margin: 14px 0 0; }
.hero p b { color: var(--fg); }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-block; padding: 10px 22px; font-weight: 600; text-decoration: none; border: 2px solid var(--cream);
       color: var(--fg); background: transparent; font-size: 16px; cursor: pointer; font-family: var(--head);
       letter-spacing: 0.16em; text-transform: uppercase; border-radius: 4px; }
.btn.primary { background: var(--hot); border-color: var(--hot); color: #160a06; }
.btn:hover { background: var(--plate2); color: #fff; }
.btn.primary:hover { background: #ff7a52; border-color: #ff7a52; color: #160a06; }

.hero-shot { margin: 30px 0 0; display: block; width: 100%; border-radius: 10px; border: 1px solid var(--line);
             box-shadow: 0 30px 60px -30px rgba(232, 96, 60, 0.35); }

/* the three instruments */
.machines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 0; }
.machine { --accent: var(--hot); background-color: var(--plate2); border: 1px solid var(--line); border-top: 3px solid var(--accent);
           border-radius: 6px; padding: 0 0 18px; overflow: hidden; }
.machine.tracker { --accent: var(--mint); } .machine.fx { --accent: var(--violet); } .machine.lifeblood { --accent: var(--blood); }
.machine img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--line); }
main .machine h3 { margin: 16px 18px 4px; font-size: 20px; color: var(--accent); letter-spacing: 0.18em; }
.machine p { margin: 6px 18px 0; color: var(--dim); font-size: 16px; line-height: 1.5; }

/* stock against Amalthea, as layers */
.stack { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0 6px; }
.stack figure { margin: 0; background: var(--plate2); border: 1px solid var(--line); border-radius: 6px; padding: 16px 16px 12px; }
.stack figcaption { font-family: var(--head); letter-spacing: 0.16em; text-transform: uppercase; font-size: 14px; color: var(--dim); margin: 0 0 10px; }
.stack ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.stack li { padding: 7px 12px; border: 1px solid var(--line); border-radius: 4px; font-size: 15px; line-height: 1.35; background: #0a0e10; }
.stack li small { display: block; color: var(--dim); font-size: 13px; }
.stack .gone li { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(255, 90, 74, 0.7); }
.stack .gone li.kept { color: var(--fg); text-decoration: none; }
.stack .new li { border-color: rgba(232, 96, 60, 0.45); }
.stack .new li.app { border-color: var(--hot); background: rgba(232, 96, 60, 0.12); font-weight: 700; }
.stack .new li.kept { border-color: var(--line); }

.features { display: grid; grid-template-columns: max-content 1fr; gap: 8px 26px; margin: 16px 0 0; }
.features dt { font-weight: 700; }
.features dd { margin: 0; color: var(--dim); }

/* the screen, as the appliance draws it */
.shots { display: grid; gap: 26px; margin: 26px 0 0; }
.shot { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; padding-top: 26px;
        border-top: 1px solid var(--line); }
.shot img { display: block; width: 320px; height: auto; border: 6px solid #000; border-radius: 10px;
            outline: 1px solid var(--line); box-sizing: content-box; }
main .shot h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: 22px; }
main .shot h2::after { display: none; }
.shot p { margin: 0 0 8px; color: var(--dim); }
.shot .app-tag { font-family: var(--head); font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; }
.app-tag.tracker { color: var(--mint); } .app-tag.fx { color: var(--violet); } .app-tag.lifeblood { color: var(--blood); } .app-tag.system { color: var(--hot); }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 16px 0 0; }
.steps > li { counter-increment: s; position: relative; padding: 4px 0 14px 54px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border: 2px solid var(--hot);
                      border-radius: 50%; color: var(--cream); display: grid; place-items: center; font-weight: 600; font-family: var(--head); font-size: 19px; }
.steps ul, .steps ol { margin: 6px 0; }

.warn { border: 1px solid rgba(255, 90, 74, 0.5); border-left: 5px solid var(--warn); border-radius: 4px; padding: 14px 18px;
        margin: 22px 0; background: rgba(255, 90, 74, 0.07); }
.warn p { margin: 0 0 8px; } .warn p:last-child { margin: 0; }
.warn strong:first-child { font-family: var(--head); letter-spacing: 0.12em; text-transform: uppercase; color: #ff8a7d; }
.tip { border-left: 4px solid var(--mint); padding: 10px 18px; margin: 18px 0; background: rgba(110, 231, 220, 0.06); border-radius: 0 4px 4px 0; }
.tip p { margin: 0; }

.os-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.os { background: var(--plate2); border: 1px solid var(--line); border-radius: 6px; padding: 16px 20px; margin: 12px 0; }
.os h3 { margin-top: 0 !important; }

footer { padding: 24px 0 40px; color: var(--dim); font-size: 15px; max-width: var(--max); }
footer p { margin: 4px 0; }

/* documents (manual, changelog) */
main table { border-collapse: collapse; width: 100%; margin: 14px 0; display: block; overflow-x: auto; }
main th, main td { border: 1px solid var(--line); padding: 8px 12px; vertical-align: top; text-align: left; }
main th { background: var(--plate2); font-family: var(--head); text-transform: uppercase; letter-spacing: 0.1em; font-size: 14px; font-weight: 600; }
main td:first-child { white-space: nowrap; }
main blockquote { border-left: 4px solid var(--slate); margin: 16px 0; padding: 4px 18px; color: var(--dim); }
.toc { border-left: 3px solid var(--line); padding: 4px 0 4px 18px; columns: 2 240px; margin: 20px 0; }
.toc a { display: block; padding: 2px 0; text-decoration: none; }
.toc a.sub { padding-left: 16px; color: var(--dim); }

/* other projects */
p.lead { font-size: 20px; color: var(--dim); margin: 0; max-width: 36em; }
.projects { display: grid; gap: 24px; margin: 34px 0 0; }
.project { background-color: var(--plate2); border: 1px solid var(--line); border-top: 3px solid var(--slate); border-radius: 6px;
           padding: 24px 28px 26px; }
.project-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 18px; }
main .project h2 { margin: 0; padding: 0; border: 0; font-size: 26px; }
main .project h2::after, main .app h2::after { display: none; }
.device { color: var(--dim); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.project > p { margin: 12px 0 0; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn.small { padding: 6px 14px; font-size: 13px; white-space: nowrap; }
.editions { list-style: none; padding: 0; margin: 18px 0 0; border-top: 1px solid var(--line); }
.editions li { display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; align-items: center;
               padding: 16px 0; border-bottom: 1px solid var(--line); }
.editions li:last-child { border-bottom: 0; padding-bottom: 0; }
.ed-name { font-weight: 700; font-size: 19px; }
.ed-note { color: var(--dim); font-size: 16px; line-height: 1.5; margin: 4px 0 0; }
.ed-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.tag { display: inline-block; margin-left: 10px; padding: 1px 9px; border: 1px solid var(--line);
       color: var(--dim); font-size: 13px; font-weight: 700; vertical-align: 2px; }
.tag.current { color: var(--fg); border-color: var(--cream); }

/* apps */
.apps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin: 34px 0 0; }
.app { --accent: var(--hot); min-width: 0; background-color: var(--plate2); border: 1px solid var(--line);
       border-top: 3px solid var(--hot); border-radius: 6px; padding: 24px 28px 26px; }
.app-head { display: flex; align-items: center; gap: 18px; }
.app-icon { width: 72px; height: 72px; border-radius: 16px; flex: none; }
main .app h2 { margin: 0 0 4px; padding: 0; border: 0; font-size: 26px; }
main .app h3 { margin: 26px 0 8px; font-size: 18px; }
.app > p { margin: 16px 0 0; }
.app-art { display: block; width: 100%; height: auto; margin: 20px 0 0; border: 1px solid var(--line); }
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 20px 0 0; }
.stores a { display: block; line-height: 0; }
.stores img { height: 44px; width: auto; }
.app-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 24px 0 0; }
.app-shots a { display: block; line-height: 0; border: 1px solid var(--line); overflow: hidden; }
.app-shots img { width: 100%; height: auto; }
.app-shots a:hover, .app-shots a:focus-visible { border-color: var(--accent); }
.app-features { margin: 0; padding-left: 1.2em; list-style: disc; }
.app-features li { margin: 6px 0; }

/* narrow screens: the menu above the content */
@media (max-width: 980px) {
  .machines { grid-template-columns: 1fr; }
  .stack { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .side { width: auto; height: auto; position: static; align-self: stretch; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 16px 12px; }
  .brand img { width: auto; height: 28px; }
  .top { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
  .menu-btn { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; flex: none;
              padding: 10px; background: none; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
  .menu-btn span { display: block; height: 2px; background: var(--fg); }
  .side nav { position: fixed; top: 0; right: 0; bottom: 0; width: min(80vw, 300px); z-index: 40;
              background: #070a0c; border-left: 1px solid var(--line); padding: 64px 18px 24px;
              transform: translateX(100%); transition: transform 0.22s ease; visibility: hidden; }
  .menu-open .side nav { transform: none; visibility: visible; }
  .side nav a { font-size: 18px; padding: 11px 14px; }
  .menu-close { display: block; position: absolute; top: 12px; right: 12px; width: 44px; height: 44px;
                background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--fg);
                font-size: 28px; line-height: 1; cursor: pointer; font-family: inherit; }
  .menu-shade { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, 0.6); }
  .menu-shade[hidden] { display: none; }
  .menu-open { overflow: hidden; }
  .project, .app { padding: 20px 18px 22px; }
  .editions li { grid-template-columns: 1fr; }
  .ed-links { justify-content: flex-start; }
  .app-icon { width: 56px; height: 56px; border-radius: 13px; }
  .app-shots { grid-template-columns: minmax(0, 1fr); }
  .donate-side { display: none; }
  .donate-foot { display: flex; margin: 24px 0 8px; padding-top: 24px; }
  .content { padding: 16px 16px 0; }
  main { padding: 24px 18px 34px; }
  main h1 { font-size: 30px; }
  main h2 { font-size: 23px; }
  .hero h1 { font-size: 26px; }
  body { font-size: 17px; }
  .features { grid-template-columns: 1fr; gap: 0; }
  .features dd { margin-bottom: 10px; }
  .shot { grid-template-columns: 1fr; gap: 14px; }
  .shot img { width: calc(100% - 12px); }
  main td:first-child { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .side nav { transition: none; } }

/* the browser installer (web-install.html) */
.tag { font-family: var(--head); font-size: 0.45em; letter-spacing: 0.12em; text-transform: uppercase; vertical-align: middle;
  border: 1px solid var(--hot); color: var(--hot); border-radius: 4px; padding: 2px 8px; }
.note.ok, #wi-pkg-status.ok { color: var(--ok); } #wi-pkg-status.bad { color: var(--warn); }
#wi-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 18px 0 0; color: var(--dim); }
#wi-progress progress { flex: 1 1 240px; height: 10px; accent-color: var(--hot); }
.wi-log { margin: 14px 0 0; padding: 12px 16px; background: var(--plate2); border: 1px solid var(--line); border-radius: 6px;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; overflow-y: auto; }
.wi-log .step { color: var(--cream); font-weight: 700; margin-top: 8px; }
.wi-log .ok { color: var(--ok); font-weight: 700; } .wi-log .bad { color: var(--warn); font-weight: 700; }
.wi-ask { margin: 10px 0; padding: 10px 12px; border-left: 3px solid var(--hot); font-family: "Atkinson Hyperlegible", system-ui, sans-serif; font-size: 15px; white-space: normal; }
.wi-ask p { margin: 0 0 8px; } .wi-ask .btn { margin-right: 8px; }
button.btn { font: inherit; font-weight: 600; cursor: pointer; } button.btn:disabled { opacity: 0.4; cursor: not-allowed; }
