/* CoBooks 公開頁面（介紹、註冊、登入入口）。顏色取自 Logo 的藍色漸層與深藍字 */
:root {
	--cb-blue: #1d6ff2;
	--cb-blue-dark: #1557c7;
	--cb-cyan: #1fb6f0;
	--cb-ink: #0f172a;
	--cb-navy: #1e293b;
	--cb-muted: #64748b;
	--cb-line: #e2e8f0;
	--cb-bg: #f8fafc;
	--cb-soft: #eef5ff;
	--cb-danger: #dc2626;
	--cb-success: #16a34a;
	--cb-radius: 14px;
}

* { box-sizing: border-box; }
/* 按鈕等元件自己設了 display，會蓋掉 hidden 屬性（開站中就先冒出「前往我的 CoBooks」）*/
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
	color: var(--cb-ink);
	background: #fff;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
a { color: var(--cb-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 0.6em; color: var(--cb-ink); }
p { margin: 0 0 1em; }

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

/* 導覽列 */
.cb-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--cb-line); }
.cb-header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.cb-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--cb-navy); }
.cb-brand:hover { text-decoration: none; }
.cb-brand img { border-radius: 8px; }
.cb-nav { display: flex; align-items: center; gap: 24px; font-size: 15px; }
.cb-nav a:not(.cb-btn) { color: var(--cb-navy); }

