/* Martini Tech — articoli (layout web.dev/learn) */

.tech-article-page :is(h2, h3)[id] {
  scroll-margin-top: calc(var(--tech-sticky-h, 100px) + var(--space-5));
}

.tech-main--article {
  padding: 0;
  padding-bottom: 0;
  background: var(--article-shell-bg);
}

.tech-article-shell {
  --tech-article-sticky-top: var(--tech-sticky-h, 102px);
  --tech-breadcrumb-block: calc(1.25rem + var(--space-3));
  --tech-article-sidebar-pad-top: calc(
    var(--space-5) + var(--tech-breadcrumb-block) + var(--space-5) + var(--space-1)
  );
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-height: calc(100dvh - 120px);
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-8);
}

@media (min-width: 600px) {
  .tech-article-shell {
    padding: var(--space-6) var(--space-5) var(--space-9);
  }
}


.tech-article-sidebar {
  position: sticky;
  top: var(--tech-article-sticky-top);
  align-self: start;
  box-sizing: border-box;
  max-height: calc(100vh - 120px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  padding: var(--tech-article-sidebar-pad-top) 0 var(--space-5);
  border-right: 1px solid var(--border);
  min-width: 0;
}

.tech-article-sidebar:hover {
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.tech-article-sidebar::-webkit-scrollbar {
  width: 6px;
}

.tech-article-sidebar::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.tech-article-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.tech-article-sidebar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 9999px;
}

.tech-article-sidebar:hover::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
}

.tech-article-sidebar:hover::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

.tech-article-toc {
  scrollbar-color: transparent transparent;
}

.tech-article-toc:hover {
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.tech-article-toc::-webkit-scrollbar {
  width: 6px;
}

.tech-article-toc::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 9999px;
}

.tech-article-toc:hover::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
}

.tech-article-toc:hover::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

