:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #2f6bff;
  --blue-600: #0b5cff;
  --blue-700: #0045d6;
  --blue-800: #0037a8;
  --cyan: #22d3ee;
  --cyan-soft: #7ee7f7;

  --navy-950: #040c1d;
  --navy-900: #07142e;
  --navy-800: #0b1e42;

  --ink: #0a1220;
  --ink-soft: #24324a;
  --muted: #5b6b85;
  --muted-2: #8494ab;
  --line: #e4ecf8;
  --line-strong: #d3e0f2;
  --white: #ffffff;
  --surface: #f6f9ff;
  --surface-2: #fbfdff;

  --green: #0f9f6e;
  --green-50: #e9fbf3;
  --amber: #b7791f;
  --amber-50: #fff8e6;
  --red: #dc2626;
  --red-50: #fff1f1;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  --shadow-xs: 0 1px 2px rgba(10, 18, 32, 0.05);
  --shadow-sm: 0 4px 16px rgba(16, 42, 86, 0.06);
  --shadow-md: 0 16px 40px rgba(16, 42, 86, 0.09);
  --shadow-lg: 0 30px 70px rgba(11, 92, 255, 0.16);
  --shadow-blue: 0 14px 34px rgba(11, 92, 255, 0.32);

  --maxw: 1220px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Sora", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 8% -10%, rgba(11, 92, 255, 0.07), transparent 62%),
    radial-gradient(900px 500px at 96% 0%, rgba(34, 211, 238, 0.07), transparent 58%),
    var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(11, 92, 255, 0.18);
}

:focus-visible {
  outline: 3px solid rgba(11, 92, 255, 0.35);
  outline-offset: 2px;
  border-radius: 8px;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(11, 92, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 92, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 78% 52% at 50% 0%, #000, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 78% 52% at 50% 0%, #000, transparent 76%);
}

/* ---------------------------------------------------------------- header */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 26px rgba(16, 42, 86, 0.05);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none !important;
  flex: 0 0 auto;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-500) 55%, #3ed0f2 100%);
  box-shadow: 0 10px 24px -12px rgba(11, 92, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-mark img {
  width: 27px;
  height: 27px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-main {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.brand-tld {
  color: var(--blue-600);
}

.brand-text small {
  margin-top: 3px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1 1 auto;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.main-nav a:hover {
  color: var(--blue-700);
  background: var(--blue-50);
  text-decoration: none;
}

.main-nav a.is-active {
  color: var(--blue-700);
  background: var(--blue-50);
  box-shadow: inset 0 0 0 1px var(--blue-100);
}

.nav-badge {
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--blue-600), #1e8bff);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px -4px rgba(11, 92, 255, 0.8);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.scan-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  max-width: 260px;
}

.scan-status span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------------------------------------------------------------- generic */

.app-shell {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 36px 24px 84px;
  min-height: calc(100vh - 160px);
}

.page {
  animation: fade-up 0.35s var(--ease) both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 26px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--blue-100);
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
  white-space: nowrap;
}

.eyebrow svg {
  width: 13px;
  height: 13px;
}

.page-title {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.page-sub {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 740px;
  font-size: 14.5px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 36px 0 14px;
}

.section-head h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-head .section-sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 3px;
}

.muted {
  color: var(--muted);
}

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

.hint {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.55;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 17px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s var(--ease), background 0.2s ease, border-color 0.2s ease,
    color 0.2s ease, box-shadow 0.2s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn:hover {
  background: var(--white);
  border-color: var(--blue-300);
  color: var(--blue-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-500) 55%, #1e8bff 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0a54ea 0%, #2f6bff 55%, #2b9dff 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(11, 92, 255, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.65);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 9px;
}

.btn-danger {
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.28);
  background: var(--red-50);
}

.btn-danger:hover {
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.5);
  background: #ffe7e7;
}

/* ---------------------------------------------------------------- stats */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 19px 19px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.2s ease;
}

.stat-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -42px;
  top: -46px;
  border-radius: 50%;
  background: var(--glow, rgba(11, 92, 255, 0.14));
  filter: blur(22px);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--blue-200);
  box-shadow: var(--shadow-md);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.stat-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--blue-600);
  background: linear-gradient(145deg, var(--blue-50), var(--blue-100));
  border: 1px solid rgba(11, 92, 255, 0.12);
}

