/* Layout */
a { text-decoration: none !important; }
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 16px;
  border-right: 1px solid #e0e0e0;
  background: white;
  z-index: 10;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }
.main {
  margin-left: 260px;
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 40px 24px 80px;
}
.tutorial-content {
  max-width: 1000px;
  width: 100%;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 40px;
}

/* Navigation buttons */
.hlae-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
}
.hlae-nav-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  transition: .2s;
}
.hlae-nav-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}
.hlae-nav-btn:not(.active) {
  background: #f0f0f0;
  color: #666;
}
.hlae-nav-btn:not(.active):hover {
  background: #e0e0e0;
}

/* Back link */
.hlae-back {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  color: #666;
  transition: .15s;
}
.hlae-back:hover {
  background: #eee;
  text-decoration: none;
}

/* Sidebar */
.sidebar h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #999;
  margin: 20px 0 8px;
  font-weight: 600;
}
.sidebar h3:first-child { margin-top: 0; }
.sidebar a {
  display: block;
  padding: 4px 8px;
  font-size: 13px;
  color: #666;
  border-radius: 4px;
  transition: .15s;
}
.sidebar a:hover,
.sidebar a.active {
  color: #333;
  background: rgba(0,0,0,.05);
  text-decoration: none;
}

/* Search */
.search-wrap { position: relative; margin-bottom: 16px; }
.search-wrap input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: .2s;
}
.search-wrap input:focus { border-color: #667eea; }
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  display: none;
}
.search-clear:hover { color: #333; }
.search-wrap::before {
  content: "\1F50D";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: .5;
}

/* Accordion */
.acc-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  border-radius: 4px;
  transition: .15s;
  user-select: none;
}
.acc-header:hover {
  color: #333;
  background: rgba(0,0,0,.05);
}
.acc-header .arrow { transition: transform .2s; font-size: 10px; }
.acc-header.open .arrow { transform: rotate(90deg); }
.acc-body { display: none; padding-left: 16px; }
.acc-body.open { display: block; }
.acc-body a { font-size: 12px; padding: 3px 8px; }

/* Headings */
h1 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}
h3 { font-size: 18px; font-weight: 600; margin: 28px 0 12px; }
h4 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
.subtitle { color: #666; font-size: 14px; margin-bottom: 32px; }
.subtitle a { font-size: 13px; }

/* Command cards */
.cmd {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  display: inline-block;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: 14px;
  padding: 6px 12px;
  cursor: pointer;
  transition: .1s;
  position: relative;
  padding-right: 44px;
  margin: 2px 0;
}
.cmd:active { transform: scale(.97); }
.cmd::after {
  content: "\1F4CB";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: .4;
}
.cmd:hover::after { opacity: .8; }
.cmd-block {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 12px 0;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
  white-space: pre-wrap;
}
.cmd-block .cmd {
  margin: 0;
  padding: 0 4px;
  background: none;
  border: none;
  border-radius: 0;
  font-size: inherit;
}
.cmd-block .cmd::after { display: none; }
.cmd-block .comment { color: #999; }

/* Info boxes */
.info {
  background: rgba(74,222,128,.1);
  border: 1px solid rgba(74,222,128,.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 14px;
}
.warn {
  background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 14px;
}

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
th, td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid #e0e0e0;
}
th {
  color: #999;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
tr:hover td { background: rgba(0,0,0,.02); }

/* Lists */
ul, ol { padding-left: 20px; margin: 8px 0; }
li { margin: 4px 0; }

/* Copy notification */
.copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #667eea;
  color: #fff;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: .3s;
  pointer-events: none;
  z-index: 999;
}
.copy-toast.show { opacity: 1; }

/* FAQ */
.faq-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: .2s;
}
.faq-item:hover {
  border-color: #667eea;
}
.faq-q {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: .15s;
  user-select: none;
}
.faq-q:hover {
  background: rgba(0,0,0,.02);
}
.faq-q .num {
  color: #667eea;
  font-weight: 700;
  min-width: 28px;
}
.faq-q .arrow {
  margin-left: auto;
  transition: transform .2s;
  font-size: 12px;
  color: #999;
}
.faq-q.open .arrow {
  transform: rotate(180deg);
}
.faq-a {
  display: none;
  padding: 0 20px 20px 60px;
  font-size: 15px;
  color: #666;
  line-height: 1.8;
}
.faq-a.open {
  display: block;
}
.faq-a p {
  margin: 8px 0;
}
.faq-a img {
  max-width: 100%;
  border-radius: 8px;
  margin: 12px 0;
  display: block;
}
.faq-a ul, .faq-a ol {
  padding-left: 20px;
  margin: 8px 0;
}
.faq-a li {
  margin: 4px 0;
}

/* Mobile */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
}
