@font-face {
  font-family: "IRANYekanX";
  src: url("../fonts/IRANYekanXVF.woff2") format("woff2-variations"),
       url("../fonts/IRANYekanXVF.woff2") format("woff2"),
       url("../fonts/IRANYekanXVF.woff") format("woff");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #4f39f6;
  --primary-hover: #432dd7;
  --primary-active: #372aac;
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c6d2ff;
  --primary-300: #a3b3ff;
  --primary-fg: #ffffff;
  --secondary: #f4f4f5;
  --secondary-hover: #e4e4e7;
  --secondary-fg: #18181b;
  --brand-dot: #52525c;
  --fg: #09090b;
  --fg-soft: #27272a;
  --muted-fg: #52525c;
  --subtle-fg: #71717b;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-tint: #f9fbff;
  --success: #008236;
  --success-bg: #ecfdf5;
  --danger: #c10007;
  --danger-bg: #fef2f2;
  --warning: #973c00;
  --warning-bg: #fffbed;
  --warning-border: #fee685;
  --ring: #4f39f6;
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 32px;
  --r-full: 9999px;
  --shadow-xs: 0 1px 2px rgb(9 9 11 / 0.05);
  --shadow-sm: 0 1px 3px rgb(9 9 11 / 0.06), 0 1px 2px rgb(9 9 11 / 0.04);
  --shadow-md: 0 8px 24px -8px rgb(9 9 11 / 0.12), 0 2px 6px rgb(9 9 11 / 0.04);
  --shadow-lg: 0 24px 48px -16px rgb(30 26 77 / 0.22), 0 6px 16px rgb(9 9 11 / 0.06);
  --shadow-primary: 0 10px 24px -10px rgb(79 57 246 / 0.55);
  --font: "IRANYekanX", "IRANYekanXVF", Tahoma, system-ui, sans-serif;
  --header-h: 64px;
  --gutter: 16px;
  --container: 1280px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --screen-w: min(264px, 70vw);
  --bottom-nav-h: 76px;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.85;
  font-feature-settings: "ss02";
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

a {
  color: var(--primary);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--primary-hover);
}

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--primary-100);
  color: var(--fg);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.i {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--r-lg);
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
  color: var(--primary-fg);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.text-primary {
  color: var(--primary);
}

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

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0;
}

.lead {
  font-size: 1.0625rem;
  line-height: 1.95;
  color: var(--muted-fg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: var(--shadow-primary);
}

.btn--primary:hover {
  background: var(--primary-hover);
  color: var(--primary-fg);
}

.btn--secondary {
  background: var(--secondary);
  color: var(--secondary-fg);
}

.btn--secondary:hover {
  background: var(--secondary-hover);
  color: var(--secondary-fg);
}

.btn--sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.875rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--fg);
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.icon-btn:hover {
  background: var(--secondary);
}

.icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.icon-btn--on-dark {
  background: rgb(255 255 255 / 0.12);
  border-color: rgb(255 255 255 / 0.2);
  color: #fff;
}

.icon-btn--on-dark:hover {
  background: rgb(255 255 255 / 0.22);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--primary-100);
  border-radius: var(--r-full);
  background: rgb(255 255 255 / 0.8);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

.pill .i {
  width: 16px;
  height: 16px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--bg);
  color: var(--fg-soft);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.chip:hover {
  border-color: var(--primary-200);
  background: var(--primary-50);
  color: var(--primary);
}

.chip--filter[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-fg);
}

.chip__count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding-inline: 6px;
  border-radius: var(--r-full);
  background: var(--secondary);
  color: var(--muted-fg);
  font-size: 0.75rem;
  font-weight: 700;
}

.chip--filter[aria-pressed="true"] .chip__count {
  background: rgb(255 255 255 / 0.2);
  color: #fff;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--r-full);
  background: var(--primary-50);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 600;
}

.badge .i {
  width: 16px;
  height: 16px;
}

.badge--support {
  background: var(--warning-bg);
  color: var(--warning);
  box-shadow: inset 0 0 0 1px var(--warning-border);
}

.badge--self {
  background: var(--success-bg);
  color: var(--success);
}

.icon3d {
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgb(30 26 77 / 0.14));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
}

.brand:hover {
  color: var(--fg);
}

.brand__logo {
  width: 36px;
  height: 36px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand__name {
  font-size: 1.0625rem;
  font-weight: 800;
}

.brand__tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}

