.skip-link {
  position: fixed;
  z-index: 100;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--surface);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.button,
.button-secondary,
.icon-button {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.button {
  background: var(--accent);
  color: #ffffff;
}

.button:hover {
  background-color: #174483;
  color: #ffffff;
}

.button-secondary,
.icon-button {
  border-color: var(--border);
  background: var(--surface);
  color: var(--ink);
}

.site-header .header-link,
.site-header .icon-button {
  border-color: var(--header-border);
  background: var(--header-surface);
  color: var(--header-ink);
}

.button-secondary:hover,
.icon-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
  color: var(--ink);
}

.site-header .header-link:hover,
.site-header .icon-button:hover {
  border-color: var(--header-border);
  background: var(--header-field-muted);
  color: #174483;
}

.icon-button {
  width: 2.55rem;
  padding: 0;
}

.mobile-menu-button {
  display: none;
  flex: 0 0 auto;
}

.search-field {
  display: flex;
  width: 100%;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.25rem 0.15rem var(--space-3);
  background: var(--surface);
}

.site-header .search-field {
  border-color: var(--header-border);
  background: var(--header-surface);
}

.search-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.site-header .search-field input {
  color: #19212b;
}

.search-field button {
  flex: 0 0 auto;
  min-height: 2.55rem;
  min-width: 4.5rem;
  border: 0;
  border-radius: 0.3rem;
  padding: 0 0.95rem;
  background-color: #3794ce;
  color: #ffffff;
  white-space: nowrap;
}

.site-header .search-field button {
  background-color: #3794ce;
  color: #ffffff;
}

.search-field button:hover,
.search-field button:active {
  background-color: #174483;
  color: #ffffff;
}

.search-field:focus-within {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.appearance-button {
  border-color: var(--border);
  background: var(--surface);
}

.appearance-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.appearance-icon {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  align-items: center;
  justify-content: center;
}

.appearance-icon[hidden] {
  display: none;
}

.appearance-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.nav-section {
  margin-bottom: var(--space-5);
}

.nav-section-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  border: 0;
  padding: 0.35rem 0;
  background: transparent;
  color: var(--ink);
  font-weight: 750;
  text-align: left;
}

.nav-section-toggle:hover,
.nav-section-toggle:focus-visible {
  color: #3794ce;
}

.no-js .nav-section-toggle:hover,
.no-js .nav-section-toggle:focus-visible {
  color: var(--ink);
}

.nav-section-toggle::after {
  content: "⌄";
  color: var(--subtle);
  transition: transform 160ms ease;
}

.nav-section.is-collapsed .nav-section-toggle::after {
  transform: rotate(-90deg);
}

.nav-section-list {
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}

.nav-section.is-collapsed .nav-section-list {
  display: none;
}

.nav-link {
  display: block;
  border-left: 2px solid transparent;
  padding: 0.32rem 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.nav-link:hover {
  color: #174483;
  background: var(--surface-muted);
}

:root[data-theme="dark"] .nav-link:hover {
  color: #70bce7;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .nav-link:hover {
    color: #70bce7;
  }
}

.nav-link[aria-current="page"] {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 750;
}

.nav-link[aria-current="page"]:hover {
  color: #174483;
}

:root[data-theme="dark"] .nav-link[aria-current="page"]:hover {
  color: #70bce7;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .nav-link[aria-current="page"]:hover {
    color: #70bce7;
  }
}

