@font-face {
  font-family: "SF Pro Display";
  src:
    local("SF Pro Display"),
    local("SFProDisplay-Regular"),
    local("San Francisco Pro Display");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "SF Pro Text";
  src:
    local("SF Pro Text"),
    local("SFProText-Regular"),
    local("San Francisco Pro Text");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font-sans: "SF Pro Text", "SF Pro Display", "SF Pro", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --text: #12151c;
  --text-soft: #5f6876;
  --line: rgba(17, 24, 39, 0.1);
  --glass: rgba(255, 255, 255, 0.78);
  --panel: rgba(255, 255, 255, 0.74);
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --blue: #0071e3;
  --blue-strong: #005ac2;
  --green: #0e9a55;
  --red: #e04848;
  --shadow: 0 24px 70px rgba(20, 30, 55, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --bg-grad-a: #f6f9ff;
  --bg-grad-b: #edf2fb;
  --bg-grad-c: #e5eefb;
  --topbar-bg: rgba(248, 250, 252, 0.7);
  --table-head: rgba(245, 248, 252, 0.95);
  --hero-ink: #0f2340;
  --hero-ink-soft: #516684;
  --hero-title-grad-a: #14376d;
  --hero-title-grad-b: #1a67ca;
  --hero-title-grad-c: #2d8cff;
  --hero-icon-bubble-bg: rgba(245, 250, 255, 0.42);
  --hero-icon-bubble-line: rgba(132, 168, 219, 0.5);
  --hero-icon-bubble-shadow: 0 12px 24px rgba(22, 47, 86, 0.2);
}

body[data-theme="dark"] {
  --text: #e8edf9;
  --text-soft: #95a0b5;
  --line: rgba(202, 214, 235, 0.17);
  --glass: rgba(19, 24, 35, 0.66);
  --panel: rgba(19, 24, 35, 0.72);
  --surface: rgba(28, 35, 49, 0.88);
  --surface-strong: #222b3a;
  --blue: #3b9bff;
  --blue-strong: #1f7be7;
  --green: #4ee49c;
  --red: #ff7a7a;
  --shadow: 0 24px 72px rgba(5, 10, 18, 0.45);
  --bg-grad-a: #0b111f;
  --bg-grad-b: #121d34;
  --bg-grad-c: #182945;
  --topbar-bg: rgba(14, 20, 31, 0.72);
  --table-head: rgba(28, 35, 49, 0.95);
  --hero-ink: #f0f5ff;
  --hero-ink-soft: #9db0cb;
  --hero-title-grad-a: #ffffff;
  --hero-title-grad-b: #8ac8ff;
  --hero-title-grad-c: #dcebff;
  --hero-icon-bubble-bg: rgba(33, 49, 78, 0.5);
  --hero-icon-bubble-line: rgba(220, 234, 255, 0.34);
  --hero-icon-bubble-shadow: 0 12px 24px rgba(4, 10, 20, 0.5);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: linear-gradient(120deg, var(--bg-grad-a) 0%, var(--bg-grad-b) 50%, var(--bg-grad-c) 100%);
  background-size: 180% 180%;
  animation: pageGradientFlow 18s ease-in-out infinite alternate;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 5vw;
  backdrop-filter: blur(14px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}

.topbar__brand-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.topbar__brand-btn:hover {
  opacity: 0.94;
  transform: translateY(-1px);
}

.topbar__brand-btn:focus-visible {
  outline: 2px solid rgba(0, 113, 227, 0.62);
  outline-offset: 5px;
  border-radius: 10px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #56a3ff, #0071e3);
  box-shadow: 0 0 0 6px rgba(0, 113, 227, 0.15);
}

.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-width: 72px;
  height: 34px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.shell {
  width: 100%;
  max-width: none;
  margin: 24px 0 52px;
  padding-inline: 0;
}

.hero {
  position: relative;
  margin-bottom: 18px;
  border: 1px solid rgba(165, 190, 230, 0.22);
  border-radius: 0;
  background: var(--panel);
  backdrop-filter: blur(18px) saturate(120%);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: clamp(22px, 4vw, 40px);
}

.hero-side-icons {
  position: absolute;
  top: 56%;
  width: 150px;
  height: 150px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
  animation: heroSideGroupFloat 8.8s ease-in-out infinite;
}

.hero-side-icons--left {
  left: clamp(14px, 2.2vw, 34px);
}

.hero-side-icons--right {
  right: clamp(14px, 2.2vw, 34px);
  animation-delay: -2s;
}

.hero-side-icons__item {
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  border: 1px solid var(--hero-icon-bubble-line);
  background: var(--hero-icon-bubble-bg);
  box-shadow: var(--hero-icon-bubble-shadow);
  backdrop-filter: blur(10px) saturate(120%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: heroSideIconFloat 5.4s ease-in-out infinite;
}

.hero-side-icons__item img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(11, 25, 47, 0.24));
}

.hero-side-icons--left .hero-side-icons__item--a {
  top: 22px;
  left: 8px;
}

.hero-side-icons--left .hero-side-icons__item--b {
  top: 56px;
  left: 84px;
  animation-delay: -1.35s;
}

.hero-side-icons--right .hero-side-icons__item--a {
  top: 22px;
  right: 8px;
}

.hero-side-icons--right .hero-side-icons__item--b {
  top: 56px;
  right: 84px;
  animation-delay: -1.7s;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero__pulse {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #5cb0ff;
  box-shadow: 0 0 0 6px rgba(92, 176, 255, 0.16);
  display: inline-block;
  margin-right: 8px;
  animation: pulseGlow 1.8s ease-in-out infinite;
}

.hero__eyebrow {
  margin: 0;
  color: #4ea2ff;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.hero__title {
  margin: 10px 0 0;
  max-width: 860px;
  margin-inline: auto;
  color: var(--hero-ink);
  font-size: clamp(2.1rem, 5vw, 5.35rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero__title-gradient {
  color: transparent;
  background: linear-gradient(
    90deg,
    var(--hero-title-grad-a),
    var(--hero-title-grad-b) 45%,
    var(--hero-title-grad-c)
  );
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 28px rgba(113, 169, 255, 0.28);
}

.hero__subtitle {
  margin: 16px auto 0;
  max-width: 760px;
  color: var(--hero-ink-soft);
  font-size: clamp(1.02rem, 2.2vw, 1.6rem);
  line-height: 1.5;
}

.hero__mini-products {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-mini-product {
  border: 1px solid rgba(164, 197, 248, 0.3);
  border-radius: 999px;
  background: rgba(164, 197, 248, 0.13);
  color: #d7e7ff;
  padding: 7px 10px 7px 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: 0.24s ease;
}

.hero-mini-product:hover {
  transform: translateY(-2px);
  background: rgba(164, 197, 248, 0.2);
}

.hero-mini-product img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.hero-mini-product span {
  font-size: 0.82rem;
  font-weight: 560;
}

.hero__actions {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-btn {
  border: 1px solid transparent;
  border-radius: 12px;
  height: 44px;
  padding: 0 16px;
  font-weight: 650;
  cursor: pointer;
}

.hero-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #1680ff, #0a5ad1);
  box-shadow: 0 14px 26px rgba(11, 107, 223, 0.35);
}

.hero-btn--secondary {
  color: #d7e7ff;
  background: rgba(97, 132, 191, 0.16);
  border-color: rgba(155, 186, 237, 0.33);
}

.hero-btn:hover {
  transform: translateY(-1px) scale(1.01);
}

.controls {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.search {
  position: relative;
  overflow: hidden;
  flex: 1 1 540px;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 0 18px;
  will-change: transform, box-shadow;
  backdrop-filter: blur(14px) saturate(118%);
  transition: border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease,
    transform 0.28s ease;
}

.search::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #57a0ff, #9ec8ff);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.search:hover {
  border-color: rgba(156, 185, 233, 0.6);
}

.search:focus-within {
  border-color: rgba(112, 165, 248, 0.92);
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(72, 146, 255, 0.18);
}

.search:focus-within::after {
  transform: scaleX(1);
  opacity: 1;
}

.search svg {
  width: 19px;
  transition: color 0.24s ease, transform 0.24s ease;
}

.search:focus-within svg {
  color: #2f7eff;
  transform: scale(1.05);
}

.search input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.search input::placeholder {
  color: rgba(220, 232, 251, 0.58);
}

.type-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  border-radius: 16px;
  padding: 4px;
  min-height: 58px;
  will-change: transform, box-shadow;
  backdrop-filter: blur(12px) saturate(116%);
  transition: border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease,
    transform 0.28s ease;
}

.type-toggle:hover {
  border-color: rgba(156, 185, 233, 0.6);
}

.type-toggle__btn {
  position: relative;
  overflow: hidden;
  border: 0;
  min-width: 112px;
  padding: 12px 20px;
  border-radius: 12px;
  background: transparent;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.type-toggle__btn:hover {
  transform: translateY(-1px);
}

.type-toggle__btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #1f77f0, #185fcb);
  box-shadow: 0 8px 20px rgba(17, 92, 197, 0.32);
}

.type-toggle__btn.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -30%;
  width: 36%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: skewX(-20deg);
  animation: activeSweep 2.8s ease-in-out infinite;
}

/* Dark style */
body[data-theme="dark"] .search {
  background: rgba(20, 29, 43, 0.52);
  border: 1px solid rgba(160, 184, 220, 0.28);
  box-shadow: 0 8px 18px rgba(4, 9, 17, 0.44);
}

body[data-theme="dark"] .search:hover {
  background: rgba(23, 33, 49, 0.58);
}

body[data-theme="dark"] .search svg {
  color: #9fb4d6;
}

body[data-theme="dark"] .search input {
  color: #e8f0ff;
}

body[data-theme="dark"] .search input::placeholder {
  color: rgba(220, 232, 251, 0.58);
}

body[data-theme="dark"] .type-toggle {
  background: rgba(20, 29, 43, 0.46);
  border: 1px solid rgba(160, 184, 220, 0.28);
  box-shadow: 0 8px 18px rgba(4, 9, 17, 0.42);
}

body[data-theme="dark"] .type-toggle__btn {
  color: #d4e3fb;
}

body[data-theme="dark"] .type-toggle__btn:hover {
  background: rgba(88, 122, 176, 0.18);
  color: #ffffff;
}

body[data-theme="dark"] .type-toggle__btn.is-active {
  color: #ffffff;
  background: #0f1829;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 8px 18px rgba(8, 10, 20, 0.45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .hero-mini-product {
  border-color: rgba(164, 197, 248, 0.3);
  background: rgba(164, 197, 248, 0.13);
  color: #d7e7ff;
}

body[data-theme="dark"] .hero-mini-product:hover {
  background: rgba(164, 197, 248, 0.2);
}

/* Light style */
body[data-theme="light"] .search {
  background: rgba(247, 251, 255, 0.72);
  border: 1px solid rgba(130, 164, 216, 0.32);
  box-shadow: 0 8px 16px rgba(39, 66, 110, 0.12);
}

body[data-theme="light"] .search:hover {
  background: rgba(249, 252, 255, 0.82);
}

body[data-theme="light"] .search svg {
  color: #587297;
}

body[data-theme="light"] .search input {
  color: #203756;
}

body[data-theme="light"] .search input::placeholder {
  color: rgba(59, 86, 125, 0.62);
}

body[data-theme="light"] .type-toggle {
  background: rgba(247, 251, 255, 0.72);
  border: 1px solid rgba(130, 164, 216, 0.32);
  box-shadow: 0 8px 16px rgba(39, 66, 110, 0.12);
}

body[data-theme="light"] .type-toggle__btn {
  color: #324866;
}

body[data-theme="light"] .type-toggle__btn:hover {
  background: rgba(118, 156, 214, 0.14);
  color: #1f3553;
}

body[data-theme="light"] .type-toggle__btn.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #1f77f0, #185fcb);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

body[data-theme="light"] .hero-mini-product {
  border-color: rgba(113, 154, 219, 0.44);
  background: rgba(236, 245, 255, 0.84);
  color: #2a4a72;
  box-shadow: 0 8px 18px rgba(36, 70, 118, 0.1);
}

body[data-theme="light"] .hero-mini-product:hover {
  border-color: rgba(91, 139, 211, 0.58);
  background: rgba(226, 238, 255, 0.96);
  color: #1e3b60;
}

body[data-theme="light"] .hero-btn--secondary {
  color: #1f3f66;
  background: rgba(230, 240, 255, 0.86);
  border-color: rgba(98, 141, 211, 0.52);
  box-shadow: 0 10px 20px rgba(33, 66, 112, 0.11);
}

body[data-theme="light"] .hero-btn--secondary:hover {
  color: #163558;
  background: rgba(218, 232, 252, 0.96);
  border-color: rgba(79, 126, 202, 0.64);
}

.wizard {
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 56px rgba(22, 29, 44, 0.1);
  padding: 16px;
}

.wizard__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.wizard-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--text-soft);
  background: var(--surface);
}

.wizard-step__num {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(122, 137, 166, 0.2);
  color: var(--text-soft);
}

.wizard-step__label {
  font-weight: 600;
  font-size: 0.9rem;
}

.wizard-step--active {
  border-color: rgba(0, 113, 227, 0.36);
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.9));
}

