/* ============================================================
   区域服务商申请页（app/home/user/agent_apply.php）专用样式
   设计语言：机构文件式 · 暖白纸底 · 墨黑文字 · 唯一哑光古铜强调色
   去 AI 味：无渐变、无发光阴影、无大圆角、无 pulse、无 emoji 装饰
   约定：本页固定浅色纸底（不随主题切换），与站点深色顶栏形成反差；
        所有 JS 依赖的功能类（.ag-step / .level-card / .ag-add-area /
        .form-input / .ag-summary / 弹窗 / toast / 收益测算 / 数据带 /
        FAQ 等）语义与存在均保留，仅重做视觉。
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
    --ink: #17191C;          /* 墨黑 */
    --paper: #F5F4F1;        /* 暖白纸底 */
    --tint: #EDECE8;         /* 浅灰底 */
    --card: #FFFFFF;         /* 卡片白 */
    --line: #DCDCD6;         /* 分隔线 */
    --line-soft: #E9E8E3;    /* 更浅分隔线 */
    --line-strong: #D3D2CC;  /* 强分隔线 */
    --accent: #8A6A2B;       /* 哑光古铜 */
    --accent-ink: #6B5220;   /* 古铜深 */
    --accent-soft: #F7F3E9;  /* 古铜浅底 */
    --accent-line: #DCD3BF;  /* 古铜描边 */
    --body: #4A4F55;         /* 次级文字 */
    --muted: #8A8F94;        /* 静默文字 */
    --ok: #3E8E6E;           /* 哑光绿（通过） */
    --bad: #B4453A;          /* 哑光红（拒绝） */
    --mono: ui-monospace, "SF Mono", "IBM Plex Mono", Menlo, Consolas, monospace;
}

/* ---------- 页面骨架 ---------- */
.ag-page {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ag-page [hidden] {
    display: none !important;
}

/* 固定浅色纸底容器（覆盖 uc-layout 的主题背景） */
.ag-shell {
    background: var(--paper);
    color: var(--ink);
}

/* 工作台分栏：左说明 + 右表单 */
.ag-layout {
    display: grid;
    grid-template-columns: 372px 1fr;
    align-items: start;
    gap: 0;
}

/* 左栏：合作说明（编辑式） */
.ag-aside {
    background: var(--tint);
    border-right: 1px solid var(--line);
    padding: 36px 32px 44px;
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100%;
}

.ag-aside-eyebrow {
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--accent);
    font-family: var(--mono);
    margin-bottom: 18px;
}

.ag-aside-title {
    font-size: 30px;
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--ink);
    margin: 0 0 10px;
}

.ag-aside-rule {
    width: 36px;
    height: 3px;
    background: var(--accent);
    margin: 0 0 22px;
}

.ag-aside-lead {
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--body);
    margin: 0 0 30px;
}

.ag-aside-group {
    margin-top: 26px;
}

.ag-aside-h {
    font-size: 11.5px;
    letter-spacing: 1px;
    color: var(--ink);
    font-weight: 600;
    margin: 0 0 14px;
}

.ag-aside-h span {
    color: var(--muted);
    font-weight: 400;
    font-family: var(--mono);
    letter-spacing: 0.5px;
}

.ag-rule-row {
    display: flex;
    gap: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--body);
    padding: 9px 0;
    border-top: 1px solid var(--line-strong);
}

.ag-rule-row:first-child { border-top: 0; }

.ag-rule-no {
    flex: 0 0 22px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--accent);
    padding-top: 1px;
}

.ag-stat-list { margin: 0; }

.ag-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 9px 0;
    border-top: 1px solid var(--line-strong);
}

.ag-stat-row:first-child { border-top: 0; }

.ag-stat-row .l { font-size: 13px; color: var(--body); }
.ag-stat-row .v { font-family: var(--mono); font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }

.ag-aside-note {
    font-size: 11px;
    line-height: 1.7;
    color: var(--muted);
    margin: 14px 0 0;
}

.ag-compliance {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line-strong);
}

.ag-compliance p {
    font-size: 11.5px;
    line-height: 1.75;
    color: var(--body);
    margin: 0 0 10px;
}

.ag-compliance a {
    color: var(--accent);
    text-decoration: none;
    font-size: 11.5px;
}