/* 按鈕 */
.cb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 10px; padding: 12px 22px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.15s, box-shadow 0.15s; font-family: inherit; }
.cb-btn:hover { text-decoration: none; }
.cb-btn-primary { background: var(--cb-blue); color: #fff; box-shadow: 0 6px 16px rgba(29, 111, 242, 0.25); }
.cb-btn-primary:hover { background: var(--cb-blue-dark); }
.cb-btn-primary:disabled { background: #93b4ee; box-shadow: none; cursor: wait; }
.cb-btn-ghost { background: #fff; color: var(--cb-navy); border-color: var(--cb-line); }
.cb-btn-sm { padding: 8px 16px; font-size: 14px; }
.cb-btn-block { width: 100%; }

/* 首屏 */
.cb-hero { background: radial-gradient(1200px 500px at 80% -10%, #dff2ff 0%, transparent 60%), linear-gradient(180deg, #f5f9ff 0%, #fff 100%); padding: 80px 0 64px; }
.cb-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.cb-eyebrow { display: inline-block; font-size: 14px; font-weight: 600; color: var(--cb-blue); background: var(--cb-soft); border-radius: 999px; padding: 4px 12px; margin-bottom: 16px; }
.cb-hero h1 { font-size: 44px; letter-spacing: 0.5px; }
.cb-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--cb-blue), var(--cb-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cb-lead { font-size: 18px; color: #334155; max-width: 560px; }
.cb-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.cb-note { font-size: 14px; color: var(--cb-muted); margin-top: 12px; }
.cb-hero-card { background: #fff; border: 1px solid var(--cb-line); border-radius: 18px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08); padding: 24px; }
.cb-hero-card h3 { font-size: 15px; color: var(--cb-muted); font-weight: 600; margin-bottom: 12px; }
.cb-flow { list-style: none; margin: 0; padding: 0; }
.cb-flow li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--cb-line); font-size: 15px; }
.cb-flow li:last-child { border-bottom: 0; }
.cb-flow .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--cb-soft); color: var(--cb-blue); font-size: 13px; font-weight: 700; }
.cb-flow .tag { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 10px; background: #ecfdf5; color: var(--cb-success); white-space: nowrap; }
.cb-flow .tag.liability { background: #fff7ed; color: #c2410c; }

/* 區塊 */
.cb-section { padding: 72px 0; }
.cb-section-alt { background: var(--cb-bg); }
.cb-section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.cb-section-head h2 { font-size: 32px; }
.cb-section-head p { color: var(--cb-muted); font-size: 17px; }
.cb-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cb-card { background: #fff; border: 1px solid var(--cb-line); border-radius: var(--cb-radius); padding: 24px; }
.cb-card h3 { font-size: 18px; }
.cb-card p { color: #475569; font-size: 15px; margin: 0; }
.cb-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--cb-blue), var(--cb-cyan)); color: #fff; font-weight: 700; margin-bottom: 14px; }

.cb-split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.cb-checks { list-style: none; padding: 0; margin: 0; }
.cb-checks li { position: relative; padding-left: 28px; margin-bottom: 12px; color: #334155; }
.cb-checks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--cb-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.cb-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--cb-radius); overflow: hidden; border: 1px solid var(--cb-line); font-size: 15px; }
.cb-table th, .cb-table td { padding: 12px 16px; border-bottom: 1px solid var(--cb-line); text-align: left; }
.cb-table th { background: var(--cb-soft); color: var(--cb-navy); font-weight: 600; }
.cb-table tr:last-child td { border-bottom: 0; }

/* 價格 */
.cb-pricing { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cb-price-card { background: #fff; border: 2px solid var(--cb-blue); border-radius: 18px; padding: 28px; }
.cb-price { font-size: 44px; font-weight: 800; color: var(--cb-ink); }
.cb-price small { font-size: 16px; font-weight: 500; color: var(--cb-muted); }
.cb-price-plus { font-size: 18px; color: var(--cb-navy); margin-bottom: 16px; }
.cb-examples { background: var(--cb-bg); border: 1px solid var(--cb-line); border-radius: 18px; padding: 28px; }
.cb-examples h3 { font-size: 17px; }
.cb-examples dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0 0 16px; }
.cb-examples dt { color: #475569; }
.cb-examples dd { margin: 0; font-weight: 700; text-align: right; }

/* 常見問題 */
.cb-faq { max-width: 760px; margin: 0 auto; }
.cb-faq details { background: #fff; border: 1px solid var(--cb-line); border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; }
.cb-faq summary { cursor: pointer; font-weight: 600; }
.cb-faq details p { margin: 12px 0 0; color: #475569; }

.cb-final { text-align: center; background: linear-gradient(135deg, var(--cb-blue), #0f4fc0); color: #fff; padding: 64px 0; }
.cb-final h2 { color: #fff; font-size: 30px; }
.cb-final p { color: #dbeafe; }
.cb-final .cb-btn-primary { background: #fff; color: var(--cb-blue); box-shadow: none; }

/* 表單頁（註冊、登入入口、開站中） */
.cb-form-page { background: linear-gradient(180deg, #f5f9ff 0%, #fff 60%); min-height: calc(100vh - 64px - 140px); padding: 56px 0; }
.cb-form-card { max-width: 520px; margin: 0 auto; background: #fff; border: 1px solid var(--cb-line); border-radius: 18px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.06); padding: 32px; }
.cb-form-card h1 { font-size: 26px; }
.cb-form-card .cb-sub { color: var(--cb-muted); margin-bottom: 24px; }
.cb-field { margin-bottom: 18px; }
.cb-field label { display: block; font-size: 14px; font-weight: 600; color: var(--cb-navy); margin-bottom: 6px; }
.cb-field label .opt { font-weight: 400; color: var(--cb-muted); }
.cb-input { width: 100%; height: 44px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 0 12px; font-size: 16px; font-family: inherit; background: #fff; }
.cb-input:focus { outline: none; border-color: var(--cb-blue); box-shadow: 0 0 0 3px rgba(29, 111, 242, 0.15); }
.cb-input-group { display: flex; align-items: stretch; }
.cb-input-group .cb-input { border-radius: 10px 0 0 10px; }
.cb-suffix { display: flex; align-items: center; padding: 0 12px; background: var(--cb-bg); border: 1px solid #cbd5e1; border-left: 0; border-radius: 0 10px 10px 0; color: var(--cb-muted); font-size: 15px; white-space: nowrap; }
.cb-hint { font-size: 13px; color: var(--cb-muted); margin-top: 6px; }
.cb-hint.ok { color: var(--cb-success); }
.cb-hint.bad { color: var(--cb-danger); }
/* 單選卡片（營業稅身分） */
.cb-choices { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.cb-choices legend { font-size: 14px; font-weight: 600; color: var(--cb-navy); margin-bottom: 6px; padding: 0; }
.cb-field label.cb-choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: inherit; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.cb-choice:has(input:checked) { border-color: var(--cb-blue); background: #f5f9ff; }
.cb-choice input { margin-top: 4px; accent-color: var(--cb-blue); }
.cb-choice strong { display: block; font-size: 15px; color: var(--cb-navy); }
.cb-choice small { display: block; font-size: 13px; color: var(--cb-muted); margin-top: 2px; }
.cb-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.cb-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cb-divider { border: 0; border-top: 1px solid var(--cb-line); margin: 24px 0; }

.cb-steps { list-style: none; padding: 0; margin: 24px 0; }
.cb-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--cb-muted); }
.cb-steps li .mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--cb-line); flex: none; }
.cb-steps li.done { color: var(--cb-ink); }
.cb-steps li.done .mark { background: var(--cb-success); border-color: var(--cb-success); }
.cb-steps li.now { color: var(--cb-ink); font-weight: 600; }
.cb-steps li.now .mark { border-color: var(--cb-blue); border-top-color: transparent; animation: cb-spin 0.9s linear infinite; }
@keyframes cb-spin { to { transform: rotate(360deg); } }

/* 頁尾 */
.cb-footer { border-top: 1px solid var(--cb-line); padding: 32px 0; color: var(--cb-muted); font-size: 14px; }
.cb-footer-inner { display: flex; justify-content: space-between; gap: 24px; }
.cb-footer p { margin: 4px 0 0; }
.cb-brand-footer { font-size: 16px; }
.cb-footer-meta { text-align: right; }

@media (max-width: 900px) {
	.cb-hero { padding: 48px 0; }
	.cb-hero-grid, .cb-split, .cb-pricing { grid-template-columns: 1fr; }
	.cb-hero h1 { font-size: 32px; }
	.cb-grid-3 { grid-template-columns: 1fr; }
	.cb-section { padding: 48px 0; }
	.cb-section-head h2 { font-size: 26px; }
	.cb-nav a:not(.cb-btn):not(.cb-nav-keep) { display: none; }
	.cb-row-2 { grid-template-columns: 1fr; }
	.cb-footer-inner { flex-direction: column; }
	.cb-footer-meta { text-align: left; }
	.cb-form-card { padding: 24px 20px; }
}

/* 方案與付款 */
.cb-billing { max-width: 640px; }
.cb-billing .cb-form-card { max-width: none; margin-bottom: 20px; }
.cb-billing h2 { font-size: 20px; }
.cb-billing-company { margin-bottom: 4px; }
.cb-billing-state { font-weight: 600; margin-bottom: 16px; }
.cb-billing-state.ok { color: var(--cb-success); }
.cb-billing-state.bad { color: var(--cb-danger); }
.cb-billing-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 20px; }
.cb-billing-facts dt { color: var(--cb-muted); }
.cb-billing-facts dd { margin: 0; font-weight: 600; }
.cb-billing-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-billing .cb-hint.ok { margin: 0 0 16px; }
.cb-tp-field { padding-top: 11px; }
.cb-billing-table-wrap { overflow-x: auto; }
.cb-billing .cb-table { font-size: 14px; }
.cb-billing .cb-table th, .cb-billing .cb-table td { padding: 10px 12px; white-space: nowrap; }
