/* =============================================================================
   MechItAll website styles
   -----------------------------------------------------------------------------
   1. COLORS  ........ the three looks (sage, midnight, holo). Change colors here.
   2. BASICS ......... fonts, links, headings
   3. LAYOUT ......... page width, sections, grids
   4. HEADER / FOOTER
   5. BUTTONS, TAGS, CARDS
   6. HOME PAGE ...... hero, featured app
   7. APPS ........... app cards, app page, slideshow, player
   8. FORMS
   9. HELP / FAQ / SEARCH
   10. ADS
   11. SMALL SCREENS and motion
   ============================================================================= */

/* ---------- 1. COLORS -------------------------------------------------------
   Two looks, each with a light and a dark version:
     Holo  → holo-light (light) / holo (dark)      Sage → sage (light) / midnight (dark)
   Which one shows is decided in src/layout/head.html (Auto / Light / Dark). */
/* Sage Circuit: the green from the original site (default) */
:root, [data-theme="sage"] {
  --bg: #e9f2ec;            /* page background */
  --bg-alt: #dcebe2;        /* every other section */
  --surface: #ffffff;       /* cards */
  --surface-2: #f2f8f4;     /* inputs, quiet boxes */
  --text: #14211a;          /* main text */
  --muted: #4a6355;         /* secondary text */
  --border: #c2d6c9;
  --brand: #2f5a43;         /* buttons and links */
  --brand-ink: #ffffff;     /* text on buttons */
  --brand-soft: #7fa68b;    /* the original sage */
  --header-bg: rgba(233, 242, 236, .86);
  --glow: rgba(47, 90, 67, .18);
  --circuit: rgba(47, 90, 67, .28);   /* animated lines in the hero */
  --grad: linear-gradient(100deg, #3b2fd6, #a03cf0 45%, #e0569f 75%, #f08a2e);  /* logo colors */
  --shadow: 0 10px 30px rgba(20, 50, 34, .10);
  color-scheme: light;
}
/* Midnight Circuit: the same green on a dark background */
[data-theme="midnight"] {
  --bg: #0c1410; --bg-alt: #101b15; --surface: #15231b; --surface-2: #1b2d23;
  --text: #e6f2ea; --muted: #9cb8a7; --border: #284235;
  --brand: #7fd6a0; --brand-ink: #06140c; --brand-soft: #4f8a66;
  --header-bg: rgba(12, 20, 16, .82);
  --glow: rgba(127, 214, 160, .22); --circuit: rgba(127, 214, 160, .30);
  --grad: linear-gradient(100deg, #8f85ff, #c77dff 45%, #ff8ac6 75%, #ffb866);
  --shadow: 0 12px 34px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
/* Holo: dark, with the purple, blue and orange of the logo */
[data-theme="holo"] {
  --bg: #0b0b1e; --bg-alt: #101029; --surface: #171739; --surface-2: #1f1f4b;
  --text: #f0efff; --muted: #aeacd8; --border: #2f2f6b;
  --brand: #a48bff; --brand-ink: #0b0b1e; --brand-soft: #5b3df5;
  --header-bg: rgba(11, 11, 30, .82);
  --glow: rgba(164, 139, 255, .28); --circuit: rgba(177, 77, 255, .35);
  --grad: linear-gradient(100deg, #7d6bff, #c060ff 40%, #ff7ac6 72%, #ffb347);
  --shadow: 0 12px 36px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* Holo Light: the logo colors on a pale lavender background */
[data-theme="holo-light"] {
  --bg: #f6f4ff; --bg-alt: #ece8ff; --surface: #ffffff; --surface-2: #f2efff;
  --text: #17123a; --muted: #565082; --border: #d8d1f4;
  --brand: #5b3df5; --brand-ink: #ffffff; --brand-soft: #a48bff;
  --header-bg: rgba(246, 244, 255, .86);
  --glow: rgba(91, 61, 245, .16); --circuit: rgba(124, 77, 255, .26);
  --grad: linear-gradient(100deg, #3b2fd6, #a03cf0 45%, #e0569f 75%, #f08a2e);
  --shadow: 0 10px 30px rgba(40, 20, 120, .10);
  color-scheme: light;
}

/* ---------- 2. BASICS ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Roboto Slab", Georgia, serif; line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
kbd { font: .8em ui-monospace, monospace; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.icon { flex: none; vertical-align: -4px; }
.muted { color: var(--muted); }
.kicker { font: 600 .78rem/1.2 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.center { text-align: center; }
.empty { color: var(--muted); padding: 1.2em 0; }

/* ---------- 3. LAYOUT ------------------------------------------------------- */
.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(780px, 100% - 32px); }
.section { padding: clamp(40px, 6vw, 76px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--border);
  background: radial-gradient(900px 300px at 15% 0%, var(--glow), transparent 70%); }
.page-head.center .lead { margin-inline: auto; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); align-items: start; }
.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin: 20px 0; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn-row.center { justify-content: center; }

/* ---------- 4. HEADER / FOOTER ---------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); margin-right: auto; }
.brand img { width: 56px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 6px var(--glow)); }
.brand-name { font: 800 1.3rem "Roboto Slab", serif; letter-spacing: -.02em; }
.brand-name span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.main-nav { display: flex; gap: 2px; }
.main-nav a { color: var(--text); text-decoration: none; padding: 8px 11px; border-radius: 8px; font-weight: 500; font-size: .95rem; white-space: nowrap; }
.main-nav a:hover { background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); border-radius: 8px 8px 0 0; }
.header-tools { display: flex; gap: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--border); }
.menu-btn { display: none; }

.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); margin-top: 0; padding: 48px 0 20px; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 28px; }
.footer-brand img { width: 120px; height: auto; margin-bottom: 10px; }
.footer-brand p { color: var(--muted); max-width: 34ch; }
.site-footer h2 { font: 700 .78rem ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.site-footer nav a { display: block; color: var(--text); text-decoration: none; padding: 4px 0; }
.site-footer nav a:hover { color: var(--brand); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); }
.footer-bottom .strapline { font: 600 .74rem ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: transform .15s, border-color .15s, color .15s; }
.socials a:hover { transform: translateY(-2px); border-color: var(--brand); color: var(--brand); }
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; }
.to-top[hidden] { display: none; }

/* ---------- 5. BUTTONS, TAGS, CARDS ----------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 12px; border: 1px solid var(--border); font: 600 .95rem Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; background: var(--surface); color: var(--text); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px var(--glow); }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
[data-theme="holo"] .btn-primary { background: var(--grad); color: #0b0b1e; }
[data-theme="holo-light"] .btn-primary { background: var(--grad); color: #ffffff; }
.btn-ghost { background: transparent; }
.btn-small { padding: 7px 12px; font-size: .86rem; border-radius: 10px; }
.btn.is-suggested { box-shadow: 0 0 0 2px var(--brand); }           /* the store that matches the visitor's device */
.tag { display: inline-flex; align-items: center; gap: 5px; font: 600 .74rem ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.tag .icon { width: 14px; height: 14px; vertical-align: 0; }
.platforms { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.card-link { text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; display: block; }
.card-link:hover { transform: translateY(-3px); border-color: var(--brand); }
.card-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--brand); margin-bottom: 12px; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.side-card h2 { font-size: 1.2rem; }
.side-card > img { width: 180px; margin: 0 auto 14px; }
.callout { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; padding: clamp(22px, 4vw, 36px); border-radius: 22px; border: 1px solid var(--border); background: linear-gradient(135deg, var(--surface), var(--surface-2)); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.callout::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.callout h2 { margin-bottom: .3em; }
.callout p { margin: 0; color: var(--muted); }
.callout .btn-row { margin-top: 0; }
.link-list { padding-left: 1.1em; margin: 14px 0; }
.link-list li { margin-bottom: 8px; }
.facts { margin: 0 0 6px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.facts dt { color: var(--muted); } .facts dd { margin: 0; text-align: right; font-weight: 600; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding: 7px 0 7px 26px; position: relative; border-bottom: 1px solid var(--border); }
.ticks li:last-child { border: 0; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 10px; height: 6px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; text-align: center; }
.stat b { display: block; font: 800 2.6rem "Roboto Slab", serif; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); }
.email-big { font: 700 1.2rem "Roboto Slab", serif; overflow-wrap: anywhere; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; margin-top: 14px; }
.progress i { display: block; height: 100%; background: var(--grad); }
.dev-card img, .dev-placeholder { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; margin-bottom: 14px; }
.dev-placeholder { display: grid; place-items: center; background: var(--surface-2); border: 1px dashed var(--border); color: var(--muted); }
.dev-placeholder .icon { width: 36px; height: 36px; }
.ideas { list-style: none; padding: 0; margin: 0 0 14px; }
.ideas li { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ideas .tag { justify-self: start; }
.swatches { display: flex; height: 54px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 14px; }
.swatches i { flex: 1; }
.theme-card.is-current { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.legal-list { display: grid; gap: 10px; }
.legal-row { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; }
.legal-app { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.legal-docs { color: var(--muted); font-size: .94rem; }

/* ---------- 6. HOME PAGE ---------------------------------------------------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border);
  background: radial-gradient(700px 420px at 50% 0%, var(--glow), transparent 70%), var(--bg); }
.circuit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; display: grid; justify-items: center; text-align: center; gap: 8px; padding: clamp(36px, 6vw, 72px) 0 clamp(44px, 7vw, 84px); }
.hero-logo img { width: min(340px, 62vw); filter: drop-shadow(0 18px 40px var(--glow)); animation: float 7s ease-in-out infinite; }
.hero-copy { display: grid; justify-items: center; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); margin-bottom: .35em; }
.hero .lead { margin-inline: auto; }
.hero .btn-row, .hero .socials { justify-content: center; }
@keyframes float { 50% { transform: translateY(-10px); } }
/* "Side by side" layout from the design lab */
[data-hero="split"] .hero-inner { grid-template-columns: 1.2fr 1fr; text-align: left; justify-items: start; align-items: center; gap: 40px; }
[data-hero="split"] .hero-logo { order: 2; justify-self: center; }
[data-hero="split"] .hero-copy { justify-items: start; }
[data-hero="split"] .hero .lead { margin-inline: 0; }
[data-hero="split"] .hero .btn-row, [data-hero="split"] .hero .socials { justify-content: flex-start; }

.featured { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.featured-art img { width: 100%; height: 100%; object-fit: cover; min-height: 240px; }
.featured-body { padding: clamp(20px, 3.4vw, 36px); display: grid; align-content: center; }
.featured-title { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.featured-title h2 { margin: 0; font-size: clamp(1.25rem, 2.2vw, 1.7rem); }
.genre { margin: 0; color: var(--muted); font-size: .9rem; }
.more { display: inline-flex; align-items: center; gap: 4px; margin-top: 18px; font-weight: 600; }

/* ---------- 7. APPS --------------------------------------------------------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.app-card { display: grid; grid-template-rows: auto 1fr auto auto; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); transition: transform .18s, border-color .18s; }
.app-card:hover { transform: translateY(-4px); border-color: var(--brand); }
.app-card[hidden] { display: none; }
.app-card-main { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.app-card-main h3 { margin: 0; }
.app-icon { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); flex: none; }
.app-icon.small { width: 36px; height: 36px; border-radius: 9px; display: inline-block; vertical-align: middle; }
.app-icon.big { width: 128px; height: 128px; border-radius: 28px; }
.app-tagline { margin: 0; color: var(--muted); }
.app-card-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 600 .88rem Inter, sans-serif; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.chip.is-on { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.filter-box { font: inherit; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); min-width: 0; flex: 1 1 200px; max-width: 320px; }
.filter-box.big { max-width: 560px; width: 100%; padding: 14px 18px; font-size: 1.05rem; margin-top: 10px; box-shadow: var(--shadow); }

.app-head-row { display: flex; gap: clamp(16px, 3vw, 32px); align-items: flex-start; }
.app-meta p { margin-bottom: 6px; }
.extra-image { max-width: min(640px, 100%); margin: 0 auto; }
.carousel { position: relative; }
.slides { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; list-style: none; margin: 0; padding: 4px 2px 12px; scrollbar-width: thin; }
.slide { flex: none; scroll-snap-align: center; }
.slide img { border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); cursor: zoom-in; background: var(--surface-2); }
.carousel.landscape .slide { width: min(820px, 88%); }
.carousel.landscape .slide img { width: 100%; }
.carousel.portrait .slide img { height: min(520px, 68vh); width: auto; }
.carousel-btn { position: absolute; top: calc(50% - 30px); z-index: 2; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 50%; }
.carousel-btn.prev { left: -6px; } .carousel-btn.next { right: -6px; }
.dots { display: flex; justify-content: center; gap: 7px; }
.dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; background: var(--border); cursor: pointer; }
.dots button.is-on { background: var(--brand); width: 22px; border-radius: 9px; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .88); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 10px; }
.lightbox-close { position: absolute; top: 14px; right: 14px; color: #fff; background: rgba(255, 255, 255, .12); }

.player { position: relative; aspect-ratio: 16/10; max-height: 78vh; width: 100%; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: #000; box-shadow: var(--shadow); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player-start, .video { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #000; display: grid; place-items: center; }
.player-start img, .video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.player-cta { position: relative; display: inline-flex; align-items: center; gap: 10px; font: 700 1.1rem Inter, sans-serif; color: #fff; background: rgba(0, 0, 0, .55); border: 2px solid #fff; padding: 14px 24px; border-radius: 999px; backdrop-filter: blur(4px); }
.video { position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- 8. FORMS -------------------------------------------------------- */
.form { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form input:not([type=radio]):not([type=checkbox]), .form select, .form textarea { font: inherit; font-weight: 400; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); width: 100%; }
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.form .req, .form .opt { font-weight: 400; font-size: .8rem; color: var(--muted); }
.form .choice { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; }
.form .choice legend { font-weight: 600; font-size: .95rem; padding: 0 6px; }
.form .choice label, .form label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.form .choice input, .form .check input { margin-top: 5px; accent-color: var(--brand); }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.form-note { margin: 0; font-size: .84rem; color: var(--muted); }
.form-status { margin: 0; font-weight: 600; min-height: 1.4em; }
.form-status.ok { color: var(--brand); }
.form-status.err { color: #c0392b; }
[data-theme="midnight"] .form-status.err, [data-theme="holo"] .form-status.err { color: #ff8f85; }
.form.is-sent > :not(.form-status) { display: none; }
.form.is-sent .form-status { font-size: 1.1rem; }

/* ---------- 9. HELP / FAQ / SEARCH ------------------------------------------ */
.qa { display: grid; gap: 10px; margin: 14px 0 26px; }
.qa-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.qa-item[hidden] { display: none; }
.qa-item summary { cursor: pointer; padding: 15px 44px 15px 18px; font-weight: 600; list-style: none; position: relative; }
.qa-item summary::-webkit-details-marker { display: none; }
.qa-item summary::after { content: ""; position: absolute; right: 20px; top: 20px; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.qa-item[open] summary::after { transform: rotate(-135deg); top: 24px; }
.qa-item[open] { border-color: var(--brand); }
.qa-answer { padding: 0 18px 4px; color: var(--muted); }
.help-app h3 { display: flex; align-items: center; gap: 10px; margin-top: 26px; }
.help-app h3 a { color: var(--text); text-decoration: none; }
.help-app[hidden] { display: none; }
.search-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(5, 12, 8, .6); backdrop-filter: blur(6px); display: grid; align-items: start; justify-items: center; padding: 9vh 16px 16px; }
.search-overlay[hidden] { display: none; }
.search-box { width: min(680px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); overflow: hidden; }
.search-input-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.search-input-row input { flex: 1; min-width: 0; font: inherit; font-size: 1.08rem; border: 0; background: transparent; color: var(--text); outline: 0; }
.search-results { max-height: 58vh; overflow-y: auto; }
.search-results.page { max-height: none; }
.search-results a { display: block; padding: 12px 16px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); }
.search-results a:hover, .search-results a.is-active { background: var(--surface-2); }
.search-results b { display: block; }
.search-results span { color: var(--muted); font-size: .9rem; }
.search-results mark { background: color-mix(in srgb, var(--brand) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.search-results .none { padding: 16px; color: var(--muted); }
.search-hint { margin: 0; padding: 10px 16px; font-size: .82rem; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 95; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); }

/* ---------- 10. ADS ----------------------------------------------------------
   Ad spaces sit between sections, never over the content, and keep their height
   so the page doesn't jump when an ad loads. */
.ad-slot { width: min(970px, 100% - 32px); margin: 8px auto 28px; min-height: 120px; padding: 6px 0 0; text-align: center; }
.ad-label { display: block; font: 600 .66rem ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* ---------- 11. SMALL SCREENS and motion ------------------------------------ */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }   /* fades in while scrolling */
.js .reveal.is-in { opacity: 1; transform: none; }
@media (max-width: 1040px) {
  .menu-btn { display: inline-grid; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px 16px; box-shadow: var(--shadow); }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 10px; font-size: 1.02rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .two-col, .featured, [data-hero="split"] .hero-inner { grid-template-columns: 1fr; }
  [data-hero="split"] .hero-inner { text-align: center; justify-items: center; }
  [data-hero="split"] .hero-logo { order: 0; }
  [data-hero="split"] .hero-copy { justify-items: center; }
  [data-hero="split"] .hero .btn-row, [data-hero="split"] .hero .socials { justify-content: center; }
  .app-head-row { flex-direction: column; }
  .app-icon.big { width: 96px; height: 96px; border-radius: 22px; }
  .carousel-btn { display: none; }
  .brand-name { font-size: 1.1rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px 16px; }   /* link columns side by side on phones */
  .btn { padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-logo img { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* Ribbon shown only on the preview copy (MIA_PREVIEW=1) */
.preview-ribbon { position: fixed; left: 12px; bottom: 12px; z-index: 60; font: 700 .72rem ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; background: #ffb347; color: #1a1205; padding: 6px 10px; border-radius: 8px; box-shadow: var(--shadow); pointer-events: none; }

/* The full logo has dark blue lettering: on the dark looks it sits on a light tile so it stays readable */
[data-theme="midnight"] .footer-brand img, [data-theme="holo"] .footer-brand img,
[data-theme="midnight"] .side-card > img, [data-theme="holo"] .side-card > img { background: #f3f1ff; border-radius: 18px; padding: 8px; }

/* Light/dark switch in the header: only the icon for the current mode is visible */
.mode-btn .mode-icon { display: none; width: 20px; height: 20px; line-height: 0; }
.mode-btn .mode-icon .icon { vertical-align: 0; display: block; }
[data-mode="auto"] .mode-icon[data-for="auto"], [data-mode="light"] .mode-icon[data-for="light"], [data-mode="dark"] .mode-icon[data-for="dark"] { display: block; }
.mode-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.mode-choice .chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: transparent; }

/* Home: the three action tiles in the "Have an idea…" box (stay side by side on phones) */
.action-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; flex: 1 1 520px; }
.action-tile { display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center; padding: 14px 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s; }
.action-tile:hover { transform: translateY(-2px); border-color: var(--brand); }
.action-tile .icon { width: 26px; height: 26px; color: var(--brand); margin-bottom: 4px; }
.action-tile b { font-size: .98rem; }
.action-tile span { font-size: .8rem; color: var(--muted); line-height: 1.35; }
@media (max-width: 480px) { .action-tile { padding: 12px 6px; } .action-tile span { display: none; } .action-tile b { font-size: .9rem; } }

/* Home: "In the spotlight" (picture on the right, so it doesn't repeat the Latest release layout) */
.spotlight { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.spotlight-body { padding: clamp(20px, 3.4vw, 36px); display: grid; align-content: center; }
.spotlight-art img { width: 100%; height: 100%; object-fit: cover; min-height: 240px; }
@media (max-width: 820px) { .spotlight { grid-template-columns: 1fr; } .spotlight-art { order: -1; } }

/* ---------- Language menu (header) ------------------------------------------------------------ */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; width: auto; padding: 0 8px; gap: 4px; grid-auto-flow: column; font: 600 .78rem/1 Inter, system-ui, sans-serif; letter-spacing: .04em; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary .icon { width: 18px; height: 18px; }
.lang-menu[open] > summary, .lang-menu > summary:hover { background: var(--surface-2); }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); z-index: 60; }
.lang-list a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.lang-list a:hover, .lang-list a:focus-visible { background: var(--surface-2); }
.lang-list a[aria-current] { font-weight: 700; color: var(--brand); }
.lang-list small { color: var(--muted); font-weight: 600; }
/* Small bar offering the visitor's own language */
.lang-offer { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 10px;
  max-width: calc(100% - 32px); padding: 10px 10px 10px 16px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.lang-offer a { font-weight: 700; color: var(--brand); white-space: nowrap; }
.lang-offer button { flex: none; }

/* ---------- Votes on the In development page ---------------------------------------------------- */
.vote-btn { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 600 .9rem/1 Inter, system-ui, sans-serif; cursor: pointer; }
.vote-btn .icon { width: 16px; height: 16px; }
.vote-btn b { min-width: 1.5em; padding: 3px 7px; border-radius: 99px; background: var(--surface); font-size: .8rem; }
.vote-btn b:empty { display: none; }
.vote-btn:hover { border-color: var(--brand); }
.vote-btn[aria-pressed="true"] { background: var(--grad); color: #fff; border-color: transparent; cursor: default; }
.vote-btn[aria-pressed="true"] b { background: rgba(255,255,255,.22); color: #fff; }
