:root {
  --canvas: #F9FAFB;
  --surface: #FFFFFF;
  --surface-soft: #F4F4F5;
  --ink: #18181B;
  --secondary: #71717A;
  --muted: #94A3B8;
  --border: rgba(226, 232, 240, 0.72);
  --line: #E4E4E7;
  --success: #15803D;
  --warning: #B45309;
  --danger: #E11D48;
  --sidebar-width: 17.5rem;
  --topbar-height: 4rem;
  --shadow-soft: 0 18px 48px rgba(24, 24, 27, 0.06);
}

@font-face {
  font-family: "SlideReadyFA";
  src: url("./fa-solid-900.ttf") format("truetype");
  font-display: block;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
summary {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

figure,
h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

svg,
img {
  display: block;
}

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

.guide-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.97);
  transform: translateX(0);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease;
}

.sidebar-head {
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding: 0.625rem 0.75rem 0.625rem 1rem;
}

.guide-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.625rem;
}

.guide-brand img {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.guide-brand span {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.guide-brand strong {
  font-size: 0.875rem;
  font-weight: 800;
}

.guide-brand small {
  margin-top: 0.1875rem;
  color: var(--secondary);
  font-size: 0.6875rem;
  font-weight: 600;
}

.icon-button,
.lang-button,
.sidebar-rail,
.back-to-top {
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
}

.icon-button {
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  border-radius: 0.5rem;
}

.icon-button svg,
.sidebar-rail svg,
.back-to-top svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.guide-nav {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem 2rem;
  scrollbar-color: #D4D4D8 transparent;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  overflow-anchor: none;
}

.nav-group {
  padding: 0.375rem 0;
}

.nav-group summary {
  list-style: none;
  padding: 0.5rem 0.625rem;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.nav-links {
  display: grid;
  gap: 0.125rem;
}

.nav-link,
.nav-tool-link {
  min-width: 0;
  border-radius: 0.375rem;
  color: var(--secondary);
  overflow-wrap: anywhere;
}

.nav-link {
  display: flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 650;
}

.nav-link.active,
.nav-topic.active > .nav-topic-row .nav-link {
  background: var(--ink);
  color: var(--surface);
}

.nav-link-external svg {
  width: 0.875rem;
  height: 0.875rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.nav-topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.25rem;
  align-items: center;
}

.nav-topic-toggle {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
}

.nav-topic-toggle svg {
  width: 0.875rem;
  height: 0.875rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transform: rotate(0deg);
  transition: transform 180ms ease;
}

.nav-topic.open .nav-topic-toggle svg {
  transform: rotate(90deg);
}

.nav-tool-links {
  display: none;
  padding: 0.25rem 0 0.5rem 0.75rem;
}

.nav-topic.open .nav-tool-links {
  display: grid;
}

.nav-tool-link {
  position: relative;
  padding: 0.375rem 0.5rem 0.375rem 1rem;
  font-size: 0.72rem;
  font-weight: 580;
  line-height: 1.35;
}

.nav-tool-link::before {
  position: absolute;
  top: 0.75rem;
  left: 0.25rem;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 9999px;
  background: #D4D4D8;
  content: "";
}

.nav-tool-link.active {
  color: var(--ink);
  font-weight: 750;
}

.nav-tool-link.active::before {
  background: var(--success);
}

.guide-workspace {
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.guide-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(249, 250, 251, 0.94);
  padding: 0.625rem clamp(1rem, 3vw, 3rem);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.guide-breadcrumb {
  min-width: 0;
  color: var(--secondary);
  font-size: 0.75rem;
  white-space: nowrap;
}

.guide-breadcrumb span {
  padding-inline: 0.25rem;
  color: var(--muted);
}

.guide-breadcrumb b {
  color: var(--ink);
  font-weight: 750;
}

.reading-progress-label {
  color: var(--secondary);
  font-family: "Geist Mono", "JetBrains Mono", monospace;
  font-size: 0.6875rem;
  font-weight: 600;
}

.lang-button {
  min-width: 3rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 800;
}

.reading-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
}

.mobile-menu {
  display: none;
}

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

.guide-hero {
  display: grid;
  min-height: 25rem;
  align-items: end;
  border-bottom: 1px solid var(--border);
  padding: clamp(4rem, 9vw, 8rem) clamp(1rem, 4vw, 4rem) clamp(3rem, 6vw, 5rem);
}

.hero-copy {
  width: min(52rem, 100%);
}

.hero-copy h1 {
  max-width: 13ch;
  font-size: clamp(2.75rem, 6vw, 5.5rem);
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.02;
}

.hero-copy > p {
  max-width: 56ch;
  margin-top: 1.25rem;
  color: var(--secondary);
  font-size: clamp(1rem, 1.4vw, 1.1875rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  min-height: 2.875rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 750;
}

.button-dark {
  background: var(--ink);
  color: var(--surface);
}

.guide-content {
  width: min(100%, 96rem);
  margin-inline: auto;
  padding: 0 clamp(1rem, 3vw, 3rem) 8rem;
}

.guide-topic {
  scroll-margin-top: calc(var(--topbar-height) + 1rem);
  padding-top: clamp(3rem, 6vw, 6rem);
}

.topic-head {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding-bottom: 1.5rem;
}

.topic-index {
  padding-top: 0.375rem;
  color: var(--muted);
  font-family: "Geist Mono", "JetBrains Mono", monospace;
  font-size: 0.6875rem;
  font-weight: 650;
}

.topic-head h2 {
  font-size: clamp(1.875rem, 3vw, 3rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
}

.topic-head p {
  max-width: none;
  margin-top: 0.75rem;
  color: var(--secondary);
  font-size: 0.9375rem;
}

.guide-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.guide-facts li {
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--surface);
  color: var(--secondary);
  font-size: 0.6875rem;
  font-weight: 650;
  line-height: 1.2;
  padding: 0.4375rem 0.625rem;
}

.tool-list {
  border-top: 1px solid var(--line);
}

.guide-entry {
  display: grid;
  grid-template-columns: minmax(18rem, 0.82fr) minmax(26rem, 1.18fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--topbar-height) + 1rem);
  padding: clamp(2rem, 4vw, 4rem) 0;
}

.tool-entry {
  grid-template-areas:
    "title steps"
    "purpose steps";
  row-gap: 1.25rem;
}

.tool-entry.has-visual {
  grid-template-areas:
    "title ."
    "visual steps"
    "purpose steps";
}

.tool-entry > .tool-entry-head {
  grid-area: title;
}

.tool-entry > .guide-visual {
  grid-area: visual;
}

.tool-entry > .guide-explanation {
  grid-area: purpose;
}

.tool-entry > .guide-steps {
  grid-area: steps;
}

.topic-overview {
  border-top: 1px solid var(--line);
}

.guide-explanation,
.guide-steps {
  min-width: 0;
}

.tool-entry-head {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.875rem;
  align-items: center;
}

.guide-visual {
  position: relative;
  width: min(100%, 28rem);
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--surface);
}

.guide-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.guide-visual-action {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  gap: 0.25rem;
  align-items: center;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  box-shadow: 0 0.25rem 0.875rem rgba(113, 113, 122, 0.12);
  transform: translate(-50%, -50%);
}

.guide-visual-action .tool-icon {
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 0.375rem;
}

.guide-visual-action .tool-icon img {
  width: 1.25rem;
  height: 1.25rem;
}

.topic-visual {
  width: 100%;
  margin: 0;
}

.tool-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
}

.tool-icon img {
  width: 1.625rem;
  height: 1.625rem;
  object-fit: contain;
}

.tool-icon.symbol svg {
  width: 1.375rem;
  height: 1.375rem;
}

.tool-icon.fa-icon {
  color: var(--secondary);
  font-family: "SlideReadyFA", sans-serif;
  font-size: 1rem;
  font-weight: 900;
}

.tool-icon.fallback {
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 800;
}

.entry-kicker {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
}

.guide-explanation h3,
.tool-entry > .tool-entry-head h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.625rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.18;
}

