/* The home page of getdfos.com and the pages that share its frame (site/build.py copies this to dist/assets/home.css).
   Comic panels, like the quick start guide: yellow halftone paper, black-edged white panels with a hard shadow, black stickers for labels,
   a pink accent. The dark theme (the button in the top row) turns the paper dark and the shadows pink. Archivo is already on the server. */
@font-face { font-family: Archivo; src: url('/assets/fonts/Archivo-wdth-wght.woff2') format('woff2'), url('/assets/fonts/Archivo-wdth-wght.ttf') format('truetype'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

:root {
  --bg: #ffd23f; --dot: #e6b800; --tile: #ffffff; --tile-hi: #fff6cc; --text: #111111; --soft: #222222; --dim: #4a4636; --faint: #7a7b81;
  --accent: #ff3d6e; --on-accent: #111111; --accent-text: #b01540; --brand: #ff7a1a; --pad: #111111; --ink: #111111;
  --edge: #111111; --shadow: #111111; --line: #111111; --sticker: #111111; --on-sticker: #ffd23f;
  --hero: #111111; --on-hero: #ffd23f; --hero-text: #f4f4f2;
  --head: Archivo, 'Helvetica Neue', Arial, sans-serif;
  --base: 2.3s; /* how long the intro holds the tiles back; 0 when it is skipped */
}
html.skip { --base: 0s; }
/* the dark theme */
html[data-theme="dark"] { color-scheme: dark; --bg: #14130b; --dot: #23210f; --tile: #1e1d12; --tile-hi: #2a2918; --text: #f4efe0; --soft: #d9d4c2; --dim: #a9a38c;
  --accent: #ffd23f; --on-accent: #111111; --accent-text: #ffd23f; --pad: #4a4836; --ink: #f4efe0;
  --edge: #f4efe0; --shadow: #ff3d6e; --line: #4a4836; --sticker: #ffd23f; --on-sticker: #111111;
  --hero: #ffd23f; --on-hero: #111111; --hero-text: #111111; }
* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg) radial-gradient(var(--dot) 1.2px, transparent 1.4px) 0 0 / 9px 9px; color: var(--text); font: 17px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--head); font-stretch: 112%; margin: 0; text-transform: uppercase; }
p { margin: 0; }

/* ---------- the start-up logo ---------- */
.logo { display: block; width: 100%; height: auto; }
.logo .pad { fill: var(--pad); }
.logo .ink { fill: var(--ink); }
.logo .brand { fill: var(--brand); }

.intro { --bg: #09090a; --pad: #2c2e36; --ink: #f1eee6; position: fixed; inset: 0; z-index: 50; background: var(--bg); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 28px; cursor: pointer; }
.js .intro { display: flex; animation: intro-out .45s ease 2.5s forwards; }
.js.skip .intro { animation: intro-out .25s ease forwards; }
.js.seen .intro { display: none; animation: none; }   /* a returning visitor: no logo, the page is just there */
.intro .logo { width: min(520px, 78vw); }
.intro small { color: var(--faint); font: 500 15px/1 system-ui, sans-serif; letter-spacing: .08em; opacity: 0; animation: fade-in .4s ease 1.35s forwards; }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }
@keyframes fade-in { to { opacity: 1; } }
/* each pad flashes bright as it is "hit", then settles; its letter appears with it */
.intro .lg { opacity: 0; animation: lg-show .18s ease forwards; animation-delay: calc(.2s + var(--i) * .17s); }
.intro .lg .pad { animation: lg-hit .55s ease-out forwards; animation-delay: calc(.2s + var(--i) * .17s); }
@keyframes lg-show { to { opacity: 1; } }
@keyframes lg-hit { from { fill: var(--ink); } to { fill: var(--pad); } }

