/* SPDX-License-Identifier: MIT -- Bigorna website (the frame after Tonitor's; plate steel, hazard stripes, rivets) */
:root {
  --bg: #0d0e10;
  --plate: #131417;          /* the content's plate */
  --plate2: #191b1f;
  --line: #2b2e33;
  --fg: #e8eaed;
  --steel: #c8ccd2;
  --dim: #a4a9b0;
  --hot: #d2d5da;            /* the accent: bright steel (one colour, no other) */
  --mid: #6b7078;            /* machined grey: rules, bars */
  --link: #e3e6ea;
  --warn: #ff5a4a;
  --ok: #60e080;
  --side: 240px;
  --max: 860px;
  --head: "Big Shoulders Display", "Arial Narrow", Impact, 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;
  /* checker plate: raised lentils, alternate ways, faint (the text sits on solid plate) */
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cg fill='%23181a1e' stroke='%23232529' stroke-width='.8'%3E%3Cellipse cx='11' cy='11' rx='9' ry='2.7' transform='rotate(45 11 11)'/%3E%3Cellipse cx='33' cy='33' rx='9' ry='2.7' transform='rotate(45 33 33)'/%3E%3Cellipse cx='33' cy='11' rx='9' ry='2.7' transform='rotate(-45 33 11)'/%3E%3Cellipse cx='11' cy='33' rx='9' ry='2.7' transform='rotate(-45 11 33)'/%3E%3C/g%3E%3C/svg%3E");
}
/* a hazard band across the top */
body::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 7px; z-index: 30;
  background: repeating-linear-gradient(-45deg, #3a3d43 0 14px, #141518 14px 28px);
}
a { color: var(--link); text-decoration-color: var(--mid); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: #fff; }
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: 3px; padding: 0.05em 0.35em; }
pre { background: #0a0b0c; border: 1px solid var(--line); border-left: 3px solid var(--mid); border-radius: 3px;
      padding: 14px 16px; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; }
img { max-width: 100%; }

