/* ==========================================================================
   Mugnsoft dl.mugnsoft.com — shared stylesheet
   Dark "ops console" theme. No framework dependency.
   ========================================================================== */

:root {
  /* palette */
  --bg:          #0a0f0b;
  --bg-raise:    #0f1710;
  --bg-panel:    #121b13;
  --ink:         #e6efe6;
  --ink-dim:     #9db2a0;
  --ink-faint:   #66796a;
  --green:       #449d44;            /* brand */
  --green-hi:    #7ee787;            /* bright accent */
  --green-glow:  rgba(126, 231, 135, 0.35);
  --blue:        #58a6ff;            /* improvements */
  --amber:       #e3b341;            /* bug fixes */
  --line:        rgba(126, 231, 135, 0.13);
  --line-strong: rgba(126, 231, 135, 0.30);

  /* type */
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --nav-h: 64px;
  --radius: 10px;
  --maxw: 1320px;
}

/* ---------- reset / base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* graph-paper grid + top glow */
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -12%, rgba(68, 157, 68, 0.20), transparent 65%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 100% 100%, 56px 56px, 56px 56px;
  background-attachment: fixed;
}

/* film grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  font-stretch: 115%;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

a { color: var(--green-hi); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; }

::selection { background: var(--green); color: #fff; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.mono { font-family: var(--font-mono); }

/* accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 3000;
  background: var(--green);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- navbar ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(10, 15, 11, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  font-stretch: 115%;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 34px; height: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink-dim);
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--ink);
  background: rgba(126, 231, 135, 0.08);
  text-decoration: none;
}
.nav-links a[aria-current="page"] {
  color: var(--green-hi);
  background: rgba(126, 231, 135, 0.10);
}
.nav-links a.nav-cta {
  color: #0a0f0b;
  background: var(--green-hi);
  font-weight: 700;
  margin-left: 8px;
}
.nav-links a.nav-cta:hover { background: #97f09e; }

.nav-burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .nav-burger { display: block; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 16px;
    background: rgba(10, 15, 11, 0.97);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a.nav-cta { margin-left: 0; text-align: center; }
  .nav.menu-open .nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* ---------- page scaffold ---------- */

main {
  flex: 1;
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 80px;
}

/* ---------- hero (index) ---------- */

.hero {
  padding: 48px 0 24px;
  position: relative;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-hi);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 16px;
  background: rgba(126, 231, 135, 0.06);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-hi);
  position: relative;
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--green-hi);
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping {
  0%   { transform: scale(0.6); opacity: 0.9; }
  80%, 100% { transform: scale(1.9); opacity: 0; }
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 58px);
  max-width: 18ch;
  margin: 26px 0 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--green-hi);
  text-shadow: 0 0 34px var(--green-glow);
}

.hero .lead {
  font-size: 18.5px;
  color: var(--ink-dim);
  max-width: 62ch;
  margin: 0 0 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

/* staggered load-in */
.rise { opacity: 0; transform: translateY(16px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.15s; }
.rise-3 { animation-delay: 0.25s; }
.rise-4 { animation-delay: 0.35s; }
.rise-5 { animation-delay: 0.5s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* EKG pulse line */
.ekg {
  display: block;
  width: 100%;
  max-width: 860px;
  height: 74px;
  margin: 8px 0 20px;
}
.ekg polyline {
  fill: none;
  stroke: var(--green-hi);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--green-glow));
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: ekg-draw 4.5s linear infinite;
}
@keyframes ekg-draw {
  0%   { stroke-dashoffset: 1200; opacity: 1; }
  70%  { stroke-dashoffset: 0;    opacity: 1; }
  85%  { opacity: 0.2; }
  100% { stroke-dashoffset: 0;    opacity: 0; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 0 rgba(68, 157, 68, 0);
}
.btn-primary:hover {
  background: #4fb54f;
  box-shadow: 0 8px 28px rgba(68, 157, 68, 0.35);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(126, 231, 135, 0.04);
}
.btn-ghost:hover { background: rgba(126, 231, 135, 0.10); }

/* ---------- section headings ---------- */

.section-head {
  margin: 64px 0 34px;
}
.section-head .kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  display: block;
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); }
.section-head p { color: var(--ink-dim); max-width: 60ch; margin: 6px 0 0; }

/* ---------- feature grid ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 16px;
}

.feature {
  position: relative;
  background: linear-gradient(160deg, var(--bg-panel), var(--bg-raise));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px 20px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  opacity: 0;
  transform: translateY(18px);
}
.feature.in { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(126, 231, 135, 0.08);
}

.feature .icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(126, 231, 135, 0.09);
  border: 1px solid var(--line);
  margin-bottom: 16px;
  color: var(--green-hi);
}
.feature .icon svg { width: 22px; height: 22px; }

.feature h4 { font-size: 16.5px; margin-bottom: 6px; }
.feature p { margin: 0; font-size: 14.5px; color: var(--ink-dim); }

/* ---------- callout panels ---------- */

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  background: linear-gradient(120deg, rgba(68, 157, 68, 0.14), rgba(68, 157, 68, 0.03) 60%);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 30px 32px;
  margin-top: 56px;
}
.callout h3 { font-size: 21px; margin: 0 0 6px; }
.callout p { margin: 0; color: var(--ink-dim); max-width: 58ch; }
.callout .callout-body { flex: 1 1 380px; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: rgba(10, 15, 11, 0.6);
  padding: 34px 0 26px;
  font-size: 14px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 26px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}
