:root {
  --bg: #070b12;
  --bg-elevated: #0f1623;
  --card: #141c2b;
  --card-border: rgba(255, 255, 255, 0.07);
  --text: #f0f4fa;
  --muted: #8b9cb8;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --accent-hover: #2563eb;
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --warn: #f59e0b;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.1);
  --radius: 14px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(99, 102, 241, 0.08), transparent);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  flex: 1;
}

.layout-main {
  min-width: 0;
}

.layout-ads {
  display: none;
}

@media (min-width: 960px) {
  .layout-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }

  .layout-ads {
    display: block;
  }

  .report-card-head {
    grid-template-columns: minmax(140px, 180px) 1fr;
  }

  .device-image-wrap {
    max-width: 180px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 0;
  flex-wrap: wrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lang-select-wrap {
  display: flex;
  align-items: center;
}

.lang-select {
  appearance: none;
  padding: 0.35rem 1.75rem 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-family: inherit;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--bg-elevated)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b9cb8'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E")
    no-repeat right 0.5rem center;
  color: var(--text);
  cursor: pointer;
  max-width: 9rem;
}

.lang-select:focus {
  outline: none;
  border-color: var(--accent);
}

html[dir="rtl"] .topbar-actions {
  flex-direction: row-reverse;
}

html[dir="rtl"] .lang-select {
  padding: 0.35rem 0.65rem 0.35rem 1.75rem;
  background-position: left 0.5rem center;
}

html[dir="rtl"] .search-row {
  flex-direction: row-reverse;
}

html[dir="rtl"] .spec-item,
html[dir="rtl"] .hero,
html[dir="rtl"] .footer {
  text-align: right;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand:hover {
  opacity: 0.95;
}

.brand-logo {
  display: block;
  height: clamp(42px, 10vw, 58px);
  width: auto;
  max-width: min(300px, 78vw);
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
}

html[dir="rtl"] .brand-logo {
  object-position: right center;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  font-size: 0.8rem;
  color: var(--muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.status-pill.online .status-dot {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-pill.online .status-text {
  color: var(--success);
}

.status-pill.offline .status-dot {
  background: var(--warn);
}

/* Hero */
.main {
  flex: 1;
}

.hero {
  text-align: center;
  margin-bottom: 1.75rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.hero-compact {
  margin-bottom: 1rem;
}

.hero-compact h1 {
  font-size: 1.45rem;
}

.hero-compact .hero-lead {
  font-size: 0.92rem;
}

.hero-note {
  display: none;
}

/* Ad slots — paste AdSense ins / script targets here */
.ad-slot {
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(15, 22, 35, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 90px;
}

.ad-top {
  margin-bottom: 1rem;
  min-height: 100px;
}

.ad-bottom {
  margin-top: 1rem;
  min-height: 90px;
}

.ad-sidebar {
  min-height: 600px;
}

.ad-sticky {
  position: sticky;
  top: 1rem;
}

.ad-placeholder {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(139, 156, 184, 0.55);
  pointer-events: none;
}

.ad-slot:has(iframe),
.ad-slot:has(ins),
.ad-slot:has(.adsbygoogle) {
  border-style: solid;
  border-color: var(--card-border);
  background: var(--bg-elevated);
}

.ad-slot:has(iframe) .ad-placeholder,
.ad-slot:has(ins) .ad-placeholder,
.ad-slot:has(.adsbygoogle) .ad-placeholder {
  display: none;
}

/* Loading overlay (verimei-style modal) */
body.is-loading {
  overflow: hidden;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.loading-modal {
  width: min(100%, 22rem);
  padding: 1.75rem 1.5rem 1.35rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
}

.loading-spinner-lg {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border-width: 3px;
}

.loading-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1rem 0 0.5rem;
}

.loading-progress-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  overflow: hidden;
}

.loading-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  transition: width 0.35s ease;
}

.loading-progress-pct {
  flex-shrink: 0;
  min-width: 2.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.loading-stage {
  margin: 0;
  font-size: 0.86rem;
  color: #cbd5e1;
  min-height: 1.25rem;
}

.loading-spinner {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.loading-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.loading-imei {
  margin: 0.5rem 0 0;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--muted);
}

.loading-hint {
  margin: 0.65rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
}

.hero-note a {
  color: var(--accent);
  text-decoration: none;
}

.hero-note a:hover {
  text-decoration: underline;
}

.result-disclaimer {
  margin: 1.1rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
}

.result-disclaimer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.result-disclaimer a:hover {
  text-decoration: underline;
}

/* Check type pills */
.check-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin: 0 0 1rem;
}

.check-pill {
  appearance: none;
  border: 1px solid var(--card-border);
  background: var(--bg-elevated);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.check-pill:hover {
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.35);
}

.check-pill.active {
  color: var(--text);
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.15);
}

/* Search */
.search-panel {
  margin-bottom: 1.5rem;
}

.search-row {
  display: flex;
  gap: 0.6rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 0.45rem;
  box-shadow: var(--shadow);
}

.search-row input {
  flex: 1;
  min-width: 0;
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
  font-family: "SF Mono", "Cascadia Code", ui-monospace, monospace;
  letter-spacing: 0.06em;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
}

.search-row input::placeholder {
  color: var(--muted);
  font-family: "Inter", system-ui, sans-serif;
  letter-spacing: normal;
  font-size: 0.95rem;
}

.search-row input:focus {
  outline: none;
}

.search-row:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow), 0 0 0 3px var(--accent-glow);
}

.search-row button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  padding: 0.9rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.search-row button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.search-row button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.search-hint {
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Results */
.result-panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-panel {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border-color: rgba(248, 113, 113, 0.25);
  background: linear-gradient(135deg, var(--card), var(--error-bg));
}

.error-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--error-bg);
  color: var(--error);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.error-panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.error-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.confidence-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
}