.ag-compliance a:hover { color: var(--accent-ink); text-decoration: underline; }

/* 右栏：申请工作台 */
.ag-workbench {
    padding: 36px 40px 48px;
    min-width: 0;
}

/* 工作台标题区：文件抬头式锚点，给长表单一个明确的视觉起点 */
.ag-wb-head {
    position: relative;
    margin: 0 0 26px;
    padding-top: 18px;
}

.ag-wb-head::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--accent);
}

.ag-wb-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.4px;
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 8px;
}

.ag-wb-sub {
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--body);
    margin: 0 0 14px;
    max-width: 720px;
}

.ag-wb-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

/* ---------- 状态条（常驻） ---------- */
.apply-status {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    padding: 18px 22px;
    margin-bottom: 22px;
}

.apply-status.is-pending { border-left-color: var(--accent); }
.apply-status.is-approved { border-left-color: var(--ok); }
.apply-status.is-rejected { border-left-color: var(--bad); }

.status-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.status-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tint);
    color: var(--accent);
}

.status-icon.approved { color: var(--ok); }
.status-icon.rejected { color: var(--bad); }

.status-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 4px;
}

.status-info p {
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--body);
    margin: 0;
}

.status-detail {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
}

.status-item-label {
    font-size: 11.5px;
    color: var(--muted);
    margin-bottom: 4px;
}

.status-item-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    font-family: var(--mono);
}

.areas-section {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--tint);
    border: 1px solid var(--line);
}

.areas-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 10px;
}

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

.area-tag {
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    padding: 5px 12px;
    font-size: 12.5px;
    color: var(--body);
    font-family: var(--mono);
}

.ag-status-actions { margin-top: 16px; }

/* ---------- 表单卡（原 .ag-wizard 容器） ---------- */
.ag-wizard {
    background: var(--card);
    border: 1px solid var(--line);
    margin: 0;
    padding: 0;
    --ag-accent: #8A6A2B;
    --ag-accent-light: #B9924A;
}

/* 进度条 / 上一步 / 下一步：单屏表单下隐藏（功能保留，仅视觉移除） */
.ag-wiz-progress,
#agBack,
#agNext {
    display: none !important;
}

/* 区块（原 .ag-step）：编号 + 标题 + 内容，靠 1px 细线分隔 */
.ag-wizard {
    counter-reset: agstep;
}

.ag-step {
    padding: 26px 28px;
    border-top: 1px solid var(--line-soft);
    display: block;
}

.ag-step:first-of-type { border-top: 0; }

.ag-step-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 6px;
    letter-spacing: 0.3px;
}

.ag-step-title::before {
    content: counter(agstep, decimal-leading-zero);
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
    margin-right: 12px;
    font-weight: 600;
    vertical-align: 2px;
}

.ag-step-sub {
    font-size: 13px;
    line-height: 1.7;
    color: var(--body);
    margin: 0 0 20px;
    padding-left: 30px;
}

.ag-step-note {
    font-size: 11.5px;
    color: var(--muted);
    margin: 14px 0 0;
    padding-left: 30px;
}

/* ---------- 等级：表格化单选行（保留 .level-card 钩子） ---------- */
.level-selector {
    display: block;
    border: 1px solid var(--line);
    margin-left: 30px;
}

.ag-level-thead,
.level-card {
    display: grid;
    grid-template-columns: 26px 1.4fr 130px 120px 1.6fr;
    align-items: center;
    column-gap: 16px;
    padding: 0 18px;
}

.ag-level-thead {
    height: 42px;
    background: var(--tint);
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    letter-spacing: 0.5px;
    color: var(--muted);
    font-weight: 600;
}

.ag-level-thead > span { padding: 0; }

.level-card {
    position: relative;
    width: 100%;
    min-height: 60px;
    text-align: left;
    font-family: inherit;
    background: var(--card);
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    cursor: pointer;
    color: var(--ink);
    transition: background 0.15s ease;
}

.level-card:last-of-type { border-bottom: 0; }

@media (hover: hover) and (pointer: fine) {
    .level-card:hover { background: var(--tint); }
}

.level-card.active {
    background: var(--accent-soft);
    box-shadow: inset 3px 0 0 var(--accent);
}

