
:root {
  --purple-950: #27113d;
  --purple-900: #351654;
  --purple-800: #4d2178;
  --purple-700: #653198;
  --purple-600: #814bb3;
  --purple-200: #dccaea;
  --purple-100: #efe6f7;
  --purple-50: #f8f4fb;
  --green-700: #087c13;
  --green-600: #079318;
  --green-100: #dff4e2;
  --ink: #241c2b;
  --ink-soft: #6b6172;
  --line: #e8e2eb;
  --surface: #ffffff;
  --canvas: #fbfafc;
  --amber: #9a6500;
  --amber-bg: #fff8e7;
  --shadow-sm: 0 10px 30px rgba(47, 25, 65, 0.08);
  --shadow-lg: 0 28px 70px rgba(36, 16, 56, 0.17);
  --sidebar-width: 326px;
  --topbar-height: 74px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(7, 147, 24, 0.3);
  outline-offset: 3px;
}

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

.portal-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(280px, 680px) 1fr;
  align-items: center;
  height: var(--topbar-height);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 0 rgba(53, 22, 84, 0.02);
  backdrop-filter: blur(18px);
}

.brand-button {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 25px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--purple-900);
  text-align: left;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand > span {
  display: grid;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.brand small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.global-search {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: center;
  height: 46px;
  margin: 0 24px;
  padding: 0 14px;
  border: 1px solid #ded6e3;
  border-radius: 13px;
  background: #f8f6f9;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.global-search:focus-within {
  border-color: var(--purple-600);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(129, 75, 179, 0.1);
}

.search-icon {
  color: var(--purple-700);
  font-size: 1.4rem;
  line-height: 1;
}

.global-search input {
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 0.88rem;
}

.global-search input::placeholder {
  color: #968b9b;
}

.global-search kbd {
  padding: 5px 7px;
  border: 1px solid #ded6e3;
  border-radius: 6px;
  color: #817687;
  background: #fff;
  font: 0.64rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.search-results {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  max-height: min(70vh, 620px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.search-results > button {
  display: grid;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid #f0ebf2;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.search-results > button:hover,
.search-results > button:focus {
  background: var(--purple-50);
}

.search-results > button span {
  color: var(--green-700);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search-results > button strong {
  margin-top: 3px;
  color: var(--purple-900);
  font-size: 0.82rem;
}

.search-results > button small {
  margin-top: 4px;
  overflow: hidden;
  color: #857a8a;
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-results > p {
  margin: 0;
  padding: 9px 16px;
  color: #8d8392;
  background: #faf8fb;
  font-size: 0.65rem;
}

.search-empty {
  display: grid;
  gap: 5px;
  padding: 22px;
  text-align: center;
}

.search-empty strong {
  color: var(--purple-900);
  font-size: 0.86rem;
}

.search-empty span {
  color: var(--ink-soft);
  font-size: 0.74rem;
  line-height: 1.5;
}

.public-label {
  justify-self: end;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-right: 28px;
  color: #716677;
  font-size: 0.72rem;
  font-weight: 700;
}

.public-label i {
  color: var(--green-600);
  font-size: 0.54rem;
}

.mobile-menu-button {
  display: none;
}

.workspace {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-height));
}

.sidebar {
  position: sticky;
  top: var(--topbar-height);
  align-self: start;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #fff;
  scrollbar-color: #d8cedf transparent;
  scrollbar-width: thin;
}

.sidebar nav {
  padding: 20px 14px 28px;
}

.nav-home,
.nav-category,
.nav-page {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.nav-home {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  color: #665c6c;
  font-size: 0.82rem;
  font-weight: 700;
}

.nav-home + .nav-home {
  margin-top: 2px;
}

.nav-home span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: var(--purple-700);
  background: var(--purple-100);
  font-size: 0.74rem;
}

.nav-home:hover,
.nav-home.is-active {
  color: var(--purple-900);
  background: var(--purple-50);
}

.nav-label {
  margin: 25px 12px 10px;
  color: #9b919f;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.nav-section + .nav-section {
  margin-top: 3px;
}

.nav-category {
  display: grid;
  grid-template-columns: 29px 1fr 20px;
  gap: 8px;
  align-items: center;
  padding: 9px 9px;
  border-radius: 10px;
}

.nav-category:hover {
  background: #faf8fb;
}

.nav-category strong {
  color: #514658;
  font-size: 0.77rem;
  font-weight: 760;
  line-height: 1.3;
}

.nav-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: var(--purple-700);
  background: var(--purple-100);
  font-size: 0.62rem;
  font-weight: 850;
}

.nav-chevron {
  color: #a59baa;
  font-size: 0.86rem;
  text-align: center;
}

.nav-pages {
  position: relative;
  display: grid;
  gap: 2px;
  margin: 2px 0 8px 22px;
  padding-left: 23px;
}

.nav-pages::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: #e7dfea;
  content: "";
}

.nav-page {
  position: relative;
  padding: 7px 10px;
  border-radius: 8px;
  color: #766b7c;
  font-size: 0.72rem;
  line-height: 1.35;
}

.nav-page::before {
  position: absolute;
  top: 13px;
  left: -23px;
  width: 9px;
  height: 1px;
  background: #e7dfea;
  content: "";
}

.nav-page:hover,
.nav-page.is-active {
  color: var(--purple-800);
  background: var(--purple-50);
}

.nav-page.is-active {
  font-weight: 780;
}

.sidebar-support {
  margin: auto 18px 22px;
  padding: 15px;
  border: 1px solid #d6ead9;
  border-radius: 14px;
  color: #315c36;
  background: #f2faf3;
}

.sidebar-support strong {
  font-size: 0.75rem;
}

.sidebar-support p {
  margin: 6px 0 0;
  color: #617664;
  font-size: 0.68rem;
  line-height: 1.5;
}

.main-content {
  min-width: 0;
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 40px;
  min-height: 410px;
  padding: 72px max(52px, calc((100% - 1080px) / 2)) 62px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 82% 20%, rgba(146, 92, 190, 0.46), transparent 26%),
    linear-gradient(135deg, var(--purple-950), var(--purple-800));
}

.home-hero::before {
  position: absolute;
  right: -220px;
  bottom: -360px;
  width: 520px;
  height: 520px;
  border: 75px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  content: "";
}

.home-hero > div:first-child {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green-600);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.15em;
}

.home-hero .eyebrow {
  color: #9beca2;
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 5.3vw, 5.2rem);
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.home-hero > div:first-child > p:not(.eyebrow) {
  max-width: 700px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.73);
  font-size: 1.02rem;
  line-height: 1.7;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.hero-metrics span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.7rem;
}