.tech-article-toc {
  display: none;
  position: sticky;
  top: var(--tech-article-sticky-top);
  align-self: start;
  box-sizing: border-box;
  max-height: calc(100vh - 120px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: var(--tech-article-sidebar-pad-top) 0 var(--space-5) var(--space-2);
  min-width: 0;
}

@media (min-width: 1024px) {
  .tech-article-shell {
    grid-template-columns: 232px minmax(0, 1fr);
    column-gap: var(--space-5);
    align-items: start;
    padding: var(--space-6) var(--space-5) var(--space-9);
  }

  .tech-article-sidebar {
    display: block;
    grid-column: 1;
    grid-row: 1 / -1;
  }

  .tech-article-page {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .tech-article-shell:not(:has(.tech-article-details--toc-tablet)) .tech-article-page {
    grid-row: 1;
  }

  .tech-article-sidebar {
    align-self: start;
  }

  .tech-article-details--chapters,
  .tech-article-details--toc-mobile {
    display: none;
  }

  .tech-article-toc {
    display: none;
  }

  .tech-article-details--toc-tablet {
    display: block;
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    margin-bottom: var(--space-5);
  }
}

@media (min-width: 1280px) {
  .tech-article-shell {
    grid-template-columns: 248px minmax(0, 1fr) 224px;
    column-gap: var(--space-6);
    max-width: 1440px;
    margin: 0 auto;
    align-items: start;
    padding: var(--space-6) var(--space-5) var(--space-9);
  }

  .tech-article-sidebar {
    display: block;
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: start;
  }

  .tech-article-page {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }

  .tech-article-toc {
    display: block;
    grid-column: 3;
    grid-row: 1 / -1;
    align-self: start;
  }

  .tech-article-details--toc-tablet {
    display: none;
  }
}

@media (max-width: 1023px) {
  .tech-article-sidebar,
  .tech-article-toc,
  .tech-article-toc--empty,
  .tech-article-details--toc-tablet {
    display: none;
  }

  .tech-article-details--chapters,
  .tech-article-details--toc-mobile {
    display: block;
  }

  .tech-article-page {
    grid-row: auto;
  }
}

/* Collapsible nav (<1024 + TOC tablet) */
.tech-article-details {
  margin: 0 0 12px;
  min-width: 0;
}

.tech-article-details__summary {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  color: var(--text);
  list-style: none;
  cursor: pointer;
  background: var(--card);
}

.tech-article-details__summary::-webkit-details-marker {
  display: none;
}

.tech-article-details__summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.tech-article-details[open] .tech-article-details__summary::after {
  transform: rotate(-135deg);
}

.tech-article-details__body {
  padding: 12px 0 0;
  min-width: 0;
  overflow-x: hidden;
}

.tech-article-details__body--chapters {
  padding-top: 8px;
}

.tech-article-details__body--chapters .tech-article-sidebar__filter-wrap {
  background: var(--card);
  border-radius: 0;
}

.tech-article-details__body--chapters .tech-article-sidebar__path {
  padding-left: 0;
}

.tech-article-details__body--toc .tech-article-toc__nav {
  padding-left: 4px;
}

.tech-article-sidebar__path {
  margin: 0;
  padding: 0 12px 8px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.tech-article-sidebar .tech-article-sidebar__path {
  padding-left: 16px;
  padding-right: 12px;
}

.tech-article-sidebar__filter-wrap {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 0 var(--space-3);
  padding: 0;
  border-radius: 0;
  background: var(--bg);
}

.tech-article-sidebar .tech-article-sidebar__filter-wrap {
  margin-left: 0;
  margin-right: 0;
}

.tech-article-sidebar__filter-wrap::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  pointer-events: none;
  background-color: #5f6368;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M15.5 14h-.79l-.28-.27A6.47 6.47 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: 16px 16px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M15.5 14h-.79l-.28-.27A6.47 6.47 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: 16px 16px;
}

html[data-theme="dark"] .tech-article-sidebar__filter-wrap::before {
  background-color: #9aa1ad;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .tech-article-sidebar__filter-wrap::before {
    background-color: #9aa1ad;
  }
}

.tech-article-sidebar__filter {
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 0 var(--space-4) 0 40px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 14px;
  font-family: var(--tech-font);
  color: var(--text);
  background: #ffffff;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  outline: none;
}

.tech-article-sidebar__filter::-webkit-search-decoration,
.tech-article-sidebar__filter::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

html[data-theme="light"] .tech-article-sidebar__filter {
  background: #ffffff;
}

html[data-theme="dark"] .tech-article-sidebar__filter {
  background: #171a21;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .tech-article-sidebar__filter {
    background: #171a21;
  }
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .tech-article-sidebar__filter {
    background: #ffffff;
  }
}

.tech-article-sidebar__filter::placeholder {
  color: #5f6368;
  opacity: 1;
}

html[data-theme="dark"] .tech-article-sidebar__filter::placeholder {
  color: #7d8491;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .tech-article-sidebar__filter::placeholder {
    color: #7d8491;
  }
}

.tech-article-sidebar__filter:focus {
  outline: none;
}

.body-martini-tech .tech-article-sidebar__filter:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (max-width: 599px) {
  .tech-article-sidebar__filter {
    height: 34px;
    font-size: 16px;
  }
}

.tech-article-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tech-article-sidebar .tech-article-sidebar__nav {
  position: relative;
}

.tech-article-sidebar .tech-article-sidebar__nav::after {
  content: "";
  position: sticky;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 24px;
  margin-top: -24px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 100%);
}

.tech-article-sidebar a,
.tech-article-toc a,
.tech-article-details--chapters a,
.tech-article-details--toc a {
  text-decoration: none;
}

