/* Nova's site, in Nova's own world: libadwaita surfaces from the app
   (frontend/src/app.css), laid out like a GNOME Software app page.
   The accent is the logo's green, as a libadwaita accent colour. */

@font-face {
  font-family: "Adwaita Sans";
  src: url("assets/fonts/AdwaitaSans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Adwaita Mono";
  src: url("assets/fonts/AdwaitaMono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --accent: #2b7f3e;          /* accent background (green, darkened for white text) */
  --accent-fg: #ffffff;
  --accent-text: #1c7a33;     /* accent as text */
  --destructive: #e01b24;
  --warning: #e5a50a;

  --fg: rgba(0, 0, 6, 0.8);
  --fg-dim: rgba(0, 0, 6, 0.6);
  --bg: #fafafb;              /* window */
  --view-bg: #ffffff;
  --header-bg: #ffffff;
  --sidebar-bg: #ebebed;
  --band-bg: #ebebed;         /* screenshot strip */
  --card-bg: #ffffff;
  --popover-bg: #ffffff;
  --border: rgba(0, 0, 6, 0.15);
  --shade: rgba(0, 0, 6, 0.07);
  --card-shade: 0 0 0 1px rgba(0, 0, 6, 0.03), 0 1px 3px 1px rgba(0, 0, 6, 0.07), 0 2px 6px 2px rgba(0, 0, 6, 0.03);
  --menu-shadow: 0 0 0 1px rgba(0, 0, 6, 0.07), 0 1px 5px 1px rgba(0, 0, 6, 0.09), 0 2px 14px 3px rgba(0, 0, 6, 0.05);
  --window-shadow: 0 0 0 1px rgba(0, 0, 6, 0.1), 0 2px 8px 2px rgba(0, 0, 6, 0.1), 0 18px 40px -6px rgba(0, 0, 6, 0.22);
  --toast-bg: rgba(40, 40, 44, 0.96);

  --hover: color-mix(in srgb, var(--fg) 7%, transparent);
  --active: color-mix(in srgb, var(--fg) 16%, transparent);
  --btn-bg: color-mix(in srgb, var(--fg) 10%, transparent);
  --btn-hover: color-mix(in srgb, var(--fg) 15%, transparent);
  --btn-active: color-mix(in srgb, var(--fg) 30%, transparent);
  --selected: color-mix(in srgb, var(--accent) 22%, transparent);
  --selected-hover: color-mix(in srgb, var(--accent) 30%, transparent);
  --focus: color-mix(in srgb, var(--accent) 55%, transparent);

  --font: "Adwaita Sans", "Cantarell", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Adwaita Mono", "Source Code Pro", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent-text: #78d38a;
    --fg: #ffffff;
    --fg-dim: rgba(255, 255, 255, 0.62);
    --bg: #222226;
    --view-bg: #1d1d20;
    --header-bg: #1d1d20;
    --sidebar-bg: #2e2e32;
    --band-bg: #1a1a1d;
    --card-bg: rgba(255, 255, 255, 0.08);
    --popover-bg: #36363a;
    --border: rgba(255, 255, 255, 0.15);
    --shade: rgba(0, 0, 6, 0.36);
    --card-shade: 0 0 0 1px rgba(0, 0, 6, 0.09), 0 1px 3px 1px rgba(0, 0, 6, 0.2), 0 2px 6px 2px rgba(0, 0, 6, 0.08);
    --menu-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 1px 5px 1px rgba(0, 0, 0, 0.25), 0 2px 14px 3px rgba(0, 0, 0, 0.2);
    --window-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 2px 8px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -6px rgba(0, 0, 0, 0.6);
    --toast-bg: rgba(64, 64, 68, 0.97);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent-text: #78d38a;
  --fg: #ffffff;
  --fg-dim: rgba(255, 255, 255, 0.62);
  --bg: #222226;
  --view-bg: #1d1d20;
  --header-bg: #1d1d20;
  --sidebar-bg: #2e2e32;
  --band-bg: #1a1a1d;
  --card-bg: rgba(255, 255, 255, 0.08);
  --popover-bg: #36363a;
  --border: rgba(255, 255, 255, 0.15);
  --shade: rgba(0, 0, 6, 0.36);
  --card-shade: 0 0 0 1px rgba(0, 0, 6, 0.09), 0 1px 3px 1px rgba(0, 0, 6, 0.2), 0 2px 6px 2px rgba(0, 0, 6, 0.08);
  --menu-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 1px 5px 1px rgba(0, 0, 0, 0.25), 0 2px 14px 3px rgba(0, 0, 0, 0.2);
  --window-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 2px 8px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -6px rgba(0, 0, 0, 0.6);
  --toast-bg: rgba(64, 64, 68, 0.97);
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font: 400 16px/1.5 var(--font);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code, kbd { font-family: var(--mono); font-size: 0.875em; }
b { font-weight: 650; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
html { scrollbar-color: color-mix(in srgb, var(--fg) 35%, transparent) transparent; }
h1, h2, h3 { margin: 0; text-wrap: balance; }

.ic { width: 16px; height: 16px; flex: none; fill: currentColor; }
.wrap { width: min(100% - 2 * var(--gutter), 960px); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  padding: 8px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-fg);
  text-decoration: none; font-weight: 700;
}
.skip:focus { top: 8px; }

kbd {
  display: inline-block; min-width: 1.9em; padding: 1px 7px; text-align: center;
  border-radius: 6px; font-family: var(--font); font-size: 0.8125rem; font-weight: 600; line-height: 1.5;
  color: var(--fg); background: var(--card-bg);
  box-shadow: inset 0 0 0 1px var(--border), inset 0 -2px 0 var(--shade);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 34px; padding: 6px 14px; border: 0; border-radius: 6px;
  font: inherit; font-weight: 700; font-size: 0.9375rem; line-height: 1.2;
  color: var(--fg); background: var(--btn-bg); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s;
}
.btn:hover { background: var(--btn-hover); }
.btn:active { background: var(--btn-active); }
.btn.flat { background: transparent; }
.btn.flat:hover { background: var(--hover); }
.btn.flat:active { background: var(--active); }
.btn.icon { width: 34px; padding: 0; }
.btn.small { min-height: 28px; padding: 4px 10px; font-size: 0.875rem; color: var(--accent-text); }
.btn.small .ic { width: 12px; height: 12px; }
.btn.pill { min-height: 44px; padding: 10px 28px; border-radius: 999px; font-size: 1rem; }
.btn.suggested { background: var(--accent); color: var(--accent-fg); }
.btn.suggested:hover { background: color-mix(in srgb, var(--accent), #fff 9%); }
.btn.suggested:active { background: color-mix(in srgb, var(--accent), #000 12%); }

/* ---------- Header bar ---------- */
.headerbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--header-bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow 0.2s;
}
.headerbar.scrolled { box-shadow: 0 1px 0 var(--shade), 0 2px 6px -2px var(--shade); }
.hb-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  height: 47px; padding: 0 6px 0 12px;
}
.hb-title { display: flex; align-items: center; gap: 10px; justify-self: start; color: var(--fg); text-decoration: none; font-weight: 700; padding: 4px 8px 4px 4px; border-radius: 6px; }
.hb-title:hover { background: var(--hover); }
.hb-end { display: flex; gap: 4px; justify-self: end; position: relative; }

.switcher { display: flex; gap: 2px; }
.switcher a {
  display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px;
  border-radius: 6px; color: var(--fg); text-decoration: none; font-weight: 700; font-size: 0.9375rem; white-space: nowrap;
}
.switcher a:hover { background: var(--hover); }
.switcher a[aria-current="true"] { background: var(--active); }

/* Popover menu */
.popover {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 30;
  min-width: 220px; padding: 6px; border-radius: 12px;
  background: var(--popover-bg); box-shadow: var(--menu-shadow);
  transform-origin: top right;
}
.popover:not([hidden]) { animation: pop 0.16s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(-4px); } }
.menu a {
  display: block; padding: 7px 12px; border-radius: 6px; color: var(--fg); text-decoration: none;
}
.menu a:hover, .menu a:focus-visible { background: var(--hover); }
.menu hr { border: 0; height: 1px; background: var(--border); margin: 6px 0; opacity: 0.6; }
.style-switcher { display: flex; justify-content: space-around; padding: 6px 4px; }
.style-switcher button {
  position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  box-shadow: inset 0 0 0 1px var(--border);
}
.style-switcher .sw-system { background: linear-gradient(-45deg, #222226 50%, #fafafb 50%); }
.style-switcher .sw-light { background: #fafafb; }
.style-switcher .sw-dark { background: #222226; }
.style-switcher button[aria-checked="true"] { box-shadow: inset 0 0 0 1px var(--border), 0 0 0 2px var(--popover-bg), 0 0 0 4px var(--accent); }
.style-switcher button[aria-checked="true"]::after {
  content: ""; position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent) center / 12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}

/* ---------- App header ---------- */
.app-header {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px;
  padding: clamp(28px, 6vh, 56px) 0 clamp(28px, 5vh, 44px);
}
.app-icon { width: 128px; height: 128px; filter: drop-shadow(0 4px 10px rgba(0, 0, 6, 0.18)); }
.ah-text h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; line-height: 1;
  letter-spacing: -0.03em; font-variation-settings: "opsz" 32;
}
.summary { margin: 10px 0 0; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.35; max-width: 34ch; }
.developer { margin: 10px 0 0; color: var(--fg-dim); font-size: 0.9375rem; display: flex; flex-wrap: wrap; gap: 6px; }
.developer span:first-child { font-weight: 700; color: var(--fg); }
.ah-action { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; min-width: 0; }
.ah-action .btn.pill { min-width: 220px; }
.ah-meta { margin: 0; color: var(--fg-dim); font-size: 0.875rem; line-height: 1.6; }

.cmd {
  display: flex; align-items: center; gap: 4px; min-width: 0;
  padding: 4px 4px 4px 12px; border-radius: 8px; background: var(--btn-bg);
}
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 6px 0; font-size: 0.8125rem; scrollbar-width: none; }
.cmd code::-webkit-scrollbar { display: none; }

/* ---------- Screenshot band ---------- */
.shots {
  position: relative; background: var(--band-bg);
  box-shadow: inset 0 1px 0 var(--shade), inset 0 -1px 0 var(--shade);
}
.shots-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; outline: none;
}
.shots-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; padding: 40px var(--gutter) 8px; min-width: 0; }
.stage { position: relative; width: 100%; display: grid; place-items: start center; }
.stage-desktop { height: min(600px, 62vw); min-height: 300px; }
.stage-phone { height: min(600px, max(62vw, 520px)); }
.stage-props { height: min(600px, max(62vw, 440px)); }
.noscript { text-align: center; padding: 120px 24px; color: var(--fg-dim); margin: 0; }

.osd {
  position: absolute; top: calc(50% - 40px); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  color: #fff; background: rgba(0, 0, 6, 0.55); backdrop-filter: blur(6px);
  transition: background-color 0.15s, opacity 0.2s;
}
.osd:hover { background: rgba(0, 0, 6, 0.75); }
.osd:disabled { opacity: 0; pointer-events: none; }
.osd.prev { left: 16px; }
.osd.next { right: 16px; }
.shots-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px var(--gutter) 22px; }
.dots { display: flex; gap: 2px; }
.dots button { width: 24px; height: 24px; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; border-radius: 50%; }
.dots button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fg); opacity: 0.25; transition: opacity 0.2s, transform 0.2s var(--ease); }
.dots button[aria-selected="true"]::before { opacity: 0.85; transform: scale(1.15); }
.shots-caption { margin: 0; color: var(--fg-dim); font-size: 0.875rem; text-align: center; max-width: 64ch; min-height: 2.6em; }
.shots-caption kbd { font-size: 0.75rem; }

