/* EMS Fast Cash Software Updates */
:root {
  --navy: #0b1f3a;
  --navy-mid: #123056;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #14b8a6;
  --slate: #64748b;
  --slate-dark: #334155;
  --light: #f1f5f9;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(11, 31, 58, 0.08);
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --sidebar-w: 240px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--slate-dark);
  background: var(--light);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); text-decoration: underline; }

.upd-top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 31, 58, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: #fff;
}
.upd-top-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.upd-brand {
  display: flex; align-items: center; gap: 0.75rem;
  color: #fff; text-decoration: none;
}
.upd-brand:hover { color: #fff; text-decoration: none; }
.upd-mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  display: grid; place-items: center;
  font-weight: 800; font-size: 0.8rem; color: #fff;
}
.upd-brand strong { display: block; font-size: 0.92rem; line-height: 1.2; }
.upd-brand span { display: block; font-size: 0.72rem; color: rgba(255,255,255,0.55); }
.upd-top-links { display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; align-items: center; }
.upd-top-links a { color: rgba(255,255,255,0.78); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.upd-top-links a:hover { color: var(--teal-light); }
.upd-top-links .sep { color: rgba(255,255,255,0.25); }
.sidebar-toggle {
  display: none;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff; border-radius: 8px;
  padding: 0.4rem 0.7rem; font-weight: 700; cursor: pointer;
}

.upd-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  max-width: 1200px; margin: 0 auto;
  min-height: calc(100vh - 64px);
}
.upd-sidebar {
  position: sticky; top: 64px; align-self: start;
  height: calc(100vh - 64px); overflow-y: auto;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 1rem 0.75rem 2rem;
}
.upd-sidebar h2 {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--slate); padding: 0.5rem 0.65rem; margin-bottom: 0.35rem;
}
.year-nav { list-style: none; }
.year-nav a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.4rem 0.65rem; border-radius: 8px;
  font-size: 0.86rem; color: var(--slate-dark); text-decoration: none; font-weight: 600;
}
.year-nav a:hover, .year-nav a.active {
  background: rgba(13,148,136,0.1); color: var(--teal-dark); text-decoration: none;
}
.year-nav a .period {
  font-size: 0.72rem; font-weight: 500; color: var(--slate);
}
.year-nav a.active .period { color: var(--teal-dark); }

.upd-main { padding: 1.5rem 1.5rem 3rem; min-width: 0; }
.upd-article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.75rem 2.25rem;
}
.upd-crumb { font-size: 0.8rem; color: var(--slate); margin-bottom: 1rem; }
.upd-crumb a { font-weight: 600; }
.upd-article h1 {
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  color: var(--navy); letter-spacing: -0.02em; margin-bottom: 0.35rem;
}
.period-badge {
  display: inline-block;
  margin: 0.35rem 0 1.25rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(13,148,136,0.1);
  color: var(--teal-dark);
  font-size: 0.85rem; font-weight: 700;
}
.lead { color: var(--slate); margin-bottom: 1.5rem; max-width: 42rem; }

/* Index year cards */
.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}
.year-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
}
.year-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}
.year-card.current {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}
.year-card h3 {
  font-size: 1.05rem; color: var(--navy); margin-bottom: 0.25rem;
}
.year-card .range { font-size: 0.82rem; color: var(--slate); font-weight: 600; }
.year-card .meta { font-size: 0.78rem; color: var(--slate); margin-top: 0.45rem; }

/* Version release blocks */
.release {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.15rem 1.05rem;
  margin: 0 0 0.85rem;
  background: #fafbfc;
}
.release:target {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px rgba(13,148,136,0.25);
  background: #fff;
}
.release-header {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem;
  margin-bottom: 0.55rem;
}
.release-ver {
  font-size: 1.05rem; font-weight: 750; color: var(--navy);
}
.release-date {
  font-size: 0.85rem; font-weight: 600; color: var(--teal-dark);
}
.release ul {
  margin: 0 0 0 1.15rem;
  padding: 0;
}
.release li {
  margin: 0.3rem 0;
  color: var(--slate-dark);
  font-size: 0.95rem;
}
.release-count {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--slate);
}
.upd-footer-nav {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem;
  margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
}
.upd-footer-nav a { font-weight: 600; font-size: 0.9rem; }
.upd-note {
  margin-top: 1.5rem; padding: 0.85rem 1rem;
  background: var(--light); border-left: 3px solid var(--teal);
  border-radius: 0 8px 8px 0; font-size: 0.85rem; color: var(--slate);
}
.legacy-body { font-size: 0.95rem; }
.legacy-body ul { margin: 0.5rem 0 0.75rem 1.2rem; }
.legacy-body p { margin: 0.5rem 0; }
.legacy-body img {
  display: block; margin: 1rem auto; border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow); max-width: min(100%, 640px);
}

@media (max-width: 900px) {
  .upd-layout { grid-template-columns: 1fr; }
  .upd-sidebar {
    position: fixed; left: 0; top: 58px; bottom: 0;
    width: min(82vw, 300px); z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }
  .upd-sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: inline-flex; }
  .upd-main { padding: 1rem 1rem 2.5rem; }
  .upd-article { padding: 1.25rem; }
}