.tech-article-sidebar a:hover,
.tech-article-sidebar a:focus,
.tech-article-sidebar a:active,
.tech-article-toc a:hover,
.tech-article-toc a:focus,
.tech-article-toc a:active,
.tech-article-details--chapters a:hover,
.tech-article-details--chapters a:focus,
.tech-article-details--chapters a:active,
.tech-article-details--toc a:hover,
.tech-article-details--toc a:focus,
.tech-article-details--toc a:active {
  text-decoration: none;
}

.tech-article-sidebar__link {
  display: block;
  margin: 0;
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
  font-family: var(--tech-font);
  color: var(--text);
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  border-radius: 0 9999px 9999px 0;
}

.tech-article-sidebar__link:hover,
.tech-article-sidebar__link:focus-visible {
  background: var(--surface-2);
  text-decoration: none;
}

.tech-article-sidebar__link.is-active,
.tech-article-sidebar__link[aria-current="page"] {
  color: var(--blue);
  background: var(--active-bg);
  font-weight: 600;
}

.tech-article-sidebar .tech-article-sidebar__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
  font-weight: 400;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: 10px;
}

.tech-article-sidebar .tech-article-sidebar__link-text {
  flex: 1;
  min-width: 0;
}

.tech-article-sidebar .tech-article-sidebar__link:hover,
.tech-article-sidebar .tech-article-sidebar__link:focus-visible {
  background: var(--surface-2);
  color: var(--text);
}

.tech-article-sidebar .tech-article-sidebar__link.is-active,
.tech-article-sidebar .tech-article-sidebar__link[aria-current="page"] {
  padding-left: var(--space-5);
  color: var(--heading);
  font-weight: 600;
  background: var(--active-bg);
}

.tech-article-sidebar .tech-article-sidebar__link.is-active:hover,
.tech-article-sidebar .tech-article-sidebar__link.is-active:focus-visible,
.tech-article-sidebar .tech-article-sidebar__link[aria-current="page"]:hover,
.tech-article-sidebar .tech-article-sidebar__link[aria-current="page"]:focus-visible {
  background: var(--active-bg);
  color: var(--heading);
}

.tech-article-sidebar .tech-article-sidebar__link.is-active::before,
.tech-article-sidebar .tech-article-sidebar__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--blue);
}

.tech-article-sidebar .tech-article-sidebar__link.is-complete::after {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%239AA0A6' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

.tech-article-sidebar__link--sub {
  padding-left: var(--space-5);
  font-size: 14px;
  line-height: 22px;
}

.tech-article-page {
  background: var(--card);
  border-radius: 12px;
  padding: var(--space-5) var(--space-4) var(--space-8);
  min-width: 0;
}

@media (min-width: 600px) {
  .tech-article-page {
    padding: var(--space-7) var(--space-7) var(--space-9);
  }
}

.tech-article-page__header {
  max-width: 760px;
}

.tech-article-page__title {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--tech-text);
}

@media (min-width: 768px) {
  .tech-article-page__title {
    font-size: 44px;
    line-height: 52px;
  }
}

.tech-article-page__meta {
  margin: var(--space-1) 0 0;
  font-size: 14px;
  color: var(--muted);
}

.tech-article-page__prose {
  max-width: 760px;
  margin-top: var(--space-7);
}

.tech-prose {
  font-size: 16px;
  line-height: 28px;
  color: var(--text);
}

.tech-article-toc--empty {
  display: none;
}

.tech-article-toc__title {
  margin: 0 0 8px;
  padding-left: 0;
  overflow: visible;
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
}

.tech-article-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.tech-article-toc__item {
  margin: 0;
  padding: 0;
}

.body-martini-tech .tech-article-toc__link {
  display: block;
  margin-left: -1px;
  min-height: 36px;
  padding: var(--space-2) 0 var(--space-2) var(--space-4);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  border-left: 2px solid transparent;
}

.body-martini-tech .tech-article-toc__item--h3 .tech-article-toc__link {
  padding-left: var(--space-6);
  font-size: 13px;
  line-height: 20px;
}