/* ---------- the download form and the privacy notice ---------- */
.formtile { max-width: 680px; margin: 24px auto 0; }
.formtile h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 8px 0 14px; }
.formtile .body { margin-bottom: 20px; }
.getform { display: grid; gap: 12px; }
.getform label { font-weight: 600; }
.getform input[type=email] { font: inherit; padding: 14px 16px; border-radius: 6px; border: 3px solid var(--edge); background: var(--tile); color: var(--text); width: 100%; }
.getform select, .getform textarea { font: inherit; padding: 14px 16px; border-radius: 6px; border: 3px solid var(--edge); background: var(--tile); color: var(--text); width: 100%; }
.getform textarea { resize: vertical; min-height: 140px; }
.getform .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--soft); line-height: 1.45; }
.getform .check input { margin-top: 4px; width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.getform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.getform .err { color: #b3261e; font-weight: 600; }
html[data-theme="dark"] .getform .err { color: #ff6b6b; }
.btn.go { background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 800; cursor: pointer; justify-self: start; }
.formtile .note { margin-top: 18px; }
.prose h2 { font-size: 20px; margin: 26px 0 6px; }
.prose p { color: var(--soft); max-width: 62ch; }
.prose p.kicker { color: var(--on-sticker); }

/* ---------- blocks the admin panel can add ---------- */
.rich p { margin: 0 0 10px; } .rich p:last-child { margin-bottom: 0; }
.livestats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 8px; }
.livestats .num { font-size: clamp(36px, 5vw, 56px); } .livestats p { color: var(--dim); margin-top: 4px; }
ul.latest { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
ul.latest li { display: flex; gap: 12px; align-items: baseline; } ul.latest time { color: var(--dim); font-size: 13.5px; min-width: 88px; }
.richblock { color: var(--soft); margin: 18px 0; } .richblock p { margin: 0 0 12px; }
article.log { padding: 16px 0; border-top: 3px dashed var(--edge); } article.log h2 { font-size: 20px; margin: 6px 0; }
.logmeta { display: flex; gap: 10px; align-items: center; color: var(--dim); font-size: 13.5px; }
.badge { background: var(--sticker); color: var(--on-sticker); padding: 1px 10px; font-weight: 700; font-size: 12.5px; }
.cookie { position: fixed; z-index: 40; left: 16px; right: 16px; bottom: 16px; max-width: 760px; margin: 0 auto; background: var(--tile); color: var(--text); border: 4px solid var(--edge); padding: 18px 20px;
  box-shadow: 7px 7px 0 var(--shadow); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cookie[hidden] { display: none; } .cookie.bottom-left { margin-left: 16px; } .cookie.bottom-right { margin-right: 16px; }
/* the default: a bar along the bottom edge of the page */
.cookie.bottom { left: 0; right: 0; bottom: 0; max-width: none; margin: 0; padding: 14px 20px; box-shadow: none; border-width: 4px 0 0; }
.cookie.bottom p { max-width: 980px; }
.cookie p { margin: 0; flex: 1; min-width: 240px; font-size: 14.5px; line-height: 1.45; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.line2 { background: transparent; box-shadow: none; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- page frame ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
header.top { padding: 22px 0; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.mark { display: block; width: min(208px, 62vw); }
nav.main { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
nav.main a, nav.main > span { background: var(--tile); color: var(--text); text-decoration: none; padding: 8px 14px; border: 3px solid var(--edge); border-radius: 6px; box-shadow: 3px 3px 0 var(--shadow); font: 700 13px var(--head); letter-spacing: .07em; text-transform: uppercase; transition: background .2s ease; }
nav.main a:hover { background: var(--tile-hi); }
nav.main .soon { background: var(--accent); color: var(--on-accent); }
nav.main .ig { display: inline-flex; align-items: center; gap: 7px; }
nav.main .ig svg { flex: none; }
/* the Donate menu: a button that opens a small panel with the ways to support DFOS */
details.donate { position: relative; }
details.donate > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border: 3px solid var(--edge); border-radius: 6px; box-shadow: 3px 3px 0 var(--shadow); font: 800 13px var(--head); letter-spacing: .07em; text-transform: uppercase; }
details.donate > summary::-webkit-details-marker { display: none; }
details.donate > summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-2px, -2px); margin-left: 3px; }
details.donate[open] > summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.donate-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; min-width: 210px; background: var(--tile); border: 4px solid var(--edge); box-shadow: 7px 7px 0 var(--shadow); padding: 8px; display: grid; gap: 6px; }
nav.main .donate-menu a { display: block; background: var(--tile); box-shadow: none; text-align: left; }
nav.main .donate-menu a:hover { background: var(--accent); color: var(--on-accent); }
.theme-btn { display: none; background: var(--tile); color: var(--text); border: 3px solid var(--edge); padding: 6px 10px; border-radius: 6px; box-shadow: 3px 3px 0 var(--shadow); cursor: pointer; transition: background .2s ease; }
.js .theme-btn { display: inline-flex; align-items: center; }
.theme-btn:hover { background: var(--tile-hi); }
.theme-btn .sun, html[data-theme="dark"] .theme-btn .moon { display: none; }
html[data-theme="dark"] .theme-btn .sun { display: block; }

/* ---------- tiles ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 22px; grid-auto-flow: row dense; }
.tile { background: var(--tile); border: 4px solid var(--edge); box-shadow: 7px 7px 0 var(--shadow); padding: 26px; position: relative; overflow: hidden; transition: background .3s ease; }
.tile:hover { background: var(--tile-hi); }
.js .tile { opacity: 0; transform: scale(.96); }
.js .tile.hero { opacity: 1; transform: none; }   /* the first thing read is there at once: it is what the page's speed is measured on */
.js .tile.in { animation: pop .7s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--base) + var(--d, 0s)); }
.js .tile.in.late { animation-delay: var(--d, 0s); }
@keyframes pop { to { opacity: 1; transform: none; } }
.s2 { grid-column: span 2; } .r2 { grid-row: span 2; }
.kicker { display: inline-block; align-self: flex-start; background: var(--sticker); color: var(--on-sticker); padding: 4px 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; }
.tile h2 { font-size: 28px; font-weight: 800; margin: 6px 0 10px; letter-spacing: -.3px; }
.tile p.body { color: var(--soft); line-height: 1.5; margin-bottom: 18px; }
.shot { display: block; width: 100%; height: auto; border: 3px solid var(--edge); image-rendering: pixelated; background: #000; transition: transform .5s ease; }
.tile:hover .shot { transform: scale(1.025); }
.tile.pic { padding: 18px; }
.tile.pic.r2 { display: flex; align-items: center; }
.grid.steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.hero { background: var(--hero); color: var(--hero-text); display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: 420px; }
.hero:hover { background: var(--hero); }
.hero .kicker { background: var(--on-hero); color: var(--hero); }
.hero h1 { color: var(--on-hero); font-size: clamp(44px, 6.2vw, 78px); font-weight: 800; line-height: .96; letter-spacing: -.035em; }
.hero p.lead { font-size: 19px; line-height: 1.5; max-width: 540px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; text-decoration: none; padding: 12px 20px; border-radius: 6px; font: 800 14px var(--head); letter-spacing: .07em; text-transform: uppercase; border: 3px solid var(--edge); box-shadow: 4px 4px 0 var(--accent); transition: transform .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn.dark { background: #111111; color: #ffffff; }
.btn.line { color: var(--text); }
.btn.light { background: var(--tile); color: var(--text); }
.hero .btn { border-color: var(--hero-text); }
.hero .btn.dark { background: var(--on-hero); color: var(--hero); }
.hero .btn.light { background: var(--hero-text); color: var(--hero); }
.hero .btn.line { color: var(--hero-text); box-shadow: none; }

.num { font-family: var(--head); font-stretch: 112%; font-weight: 800; font-size: clamp(48px, 6vw, 72px); line-height: 1; letter-spacing: -.03em; }
.num.hot { color: var(--accent-text); }
.stat p { color: var(--dim); margin-top: 8px; font-size: 15px; line-height: 1.4; }

.colours { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.colours i { display: block; height: 34px; border: 3px solid var(--edge); animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

h2.section { display: inline-block; background: var(--sticker); color: var(--on-sticker); font-size: clamp(26px, 4vw, 40px); font-weight: 900; letter-spacing: -.01em; padding: 8px 18px; margin: 72px 0 26px; transform: rotate(-1deg); }
.step b { color: var(--accent-text); font: 700 15px var(--head); letter-spacing: .1em; }
.step h3 { font-size: 20px; margin: 10px 0 6px; }
.step p { color: var(--soft); font-size: 15.5px; }
.note { color: var(--dim); font-size: 15px; }

footer.foot { margin-top: 72px; padding: 30px 0 56px; border-top: 4px solid var(--edge); color: var(--text); font-size: 13.5px; line-height: 1.65; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer.foot p { max-width: 720px; }
footer.foot a { color: var(--text); }

/* the promo band: wide, in the accent colour, with a dark button */
.promo { background: var(--accent); color: var(--on-accent); border: 4px solid var(--edge); box-shadow: 8px 8px 0 var(--shadow); padding: 28px clamp(18px, 4vw, 40px); margin: 18px 0; display: grid; gap: 10px; }
.promo .kicker { justify-self: start; margin: 0; font: 800 13px var(--head); letter-spacing: .12em; text-transform: uppercase; }
.promo h2 { margin: 0; font-size: clamp(32px, 6vw, 56px); line-height: 1; letter-spacing: -.03em; color: inherit; background: none; padding: 0; transform: none; }
.promo .promotext { margin: 0; max-width: 640px; font-size: 19px; line-height: 1.45; }
.promo .cta { margin-top: 6px; }
/* testimonials: a row of four picture-and-text blocks, then YouTube reviews that load only when played */
.testimonials { margin-top: 8px; }
.voices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.voice { margin: 0; border: 3px solid var(--edge); border-radius: 10px; background: var(--tile); padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.voice img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 2px solid var(--edge); display: block; }
.voice blockquote { margin: 0; font-size: 16px; line-height: 1.5; color: var(--soft); overflow-wrap: anywhere; }
.voice blockquote p { margin: 0 0 8px; } .voice blockquote p:last-child { margin: 0; }
.voice figcaption { margin-top: auto; display: grid; gap: 2px; font-size: 14px; } .voice figcaption span:first-child { font-weight: 800; color: var(--text); } .voice figcaption span + span { color: var(--dim); }
.vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.vid { display: grid; gap: 8px; min-width: 0; }
.vid .play, .vid iframe { width: 100%; aspect-ratio: 16 / 9; border: 3px solid var(--edge); border-radius: 10px; display: block; }
.vid .play { background: #111111; color: #ffffff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; font: inherit; text-align: center; --bg: #111111; }
.vid .play svg { color: var(--accent); } .vid .play b { font-size: 15px; line-height: 1.3; } .vid .play small { color: #cfcfcf; font-size: 13px; }
.vid .play:hover, .vid .play:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* the video's own picture (kept on this server): it fills the tile, the play button sits in the middle and the title is on a dark strip along the bottom */
.vid .play.has-img { position: relative; padding: 0; overflow: hidden; justify-content: flex-end; align-items: stretch; gap: 0; }
.vid .play.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.vid .play.has-img svg { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 56px; height: 56px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.vid .play.has-img b, .vid .play.has-img small { position: relative; background: rgba(17,17,17,.82); color: #ffffff; padding: 0 12px; text-align: left; }
.vid .play.has-img b { padding-top: 8px; } .vid .play.has-img small { padding-bottom: 8px; }
.vidlink { font-size: 14px; color: var(--dim); }
.reels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 170px)); gap: 14px; align-items: start; }
.reel { display: grid; gap: 6px; min-width: 0; }
.reel.playing { grid-column: span 2; }
.reel .play, .reel iframe { width: 100%; border: 3px solid var(--edge); border-radius: 10px; display: block; box-sizing: border-box; }
.reel .play { position: relative; overflow: hidden; aspect-ratio: 9 / 16; background: #111111; color: #ffffff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; font: inherit; text-align: center; --bg: #111111; }
.reel iframe { height: 640px; background: #ffffff; }
.reel .play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel .play svg { position: relative; color: var(--accent); width: 36px; height: 36px; }
.reel .play b { position: relative; font-size: 13px; line-height: 1.25; }
.reel .play small, .reel .play em { position: relative; color: #cfcfcf; font-size: 11px; font-style: normal; }
.reel .play.has-img { justify-content: flex-end; align-items: stretch; gap: 0; padding: 0; }
.reel .play.has-img svg { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 44px; height: 44px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.reel .play.has-img b, .reel .play.has-img small, .reel .play.has-img em { background: rgba(17,17,17,.82); color: #ffffff; padding: 0 8px; text-align: left; }
.reel .play.has-img b { padding-top: 6px; } .reel .play.has-img em { padding-bottom: 6px; }
.reel .vidlink { font-size: 13px; }
.reel .play:hover, .reel .play:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 980px) { .voices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .voices { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  .intro, .js .intro { display: none; animation: none; }
  .js .tile { opacity: 1; transform: none; animation: none !important; }
  .colours i { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}
@media (max-width: 980px) { .grid, .grid.steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero { min-height: 0; } }
@media (max-width: 620px) {
  .grid, .grid.steps { grid-template-columns: 1fr; gap: 24px 8px; }
  .s2 { grid-column: auto; } .r2 { grid-row: auto; }
  .wrap { padding: 0 16px; }
  .tile { padding: 22px; margin-right: 7px; }
}

/* every button of the top row is the same size */
nav.main > a, nav.main > span, nav.main details.donate > summary, .js nav.main .theme-btn { box-sizing: border-box; height: 46px; padding: 0 16px; display: inline-flex; align-items: center; gap: 7px; line-height: 1; }
.js nav.main .theme-btn { width: 46px; padding: 0; justify-content: center; }

/* a phone: the logo with the dark/light, Donate and Instagram buttons in the top right corner (Instagram as its icon alone), the page links on the rows under them */
@media (max-width: 620px) {
  header.top { justify-content: flex-start; gap: 8px; padding: 16px 0; }
  header.top .mark { order: 0; margin-right: auto; width: 118px; }
  nav.main { display: contents; }
  .js .theme-btn { order: 1; } details.donate { order: 2; } nav.main .ig { order: 3; } nav.main > a, nav.main > span { order: 4; }
  nav.main > a, nav.main > span, nav.main details.donate > summary, .js nav.main .theme-btn { height: 42px; }
  .js nav.main .theme-btn { width: 42px; }
  nav.main details.donate > summary { padding: 0 11px; gap: 6px; } nav.main details.donate > summary::after { display: none; }
  nav.main .ig { width: 42px; height: 42px; padding: 0; justify-content: center; } nav.main .ig span { display: none; }
}

/* the changelog: known issues and fixes */
.logpart { font-size: 22px; margin: 30px 0 4px; padding-top: 10px; border-top: 4px solid var(--edge); }
.badge.planned { background: #4aa3ff; color: #111; border: 2px solid var(--edge); padding: 0 8px; } .badge.known { background: #ff3d6e; color: #111; } .badge.fixed { background: #ffd23f; color: #111; border: 2px solid var(--edge); padding: 0 8px; }

/* the contact button: a mail icon, the same size as the other buttons */
nav.main .mail { width: 46px; padding: 0; justify-content: center; }
@media (max-width: 620px) {
  .js .theme-btn { order: 1; } nav.main .mail { order: 2; width: 42px; } details.donate { order: 3; } nav.main .ig { order: 4; } nav.main > a:not(.ig):not(.mail), nav.main > span { order: 5; }
}
@media (max-width: 440px) { nav.main details.donate > summary span { display: none; } nav.main details.donate > summary { width: 42px; padding: 0; justify-content: center; } header.top .mark { width: 104px; } }

/* a phone: Home and Manual are icons, Donate is an icon, "Download soon" is "Download", and the page links fit on one line */
.ico { display: none; }
@media (max-width: 620px) {
  nav.main .ico { display: block; } nav.main .lbl { display: none; } nav.main .soon .more { display: none; }
  nav.main > a.has-ico { width: 42px; padding: 0; justify-content: center; }
  nav.main > a, nav.main > span { padding: 0 10px; font-size: 12px; letter-spacing: .05em; }
  nav.main details.donate > summary span { display: none; } nav.main details.donate > summary { width: 42px; padding: 0; justify-content: center; }
}

/* a phone: the dark/light, mail, Donate and Instagram buttons stay beside the logo; the page links always start a new line under them */
.break { display: none; }
@media (max-width: 620px) {
  nav.main .break { display: block; order: 5; flex: 0 0 100%; height: 0; }
  nav.main > a:not(.ig):not(.mail), nav.main > span { order: 6; }
}
@media (max-width: 380px) {
  header.top { gap: 6px; }
  nav.main > a, nav.main > span { padding: 0 8px; font-size: 11px; letter-spacing: .04em; }
  nav.main > a.has-ico { width: 40px; padding: 0; }
}
/* ...but Manual is the word (the icon stays for Home) */
@media (min-width: 371px) and (max-width: 620px) {      /* on a very narrow phone it stays the icon, so that the row still fits */
  nav.main > a.has-ico[href="/manual/"] { width: auto; padding: 0 10px; }
  nav.main a[href="/manual/"] .ico { display: none; } nav.main a[href="/manual/"] .lbl { display: inline; }
}
/* four words on one line: a little tighter on the usual phone widths */
@media (max-width: 440px) {
  nav.main > a:not(.ig):not(.mail), nav.main > span, nav.main > a.has-ico[href="/manual/"] { padding: 0 8px; font-size: 11.5px; letter-spacing: .03em; }
  nav.main { gap: 8px; }
}

/* a word marked with stars in the hero headline */
.hl { color: #ff3d6e; }
html[data-theme="dark"] .hl { color: #b01540; }

.installsteps { list-style: none; counter-reset: s; margin: 0 0 8px; padding: 0; display: grid; gap: 16px; }
.installsteps li { counter-increment: s; display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; }
.installsteps li::before { content: none; }
.icbox { position: relative; display: grid; place-items: center; width: 56px; height: 56px; background: var(--accent); color: var(--on-accent); border: 3px solid var(--edge); border-radius: 12px; box-shadow: 3px 3px 0 var(--edge); }
.icbox::after { content: counter(s); position: absolute; top: -10px; left: -10px; min-width: 22px; height: 22px; display: grid; place-items: center; background: var(--edge); color: var(--bg, #fff); border-radius: 50%; font: 800 12px var(--head); }
.prose h2 .ic { width: 26px; height: 26px; margin-right: 10px; vertical-align: -4px; }
.installsteps h3, .prose h3 { font-size: 17px; margin: 14px 0 4px; } .installsteps h3 { margin-top: 2px; }
.installsteps p { margin: 0; }
.prose code { font-family: ui-monospace, Menlo, monospace; font-size: .9em; background: color-mix(in srgb, var(--accent) 18%, transparent); padding: 1px 6px; border-radius: 6px; }

.installbar { display: flex; align-items: center; gap: 14px; margin: 0 0 26px; padding: 14px 18px; background: var(--accent); color: var(--on-accent); border: 3px solid var(--edge); border-radius: 8px; box-shadow: 6px 6px 0 var(--edge); text-decoration: none; font-weight: 700; transition: transform .2s ease; }
.installbar:hover { transform: translateY(-2px); }
.installbar b { background: var(--on-accent); color: var(--accent); padding: 4px 10px; border-radius: 5px; font: 800 12px var(--head); letter-spacing: .12em; text-transform: uppercase; flex: none; }
.installbar span { flex: 1; min-width: 0; }
.installbar em { font: 800 14px var(--head); letter-spacing: .07em; text-transform: uppercase; font-style: normal; white-space: nowrap; }
@media (max-width: 620px) { .installbar { flex-wrap: wrap; gap: 8px; } .installbar span { flex-basis: 100%; order: 3; } .installbar em { margin-left: auto; } }
.filedrop { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border: 3px dashed var(--edge); border-radius: 8px; padding: 12px; background: var(--tile); }
.filedrop.over { background: var(--tile-hi); }
.filedrop .btn { cursor: pointer; box-shadow: none; background: var(--accent); color: var(--on-accent); }
.filedrop span { color: var(--soft); font-size: 14px; min-width: 0; overflow-wrap: anywhere; }

.formtile.wide { max-width: 880px; }
.metaline { font: 700 13px var(--head); letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-bottom: 8px; }
.mini { border: 3px solid var(--edge); border-radius: 10px; padding: 14px 16px; background: var(--tile); min-width: 0; }
.mini h3 { font-size: 16px; margin: 0 0 6px; } .mini p { margin: 0; font-size: 15px; }
.mini ul { margin: 0; padding-left: 18px; color: var(--soft); font-size: 15px; display: grid; gap: 4px; }
.mini ul.ticks, .mini ul.dashes { list-style: none; padding-left: 0; } .mini ul.ticks li, .mini ul.dashes li { padding-left: 26px; position: relative; }
.mini ul.ticks li::before { content: "\2713"; position: absolute; left: 0; font-weight: 800; color: var(--on-accent); background: var(--accent); width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; top: 3px; }
.mini ul.dashes li::before { content: "\2013"; position: absolute; left: 0; width: 18px; height: 18px; border: 2px solid var(--edge); border-radius: 50%; display: grid; place-items: center; font-size: 11px; top: 3px; }
.limits { color: var(--soft); display: grid; gap: 8px; padding-left: 20px; }
.minis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) { .minis.two { grid-template-columns: 1fr; } }
.pickwrap { position: relative; display: inline-block; }
.pickwrap input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.pickwrap input[type=file]::file-selector-button { cursor: pointer; }
.pickwrap:focus-within .btn { outline: 3px solid var(--text); outline-offset: 3px; }
.vernote { color: var(--soft); font-size: 14px; max-width: 62ch; }

/* the install steps on a phone: the text column may shrink (a long file name wraps instead of pushing the text out of the tile) */
.installsteps li { grid-template-columns: 56px minmax(0, 1fr); }
.installsteps li > div, .prose > * { min-width: 0; }
.prose code, .installsteps code { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 520px) {
  .installsteps li { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; }
  .icbox { width: 46px; height: 46px; } .icbox .ic { width: 24px; height: 24px; }
  .icbox::after { top: -9px; left: -9px; }
}