.hero-metrics strong {
  color: #fff;
}

.hero-mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-self: center;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.hero-mark::before,
.hero-mark::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.hero-mark::before {
  inset: -27px;
}

.hero-mark::after {
  inset: 25px;
}

.hero-mark img {
  width: 126px;
  height: 126px;
  object-fit: contain;
  filter: drop-shadow(0 20px 28px rgba(19, 6, 30, 0.38));
}

.home-section {
  width: min(1080px, calc(100% - 80px));
  margin: 0 auto;
  padding: 58px 0 16px;
}

.categories-section {
  padding-bottom: 80px;
}

.section-title {
  display: flex;
  gap: 30px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title h2 {
  margin: 0;
  color: var(--purple-950);
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}

.section-title > p {
  max-width: 440px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: right;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.quick-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 5px 13px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(48, 24, 69, 0.035);
  text-align: left;
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.quick-card:hover {
  border-color: #cfc0da;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.quick-card > span {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--green-700);
  background: var(--green-100);
  font-weight: 850;
}

.quick-card strong {
  color: var(--purple-900);
  font-size: 0.86rem;
  line-height: 1.35;
}

.quick-card small {
  color: var(--ink-soft);
  font-size: 0.7rem;
  line-height: 1.5;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.category-card:hover {
  border-color: #cfc0da;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.category-card-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--purple-700);
  background: var(--purple-100);
  font-size: 0.73rem;
  font-weight: 850;
}

.category-card h3 {
  margin: 0;
  color: var(--purple-900);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.category-card p {
  margin: 7px 0 10px;
  color: var(--ink-soft);
  font-size: 0.75rem;
  line-height: 1.55;
}

.category-card small {
  color: var(--green-700);
  font-size: 0.67rem;
  font-weight: 750;
}

.article-page {
  width: min(840px, calc(100% - 80px));
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 38px 0 82px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 42px;
  color: #8b808f;
  font-size: 0.7rem;
}

.breadcrumb button {
  padding: 0;
  border: 0;
  color: var(--purple-700);
  background: transparent;
  cursor: pointer;
}

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

.article-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--green-700);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.article-kicker span {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 8px;
  color: var(--purple-700);
  background: var(--purple-100);
}

.article-header h1 {
  margin: 16px 0 0;
  color: var(--purple-950);
  font-size: clamp(2.25rem, 4.2vw, 3.65rem);
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.article-header > p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.72;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 25px;
}

.article-meta span {
  display: grid;
  gap: 3px;
  min-width: 165px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #706576;
  background: #fff;
  font-size: 0.75rem;
}

.article-meta strong {
  color: #9a8fa0;
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.path-card,
.result-card,
.support-card,
.intro-note {
  display: grid;
  border-radius: 15px;
}

.path-card {
  grid-template-columns: 38px 1fr;
  gap: 13px;
  align-items: center;
  margin: 30px 0 42px;
  padding: 18px 20px;
  border: 1px solid #d9cce3;
  background: var(--purple-50);
}

.path-card > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: var(--purple-700);
  font-size: 1.1rem;
}

.path-card div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.path-card strong {
  color: var(--purple-900);
  font-size: 0.72rem;
}

.path-card code {
  overflow-x: auto;
  color: #615169;
  font: 0.79rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

.article-section {
  margin-top: 40px;
}

.article-section h2 {
  margin: 0 0 16px;
  color: var(--purple-950);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.article-section > p,
.article-section > ul {
  color: #554b5b;
  font-size: 0.91rem;
  line-height: 1.78;
}

.check-list,
.warning-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.warning-list li {
  position: relative;
  padding-left: 27px;
}

.check-list li::before {
  position: absolute;
  top: 0.35em;
  left: 0;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: var(--green-700);
  background: var(--green-100);
  font-size: 0.62rem;
  font-weight: 900;
  content: "✓";
}

.warning-list li::before {
  position: absolute;
  top: 0.12em;
  left: 2px;
  color: var(--amber);
  font-size: 0.95rem;
  font-weight: 900;
  content: "!";
}

.steps-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 13px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid #eee9f0;
  border-radius: 12px;
  background: #fff;
}

.steps-list li > span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  color: var(--purple-700);
  background: var(--purple-100);
  font-size: 0.72rem;
  font-weight: 850;
}

.steps-list p {
  margin: 4px 0 0;
  color: #554b5b;
  font-size: 0.86rem;
  line-height: 1.65;
}

.result-card {
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 38px;
  padding: 20px;
  border: 1px solid #cde5d1;
  background: #f1faf2;
}

.result-card > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: #fff;
  background: var(--green-600);
  font-weight: 900;
}

.result-card strong,
.support-card strong,
.intro-note strong {
  color: #315d36;
  font-size: 0.77rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-card p,
.support-card p,
.intro-note p {
  margin: 7px 0 0;
  color: #506c53;
  font-size: 0.84rem;
  line-height: 1.65;
}

.support-card {
  margin-top: 38px;
  padding: 20px;
  border: 1px solid #d8cbe1;
  background: var(--purple-50);
}

.support-card strong {
  color: var(--purple-800);
}

.support-card p {
  color: #66556f;
}

.article-tools {
  display: flex;
  justify-content: flex-end;
  margin-top: 26px;
}

.article-tools button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--purple-700);
  background: #fff;
  font-size: 0.73rem;
  font-weight: 750;
  cursor: pointer;
}

.article-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.article-pagination button {
  display: grid;
  gap: 5px;
  min-height: 88px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.article-pagination button:hover {
  border-color: #cdbdd8;
  box-shadow: var(--shadow-sm);
}

.article-pagination .next {
  text-align: right;
}

.article-pagination small {
  color: #978c9c;
  font-size: 0.66rem;
}

.article-pagination strong {
  color: var(--purple-800);
  font-size: 0.78rem;
  line-height: 1.4;
}

.glossary-page .article-section {
  margin-top: 44px;
}

.intro-note {
  margin: 30px 0;
  padding: 20px;
  border: 1px solid #cfe4d2;
  background: #f2faf3;
}

.glossary-list {
  display: grid;
  gap: 9px;
  margin: 0;
}

.glossary-list div {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) 1fr;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #ece6ef;
  border-radius: 12px;
  background: #fff;
}

.glossary-list dt {
  color: var(--purple-800);
  font-size: 0.82rem;
  font-weight: 800;
}

.glossary-list dd {
  margin: 0;
  color: #615666;
  font-size: 0.82rem;
  line-height: 1.55;
}

.choice-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr 180px;
}