.body-martini-tech .tech-article-toc__link:hover,
.body-martini-tech .tech-article-toc__link:focus-visible {
  background: var(--surface-2);
  color: var(--heading);
  text-decoration: none;
}

.body-martini-tech .tech-article-toc__link.is-active,
.body-martini-tech .tech-article-toc__link[aria-current="location"] {
  color: var(--blue);
  font-weight: 600;
  background: var(--active-bg);
  border-left-color: var(--blue);
  border-radius: 0 8px 8px 0;
}

.tech-article-page__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}

.tech-article-page__title-row .tech-article-page__title {
  flex: 1 1 240px;
  margin-bottom: 0;
}

.tech-article-copy-link {
  flex: 0 0 auto;
}

.tech-article-page__byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.tech-article-page__avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

html[data-theme="dark"] .tech-article-page__avatar--profile {
  border: 1px solid #2a2f3a;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .tech-article-page__avatar--profile {
    border-color: #2a2f3a;
  }
}

.tech-article-page__author {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
}

.tech-article-page__byline .tech-article-page__meta {
  margin: var(--space-1) 0 0;
}

.tech-article-page__author-bio {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.tech-article-related {
  margin-top: var(--space-7);
  max-width: 760px;
}

.tech-article-related__title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 600;
  color: var(--heading);
}

.tech-article-related__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.tech-article-related__card {
  display: block;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}

.tech-article-related__card:hover,
.tech-article-related__card:focus-visible {
  background: var(--surface);
  text-decoration: none;
}

.tech-article-related__card-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
}

.tech-article-related__card-desc {
  display: block;
  margin-top: var(--space-1);
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.tech-glossary__header {
  margin-bottom: 24px;
}

.tech-glossary__title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 600;
  color: var(--heading);
}

.tech-glossary__lede {
  margin: 0;
  color: var(--muted);
}

.tech-glossary__alpha {
  position: sticky;
  top: calc(var(--tech-sticky-h, 102px) + 8px);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  padding: 8px 0;
  background: var(--bg);
}

.tech-glossary__alpha-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.tech-glossary__alpha-link:hover {
  background: var(--surface-2);
}

.tech-glossary__letter {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--heading);
}

.tech-glossary__list {
  margin: 0 0 var(--space-6);
}

.tech-glossary__section:last-child .tech-glossary__list {
  margin-bottom: 0;
}

.tech-glossary__term {
  margin: 0 0 4px;
  font-weight: 600;
  color: var(--heading);
}

.tech-glossary__def {
  margin: 0 0 var(--space-4);
  color: var(--text);
}

.tech-glossary__section:last-child .tech-glossary__item:last-child .tech-glossary__def {
  margin-bottom: 0;
}

.tech-glossary__lesson-link {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}

.tech-prose a.tech-glossary-link {
  color: var(--blue);
  font-weight: 500;
}

.tech-figure {
  margin: var(--space-5) 0;
}

.tech-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--tech-border);
}

.tech-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.tech-article-feedback {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--tech-border);
  max-width: 760px;
}

.tech-article-feedback__question {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--tech-text);
}

.tech-article-feedback__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tech-article-feedback__btn {
  border: 1px solid var(--tech-border);
  background: var(--card);
  color: var(--tech-text);
  font-weight: 500;
}

.tech-article-feedback__btn:hover,
.tech-article-feedback__btn:focus-visible {
  background: var(--tech-blue-wash);
  box-shadow: none;
  transform: none;
}

/* Search + 404 */
.tech-search {
  padding: var(--space-7) 0 0;
}

.tech-search__title {
  margin: 0 0 var(--space-4);
  font-size: 32px;
  font-weight: 600;
}

.tech-search__input {
  width: 100%;
  max-width: 640px;
  height: 48px;
  padding: 0 var(--space-4);
  border: 1px solid var(--input-border);
  border-radius: 999px;
  font-size: 16px;
  font-family: var(--tech-font);
  background: var(--input-bg);
  color: var(--heading);
}