.confidence-badge.verified {
  background: var(--success-bg);
  color: var(--success);
}

.confidence-badge.likely {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.confidence-badge.estimated {
  background: var(--warn-bg);
  color: var(--warn);
}

.result-imei {
  margin: 0;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-all;
}

/* Compact report card (iUnlocker-style) */
.report-card {
  padding: 0;
}

.spec-table .value-muted {
  color: var(--muted);
  font-weight: 500;
}

.report-card-head {
  display: grid;
  grid-template-columns: minmax(96px, 120px) 1fr;
  gap: 0.85rem;
  align-items: center;
  padding-bottom: 0.65rem;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid var(--card-border);
}

.device-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 120px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.14), transparent 55%),
    linear-gradient(145deg, var(--device-gradient-a, #1e293b), var(--device-gradient-b, #0f172a));
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.35);
}

.device-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 85%, rgba(59, 130, 246, 0.18), transparent 62%);
  pointer-events: none;
}

.report-card-summary {
  min-width: 0;
}

.report-card-summary .status-badges {
  margin: 0 0 0.5rem;
}

.report-card-summary .device-title {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.device-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.45rem;
}

.device-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.device-chip-muted {
  font-family: ui-monospace, monospace;
  font-weight: 500;
  font-size: 0.74rem;
  color: var(--muted);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
  padding: 0.22rem 0.55rem;
}

.device-meta strong {
  color: var(--text);
}

.report-card-summary .result-imei {
  margin: 0;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.spec-table tbody tr {
  display: grid;
  grid-template-columns: minmax(11rem, 42%) 1fr;
  gap: 0.35rem 0.75rem;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
}

.spec-table tr {
  border-bottom: 1px solid var(--card-border);
}

.spec-table tr:last-child {
  border-bottom: none;
}

.spec-table td {
  padding: 0.38rem 0;
  vertical-align: top;
}

.spec-table td:first-child {
  width: auto;
  max-width: none;
  padding-right: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

.spec-table td:last-child {
  font-weight: 600;
  word-break: break-word;
}

.spec-table .value-good {
  color: var(--success);
}

.spec-table .value-bad {
  color: var(--error);
}

.spec-table .value-warn {
  color: var(--warn);
}

.report-more {
  margin-top: 0.65rem;
  border-top: 1px solid var(--card-border);
  padding-top: 0.5rem;
}

.report-more summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  user-select: none;
  list-style: none;
  padding: 0.35rem 0;
}

.report-more summary::-webkit-details-marker {
  display: none;
}

.report-more summary::before {
  content: "▸ ";
}

.report-more[open] summary::before {
  content: "▾ ";
}

.report-more.hidden {
  display: none;
}

.spec-table-more {
  margin-top: 0.35rem;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--card-border);
}

.btn-secondary,
.btn-accent {
  appearance: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s, transform 0.15s;
}

.btn-secondary {
  border: 1px solid var(--card-border);
  background: var(--bg-elevated);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: rgba(59, 130, 246, 0.35);
}

.btn-accent {
  border: none;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  margin-left: auto;
}

.btn-accent:hover {
  transform: translateY(-1px);
}

.result-disclaimer {
  margin: 0.85rem 0 0;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.75rem;
}

.device-card {
  padding-top: 0.25rem;
}

.device-head {
  display: none;
}

.device-image {
  position: relative;
  z-index: 1;
  width: 96%;
  height: 96%;
  object-fit: contain;
  object-position: center center;
  padding: 0;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4));
}

.device-image[src*="cdsassets.apple.com"] {
  object-fit: cover;
  object-position: 72% 42%;
  transform: scale(1.45);
}

.device-image-fallback {
  color: rgba(255, 255, 255, 0.82);
  width: 56px;
  height: 56px;
}

.device-image-fallback svg {
  width: 100%;
  height: 100%;
}

.device-head-text {
  min-width: 0;
}

.device-description {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  word-break: break-word;
}

.status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--card-border);
  background: var(--bg-elevated);
  color: var(--text);
}

.status-badge.value-good {
  color: var(--success);
  background: var(--success-bg);
  border-color: rgba(34, 197, 94, 0.25);
}