.header__nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-inline-start: 24px;
}

.header__link {
  padding: 8px 12px;
  border-radius: var(--r-md);
  color: var(--muted-fg);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.header__link:hover,
.header__link[aria-current="page"] {
  background: var(--secondary);
  color: var(--fg);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--muted-fg);
  font-size: 0.875rem;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.search-trigger:hover {
  border-color: var(--primary-200);
  background: var(--bg-tint);
}

.search-trigger__label,
.search-trigger__kbd {
  display: none;
}

.search-trigger__kbd {
  margin-inline-start: auto;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  background: var(--bg-subtle);
  font-family: inherit;
  font-size: 0.75rem;
  line-height: 20px;
}

.header__cta {
  display: none;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-box__icon {
  position: absolute;
  inset-inline-start: 16px;
  width: 20px;
  height: 20px;
  color: var(--subtle-fg);
  pointer-events: none;
}

.search-box__input {
  width: 100%;
  min-height: 48px;
  padding: 10px 48px 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--bg);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.search-box__input::placeholder {
  color: var(--subtle-fg);
}

.search-box__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgb(79 57 246 / 0.16);
}

.search-box__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-box--hero .search-box__input {
  min-height: 56px;
  border-color: var(--border);
  font-size: 1.0625rem;
  box-shadow: var(--shadow-md);
}

.search-results {
  list-style: none;
}

.search-results:empty {
  display: none;
}

.search-results--floating {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  z-index: 20;
  max-height: min(420px, 60vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}

.result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: var(--fg);
  text-decoration: none;
}

.result:hover,
.result:focus-visible {
  background: var(--primary-50);
  color: var(--fg);
  outline-offset: -2px;
}

.result__kind {
  flex: none;
  min-width: 52px;
  margin-top: 2px;
  padding: 1px 8px;
  border-radius: var(--r-full);
  background: var(--secondary);
  color: var(--muted-fg);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.result__kind--guide {
  background: var(--primary-50);
  color: var(--primary);
}

.result__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.result__title {
  font-weight: 700;
  line-height: 1.6;
}

.result__title mark {
  background: var(--primary-100);
  color: inherit;
  border-radius: 4px;
  padding-inline: 2px;
}

.result__parent {
  font-size: 0.8125rem;
  color: var(--subtle-fg);
}

.result--empty {
  padding: 16px;
  color: var(--muted-fg);
  font-size: 0.9375rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 32px 40px;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 15% 30%, rgb(79 57 246 / 0.16), transparent 70%),
    radial-gradient(40% 40% at 90% 0%, rgb(97 95 255 / 0.12), transparent 70%),
    linear-gradient(180deg, var(--primary-50) 0%, #fff 85%);
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(79 57 246 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgb(79 57 246 / 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(70% 70% at 30% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 30% 40%, #000 30%, transparent 75%);
}

.hero__inner {
  display: grid;
  gap: 40px;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
}

.hero__title {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.4px;
}

.hero__lead {
  max-width: 34em;
  font-size: 1.0625rem;
  line-height: 2;
  color: var(--muted-fg);
}

.hero .search-box {
  max-width: 560px;
  margin-top: 4px;
}

.hero__popular {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  max-width: 560px;
}

.hero__popular-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-fg);
}

.hero__popular .chip {
  min-height: 34px;
  padding: 4px 12px;
  background: rgb(255 255 255 / 0.85);
  font-size: 0.8125rem;
}

.app-nav {
  width: 100%;
  max-width: 560px;
  margin-top: 6px;
}

.app-nav__label {
  margin-bottom: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--fg-soft);
}

.app-nav__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: rgb(255 255 255 / 0.9);
  box-shadow: var(--shadow-md);
  list-style: none;
}

.app-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 76px;
  padding: 8px 2px 6px;
  border-radius: var(--r-md);
  color: var(--fg-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), transform 0.25s var(--ease);
}

.app-nav__item:hover {
  background: var(--primary-50);
  color: var(--primary);
}

.app-nav__item:hover .app-nav__icon {
  transform: translateY(-3px) scale(1.06);
}

.app-nav__icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 0.25s var(--ease);
  filter: drop-shadow(0 4px 6px rgb(30 26 77 / 0.14));
}

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  padding-block: 24px;
}

