/* SPDX-License-Identifier: MIT -- Tonitor for the SMK-37 website: the FM-1 site's frame, in its own colours -- a cool
 * blue-black and a lime accent (the FM-1's: a warm black, orange and cyan), the pads in the corner */
:root {
  --bg: #0a0d12;
  --bg2: #121822;
  --line: #243042;
  --fg: #e9eef5;
  --dim: #9ba8ba;
  --acc: #c4f25a;
  --l1: #ffd600; --l2: #00d6ff; --l3: #ff5cd2; --l4: #60ff60; --l5: #ff8c00; --l6: #bea0ff;
  --warn: #ff5a4a;
  --ok: #60e080;
  --side: 230px;
  --max: 820px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
}
a { color: var(--acc); text-underline-offset: 3px; }
a:hover { color: var(--fg); }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88em; }
code { background: var(--bg2); border: 1px solid var(--line); border-radius: 5px; padding: 0.05em 0.35em; }
pre { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; 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 beside it */
.layout { display: flex; min-height: 100vh; }
.side {
  width: var(--side); flex: none; position: sticky; top: 0; align-self: flex-start; height: 100vh;
  padding: 28px 22px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 700; letter-spacing: 0.16em; font-size: 18px; }
.brand img { width: 40px; height: 40px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-model { color: var(--acc); font-size: 13px; letter-spacing: 0.2em; }
.pads { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 18px 0 22px; }
.pads span { aspect-ratio: 1; border-radius: 3px; border: 1px solid var(--line); }
.pads span:nth-child(1) { background: var(--l1); border-color: var(--l1); } .pads span:nth-child(2) { background: var(--l2); border-color: var(--l2); }
.pads span:nth-child(3) { background: var(--l3); border-color: var(--l3); } .pads span:nth-child(4) { background: var(--l4); border-color: var(--l4); }
.pads span:nth-child(5) { background: var(--l5); border-color: var(--l5); } .pads span:nth-child(6) { background: var(--l6); border-color: var(--l6); }
.pads span:nth-child(7), .pads span:nth-child(8) { background: var(--fg); border-color: var(--fg); }
.top { display: flex; align-items: center; justify-content: space-between; }
.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: 8px 12px; border-radius: 6px; border-left: 3px solid transparent; }
.side nav a:hover { color: var(--fg); background: var(--bg2); }
.side nav a[aria-current="page"] { color: var(--fg); background: var(--bg2); border-left-color: var(--acc); font-weight: 700; }
.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: 0 48px; }
main { max-width: var(--max); padding: 40px 0 50px; }
main h1 { font-size: 36px; line-height: 1.2; margin: 0 0 14px; }
main h2 { font-size: 27px; line-height: 1.25; margin: 48px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
main h2::before { content: ""; display: block; width: 40px; height: 4px; background: var(--acc); margin: -15px 0 14px; }
main h3 { font-size: 21px; margin: 30px 0 8px; }
main h2, main h3 { scroll-margin-top: 20px; }
p.big { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
p.note { color: var(--dim); font-size: 15px; }

/* home */
.hero { padding: 10px 0 6px; }
.hero h1 { font-size: 30px; line-height: 1.3; max-width: 26em; margin: 0; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
/* home: the SMK-37's sixteen pads, the top row in the tracks' colours */
.panel-art { margin: 34px 0 0; padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg2);
             display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.panel-art span { aspect-ratio: 1; border-radius: 8px; border: 2px solid var(--line); background: var(--bg); }
.panel-art span.t1 { background: var(--l1); border-color: var(--l1); } .panel-art span.t2 { background: var(--l2); border-color: var(--l2); opacity: .35; }
.panel-art span.t3 { background: var(--l3); border-color: var(--l3); opacity: .35; } .panel-art span.t4 { background: var(--l4); border-color: var(--l4); opacity: .35; }
.panel-art span.t5 { background: var(--l5); border-color: var(--l5); opacity: .35; } .panel-art span.t6 { background: var(--l6); border-color: var(--l6); opacity: .35; }
.panel-art span.p { background: var(--fg); border-color: var(--fg); opacity: .35; } .panel-art span.p.on { opacity: 1; }
.panel-art span.b { border-color: #4a7a1a; } .panel-art span.b.on { background: var(--acc); border-color: var(--acc); }
@media (max-width: 820px) { .panel-art { gap: 6px; padding: 14px; } .panel-art span { border-radius: 5px; } }
/* the demo: a 16:9 poster (the Short's frame on an enlarged, blurred detail of it); played, YouTube's player takes
 * the frame's place in the middle */
.demo { position: relative; margin: 34px 0 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px;
        border: 1px solid var(--line); background: #000; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); }
.demo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer;
             background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.35) 100%);
             display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
             color: var(--fg); font-family: inherit; }
.demo-icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
             background: rgba(14, 13, 13, 0.62); border: 2px solid rgba(237, 234, 228, 0.9);
             backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
             transition: transform 0.18s ease, background 0.18s ease; }
.demo-icon svg { width: 38px; height: 38px; fill: var(--fg); margin-left: 5px; }
.demo-label { font-size: 17px; font-weight: 700; letter-spacing: 0.04em; padding: 5px 14px; border-radius: 999px;
              background: rgba(14, 13, 13, 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.demo-play:hover .demo-icon, .demo-play:focus-visible .demo-icon { transform: scale(1.08); background: var(--l5); border-color: var(--l5); }
.demo-play:focus-visible { outline: 3px solid var(--l2); outline-offset: -3px; }
.demo iframe { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 9 / 16; transform: translateX(-50%);
               border: 0; display: block; background: #000; }
@media (prefers-reduced-motion: reduce) { .demo-icon { transition: none; } }
.btn { display: inline-block; padding: 12px 22px; border-radius: 6px; font-weight: 700; text-decoration: none; border: 2px solid var(--fg); color: var(--fg); background: transparent; font-size: 18px; cursor: pointer; font-family: inherit; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.btn:hover { background: var(--bg2); color: var(--fg); }
.btn.primary:hover { background: #dcff8a; border-color: #dcff8a; color: var(--bg); }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; }

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

.steps { counter-reset: s; list-style: none; padding: 0; margin: 16px 0 0; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 12px 50px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 6px; border: 2px solid var(--acc); color: var(--acc); display: grid; place-items: center; font-weight: 700; }

.warn { border-left: 4px solid var(--warn); padding: 4px 0 4px 18px; margin: 22px 0; }
.warn p { margin: 0; }

footer { border-top: 1px solid var(--line); 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(--bg2); }
main td:first-child { white-space: nowrap; }
main blockquote { border-left: 4px solid var(--acc); margin: 16px 0; padding: 4px 18px; color: var(--dim); }
.toc { border-left: 1px 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 { --accent: var(--l1); background: var(--bg2); border: 1px solid var(--line); border-top: 4px solid var(--accent);
           border-radius: 12px; 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: 28px; }
.device { color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.project > p { margin: 12px 0 0; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn.small { padding: 7px 16px; font-size: 16px; border-radius: 7px; 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); border-radius: 999px;
       color: var(--dim); font-size: 13px; font-weight: 700; vertical-align: 2px; }
.tag.current { color: var(--ok); border-color: var(--ok); }

/* the installer */
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 22px 24px; margin-top: 20px; }
.status { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.status.ok { color: var(--ok); } .status.bad { color: var(--warn); }
.detail { color: var(--dim); margin: 0; white-space: pre-line; }
.bar { height: 22px; background: var(--bg); border: 2px solid var(--fg); border-radius: 6px; overflow: hidden; margin: 16px 0 6px; }
.bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--l1), var(--l2), var(--l3), var(--l4), var(--l5), var(--l6)); transition: width 0.2s; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0; font-size: 17px; }
.check input { width: 22px; height: 22px; margin-top: 3px; flex: none; }
.dev { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 10px 0 0; }
.dev dt { color: var(--dim); }
.dev dd { margin: 0; font-weight: 700; }

/* narrow screens: the menu above the content */
@media (max-width: 820px) {
  .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 20px 12px; }
  .pads { margin: 12px 0 0; max-width: 220px; }
  .menu-btn { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px;
              padding: 10px; background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
  .menu-btn span { display: block; height: 2px; background: var(--fg); border-radius: 1px; }
  .side nav { position: fixed; top: 0; right: 0; bottom: 0; width: min(80vw, 300px); z-index: 20;
              background: var(--bg2); 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: 19px; padding: 12px 14px; }
  .menu-close { display: block; position: absolute; top: 12px; right: 12px; width: 44px; height: 44px;
                background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--fg);
                font-size: 28px; line-height: 1; cursor: pointer; font-family: inherit; }
  .menu-shade { display: block; position: fixed; inset: 0; z-index: 10; background: rgba(0, 0, 0, 0.6); }
  .menu-shade[hidden] { display: none; }
  .menu-open { overflow: hidden; }
  .project { padding: 20px 18px 22px; }
  main .project h2 { font-size: 24px; }
  .editions li { grid-template-columns: 1fr; }
  .editions li > .btn { justify-self: start; }
  .ed-links { justify-content: flex-start; }
  .demo { margin-top: 26px; border-radius: 10px; }
  .demo-icon { width: 68px; height: 68px; }
  .demo-icon svg { width: 30px; height: 30px; }
  .demo.playing { aspect-ratio: 9 / 16; max-width: 360px; margin-left: auto; margin-right: auto; }   /* (portrait, to be seen) */
  .donate-side { display: none; }
  .donate-foot { display: flex; margin: 24px 0 8px; padding-top: 24px; }
  .content { padding: 0 20px; }
  main { padding-top: 26px; }
  body { font-size: 17px; }
  .features { grid-template-columns: 1fr; gap: 0; }
  .features dd { margin-bottom: 10px; }
  main td:first-child { white-space: normal; }
}

/* the other Tonitor: a card on the home page */
.sibling { display: flex; align-items: center; gap: 18px; margin: 30px 0 0; padding: 16px 20px; text-decoration: none;
           color: var(--fg); background: var(--bg2); border: 2px solid var(--line); border-left: 6px solid #ff8c00; border-radius: 10px; }
.sibling:hover, .sibling:focus-visible { border-color: #ff8c00; color: var(--fg); }
.sibling img { flex: none; border-radius: 10px; }
.sibling-kicker { display: block; color: #ff8c00; font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.sibling-title { display: block; font-size: 20px; font-weight: 700; line-height: 1.35; }