.stat-icon svg {
  width: 16px;
  height: 16px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat-value small {
  font-size: 15px;
  color: var(--muted-2);
  font-weight: 600;
  letter-spacing: 0;
}

.stat-meta {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.stat-meta strong {
  color: var(--ink-soft);
  font-weight: 650;
}

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

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 19px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.panel-head h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.panel-head .panel-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.panel-body {
  padding: 6px;
}

.panel-body.pad {
  padding: 19px;
}

.panel-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue-600);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- changes */

.change-list {
  display: flex;
  flex-direction: column;
}

.change-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  transition: background 0.18s ease;
}

.change-item + .change-item {
  border-top: 1px solid rgba(228, 236, 248, 0.85);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.change-item:hover {
  background: var(--surface);
}

.change-item.is-unread {
  background: rgba(239, 246, 255, 0.72);
}

.change-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-top: 1px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--blue-600);
  background: linear-gradient(145deg, var(--blue-50), var(--blue-100));
  border: 1px solid rgba(11, 92, 255, 0.1);
}

.change-icon svg {
  width: 16px;
  height: 16px;
}

.change-icon.type-new_release,
.change-icon.type-new_version {
  color: var(--green);
  background: var(--green-50);
  border-color: rgba(15, 159, 110, 0.16);
}

.change-icon.type-pdf_changed,
.change-icon.type-updated_release {
  color: var(--amber);
  background: var(--amber-50);
  border-color: rgba(183, 121, 31, 0.16);
}

.change-icon.type-product_removed {
  color: var(--red);
  background: var(--red-50);
  border-color: rgba(220, 38, 38, 0.16);
}

.change-main {
  min-width: 0;
  flex: 1;
}

.change-title {
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.change-title a {
  color: var(--ink);
}

.change-title a:hover {
  color: var(--blue-600);
}

.change-detail {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.change-time {
  color: var(--muted-2);
  font-size: 11.5px;
  white-space: nowrap;
  flex: 0 0 auto;
  margin-top: 2px;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
}

.type-pill.new_release,
.type-pill.new_version {
  color: #087a54;
  background: var(--green-50);
  border-color: rgba(15, 159, 110, 0.18);
}

.type-pill.pdf_changed,
.type-pill.updated_release {
  color: #946200;
  background: var(--amber-50);
  border-color: rgba(183, 121, 31, 0.18);
}

/* ---------------------------------------------------------------- products */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-xs);
  margin-bottom: 18px;
}

.input,
.select {
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  padding: 0 12px;
  color: var(--ink);
  outline: none;
  font-size: 13px;
  min-width: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input::placeholder {
  color: #9aa9bf;
}

.input:focus,
.select:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(11, 92, 255, 0.12);
}

.search-field {
  position: relative;
  flex: 1 1 280px;
}

.search-field svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted-2);
  pointer-events: none;
}

.search-field .input {
  width: 100%;
  padding-left: 35px;
}

.select {
  padding-right: 32px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.toolbar-spacer {
  flex: 1;
}

.result-count {
  color: var(--muted-2);
  font-size: 12.5px;
  white-space: nowrap;
  padding: 0 4px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 17px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  color: inherit;
  text-decoration: none !important;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: transform 0.28s var(--ease), border-color 0.2s ease, box-shadow 0.28s var(--ease);
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-600), var(--cyan));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-200);
  box-shadow: var(--shadow-lg);
}

.product-card:hover::before {
  opacity: 1;
}

.product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.product-series {
  color: var(--blue-600);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.unread-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  background: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(11, 92, 255, 0.14);
}