.level-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.level-card .ag-radio {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--line-strong);
    position: relative;
    flex: 0 0 auto;
    justify-self: center;
}

.level-card.active .ag-radio {
    border-color: var(--accent);
    background: var(--accent);
}

.level-card.active .ag-radio::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--card);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.level-icon {
    display: none;
}

.level-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.level-card.active .level-name { color: var(--accent-ink); }

.level-desc {
    font-size: 12.5px;
    color: var(--body);
}

.level-card.active .level-desc { color: var(--accent-ink); }

.level-investment {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    font-family: var(--mono);
}

.level-card.active .level-investment { color: var(--accent-ink); }

.level-fit {
    font-size: 12px;
    line-height: 1.5;
    color: var(--body);
    border-left: 1px solid var(--line-soft);
    padding-left: 16px;
}

.level-flag {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 10px;
    color: var(--accent-ink);
    background: var(--accent-line);
    padding: 2px 8px;
    border-radius: 2px;
    letter-spacing: 0.3px;
}

/* ---------- 区域选择 ---------- */
.ag-add-area {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border: 1px dashed var(--line-strong);
    background: var(--card);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    margin-left: 30px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .ag-add-area:hover { border-color: var(--accent); background: var(--accent-soft); }
}

/* 去 pulse：保留类名避免 JS 报错，但不再发光 */
.ag-add-area.is-pulse { border-color: var(--accent); }

.ag-add-plus {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    color: var(--card);
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    border-radius: 2px;
}

.ag-add-text { display: flex; flex-direction: column; gap: 3px; }

.ag-add-text strong { font-size: 14px; color: var(--ink); font-weight: 600; }

.ag-add-text em { font-style: normal; font-size: 12px; color: var(--muted); }

.ag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px 30px;
    padding: 0;
    list-style: none;
}

.ag-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 12px;
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    color: var(--ink);
    font-size: 12.5px;
    font-family: var(--mono);
}

.ag-chip .ag-svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }

.ag-chip-x {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
    .ag-chip-x:hover { color: var(--bad); }
}

.ag-empty {
    margin: 0 0 14px 30px;
    padding: 22px 16px;
    border: 1px dashed var(--line-strong);
    text-align: center;
}

.ag-empty-ico { color: var(--muted); line-height: 0; margin-bottom: 8px; }
.ag-empty-title { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.ag-empty-desc { font-size: 12px; color: var(--muted); }

/* ---------- 表单字段 ---------- */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-left: 30px;
}

.form-group { margin-bottom: 16px; }

.form-group.full-width { grid-column: span 2; }

.form-label {
    display: block;
    color: var(--body);
    font-size: 12.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-label .required { color: var(--bad); margin-left: 2px; }

.form-input,
.form-select {
    width: 100%;
    height: 46px;
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    padding: 0 14px;
    color: var(--ink);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
    outline: none;
}

.form-input.is-invalid {
    border-color: var(--bad);
    box-shadow: 0 0 0 2px rgba(180, 69, 58, 0.12);
}

.form-textarea {
    width: 100%;
    min-height: 96px;
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    padding: 12px 14px;
    color: var(--ink);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.7;
    resize: vertical;
}

.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
    outline: none;
}

.ag-field-error {
    margin-top: 6px;
    font-size: 12px;
    color: var(--bad);
}

/* 访客（未登录）开户区块：短信验证码 + 同意成为会员 */
.ag-guest-block {
    margin: 20px 0 0 30px;
    padding: 18px 20px 20px;
    border: 1px solid var(--accent-line);
    border-radius: 2px;
    background: var(--accent-soft);
}

.ag-guest-note {
    margin: 0 0 14px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--accent-ink);
}

.ag-code-group { margin-bottom: 14px; }

.ag-code-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.ag-code-row .form-input {
    flex: 1;
    letter-spacing: 2px;
    font-family: var(--mono);
}