.choice-row + .choice-row {
  border-top: 1px solid var(--line);
}

.choice-row span,
.choice-row strong {
  padding: 13px 15px;
  color: #5c5162;
  font-size: 0.78rem;
  line-height: 1.5;
}

.choice-row strong {
  border-left: 1px solid var(--line);
  color: var(--purple-800);
}

.choice-head {
  background: var(--purple-50);
}

.choice-head span {
  color: var(--purple-900);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.not-found {
  display: grid;
  place-items: start;
  width: min(760px, calc(100% - 72px));
  margin: 100px auto;
}

.not-found > span {
  color: var(--green-700);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.not-found h1 {
  margin: 12px 0;
  color: var(--purple-950);
  font-size: 2.7rem;
}

.not-found p {
  color: var(--ink-soft);
}

.not-found button {
  min-height: 44px;
  margin-top: 18px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--purple-700);
  font-weight: 750;
  cursor: pointer;
}

.site-footer {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  width: min(1080px, calc(100% - 80px));
  margin: 0 auto;
  padding: 28px 0 32px;
  border-top: 1px solid var(--line);
  color: #8c828f;
  font-size: 0.7rem;
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

.site-footer a {
  color: var(--purple-700);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-backdrop[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  :root {
    --sidebar-width: 290px;
  }

  .topbar {
    grid-template-columns: var(--sidebar-width) minmax(260px, 1fr) auto;
  }

  .public-label {
    margin-right: 18px;
  }

  .home-hero {
    grid-template-columns: minmax(0, 1fr) 160px;
    padding-right: 45px;
    padding-left: 45px;
  }

  .hero-mark {
    width: 155px;
    height: 155px;
  }

  .hero-mark img {
    width: 96px;
    height: 96px;
  }

  .home-section,
  .site-footer {
    width: calc(100% - 64px);
  }
}

@media (max-width: 840px) {
  :root {
    --topbar-height: 66px;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 0 12px;
  }

  .brand-button {
    padding: 0;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .brand > span {
    display: none;
  }

  .global-search {
    height: 42px;
    margin: 0;
  }

  .global-search kbd,
  .public-label {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--purple-800);
    background: #fff;
    font-size: 0.72rem;
    font-weight: 750;
  }

  .workspace {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 70;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    width: min(336px, 88vw);
    height: calc(100vh - var(--topbar-height));
    box-shadow: 18px 0 45px rgba(35, 16, 53, 0.18);
    transform: translateX(-104%);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 60;
    inset: var(--topbar-height) 0 0;
    display: block;
    border: 0;
    background: rgba(29, 18, 35, 0.38);
  }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: 390px;
    padding: 58px 35px;
  }

  .home-hero h1 {
    font-size: clamp(2.6rem, 11vw, 4.3rem);
  }

  .hero-mark {
    display: none;
  }

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

  .article-page {
    width: calc(100% - 54px);
  }
}

@media (max-width: 620px) {
  .global-search {
    grid-template-columns: 21px 1fr;
    padding: 0 10px;
  }

  .search-results {
    position: fixed;
    top: calc(var(--topbar-height) + 7px);
    right: 10px;
    left: 10px;
    max-height: calc(100dvh - var(--topbar-height) - 18px);
  }

  .home-hero {
    min-height: 360px;
    padding: 48px 25px;
  }

  .home-hero h1 {
    font-size: 2.65rem;
  }

  .home-hero > div:first-child > p:not(.eyebrow) {
    font-size: 0.9rem;
  }

  .home-section,
  .site-footer {
    width: calc(100% - 36px);
  }

  .section-title {
    display: block;
  }

  .section-title > p {
    margin-top: 10px;
    text-align: left;
  }

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

  .category-card {
    grid-template-columns: 42px 1fr;
    padding: 17px;
  }

  .category-card-number {
    width: 42px;
    height: 42px;
  }

  .article-page {
    width: calc(100% - 36px);
    padding-top: 25px;
  }

  .breadcrumb {
    margin-bottom: 30px;
  }

  .article-header h1 {
    font-size: 2.25rem;
  }

  .article-header > p {
    font-size: 0.9rem;
  }

  .article-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .article-meta span {
    min-width: 0;
  }

  .path-card {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 15px;
  }

  .path-card code {
    white-space: normal;
  }

  .steps-list li {
    padding: 11px;
  }

  .glossary-list div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .choice-row {
    grid-template-columns: 1fr;
  }

  .choice-row strong {
    padding-top: 0;
    border-left: 0;
  }

  .article-pagination {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }
}

@media print {
  .topbar,
  .sidebar,
  .site-footer,
  .article-tools,
  .article-pagination {
    display: none !important;
  }

  .workspace {
    display: block;
  }

  .article-page {
    width: 100%;
    padding: 0;
  }

  .article-header h1 {
    font-size: 28pt;
  }

  .path-card,
  .result-card,
  .support-card,
  .steps-list li {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* Hostinger: links and native details */

a.brand-button,
a.nav-home,
a.nav-page,
a.quick-card,
a.category-card,
.article-pagination a,
.not-found a,
.search-results > a {
  text-decoration: none;
}

.nav-section summary {
  list-style: none;
}

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

.nav-count {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  border-radius: 999px;
  color: #8c8192;
  background: #f1edf3;
  font-size: 0.6rem;
  font-weight: 800;
}

.search-results > a {
  display: grid;
  width: 100%;
  padding: 13px 16px;
  border-bottom: 1px solid #f0ebf2;
  background: #fff;
  text-align: left;
}

.search-results [hidden],
.sidebar-backdrop[hidden] {
  display: none !important;
}

.search-results > a:hover,
.search-results > a:focus {
  background: var(--purple-50);
}

.search-results > a span {
  color: var(--green-700);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search-results > a strong {
  margin-top: 3px;
  color: var(--purple-900);
  font-size: 0.82rem;
}

.search-results > a small {
  margin-top: 4px;
  overflow: hidden;
  color: #857a8a;
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-pagination a {
  display: grid;
  gap: 5px;
  min-height: 88px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.article-pagination a:hover {
  border-color: #cdbdd8;
  box-shadow: var(--shadow-sm);
}

.not-found a {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  margin-top: 18px;
  padding: 0 18px;
  border-radius: 11px;
  color: #fff;
  background: var(--purple-700);
  font-weight: 750;
}

.related-section {
  margin-top: 34px;
}

.related-section h2 {
  margin: 0 0 14px;
  color: var(--purple-900);
  font-size: 1.05rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.related-grid > .related-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-width: 0;
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: inherit;
  background: #fff;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.related-grid > .related-card:hover,
.related-grid > .related-card:focus-visible {
  border-color: var(--purple-200);
  background: var(--purple-50);
  outline: none;
  box-shadow: 0 0 0 3px rgba(98, 54, 181, 0.12);
}

.related-grid strong {
  color: var(--purple-900);
  font-size: 0.84rem;
  line-height: 1.35;
}

.related-grid span {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.69rem;
  line-height: 1.4;
  text-overflow: ellipsis;
}

@media (max-width: 700px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}