/* rivets: four, in a plate's corners */
.riveted {
  background-image:
    radial-gradient(circle at 12px 12px, #4a4e55 0 2.5px, #1f2125 3.5px, transparent 4px),
    radial-gradient(circle at calc(100% - 12px) 12px, #4a4e55 0 2.5px, #1f2125 3.5px, transparent 4px),
    radial-gradient(circle at 12px calc(100% - 12px), #4a4e55 0 2.5px, #1f2125 3.5px, transparent 4px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), #4a4e55 0 2.5px, #1f2125 3.5px, transparent 4px);
}

/* the frame: the menu down the left, the content on a plate beside it */
.layout { display: flex; min-height: 100vh; padding-top: 7px; }
.side {
  width: var(--side); flex: none; position: sticky; top: 7px; align-self: flex-start; height: calc(100vh - 7px);
  padding: 26px 22px; background: #0b0c0e; border-right: 2px 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: 700; font-size: 21px; letter-spacing: 0.06em; 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(19, 20, 23, 0.97);
       border: 1px solid var(--line); border-top: 3px solid #3a3e45; }
main h1, main h2, main h3 { font-family: var(--head); text-transform: uppercase; letter-spacing: 0.03em; color: var(--steel); }
main h1 { font-size: 46px; line-height: 1.05; margin: 0 0 16px; font-weight: 800; }
main h2 { font-size: 33px; line-height: 1.1; margin: 50px 0 12px; padding: 12px 0 0 14px; border-top: 1px solid var(--line);
          border-left: 4px solid var(--mid); font-weight: 800; }
main h3 { font-size: 25px; margin: 30px 0 8px; font-weight: 700; }
main h2, main h3 { scroll-margin-top: 24px; }
p.big { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
p.note { color: var(--dim); font-size: 15px; }

/* home */
.hero { padding: 4px 0 6px; }
.hero .logo { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 0 26px; }
.hero h1 { font-size: 34px; line-height: 1.2; max-width: 24em; margin: 0; }
.hero p { color: var(--dim); font-size: 19px; max-width: 38em; margin: 14px 0 0; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-block; padding: 11px 22px; font-weight: 700; text-decoration: none; border: 2px solid var(--steel);
       color: var(--fg); background: transparent; font-size: 20px; cursor: pointer; font-family: var(--head);
       letter-spacing: 0.06em; text-transform: uppercase; border-radius: 2px; }
.btn.primary { background: var(--hot); border-color: var(--hot); color: #111; }
.btn:hover { background: var(--plate2); color: var(--fg); }
.btn.primary:hover { background: #fff; border-color: #fff; color: #111; }
.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); }

/* the FM-1's screen, as the firmware draws it */
.shots { display: grid; gap: 26px; margin: 26px 0 0; }
.shot { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; padding-top: 26px;
        border-top: 1px solid var(--line); }
.shot img { display: block; width: 240px; height: 240px; image-rendering: pixelated; border: 6px solid #050506;
            outline: 1px solid var(--line); box-sizing: content-box; }
main .shot h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: 28px; }
.shot p { margin: 0 0 8px; color: var(--dim); }

.major { display: grid; gap: 18px; margin: 26px 0 8px; }
.big { background-color: var(--plate2); border: 1px solid var(--line); border-left: 6px solid var(--steel); padding: 22px 28px 20px; }
main .big h2 { margin: 0 0 10px; padding: 0; border: 0; font-size: clamp(28px, 4vw, 40px); }
.big p, .big li { color: var(--steel); }
.big ul { padding-left: 20px; margin: 8px 0; }
.big li { margin: 6px 0; }
.machines { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 18px 0 0; }
.machine { background-color: var(--plate2); border: 1px solid var(--line); border-top: 3px solid var(--mid); padding: 18px 20px 20px; }
main .machine h3 { margin: 0 0 6px; font-size: 28px; }
.machine p { margin: 6px 0 0; color: var(--dim); font-size: 16px; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 16px 0 0; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 12px 52px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border: 2px solid var(--mid);
                    color: var(--steel); display: grid; place-items: center; font-weight: 700; font-family: var(--head); font-size: 22px; }

.warn { border-left: 5px solid var(--warn); padding: 6px 0 6px 18px; margin: 22px 0; background: rgba(255, 90, 74, 0.06); }
.warn p { margin: 0; }

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.04em; font-size: 18px; }
main td:first-child { white-space: nowrap; }
main blockquote { border-left: 4px solid var(--mid); 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 { --accent: var(--mid); background-color: var(--plate2); border: 1px solid var(--line); border-top: 4px solid var(--accent);
           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: 32px; }
.device { color: var(--dim); 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: 6px 16px; font-size: 17px; 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(--steel); }

/* the installer */
.panel { background-color: var(--plate2); border: 1px solid var(--line); padding: 24px 28px; margin-top: 20px; }
.status { font-size: 24px; font-weight: 700; margin: 0 0 8px; font-family: var(--head); text-transform: uppercase; letter-spacing: 0.04em; }
.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(--steel); overflow: hidden; margin: 16px 0 6px; }
.bar > div { height: 100%; width: 0; background: repeating-linear-gradient(-45deg, #c8ccd2 0 12px, #9ba0a8 12px 24px); 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; accent-color: var(--hot); }
.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: 860px) {
  .layout { flex-direction: column; }
  .side { width: auto; height: auto; position: static; align-self: stretch; border-right: 0; border-bottom: 2px solid var(--line); padding: 16px 20px 12px; }
  .brand img { width: auto; height: 26px; }
  .top { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
  .machines { grid-template-columns: 1fr; }
  .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); 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: #0b0c0e; border-left: 2px 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: 22px; padding: 11px 14px; }
  .menu-close { display: block; position: absolute; top: 12px; right: 12px; width: 44px; height: 44px;
                background: none; border: 1px solid var(--line); 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 { padding: 20px 18px 22px; }
  main .project h2 { font-size: 26px; }
  .editions li { grid-template-columns: 1fr; }
  .editions li > .btn { justify-self: start; }
  .ed-links { justify-content: flex-start; }
  .donate-side { display: none; }
  .donate-foot { display: flex; margin: 24px 0 8px; padding-top: 24px; }
  .content { padding: 16px 12px 0; }
  main { padding: 24px 18px 34px; }
  main h1 { font-size: 38px; }
  main h2 { font-size: 28px; }
  .hero h1 { font-size: 28px; }
  .hero .logo { display: none; }               /* (the bar above shows it) */
  body { font-size: 17px; }
  .features { grid-template-columns: 1fr; gap: 0; }
  .features dd { margin-bottom: 10px; }
  .shot { grid-template-columns: 1fr; gap: 14px; }
  main td:first-child { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .side nav, .bar > div { transition: none; } }