.ag-code-btn {
    flex: 0 0 auto;
    min-width: 116px;
    height: 46px;
    padding: 0 16px;
    background: var(--card);
    border: 1px solid var(--accent);
    border-radius: 2px;
    color: var(--accent-ink);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.ag-code-btn:hover { background: var(--accent); color: #fff; }
.ag-code-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ag-code-btn.is-counting { color: var(--muted); border-color: var(--line-strong); background: var(--card); }

.ag-agree {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--body);
    cursor: pointer;
}

.ag-agree input { margin-top: 3px; flex: 0 0 auto; accent-color: var(--accent); }

.ag-agree-link {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    cursor: pointer;
}

.ag-agree-link:hover { color: var(--accent-ink); }
.ag-agree-link:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

/* 选填资料折叠 */
.ag-extra {
    margin: 16px 0 0 30px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: var(--paper);
}

.ag-extra summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--body);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ag-extra summary::-webkit-details-marker { display: none; }

.ag-extra summary::after {
    content: '+';
    font-size: 18px;
    color: var(--accent);
    line-height: 1;
}

.ag-extra[open] summary::after { transform: rotate(45deg); display: inline-block; }

.ag-extra-body {
    padding: 4px 18px 14px;
    border-top: 1px dashed var(--line);
}

/* ---------- 确认摘要 ---------- */
.ag-summary {
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 0 14px 30px;
}

.ag-summary-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line-soft);
}

.ag-summary-row:last-child { border-bottom: 0; }

.ag-summary-label {
    flex: 0 0 80px;
    font-size: 12.5px;
    color: var(--muted);
}

.ag-summary-value {
    flex: 1 1 auto;
    font-size: 13.5px;
    color: var(--ink);
    font-weight: 600;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ag-summary-value em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--muted); }

.ag-summary-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.ag-summary-chips i {
    font-style: normal;
    padding: 3px 10px;
    border-radius: 2px;
    background: var(--tint);
    border: 1px solid var(--line-strong);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    font-family: var(--mono);
}

.ag-consent {
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--muted);
    margin: 0 0 8px 30px;
}

/* ---------- 底部动作区：协议 + 按钮 ---------- */
.ag-wiz-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 28px;
    background: var(--tint);
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.ag-wiz-actions .ag-btn-plain { flex: 0 0 auto; }

.ag-wiz-actions .ag-submit-cta { margin-left: auto; }

/* 全宽大提交按钮（古铜实底，无发光） */
.ag-submit-cta {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-width: 200px;
    height: 46px;
    padding: 8px 24px;
    border: 0;
    border-radius: 2px;
    background: var(--ink);
    color: var(--card);
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ag-submit-cta:hover { background: #000; }

.ag-submit-main { font-size: 14px; font-weight: 600; letter-spacing: 0.5px; line-height: 1.3; }

.ag-submit-hint { font-size: 10.5px; opacity: 0.7; }

.ag-submit-cta:disabled,
.ag-submit-cta.is-loading { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

.ag-submit-cta.is-ready { animation: none; }

/* 提交按钮强制显示（覆盖 BOOT.open 时 setStep 设置的 hidden） */
.ag-wizard #agSubmit { display: inline-flex !important; }

/* 单屏表单：始终展开所有步骤，忽略 JS 在报错时对各步骤设置的 hidden，
   保证“一屏三项”布局不被折叠（逻辑仍按 JS 走，仅视觉不收起） */
.ag-wizard .ag-step[hidden] { display: block !important; }

/* ---------- 通用按钮 ---------- */
.ag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 24px;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ag-btn-gold {
    background: var(--ink);
    color: var(--card);
    border-color: var(--ink);
}

.ag-btn-gold:hover { background: #000; }

.ag-btn-plain {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    height: 44px;
    font-size: 13.5px;
    padding: 0 20px;
}

@media (hover: hover) and (pointer: fine) {
    .ag-btn-plain:hover { border-color: var(--accent); color: var(--accent-ink); }
}

.ag-btn-ghost { display: none !important; }

/* ---------- 追加区域 ---------- */
.ag-append {
    margin-top: 18px;
    padding: 22px 24px;
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
}

.ag-append-title { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.ag-append-sub { font-size: 12.5px; line-height: 1.7; color: var(--body); margin: 0 0 16px; }

/* ---------- 了解更多（默认收起） ---------- */
.ag-more { margin-top: 32px; }

.ag-more-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--card);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: border-color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .ag-more-toggle:hover { border-color: var(--accent); }
}

.ag-more-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.ag-more-title em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--muted); }

.ag-more-arrow {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-right: 6px;
}

.ag-more-toggle.is-open .ag-more-arrow { transform: rotate(-135deg); border-color: var(--accent); }

.ag-more-body {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 22px;
    padding-top: 4px;
}

/* 区块通用标题（ag-more 内） */
.ag-section-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--ink);
    margin: 0 0 6px;
}

