/* ========================================================
   BC-Pass Landing / Tutorial — shared styles
   主色：藍 → 紫漸層；底色：dark slate
   ======================================================== */

:root {
    --bg-0: #05060a;
    --bg-1: #0b0d14;
    --bg-2: #11141d;
    --line: rgba(255, 255, 255, 0.06);
    --line-strong: rgba(255, 255, 255, 0.1);
    --txt-0: #f1f5f9;
    --txt-1: #cbd5e1;
    --txt-2: #94a3b8;
    --txt-3: #64748b;
    --txt-4: #475569;
    --brand-blue: #60a5fa;
    --brand-purple: #c084fc;
    --grad: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #c084fc 100%);
    --grad-soft: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(168, 85, 247, 0.2));
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-0);
    color: var(--txt-0);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
                 "Microsoft JhengHei", "Noto Sans TC", sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.16); }

/* ============= 背景光暈 ============= */
.glow-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.glow-bg::before,
.glow-bg::after {
    content: "";
    position: absolute;
    width: 720px;
    height: 720px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
}
.glow-bg::before {
    background: #2563eb;
    top: -200px;
    left: -100px;
}
.glow-bg::after {
    background: #9333ea;
    top: 320px;
    right: -150px;
}

/* ============= Navigation ============= */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 13, 20, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
}
.nav-brand img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.nav-brand span {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.nav-link {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--txt-2);
    transition: all 0.15s;
}
.nav-link:hover {
    color: var(--txt-0);
    background: rgba(255, 255, 255, 0.05);
}
.nav-link.cta {
    background: var(--grad);
    color: #fff !important;
    font-weight: 600;
    padding: 8px 18px;
}
.nav-link.cta:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
/* LINE 官方帳號 CTA — 蓋過漸層用 LINE 的綠色 */
.nav-link.line-cta {
    background: #06c755;
    box-shadow: 0 6px 16px rgba(6, 199, 85, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-link.line-cta:hover {
    background: #05b54b;
    box-shadow: 0 8px 20px rgba(6, 199, 85, 0.45);
}
.nav-link.line-cta svg {
    flex-shrink: 0;
}

/* ============= Hamburger button + drawer（手機 / 平板） =============
   桌機預設：漢堡 / 抽屜頭部 / backdrop 全部隱藏，nav-links 走原本水平排列
   平板以下：漢堡顯示、nav-links 變成左側滑出 drawer
*/
.nav-burger {
    display: none;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
.nav-burger:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(96, 165, 250, 0.4);
}
.nav-burger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--txt-1);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
/* 開啟時：上下兩條變 X，中間變透明 */
.nav.is-open .nav-burger span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.nav.is-open .nav-burger span:nth-child(2) {
    opacity: 0;
}
.nav.is-open .nav-burger span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* drawer 內部頭部（含關閉鈕）只有 mobile 時可見 */
.drawer-head { display: none; }
.drawer-close {
    background: transparent;
    border: none;
    color: var(--txt-2);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.drawer-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--txt-0);
}

/* backdrop 桌機預設不顯示 */
.nav-backdrop {
    display: none;
}

/* lock body scroll 當 drawer 開啟 */
body.menu-open {
    overflow: hidden;
}

/* ============= 通用容器 ============= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}
.section {
    padding: 100px 0;
}
.section-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 12px 0;
    text-align: center;
}
.section-title .accent {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.section-sub {
    text-align: center;
    color: var(--txt-2);
    font-size: 15px;
    margin: 0 auto 56px auto;
    max-width: 640px;
}

/* ============= Hero ============= */
.hero {
    padding: 90px 0 80px 0;
    text-align: center;
    position: relative;
}
/* Hero 變體：tutorial / 內頁用較小尺寸 */
.hero.hero-compact { padding: 60px 0 40px 0; }
.hero-title.hero-title-md { font-size: 48px; }
.hero-sub.hero-sub-md { font-size: 16px; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.25);
    color: var(--brand-blue);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 28px;
}
.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin: 0 0 24px 0;
}
.hero-title .grad {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub {
    font-size: 18px;
    color: var(--txt-1);
    max-width: 700px;
    margin: 0 auto 40px auto;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}
.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 8px 24px rgba(96, 165, 250, 0.25);
}
.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(96, 165, 250, 0.35);
}
.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line-strong);
    color: var(--txt-1);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--txt-0);
}

