:root {
    --ink: #16233a;
    --ink-2: #3d4c66;
    --ink-3: #6b7893;
    --brand: #1f5eff;
    --brand-deep: #0f3ecb;
    --brand-soft: #e9f0ff;
    --teal: #0f8a72;
    --teal-soft: #e4f6f1;
    --amber: #b96b00;
    --bg: #f5f7fb;
    --card: #fff;
    --line: #e2e8f4;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(22, 35, 58, .05), 0 8px 24px rgba(22, 35, 58, .06);
}


.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    padding: 18px 0 56px;
    align-items: start
}

@media (max-width:900px) {
    .layout {
        grid-template-columns: 1fr
    }
}

.crumbs {
    font-size: 13px;
    color: var(--ink-3);
    padding: 14px 0 0
}

.crumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center
}

.crumbs li+li::before {
    content: "/";
    margin-right: 6px;
    color: #b8c2d6
}

.crumbs a {
    color: var(--ink-3)
}

.crumbs [aria-current] {
    color: var(--ink);
    font-weight: 600
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    padding: 18px 0 56px;
    align-items: start
}

@media (max-width:900px) {
    .layout {
        grid-template-columns: 1fr
    }
}

main {
    min-width: 0
}

.page-head {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px;
    border-top: 4px solid var(--brand)
}

h1 {
    font-size: 24px;
    margin: 10px 0 8px;
    font-weight: bold;
}

.q-tag {
    display: inline-flex;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-deep);
    background: var(--brand-soft);
    padding: 4px 10px;
    border-radius: 999px
}

.page-head p.desc {
    font-size: 14.5px;
    color: var(--ink-2)
}

.count-line {
    margin-top: 10px;
    font-size: 13px;
    color: var(--ink-3)
}

.count-line b {
    color: var(--brand-deep)
}

.tools {
    margin-top: 16px;
    display: grid;
    gap: 12px
}

.search-box {
    position: relative
}

.search-box input {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
    font-family: inherit;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 44px 10px 44px;
    background: var(--card);
    box-shadow: var(--shadow)
}

.search-box input:focus {
    border-color: var(--brand);
    outline: none
}

.search-box .s-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-3)
}

.clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: none;
    color: var(--ink-3);
    font-size: 16px;
    cursor: pointer;
    display: none
}

.clear-btn.show {
    display: block
}

.cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.cat {
    min-height: 44px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s
}

.cat[aria-pressed="true"] {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff
}

.cat:hover {
    text-decoration: none;
    opacity: .92
}

/* SECTION: question list */
.q-list {
    list-style: none;
    margin-top: 16px;
    display: grid;
    gap: 12px
}

.q-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: border-color .15s, transform .15s
}

.q-item:hover {
    border-color: #b9cbf3
}

.q-link {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    min-height: 56px;
    color: inherit
}

.q-link:hover {
    text-decoration: none
}

.q-no {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: #3184f1;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 13px;
    margin-top: 2px
}

.q-item.soon .q-no {
    background: #eef2fa;
    color: var(--ink-3)
}

.q-body {
    flex: 1;
    min-width: 0
}

.q-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.5
}

.q-title mark {
    background: #ffefb8;
    color: #6b4a00;
    border-radius: 3px;
    padding: 0 2px
}

.q-snippet {
    font-size: 13.5px;
    color: var(--ink-3);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.q-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: var(--ink-3)
}

.q-cat {
    background: var(--teal-soft);
    color: #0a5c4c;
    border-radius: 999px;
    padding: 2px 10px;
    font-weight: 600
}

.q-go {
    flex: none;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #3184f1;
    white-space: nowrap
}

.q-item.soon .q-go {
    color: var(--ink-3)
}

.q-item.hide {
    display: none
}

.empty {
    display: none;
    background: var(--card);
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 34px 20px;
    text-align: center;
    color: var(--ink-3);
    font-size: 14px;
    margin-top: 16px
}

.empty.show {
    display: block
}

.empty .btn-mini {
    margin-top: 12px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--brand);
    background: #fff;
    color: var(--brand-deep);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit
}

/* SECTION: aside */
aside {
    display: grid;
    gap: 20px;
    margin-top: 50px;
}

@media (max-width:900px) {
    aside {
        position: static;
        order: 2
    }
}

.side-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px
}

.side-card h2 {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 10px
}

.side-card p {
    font-size: 13.5px;
    color: var(--ink-2)
}

.hot-list {
    list-style: none;
    font-size: 14px;
    display: grid;
    gap: 2px
}

.hot-list a,
.hot-list button {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 8px 6px;
    min-height: 44px;
    color: var(--ink-2);
    border: 0;
    background: none;
    font: inherit;
    border-radius: 8px;
    cursor: pointer
}

.hot-list a:hover,
.hot-list button:hover {
    background: #eef2fa;
    text-decoration: none;
    color: var(--brand-deep)
}

.hot-rank {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #eef2fa;
    color: var(--ink-3);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    margin-right: 10px
}

.hot-list li:nth-child(-n+2) .hot-rank {
    background: var(--brand);
    color: #fff
}

.note {
    font-size: 12px;
    color: var(--ink-3);
    line-height: 1.6
}

.faq-toast {
    position: fixed;
    left: 50%;
    top: 40%;
    transform: translate(-50%, 16px);
    background: #1c2b47;
    color: #fff;
    font-size: 14px;
    padding: 11px 20px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    z-index: 90;
    max-width: 88vw;
    text-align: center;
    border: 0;
}

.faq-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

article {
    min-width: 0
}

.q-head {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 26px 22px;
    border-top: 4px solid var(--brand)
}

.q-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-deep);
    background: var(--brand-soft);
    padding: 4px 10px;
    border-radius: 999px
}

h1 {
    font-size: 26px;
    line-height: 1.4;
    margin: 12px 0 10px;
    letter-spacing: .2px
}

.q-meta {
    font-size: 13px;
    color: var(--ink-3);
    display: flex;
    flex-wrap: wrap;
    gap: 16px
}

.q-meta time {
    font-variant-numeric: tabular-nums
}

.answer-card {
    margin-top: 18px;
    background: linear-gradient(180deg, #f2f7ff, #ffffff);
    border: 1px solid #d4e2ff;
    border-radius: var(--radius);
    padding: 20px 22px;
    position: relative;
    line-height: 1.5;
}

.answer-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    background: linear-gradient(180deg, var(--brand), var(--teal))
}

.answer-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--teal);
    letter-spacing: 2px;
    margin-bottom: 8px
}

.answer-main {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.5;
}

.answer-main .no {
    display: inline-block;
    color: #c22e2e;
    font-size: 19px;
    font-weight: 800;
    margin-right: 4px
}

.copy-row {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid #3660df;
    background: #3660df;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s, transform .1s
}

.btn:hover {
    background: var(--brand-deep);
    text-decoration: none
}

.btn:active {
    transform: scale(.98)
}

.btn-ghost {
    background: #fff;
    color: var(--brand-deep);
    border-color: #c7d6f5
}

.btn-ghost:hover {
    background: var(--brand-soft)
}

.section {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 26px;
    margin-top: 20px;
    scroll-margin-top: 84px
}

h2 {
    font-size: 19px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

h2 .idx {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand-deep);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 800
}

.section p {
    color: var(--ink-2);
    margin-bottom: 10px
}

.section p:last-child {
    margin-bottom: 0
}

mark {
    background: #ffefb8;
    color: #6b4a00;
    padding: 0 3px;
    border-radius: 3px
}