.ag-section-sub {
    font-size: 13px;
    color: var(--body);
    margin: 0 0 20px;
}

/* 数据带 */
.ag-stats-band {
    border: 1px solid var(--line);
    background: var(--card);
    padding: 24px 24px 20px;
}

.ag-stats-title {
    font-size: 11.5px;
    letter-spacing: 1px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 20px;
}

.ag-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }

.ag-stat { text-align: center; }

.ag-stat-num {
    display: block;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--ink);
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

.ag-stat-label { display: block; margin-top: 8px; font-size: 12px; color: var(--body); }

/* 权益（原八宫格 → 克制列表/网格） */
.ag-perks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.ag-perk {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 20px 18px;
}

.ag-perk-ico {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tint);
    color: var(--accent);
    margin-bottom: 12px;
    border-radius: 2px;
}

.ag-perk h4 { font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.ag-perk p { font-size: 12px; line-height: 1.7; color: var(--body); margin: 0; }

/* SVG 图标尺寸 */
.ag-svg { width: 22px; height: 22px; display: inline-block; vertical-align: middle; }

/* 收益测算器 */
.ag-calc {
    background: var(--card);
    border: 1px solid var(--line);
    padding: 24px;
}

.ag-calc-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.ag-calc-label { display: block; font-size: 12.5px; color: var(--body); margin-bottom: 10px; }
.ag-calc label span { color: var(--ink); font-weight: 600; }

.ag-calc-range { width: 100%; accent-color: var(--accent); cursor: pointer; margin-top: 12px; }

.ag-calc-out {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 22px;
    border: 1px solid var(--line-strong);
    background: var(--tint);
}

.ag-calc-out > div:first-child { font-size: 14px; color: var(--body); }

.ag-calc-out strong {
    font-size: 26px;
    font-weight: 800;
    color: var(--ink);
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

.ag-calc-note { font-size: 11.5px; line-height: 1.7; color: var(--muted); }

/* 入驻流程 */
.ag-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.ag-flow-step {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-top: 2px solid var(--accent);
    border-radius: 2px;
    padding: 24px 18px 18px;
}

.ag-flow-step h4 { font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.ag-flow-step p { font-size: 12px; line-height: 1.7; color: var(--body); margin: 0; }

/* FAQ */
.ag-faq-list { display: flex; flex-direction: column; gap: 10px; }

.ag-faq-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 0 20px;
}

.ag-faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 15px 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ag-faq-item summary::-webkit-details-marker { display: none; }

.ag-faq-item summary::after {
    content: '+';
    font-size: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

.ag-faq-item[open] summary { border-bottom: 1px dashed var(--line); }

.ag-faq-item[open] summary::after { transform: rotate(45deg); display: inline-block; }

.ag-faq-item p { font-size: 12.5px; line-height: 1.8; color: var(--body); padding: 14px 0 16px; margin: 0; }

/* ---------- 移动端底部吸附 CTA ---------- */
.ag-cta-bar {
    display: none;
}

/* 进入表单或表单内提交按钮可见时收起，避免双提交入口（JS 早已调用此类，此处补齐样式） */
.ag-cta-bar.is-hidden { display: none !important; }

/* ============================================================
   地址选择弹窗
   ============================================================ */
.address-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 19, 24, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.address-modal-overlay.show { display: flex; }

.address-modal {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 2px;
    width: 100%;
    max-width: 520px;
    max-height: 86vh;
    overflow-y: auto;
    position: relative;
}

.address-modal-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.address-modal-title { font-size: 16px; font-weight: 700; color: var(--ink); }

.address-modal-close { font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }

@media (hover: hover) and (pointer: fine) {
    .address-modal-close:hover { color: var(--ink); }
}

/* 地址选择器自带浅色样式（白底深字），这里给一块白底，避免深色主题下看不清 */
.address-modal-body {
    padding: 18px 22px;
    background: #fff;
    color: #606266;
}

.address-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-btn {
    padding: 10px 22px;
    border-radius: 2px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid var(--line-strong);
    transition: all 0.15s ease;
}

.modal-btn.primary { background: var(--ink); color: var(--card); border-color: var(--ink); }

@media (hover: hover) and (pointer: fine) {
    .modal-btn.primary:hover { background: #000; }
}

.modal-btn.secondary { background: transparent; color: var(--ink); }

.modal-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   提交结果弹窗 + 推荐
   ============================================================ */
html.ag-feedback-on .ag-feedback-inline { display: none; }

.ag-result-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(17, 19, 24, 0.62);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.ag-result-overlay.show { opacity:1; visibility: visible; }

.ag-result-card {
    position: relative;
    width: 100%;
    max-width: min(460px, calc(100vw - 32px));
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 26px 22px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 2px;
    text-align: center;
    transform: translateY(12px);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.ag-result-overlay.show .ag-result-card { transform: translateY(0); }

.ag-result-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

/* 新会员卡（隐式注册成功后展示） */
.ag-member-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 16px 0 4px;
    padding: 16px 18px;
    text-align: left;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    border-radius: 2px;
}

.ag-member-badge {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-ink);
    background: var(--card);
    border: 1px solid var(--accent-line);
    border-radius: 2px;
}

.ag-member-badge svg { width: 26px; height: 26px; }

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

.ag-member-eyebrow {
    font-size: 10px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--accent-ink);
    margin-bottom: 3px;
}

.ag-member-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
}

.ag-member-no {
    font-size: 13px;
    color: var(--body);
    margin-bottom: 6px;
}

.ag-member-no strong {
    font-family: var(--mono);
    letter-spacing: 1px;
    color: var(--accent-ink);
}

.ag-member-tip {
    margin: 0;
    font-size: 12px;
    line-height: 1.65;
    color: var(--muted);
}

.ag-result-badge { display: flex; justify-content: center; margin-bottom: 4px; }

.ag-result-check { width: 56px; height: 56px; }

.ag-result-check-ring { stroke: var(--ok); stroke-width: 2.4; stroke-dasharray: 145; stroke-dashoffset: 145; }
.ag-result-check-mark { stroke: var(--ok); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }

.ag-result-overlay.show .ag-result-check-ring { animation: agRingDraw 0.5s ease-out forwards; }
.ag-result-overlay.show .ag-result-check-mark { animation: agMarkDraw 0.3s 0.4s ease-out forwards; }

@keyframes agRingDraw { to { stroke-dashoffset: 0; } }
@keyframes agMarkDraw { to { stroke-dashoffset: 0; } }

.ag-result-eyebrow { margin-bottom: 6px; color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: 0.18em; }

.ag-result-title { margin: 0 0 8px; font-size: 18px; font-weight: 700; line-height: 1.45; color: var(--ink); }

.ag-result-sub { margin: 0 0 18px; font-size: 12.5px; line-height: 1.7; color: var(--body); }

.ag-result-rows { margin: 0 0 18px; padding: 0; text-align: left; }

.ag-result-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid var(--line-soft);
}