/* ============= Hero stats ============= */
.hero-stats {
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.stat {
    padding: 18px 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.stat-num {
    font-size: 28px;
    font-weight: 800;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat-lbl {
    font-size: 11px;
    color: var(--txt-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

/* ============= Features grid ============= */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.feature-card {
    padding: 28px 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--line);
    border-radius: 16px;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.feature-card:hover {
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateY(-3px);
}
.feature-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad);
    opacity: 0;
    transition: opacity 0.25s;
}
.feature-card:hover::after {
    opacity: 1;
}
.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--grad-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 18px;
    border: 1px solid rgba(96, 165, 250, 0.25);
}
.feature-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
}
.feature-desc {
    font-size: 13px;
    color: var(--txt-2);
    margin: 0;
}
.feature-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0 0;
    font-size: 12px;
    color: var(--txt-2);
}
.feature-list li {
    padding-left: 18px;
    position: relative;
    margin: 6px 0;
}
.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #4ade80;
    font-weight: 700;
}

/* ============= UI Mockup（仿應用程式截圖）============= */
.mockup-wrap {
    position: relative;
    margin: 40px auto;
    max-width: 1080px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    background: #05060a;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.mockup-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--grad);
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.mockup-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid var(--line);
}
.dots { display: flex; gap: 6px; }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.mockup-title {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: var(--txt-3);
    font-weight: 500;
}

