/* ============================================================
   API 广场（开放平台）
   依赖 ui.css / front.css 的变量与基础组件
   ============================================================ */

/* ---------- 顶部 ---------- */
.ah-hero {
    background:
        radial-gradient(900px 300px at 12% -10%, rgba(91, 91, 240, .12), transparent 60%),
        radial-gradient(800px 260px at 88% 0%, rgba(34, 211, 238, .1), transparent 60%),
        var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 34px 0 26px;
}
.ah-hero-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}
.ah-hero-copy h1 {
    margin: 10px 0 8px;
    font-size: clamp(26px, 3vw, 34px);
    letter-spacing: -.03em;
    line-height: 1.15;
}
.ah-hero-copy p { color: var(--text-2); font-size: 13.5px; max-width: 560px; line-height: 1.75; }

.ah-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 14px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: var(--shadow-xs);
    min-width: 320px;
    flex: 0 1 420px;
}
.ah-search svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.ah-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    height: 34px;
    font-size: 13.5px;
    color: var(--text);
}
.ah-search .btn { height: 36px; flex: none; }

.ah-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}
.ah-stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.ah-stat span { width: 100%; font-size: 11.5px; color: var(--muted); }
.ah-stat b { font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ah-stat em { font-style: normal; font-size: 11.5px; color: var(--muted); }

/* ---------- 主体两栏 ---------- */
.ah-body {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 22px;
    padding-top: 26px;
    padding-bottom: 40px;
    align-items: start;
}

.ah-side { position: sticky; top: 84px; }
.ah-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px 10px;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .04em;
}
.ah-side-head i { font-style: normal; }
.ah-cats { display: flex; flex-direction: column; gap: 2px; }
.ah-cat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    color: var(--text-2);
    transition: background .15s, color .15s;
}
.ah-cat:hover { background: var(--bg-soft); color: var(--text); }
.ah-cat.active { background: var(--brand-soft); color: var(--brand-600); font-weight: 600; }
.ah-cat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-cat-n {
    font-size: 11.5px;
    color: var(--muted);
    background: var(--bg-soft);
    border-radius: 6px;
    padding: 1px 6px;
    font-variant-numeric: tabular-nums;
}
.ah-cat.active .ah-cat-n { background: #fff; color: var(--brand-600); }

.ah-side-cta {
    margin-top: 16px;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(99, 102, 241, .1), rgba(34, 211, 238, .08));
    border: 1px solid rgba(99, 102, 241, .18);
}
.ah-side-cta b { font-size: 13.5px; display: block; }
.ah-side-cta p { font-size: 12px; color: var(--text-2); line-height: 1.7; margin: 6px 0 10px; }
.ah-side-cta .btn { width: 100%; height: 34px; font-size: 12.5px; }

/* 侧栏收起后的投稿入口（平板/手机） */
.ah-cta-m {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(99, 102, 241, .1), rgba(34, 211, 238, .08));
    border: 1px solid rgba(99, 102, 241, .18);
}
.ah-cta-m div { min-width: 0; }
.ah-cta-m b { display: block; font-size: 13px; }
.ah-cta-m span { display: block; margin-top: 3px; font-size: 11.5px; color: var(--text-2); line-height: 1.55; }
.ah-cta-m .btn { flex: none; height: 34px; padding: 0 14px; font-size: 12.5px; }