.ag-result-row:last-child { border-bottom: 1px solid var(--line-soft); }

.ag-result-row dt { flex: 0 0 auto; font-size: 12.5px; color: var(--muted); }
.ag-result-row dd { margin: 0; flex: 1 1 auto; text-align: right; font-size: 13px; color: var(--ink); }

.ag-result-no { font-family: var(--mono); letter-spacing: 0.04em; color: var(--accent-ink); }

.ag-result-areas { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.ag-result-area {
    padding: 3px 9px;
    border-radius: 2px;
    background: var(--tint);
    border: 1px solid var(--line-strong);
    color: var(--ink);
    font-size: 12px;
    line-height: 1.5;
    font-family: var(--mono);
}

.ag-result-area.more { background: var(--paper); border-color: var(--line); color: var(--body); }

.ag-result-steps { display: flex; margin: 0 0 18px; padding: 0; list-style: none; }

.ag-result-steps li {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    padding-top: 22px;
    font-size: 11px;
    color: var(--muted);
}

.ag-result-steps li::before {
    content: '';
    position: absolute;
    top: 6px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: var(--line);
}

.ag-result-steps li:first-child::before { display: none; }

.ag-result-dot {
    position: absolute;
    top: 0;
    left: 50%;
    box-sizing: border-box;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: var(--card);
}

.ag-result-step-txt { display: block; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ag-result-steps li.done { color: var(--body); }
.ag-result-steps li.done .ag-result-dot { border-color: var(--ok); background: var(--ok); }
.ag-result-steps li.done::before,
.ag-result-steps li.current::before { background: var(--ok); }

.ag-result-steps li.current { color: var(--accent-ink); font-weight: 600; }
.ag-result-steps li.current .ag-result-dot { border-color: var(--accent); background: var(--accent); }

.ag-result-actions { display: flex; gap: 12px; margin-bottom: 14px; }

.ag-result-btn {
    flex: 1 1 0;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    background: var(--card);
    color: var(--ink);
}

.ag-result-btn.primary { background: var(--ink); color: var(--card); border-color: var(--ink); }

@media (hover: hover) and (pointer: fine) {
    .ag-result-btn.primary:hover { background: #000; }
    .ag-result-btn.secondary:hover { border-color: var(--accent); color: var(--accent-ink); }
}

.ag-invite {
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px dashed var(--line-strong);
    border-radius: 2px;
    text-align: left;
    background: var(--tint);
}

.ag-invite h4 { font-size: 13.5px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.ag-invite p { font-size: 12px; line-height: 1.7; color: var(--body); margin: 0 0 12px; }

.ag-invite-actions { display: flex; gap: 10px; }
.ag-invite-actions .ag-result-btn { height: 38px; font-size: 12.5px; }

.ag-result-note { margin: 0; font-size: 11.5px; line-height: 1.7; color: var(--muted); }

/* 会员协议弹窗（访客） */
.ag-pact-overlay {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(17, 19, 24, 0.62);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.ag-pact-overlay.show { opacity: 1; visibility: visible; }

.ag-pact-card {
    position: relative;
    width: 100%;
    max-width: min(520px, calc(100vw - 32px));
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 26px 0 18px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 2px;
    text-align: center;
    transform: translateY(12px);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.ag-pact-overlay.show .ag-pact-card { transform: translateY(0); }

.ag-pact-eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; color: var(--accent); }

.ag-pact-title { margin: 8px 0 4px; font-size: 19px; font-weight: 700; color: var(--ink); }

.ag-pact-meta { font-size: 11px; color: var(--muted); }

.ag-pact-body {
    max-height: 52vh;
    overflow-y: auto;
    margin-top: 14px;
    padding: 14px 26px 4px;
    border-top: 1px solid var(--line);
    text-align: left;
    scrollbar-width: thin;
}

.ag-pact-body p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.85; color: var(--body); }

.ag-pact-body h4 {
    margin: 14px 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}

.ag-pact-body h4:first-of-type { margin-top: 6px; }

.ag-pact-end { padding-bottom: 2px; color: var(--muted); }

.ag-pact-actions { display: flex; gap: 10px; padding: 16px 26px 0; }

.ag-pact-btn {
    flex: 1 1 0;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: var(--card);
    color: var(--body);
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.ag-pact-btn:hover { border-color: var(--ink); color: var(--ink); }

.ag-pact-btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.ag-pact-btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }

/* 弱反馈 toast */
.ag-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    z-index: 1300;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 32px);
    padding: 12px 18px;
    overflow: hidden;
    border: 1px solid var(--accent-line);
    border-radius: 2px;
    background: var(--ink);
    color: var(--card);
    font-size: 13.5px;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -14px);
    transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
}

.ag-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.ag-toast-ico {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--card);
    font-size: 12px;
}