.hero__stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.hero__ring {
  position: absolute;
  width: min(440px, 96vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(79 57 246 / 0.2), rgb(79 57 246 / 0.04) 60%, transparent 70%);
}

.hero__ring--2 {
  width: min(560px, 120vw);
  border: 1px dashed rgb(79 57 246 / 0.22);
  background: none;
}

.hero__float {
  position: absolute;
  z-index: 2;
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgb(30 26 77 / 0.2));
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}

.hero__float--f1 { top: 6%; inset-inline-end: 4%; width: 84px; height: 84px; animation-delay: -1s; }
.hero__float--f2 { top: 14%; inset-inline-start: 2%; animation-delay: -2s; }
.hero__float--f3 { bottom: 16%; inset-inline-end: 2%; animation-delay: -3s; }
.hero__float--f4 { bottom: 4%; inset-inline-start: 8%; width: 58px; height: 58px; animation-delay: -4s; }
.hero__float--f5 { top: 46%; inset-inline-start: -2%; width: 48px; height: 48px; animation-delay: -5s; }
.hero__float--f6 { top: 50%; inset-inline-end: -2%; width: 56px; height: 56px; animation-delay: -2.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(-3deg); }
}

.hero__chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

.hero__chip-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.hero__chip--car { top: 30%; inset-inline-end: 0; }
.hero__chip--addr { top: 64%; inset-inline-start: 0; }

.device {
  --dw: var(--screen-w);
  --bezel: calc(var(--dw) * 0.028);
  --radius: calc(var(--dw) * 0.125);
  position: relative;
  width: calc(var(--dw) + var(--bezel) * 2);
  flex: none;
  padding: var(--bezel);
  border-radius: calc(var(--radius) + var(--bezel));
  background: linear-gradient(145deg, #3f3f47 0%, #18181b 40%, #27272a 100%);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.12),
    inset 0 0 0 2px #0b0b0d,
    0 30px 60px -24px rgb(30 26 77 / 0.45),
    0 12px 24px -12px rgb(9 9 11 / 0.3);
}

.device::before,
.device::after {
  content: "";
  position: absolute;
  right: -3px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, #27272a, #52525c);
}

.device::before {
  top: 20%;
  height: 7%;
}

.device::after {
  top: 31%;
  height: 13%;
}

.device__screen {
  position: relative;
  width: 100%;
  aspect-ratio: 360 / 800;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  scrollbar-width: none;
}

.device__screen::-webkit-scrollbar {
  display: none;
}

.device.is-long .device__screen {
  overflow-y: auto;
  overscroll-behavior-x: contain;
}

.device__screen img {
  display: block;
  width: 100%;
  height: auto;
}

.device:not(.is-long) .device__screen img {
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.device__screen:focus-visible {
  outline: 3px solid var(--primary-300);
  outline-offset: 2px;
}

.device__hint {
  position: absolute;
  inset-inline: var(--bezel);
  bottom: var(--bezel);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  height: 34%;
  padding: 0 12px calc(var(--dw) * 0.075);
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(180deg, rgb(255 255 255 / 0) 0%, rgb(255 255 255 / 0.85) 55%, #fff 100%);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.device__hint span {
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.device__hint .i {
  width: 22px;
  height: 22px;
  animation: nudge 1.6s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateY(-3px); opacity: 0.6; }
  50% { transform: translateY(3px); opacity: 1; }
}

.device.is-scrolled .device__hint {
  opacity: 0;
  transform: translateY(8px);
}

.device__zoom {
  position: absolute;
  top: calc(var(--bezel) + 10px);
  left: calc(var(--bezel) + 10px);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--r-full);
  background: rgb(9 9 11 / 0.72);
  color: #fff;
  opacity: 0.88;
  transition: opacity 0.18s var(--ease), background-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.device__zoom:hover,
.device__zoom:focus-visible {
  opacity: 1;
  background: var(--primary);
  transform: scale(1.05);
}

.device--hero {
  z-index: 1;
  --dw: min(248px, 64vw);
}

.block {
  padding-block: 48px;
}

.block--tinted {
  background: var(--bg-subtle);
  border-block: 1px solid var(--border);
}

.block__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 640px;
  margin-bottom: 24px;
}

.block__title {
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
  font-weight: 800;
  line-height: 1.5;
}

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

.qgrid {
  display: grid;
  gap: 12px;
  list-style: none;
}

.qcard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.qcard:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-md);
}