.tech-search__input::placeholder {
  color: var(--placeholder);
}

.tech-search__hint,
.tech-search__empty {
  margin-top: 16px;
  color: var(--tech-text-muted);
}

.tech-search__group {
  margin-top: 32px;
}

.tech-search__group-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
}

.tech-search__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tech-search__hit {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--tech-border);
  color: inherit;
  text-decoration: none;
}

.tech-search__hit-title {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--tech-text);
}

.tech-search__hit-path {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.tech-search__hit-excerpt {
  display: block;
  margin-top: var(--space-2);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.tech-search__hit-excerpt mark {
  background: var(--active-bg);
  color: inherit;
  padding: 0 2px;
}

.tech-search__field {
  position: relative;
  max-width: 640px;
}

.tech-search__suggest {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.tech-search__suggest a {
  color: var(--blue);
  font-weight: 500;
  text-decoration: none;
}

.tech-typeahead-anchor {
  position: relative;
  flex: 1;
  min-width: 0;
}

.tech-typeahead {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  max-height: 70vh;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.tech-typeahead::-webkit-scrollbar {
  width: 6px;
}

.tech-typeahead::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--border);
}

html[data-theme="dark"] .tech-typeahead {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.tech-typeahead__group-label,
.tech-typeahead__suggest-label {
  padding: 6px 8px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.tech-typeahead__option {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.tech-typeahead__option:hover,
.tech-typeahead__option.is-active {
  background: var(--surface-2);
}

.tech-typeahead__option-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--heading);
}

.tech-typeahead__option-title mark {
  background: var(--active-bg);
  color: var(--blue);
  text-decoration: none;
}

.tech-typeahead__option-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  min-width: 0;
}

.tech-typeahead__badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  background: var(--badge-bg, var(--surface-2));
  color: var(--badge-fg, var(--muted));
}

.tech-typeahead__desc {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
}

.tech-typeahead__all {
  display: block;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
}

.tech-typeahead__all:hover {
  background: var(--surface-2);
}

.tech-typeahead__empty {
  padding: 8px 12px 4px;
  font-size: 14px;
  color: var(--muted);
}

.tech-typeahead__suggest {
  list-style: none;
  margin: 0 0 8px;
  padding: 0 8px 8px;
}

.tech-typeahead__suggest-link {
  display: inline-block;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
}

@media (max-width: 767px) {
  .tech-header__search-wrap.is-open .tech-typeahead {
    position: fixed;
    left: 0;
    right: 0;
    top: 56px;
    max-height: min(70vh, calc(100vh - 56px));
    border-radius: 0 0 16px 16px;
    border-left: 0;
    border-right: 0;
  }
}

@media (min-width: 600px) and (max-width: 767px) {
  .tech-header__search-wrap.is-open .tech-typeahead {
    top: 64px;
    max-height: min(70vh, calc(100vh - 64px));
  }
}

.tech-typeahead--page {
  max-width: 640px;
}

.tech-not-found {
  text-align: center;
  padding: var(--space-8) 0 0;
}

.tech-not-found__code {
  margin: 0;
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--tech-text);
}

.tech-not-found__title {
  margin: 8px 0 12px;
  font-size: 18px;
  font-weight: 600;
}

.tech-not-found__lede {
  margin: 0 auto 24px;
  max-width: 28em;
  color: var(--tech-text-muted);
}

.tech-not-found__search {
  max-width: 480px;
  margin: 0 auto 24px;
}

.tech-not-found__search-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--tech-border);
  border-radius: 999px;
  font-size: 16px;
}

.tech-not-found__chips {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tech-not-found__chip {
  border: 1px solid var(--tech-border);
  color: var(--text);
  font-weight: 500;
  background: var(--card);
}

.tech-not-found__chip:hover,
.tech-not-found__chip:focus-visible {
  background: var(--tech-blue-wash);
  color: var(--text);
}