/* 提交 loading spinner（克制） */
.ag-spin {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: var(--card);
    border-radius: 50%;
    display: inline-block;
    animation: agSpin 0.7s linear infinite;
}

@keyframes agSpin { to { transform: rotate(360deg); } }

/* 结果弹窗关闭后的状态卡高亮 */
.ag-flash { animation: agFlash 1.6s ease; }
@keyframes agFlash {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    30% { box-shadow: 0 0 0 3px var(--accent-soft); }
}

/* ============================================================
   响应式：窄屏 → 单列（移动端体验）
   ============================================================ */
@media (max-width: 1024px) {
    .ag-layout { grid-template-columns: 1fr; }
    .ag-aside {
        position: static;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 28px 24px 32px;
    }
    .ag-workbench { padding: 28px 24px 40px; }
}

@media (max-width: 720px) {
    /* 主任务优先：表单在前；合作说明后置但保留，避免关键规则被完全隐藏 */
    .ag-layout { display: flex; flex-direction: column; }
    .ag-workbench { order: 1; padding: 22px 18px 96px; }
    .ag-aside {
        display: block;
        order: 2;
        position: static;
        min-height: 0;
        border-right: 0;
        border-top: 1px solid var(--line);
        border-bottom: 0;
        padding: 28px 18px 36px;
        background: var(--tint);
    }
    .ag-aside-title { font-size: 22px; }
    .ag-aside-lead { font-size: 12.5px; line-height: 1.8; }
    .ag-aside-group { margin-top: 22px; }

    .ag-wb-head { padding-top: 14px; margin-bottom: 22px; }
    .ag-wb-title { font-size: 24px; }
    .ag-wb-sub { font-size: 12.5px; margin-bottom: 12px; }
    .ag-wb-meta { flex-direction: column; align-items: flex-start; gap: 4px; }

    .ag-step { padding: 22px 18px; }
    .ag-step-sub, .ag-step-note, .level-selector, .ag-add-area,
    .ag-chips, .ag-empty, .form-row, .ag-extra, .ag-summary, .ag-consent { margin-left: 0; }

    /* 等级表格 → 纵向卡片：每项独占网格行，杜绝元数据互相覆盖 */
    .ag-level-thead { display: none; }
    .level-card {
        grid-template-columns: 22px 1fr;
        grid-template-areas:
            "radio name"
            "radio desc"
            "radio invest"
            "radio fit";
        align-items: start;
        row-gap: 5px;
        min-height: 0;
        padding: 16px 16px 17px;
    }
    .level-card .ag-radio {
        grid-area: radio;
        justify-self: start;
        align-self: start;
        margin-top: 4px;
    }
    .level-name { grid-area: name; padding-right: 104px; }
    .level-desc { grid-area: desc; }
    .level-investment { grid-area: invest; }
    .level-fit { grid-area: fit; border-left: 0; padding-left: 0; }
    .level-desc::before,
    .level-investment::before {
        font-family: inherit;
        font-size: 11px;
        font-weight: 400;
        color: var(--muted);
    }
    .level-desc::before { content: '范围：'; }
    .level-investment::before { content: '投入：'; }
    .level-flag { top: 14px; right: 12px; }

    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-group.full-width { grid-column: auto; }
    .form-input, .form-select, .form-textarea { font-size: 16px; }

    .ag-wiz-actions { padding: 16px 18px; }
    .ag-wiz-actions .ag-submit-cta { margin-left: 0; width: 100%; }

    .ag-stats { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
    .ag-perks { grid-template-columns: 1fr 1fr; }
    .ag-calc-grid { grid-template-columns: 1fr; }
    .ag-flow { grid-template-columns: 1fr 1fr; }

    /* 移动端底部吸附 CTA：与内容形成层次分离，留足安全区 */
    .ag-cta-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
        background: var(--ink);
        border-top: 1px solid #000;
        box-shadow: 0 -2px 14px rgba(23, 25, 28, 0.1);
    }
    .ag-cta-bar .ag-cta-info { display: flex; flex-direction: column; }
    .ag-cta-bar strong { font-size: 13px; color: var(--card); }
    .ag-cta-bar span { font-size: 11px; color: rgba(245,244,241,0.6); }
    .ag-cta-bar .ag-btn-gold { flex: 0 0 auto; height: 44px; padding: 0 20px; }
}

/* 极窄屏：收紧留白，保证等级卡文字完整可读 */
@media (max-width: 400px) {
    .ag-workbench { padding-left: 14px; padding-right: 14px; }
    .ag-step { padding: 20px 14px; }
    .level-card { padding: 15px 12px 16px; }
    .level-name { padding-right: 88px; font-size: 13.5px; }
    .level-flag { font-size: 9px; padding: 2px 6px; }
    .ag-wb-title { font-size: 22px; }
}

/* 尊重系统的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    .ag-page *,
    .ag-page *::before,
    .ag-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