body[data-theme="dark"] .wizard-step--active {
  background: linear-gradient(180deg, rgba(28, 39, 56, 0.96), rgba(20, 32, 49, 0.95));
}

.wizard-step--active .wizard-step__num {
  background: var(--blue);
  color: #fff;
}

.wizard-step--done {
  border-color: rgba(0, 113, 227, 0.2);
  color: var(--text);
  background: rgba(0, 113, 227, 0.08);
}

.wizard-step--done .wizard-step__num {
  background: rgba(0, 113, 227, 0.18);
  color: var(--blue);
}

.wizard__footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-all {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

.breadcrumbs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.breadcrumbs__item button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.breadcrumbs__item--active {
  color: var(--text);
  font-weight: 600;
}

#familyStatus {
  margin: 0 0 0 auto;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  padding: 20px;
}

.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.panel__head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.panel__head p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.panel__head > p {
  margin: 0;
}

.family-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.family-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  padding: 12px 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.family-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px rgba(17, 29, 53, 0.14);
}

.family-card__media {
  height: 124px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.family-card__image {
  max-width: 152px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 15px rgba(17, 26, 44, 0.18));
  transition: transform 0.28s ease;
}

.family-card:hover .family-card__image {
  transform: translateY(-3px) scale(1.03);
}

