@font-face {
  font-family: "Montserrat";
  src: url("/fonts/static/Montserrat-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/static/Montserrat-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/static/Montserrat-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #152a34;
  --muted: #64737a;
  --paper: #fffdf8;
  --canvas: #f3f0e9;
  --line: #ddd9cf;
  --navy: #102a35;
  --navy-soft: #183b47;
  --cream: #f4ecdc;
  --orange: #dc6848;
  --orange-soft: #f9e2da;
  --teal: #2c7b76;
  --teal-soft: #dff0ed;
  --code: #10262f;
  --sidebar-width: 19rem;
  --shadow: 0 18px 45px rgba(17, 42, 53, 0.09);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.72;
}

a {
  color: var(--teal);
  text-underline-offset: 0.18em;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.45rem;
  background: var(--paper);
  color: var(--navy);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

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

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--navy);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.55rem 1.45rem 1.3rem;
  color: #fff;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  position: relative;
  display: block;
  width: 2.3rem;
  height: 2.3rem;
  flex: 0 0 2.3rem;
  border-radius: 0.6rem;
  background: var(--cream);
}

.brand-mark i:first-child {
  position: absolute;
  width: 0.62rem;
  height: 1.3rem;
  top: 0.5rem;
  left: 0.58rem;
  border-radius: 1rem;
  background: var(--orange);
  transform: rotate(-21deg);
}

.brand-mark i:last-child {
  position: absolute;
  width: 0.62rem;
  height: 1.3rem;
  top: 0.5rem;
  right: 0.58rem;
  border: 2px solid var(--navy);
  border-radius: 1rem;
  transform: rotate(21deg);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.96rem;
  letter-spacing: 0.02em;
}

.brand small {
  margin-top: 0.05rem;
  color: #a9bdc4;
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 1.15rem 1rem;
  padding: 0.58rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.58rem;
  background: rgba(255, 255, 255, 0.07);
}

.search-box:focus-within {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.1);
}

.search-box svg {
  width: 1rem;
  fill: none;
  stroke: #a9bdc4;
  stroke-width: 1.8;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
}

.search-box input::placeholder {
  color: #9eb2ba;
}

.search-box kbd {
  min-width: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.28rem;
  color: #a9bdc4;
  font-family: inherit;
  font-size: 0.65rem;
  text-align: center;
}

.search-empty {
  margin: 0.25rem 1.45rem;
  color: #9eb2ba;
  font-size: 0.76rem;
}

.guide-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.1rem 1rem 1rem;
  scrollbar-color: #3d5963 transparent;
  scrollbar-width: thin;
}

.guide-nav .toc > ul {
  margin: 0;
  padding: 0;
}

.guide-nav ul {
  list-style: none;
}

.guide-nav li {
  margin: 0;
}

.guide-nav a {
  display: block;
  margin: 0.08rem 0;
  padding: 0.42rem 0.55rem;
  border-left: 2px solid transparent;
  border-radius: 0 0.34rem 0.34rem 0;
  color: #b9c8ce;
  font-size: 0.77rem;
  line-height: 1.42;
  text-decoration: none;
  transition: 140ms ease;
}

.guide-nav > .toc > ul > li > a {
  margin-top: 0.4rem;
  color: #f3f7f8;
  font-size: 0.78rem;
  font-weight: 600;
}

.guide-nav ul ul {
  margin: 0;
  padding-left: 0.65rem;
}