/* 手机分类 chips */
.ah-mobile-cats { display: none; gap: 8px; overflow-x: auto; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
.ah-chip {
    flex: none;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--text-2);
    white-space: nowrap;
}
.ah-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------- 工具条 ---------- */
.ah-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.ah-list-info { font-size: 13.5px; color: var(--text-2); }
.ah-list-info b { color: var(--text); }
.ah-list-info span { color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.ah-sort { display: flex; align-items: center; gap: 4px; }
.ah-sort > span { font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.ah-sort a {
    padding: 6px 12px;
    border-radius: 9px;
    font-size: 12.5px;
    color: var(--text-2);
    background: var(--surface);
    border: 1px solid var(--line);
}
.ah-sort a.active { background: var(--brand-soft); border-color: transparent; color: var(--brand-600); font-weight: 600; }

/* ---------- 卡片网格 ---------- */
.ah-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.ah-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .18s, box-shadow .18s, border-color .18s;
    color: inherit;
    min-width: 0;
}
.ah-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand-400);
    box-shadow: 0 18px 36px -26px rgba(91, 91, 240, .75);
}
.ah-cover { aspect-ratio: 2 / 1; background: var(--bg-soft); overflow: hidden; }
.ah-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ah-card-body { padding: 12px 13px 8px; flex: 1; min-width: 0; }
.ah-card-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ah-card-title span {
    font-size: 13.5px;
    font-weight: 640;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.ah-badge {
    flex: none;
    font-style: normal;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--bg-soft);
    color: var(--text-2);
    white-space: nowrap;
}
.ah-badge.ok { background: rgba(16, 185, 129, .12); color: #047857; }
.ah-badge.warn { background: rgba(245, 158, 11, .14); color: #b45309; }
.ah-badge.bad { background: rgba(239, 68, 68, .12); color: #b91c1c; }
.ah-badge.plain { background: var(--brand-soft); color: var(--brand-600); }
.ah-card-sub {
    margin-top: 5px;
    font-size: 12px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ah-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 13px 11px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
}
.ah-views { display: flex; align-items: center; gap: 5px; }
.ah-views svg { width: 14px; height: 14px; }
.ah-go { color: var(--brand-600); font-weight: 600; }

/* ---------- 空态 / 分页 ---------- */
.ah-empty { padding: 56px 20px; text-align: center; }
.ah-empty-ico { font-size: 34px; color: var(--muted); line-height: 1; }
.ah-empty b { display: block; margin: 12px 0 6px; font-size: 15px; }
.ah-empty p { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

.ah-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 26px 0 6px;
}
.ah-page {
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-size: 13px;
    color: var(--text-2);
}
.ah-page:hover { border-color: var(--brand-400); color: var(--brand-600); }
.ah-page.disabled { opacity: .45; pointer-events: none; }
.ah-page-info { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 详情页 ---------- */
.ah-doc-top { padding: 22px 0 4px; }
.ah-crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.ah-crumb a { color: var(--text-2); }
.ah-crumb a:hover { color: var(--brand-600); }
.ah-crumb b { color: var(--text); font-weight: 600; }

.ah-doc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    flex-wrap: wrap;
}
.ah-doc-head-left { display: flex; align-items: center; gap: 15px; min-width: 0; }
.ah-doc-ico {
    width: 56px;
    height: 56px;
    flex: none;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: var(--grad);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    box-shadow: 0 14px 26px -18px rgba(99, 102, 241, .95);
}
.ah-doc-title { min-width: 0; }
.ah-doc-title h1 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 4px; }
.ah-doc-title p { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.ah-doc-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.ah-doc-head-act { display: flex; gap: 8px; flex-wrap: wrap; }
.ah-doc-head-act .btn { height: 36px; font-size: 12.5px; }
.ah-doc-head-act svg { width: 15px; height: 15px; }

.ah-doc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 296px;
    gap: 18px;
    padding-bottom: 40px;
    align-items: start;
}
.ah-doc-main { padding: 0; overflow: hidden; }

.ah-tabs { display: flex; gap: 4px; padding: 12px 16px 0; border-bottom: 1px solid var(--line); }
.ah-tabs button {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px 11px;
    border: 0;
    background: transparent;
    font-size: 13.5px;
    color: var(--text-2);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.ah-tabs button svg { width: 16px; height: 16px; }
.ah-tabs button.active { color: var(--brand-600); font-weight: 640; border-bottom-color: var(--brand); }
.ah-pane { padding: 18px 18px 22px; }
.ah-hide { display: none !important; }

.ah-kv {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--brand-400);
    border-radius: 10px;
    background: var(--surface-2);
    margin-bottom: 10px;
}
.ah-kv label { flex: none; width: 68px; font-size: 12.5px; color: var(--muted); }
.ah-kv-val { flex: 1; min-width: 0; }
.ah-kv code {
    display: block;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: var(--text);
    word-break: break-all;
    line-height: 1.7;
}
.ah-method {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(16, 185, 129, .12);
    color: #047857;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
}
.ah-copy {
    flex: none;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text-2);
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.ah-copy:hover { border-color: var(--brand-400); color: var(--brand-600); }

.ah-sec { margin-top: 22px; }
.ah-doc-text p { margin: 0 0 9px; font-size: 13px; line-height: 1.85; color: var(--text-2); }
.ah-doc-text p:last-child { margin-bottom: 0; }
.ah-sec h3 { font-size: 14.5px; margin: 0 0 12px; letter-spacing: -.01em; }
.ah-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ah-sec-head h3 { margin: 0; display: flex; align-items: center; gap: 7px; }
.ah-sec-head h3 em { font-style: normal; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.ah-sec-head > span { font-size: 12px; color: var(--muted); }
.ah-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); display: inline-block; }

.ah-params-empty {
    text-align: center;
    padding: 18px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px dashed var(--line-strong);
    color: var(--muted);
    font-size: 13px;
}
.ah-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.ah-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ah-table th {
    text-align: left;
    padding: 9px 12px;
    background: var(--surface-2);
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
}
.ah-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.ah-table tr:last-child td { border-bottom: 0; }
.ah-table code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--text); }
.ah-req { color: #b91c1c; font-size: 11.5px; }
.ah-opt { color: var(--muted); font-size: 11.5px; }

/* 调试 */
.ah-param-rows { display: flex; flex-direction: column; gap: 8px; }
.ah-param-row { display: flex; gap: 8px; align-items: center; }
.ah-param-row input {
    height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    padding: 0 11px;
    font-size: 13px;
    background: var(--surface);
    color: var(--text);
    min-width: 0;
}
.ah-param-row input:focus { outline: 0; border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.ah-p-name { flex: 0 0 34%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px !important; background: var(--surface-2) !important; }
.ah-p-val { flex: 1; }
.ah-p-del {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}
.ah-p-del:hover { color: var(--danger); border-color: rgba(239, 68, 68, .4); }

.ah-debug-act { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.ah-debug-act .btn { height: 38px; font-size: 13px; }
.ah-debug-act svg { width: 16px; height: 16px; }

.ah-url-preview {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--surface-2);
    margin-bottom: 10px;
}
.ah-url-preview span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.ah-url-preview code {
    display: block;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: var(--brand-600);
    word-break: break-all;
}

.ah-result-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: var(--surface-2);
    font-size: 12px;
}
.ah-res-code { font-weight: 700; }
.ah-res-code.ok { color: #047857; }
.ah-res-code.bad { color: #b91c1c; }
.ah-res-cost { color: var(--muted); }
.ah-result {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #0f172a;
    color: #d9e2f2;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.7;
    max-height: 380px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}
.ah-result-head:not([hidden]) + .ah-result { border-radius: 0 0 10px 10px; }
.ah-result-img { margin-top: 10px; }
.ah-result-img img {
    display: block;
    max-width: 100%;
    max-height: 360px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
}

/* 代码示例 */
.ah-seg { display: inline-flex; gap: 3px; padding: 4px; background: var(--bg-soft); border-radius: 10px; margin-bottom: 12px; }
.ah-seg button {
    border: 0;
    background: transparent;
    padding: 6px 13px;
    border-radius: 7px;
    font-size: 12.5px;
    color: var(--text-2);
    cursor: pointer;
}
.ah-seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); font-weight: 600; }
.ah-code {
    margin: 0;
    padding: 16px;
    border-radius: 12px;
    background: #0f172a;
    color: #d9e2f2;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.8;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---------- 详情右侧 ---------- */
.ah-doc-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 84px; }
.ah-site-card { padding: 16px; }
.ah-site-head { display: flex; align-items: center; gap: 11px; }
.ah-site-ava {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--grad);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}
.ah-site-head b { display: block; font-size: 14px; }
.ah-site-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.ah-site-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 13px 0 12px; }
.ah-site-nums > div { background: var(--surface-2); border-radius: 9px; padding: 9px 10px; text-align: center; }
.ah-site-nums b { display: block; font-size: 14px; letter-spacing: -.01em; }
.ah-site-nums span { font-size: 11px; color: var(--muted); }
.ah-site-more { width: 100%; height: 34px; font-size: 12.5px; }

