/* ============================================================
   虹小轩 用户端统一设计系统 (user.css)
   极简风格 · 蓝色主调 · 净面实色卡片 · 统一导航
   所有用户端页面引入此文件，承载页面级样式（组件样式由 hxx-ui.css 提供）
   ============================================================ */

/* ---------- 设计令牌（:root --hxx-*）已提取至 HXX-UI 组件库（css/hxx-ui.css），本文件样式依赖其变量 ---------- */

/* ---------- 全局基础 ---------- */
html, body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
*, *::before, *::after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
body {
    background-color: var(--hxx-bg);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--hxx-text);
    line-height: 1.6;
    padding-top: var(--hxx-nav-height);
}
* {
    user-select: none;
    /* 注意：不要在通配符上设 color —— 会直接命中 .hxx-toast-text 等库组件内部元素，
       覆盖深色底组件（toast）的白字继承。文字色由 body 的 color 统一继承。 */
}

/* ---------- 超细滚动条（含 .hxx-scrolling/.hxx-scrollable 打点）已提取至 HXX-UI 组件库 ---------- */

/* ---------- 排版 ---------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--hxx-text);
    font-weight: 700;
    line-height: 1.3;
}
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 600; color: var(--hxx-text-2); }
p { color: var(--hxx-text-2); }
a { color: var(--hxx-primary); text-decoration: none; transition: color var(--hxx-t); }
a:hover { color: var(--hxx-primary-deep); }

/* ---------- 统一顶部导航栏 ---------- */
.hxx-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--hxx-nav-height);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hxx-border);
    z-index: 10001;
    display: flex;
    align-items: center;
    padding: 0 20px;
    transition: box-shadow var(--hxx-t);
}
.hxx-nav.scrolled {
    box-shadow: var(--hxx-shadow);
}
.hxx-nav-inner {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--hxx-gap-md);
}
.hxx-nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}
.hxx-nav-logo {
    width: 30px; height: 30px;
    background: var(--hxx-primary);
    border-radius: var(--hxx-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    flex-shrink: 0;
}
.hxx-nav-brand-text {
    font-size: 17px;
    font-weight: 700;
    color: var(--hxx-text);
    white-space: nowrap;
}
.hxx-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
}
.hxx-nav-link {
    padding: 7px 14px;
    border-radius: var(--hxx-radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--hxx-text-2);
    cursor: pointer;
    transition: all var(--hxx-t);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hxx-nav-link:hover {
    background: var(--hxx-hover);
    color: var(--hxx-text);
}
.hxx-nav-link:focus-visible {
    outline: none;
    background: var(--hxx-hover);
    color: var(--hxx-text);
}
.hxx-nav-link.active {
    background: var(--hxx-primary);
    color: #fff;
    font-weight: 600;
}
.hxx-nav-link.active:focus-visible {
    background: var(--hxx-primary);
    color: #fff;
}
.hxx-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.hxx-nav-icon-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--hxx-t);
    position: relative;
    color: var(--hxx-text-2);
    text-decoration: none;
}
.hxx-nav-icon-btn:hover { background: var(--hxx-hover); }
.hxx-nav-icon-btn svg { width: 20px; height: 20px; display: block; }
.hxx-nav-badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 16px; height: 16px;
    background: var(--hxx-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--hxx-radius-full);
    text-align: center;
    line-height: 16px;
    padding: 0 4px;
    border: 2px solid #fff;
}
.hxx-nav-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--hxx-border);
    cursor: pointer;
    transition: border-color var(--hxx-t);
}
.hxx-nav-avatar:hover { border-color: var(--hxx-primary); }
.hxx-nav-toggle {
    display: none;
    width: 36px; height: 36px;
    border-radius: var(--hxx-radius-sm);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--hxx-text);
}
.hxx-nav-toggle svg { width: 22px; height: 22px; }