.purpose-block {
  margin-top: 1.5rem;
}

.tool-entry .purpose-block {
  margin-top: 0;
}

.purpose-block > strong {
  display: block;
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
}

.purpose-block p,
.topic-overview-copy {
  margin-top: 0.5rem;
  color: var(--secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

.guide-explanation > .guide-facts {
  margin-top: 1.25rem;
}

.guide-callout {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  padding: 0.875rem;
}

.guide-explanation .guide-callout {
  margin-top: 1rem;
}

.guide-callout.warning {
  border-color: rgba(180, 83, 9, 0.24);
  background: #FFFBEB;
}

.guide-callout.success {
  border-color: rgba(21, 128, 61, 0.22);
  background: #F0FDF4;
}

.notice-mark {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border-radius: 9999px;
  background: var(--surface-soft);
  color: var(--secondary);
}

.notice-mark.warning {
  background: #FEF3C7;
  color: var(--warning);
}

.notice-mark.success {
  background: #DCFCE7;
  color: var(--success);
}

.notice-mark svg {
  width: 0.875rem;
  height: 0.875rem;
}

.notice-copy {
  display: grid;
  gap: 0.25rem;
}

.notice-copy strong {
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 800;
}

.notice-copy span {
  color: var(--secondary);
  font-size: 0.75rem;
  line-height: 1.55;
}

.guide-steps > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}

.guide-steps > header span {
  font-size: 0.75rem;
  font-weight: 800;
}

.guide-steps > header b {
  display: grid;
  min-width: 1.625rem;
  height: 1.625rem;
  place-items: center;
  border-radius: 9999px;
  background: var(--ink);
  color: var(--surface);
  font-family: "Geist Mono", "JetBrains Mono", monospace;
  font-size: 0.625rem;
}

.step-context {
  border-bottom: 1px solid var(--border);
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.55;
  padding: 0.875rem 0;
}

.guide-attention > header {
  justify-content: flex-start;
}

.attention-list {
  padding: 0;
  list-style: none;
}

.attention-list li {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 1rem 0;
}

.attention-list li + li {
  border-top: 1px solid var(--border);
}

.attention-list strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 780;
}