.family-card__fallback {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
  font-weight: 300;
  color: var(--text);
  background: linear-gradient(180deg, #dbe6f5, #cfdced);
  box-shadow: 0 12px 20px rgba(23, 31, 46, 0.16);
}

.family-card__label {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 500;
}

.family-card__count {
  display: inline-flex;
  margin-top: 3px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(120, 140, 175, 0.15);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.device-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  padding: 12px 12px 13px;
  text-align: left;
  cursor: pointer;
  transition: 0.24s ease;
}

.device-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(16, 20, 31, 0.15);
}

.device-card.is-selected {
  border-color: rgba(0, 113, 227, 0.42);
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.25), 0 16px 28px rgba(0, 113, 227, 0.16);
}

.device-card__name {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.32;
  color: var(--text);
}

.device-card__id {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.8rem;
}

.load-more {
  width: 100%;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  height: 44px;
  cursor: pointer;
}

.load-more:hover {
  filter: brightness(1.04);
}

.placeholder h2 {
  margin: 0;
  font-size: 1.3rem;
}

.placeholder p {
  margin-top: 10px;
  color: var(--text-soft);
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

.firmware-content__header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.firmware-content__header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.firmware-content__header p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.82rem;
}

.counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #121722;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
}

.table-wrap {
  width: 100%;
  max-height: 70vh;
  overflow: auto;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  background: var(--table-head);
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
}