.mobile-drawer-label {
  margin: 0 0 var(--space-5);
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker,
.eyebrow {
  margin-bottom: var(--space-3);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-content > p {
  max-width: 42rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-content > .hero-kicker {
  color: var(--accent);
  font-size: 0.78rem;
}

.hero-search {
  max-width: 42rem;
  margin-top: var(--space-8);
}

.start-card,
.category-card,
.article-card,
.support-card,
.notice,
.compatibility-card,
.feedback-card,
.tutorial-overview,
.related-card {
  border: 1px solid rgb(236 236 236 / 60%);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 2px 5px rgb(168 181 194 / 10%);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.start-card,
.category-card,
.article-card,
.related-card {
  display: block;
  padding: var(--space-5);
  color: var(--ink);
  text-decoration: none;
}

.start-card:hover,
.start-card:focus-within,
.category-card:hover,
.category-card:focus-within,
.article-card:hover,
.article-card:focus-within,
.related-card:hover,
.related-card:focus-within {
  transform: translateY(-5px);
  border-color: rgb(219 220 221 / 60%);
  box-shadow: 0 25px 80px 0 rgb(163 170 177 / 13%);
  color: #174483;
}

:root[data-theme="dark"] .start-card:hover,
:root[data-theme="dark"] .start-card:focus-within,
:root[data-theme="dark"] .category-card:hover,
:root[data-theme="dark"] .category-card:focus-within,
:root[data-theme="dark"] .article-card:hover,
:root[data-theme="dark"] .article-card:focus-within,
:root[data-theme="dark"] .related-card:hover,
:root[data-theme="dark"] .related-card:focus-within {
  color: #70bce7;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .start-card:hover,
  :root[data-theme="system"] .start-card:focus-within,
  :root[data-theme="system"] .category-card:hover,
  :root[data-theme="system"] .category-card:focus-within,
  :root[data-theme="system"] .article-card:hover,
  :root[data-theme="system"] .article-card:focus-within,
  :root[data-theme="system"] .related-card:hover,
  :root[data-theme="system"] .related-card:focus-within {
    color: #70bce7;
  }
}

.start-card h3,
.category-card h3,
.article-card h3,
.related-card h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.start-card p,
.category-card p,
.article-card p,
.related-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.start-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.category-card-icon {
  display: inline-flex;
  width: 5.25rem;
  height: 5.25rem;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  background: transparent;
}

.category-card-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.article-card-meta,
.breadcrumb {
  color: var(--muted);
  font-size: 0.88rem;
}

.article-card-meta {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--accent);
  font-weight: 750;
}

.popular-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.popular-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) 0;
  text-decoration: none;
}

.popular-list span {
  color: var(--muted);
  font-size: 0.88rem;
}

.support-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-6);
}

.support-card p:last-child {
  margin-bottom: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.article-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-6);
}

.article-header h1 {
  max-width: 45rem;
  margin-bottom: var(--space-4);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
}

.article-summary {
  max-width: 42rem;
  margin-bottom: var(--space-5);
  color: var(--muted);
  font-size: 1.12rem;
}

.article-content {
  padding-top: var(--space-2);
  overflow-wrap: anywhere;
}

.article-content > :first-child {
  margin-top: var(--space-8);
}

.heading-anchor {
  margin-left: var(--space-2);
  color: var(--subtle);
  font-size: 0.72em;
  opacity: 0;
  text-decoration: none;
}

h2:hover .heading-anchor,
h3:hover .heading-anchor,
.heading-anchor:focus {
  opacity: 1;
}

.heading-anchor:hover {
  color: #174483;
}

.article-toc {
  border-left: 1px solid var(--border);
  padding-left: var(--space-4);
}

.article-toc-title {
  margin-bottom: var(--space-3);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
}

.article-toc ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.86rem;
}

.article-toc li + li {
  margin-top: var(--space-2);
}

.article-toc a {
  color: var(--muted);
  text-decoration: none;
}

.article-toc a[aria-current="location"] {
  color: var(--accent);
  font-weight: 750;
}

.article-toc a[aria-current="location"]:hover {
  color: #174483;
}

:root[data-theme="dark"] .article-toc a[aria-current="location"]:hover {
  color: #70bce7;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .article-toc a[aria-current="location"]:hover {
    color: #70bce7;
  }
}

.notice {
  margin: var(--space-6) 0;
  border-left: 4px solid var(--info);
  padding: var(--space-4) var(--space-5);
  background: var(--info-bg);
}

.notice h3 {
  margin: 0 0 var(--space-2);
  color: var(--info);
  font-size: 1rem;
}