.guide-nav a:hover,
.guide-nav a.active {
  border-left-color: var(--orange);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.guide-nav li.search-hidden {
  display: none;
}

.sidebar-footer {
  padding: 1rem 1.4rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer a,
.sidebar-footer small {
  display: block;
}

.sidebar-footer a {
  padding: 0.16rem 0;
  color: #d7e2e6;
  font-size: 0.72rem;
  text-decoration: none;
}

.sidebar-footer a span {
  color: var(--orange);
}

.sidebar-footer small {
  margin-top: 0.55rem;
  color: #7f9aa4;
  font-size: 0.65rem;
}

.page-shell {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.page-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 3.7rem;
  align-items: center;
  justify-content: space-between;
  padding: 0 3.4rem;
  border-bottom: 1px solid rgba(21, 42, 52, 0.1);
  background: rgba(243, 240, 233, 0.9);
  backdrop-filter: blur(14px);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-header > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  display: inline-block;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #3c9d78;
  box-shadow: 0 0 0 4px rgba(60, 157, 120, 0.12);
}

.page-header nav {
  display: flex;
  gap: 1.15rem;
}

.page-header a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.guide-content {
  width: min(100% - 3rem, 64rem);
  margin: 0 auto;
  padding: 5.5rem 2rem 7rem;
}

.guide-content > h1 {
  max-width: 14ch;
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.7rem, 6vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.guide-content > h1 + p {
  max-width: 44rem;
  margin: 1.8rem 0 3rem;
  color: var(--muted);
  font-size: 1.14rem;
  line-height: 1.7;
}

.guide-content h2,
.guide-content h3,
.guide-content h4 {
  position: relative;
  color: var(--navy);
  line-height: 1.25;
  scroll-margin-top: 5rem;
}

.guide-content h2 {
  margin: 5.5rem 0 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  letter-spacing: -0.035em;
}

.guide-content h3 {
  margin: 2.8rem 0 0.9rem;
  font-size: 1.28rem;
  letter-spacing: -0.015em;
}

.guide-content h4 {
  margin: 2rem 0 0.6rem;
  font-size: 1rem;
}

.heading-anchor {
  position: absolute;
  left: -1.25rem;
  color: var(--orange);
  opacity: 0;
  text-decoration: none;
  transition: opacity 140ms ease;
}

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

.guide-content p,
.guide-content li {
  max-width: 52rem;
}

.guide-content strong {
  color: var(--navy);
  font-weight: 600;
}

.guide-content hr {
  height: 1px;
  margin: 3rem 0;
  border: 0;
  background: var(--line);
}

.guide-content blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.25rem 1rem 1.35rem;
  border: 1px solid #c6dedb;
  border-left: 4px solid var(--teal);
  border-radius: 0.55rem;
  background: var(--teal-soft);
  color: #315451;
}

.guide-content blockquote p {
  margin: 0.2rem 0;
}

.guide-content code {
  border: 1px solid #ded9cd;
  border-radius: 0.3rem;
  background: #f0ece3;
  color: #923f2a;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.87em;
  padding: 0.12em 0.33em;
}

.guide-content pre {
  position: relative;
  max-width: 100%;
  overflow: auto;
  margin: 1.25rem 0 1.8rem;
  padding: 1.2rem 1.35rem;
  border: 1px solid #24414a;
  border-radius: 0.68rem;
  background: var(--code);
  box-shadow: var(--shadow);
  color: #e8f0f2;
  line-height: 1.62;
  tab-size: 2;
}

.guide-content pre code {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.79rem;
  padding: 0;
}

.copy-code {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  padding: 0.33rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  color: #c8d7dc;
  cursor: pointer;
  font: inherit;
  font-size: 0.63rem;
  text-transform: uppercase;
}

.copy-code:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.guide-content table {
  display: table;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 1.3rem 0 2rem;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(21, 42, 52, 0.04);
}

.guide-content thead {
  background: #e9e5dc;
}

.guide-content th,
.guide-content td {
  min-width: 9rem;
  padding: 0.72rem 0.82rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.78rem;
  line-height: 1.55;
}

.guide-content th:last-child,
.guide-content td:last-child {
  border-right: 0;
}

.guide-content tr:last-child td {
  border-bottom: 0;
}

.guide-content th {
  color: var(--navy);
  font-size: 0.7rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.guide-content tbody tr:hover {
  background: #fbf8f1;
}

.guide-content details {
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--paper);
}

.guide-content summary {
  padding: 0.85rem 1rem;
  color: var(--navy);
  cursor: pointer;
  font-weight: 600;
}

.guide-content details > :not(summary) {
  margin-right: 1rem;
  margin-left: 1rem;
}

.guide-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.6rem;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  width: min(100% - 3rem, 64rem);
  margin: 0 auto;
  padding: 1.3rem 2rem 2.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.back-to-top {
  position: fixed;
  z-index: 15;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 2.7rem;
  height: 2.7rem;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 8px 20px rgba(120, 53, 35, 0.28);
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: 160ms ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-bar,
.sidebar-overlay {
  display: none;
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: min(21rem, 88vw);
  }

  .mobile-bar {
    position: sticky;
    z-index: 19;
    top: 0;
    display: flex;
    height: 3.7rem;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(21, 42, 52, 0.12);
    background: rgba(243, 240, 233, 0.95);
    backdrop-filter: blur(12px);
  }

  .mobile-brand {
    max-width: 54vw;
    overflow: hidden;
    color: var(--navy);
    font-size: 0.76rem;
    font-weight: 600;
    text-overflow: ellipsis;
    text-decoration: none;
    white-space: nowrap;
  }

  .menu-toggle {
    display: grid;
    grid-template-columns: 1rem auto;
    align-items: center;
    gap: 0 0.5rem;
    border: 0;
    background: transparent;
    color: var(--navy);
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
  }

  .menu-toggle span {
    grid-column: 1;
    display: block;
    width: 1rem;
    height: 1px;
    margin: 1.5px 0;
    background: var(--navy);
  }

  .menu-toggle b {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .sidebar {
    transform: translateX(-105%);
    transition: transform 190ms ease;
  }

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

  .sidebar-overlay {
    position: fixed;
    z-index: 18;
    inset: 0;
    display: block;
    background: rgba(11, 29, 36, 0.48);
    backdrop-filter: blur(2px);
  }

  .page-shell {
    margin-left: 0;
  }

  .page-header {
    position: static;
    padding: 0 1.2rem;
  }

  .page-header > div {
    display: none;
  }

  .page-header nav {
    width: 100%;
    justify-content: center;
  }

  .guide-content {
    width: min(100% - 1rem, 64rem);
    padding: 3.5rem 1rem 5rem;
  }

  .guide-content > h1 {
    font-size: clamp(2.35rem, 10.8vw, 3.6rem);
  }

  .guide-content h2 {
    margin-top: 4rem;
  }

  .guide-content table {
    display: block;
  }

  .heading-anchor {
    display: none;
  }

  .page-footer {
    width: calc(100% - 2rem);
    padding-right: 0;
    padding-left: 0;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  .guide-content th,
  .guide-content td {
    min-width: 8rem;
  }

  .page-footer {
    display: block;
  }

  .page-footer span {
    display: block;
  }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .mobile-bar,
  .page-header,
  .back-to-top,
  .copy-code {
    display: none !important;
  }

  .page-shell {
    margin: 0;
  }

  .guide-content {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .guide-content h2 {
    break-after: avoid;
  }

  .guide-content pre,
  .guide-content table,
  .guide-content blockquote {
    break-inside: avoid;
    box-shadow: none;
  }
}