.qcard__main {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 12px;
  color: var(--fg);
  text-decoration: none;
}

.qcard__main:hover {
  color: var(--fg);
}

.qcard__main .icon3d {
  width: 60px;
  height: 60px;
}

.qcard__text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.qcard__title {
  font-size: 1.0625rem;
  font-weight: 800;
}

.qcard__desc {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--muted-fg);
}

.qcard__arrow {
  color: var(--primary);
  transition: transform 0.2s var(--ease);
}

.qcard__main:hover .qcard__arrow {
  transform: translateX(-4px);
}

.qcard__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding: 0 16px 16px;
  list-style: none;
}

.qcard__links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  background: var(--secondary);
  color: var(--fg-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.qcard__links a:hover {
  background: var(--primary-50);
  color: var(--primary);
}

.ggroup + .ggroup {
  margin-top: 32px;
}

.ggroup__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 1.0625rem;
  font-weight: 800;
}

.ggroup__idx {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: var(--primary);
  color: #fff;
  font-size: 0.8125rem;
}

.ggrid {
  display: grid;
  gap: 12px;
  list-style: none;
}

.gcard {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.gcard:hover {
  border-color: var(--primary-200);
  color: var(--fg);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.gcard .icon3d {
  width: 56px;
  height: 56px;
}

.gcard__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.gcard__num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

.gcard__title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.7;
}

.gcard__desc {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--muted-fg);
}

.gcard__meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--subtle-fg);
}

.gcard__meta .i {
  width: 14px;
  height: 14px;
}