tbody td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 0.9rem;
  vertical-align: middle;
}

tbody tr:hover {
  background: rgba(125, 170, 239, 0.12);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.82rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge--signed {
  color: #065f32;
  background: rgba(15, 157, 88, 0.17);
}

.badge--unsigned {
  color: #8f1f1f;
  background: rgba(224, 72, 72, 0.16);
}

body[data-theme="dark"] .badge--signed {
  color: #90f4c4;
  background: rgba(15, 157, 88, 0.22);
}

body[data-theme="dark"] .badge--unsigned {
  color: #ffb0b0;
  background: rgba(224, 72, 72, 0.25);
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-strong));
  transition: 0.2s ease;
}

.download-link:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.toggle-rows {
  margin-top: 12px;
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  color: var(--text-soft);
  line-height: 1.42;
}

.full-row-cell {
  border-bottom: 0 !important;
}

.skeleton {
  height: 72px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(120deg, #ffffffcc 24%, #f0f4f8 42%, #ffffffcc 60%);
  background-size: 220% 100%;
  animation: shimmer 1.25s linear infinite;
}

body[data-theme="dark"] .skeleton {
  background: linear-gradient(120deg, #253043 24%, #1c2737 42%, #253043 60%);
  background-size: 220% 100%;
}

.error-box {
  border: 1px solid rgba(224, 72, 72, 0.28);
  border-radius: 14px;
  padding: 14px;
  color: #7d2525;
  background: rgba(255, 242, 242, 0.72);
}

body[data-theme="dark"] .error-box {
  color: #ffb0b0;
  background: rgba(95, 28, 28, 0.55);
}

.reveal {
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes pageGradientFlow {
  0% {
    background-position: 0% 45%;
  }
  50% {
    background-position: 100% 55%;
  }
  100% {
    background-position: 22% 48%;
  }
}

@keyframes heroSideGroupFloat {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-53%) translateX(4px);
  }
}

@keyframes heroSideIconFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.03);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 6px rgba(92, 176, 255, 0.12);
    opacity: 0.75;
  }
  50% {
    box-shadow: 0 0 0 10px rgba(92, 176, 255, 0.04);
    opacity: 1;
  }
}