.ah-side-card { padding: 16px; }
.ah-side-card h3 { font-size: 13.5px; margin: 0 0 12px; }
.ah-view-count {
    background: linear-gradient(160deg, rgba(16, 185, 129, .12), rgba(16, 185, 129, .04));
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.ah-view-count span { font-size: 11.5px; color: #047857; }
.ah-view-count b { display: block; font-size: 19px; margin-top: 2px; color: #065f46; }
.ah-view-count em { font-style: normal; font-size: 11.5px; font-weight: 500; color: #047857; }
.ah-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ah-mini-grid > div { background: var(--surface-2); border-radius: 9px; padding: 9px 10px; }
.ah-mini-grid span { display: block; font-size: 11px; color: var(--muted); }
.ah-mini-grid b { font-size: 12.5px; font-weight: 640; }

.ah-recs { display: flex; flex-direction: column; gap: 2px; }
.ah-recs a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px;
    border-radius: 9px;
    font-size: 12.5px;
    color: var(--text-2);
}
.ah-recs a:hover { background: var(--bg-soft); color: var(--text); }
.ah-rec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-400); flex: none; }
.ah-rec-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-recs svg { width: 14px; height: 14px; color: var(--muted); }

/* ---------- 作者主页 ---------- */
.ah-site-page { padding: 24px 0 40px; }
.ah-site-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    flex-wrap: wrap;
}
.ah-site-ava.big { width: 62px; height: 62px; border-radius: 18px; font-size: 24px; }
.ah-site-hero-main { flex: 1; min-width: 200px; }
.ah-site-hero-main h1 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 4px; }
.ah-site-hero-main p { font-size: 13px; color: var(--text-2); margin: 0 0 8px; }
.ah-site-qq { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.ah-site-hero-nums { display: flex; gap: 22px; }
.ah-site-hero-nums > div { text-align: center; }
.ah-site-hero-nums b { display: block; font-size: 20px; letter-spacing: -.02em; }
.ah-site-hero-nums span { font-size: 11.5px; color: var(--muted); }

/* ---------- 我的投稿 ---------- */
.ah-mine { padding: 24px 0 44px; }
.ah-mine-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.ah-mine-head h1 { font-size: 24px; letter-spacing: -.02em; margin: 8px 0 6px; }
.ah-mine-head p { font-size: 13px; color: var(--muted); }
.ah-mine-head p b { color: var(--brand-600); }

.ah-mine-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ah-form-card { padding: 18px; }
.ah-form-card h2 { font-size: 15.5px; margin: 0 0 14px; }
.ah-f-row { margin-bottom: 12px; }
.ah-f-row label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.ah-f-row label i { color: var(--danger); font-style: normal; }
.ah-f-row input[type=text],
.ah-f-row input[type=url],
.ah-f-row select,
.ah-f-row textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 13px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
}
.ah-f-row textarea { resize: vertical; line-height: 1.7; }
.ah-f-row input:focus, .ah-f-row select:focus, .ah-f-row textarea:focus {
    outline: 0;
    border-color: var(--brand-400);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
.ah-f-row em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.ah-f-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ah-f-params { display: flex; flex-direction: column; gap: 8px; }
.ah-f-param { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ah-f-param input[type=text] { flex: 1 1 120px; min-width: 0; }
.ah-f-param label { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); margin: 0; flex: none; }
.ah-f-add { height: 32px; font-size: 12.5px; margin-top: 8px; }
.ah-f-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}
.ah-f-tip { font-size: 12px; color: var(--muted); }
.ah-f-foot .btn { height: 38px; min-width: 120px; }