/* 移动端导航抽屉 */
.hxx-nav-drawer {
    display: none;
    position: fixed;
    top: var(--hxx-nav-height); left: 0; right: 0;
    background: var(--hxx-surface);
    border-bottom: 1px solid var(--hxx-border);
    box-shadow: var(--hxx-shadow-md);
    z-index: 999;
    padding: 12px 20px;
    flex-direction: column;
    gap: 4px;
}
.hxx-nav-drawer.open {
    display: flex;
}
.hxx-nav-drawer .hxx-nav-link {
    padding: 12px 14px;
    border-radius: var(--hxx-radius-sm);
    font-size: 15px;
}

/* ---------- 页面容器 ----------
   注意：hxx-ui.css 的分页按钮也叫 .hxx-page（已限定为 .hxx-pagination .hxx-page），
   这里显式写全容器属性做兜底，防止 UI 库同名类再次污染整页布局
   （曾导致页面容器被渲染成 32px 高的 inline-flex 胶囊，内容全部挤成一行）。 */
.hxx-page,
.hxx-page-wide {
    display: block;
    position: static;
    height: auto;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--hxx-text);
    font-size: 14px;
    font-weight: 400;
    cursor: auto;
}
.hxx-page::after { content: none !important; }
.hxx-page {
    max-width: var(--hxx-content-width);
    margin: 0 auto;
    padding: 24px 16px 48px;
}
.hxx-page-wide {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}
.hxx-page-header {
    margin-bottom: 20px;
}
.hxx-page-header h1 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 4px;
}
.hxx-page-header p {
    font-size: 14px;
    color: var(--hxx-text-3);
    margin: 0;
}

/* ---------- 卡片：净面实色样式由 hxx-ui.css 的 .hxx-card 提供（契约 §10.1），
   这里只补堆叠间距与 h3（库内未定义） ---------- */
.hxx-card {
    margin-bottom: var(--hxx-gap-md);
}
.hxx-card h3 {
    margin: 16px 0 10px;
    font-size: 15px;
}

/* 卡片内分割线 */
.hxx-divider {
    height: 1px;
    background: var(--hxx-border);
    margin: 16px -20px;
    border: none;
}
.hxx-divider-sm {
    height: 1px;
    background: var(--hxx-border);
    margin: 12px 0;
    border: none;
}

/* ---------- 信息行列表 ---------- */
.hxx-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: var(--hxx-radius-sm);
    transition: background var(--hxx-t);
    gap: 12px;
}
.hxx-line:hover {
    background: var(--hxx-hover);
}
.hxx-line-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.hxx-line-icon {
    width: 36px; height: 36px;
    border-radius: var(--hxx-radius-sm);
    background: var(--hxx-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--hxx-text-2);
}
.hxx-line-icon svg { width: 18px; height: 18px; }
.hxx-line-icon img { width: 20px; height: 20px; }
.hxx-line-text {
    min-width: 0;
}
.hxx-line-label {
    font-size: 12px;
    color: var(--hxx-text-3);
    margin: 0;
    line-height: 1.4;
}
.hxx-line-value {
    font-size: 15px;
    color: var(--hxx-text);
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 按钮：样式由 hxx-ui.css 的 .hxx-btn 及变体类提供（契约 §10.2） ---------- */

/* ---------- 输入框 ---------- */
input, select, textarea {
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--hxx-border-strong);
    border-radius: var(--hxx-radius-sm);
    font-size: 14px;
    color: var(--hxx-text);
    background: var(--hxx-surface);
    transition: border-color var(--hxx-t), box-shadow var(--hxx-t);
    font-family: inherit;
    outline: none;
    width: 100%;
}
/* 输入框样式由 hxx-ui.css 的 .hxx-input 提供（38px，与按钮对齐） */
input::placeholder, textarea::placeholder {
    color: var(--hxx-text-placeholder);
}
/* 复选框/单选框不适用文本输入框的尺寸规则；
   :not(.hxx-*) 排除库自绘控件（.hxx-switch/.hxx-checkbox/.hxx-radio），
   避免本规则的属性选择器优先级压过库的类选择器 */