.gcard__arrow {
  color: var(--subtle-fg);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

.gcard:hover .gcard__arrow {
  color: var(--primary);
  transform: translateX(-4px);
}

.band {
  display: grid;
  gap: 12px;
  list-style: none;
}

.band__card {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 18px 20px;
  border-radius: var(--r-xl);
  color: var(--fg);
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.band__card:hover {
  color: var(--fg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.band__card .icon3d {
  width: 68px;
  height: 68px;
}

.band__card > span {
  display: flex;
  flex-direction: column;
}

.band__card--warn {
  background: linear-gradient(135deg, #fff7ed, #fffbed);
  box-shadow: inset 0 0 0 1px #ffd6a8;
}

.band__card--book {
  background: linear-gradient(135deg, var(--primary-50), #f5f3ff);
  box-shadow: inset 0 0 0 1px var(--primary-100);
}

.band__card--support {
  background: linear-gradient(135deg, #ecfeff, #f0f9ff);
  box-shadow: inset 0 0 0 1px #a2f4fd;
}

.band__title {
  font-size: 1.0625rem;
  font-weight: 800;
}

.band__desc {
  font-size: 0.875rem;
  color: var(--muted-fg);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "head"
    "gallery"
    "body";
  gap: 28px;
  padding-block: 20px 56px;
}

.sidebar {
  display: none;
  grid-area: sidebar;
}

.guide-head {
  grid-area: head;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.gallery-col {
  grid-area: gallery;
  min-width: 0;
}

.guide-body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 36px;
  min-width: 0;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--subtle-fg);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.breadcrumb li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-inline: 4px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.6;
}

.breadcrumb a {
  color: var(--muted-fg);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumb [aria-current] {
  color: var(--fg);
  font-weight: 600;
}

.guide-head__top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.guide-head__icon {
  width: 68px;
  height: 68px;
  padding: 8px;
  border-radius: var(--r-xl);
  background: linear-gradient(145deg, var(--primary-50), #fff);
  box-shadow: inset 0 0 0 1px var(--primary-100);
}

.guide-head__title {
  font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.25rem);
  font-weight: 900;
  line-height: 1.45;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.meta-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 10px;
  border-radius: var(--r-full);
  background: var(--secondary);
  color: var(--muted-fg);
  font-size: 0.8125rem;
  font-weight: 600;
}

.meta-list .i {
  width: 16px;
  height: 16px;
}

.toc-mobile {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
}

.toc-mobile summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

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

.toc-mobile__chev {
  margin-inline-start: auto;
  transition: transform 0.2s var(--ease);
}

.toc-mobile[open] .toc-mobile__chev {
  transform: rotate(180deg);
}

.toc-mobile ol {
  display: grid;
  gap: 2px;
  padding: 0 8px 10px;
  list-style: none;
  counter-reset: toc;
}

.toc-mobile li {
  counter-increment: toc;
}

.toc-mobile a {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  color: var(--fg-soft);
  font-size: 0.9375rem;
  text-decoration: none;
}

.toc-mobile a::before {
  content: counter(toc, persian);
  color: var(--primary);
  font-weight: 700;
}

.toc-mobile a:hover {
  background: var(--primary-50);
  color: var(--primary);
}

.section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.6;
}

.section__title::before {
  content: "";
  flex: none;
  width: 4px;
  height: 22px;
  border-radius: var(--r-full);
  background: var(--primary);
}

.section__icon {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.section--callout,
.section--faq .section__title:has(.section__icon) {
  gap: 14px;
}

.section--callout .section__title::before,
.section--faq .section__title::before {
  display: none;
}

.section--callout {
  padding: 20px;
  border-radius: var(--r-xl);
  background: var(--bg-tint);
  box-shadow: inset 0 0 0 1px var(--primary-100);
}

.prose-p {
  color: var(--fg-soft);
}

.guide-body strong {
  font-weight: 700;
  color: var(--fg);
}

.xref {
  font-weight: 600;
  white-space: nowrap;
}

.steps {
  display: grid;
  gap: 10px;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  display: flex;
  gap: 14px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step, persian);
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: var(--primary);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 4px var(--primary-50);
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 38px;
  bottom: -8px;
  inset-inline-start: 15px;
  width: 2px;
  border-radius: 2px;
  background: var(--primary-100);
}

.steps li > span {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
  padding-bottom: 6px;
  color: var(--fg-soft);
}

.bullets {
  display: grid;
  gap: 8px;
  list-style: none;
}

.bullets li {
  position: relative;
  padding-inline-start: 22px;
  color: var(--fg-soft);
}

.bullets li::before {
  content: "";
  position: absolute;
  top: 0.8em;
  inset-inline-start: 4px;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--primary);
  transform: rotate(45deg);
}

.note {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
}

.note .i {
  margin-top: 4px;
}

.note--warning {
  background: var(--warning-bg);
  color: var(--warning);
  box-shadow: inset 0 0 0 1px var(--warning-border);
}

.note--warning p {
  color: #7b3306;
  font-weight: 500;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.8;
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.table thead th {
  background: var(--bg-subtle);
  color: var(--muted-fg);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.table tbody th {
  font-weight: 700;
  color: var(--fg);
  min-width: 120px;
}

.table td {
  color: var(--fg-soft);
}

.table tbody tr:last-child > * {
  border-bottom: 0;
}

.table tbody tr:hover > * {
  background: var(--bg-tint);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.faq[open] {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-sm);
}

.faq summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  font-weight: 700;
  line-height: 1.7;
  cursor: pointer;
  list-style: none;
}

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

.faq summary > span {
  flex: 1;
}

.faq__chev {
  color: var(--subtle-fg);
  transition: transform 0.2s var(--ease);
}

.faq[open] .faq__chev {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq__body {
  padding: 0 16px 16px;
  color: var(--fg-soft);
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0 12px;
  border-radius: var(--r-2xl);
  background:
    radial-gradient(80% 60% at 50% 40%, rgb(79 57 246 / 0.12), transparent 70%),
    var(--bg-tint);
  box-shadow: inset 0 0 0 1px var(--primary-100);
}

.gallery__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 16px;
}

.gallery__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
}

.gallery__title .i {
  color: var(--primary);
}

.gallery__count {
  padding: 2px 12px;
  border-radius: var(--r-full);
  background: #fff;
  color: var(--muted-fg);
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--border);
}

.gallery__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px calc(50% - (var(--screen-w) / 2) - 8px) 4px;
  scrollbar-width: none;
}

.gallery__track::-webkit-scrollbar {
  display: none;
}

.slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: none;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.slide:not(.is-active) {
  opacity: 0.55;
  transform: scale(0.96);
}

.slide__cap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: calc(var(--screen-w) + 16px);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.75;
  color: var(--fg-soft);
}

.slide__num {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: var(--r-full);
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.gallery__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-inline: 16px;
}

.gallery__btn {
  background: #fff;
}

.gallery__dots {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 2px;
}

.gallery__dot {
  position: relative;
  width: 18px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
}

.gallery__dot::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--primary-200);
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), background-color 0.25s var(--ease);
}

