/* TableGIS 功能说明页 —— 与 /docs/ 文档站同一套布局与主色（#1677FF） */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background: #f8f9fa;
    line-height: 1.75;
    font-size: 15.5px;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
code {
    font-family: "SF Mono", Consolas, Monaco, monospace;
    background: #f0f2f5; padding: 2px 6px; border-radius: 5px;
    font-size: 0.9em; color: #c0392b;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.wrapper { display: flex; max-width: 1280px; margin: 0 auto; padding: 0 20px; align-items: flex-start; }

/* ── 文档侧栏（与 /docs/ 一致）── */
.sidebar {
    width: 240px; flex-shrink: 0;
    position: sticky; top: 64px; height: calc(100vh - 64px);
    overflow-y: auto; padding: 30px 16px 32px 0;
    border-right: 1px solid #e8e8e8; margin-right: 34px;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.sidebar h3 {
    font-size: 12px; font-weight: 600; color: #999;
    letter-spacing: .04em; margin: 22px 0 6px; padding-left: 12px;
}
.sidebar h3:first-child { margin-top: 0; }
.sidebar a {
    display: block; padding: 6px 12px; font-size: 13.5px; color: #555;
    border-left: 2px solid transparent; border-radius: 0 4px 4px 0;
    transition: color .15s, background .15s, border-color .15s;
    line-height: 1.5;
}
.sidebar a:hover { border-left-color: #1677FF; color: #1677FF; background: #f5f8ff; }
.sidebar a.active { border-left-color: #1677FF; color: #1677FF; font-weight: 500; background: #f5f8ff; }
.sidebar a.sub { padding-left: 24px; font-size: 13px; }

.main { flex: 1; min-width: 0; max-width: 860px; padding: 0 0 80px; }

/* === Header === */
.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.88);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid #ecedf0;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; max-width: 1280px; margin: 0 auto; padding: 0 20px;
}
.logo { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.logo-img { width: 28px; height: 28px; border-radius: 50%; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 14px; color: #5a5f66; }
.nav a { transition: color .18s; }
.nav a:hover { color: #1677FF; }
.nav .nav-cta {
    padding: 7px 16px; border-radius: 999px;
    background: #1677FF;
    color: #fff; font-weight: 600; font-size: 13px;
    box-shadow: 0 1px 3px rgba(22,119,255,.24);
}
.nav .nav-cta:hover { color: #fff; opacity: .9; }

/* === Breadcrumb === */
.crumb {
    font-size: 13px; color: #8a9099; padding: 22px 0 0;
}
.crumb a { color: #8a9099; }
.crumb a:hover { color: #1677FF; }
.crumb span { margin: 0 6px; opacity: .5; }

/* === Hero === */
.hero { padding: 18px 0 6px; }
.hero h1 {
    font-size: 30px; line-height: 1.28; letter-spacing: -0.02em;
    font-weight: 700; margin-bottom: 14px;
}
.hero .lead {
    font-size: 16px; color: #4a5058; line-height: 1.75;
    max-width: 680px;
}
.hero .lead strong { color: #1a1a1a; font-weight: 600; }
.tagrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag {
    font-size: 12px; padding: 4px 11px; border-radius: 999px;
    background: #f0f5ff; color: #1d4ed8; border: 1px solid #dbe6ff;
}

/* === Screenshot === */
.shot-wrap {
    margin: 26px 0 4px;
    border-radius: 16px; overflow: hidden;
    border: 1px solid #e6e8ec;
    background: #fff;
    box-shadow: 0 2px 8px rgba(16,24,40,.05), 0 12px 32px -12px rgba(16,24,40,.09);
}
.shot-wrap img { width: 100%; height: auto; }
.shot-cap {
    font-size: 12.5px; color: #8a9099; text-align: center;
    padding: 10px 16px; border-top: 1px solid #f0f1f4; background: #fcfcfd;
}

/* === Sections === */
section { margin: 42px 0; }
h2 {
    font-size: 21px; font-weight: 700; letter-spacing: -0.01em;
    margin-bottom: 16px; display: flex; align-items: center; gap: 9px;
}
h2::before {
    content: ""; width: 3px; height: 17px; border-radius: 2px;
    background: #1677FF; flex: none;
}
p + p { margin-top: 12px; }
.body-text { color: #444a52; line-height: 1.85; font-size: 15.5px; }

/* === Steps === */
.steps { list-style: none; counter-reset: s; }
.steps li {
    counter-increment: s; position: relative;
    padding: 0 0 20px 42px; color: #3d434a; line-height: 1.85; font-size: 15.5px;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
    content: counter(s);
    position: absolute; left: 0; top: 1px;
    width: 26px; height: 26px; border-radius: 50%;
    background: #1677FF;
    color: #fff; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 4px rgba(22,119,255,.25);
}
.steps li::after {
    content: ""; position: absolute; left: 13px; top: 30px; bottom: 6px;
    width: 1px; background: #e8eaee;
}
.steps li:last-child::after { display: none; }
.steps li b { color: #1a1a1a; font-weight: 600; }

/* === Notes === */
.notes {
    background: #f7f8fa; border: 1px solid #ecedf0;
    border-radius: 12px; padding: 18px 20px;
}
.notes-t { font-size: 13px; font-weight: 700; color: #6b7280; letter-spacing: .02em; margin-bottom: 10px; }
.notes ul { list-style: none; }
.notes li {
    font-size: 14.5px; color: #4a5058; line-height: 1.75;
    padding-left: 16px; position: relative;
}
.notes li + li { margin-top: 7px; }
.notes li::before {
    content: "·"; position: absolute; left: 4px; top: 0;
    color: #1677FF; font-weight: 700; font-size: 20px; line-height: 1.2;
}

/* === Why / boundary === */
.why {
    border-radius: 14px; padding: 22px 24px;
    background: #f7f8fa;
    border: 1px solid #ecedf0;
}
.why p { color: #40464e; line-height: 1.85; font-size: 15px; }

/* === CTA === */
.cta {
    text-align: center; padding: 34px 24px;
    border-radius: 16px; background: #fff;
    border: 1px solid #e9eaee;
    box-shadow: 0 1px 3px rgba(16,24,40,.04), 0 14px 34px -16px rgba(16,24,40,.10);
}
.cta h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.cta p { font-size: 14px; color: #6b7280; margin-bottom: 20px; }
.btn {
    display: inline-block; padding: 12px 30px; border-radius: 999px;
    background: #1677FF;
    color: #fff; font-weight: 600; font-size: 15px;
    box-shadow: 0 2px 10px rgba(22,119,255,.28);
    transition: transform .16s, box-shadow .16s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(22,119,255,.34); }
.btn-sub { display: block; font-size: 12.5px; color: #9aa0a8; margin-top: 13px; }

/* === Related === */
.related { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rel-card {
    display: block; padding: 15px 17px; border-radius: 12px;
    background: #fff; border: 1px solid #e9eaee;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
.rel-card:hover {
    border-color: #cfe4ee; transform: translateY(-1px);
    box-shadow: 0 4px 14px -4px rgba(16,24,40,.10);
}
.rel-card b { display: block; font-size: 14px; font-weight: 600; color: #1a1a1a; margin-bottom: 4px; }
.rel-card span { font-size: 12.5px; color: #8a9099; line-height: 1.5; display: block; }

/* === Footer === */
.footer {
    margin-top: 54px; padding: 28px 0 40px;
    border-top: 1px solid #eceef1; font-size: 13px; color: #9aa0a8;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; }
.footer a:hover { color: #1677FF; }

@media (max-width: 1000px) {
    .sidebar { display: none; }
    .wrapper { display: block; }
    .main { max-width: 860px; margin: 0 auto; }
}

@media (max-width: 640px) {
    body { font-size: 14.5px; }
    .container { padding: 0 18px; }
    .wrapper { padding: 0 18px; display: block; }
    .sidebar { display: none; }
    .main { max-width: none; }
    .header-inner { padding: 0 18px; height: 56px; }
    .nav { gap: 14px; font-size: 13px; }
    .nav a:not(.nav-cta) { display: none; }
    .hero h1 { font-size: 24px; }
    .hero .lead { font-size: 15px; }
    .related { grid-template-columns: 1fr; }
    h2 { font-size: 18px; }
}


/* === 上一篇 / 下一篇（与 docs.css 一致）=== */
.prevnext { display: flex; gap: 16px; margin-top: 52px; }
.prevnext a {
    flex: 1; display: block; padding: 14px 18px;
    border: 1px solid #e6e8ec; border-radius: 10px; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.prevnext a:hover { border-color: #1677FF; box-shadow: 0 2px 10px rgba(22,119,255,.08); text-decoration: none; }
.prevnext a span { display: block; font-size: 12px; color: #999; margin-bottom: 3px; }
.prevnext a b { font-size: 14px; color: #1677FF; font-weight: 600; }
.pn-next { text-align: right; }
.pn-empty { flex: 1; }