input[type="checkbox"]:not(.hxx-switch):not(.hxx-checkbox):not(.hxx-radio),
input[type="radio"]:not(.hxx-switch):not(.hxx-checkbox):not(.hxx-radio) {
    width: 16px;
    height: 16px;
    padding: 0;
    accent-color: var(--hxx-primary);
    cursor: pointer;
    flex-shrink: 0;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--hxx-primary);
    box-shadow: 0 0 0 3px rgba(21,138,255,0.1);
}
textarea {
    height: auto;
    min-height: 80px;
    padding: 10px 14px;
    resize: vertical;
    line-height: 1.6;
}
select {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238c8c9e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

/* ---------- 标签药丸 ---------- */
.hxx-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--hxx-radius-full);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}
.hxx-pill-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.hxx-pill-primary { background: var(--hxx-primary-soft); color: #0d6edb; }
.hxx-pill-primary .hxx-pill-dot { background: var(--hxx-primary); }
.hxx-pill-success { background: var(--hxx-success-soft); color: #15803d; }
.hxx-pill-success .hxx-pill-dot { background: var(--hxx-success); }
.hxx-pill-warning { background: var(--hxx-warning-soft); color: #b06f00; }
.hxx-pill-warning .hxx-pill-dot { background: var(--hxx-warning); }
.hxx-pill-danger { background: var(--hxx-danger-soft); color: #c0392b; }
.hxx-pill-danger .hxx-pill-dot { background: var(--hxx-danger); }
.hxx-pill-neutral { background: var(--hxx-neutral-soft); color: var(--hxx-text-2); }
.hxx-pill-neutral .hxx-pill-dot { background: var(--hxx-neutral); }

/* 兼容旧 hw-pill */
.hw-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--hxx-radius-full);
    font-size: 12px;
    font-weight: 600;
}

/* ---------- 工具栏 ---------- */
.hxx-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--hxx-tile);
    border-radius: var(--hxx-radius);
    margin-bottom: var(--hxx-gap-md);
    flex-wrap: wrap;
}
.hxx-toolbar input, .hxx-toolbar select, .hxx-toolbar .hxx-select-trigger {
    height: 36px;
    font-size: 13px;
    border: 1px solid var(--hxx-border);
    background: var(--hxx-surface);
}
.hxx-toolbar input { flex: 1; min-width: 140px; }

/* ---------- 标签页 ---------- */
.hxx-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--hxx-tile);
    border-radius: var(--hxx-radius);
    margin-bottom: var(--hxx-gap-md);
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
}
.hxx-tab {
    padding: 8px 16px;
    border-radius: var(--hxx-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--hxx-text-2);
    cursor: pointer;
    transition: all var(--hxx-t);
    white-space: nowrap;
    text-align: center;
    flex-shrink: 0;
}
.hxx-tab:hover { background: var(--hxx-surface); color: var(--hxx-text); }
.hxx-tab.active {
    background: var(--hxx-surface);
    color: var(--hxx-text);
    font-weight: 600;
    box-shadow: var(--hxx-shadow-xs);
}

/* ---------- 表格 ---------- */
.hxx-table-wrap {
    overflow-x: auto;
    border-radius: var(--hxx-radius);
    border: 1px solid var(--hxx-border);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--hxx-text-3);
    background: var(--hxx-muted);
    border-bottom: 1px solid var(--hxx-border);
    white-space: nowrap;
}
.data-table td {
    padding: 12px;
    color: var(--hxx-text);
    border-bottom: 1px solid var(--hxx-border);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr {
    transition: background var(--hxx-t-fast);
}
.data-table tbody tr:hover { background: var(--hxx-hover); }
.data-table .empty-cell {
    text-align: center;
    padding: 40px 12px;
    color: var(--hxx-text-3);
}
.data-table .empty-cell svg {
    width: 36px; height: 36px;
    opacity: 0.4;
    display: block;
    margin: 0 auto 8px;
}

/* 表格操作按钮 */
.btn-table-action, .hxx-btn-action {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--hxx-radius-full);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--hxx-t);
    border: 1px solid var(--hxx-border-strong);
    background: var(--hxx-surface);
    color: var(--hxx-text-2);
    margin: 0 2px;
}
.btn-table-action:hover, .hxx-btn-action:hover {
    background: var(--hxx-muted);
    border-color: var(--hxx-text-3);
}