.gallery__dot[aria-current="true"]::before {
  width: 20px;
  background: var(--primary);
}

.help-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--primary-50), #fff);
  box-shadow: inset 0 0 0 1px var(--primary-100);
}

.help-box .icon3d {
  width: 60px;
  height: 60px;
}

.help-box__title {
  margin-bottom: 4px;
  font-size: 1.125rem;
  font-weight: 800;
}

.help-box p {
  color: var(--muted-fg);
}

.help-box__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pager {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.pager__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.pager__link:hover {
  border-color: var(--primary-200);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}

.pager__link .i {
  color: var(--primary);
}

.pager__link > span {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pager__link--next {
  text-align: end;
}

.pager__label {
  font-size: 0.8125rem;
  color: var(--subtle-fg);
}

.pager__title {
  font-weight: 800;
}

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg-subtle);
}

.search-box--inline .search-box__input {
  min-height: 48px;
}

.chips--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-inline: -14px;
  padding: 2px 14px 4px;
  scrollbar-width: none;
}

.chips--scroll::-webkit-scrollbar {
  display: none;
}

.filter-status {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted-fg);
}

.err-list {
  display: grid;
  gap: 12px;
  list-style: none;
}

.err-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.err-card:target {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgb(79 57 246 / 0.14);
}

.err-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.err-card__msg {
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.7;
}

.err-card__dl {
  display: grid;
  gap: 8px;
}

.err-card__dl > div {
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--bg-subtle);
}

.err-card__dl dt {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--subtle-fg);
}

.err-card__dl dd {
  color: var(--fg-soft);
}

.empty-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  color: var(--muted-fg);
}

.letters ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.letters a {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding-inline: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--fg-soft);
  font-weight: 700;
  text-decoration: none;
}

.letters a:hover {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary);
}

.glossary {
  display: grid;
  gap: 28px;
}

.letter-group {
  display: grid;
  gap: 12px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.letter-group__title {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--primary);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
}

.terms {
  display: grid;
  gap: 10px;
}

.term {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.term:target {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgb(79 57 246 / 0.14);
}

.term__name {
  font-weight: 800;
  color: var(--fg);
}

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

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

.side-nav ul {
  display: grid;
  gap: 2px;
  list-style: none;
}

.side-nav__label {
  margin-bottom: 6px;
  padding-inline: 10px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--subtle-fg);
}

.side-nav__link,
.side-nav__home {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 10px;
  border-radius: var(--r-md);
  color: var(--fg-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.6;
  text-decoration: none;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.side-nav__link:hover,
.side-nav__home:hover {
  background: var(--secondary);
  color: var(--fg);
}

.side-nav__link[aria-current="page"] {
  background: var(--primary-50);
  color: var(--primary);
  font-weight: 700;
}

.side-nav__num {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  background: var(--secondary);
  color: var(--muted-fg);
  font-size: 0.75rem;
  font-weight: 800;
}

.side-nav__num .i {
  width: 14px;
  height: 14px;
}

.side-nav__link[aria-current="page"] .side-nav__num {
  background: var(--primary);
  color: #fff;
}

.side-nav__home {
  border: 1px solid var(--border);
  font-weight: 700;
}

.side-nav__home .i {
  color: var(--primary);
}

.side-toc {
  margin: 4px 0 8px;
  padding-inline-start: 22px !important;
  border-inline-start: 2px solid var(--primary-100);
  margin-inline-start: 22px;
}

.side-toc a {
  display: block;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  color: var(--muted-fg);
  font-size: 0.8125rem;
  line-height: 1.6;
  text-decoration: none;
}

.side-toc a:hover {
  color: var(--fg);
  background: var(--secondary);
}

.side-toc a.is-active {
  color: var(--primary);
  font-weight: 700;
}

dialog {
  padding: 0;
  border: 0;
  color: var(--fg);
  background: transparent;
  max-width: 100vw;
  max-height: 100dvh;
}

dialog::backdrop {
  background: rgb(9 9 11 / 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.search-dialog {
  width: 100%;
  height: 100%;
  margin: 0;
}

.search-dialog__panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  height: 100%;
  padding: 16px;
  background: var(--bg);
  overflow-y: auto;
}

.search-dialog__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.search-dialog__head .search-box {
  flex-direction: column;
  align-items: stretch;
}

.search-dialog__head .search-box__icon {
  top: 14px;
}

.search-dialog .search-results {
  margin-top: 10px;
}

.search-dialog__hint {
  margin-bottom: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--muted-fg);
}

.drawer {
  width: min(360px, 88vw);
  height: 100%;
  margin: 0 0 0 auto;
}

.drawer__panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}

.drawer[open] .drawer__panel {
  animation: drawer-in 0.28s var(--ease);
}

@keyframes drawer-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.drawer__title {
  font-size: 1.0625rem;
  font-weight: 800;
}

.side-nav--drawer {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.lightbox {
  width: 100%;
  height: 100%;
  margin: 0;
}

.lightbox::backdrop {
  background: rgb(9 9 11 / 0.86);
}

.lightbox__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.lightbox__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: #fff;
}

.lightbox__caption {
  font-weight: 700;
  line-height: 1.7;
}

.lightbox__body {
  flex: 1;
  overflow: auto;
  padding: 0 16px 24px;
}

.lightbox__body img {
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
  border-radius: var(--r-xl);
  background: #fff;
}

.to-top {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.to-top[hidden] {
  display: none;
}

.to-top:hover {
  background: var(--primary-hover);
}

.bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 45;
  border-top: 1px solid var(--border);
  background: rgb(255 255 255 / 0.96);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav__list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 560px;
  height: var(--bottom-nav-h);
  margin-inline: auto;
  padding: 0 16px;
  list-style: none;
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 60px;
  min-height: 52px;
  padding: 2px 4px;
  border: 0;
  border-radius: var(--r-md);
  background: none;
  color: var(--fg);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.18s var(--ease), transform 0.18s var(--ease);
}

.bottom-nav__icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: grayscale(1) brightness(0.82) contrast(1.1);
  transition: filter 0.2s var(--ease), transform 0.2s var(--ease);
}