.attention-list p {
  color: #52525B;
  font-size: 0.8125rem;
  line-height: 1.65;
}

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

.step-list li {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.875rem;
  min-height: 3.25rem;
  padding: 1rem 0;
}

.step-list li + li {
  border-top: 1px solid var(--border);
}

.step-number {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid #D4D4D8;
  border-radius: 9999px;
  background: var(--surface);
  color: var(--ink);
  font-family: "Geist Mono", "JetBrains Mono", monospace;
  font-size: 0.625rem;
  font-weight: 700;
}

.step-list strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 780;
}

.step-list p {
  color: #52525B;
  font-size: 0.8125rem;
  line-height: 1.65;
}

.sidebar-rail {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 35;
  display: none;
  width: 3.25rem;
  height: 2.5rem;
  grid-template-columns: 1.25rem 0.75rem;
  gap: 0.25rem;
  border-radius: 0.5rem;
  opacity: 0;
  transform: translateX(-0.5rem);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), opacity 160ms ease;
}

.sidebar-rail img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

.sidebar-scrim {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: none;
  border: 0;
  background: rgba(24, 24, 27, 0.38);
  opacity: 0;
}

.guide-shell.sidebar-collapsed .guide-sidebar {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

.guide-shell.sidebar-collapsed .guide-workspace {
  margin-left: 0;
}

.guide-shell.sidebar-collapsed .sidebar-rail {
  display: grid;
  opacity: 1;
  transform: translateX(0);
}

@media (min-width: 1051px) {
  .guide-shell.sidebar-collapsed .guide-topbar {
    padding-left: 5rem;
  }
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition: transform 200ms ease, opacity 160ms ease;
}

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

@media (max-width: 1180px) {
  .guide-entry {
    grid-template-columns: minmax(16rem, 0.78fr) minmax(23rem, 1.22fr);
    gap: clamp(1.5rem, 4vw, 3rem);
  }
}

@media (max-width: 1050px) {
  .guide-sidebar {
    width: min(19rem, calc(100vw - 3rem));
    opacity: 0;
    pointer-events: none;
    transform: translateX(-100%);
  }

  .guide-workspace,
  .guide-shell.sidebar-collapsed .guide-workspace {
    margin-left: 0;
  }

  .sidebar-collapse,
  .sidebar-rail {
    display: none !important;
  }

  .mobile-menu {
    display: grid;
  }

  .guide-shell.mobile-sidebar-open .guide-sidebar {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .guide-shell.mobile-sidebar-open .sidebar-scrim {
    display: block;
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .back-to-top {
    display: none;
  }

  .guide-topbar {
    padding-inline: 0.75rem;
  }

  .guide-breadcrumb {
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .reading-progress-label {
    display: none;
  }

  .guide-hero {
    min-height: 22rem;
    padding: 5rem 1rem 3rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.5rem, 13vw, 4rem);
    overflow-wrap: anywhere;
  }

  .guide-content {
    padding-inline: 1rem;
  }

  .topic-head {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.5rem;
  }

  .guide-entry {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .tool-entry,
  .tool-entry.has-visual {
    grid-template-areas:
      "title"
      "visual"
      "purpose"
      "steps";
  }

  .tool-entry:not(.has-visual) {
    grid-template-areas:
      "title"
      "purpose"
      "steps";
  }

  .step-list {
    display: block;
  }

  .step-list li:nth-child(2) {
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 430px) {
  .guide-breadcrumb {
    display: none;
  }

  .tool-entry-head {
    grid-template-columns: 2.75rem minmax(0, 1fr);
  }

  .tool-icon {
    width: 2.75rem;
    height: 2.75rem;
  }

  .guide-facts {
    display: grid;
  }

  .guide-facts li {
    width: fit-content;
  }
}

@media print {
  .guide-sidebar,
  .guide-topbar,
  .sidebar-rail,
  .sidebar-scrim,
  .back-to-top,
  .hero-actions {
    display: none !important;
  }

  .guide-workspace {
    margin-left: 0;
  }

  .guide-hero {
    min-height: auto;
    padding: 2rem 0;
  }

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

  .guide-entry {
    break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