.discontinued-pill {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.product-title {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.product-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.product-version {
  min-width: 0;
}

.product-version .pv-label {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.product-version .pv-value {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.product-date {
  text-align: right;
  color: var(--muted-2);
  font-size: 11px;
  white-space: nowrap;
}

.product-date strong {
  display: block;
  color: var(--ink-soft);
  font-weight: 650;
  font-size: 12px;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

/* ---------------------------------------------------------------- detail */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 12.5px;
  margin-bottom: 18px;
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--blue-600);
}

.breadcrumb svg {
  width: 14px;
  height: 14px;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.detail-title-wrap {
  min-width: 0;
}

.detail-title {
  font-size: clamp(27px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 11px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

.badge.accent {
  color: var(--blue-700);
  border-color: var(--blue-100);
  background: var(--blue-50);
}

.badge.green {
  color: #087a54;
  border-color: rgba(15, 159, 110, 0.18);
  background: var(--green-50);
}

.badge.amber {
  color: #946200;
  border-color: rgba(183, 121, 31, 0.2);
  background: var(--amber-50);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.current-versions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

/* A keskeny oldalsávban a hosszú címkék egy oszlopban olvashatók jól. */
.detail-layout .current-versions {
  grid-template-columns: minmax(0, 1fr);
}

.version-box {
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.version-box .vb-label {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.version-box .vb-value {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.release-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 12.5px;
  font-weight: 600;
}

.release-link:hover {
  background: var(--blue-100);
  text-decoration: none;
}

.release-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.timeline {
  position: relative;
  padding: 4px 4px 4px 0;
}

.timeline-item {
  position: relative;
  padding: 0 0 4px 26px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: -6px;
  width: 1px;
  background: linear-gradient(180deg, var(--blue-200), var(--line));
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 9px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 3px solid var(--white);
  background: var(--blue-200);
  box-shadow: 0 0 0 1px var(--blue-200);
}

.timeline-item.is-latest .timeline-dot {
  background: var(--blue-600);
  box-shadow: 0 0 0 1px var(--blue-500), 0 0 16px rgba(11, 92, 255, 0.35);
}

.timeline-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
  overflow: hidden;
  margin-bottom: 9px;
  box-shadow: var(--shadow-xs);
}

.timeline-item.is-latest .timeline-card {
  border-color: var(--blue-200);
  background: linear-gradient(160deg, rgba(239, 246, 255, 0.9), var(--white) 70%);
  box-shadow: var(--shadow-sm);
}

.timeline-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.timeline-summary::-webkit-details-marker {
  display: none;
}

.timeline-date {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline-version {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--blue-700);
  font-weight: 700;
  white-space: nowrap;
}

.timeline-preview {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chevron {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--muted-2);
  transition: transform 0.2s ease;
}

details[open] > .timeline-summary .chevron {
  transform: rotate(180deg);
}

.timeline-body {
  padding: 0 15px 15px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.version-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 11px;
}

.version-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  font-size: 11px;
  color: var(--ink-soft);
}

.version-chip strong {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--blue-700);
  font-size: 11.5px;
}

.change-table-panel {
  margin-top: 18px;
  scroll-margin-top: 92px;
}

.change-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
}

.change-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

.change-table th {
  padding: 10px 15px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.change-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.change-table tbody tr:last-child td {
  border-bottom: none;
}

.change-table tbody tr:hover {
  background: var(--surface-2);
}

.ct-date {
  width: 130px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.ct-version {
  width: 150px;
  white-space: nowrap;
}

.ct-version .mono {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 7px;
  border: 1px solid var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 700;
  font-size: 11.5px;
}

.ct-change {
  color: var(--ink-soft);
  line-height: 1.55;
}

.ct-source {
  width: 82px;
  text-align: right;
  white-space: nowrap;
}

.ct-source a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--blue-600);
}

.ct-source svg {
  width: 12px;
  height: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.changes-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.changes-list li {
  position: relative;
  padding-left: 16px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.changes-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-500);
}

.timeline-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--muted-2);
  font-size: 11px;
}

.timeline-foot a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--blue-600);
}

.timeline-foot svg {
  width: 12px;
  height: 12px;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.info-list {
  display: flex;
  flex-direction: column;
}

.info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  font-size: 12.5px;
}

.info-row + .info-row {
  border-top: 1px solid var(--line);
}

.info-row .k {
  color: var(--muted);
}

.info-row .v {
  color: var(--ink-soft);
  text-align: right;
  overflow-wrap: anywhere;
  font-weight: 550;
}

/* ---------------------------------------------------------------- settings */

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-soft);
}

.form-field .hint {
  margin-top: 1px;
}

.form-field .input,
.form-field .select {
  height: 42px;
  width: 100%;
}

.switch-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.switch-row + .switch-row {
  margin-top: 10px;
}

.switch-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}