.ah-list-card { padding: 0; overflow: hidden; }
.ah-list-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.ah-list-head h2 { font-size: 14.5px; margin: 0; }
.ah-list-head span { font-size: 12px; color: var(--muted); }
.ah-list-empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.ah-list-item { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.ah-list-item:last-child { border-bottom: 0; }
.ah-li-main { flex: 1; min-width: 0; }
.ah-li-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ah-li-title a, .ah-li-title b { font-size: 13.5px; font-weight: 640; color: var(--text); }
.ah-li-title a:hover { color: var(--brand-600); }
.ah-li-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.ah-li-refuse { font-size: 11.5px; color: #b91c1c; margin-top: 5px; background: rgba(239, 68, 68, .07); padding: 5px 8px; border-radius: 7px; }
.ah-li-del {
    flex: none;
    align-self: flex-start;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.ah-li-del:hover { color: var(--danger); border-color: rgba(239, 68, 68, .4); }

/* ---------- Toast ---------- */
.ah-toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    transform: translate(-50%, 16px);
    background: #1e293b;
    color: #fff;
    padding: 10px 18px;
    border-radius: 11px;
    font-size: 13px;
    z-index: 9999;
    opacity: 0;
    transition: opacity .2s, transform .2s;
    box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .6);
    max-width: calc(100vw - 40px);
}
.ah-toast.in { opacity: 1; transform: translate(-50%, 0); }
.ah-toast.ok { background: #047857; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
    .ah-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ah-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
    .ah-body { grid-template-columns: minmax(0, 1fr); }
    .ah-side { display: none; }
    .ah-cta-m { display: flex; }
    .ah-mobile-cats { display: flex; }
    .ah-doc-grid { grid-template-columns: minmax(0, 1fr); }
    .ah-doc-side { position: static; }
    .ah-mine-grid { grid-template-columns: minmax(0, 1fr); }
    .ah-search { flex: 1 1 100%; min-width: 0; }
}

@media (max-width: 720px) {
    .ah-hero { padding: 24px 0 20px; }
    .ah-hero-top { gap: 16px; }
    .ah-hero-copy p { font-size: 12.5px; }
    .ah-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .ah-stat { padding: 10px 11px; }
    .ah-stat b { font-size: 17px; }
    .ah-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ah-card-body { padding: 10px 11px 6px; }
    .ah-card-title span { font-size: 12.5px; }
    .ah-card-foot { padding: 8px 11px 9px; font-size: 11.5px; }
    .ah-toolbar { gap: 8px; }
    .ah-sort a { padding: 5px 9px; }
    .ah-doc-head { padding: 15px; gap: 12px; }
    .ah-doc-ico { width: 46px; height: 46px; border-radius: 13px; font-size: 11px; }
    .ah-doc-title h1 { font-size: 18px; }
    .ah-pane { padding: 14px 13px 18px; }
    .ah-kv { flex-wrap: wrap; gap: 8px; }
    .ah-kv label { width: auto; }
    .ah-kv-val { flex: 1 1 100%; order: 3; }
    .ah-copy { margin-left: auto; }
    .ah-p-name { flex: 1 1 38%; }
    .ah-result { max-height: 300px; }
    .ah-site-hero { padding: 16px; gap: 13px; }
    .ah-site-hero-nums { width: 100%; justify-content: flex-start; gap: 30px; }
    .ah-f-2 { grid-template-columns: 1fr; gap: 0; }
    .ah-mine-head h1 { font-size: 21px; }
    .ah-f-param {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(15, 23, 42, .015);
    }
    .ah-f-param input[type=text] { width: 100%; }
    .ah-f-param label { justify-self: start; }
    .ah-f-param .ah-p-del { justify-self: end; }
    .ah-cta-m { padding: 11px 12px; gap: 10px; }
    .ah-cta-m b { font-size: 12.5px; }
    .ah-cta-m span { font-size: 11px; }
}

@media (max-width: 420px) {
    .ah-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ah-card-sub { display: none; }
}