.notice-title {
  margin: 0 0 var(--space-2);
  color: var(--info);
  font-size: 1rem;
  font-weight: 800;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice--tip {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.notice--tip h3 {
  color: var(--accent-hover);
}

.notice--tip .notice-title {
  color: var(--accent-hover);
}

.notice--warning {
  border-left-color: var(--warning);
  background: var(--warning-bg);
}

.notice--warning h3 {
  color: var(--warning);
}

.notice--warning .notice-title {
  color: var(--warning);
}

.notice--critical {
  border-left-color: var(--critical);
  background: var(--critical-bg);
}

.notice--critical h3 {
  color: var(--critical);
}

.notice--critical .notice-title {
  color: var(--critical);
}

.notice--success {
  border-left-color: var(--success);
  background: var(--success-bg);
}

.notice--success h3 {
  color: var(--success);
}

.notice--success .notice-title {
  color: var(--success);
}

.menu-path {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.45rem;
  background: var(--surface-muted);
  font-weight: 650;
}

.menu-path span + span::before {
  content: "→";
  margin-right: 0.35rem;
  color: var(--subtle);
}

.checklist {
  padding-left: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 1.8rem;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 800;
}

.screenshot {
  margin: var(--space-8) 0;
}

.media-trigger {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  background: var(--surface-muted);
}

.media-trigger img {
  display: block;
  width: 100%;
}

.screenshot figcaption {
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: 0.9rem;
}

.screenshot--annotated {
  position: relative;
}

.screenshot--annotated .media-trigger {
  position: relative;
}

.annotation-dot {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  width: 1.8rem;
  height: 1.8rem;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--shadow-sm);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
}

.annotation-dot--one { top: 22%; left: 11%; }
.annotation-dot--two { top: 42%; right: 17%; }
.annotation-dot--three { bottom: 18%; left: 37%; }

.video-block {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  background: var(--surface-muted);
}

.video-block p:last-child {
  margin-bottom: 0;
}

.tutorial-overview {
  margin: var(--space-6) 0;
  padding: var(--space-6);
}

.tutorial-overview-grid,
.compatibility-grid,
.definition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.definition-grid {
  margin: 0;
}

.definition-grid dt {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.definition-grid dd {
  margin: 0;
}

.step-list {
  counter-reset: tutorial-step;
  padding: 0;
  list-style: none;
}

.tutorial-step {
  position: relative;
  counter-increment: tutorial-step;
  margin: var(--space-10) 0;
  padding-left: 3.5rem;
}

.tutorial-step::before {
  content: counter(tutorial-step);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  width: 2.4rem;
  height: 2.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.tutorial-step h3 {
  margin-top: 0;
}

.step-progress {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-8) 0 var(--space-8);
  padding: 0;
  list-style: none;
}

.step-progress li {
  margin-top: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.article-nav a {
  display: block;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
}

.article-nav a:last-child {
  text-align: right;
}

.article-nav small {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--muted);
}

.feedback-card,
.compatibility-card {
  margin-top: var(--space-8);
  padding: var(--space-5);
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.feedback-actions button {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  background: var(--surface);
  color: var(--ink);
}

.feedback-actions button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.expandable {
  margin: var(--space-4) 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.expandable summary {
  cursor: pointer;
  padding: var(--space-4);
  font-weight: 750;
}

.expandable > div {
  padding: 0 var(--space-4) var(--space-4);
}

.search-results {
  margin-top: var(--space-5);
}

.search-results[hidden] {
  display: none;
}

.search-result-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-result {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: var(--surface);
  text-decoration: none;
}

.search-result strong {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--ink);
}

.search-result small,
.search-result span {
  display: block;
  color: var(--muted);
}

.search-result-match {
  display: block;
  margin-top: var(--space-2);
  color: var(--accent);
  font-size: 0.84rem;
}

.empty-state {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  background: var(--surface-muted);
  color: var(--muted);
}

.media-dialog {
  width: min(92vw, 70rem);
  max-width: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: var(--surface);
  color: var(--ink);
}

.media-dialog::backdrop {
  background: rgba(8, 12, 18, 0.78);
}

.media-dialog img {
  display: block;
  max-height: 80vh;
  margin: 0 auto;
}

.dialog-close {
  display: block;
  margin-left: auto;
  margin-bottom: var(--space-2);
}

.mobile-sidebar-panel[aria-hidden="true"] {
  pointer-events: none;
}

.js .mobile-sidebar-panel[aria-hidden="true"] {
  transition: none;
}

.js .mobile-sidebar-panel[aria-hidden="false"] {
  pointer-events: auto;
}

@media (max-width: 850px) {
  .mobile-menu-button {
    display: inline-flex;
  }
}

@media (max-width: 850px) {
  .start-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .start-card-grid,
  .tutorial-overview-grid,
  .compatibility-grid,
  .definition-grid,
  .article-nav {
    grid-template-columns: 1fr;
  }

  .article-nav a:last-child {
    text-align: left;
  }

  .support-card {
    display: block;
  }
}