.switch-copy span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 25px;
  margin-top: 2px;
}

.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  z-index: 2;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  background: #e8eef8;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  background: var(--white);
  box-shadow: 0 2px 6px rgba(16, 42, 86, 0.2);
  transition: transform 0.2s var(--ease), background 0.2s ease;
}

.switch input:checked + .switch-track {
  background: linear-gradient(135deg, var(--blue-600), #1e8bff);
  border-color: transparent;
}

.switch input:checked + .switch-track::after {
  transform: translateX(19px);
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 19px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.callout {
  padding: 13px 15px;
  border-radius: 11px;
  border: 1px solid var(--blue-100);
  background: var(--blue-50);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}

.callout strong {
  color: var(--blue-700);
}

.callout.warn {
  border-color: rgba(183, 121, 31, 0.22);
  background: var(--amber-50);
}

.callout.warn strong {
  color: var(--amber);
}

/* ---------------------------------------------------------------- scan banner */

.scan-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--blue-200);
  border-radius: 13px;
  background: linear-gradient(90deg, var(--blue-50), rgba(239, 246, 255, 0.45));
}

.scan-banner-main {
  flex: 1;
  min-width: 0;
}

.scan-banner-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--blue-800);
}

.scan-banner-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.progress {
  flex: 0 0 190px;
  height: 7px;
  border-radius: 99px;
  background: rgba(11, 92, 255, 0.12);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-600), var(--cyan));
  transition: width 0.4s ease;
}

/* ---------------------------------------------------------------- misc */

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}

.empty svg {
  width: 36px;
  height: 36px;
  color: var(--blue-300);
  margin: 0 auto 10px;
}

.empty h3 {
  margin: 0 0 4px;
  color: var(--ink-soft);
  font-size: 15px;
  font-family: var(--font-body);
  font-weight: 650;
}

.empty p {
  margin: 0 auto;
  max-width: 440px;
  font-size: 13px;
}

.error-box {
  padding: 14px 16px;
  border-radius: 11px;
  border: 1px solid rgba(220, 38, 38, 0.22);
  background: var(--red-50);
  color: #a51c1c;
  font-size: 13px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: #eef4fe;
  border-radius: 12px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(11, 92, 255, 0.2);
  border-top-color: var(--blue-600);
  animation: spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.spinner-lg {
  width: 28px;
  height: 28px;
  border-width: 3px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-screen {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 55vh;
  color: var(--muted);
  font-size: 13px;
}

.toast-wrap {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 250px;
  max-width: 400px;
  padding: 12px 15px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 500;
  animation: toast-in 0.22s var(--ease) both;
}

.toast.ok {
  border-color: rgba(15, 159, 110, 0.35);
}

.toast.err {
  border-color: rgba(220, 38, 38, 0.35);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

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

.site-footer {
  position: relative;
  z-index: 1;
  background: var(--navy-900);
  color: #a9c2e6;
}

.site-footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.footer-brand {
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none !important;
}

.footer-brand span {
  color: #6fb3ff;
}

.footer-sep {
  color: rgba(169, 194, 230, 0.4);
}

.site-footer a:not(.footer-brand) {
  color: #9ecbff;
}

.site-footer a:not(.footer-brand):hover {
  color: #fff;
}

.footer-spacer {
  flex: 1;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-layout,
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .topbar-inner {
    padding: 10px 16px;
    gap: 14px;
    flex-wrap: wrap;
  }
  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .main-nav a {
    padding: 8px 10px;
    white-space: nowrap;
  }
  .topbar-actions {
    margin-left: auto;
  }
  .scan-status {
    display: none !important;
  }
  .app-shell {
    padding: 26px 16px 64px;
  }
  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .stats-grid,
  .product-grid,
  .current-versions,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .brand-text small {
    display: none;
  }
  .topbar-actions .btn-primary {
    padding: 0 12px;
  }
  .toolbar {
    padding: 10px;
  }
  .search-field {
    flex-basis: 100%;
  }
  .detail-head {
    flex-direction: column;
  }
  .changes-list li {
    font-size: 12.5px;
  }
  .progress {
    flex-basis: 90px;
  }
  .site-footer-inner {
    gap: 6px;
  }
  .footer-spacer {
    display: none;
  }
}