.bottom-nav__item:hover,
.bottom-nav__item.is-active {
  color: var(--primary);
}

.bottom-nav__item:hover .bottom-nav__icon,
.bottom-nav__item.is-active .bottom-nav__icon {
  filter: none;
}

.bottom-nav__item.is-active .bottom-nav__icon {
  transform: translateY(-1px);
}

.bottom-nav__item:active {
  transform: scale(0.94);
}

.bottom-nav__item:focus-visible {
  outline-offset: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-block: 32px 24px;
}

.footer__about {
  max-width: 420px;
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--muted-fg);
}

.footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.footer__nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--fg-soft);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.footer__nav a:hover {
  border-color: var(--primary-200);
  color: var(--primary);
}

.footer__nav .i {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.footer__bottom {
  padding-block: 16px 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--subtle-fg);
}

.notfound {
  padding-block: 72px;
}

.notfound__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.notfound__title {
  font-size: 1.75rem;
  font-weight: 900;
}

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

@media (min-width: 480px) {
  .qcard__main .icon3d {
    width: 68px;
    height: 68px;
  }
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
    --screen-w: 280px;
  }

  .ggrid,
  .qgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .band__card {
    flex-direction: column;
    align-items: flex-start;
  }

  .pager {
    grid-template-columns: 1fr 1fr;
  }

  .help-box {
    flex-direction: row;
  }

  .err-card__dl {
    grid-template-columns: 1fr 1fr;
  }

  .search-dialog {
    width: min(640px, calc(100vw - 32px));
    height: auto;
    max-height: min(640px, calc(100dvh - 64px));
    margin: 64px auto auto;
    border-radius: var(--r-xl);
  }

  .search-dialog__panel {
    height: auto;
    max-height: min(640px, calc(100dvh - 64px));
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
  }

  .device--hero {
    --dw: 268px;
  }

  .hero__float { width: 76px; height: 76px; }
  .hero__float--f1 { width: 96px; height: 96px; }
}

@media (max-width: 639.98px) {
  .table--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .table--stack,
  .table--stack tbody,
  .table--stack tr,
  .table--stack th,
  .table--stack td {
    display: block;
  }

  .table-wrap--stack {
    border: 0;
    background: none;
    overflow: visible;
  }

  .table--stack tbody {
    display: grid;
    gap: 10px;
  }

  .table--stack tr {
    padding: 4px 0;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--bg);
  }

  .table--stack tbody tr:hover > * {
    background: none;
  }

  .table--stack th,
  .table--stack td {
    padding: 8px 14px;
    border-bottom: 0;
  }

  .table--stack tbody th {
    padding-top: 10px;
    font-size: 1rem;
    color: var(--primary);
  }

  .table--stack td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--subtle-fg);
  }

  .table--stack td + td {
    border-top: 1px dashed var(--border);
  }
}