.status-badge.value-bad {
  color: var(--error);
  background: var(--error-bg);
  border-color: rgba(248, 113, 113, 0.25);
}

.status-badge.value-warn {
  color: var(--warn);
  background: var(--warn-bg);
  border-color: rgba(245, 158, 11, 0.25);
}

.report-section {
  margin-bottom: 1.15rem;
}

.report-section-title {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.device-title {
  margin: 0 0 0.2rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  word-break: break-word;
}

.device-manufacturer {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.spec-item {
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--card-border);
}

.spec-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.spec-value {
  font-weight: 600;
  font-size: 0.95rem;
}

.spec-value.value-good {
  color: var(--success);
}

.spec-value.value-bad {
  color: var(--error);
}

.spec-value.value-warn {
  color: var(--warn);
}

.result-status {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.result-status.status-clean {
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.result-status.status-bad {
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.result-note {
  margin: 1rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
}

.result-note.warn {
  border-left-color: var(--warn);
  color: #fcd34d;
}

/* Variants & tech */
.variants-block,
.tech-block {
  margin-top: 1rem;
  border-top: 1px solid var(--card-border);
  padding-top: 0.75rem;
}

.variants-block summary,
.tech-block summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  user-select: none;
  list-style: none;
}

.variants-block summary::-webkit-details-marker,
.tech-block summary::-webkit-details-marker {
  display: none;
}

.variants-block summary::before,
.tech-block summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.2s;
}

.variants-block[open] summary::before,
.tech-block[open] summary::before {
  transform: rotate(90deg);
}

.variants-content {
  margin-top: 0.75rem;
  font-size: 0.88rem;
}

.variant-group {
  margin-bottom: 0.75rem;
}

.variant-group h4 {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}

.variant-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.variant-tag {
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  font-size: 0.82rem;
}

.variant-regions li {
  margin-bottom: 0.3rem;
  color: var(--text);
}

.imei-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-family: ui-monospace, monospace;
  font-size: 1.1rem;
}

.imei-seg {
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
}

.imei-seg.tac {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.imei-seg.snr {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

.imei-seg.cd {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.imei-labels {
  display: flex;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.imei-labels span {
  min-width: 4rem;
}

.luhn-badge {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--success-bg);
  color: var(--success);
}

.luhn-badge.invalid {
  background: var(--error-bg);
  color: var(--error);
}

.hidden {
  display: none !important;
}

/* Footer */
.footer {
  text-align: center;
  padding-top: 2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem 0;
  margin-bottom: 0.5rem;
}

.footer-copy {
  margin: 0;
  opacity: 0.75;
}

/* Site navigation */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  font-size: 0.85rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

/* Legal & info pages */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.5rem 0 2rem;
}

.legal-page h1 {
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}

.legal-page h2 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--text);
}

.legal-page p,
.legal-page li {
  color: var(--muted);
  font-size: 0.95rem;
}

.legal-page a {
  color: var(--accent);
}

.legal-updated {
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.legal-page ul {
  padding-left: 1.25rem;
}

.legal-page code {
  background: var(--bg-elevated);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.88em;
}

.faq-item {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.65rem;
  background: var(--card);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.faq-item[open] summary {
  margin-bottom: 0.5rem;
}

.contact-cards {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 640px) {
  .contact-cards {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.contact-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.contact-note {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* SEO info block on homepage */
.info-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}

.info-section h2 {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.info-section h3 {
  font-size: 0.95rem;
  margin: 1.25rem 0 0.4rem;
  color: var(--text);
}

.info-section p,
.info-section li {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.65rem;
}

.info-section ul {
  margin: 0;
  padding-left: 1.25rem;
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--card-border);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}

.cookie-banner-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  flex: 1;
  min-width: 200px;
}

.cookie-banner-text a {
  color: var(--accent);
}

.cookie-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.cookie-btn-accept {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.cookie-btn-accept:hover {
  background: var(--accent-hover);
}

.cookie-btn-learn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--card-border);
  display: inline-flex;
  align-items: center;
}

@media (max-width: 560px) {
  .site-nav {
    width: 100%;
    order: 3;
    padding-top: 0.25rem;
  }

  .topbar {
    align-items: flex-start;
  }
}

.report-section {
  display: none;
}

@media (max-width: 560px) {
  .report-card-head {
    grid-template-columns: 100px 1fr;
    gap: 0.75rem;
  }

  .device-image-wrap {
    max-width: 100px;
    border-radius: 14px;
  }

  .report-card-summary .device-title {
    font-size: 0.95rem;
  }

  .device-meta {
    font-size: 0.8rem;
  }

  .spec-table td {
    padding: 0.45rem 0;
  }

  .spec-table tbody tr {
    grid-template-columns: minmax(7.25rem, 46%) 1fr;
  }

  .spec-table td:first-child {
    white-space: normal;
    font-size: 0.72rem;
  }

  .ad-top,
  .ad-bottom {
    min-height: 60px;
  }

  .report-actions .btn-accent {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .search-row {
    flex-direction: column;
  }

  .search-row button {
    width: 100%;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }
}
