.wiki-body { background: #edf3f5; }
.wiki-topbar { position: fixed; }

.wiki-hero { position: relative; min-height: 650px; padding-top: 78px; display: grid; align-items: center; overflow: hidden; color: #fff; background: var(--ink); }
.wiki-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.wiki-hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,20,31,.98), rgba(4,27,42,.83) 48%, rgba(4,27,42,.22)), linear-gradient(0deg, rgba(4,20,31,.6), transparent 40%); }
.wiki-hero-content { position: relative; z-index: 2; padding-block: 95px 72px; }
.wiki-hero h1 { margin: 17px 0 18px; max-width: 900px; font-size: clamp(3.4rem, 7vw, 6.6rem); line-height: .9; letter-spacing: -.075em; }
.wiki-hero-content > p:not(.overline) { max-width: 680px; margin: 0; color: #d3e2e8; font-size: 1.08rem; line-height: 1.7; }
.wiki-search { width: min(760px, 100%); margin-top: 30px; padding: 7px; display: grid; grid-template-columns: 1fr auto; border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.wiki-search input { min-width: 0; padding: 14px 15px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.wiki-search:focus-within { outline: 3px solid rgba(94,215,241,.55); outline-offset: 3px; }
.wiki-search button { padding-inline: 21px; border: 0; border-radius: 9px; color: var(--ink); background: var(--cyan); font-weight: 900; cursor: pointer; }
.wiki-meta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.wiki-meta span { padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #bdd0d8; background: rgba(4,20,31,.45); font-size: .74rem; }

.wiki-content { padding-block: 90px 115px; }
.wiki-heading { display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 60px; }
.wiki-heading h2 { margin: 9px 0 0; font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: 1; letter-spacing: -.06em; }
.wiki-heading > p { margin: 0; color: var(--muted); line-height: 1.75; }
.featured-guides { margin-top: 38px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.featured-guide { position: relative; min-height: 280px; padding: 23px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 18px; overflow: hidden; color: #fff; background: var(--ink); text-decoration: none; box-shadow: 0 12px 40px rgba(7,29,41,.12); transition: transform .18s ease, box-shadow .18s ease; }
.featured-guide:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.featured-guide > img, .featured-shade { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured-shade { background: linear-gradient(0deg, rgba(3,18,28,.97), rgba(3,18,28,.08) 75%); }
.featured-guide > small, .featured-guide > div { position: relative; z-index: 2; }
.featured-guide > small { align-self: flex-start; padding: 6px 8px; border: 1px solid rgba(255,255,255,.24); border-radius: 7px; background: rgba(3,18,28,.55); color: var(--cyan); font-weight: 900; }
.featured-guide strong { font-size: 1.15rem; }
.featured-guide p { margin: 7px 0 0; color: #becfd6; font-size: .84rem; line-height: 1.5; }
.all-heading { margin-top: 100px; }
.result-count { justify-self: end; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; white-space: nowrap; }
.wiki-category { margin-top: 58px; }
.wiki-category > h3 { margin: 0 0 16px; color: var(--cyan-deep); font-size: .78rem; font-weight: 950; letter-spacing: .16em; text-transform: uppercase; }
.page-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.page-card { min-height: 190px; display: grid; grid-template-columns: 42% 58%; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 10px 30px rgba(7,29,41,.05); text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.page-card:hover { transform: translateY(-3px); border-color: var(--cyan); box-shadow: var(--shadow); }
.page-image { position: relative; min-height: 190px; overflow: hidden; background: var(--ink); }
.page-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.page-card:hover .page-image img { transform: scale(1.035); }
.page-image span { position: absolute; left: 14px; top: 14px; width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; background: rgba(4,20,31,.68); backdrop-filter: blur(8px); }
.page-copy { padding: 23px; display: flex; flex-direction: column; }
.page-copy strong { font-size: 1.04rem; line-height: 1.3; }
.page-copy p { margin: 8px 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.page-copy small { margin-top: auto; color: var(--cyan-deep); font-weight: 850; }
.wiki-empty { margin-top: 45px; padding: 55px 30px; border: 1px solid var(--line); border-radius: 18px; background: #fff; text-align: center; }
.wiki-empty > span { font-size: 2rem; }
.wiki-empty h3 { font-size: 1.5rem; }
.wiki-empty p { color: var(--muted); }
.wiki-empty .button { margin-top: 12px; }

.article-hero { position: relative; min-height: 570px; padding-top: 78px; display: grid; align-items: end; overflow: hidden; color: #fff; background: var(--ink); }
.article-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.article-hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,18,28,.98), rgba(3,23,36,.77) 58%, rgba(3,23,36,.18)), linear-gradient(0deg, rgba(3,18,28,.82), transparent 60%); }
.article-hero-content { position: relative; z-index: 2; padding-block: 52px; }
.article-back { display: inline-block; margin-bottom: 30px; color: #c7dbe2; text-decoration: none; font-size: .82rem; font-weight: 800; }
.article-icon { width: 56px; height: 56px; margin-bottom: 14px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 14px; background: rgba(4,20,31,.6); font-size: 1.55rem; backdrop-filter: blur(9px); }
.article-hero h1 { max-width: 900px; margin: 13px 0 12px; font-size: clamp(3.2rem, 7vw, 6.4rem); line-height: .9; letter-spacing: -.07em; text-wrap: balance; }
.article-hero-content > p:not(.overline) { max-width: 700px; margin: 0; color: #d2e1e7; font-size: 1.05rem; line-height: 1.65; }
.article-hero-content > small { display: block; margin-top: 15px; color: #9bb0b9; }
.article-layout { padding-block: 60px 100px; display: grid; grid-template-columns: 260px minmax(0, 840px); justify-content: center; gap: 55px; }
.article-sidebar { position: sticky; top: 105px; align-self: start; max-height: calc(100vh - 125px); overflow: auto; padding-right: 8px; }
.side-search { display: grid; grid-template-columns: 1fr 42px; margin-bottom: 28px; }
.side-search input { min-width: 0; padding: 11px; border: 1px solid var(--line); border-right: 0; border-radius: 9px 0 0 9px; color: var(--ink); background: #fff; }
.side-search button { border: 0; border-radius: 0 9px 9px 0; color: var(--ink); background: var(--cyan); font-weight: 950; cursor: pointer; }
.toc { padding: 20px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.toc > strong { margin-bottom: 8px; color: var(--muted); font-size: .72rem; letter-spacing: .11em; text-transform: uppercase; }
.toc a { padding: 7px 8px; border-left: 2px solid transparent; color: #5d7280; border-radius: 0 6px 6px 0; text-decoration: none; font-size: .84rem; }
.toc a:hover, .toc a.is-active { color: var(--ink); border-left-color: var(--cyan-deep); background: #e4f4f7; }
.toc-level-3 { margin-left: 10px; font-size: .78rem !important; }
.all-pages { margin-top: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.all-pages summary { cursor: pointer; color: var(--cyan-deep); font-weight: 850; }
.all-pages strong { display: block; margin: 18px 7px 6px; color: #7a8d97; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.all-pages a { display: block; padding: 7px; border-radius: 6px; color: #607581; text-decoration: none; font-size: .79rem; }
.all-pages a:hover, .all-pages a.active { color: var(--ink); background: #e4f4f7; }
.article-content { min-width: 0; padding: 46px 50px 58px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 14px 45px rgba(7,29,41,.06); }
.article-content > h1:first-child { display: none; }
.article-content h1, .article-content h2, .article-content h3, .article-content h4 { scroll-margin-top: 100px; letter-spacing: -.04em; }
.article-content h2 { margin: 58px 0 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 2rem; }
.article-content h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.article-content h3 { margin: 34px 0 10px; font-size: 1.3rem; }
.article-content p, .article-content li { color: #455b69; line-height: 1.78; }
.article-content li + li { margin-top: 7px; }
.article-content a { color: var(--cyan-deep); font-weight: 750; }
.article-content code { white-space: normal; overflow-wrap: anywhere; }
.article-content pre { position: relative; overflow: auto; padding: 22px; border-radius: 12px; color: #d7f6fd; background: var(--ink); }
.article-content pre code { padding: 0; white-space: pre; background: transparent; }
.notice { margin: 25px 0; padding: 18px 20px; border-left: 4px solid var(--cyan-deep); border-radius: 0 10px 10px 0; color: #294654; background: #e4f4f7; line-height: 1.65; }
.table-wrap { margin: 25px 0; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.article-content table { width: 100%; min-width: 610px; border-collapse: collapse; }
.article-content th, .article-content td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-content th { color: #245267; background: #e7f4f7; font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; }
.article-help { margin-top: 60px; padding: 27px; border-radius: 14px; background: var(--ink); color: #fff; }
.article-help p { margin: 7px 0 13px; color: #b5c8d0; }
.article-help a { color: var(--cyan); text-decoration: none; }
.article-not-found { min-height: 75vh; padding: 170px 25px 80px; text-align: center; }
.article-not-found h1 { margin: 10px 0; font-size: clamp(3rem, 8vw, 6rem); letter-spacing: -.06em; }
.article-not-found p { color: var(--muted); }
.article-not-found .button { margin-top: 18px; }

@media (max-width: 970px) {
  .featured-guides { grid-template-columns: repeat(2, 1fr); }
  .page-grid { grid-template-columns: 1fr; }
  .article-layout { display: block; width: min(840px, calc(100% - 28px)); }
  .article-sidebar { position: static; max-height: none; margin-bottom: 20px; padding: 0; }
  .toc { display: none; }
}

@media (max-width: 680px) {
  .wiki-hero { min-height: 620px; }
  .wiki-hero h1 { font-size: 3.5rem; }
  .wiki-search { grid-template-columns: 1fr; }
  .wiki-search button { min-height: 45px; }
  .wiki-heading { grid-template-columns: 1fr; gap: 18px; }
  .featured-guides { grid-template-columns: 1fr; }
  .featured-guide { min-height: 250px; }
  .all-heading { margin-top: 78px; }
  .result-count { justify-self: start; }
  .page-card { display: block; }
  .page-image { min-height: 180px; }
  .article-hero { min-height: 540px; }
  .article-hero h1 { font-size: 3.3rem; }
  .article-content { padding: 30px 22px 42px; border-radius: 15px; }
  .article-content h2 { font-size: 1.65rem; }
}
