:root {
  --an-red: #e11d2e;
  --an-red-dark: #b91020;
  --an-ink: #090b10;
  --an-surface: #11151d;
  --an-paper: #ffffff;
  --an-soft: #f4f6f8;
  --an-line: rgba(15, 23, 42, .10);
  --an-muted: #64748b;
  --an-success: #16a36a;
  --an-warning: #f59e0b;
  --an-blue: #2563eb;
  --an-radius-sm: 12px;
  --an-radius: 18px;
  --an-radius-lg: 28px;
  --an-shadow: 0 18px 50px rgba(2, 6, 23, .10);
  --an-shadow-dark: 0 22px 70px rgba(0, 0, 0, .28);
  --primary: var(--an-red);
  --primary-hover: var(--an-red-dark);
  --secondary: var(--an-blue);
  --radius: var(--an-radius-sm);
}

html { scroll-padding-top: 88px; }
body {
  font-family: "Inter", "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body:not(.an-admin-app) { background: var(--an-soft); }
::selection { background: rgba(225, 29, 46, .18); color: var(--an-ink); }
:focus-visible { outline: 3px solid rgba(225, 29, 46, .32); outline-offset: 3px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.an-progress {
  position: fixed; inset: 0 auto auto 0; z-index: 10000; width: 0; height: 3px;
  background: linear-gradient(90deg, var(--an-red), #ff6b35); box-shadow: 0 0 18px rgba(225,29,46,.65);
  transition: width .12s linear;
}
.an-skip-link {
  position: fixed; left: 16px; top: -64px; z-index: 10001; padding: 11px 16px;
  color: white; background: var(--an-red); border-radius: 10px; font-weight: 800;
}
.an-skip-link:focus { top: 12px; }

/* Public shell */
body.an-public .header,
body.an-public header.sticky,
body.an-public nav.sticky {
  border-bottom: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 35px rgba(2,6,23,.08);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
body.an-public .container { width: min(100% - 32px, 1200px); margin-inline: auto; }
body.an-public .card,
body.an-public .service-box,
body.an-public .glass-panel,
body.an-public .price-table-wrapper,
body.an-public .faq-item {
  border-radius: var(--an-radius) !important;
  border: 1px solid var(--an-line);
  box-shadow: var(--an-shadow);
}
body.an-public .btn,
body.an-public button,
body.an-public [class*="rounded-full"] {
  min-height: 44px;
}
body.an-public .btn { border-radius: 12px; font-weight: 750; letter-spacing: -.01em; }
body.an-public .btn-primary { background: linear-gradient(135deg, var(--an-red), #fb3f35); }
body.an-public .btn-primary:hover { background: linear-gradient(135deg, var(--an-red-dark), var(--an-red)); }
body.an-public .section-title,
body.an-public h1,
body.an-public h2 { letter-spacing: -.035em; text-wrap: balance; }
body.an-public p { text-wrap: pretty; }
body.an-public .form-input,
body.an-public input:not([type="checkbox"]):not([type="radio"]),
body.an-public select,
body.an-public textarea {
  min-height: 48px; border-radius: 12px; transition: border-color .2s, box-shadow .2s, background .2s;
}
body.an-public .form-input:focus,
body.an-public input:focus,
body.an-public select:focus,
body.an-public textarea:focus {
  border-color: var(--an-red) !important;
  box-shadow: 0 0 0 4px rgba(225,29,46,.12) !important;
}
body.an-public .mobile-menu { border-left: 1px solid var(--an-line); box-shadow: -20px 0 60px rgba(2,6,23,.22); }
body.an-public .nav-container {
  border-radius: 20px; border-color: rgba(255,255,255,.75);
  box-shadow: 0 18px 45px rgba(2,6,23,.20);
}
body.an-public .fab-btn { background: linear-gradient(135deg, var(--an-red), #ff5533); }

.an-install {
  display: none; position: fixed; right: 18px; bottom: 20px; z-index: 9998;
  align-items: center; gap: 9px; padding: 11px 15px; border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px; color: #fff; background: rgba(9,11,16,.92); box-shadow: var(--an-shadow-dark);
  font-size: 14px; font-weight: 750; cursor: pointer; backdrop-filter: blur(16px);
}
.an-install.is-visible { display: inline-flex; }
body:has(.mobile-bottom-nav) .an-install { bottom: 102px; }

.an-app-dock {
  display: none; position: fixed; z-index: 9990; left: 10px; right: 10px;
  bottom: max(9px, env(safe-area-inset-bottom)); height: 68px; padding: 6px;
  border: 1px solid rgba(255,255,255,.16); border-radius: 21px;
  background: rgba(9,11,16,.92); box-shadow: 0 20px 55px rgba(0,0,0,.32);
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.an-app-dock a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #a8b0be; text-decoration: none; border-radius: 14px; }
.an-app-dock a:active { background: rgba(255,255,255,.08); }
.an-app-dock span { font-size: 20px; line-height: 1; }
.an-app-dock small { font-size: 10px; font-weight: 700; white-space: nowrap; }
.an-app-dock .dock-primary { color: white; background: linear-gradient(135deg, var(--an-red), #ff5938); box-shadow: 0 8px 22px rgba(225,29,46,.30); }
.an-network { position: fixed; z-index: 10020; top: 12px; left: 50%; transform: translate(-50%,-80px); padding: 10px 15px; border-radius: 12px; color: #fff; background: var(--an-success); box-shadow: var(--an-shadow-dark); font-size: 13px; font-weight: 750; transition: transform .25s; }
.an-network.offline { background: #b45309; }
.an-network.show { transform: translate(-50%,0); }
.an-update { position: fixed; z-index: 10010; right: 14px; bottom: 96px; min-height: 44px; padding: 0 15px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; color: #fff; background: #111827; box-shadow: var(--an-shadow-dark); font-weight: 750; }

/* Search / warranty surfaces */
body.an-lookup { min-height: 100svh; background: radial-gradient(circle at 15% 0%, #20293b 0, #090b10 42%, #050608 100%) !important; }
body.an-lookup .container,
body.an-lookup .main-card,
body.an-lookup .search-card { width: min(100% - 28px, 760px); }
body.an-lookup .search-container,
body.an-lookup .result-card,
body.an-lookup #resultArea { border-radius: var(--an-radius) !important; }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  body.an-public .card,
  body.an-public .service-box { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
  body.an-public .card:hover,
  body.an-public .service-box:hover { transform: translateY(-5px); box-shadow: 0 24px 60px rgba(2,6,23,.14); }
}

@media (max-width: 768px) {
  html { scroll-padding-top: 72px; }
  body.an-public { padding-bottom: max(94px, env(safe-area-inset-bottom)); }
  body.an-public .container { width: min(100% - 24px, 1200px); padding-inline: 0; }
  body.an-public .section-padding,
  body.an-public section[class*="py-20"],
  body.an-public section[class*="py-24"] { padding-top: 56px !important; padding-bottom: 56px !important; }
  body.an-public h1 { font-size: clamp(2rem, 10vw, 3.2rem) !important; line-height: 1.08 !important; }
  body.an-public h2,
  body.an-public .section-title { font-size: clamp(1.65rem, 7vw, 2.25rem) !important; }
  body.an-public .hero { padding-top: 46px; }
  body.an-public .hero-btns { flex-direction: column; }
  body.an-public .hero-btns .btn { width: 100%; }
  body.an-public .grid-2,
  body.an-public .grid-3 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  body.an-public .card,
  body.an-public .glass-panel { padding: 20px !important; }
  body.an-public .price-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  body.an-public table { min-width: 680px; }
  body.an-public .mobile-bottom-nav { bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 20px); }
  body.an-public .nav-container { padding: 9px 10px; }
  body.an-public .nav-item { font-size: 10px; }
  body.an-public .fab-btn { width: 54px; height: 54px; }
  .an-install { right: 12px; bottom: 92px; }
  .an-app-dock { display: flex; }
  body.an-public:has(.an-app-dock) { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
}

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

@media print {
  .an-progress, .an-install, .an-skip-link { display: none !important; }
}