/* ---------- Context tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 36px 0 12px; }
.tile {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 18px 12px 16px; border-radius: 12px; background: var(--card-bg); box-shadow: var(--card-shade);
  color: var(--fg); text-decoration: none; transition: background-color 0.15s;
}
.tile:hover { background: color-mix(in srgb, var(--card-bg), var(--fg) 4%); }
.tile-art {
  display: flex; gap: 6px; align-items: center; justify-content: center; min-width: 52px; height: 52px; padding: 0 14px; margin-bottom: 8px;
  border-radius: 999px; color: var(--accent-text); background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.tile-art .ic { width: 22px; height: 22px; }
.tile strong { font-size: 0.9375rem; }
.tile span:last-child { color: var(--fg-dim); font-size: 0.8125rem; line-height: 1.35; }

/* ---------- Description, groups, boxed lists ---------- */
.about, .news, .download { padding-top: 48px; }
.prose { max-width: 66ch; margin-bottom: 40px; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.875rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 14px; }
.prose p { margin: 0 0 12px; font-size: 1.0625rem; }

.group { margin-bottom: 36px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.group-title { font-size: 1.0625rem; font-weight: 700; margin: 0 0 12px 2px; }
h2.group-title { font-size: clamp(1.375rem, 2.2vw, 1.625rem); font-weight: 800; letter-spacing: -0.015em; }
.group-desc { margin: -4px 0 16px 2px; color: var(--fg-dim); max-width: 70ch; }
.group-foot { margin: 12px 0 0 2px; color: var(--fg-dim); font-size: 0.9375rem; }

.boxed-list {
  list-style: none; margin: 0; padding: 0; border-radius: 12px; overflow: hidden;
  background: var(--card-bg); box-shadow: var(--card-shade);
}
.boxed-list > * + * { box-shadow: inset 0 1px 0 var(--shade); }
.row { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 16px; }
.row-ic { width: 16px; height: 16px; color: var(--fg); opacity: 0.85; align-self: center; }
.row-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.row-text strong { font-weight: 600; }
.row-text > span { color: var(--fg-dim); font-size: 0.875rem; line-height: 1.4; }
.keys { display: flex; align-items: center; gap: 4px; flex: none; }
.keys .plus { color: var(--fg-dim); font-size: 0.8125rem; }
.link-row { padding: 0; }
.link-row a { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px; padding: 10px 16px; color: var(--fg); text-decoration: none; }
.link-row a:hover { background: var(--hover); }
.link-row .ic { opacity: 0.7; }

.card { background: var(--card-bg); border-radius: 12px; box-shadow: var(--card-shade); }

/* What's new */
.release { padding: 18px 20px 6px; }
.release-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.release-head span { color: var(--fg-dim); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.release-items { list-style: none; margin: 0; padding: 0; }
.release-items li { padding: 10px 0 12px; color: var(--fg-dim); font-size: 0.9375rem; max-width: 72ch; }
.release-items li + li { box-shadow: inset 0 1px 0 var(--shade); }
.release-items strong { display: block; color: var(--fg); font-weight: 600; font-size: 1rem; }
.release-items .kind { display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; color: var(--accent-text); background: color-mix(in srgb, var(--accent) 14%, transparent); vertical-align: 1px; }

/* Expander rows (platforms) */
.expander > summary {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 16px;
  cursor: pointer; list-style: none; transition: background-color 0.15s;
}
.expander > summary::-webkit-details-marker { display: none; }
.expander > summary:hover { background: var(--hover); }
.expander > summary .row-ic { width: 20px; height: 20px; }
.expander > summary strong { font-size: 1.0625rem; }
.chev { opacity: 0.7; transition: transform 0.2s var(--ease); }
.expander[open] > summary .chev { transform: rotate(180deg); }
.badge { flex: none; padding: 2px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 700; color: var(--accent-text); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.expander-body { padding: 6px 16px 22px 50px; box-shadow: inset 0 1px 0 var(--shade); background: color-mix(in srgb, var(--fg) 2%, transparent); }
.expander-body > :first-child { margin-top: 16px; }
.expander-body.split { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; }
.sub-title { margin: 18px 0 8px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tag { padding: 0 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; color: var(--accent-text); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.note { margin: 8px 0 0; color: var(--fg-dim); font-size: 0.875rem; max-width: 68ch; }
.copyable .btn { flex: none; }
.copyable .btn.done { color: var(--accent-text); }

.files { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px; }
.expander-body .files { margin-top: 12px; }
.files a {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px;
  color: var(--fg); text-decoration: none;
}
.files a:hover { background: var(--hover); }
.files img { width: 32px; height: 32px; }
.files span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.files strong { font-weight: 600; }
.files code { color: var(--fg-dim); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files em { font-style: normal; font-size: 0.75rem; font-weight: 700; color: var(--accent-text); flex: none; }

.inner { margin-top: 18px; }
.inner > summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-weight: 600; color: var(--accent-text); width: fit-content; border-radius: 4px; }
.inner > summary::-webkit-details-marker { display: none; }
.inner > summary .ic { width: 12px; height: 12px; transition: transform 0.2s var(--ease); }
.inner[open] > summary .ic { transform: rotate(90deg); }
.deps { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 12px 0 0; font-size: 0.875rem; }
.deps dt { color: var(--fg-dim); }
.deps dd { margin: 0; min-width: 0; overflow-x: auto; }
.deps code { white-space: nowrap; }

.steps { margin: 16px 0 0; padding-left: 1.3em; max-width: 64ch; }
.steps li { margin: 6px 0; padding-left: 4px; }
.steps li::marker { color: var(--fg-dim); font-weight: 700; }

.banner {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: 10px;
  background: color-mix(in srgb, var(--warning) 16%, transparent);
}
.banner .ic { margin-top: 3px; color: color-mix(in srgb, var(--warning), var(--fg) 45%); }
.banner p { margin: 0; font-size: 0.9375rem; }

.qr { margin: 16px 0 0; text-align: center; width: 172px; }
.qr img { width: 148px; height: 148px; margin: 0 auto; padding: 10px; background: #fff; border-radius: 12px; box-shadow: var(--card-shade); box-sizing: content-box; }
.qr figcaption { margin-top: 8px; font-size: 0.8125rem; color: var(--fg-dim); }

.links { padding-bottom: 8px; }

/* Footer */
.foot { padding: 40px 0 56px; color: var(--fg-dim); font-size: 0.875rem; }
.foot p { margin: 0 0 6px; max-width: 80ch; }
.credits { font-size: 0.8125rem; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: 24px; z-index: 40; display: grid; justify-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; min-height: 44px; max-width: calc(100vw - 32px);
  padding: 6px 6px 6px 18px; border-radius: 999px; color: #fff; background: var(--toast-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); font-weight: 600; font-size: 0.9375rem; pointer-events: auto;
  animation: toast-in 0.3s var(--ease);
}
.toast.out { animation: toast-out 0.2s ease-in forwards; }
.toast button { border: 0; font: inherit; font-weight: 700; color: #fff; background: rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.toast button:hover { background: rgba(255, 255, 255, 0.22); }
.toast .x { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; background: transparent; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* =====================================================================
   The live Nova windows. Scoped under .nw; sizes follow the app.
   ===================================================================== */
.nw {
  --cell: 104px;
  position: relative; display: flex; overflow: hidden;
  width: 1040px; height: 620px; flex: none;
  border-radius: 12px; background: var(--view-bg); box-shadow: var(--window-shadow);
  font-size: 14.667px; line-height: 1.35; color: var(--fg);
  user-select: none; -webkit-user-select: none; cursor: default; text-align: left;
  transform-origin: top center;
}
.nw button { font: inherit; color: inherit; }
.nw .ic { width: 16px; height: 16px; }

.nw-side { width: 220px; flex: none; display: flex; flex-direction: column; background: var(--sidebar-bg); box-shadow: inset -1px 0 0 var(--shade); }
.nw-side-hb { display: flex; align-items: center; justify-content: space-between; height: 47px; padding: 0 6px 0 14px; font-weight: 700; flex: none; }
.nw-rows { padding: 0 6px; overflow: auto; flex: 1; }
.nw-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 36px; margin: 2px 0; padding: 0 12px;
  border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: left;
}
.nw-row:hover { background: var(--hover); }
.nw-row[aria-current="true"] { background: var(--active); }
.nw-sep { height: 1px; margin: 6px 10px; background: var(--border); opacity: 0.6; }
.nw-acct { display: flex; align-items: center; gap: 10px; padding: 12px 14px; flex: none; }
.nw-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: #26a269; flex: none; }
.nw-acct span:last-child { display: flex; flex-direction: column; font-weight: 700; line-height: 1.25; }
.nw-acct small { font-weight: 400; color: var(--fg-dim); font-size: 0.85em; }

.nw-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.nw-hb { display: flex; align-items: center; gap: 6px; height: 47px; padding: 0 8px; flex: none; }
.nw-b {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 0; border-radius: 6px;
  background: transparent; cursor: pointer;
}
.nw-b:hover:not(:disabled) { background: var(--hover); }
.nw-b:active:not(:disabled) { background: var(--active); }
.nw-b:disabled { opacity: 0.35; cursor: default; }
.nw-b.round { width: 24px; height: 24px; border-radius: 50%; background: var(--btn-bg); }
.nw-b.round .ic { width: 12px; height: 12px; }
.nw-b.split { width: auto; padding: 0 6px; gap: 4px; display: flex; }
.nw-b.split .pan { width: 12px; height: 12px; opacity: 0.8; }
.nw-path {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 2px 0 4px;
  border-radius: 6px; background: var(--btn-bg); overflow: hidden;
}
.nw-seg {
  display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border: 0; border-radius: 4px;
  background: transparent; white-space: nowrap; cursor: pointer; color: var(--fg-dim);
}
.nw-seg:hover { background: var(--hover); color: var(--fg); }
.nw-seg.cur { color: var(--fg); font-weight: 700; }
.nw-slash { color: var(--fg-dim); opacity: 0.6; }
.nw-path .nw-b { margin-left: auto; width: 28px; height: 28px; }

.nw-view { flex: 1; overflow: auto; position: relative; outline: none; scrollbar-width: thin; }
.nw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cell), 1fr)); gap: 6px; padding: 12px 18px 48px; align-content: start; }
.nw-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 10px;
  border: 0; border-radius: 12px; background: transparent; cursor: pointer; min-width: 0;
}
.nw-item:hover { background: var(--hover); }
.nw-item[aria-selected="true"] { background: var(--selected); }
.nw-item[aria-selected="true"]:hover { background: var(--selected-hover); }
.nw-ib { width: 64px; height: 64px; display: grid; place-items: center; position: relative; }
.nw-ib img { width: 64px; height: 64px; }
.nw-ib img.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0, 0, 6, 0.1), 0 1px 3px rgba(0, 0, 6, 0.2); }
.nw-star { position: absolute; right: -2px; bottom: 0; width: 14px; height: 14px; color: var(--warning); fill: currentColor; filter: drop-shadow(0 0 1px var(--view-bg)) drop-shadow(0 0 1px var(--view-bg)); }
.nw-label { max-width: 100%; padding: 0 2px; text-align: center; overflow-wrap: anywhere; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.nw-list { padding: 4px 12px 48px; }
.nw-colhead, .nw-lrow { display: grid; grid-template-columns: minmax(0, 1fr) 90px 120px 30px; align-items: center; }
.nw-colhead { height: 34px; padding: 0 0; color: var(--fg-dim); font-size: 0.87em; font-weight: 700; }
.nw-colhead span { padding: 0 10px; }
.nw-lrow { min-height: 40px; border: 0; border-radius: 6px; width: 100%; background: transparent; cursor: pointer; text-align: left; padding: 0; }
.nw-lrow:hover { background: var(--hover); }
.nw-lrow[aria-selected="true"] { background: var(--selected); }
.nw-lrow > span { padding: 2px 10px; min-width: 0; color: var(--fg-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.nw-lrow > span:first-child { display: flex; align-items: center; gap: 10px; color: var(--fg); }
.nw-lrow > span:first-child img { width: 24px; height: 24px; flex: none; }
.nw-lrow > span:first-child img.thumb { height: 18px; object-fit: cover; border-radius: 2px; }
.nw-lrow .size { text-align: right; }
.nw-lrow .st { color: var(--warning); display: grid; place-items: center; padding: 0; }

.nw-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; color: var(--fg-dim); padding: 24px; }
.nw-empty .ic { width: 96px; height: 96px; opacity: 0.4; margin-bottom: 8px; }
.nw-empty strong { font-size: 1.6em; color: var(--fg); font-weight: 800; }

.nw-toasts { position: absolute; left: 0; right: 0; bottom: 16px; display: grid; justify-items: center; z-index: 5; pointer-events: none; }
.nw-toasts .toast { font-size: 14px; }

.nw-menu { position: absolute; z-index: 6; min-width: 190px; padding: 6px; border-radius: 12px; background: var(--popover-bg); box-shadow: var(--menu-shadow); animation: pop 0.14s var(--ease); }
.nw-menu button { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 7px 12px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: left; }
.nw-menu button:hover, .nw-menu button:focus-visible { background: var(--hover); outline: none; }
.nw-menu kbd { background: none; box-shadow: none; color: var(--fg-dim); font-weight: 400; padding: 0; }
.nw-menu hr { border: 0; height: 1px; background: var(--border); margin: 6px 0; opacity: 0.6; }

.nw-preview { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(0, 0, 6, 0.72); animation: fade 0.18s var(--ease); cursor: zoom-out; }
.nw-preview img { max-width: 78%; max-height: 74%; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.nw-preview p { position: absolute; bottom: 18px; margin: 0; color: #fff; font-weight: 600; }
@keyframes fade { from { opacity: 0; } }

/* Phone layout */
.phone-frame {
  padding: 10px; border-radius: 46px; background: #0d0d0f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 0 0 2px #3a3a3e, 0 24px 48px -10px rgba(0, 0, 6, 0.45);
  flex: none; transform-origin: top center;
}
.nw.phone { width: 360px; height: 740px; border-radius: 36px; flex-direction: column; box-shadow: none; }
.nw.phone .nw-hb { height: 56px; padding: 18px 10px 0; }
.nw.phone .nw-ptitle { flex: 1; text-align: center; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw.phone .nw-mrow { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 64px; padding: 8px 16px; border: 0; background: transparent; text-align: left; cursor: pointer; position: relative; }
.nw.phone .nw-mrow + .nw-mrow::before { content: ""; position: absolute; top: 0; left: 72px; right: 0; height: 1px; background: var(--shade); }
.nw.phone .nw-mrow:hover { background: var(--hover); }
.nw.phone .nw-mrow[aria-selected="true"] { background: var(--selected); }
.nw.phone .nw-mrow img { width: 40px; height: 40px; flex: none; }
.nw.phone .nw-mrow img.thumb { height: 30px; object-fit: cover; border-radius: 3px; }
.nw.phone .nw-mrow span { display: flex; flex-direction: column; min-width: 0; }
.nw.phone .nw-mrow small { color: var(--fg-dim); font-size: 0.85em; }
.nw.phone .nw-mrow b { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-bottom { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 14px 12px; flex: none; box-shadow: inset 0 1px 0 var(--shade); background: var(--header-bg); }
.nw-bottom .nw-b { width: 44px; height: 44px; }
.nw-bottom .nw-b .ic { width: 18px; height: 18px; }
.nw-drawer { position: absolute; inset: 0; z-index: 7; display: flex; }
.nw-drawer .nw-side { width: 270px; box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25); padding-top: 18px; animation: slide-in 0.22s var(--ease); }
.nw-drawer .nw-scrim { flex: 1; background: rgba(0, 0, 6, 0.3); animation: fade 0.2s; }
@keyframes slide-in { from { transform: translateX(-100%); } }

/* Properties dialog */
.nw.props { width: 400px; height: auto; flex-direction: column; background: var(--bg); border-radius: 14px; }
.nw.props .nw-hb { justify-content: space-between; padding: 0 8px 0 14px; }
.nw.props .nw-hb strong { flex: 1; text-align: center; padding-left: 34px; }
.props-body { padding: 4px 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.props-top { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0 6px; }
.props-top img { width: 96px; height: 96px; }
.props-top strong { font-size: 1.25em; font-weight: 800; }
.props-top span { color: var(--fg-dim); }
.props-list { border-radius: 12px; background: var(--card-bg); box-shadow: var(--card-shade); }
.props-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 6px 14px; }
.props-list > div + div { box-shadow: inset 0 1px 0 var(--shade); }
.props-list dt { color: var(--fg-dim); }
.props-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.props-list code { font-size: 0.82em; }
.props-list .wide { flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 14px; }
.props-list .wide dd { text-align: left; white-space: normal; overflow-wrap: anywhere; color: var(--fg); }
.sw {
  position: relative; width: 48px; height: 26px; flex: none; border: 0; border-radius: 999px; padding: 0; cursor: pointer;
  background: var(--btn-active); transition: background-color 0.2s;
}
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s var(--ease); }
.sw[aria-checked="true"] { background: var(--accent); }
.sw[aria-checked="true"]::after { transform: translateX(22px); }
.props-link { display: flex; gap: 6px; align-items: center; }
.props-link .btn { min-height: 30px; padding: 4px 12px; font-size: 0.9em; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hb-inner { grid-template-columns: auto 1fr auto; }
  .switcher { justify-self: center; }
  .switcher a { padding: 0 10px; }
  .switcher a .ic { display: none; }
  .app-header { grid-template-columns: auto 1fr; }
  .ah-action { grid-column: 1 / -1; align-items: stretch; text-align: left; }
  .ah-action .btn.pill { align-self: flex-start; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .osd { display: none; }
}
@media (max-width: 560px) {
  .hb-title span { display: none; }
  .switcher a { padding: 0 8px; font-size: 0.875rem; }
  .app-header { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 16px; padding-top: 24px; }
  .app-icon { width: 96px; height: 96px; }
  .summary { margin-inline: auto; }
  .developer { justify-content: center; }
  .ah-action { align-items: stretch; text-align: center; width: 100%; }
  .ah-action .btn.pill { align-self: stretch; }
  .slide { padding-top: 24px; }
  .keys { display: none; }
  .expander-body { padding-left: 16px; }
  .expander-body.split { grid-template-columns: 1fr; }
  .row { padding: 10px 14px; }
}
@media (max-width: 480px) {
  .hb-end > a { display: none; }
  .hb-inner { gap: 4px; padding-left: 8px; }
}
@media (max-width: 380px) {
  .switcher a { padding: 0 6px; font-size: 0.8125rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
.nw.phone .nw-toasts { bottom: 84px; }

/* next.nova.jevido.app: these are test builds, not a release. */
.next-banner {
  position: relative;
  z-index: 100;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.9em;
  background: var(--warning);
  color: rgba(0, 0, 0, 0.85);
}
.next-banner a {
  color: inherit;
  font-weight: bold;
}