@media (min-width: 768px) {
  :root {
    --header-h: 72px;
    --screen-w: clamp(200px, calc((100dvh - 320px - var(--bottom-nav-h)) / 2.28), 280px);
  }

  .search-trigger {
    width: auto;
    min-width: 220px;
    padding-inline: 14px;
    justify-content: flex-start;
  }

  .search-trigger__label,
  .search-trigger__kbd {
    display: inline-block;
  }

  .header__cta {
    display: inline-flex;
  }

  .hero {
    padding-block: 48px 56px;
  }

  .qgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .guide-layout {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "head gallery"
      "body gallery";
    grid-template-rows: auto 1fr;
    column-gap: 40px;
    row-gap: 32px;
    padding-block: 28px 72px;
  }

  .guide-layout--wide {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "body";
  }

  .gallery-col {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    align-self: start;
  }

  .gallery {
    width: calc(var(--screen-w) + 56px);
    padding: 16px 0 12px;
  }

  .gallery__track {
    padding-inline: 20px;
    gap: 24px;
  }

  .slide:not(.is-active) {
    opacity: 0;
    transform: none;
  }

  .slide {
    width: calc(var(--screen-w) + 16px);
  }
}

@media (min-width: 1024px) {
  :root {
    --bottom-nav-h: 0px;
  }

  .header__nav {
    display: flex;
  }

  .bottom-nav {
    display: none;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 48px;
  }

  .hero__visual {
    min-height: 640px;
  }

  .device--hero {
    --dw: 300px;
  }

  .hero__float { width: 92px; height: 92px; }
  .hero__float--f1 { width: 104px; height: 104px; top: 10%; inset-inline-end: 0; }
  .hero__float--f2 { inset-inline-start: 6%; }
  .hero__float--f3 { inset-inline-end: 6%; }
  .hero__float--f5 { inset-inline-start: 4%; }
  .hero__float--f6 { inset-inline-end: 2%; }
  .hero__chip--car { inset-inline-end: 4%; }
  .hero__chip--addr { inset-inline-start: 6%; }

  .ggrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .block {
    padding-block: 64px;
  }
}

@media (min-width: 1180px) {
  :root {
    --gutter: 32px;
    --screen-w: clamp(200px, calc((100dvh - 320px) / 2.28), 360px);
  }

  .qgrid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .qcard__main {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 18px 14px;
  }

  .qcard__main .icon3d {
    width: 76px;
    height: 76px;
  }

  .qcard__arrow {
    display: none;
  }

  .qcard__links {
    padding: 0 18px 18px;
  }

  .guide-layout {
    grid-template-columns: 248px minmax(0, 1fr) auto;
    grid-template-areas:
      "sidebar head gallery"
      "sidebar body gallery";
    column-gap: 48px;
  }

  .guide-layout--wide {
    grid-template-columns: 248px minmax(0, 1fr);
    grid-template-areas:
      "sidebar head"
      "sidebar body";
  }

  .guide-layout--wide .guide-head,
  .guide-layout--wide .guide-body {
    max-width: 860px;
  }

  .sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    align-self: start;
    display: block;
    max-height: calc(100dvh - var(--header-h) - 32px);
    overflow-y: auto;
    padding-inline-end: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }

  .toc-mobile {
    display: none;
  }

}

@media (min-width: 1440px) {
  :root {
    --container: 1360px;
  }

  .ggrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (hover: none) {
  .search-trigger__kbd {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .btn,
  .chip,
  .gcard,
  .qcard,
  .faq,
  .term,
  .err-card {
    border: 1px solid CanvasText;
  }

  .bottom-nav__item.is-active {
    outline: 2px solid Highlight;
  }

  .steps li::before,
  .gallery__dot::before {
    forced-color-adjust: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .bottom-nav,
  .sidebar,
  .gallery-col,
  .pager,
  .help-box,
  .to-top,
  .toc-mobile {
    display: none !important;
  }

  .guide-layout {
    display: block;
  }

  .faq__body {
    display: block;
  }
}