/* ---------- 统计磁贴 ---------- */
.hxx-stat-grid {
    display: flex;
    gap: 12px;
    margin-bottom: var(--hxx-gap-md);
    flex-wrap: wrap;
}
.hxx-stat-item {
    flex: 1;
    min-width: 140px;
    background: var(--hxx-surface);
    border: 1px solid var(--hxx-border);
    border-radius: var(--hxx-radius);
    padding: 16px;
    transition: all var(--hxx-t);
}
.hxx-stat-item:hover {
    border-color: var(--hxx-border-strong);
    box-shadow: var(--hxx-shadow);
}
.hxx-stat-num {
    font-size: 26px;
    font-weight: 800;
    color: var(--hxx-text);
    margin: 0 0 2px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.hxx-stat-num.primary { color: var(--hxx-primary); }
.hxx-stat-label {
    font-size: 12px;
    color: var(--hxx-text-3);
    margin: 0;
}

/* ---------- 空状态：样式由 hxx-ui.css 的 .hxx-empty 提供 ---------- */

/* ---------- 加载（.hxx-loading/.hxx-spinner）已提取至 HXX-UI 组件库（css/hxx-ui.css）---------- */

/* ---------- 分页：容器样式由 hxx-ui.css 的 .hxx-pagination 提供；
   span 为项目页面无类名页码（如 <span>2 / 3</span>）的补充样式 ---------- */
.hxx-pagination span {
    font-size: 14px;
    color: var(--hxx-text-2);
    font-variant-numeric: tabular-nums;
}

/* ---------- 详情网格 ---------- */
.hxx-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.hxx-detail-field {
    padding: 12px 14px;
    border-bottom: 1px solid var(--hxx-border);
}
.hxx-detail-field-full { grid-column: 1 / -1; }
.hxx-detail-label {
    font-size: 12px;
    color: var(--hxx-text-3);
    margin: 0 0 3px;
}
.hxx-detail-value {
    font-size: 14px;
    color: var(--hxx-text);
    font-weight: 500;
    margin: 0;
    word-break: break-word;
}

/* ---------- 通知行 ---------- */
.hxx-notify-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: var(--hxx-radius-sm);
    gap: 12px;
}
.hxx-notify-row:hover { background: var(--hxx-hover); }
.hxx-notify-label { font-size: 14px; font-weight: 500; color: var(--hxx-text); margin: 0; }
.hxx-notify-desc { font-size: 12px; color: var(--hxx-text-3); margin: 2px 0 0; }

/* ---------- 进度条：样式由 hxx-ui.css 的 .hxx-progress/.hxx-progress-bar 提供 ---------- */

/* ---------- 头像：基础样式由 hxx-ui.css 的 .hxx-avatar 提供；
   这里仅补充 <img class="hxx-avatar"> 图片用法的描边与填充 ---------- */
.hxx-avatar {
    object-fit: cover;
    border: 1px solid var(--hxx-border);
    flex-shrink: 0;
}

/* ---------- 入场动画 ---------- */
@keyframes hxx-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hxx-fade { from { opacity: 0; } to { opacity: 1; } }
.hxx-enter { animation: hxx-fade-up 0.35s ease both; }
.hxx-fade { animation: hxx-fade 0.25s ease both; }
.hxx-enter:nth-child(1) { animation-delay: 0.03s; }
.hxx-enter:nth-child(2) { animation-delay: 0.06s; }
.hxx-enter:nth-child(3) { animation-delay: 0.09s; }
.hxx-enter:nth-child(4) { animation-delay: 0.12s; }
.hxx-enter:nth-child(5) { animation-delay: 0.15s; }
.hxx-enter:nth-child(6) { animation-delay: 0.18s; }
.hxx-enter:nth-child(7) { animation-delay: 0.21s; }
.hxx-enter:nth-child(8) { animation-delay: 0.24s; }

