:root {
  --bg: #07111f;
  --panel: #0e2035;
  --line: #203a55;
  --text: #eef8ff;
  --muted: #9ab0c5;
  --cyan: #5ee7ff;
  --blue: #7695ff;
  --gold: #f7c66c;
  --green: #65e5a3;
  --max: 1080px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background:
    radial-gradient(circle at 78% -8%, #123a5b 0, transparent 34%),
    linear-gradient(180deg, var(--bg), #060d18 68%);
  color: var(--text);
  font:
    16px/1.72 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
.shell {
  width: min(var(--max), calc(100% - 40px));
  margin: auto;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 17, 31, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(94, 231, 255, 0.15);
}
.nav {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 850;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.brand svg {
  width: 29px;
  height: 29px;
}
.brand b,
.accent {
  color: var(--cyan);
}
.navlinks {
  display: flex;
  gap: 22px;
  color: #c4d5e5;
  font-size: 0.9rem;
}
.navlinks a:hover {
  color: var(--cyan);
}
.head {
  padding: 68px 0 42px;
  max-width: 900px;
}
.crumb,
.kicker {
  color: var(--cyan);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 850;
}
.head h1 {
  font-size: clamp(2.75rem, 6vw, 4.9rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
  margin: 18px 0 24px;
}
.dek {
  font-size: 1.12rem;
  color: #b8cada;
  max-width: 780px;
  margin: 0;
}
.updated {
  margin-top: 20px;
  color: #7891a8;
  font-size: 0.82rem;
}
.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 94px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 25, 42, 0.8);
  padding: 18px;
}
.toc strong {
  display: block;
  color: var(--cyan);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.toc a {
  display: block;
  color: #9fb3c7;
  font-size: 0.86rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(32, 58, 85, 0.55);
}
.toc a:last-child {
  border: 0;
}
.toc a:hover,
.toc a:focus-visible {
  color: var(--text);
}
.toc a.is-active {
  position: relative;
  color: var(--text);
  font-weight: 800;
  padding-left: 14px;
  background: linear-gradient(90deg, rgba(94, 231, 255, 0.12), transparent);
}
.toc a.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 22px;
  border-radius: 99px;
  background: var(--cyan);
  transform: translateY(-50%);
  box-shadow: 0 0 14px rgba(94, 231, 255, 0.45);
}
.content section {
  scroll-margin-top: 90px;
  margin-bottom: 58px;
}
.content h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.55rem);
  line-height: 1.16;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
}
.content h3 {
  font-size: 1.16rem;
  margin: 0 0 7px;
}
.content p {
  color: #b5c8d9;
  margin: 0 0 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #10243a, #091827);
  padding: 21px;
}
.card p {
  font-size: 0.9rem;
  margin: 0;
}
.tag {
  display: block;
  color: var(--cyan);
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  margin-bottom: 6px;
}
.callout {
  border: 1px solid rgba(94, 231, 255, 0.3);
  background: linear-gradient(
    110deg,
    rgba(94, 231, 255, 0.09),
    rgba(109, 139, 255, 0.06)
  );
  padding: 20px;
  border-radius: 15px;
  margin: 22px 0;
  color: #bfd0df;
}
.warning {
  border-left: 3px solid var(--gold);
  background: rgba(247, 198, 108, 0.07);
  padding: 17px 19px;
  border-radius: 0 12px 12px 0;
  color: #c2ced9;
}
.table {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
  background: #091827;
}
th,
td {
  text-align: left;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--cyan);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: #0d2136;
}
td {
  color: #b9cbda;
  font-size: 0.88rem;
}
td:first-child {
  color: white;
  font-weight: 800;
}
.steps {
  counter-reset: step;
  display: grid;
  gap: 10px;
}
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px;
  background: #091827;
}
.step:before {
  content: counter(step);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(94, 231, 255, 0.13);
  color: var(--cyan);
  font-weight: 850;
}
.step p {
  margin: 2px 0 0;
  font-size: 0.9rem;
}
.related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.related a {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #0a1a2c;
}
.related a:hover {
  border-color: var(--cyan);
}
.related span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}
.related strong {
  display: block;
  margin-top: 3px;
}
footer {
  border-top: 1px solid #172c42;
  margin-top: 74px;
  padding: 34px 0 44px;
  color: #7890a7;
  font-size: 0.85rem;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.source-links {
  display: flex;
  gap: 17px;
  flex-wrap: wrap;
}
.source-links a:hover {
  color: var(--cyan);
}
.mobile-section-jump {
  display: none;
}
@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .toc {
    position: static;
  }
  .navlinks {
    display: none;
  }
  .related {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .shell {
    width: min(100% - 24px, var(--max));
  }
  .head {
    padding-top: 48px;
  }
  .head h1 {
    font-size: 2.7rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .footer-row {
    flex-direction: column;
  }
}

/* Shared mobile reading pattern for every long-form guide. */
@media (max-width: 700px) {
  html {
    scroll-behavior: auto;
  }
  .layout {
    gap: 24px;
  }
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .mobile-section-jump {
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 50;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 7px 8px 7px 14px;
    border: 1px solid rgba(94, 231, 255, 0.42);
    border-radius: 16px;
    background: rgba(7, 21, 36, 0.96);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(16px);
  }
  .mobile-section-jump span {
    color: var(--cyan);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .mobile-section-jump select {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 0 34px 0 12px;
    border: 1px solid rgba(94, 231, 255, 0.24);
    border-radius: 11px;
    background: #102b43;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 750;
  }
  body .guide-tools .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    overflow: visible;
    padding: 12px;
    border: 1px solid rgba(94, 231, 255, 0.18);
    border-radius: 16px;
    background: rgba(8, 27, 45, 0.72);
  }
  body .guide-tools .filters::before {
    content: "Filter by topic";
    align-self: center;
    padding-left: 4px;
    color: var(--cyan);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  body .guide-tools .filter {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    white-space: normal;
    transition: none;
    transform: none;
    -webkit-tap-highlight-color: transparent;
    contain: paint;
  }
  body .guide-tools .filter:first-child {
    grid-column: 2;
    grid-row: 1;
    min-height: 38px;
    color: var(--cyan);
    border-style: dashed;
  }
  body .guide-tools .filter[aria-pressed="true"] {
    color: #061522;
    border-color: var(--cyan);
    background: var(--cyan);
    box-shadow: 0 8px 22px rgba(94, 231, 255, 0.16);
  }
  body .guide-tools .filter:active {
    transform: none;
  }
  body .guide-tools .filter:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
  }
  .toc {
    position: static;
    top: auto;
    z-index: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 10px;
    overflow: visible;
    overscroll-behavior: auto;
    scroll-snap-type: none;
    scroll-padding-inline: 0;
    scrollbar-width: none;
    border-radius: 14px;
    background: rgba(7, 21, 36, 0.96);
    box-shadow: none;
  }
  .toc::-webkit-scrollbar {
    display: none;
  }
  .toc strong {
    display: none;
  }
  .toc a,
  .toc a:last-child {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 10px;
    border: 1px solid rgba(94, 231, 255, 0.18);
    border-radius: 999px;
    background: rgba(12, 38, 60, 0.72);
    text-align: center;
    white-space: normal;
    scroll-snap-align: none;
  }
  .toc a.is-active {
    padding-left: 12px;
    color: #071524;
    background: var(--cyan);
    border-color: var(--cyan);
  }
  .toc a.is-active::before {
    display: none;
  }
  .content section {
    scroll-margin-top: 82px;
    margin-bottom: 42px;
  }
  .content h2 {
    font-size: clamp(1.65rem, 8vw, 2.15rem);
    overflow-wrap: anywhere;
  }
  .table.mobile-card-table,
  .table.mobile-key-value {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }
  .mobile-card-table table,
  .mobile-card-table tbody,
  .mobile-card-table tr,
  .mobile-card-table td,
  .mobile-key-value table,
  .mobile-key-value tbody,
  .mobile-key-value tr {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .mobile-card-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .mobile-card-table tbody,
  .mobile-key-value tbody {
    display: grid;
    gap: 12px;
  }
  .mobile-card-table tr,
  .mobile-key-value tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #091827;
  }
  .mobile-card-table td {
    display: grid;
    grid-template-columns: minmax(88px, 34%) minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    overflow-wrap: anywhere;
    border-bottom: 1px solid var(--line);
  }
  .mobile-card-table td::before {
    content: attr(data-label);
    color: var(--cyan);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .mobile-card-table td:last-child {
    border-bottom: 0;
  }
  .mobile-key-value tr {
    display: grid;
    grid-template-columns: minmax(104px, 34%) minmax(0, 1fr);
  }
  .mobile-key-value td {
    min-width: 0;
    padding: 12px 14px;
    overflow-wrap: anywhere;
    border: 0;
  }
  .mobile-key-value td:first-child {
    color: var(--cyan);
    font-size: 0.78rem;
    font-weight: 800;
  }
}