/* App-style top bar inside mockup */
.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(11, 13, 20, 0.85);
}
.app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.app-brand img { width: 22px; height: 22px; }
.app-brand .name {
    font-weight: 700;
    font-size: 14px;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.app-brand .ver {
    font-size: 10px;
    color: var(--txt-4);
    font-family: ui-monospace, SFMono-Regular, monospace;
}
.app-topbar-right {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--txt-3);
    align-items: center;
}
.pill {
    padding: 2px 10px;
    border-radius: 9999px;
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    font-size: 10px;
    font-weight: 500;
}
.pill.gray { background: rgba(255, 255, 255, 0.08); color: var(--txt-2); }
.pill.warn { background: rgba(250, 204, 21, 0.15); color: #facc15; }
.pill.danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.pill.info { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.pill.purple { background: rgba(192, 132, 252, 0.15); color: #c084fc; }

/* App body layout */
.app-body {
    display: flex;
    height: 480px;
    background: #05060a;
}
.app-sidebar {
    width: 230px;
    border-right: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.sb-block {
    padding: 14px;
    border-bottom: 1px solid var(--line);
}
.sb-h {
    font-size: 9px;
    color: var(--txt-4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    font-weight: 500;
}
.sb-bignum {
    font-size: 30px;
    font-weight: 800;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}
.sb-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: 6px 8px;
    font-size: 10.5px;
    align-items: center;
}
.sb-grid > .num {
    text-align: right;
    font-family: ui-monospace, SFMono-Regular, monospace;
}
.sb-grid > .span3 { grid-column: 1 / span 3; }
.txt-green { color: #4ade80; }
.txt-yellow { color: #facc15; }
.txt-orange { color: #fb923c; }
.txt-red { color: #f87171; }
.txt-blue { color: #60a5fa; }
.txt-purple { color: #c084fc; }
.txt-gray { color: var(--txt-3); }
.txt-mute { color: var(--txt-4); }

/* Hourly chart */
.hourly {
    display: flex;
    align-items: flex-end;
    gap: 1.5px;
    height: 44px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    padding: 2px;
}
.hourly .b {
    flex: 1;
    background: linear-gradient(to top, rgba(59, 130, 246, 0.7), rgba(168, 85, 247, 0.7));
    border-radius: 1px;
    min-height: 2px;
}
.hourly .b.zero { background: rgba(255, 255, 255, 0.04); }
.hourly .b.cur {
    background: linear-gradient(to top, rgba(34, 197, 94, 0.9), rgba(52, 211, 153, 0.9));
    outline: 1px solid rgba(52, 211, 153, 0.5);
}

/* Progress bars */
.pb-row {
    margin-top: 10px;
}
.pb-row + .pb-row { margin-top: 8px; }
.pb-lbl {
    display: flex;
    justify-content: space-between;
    font-size: 9.5px;
    color: var(--txt-3);
    margin-bottom: 3px;
}
.pb-track {
    height: 5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 9999px;
    overflow: hidden;
}
.pb-fill {
    height: 100%;
    border-radius: 9999px;
}
.pb-fill.green { background: linear-gradient(to right, #10b981, #34d399); }
.pb-fill.purple { background: linear-gradient(to right, #6366f1, #8b5cf6); }
.pb-fill.idle { background: rgba(107, 114, 128, 0.4); }

/* Sidebar buttons */
.sb-btns { padding: 12px; border-top: 1px solid var(--line-strong); background: rgba(11, 13, 20, 0.8); }
.sb-btn {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    margin-bottom: 6px;
}
.sb-btn.green {
    background: linear-gradient(to right, #059669, #10b981);
    color: #fff;
}
.sb-btn.blue {
    background: linear-gradient(to right, #2563eb, #7c3aed);
    color: #fff;
}
.sb-btn.gray {
    background: rgba(255, 255, 255, 0.05);
    color: var(--txt-3);
}
.sb-btns-row { display: flex; gap: 6px; }
.sb-btns-row .sb-btn { flex: 1; margin-bottom: 0; }

/* App main */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.app-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.3);
    flex-wrap: wrap;
}
.tb-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10.5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: var(--txt-2);
}
.tb-btn.primary {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--brand-blue);
}
.tb-btn.danger {
    color: #f87171;
}
.tb-sep { width: 1px; height: 14px; background: var(--line-strong); }
.tb-spacer { flex: 1; }
.tb-count {
    font-size: 11px;
    color: var(--txt-3);
}

.app-tabs {
    display: flex;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.2);
}
.app-tab {
    padding: 8px 18px;
    font-size: 11px;
    font-weight: 500;
    color: var(--txt-3);
    border-bottom: 2px solid transparent;
}
.app-tab.active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
}

/* Account table */
.acc-table {
    flex: 1;
    overflow: auto;
    background: rgba(0, 0, 0, 0.2);
    margin: 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
}
.acc-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
}
.acc-table thead tr {
    background: rgba(15, 23, 42, 0.8);
    color: var(--txt-3);
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.06em;
}
.acc-table th, .acc-table td {
    padding: 7px 8px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.acc-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.acc-table tbody tr td:first-child,
.acc-table thead tr th:first-child {
    text-align: center;
}
.cb {
    display: inline-block;
    width: 11px;
    height: 11px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.3);
    vertical-align: middle;
}
.cb.checked {
    background: rgba(59, 130, 246, 0.6);
    border-color: rgba(59, 130, 246, 0.8);
    position: relative;
}
.cb.checked::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 0;
    width: 3px;
    height: 6px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.app-log {
    height: 110px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.app-log-h {
    padding: 8px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 10px;
    color: var(--txt-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(0, 0, 0, 0.4);
}
.app-log-body {
    flex: 1;
    padding: 6px 14px;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, "Roboto Mono", monospace;
    font-size: 10.5px;
    color: var(--txt-2);
    line-height: 1.6;
}
.log-time { color: var(--txt-4); margin-right: 8px; }

/* ============= 比較表 ============= */
.compare-wrap {
    max-width: 920px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}
.compare {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.compare thead th {
    padding: 18px;
    background: rgba(15, 23, 42, 0.7);
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--txt-1);
    border-bottom: 1px solid var(--line);
}
.compare thead th.bc {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(168, 85, 247, 0.15));
    color: var(--brand-blue);
}
.compare td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--txt-2);
    font-size: 13px;
}
.compare tr:last-child td { border-bottom: none; }
.compare td:first-child {
    color: var(--txt-1);
    font-weight: 500;
}
.compare .y { color: #4ade80; font-weight: 600; }
.compare .n { color: var(--txt-4); }

/* ============= FAQ ============= */
.faq {
    max-width: 820px;
    margin: 0 auto;
}
.faq-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}
.faq-item summary {
    cursor: pointer;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    font-size: 22px;
    color: var(--brand-blue);
    transition: transform 0.2s;
    line-height: 1;
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
}
.faq-item summary:hover { background: rgba(255, 255, 255, 0.03); }
.faq-body {
    padding: 0 20px 18px 20px;
    color: var(--txt-2);
    font-size: 13px;
}

/* ============= Tutorial step layout ============= */
.tut-toc {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
}
.tut-toc-title {
    font-size: 11px;
    color: var(--txt-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 10px 0;
}
.tut-toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc;
}
.tut-toc li {
    counter-increment: toc;
    margin: 4px 0;
}
.tut-toc a {
    display: block;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12.5px;
    color: var(--txt-2);
    transition: all 0.15s;
}
.tut-toc a:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--txt-0);
}
.tut-toc a::before {
    content: counter(toc) ". ";
    color: var(--txt-4);
    margin-right: 4px;
}

.tut-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 36px;
}
/* Grid 子元素 min-width: 0 才能讓內容（pre / 寬表格）正常收縮、不撐破版面 */
.tut-layout > main { min-width: 0; }
.tut-layout > aside { min-width: 0; }

.step {
    margin-bottom: 72px;
    scroll-margin-top: 80px;
}
.step-h {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.step-num {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--grad);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(96, 165, 250, 0.3);
    flex-shrink: 0;
}
.step-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}
.step-body {
    color: var(--txt-1);
    font-size: 14.5px;
}
.step-body p { margin: 0 0 14px 0; }
.step-body ul, .step-body ol {
    margin: 0 0 14px 0;
    padding-left: 22px;
}
.step-body li { margin: 6px 0; }
.step-body code {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    padding: 1px 7px;
    border-radius: 5px;
    font-size: 12.5px;
    color: var(--brand-blue);
    font-family: ui-monospace, SFMono-Regular, monospace;
}
.step-body pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 14px 0;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    font-size: 12.5px;
    line-height: 1.65;
    -webkit-overflow-scrolling: touch;
}
.step-body { word-wrap: break-word; overflow-wrap: break-word; }
.step-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--txt-1);
}

.callout {
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 3px solid var(--brand-blue);
    background: rgba(96, 165, 250, 0.06);
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: var(--txt-1);
}
.callout.warn {
    border-left-color: #facc15;
    background: rgba(250, 204, 21, 0.06);
}
.callout.danger {
    border-left-color: #f87171;
    background: rgba(239, 68, 68, 0.06);
}
.callout strong { color: var(--txt-0); }

/* small mockup variants */
.mini-mockup {
    margin: 18px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    background: var(--bg-1);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.mini-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid var(--line);
    font-size: 10.5px;
    color: var(--txt-3);
}

/* license window mock */
.lic-mock {
    padding: 22px;
    background: #05060a;
    width: 360px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.lic-mock h4 {
    font-size: 13px;
    margin: 0 0 14px 0;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lic-mock h4 img { width: 20px; height: 20px; }
.lic-mock label {
    font-size: 10.5px;
    color: var(--txt-3);
    display: block;
    margin-bottom: 4px;
    margin-top: 10px;
}
.lic-mock .input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(96, 165, 250, 0.4);
    border-radius: 10px;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    color: var(--txt-0);
}
.lic-mock .hwid-box {
    margin-top: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--txt-3);
}
.lic-mock .btn-row {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}
.lic-mock .btn-row .btn {
    padding: 10px 16px;
    font-size: 12px;
}

/* settings dialog mock */
.set-mock {
    width: 460px;
    margin: 0 auto;
    background: #0f172a;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}
.set-mock .head {
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(30, 41, 59, 0.6);
    display: flex;
    justify-content: space-between;
}
.set-mock .head h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
}
.set-mock .body {
    padding: 16px 18px;
}
.set-section { margin-bottom: 18px; }
.set-section h6 {
    font-size: 9.5px;
    color: var(--txt-4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.set-grid label {
    display: block;
    font-size: 10px;
    color: var(--txt-3);
    margin-bottom: 3px;
}
.set-grid input,
.set-row input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 5px 9px;
    font-size: 11px;
    color: var(--txt-1);
}
.set-row { margin-top: 8px; }
.set-mock .foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.8);
}
.btn-mini {
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 600;
    border: none;
}
.btn-mini.primary { background: var(--grad); color: #fff; }
.btn-mini.gray { background: rgba(255, 255, 255, 0.06); color: var(--txt-2); }

/* import mock */
.imp-mock {
    width: 520px;
    margin: 0 auto;
    background: #05060a;
    padding: 22px;
}
.imp-mock h5 {
    margin: 0 0 12px 0;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.imp-mock .hint {
    font-size: 11px;
    color: var(--txt-3);
    margin: 0 0 10px 0;
}
.imp-mock .hint code {
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--txt-1);
}
.imp-mock .ta {
    width: 100%;
    height: 130px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    color: var(--txt-2);
    line-height: 1.7;
    white-space: pre;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

/* ============= Footer ============= */
.footer {
    padding: 56px 0 36px 0;
    border-top: 1px solid var(--line);
    color: var(--txt-3);
    font-size: 13px;
    text-align: center;
    margin-top: 60px;
}
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.footer-brand img { width: 24px; height: 24px; }
.footer-brand span {
    font-weight: 700;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.footer p { margin: 6px 0; }
.footer .small { font-size: 11px; color: var(--txt-4); }

/* ============= Responsive ============= */

/* mockup 裡固定寬度的內框，全部改成 max-width，避免溢出 viewport */
.lic-mock, .set-mock, .imp-mock {
    max-width: 100%;
}

/* ===== Tablet（≤ 960px）===== */
@media (max-width: 960px) {
    /* 移除 backdrop-filter，否則 .nav 會建立 containing block，
       讓內部 position:fixed 的 drawer 被困在 nav 高度裡（看起來像個小框） */
    .nav {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(11, 13, 20, 0.96);
    }
    .nav-inner { padding: 12px 20px; gap: 12px; justify-content: space-between; }

    /* 顯示漢堡 + drawer 頭部 + backdrop */
    .nav-burger { display: inline-flex; }
    .drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 18px;
        border-bottom: 1px solid var(--line);
        margin-bottom: 6px;
    }
    .drawer-head .nav-brand { font-size: 15px; }
    .drawer-head .nav-brand img { width: 26px; height: 26px; }

    /* nav-links 變成左側滑入抽屜 */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(300px, 82vw);
        background: rgba(11, 13, 20, 0.98);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-right: 1px solid var(--line-strong);
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 0 12px 18px 12px;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 60;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
    }
    .nav.is-open .nav-links {
        transform: translateX(0);
    }
    .nav-link {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 10px;
        text-align: left;
    }
    .nav-link.cta {
        margin-top: 10px;
        padding: 12px 16px;
        font-size: 14px;
        justify-content: center;
    }
    .nav-link.line-cta svg { width: 16px; height: 16px; }

    /* backdrop 在 drawer 開啟時顯示 */
    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 55;
    }
    .nav.is-open .nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .container { padding: 0 20px; }
    .section { padding: 70px 0; }

    .hero { padding: 70px 0 50px 0; }
    .hero-title { font-size: 46px; }
    .hero-sub { font-size: 16px; }
    .hero.hero-compact { padding: 50px 0 30px 0; }
    .hero-title.hero-title-md { font-size: 38px; }
    .hero-sub.hero-sub-md { font-size: 15px; }

    .features { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .stat-num { font-size: 24px; }

    .tut-layout { grid-template-columns: 200px 1fr; gap: 24px; }

    /* 主畫面 mockup：sidebar 縮窄、表格水平捲動 */
    .app-sidebar { width: 200px; }
    .app-body { height: 460px; }
}

/* ===== Mobile（≤ 720px）===== */
@media (max-width: 720px) {
    /* nav 已是 drawer 模式（≤960px 套用），這裡只調 nav bar 的 padding / 字級 */
    .nav-inner { padding: 10px 12px; }
    .nav-brand { font-size: 14px; flex-shrink: 0; }
    .nav-brand img { width: 24px; height: 24px; }

    .container { padding: 0 16px; }
    .section { padding: 50px 0; }

    /* Hero */
    .hero { padding: 40px 0 30px 0; }
    .hero-title { font-size: 34px; line-height: 1.15; }
    .hero-sub { font-size: 14.5px; margin-bottom: 28px; }
    .hero.hero-compact { padding: 28px 0 18px 0; }
    .hero-title.hero-title-md { font-size: 28px; line-height: 1.2; }
    .hero-sub.hero-sub-md { font-size: 13.5px; margin-bottom: 0; }
    .hero-cta { gap: 10px; }
    .btn { padding: 12px 22px; font-size: 13px; }
    .hero-badge { font-size: 11px; padding: 5px 12px; margin-bottom: 22px; }

    .hero-stats { grid-template-columns: repeat(2, 1fr); margin-top: 36px; gap: 8px; }
    .stat { padding: 14px 10px; }
    .stat-num { font-size: 22px; }
    .stat-lbl { font-size: 10px; }

    /* Section 標題 */
    .section-title { font-size: 26px; }
    .section-sub { font-size: 13.5px; margin-bottom: 36px; }

    /* Features */
    .features { grid-template-columns: 1fr; gap: 14px; }
    .feature-card { padding: 22px 18px; }
    .feature-title { font-size: 16px; }
    .feature-desc { font-size: 12.5px; }
    .feature-list { font-size: 11.5px; }

    /* 主畫面 mockup：垂直堆疊 */
    .app-body { height: auto; flex-direction: column; }
    .app-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--line); }
    .app-main { min-height: 420px; }
    .app-toolbar { padding: 8px 10px; gap: 4px; }
    .tb-btn { font-size: 10px; padding: 3px 8px; }
    .acc-table { margin: 8px; }
    .mockup-title { font-size: 10px; }

    /* 比較表：水平捲動，避免欄位擠壓 */
    .compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .compare { min-width: 640px; font-size: 12.5px; }
    .compare thead th { padding: 14px; font-size: 12px; }
    .compare td { padding: 12px 14px; font-size: 12px; }

    /* FAQ */
    .faq-item summary { padding: 14px 16px; font-size: 13px; }
    .faq-body { padding: 0 16px 16px 16px; font-size: 12.5px; }

    /* Tutorial：TOC 改水平捲動 pill 列、不再壓縮閱讀區 */
    .tut-layout { grid-template-columns: 1fr; gap: 16px; }
    .tut-toc {
        position: static;
        max-height: none;
        padding: 10px 12px;
    }
    .tut-toc-title { margin-bottom: 8px; }
    .tut-toc ol {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }
    .tut-toc li { margin: 0; flex-shrink: 0; }
    .tut-toc a {
        white-space: nowrap;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid var(--line);
        font-size: 11.5px;
        padding: 5px 10px;
    }

    .step { margin-bottom: 50px; }
    .step-h { gap: 10px; margin-bottom: 12px; }
    .step-num { width: 32px; height: 32px; font-size: 14px; }
    .step-title { font-size: 19px; }
    .step-body { font-size: 13.5px; }
    .step-body pre { padding: 12px 14px; font-size: 11.5px; }
    .callout { padding: 10px 14px; font-size: 12.5px; }

    /* step 內各種 mini mockup 內距縮一級 */
    .lic-mock, .imp-mock { padding: 16px; }
    .set-mock .body { padding: 12px 14px; }
    .set-mock .head { padding: 10px 14px; }
    .set-mock .foot { padding: 10px 14px; }
    .set-grid { grid-template-columns: 1fr; }

    /* Footer */
    .footer { padding: 40px 0 28px 0; margin-top: 40px; }
}

/* ===== Small phone（≤ 420px）===== */
@media (max-width: 420px) {
    /* nav 在 drawer 模式中，不需特別調 link 樣式 */
    .nav-brand { font-size: 13px; }
    .nav-brand img { width: 22px; height: 22px; }

    .hero-title { font-size: 28px; }
    .hero-sub { font-size: 13.5px; }
    .hero-title.hero-title-md { font-size: 23px; }
    .hero-sub.hero-sub-md { font-size: 12.5px; }
    .btn { padding: 11px 18px; font-size: 12.5px; }

    /* Tutorial 步驟區再縮一級 */
    .step-title { font-size: 17px; }
    .step-num { width: 28px; height: 28px; font-size: 12px; border-radius: 8px; }
    .step-body { font-size: 13px; }

    .hero-stats { grid-template-columns: 1fr 1fr; }
    .stat-num { font-size: 20px; }

    .section-title { font-size: 22px; }

    /* hero-cta 堆疊垂直 */
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { justify-content: center; }
}