/* ---------- 图片预览 ---------- */
.img-preview-mask {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.85);
    display: flex; align-items: center; justify-content: center;
    z-index: 99999; cursor: zoom-out;
    backdrop-filter: blur(4px);
}
.img-preview-mask img {
    max-width: 92%; max-height: 92%;
    border-radius: var(--hxx-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* ---------- 提示横幅：样式由 hxx-ui.css 的 .hxx-notice / .hxx-notice-info/-warning/-danger 提供 ---------- */

/* ---------- 无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .hxx-nav-links { display: none; }
    .hxx-nav-toggle { display: flex; }
    .hxx-nav-brand-text { font-size: 16px; }
    .hxx-page, .hxx-page-wide { padding: 16px 12px 40px; }
    .hxx-card { padding: 16px !important; }
    .hxx-stat-grid { flex-direction: column; }
    .hxx-stat-item { min-width: 0; }
    .hxx-detail-grid { grid-template-columns: 1fr; }
    .hxx-toolbar { flex-direction: column; align-items: stretch; }
    .hxx-toolbar input, .hxx-toolbar select { width: 100%; }
    .hxx-toolbar .hxx-select-wrap { width: 100%; }
}
@media (max-width: 480px) {
    .hxx-nav { padding: 0 14px; }
    .hxx-page, .hxx-page-wide { padding: 12px 10px 32px; }
    .hxx-card { padding: 14px !important; }
    h1 { font-size: 22px; }
    .data-table { font-size: 12.5px; }
    .data-table th, .data-table td { padding: 8px; }
}

/* ---------- 弹窗 HXXDialog 已提取至 HXX-UI 组件库（css/hxx-ui.css + js/hxx-ui.js）---------- */

/* ====== 协议强制同意弹窗（js/main.js AgreementGuard，类名前缀 ag-） ======
   弹窗本身不可关闭（maskClose/escClose 均关）；正文为提示文案 + 协议目录（可展开查看内容）+ 退出登录出口 */
.ag-notice {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--hxx-text-2);
}
.ag-list { display: flex; flex-direction: column; gap: 8px; }
.ag-item {
    border: 1px solid var(--hxx-border);
    border-radius: var(--hxx-radius-sm);
    overflow: hidden;
}
.ag-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--hxx-muted);
    cursor: pointer;
    user-select: none;
    transition: background var(--hxx-t-fast) ease;
}
.ag-item-head:hover { background: var(--hxx-hover); }
.ag-item-arrow {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--hxx-text-3);
    transition: transform var(--hxx-t-fast) ease;
}
.ag-item.open .ag-item-arrow { transform: rotate(90deg); }
.ag-item-title { font-size: 14px; font-weight: 600; color: var(--hxx-text); }
.ag-item-time { margin-left: auto; font-size: 12px; color: var(--hxx-text-3); }
.ag-item-body { border-top: 1px solid var(--hxx-border); background: var(--hxx-surface); }
/* 协议内容展示区：限高局部滚动（固定像素，不与弹窗正文滚动区叠加，见 README 弹窗规范） */
.ag-md {
    max-height: 240px;
    overflow-y: auto;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--hxx-text-2);
}
.ag-md :is(h1, h2, h3, h4) { margin: 12px 0 6px; color: var(--hxx-text); font-size: 15px; }
.ag-md :is(h1, h2):first-child, .ag-md > :first-child { margin-top: 0; }
.ag-md p { margin: 6px 0; }
.ag-md ul, .ag-md ol { margin: 6px 0; padding-left: 20px; }
.ag-md pre {
    margin: 8px 0;
    padding: 10px 12px;
    background: var(--hxx-muted);
    border-radius: var(--hxx-radius-xs);
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 12px;
}
.ag-md a { color: var(--hxx-primary); }
.ag-hint { margin: 0; color: var(--hxx-text-3); text-align: center; }
.ag-logout-row {
    margin-top: 12px;
    font-size: 12px;
    color: var(--hxx-text-3);
    text-align: center;
}
.ag-logout-row a { color: var(--hxx-text-2); text-decoration: underline; cursor: pointer; }
.ag-logout-row a:hover { color: var(--hxx-danger); }