@keyframes activeSweep {
  0% {
    transform: translateX(-165%) skewX(-20deg);
    opacity: 0;
  }
  18% {
    opacity: 0.55;
  }
  42% {
    transform: translateX(300%) skewX(-20deg);
    opacity: 0;
  }
  100% {
    transform: translateX(300%) skewX(-20deg);
    opacity: 0;
  }
}

@keyframes shimmer {
  to {
    background-position: -160% 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-side-icons,
  .hero-side-icons__item {
    animation: none;
  }
}

@media (max-width: 1200px) {
  .hero-side-icons {
    display: none;
  }
}

@media (max-width: 1120px) {
  .family-gallery {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 820px) {
  .wizard__steps {
    grid-template-columns: 1fr;
  }

  .wizard-step {
    justify-content: flex-start;
  }

  .wizard__footer {
    flex-wrap: wrap;
  }

  #familyStatus {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .shell {
    margin: 16px 0 42px;
    padding-inline: 0;
  }

  .hero {
    padding: 22px 16px;
    border-radius: 0;
  }

  .hero__title {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }

  .hero__subtitle {
    font-size: 1.04rem;
  }

  .panel {
    padding: 16px;
    border-radius: 18px;
  }

  .family-gallery {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
    gap: 10px;
  }

  .family-card__media {
    height: 88px;
  }

  .family-card__image {
    max-height: 84px;
    max-width: 108px;
  }

  .search {
    min-height: 52px;
    flex-basis: 100%;
  }

  .type-toggle {
    width: 100%;
    justify-content: center;
  }

  .type-toggle__btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .device-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 520px) {
  .family-gallery {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  margin: 26px 0 18px;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

@media (max-width: 900px) {
  .table-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table {
    min-width: 0;
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tbody tr {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    padding: 10px 12px;
  }

  tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 0;
    padding: 2px 0;
    font-size: 0.95rem;
  }

  tbody td::before {
    content: attr(data-label);
    color: var(--text-soft);
    font-size: 0.73rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
  }

  tbody td.action-cell {
    display: block;
    padding-top: 8px;
  }

  tbody td.action-cell::before {
    display: block;
    margin-bottom: 8px;
  }

  tbody td.action-cell .download-link {
    width: 100%;
    justify-content: center;
    min-height: 42px;
    font-size: 0.9rem;
  }

  tbody td.full-row-cell {
    display: block;
    padding: 0;
  }

  tbody td.full-row-cell::before {
    display: none;
  }
}