.footer-links a { color: var(--ink-dim); }
.footer-links a:hover { color: var(--green-hi); }
.footer .copy {
  text-align: center;
  color: var(--ink-faint);
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* ==========================================================================
   Release notes page
   ========================================================================== */

.rl-head { padding: 24px 0 8px; }
.rl-head h1 { font-size: clamp(30px, 4.4vw, 46px); max-width: 22ch; }
.rl-head .lead { color: var(--ink-dim); font-size: 17.5px; max-width: 66ch; }

.rl-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 56px;
  margin-top: 34px;
}

/* --- version TOC --- */

.toc {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
  align-self: start;
  max-height: calc(100vh - var(--nav-h) - 56px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 4px;
}
.toc .toc-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 10px 14px;
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px 6px 13px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-dim);
  white-space: nowrap;
}
.toc a .d { font-size: 10.5px; color: var(--ink-faint); }
.toc a:hover { color: var(--ink); text-decoration: none; background: rgba(126, 231, 135, 0.05); }
.toc a.active {
  color: var(--green-hi);
  border-left-color: var(--green-hi);
  background: rgba(126, 231, 135, 0.07);
}

@media (max-width: 900px) {
  .rl-layout { display: block; }
  .toc {
    position: sticky;
    top: var(--nav-h);
    z-index: 900;
    max-height: none;
    background: rgba(10, 15, 11, 0.94);
    backdrop-filter: blur(10px);
    margin: 0 -24px 28px;
    padding: 10px 24px;
    border-bottom: 1px solid var(--line);
  }
  .toc .toc-title { display: none; }
  .toc ol {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    border-left: none;
    scrollbar-width: none;
  }
  .toc ol::-webkit-scrollbar { display: none; }
  .toc a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 12px;
    margin: 0;
  }
  .toc a .d { display: none; }
  .toc a.active { border-color: var(--green-hi); }
}

/* --- release entries: timeline --- */

.timeline { position: relative; }

.release {
  position: relative;
  padding: 0 0 26px 34px;
  border-left: 1px solid var(--line);
  margin-left: 6px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.release:last-child { border-left-color: transparent; }

/* timeline node */
.release::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 14px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--green);
}
.release.latest::before {
  background: var(--green-hi);
  border-color: var(--green-hi);
  box-shadow: 0 0 14px var(--green-glow);
}

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  padding-top: 4px;
  margin-bottom: 12px;
}
.release-head h2 {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  font-stretch: normal;
  letter-spacing: -0.01em;
  margin: 0;
}
.release-head time {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-faint);
}
.badge-latest {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0a0f0b;
  background: var(--green-hi);
  padding: 3px 10px;
  border-radius: 999px;
}

.release-body {
  background: linear-gradient(165deg, var(--bg-panel), var(--bg-raise));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px 28px;
}
.release.latest .release-body { border-color: var(--line-strong); }

.release-summary {
  margin: 0 0 8px;
  color: var(--ink-dim);
}

/* --- categorized sections --- */

.rel-sec { margin-top: 22px; }
.rel-sec h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  font-stretch: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 6px;
  margin: 0 0 12px;
}
.rel-sec h3 .glyph { font-size: 13px; line-height: 1; }

.sec-feat h3 { color: var(--green-hi); background: rgba(126, 231, 135, 0.10); border: 1px solid rgba(126, 231, 135, 0.25); }
.sec-improve h3 { color: var(--blue); background: rgba(88, 166, 255, 0.10); border: 1px solid rgba(88, 166, 255, 0.25); }
.sec-fix h3 { color: var(--amber); background: rgba(227, 179, 65, 0.10); border: 1px solid rgba(227, 179, 65, 0.28); }

.rel-sec ul { margin: 0; padding-left: 22px; color: var(--ink); }
.rel-sec ul ul { margin-top: 8px; }
.rel-sec li { margin-bottom: 10px; }
.rel-sec li:last-child { margin-bottom: 0; }
.rel-sec .na { color: var(--ink-faint); font-style: italic; }

/* --- screenshots --- */

.shot {
  display: block;
  margin: 14px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #000;
  cursor: zoom-in;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  max-width: 960px;
}
.shot:hover {
  border-color: var(--green);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.5);
}
.shot img { display: block; width: 100%; }

.shot-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
}
.shot-inline img { width: 30px; height: 30px; object-fit: contain; }
.shot-inline .wide { width: 76px; }

/* --- lightbox --- */

.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(94vw, 1400px);
  max-height: 92vh;
}
.lightbox::backdrop { background: rgba(4, 8, 5, 0.88); backdrop-filter: blur(4px); }
.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  cursor: zoom-out;
}

/* --- misc --- */

.placeholder-note {
  color: var(--ink-faint);
  font-style: italic;
}
