.guide-main { max-width: 1120px; }
.guide-topbar { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.guide-lang, .guide-crumb { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.guide-lang a { padding: 8px 11px; border-radius: 8px; color: var(--muted); font-size: .875rem; font-weight: 680; }
.guide-lang a[aria-current] { background: #f5e3da; color: #70321e; }
.guide-crumb { margin: 25px 0 17px; color: var(--muted); font-size: .875rem; }
.guide-crumb > :not(:first-child)::before { content: "/"; color: #8a817a; margin-right: 8px; }
.guide-crumb a:hover, .guide-next > :last-child:hover { text-decoration: underline; }
.guide-hero {
  background: radial-gradient(ellipse at 100% 0%, #573931, transparent 64%), #1b1e23;
  color: #faf9f6; padding: clamp(24px, 5vw, 57px); border-radius: 24px;
}
.guide-hero h1 { font-size: clamp(2rem, 5vw, 3.9rem); letter-spacing: -.063em; line-height: 1.05; max-width: 26ch; text-wrap: balance; }
.guide-hero .source-icon { margin-bottom: 18px; }
.guide-hero p { color: #e4d9d6; margin-top: 15px; max-width: 68ch; line-height: 1.65; font-size: 1.0625rem; }
.guide-primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 47px; text-align: center;
  padding: 10px 18px; border-radius: 10px; background: var(--accent); color: #231b1b; font-weight: 760;
}
.guide-primary:hover { background: #ff9b81; }
.guide-hero .guide-primary { margin-top: 22px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.guide-card {
  display: grid; grid-template-columns: 48px 1fr; column-gap: 13px; row-gap: 10px; align-content: start;
  background: #fff; border: 1px solid var(--line); min-height: 125px; border-radius: 14px; padding: 16px;
}
.guide-card:hover { border-color: #d88164; }
.guide-card strong, .guide-card span span { display: block; }
.guide-card strong { margin-bottom: 4px; }
.guide-card span span { font-size: .925rem; line-height: 1.42; color: var(--muted); }
.guide-card-link { grid-column: 2; font-size: .875rem; font-weight: 720; color: #91351a; }
.guide-steps { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(23px, 4vw, 48px); align-items: start; }
.guide-main h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.17; letter-spacing: -.037em; }
.guide-steps ol { display: grid; gap: 20px; margin: 20px 0 0; padding: 0; list-style: none; }
.guide-steps li { display: grid; grid-template-columns: 33px 1fr; gap: 12px; }
.guide-step-number { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 9px; font-weight: 800; background: #f7e4d9; color: #87371e; }
.guide-steps h3 { font-size: 1.0625rem; margin-top: 3px; }
.guide-steps p, .guide-example { line-height: 1.55; color: var(--muted); margin-top: 6px; }
.guide-example { font-size: .875rem; }
.guide-example code { display: block; color: var(--ink); overflow-wrap: anywhere; }
.guide-figure { margin: 0; min-width: 0; }
.guide-figure img { display: block; width: 100%; height: auto; border-radius: 15px; border: 1px solid var(--line); }
.guide-figure figcaption { margin: 9px 0 0; color: var(--muted); line-height: 1.4; font-size: .875rem; }
.guide-advice { background: #f5ece5; border: 1px solid #ecdfd6; border-radius: 14px; padding: clamp(17px, 3vw, 26px); }
.guide-advice p { color: #50484a; max-width: 79ch; line-height: 1.65; margin-top: 9px; }
.guide-help, .guide-next { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.guide-help { color: var(--muted); line-height: 1.5; }
.guide-help a { color: #943a22; text-decoration: underline; }
.guide-next > :last-child { color: #91351a; font-weight: 670; }
.guide-related h2 { margin-bottom: 15px; }

@media (max-width: 850px) {
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .guide-steps { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .guide-grid { grid-template-columns: 1fr; }
  .guide-crumb { margin-top: 19px; }
  .guide-card { min-height: 0; }
  .guide-hero { border-radius: 18px; }
}

.guide-language { position: relative; }
.guide-language summary {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-weight: 680;
}
.guide-language summary::-webkit-details-marker { display: none; }
.guide-language .guide-lang {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 2;
  width: min(360px, 84vw); max-height: 62vh; overflow: auto; padding: 9px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 25px #251a181c;
}
.guide-language .guide-lang a:hover { background: #f5e3da; }
.guide-demo {
  display: grid; justify-items: start; gap: 13px; padding: clamp(18px, 4vw, 40px);
  background: #fff; border: 1px solid var(--line); border-radius: 15px;
}
.guide-demo code { max-width: 100%; width: 100%; border: 1px solid #cf7559; border-radius: 8px; padding: 10px; overflow-wrap: anywhere; }
.guide-demo-find, .guide-demo-action { padding: 10px 15px; border-radius: 8px; font-weight: 700; }
.guide-demo-find { background: var(--accent); color: var(--ink); }
.guide-demo-action { background: var(--ink); color: #fff; }
.guide-topics ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 9px 16px; padding: 0; margin: 16px 0 0; list-style: none; }
.guide-topics a { display: block; height: 100%; padding: 13px 15px; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-weight: 670; line-height: 1.4; }
.guide-topics a:hover { border-color: #d88164; }
.guide-topic-body section + section { margin-top: 23px; }
.guide-topic-body h2 { font-size: 1.28rem; }
.guide-topic-body p { margin-top: 8px; line-height: 1.65; color: var(--muted); }
[dir="rtl"] .guide-crumb > :not(:first-child)::before { margin-right: 0; margin-left: 8px; }
