/* ==========================================================================
   句子透镜官网样式（app/static/css/site.css）

   这个文件是做什么的
   - 官网所有页面共用的一份样式表：营销页（首页、价格页）、登录页、登录后的账户区。
   - 由 base.html 用 <link> 引入；地址后面的 ?v=修改时间 让浏览器在文件变化后重新下载，而不是用旧缓存。
   - 配色与扩展面板（sentence-lens/src/panel.ts）和扩展页面（pages.css）保持一致，官网和插件看起来是一家。

   怎么读这个文件
   - 开头的 :root 定义「设计 token」：用 CSS 自定义属性（--名字: 值）把颜色、字体、宽度集中放在一处，
     后面全部用 var(--名字) 引用。想换主题只需改这一处。
   - 之后按页面区块分节，每节前有一行斜杠星号形式的标题注释；末尾是响应式规则（@media），
     按屏幕宽度覆盖前面的样式，写在后面的规则优先级更高。
   - 选择器速查：.a .b 是「a 里面的 b」（后代）；.a.b 是「同时带 a 和 b 两个类」；.a > .b 是直接子元素；
     .a + .b 是紧跟在 a 后面的兄弟元素；::before / ::after 是用 CSS 凭空生成的伪元素；
     [data-x="y"] 按 HTML 属性匹配。
   - 常见单位：px 是像素；em / rem 相对字号；vw 是视口宽度的百分之一；clamp(最小, 首选, 最大) 让值在范围内随视口缩放。
   ========================================================================== */
:root {
  --bg: #f8f9f3;
  --bg-alt: #f3f5ec;
  --paper: #fffef9;
  --ink: #2c4336;
  --ink-strong: #344d39;
  --muted: #7c8972;
  --muted-2: #98a18c;
  --line: #e2e7d9;
  --line-strong: #dce4d2;
  --brand: #35583f;
  --brand-hover: #456a4e;
  --brand-ink: #40613d;
  --brand-soft: #e8eedf;
  --brand-soft-line: #b6c6aa;
  --accent-bg: #edf2e5;
  --accent-line: #dfe7d2;
  --subject: #315d9c;    --subject-bg: #e7eefc;    --subject-line: #8da9d1;
  --predicate: #aa5238;  --predicate-bg: #fce8df;  --predicate-line: #d1947f;
  --object: #7850a0;     --object-bg: #eee8f8;     --object-line: #b7a0ce;
  --complement: #557b31; --complement-bg: #e9f1d9; --complement-line: #9bb575;
  --modifier: #97712b;   --modifier-bg: #fbf0d6;   --modifier-line: #d7b26b;
  --serif: Georgia, "Times New Roman", "Songti SC", "Noto Serif CJK SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --container: 1120px;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; scroll-padding-top: 88px; }
/* 用户在系统里开启了「减少动态效果」时，关掉平滑滚动，尊重这个偏好。 */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 500; color: var(--ink-strong); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #8aab7b; outline-offset: 3px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container.narrow { max-width: 760px; }
.eyebrow { display: block; font-size: 11px; font-weight: 600; letter-spacing: 2px; color: #8c9b7c; }

/* 按钮：.btn 是基础样式，再叠加修饰类——.primary 实心绿、.secondary 浅色、.outline 描边、.danger 红色描边；
   .small / .large 调尺寸，.block 撑满一行，.disabled 变灰且不可点（pointer-events: none 让鼠标事件穿透）。 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; padding: 12px 22px; font-size: 14px; font-weight: 500; border: 1px solid transparent; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.secondary { background: #f3f5eb; border-color: var(--line-strong); color: #5a7549; }
.btn.secondary:hover { background: #eaf0de; }
.btn.small { padding: 9px 16px; font-size: 13px; }
.btn.large { padding: 15px 30px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn .arrow { font-size: 13px; }

/* 顶部导航（partials/nav.html）：position: sticky 让它滚动时吸在顶部；backdrop-filter 把下面滚过的内容做成毛玻璃。 */
.site-nav { position: sticky; top: 0; z-index: 10; background: rgba(248, 249, 243, .88); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { height: 76px; display: flex; align-items: center; gap: 40px; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; font-size: 17px; line-height: 1.3; letter-spacing: 1px; font-weight: 600; color: var(--ink-strong); }
.wordmark small { display: block; font-size: 9px; letter-spacing: 2.1px; color: #8a9882; font-weight: 400; margin-top: 2px; }
.logo { width: 38px; height: 42px; border: 1px solid var(--brand-soft-line); border-radius: 12px 12px 12px 3px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font: 26px var(--serif); }
.nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 13px; color: #6a7c61; }
.nav-links a:hover { color: var(--ink-strong); }

/* 首页首屏（pages/index.html 的 .hero）：两栏网格，左边文案、右边面板示意；标题用 clamp() 在最小值和最大值之间随视口宽度缩放。 */
.hero { padding: 88px 0 72px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.hero h1 { font: 500 clamp(40px, 5.2vw, 62px)/1.18 var(--serif); letter-spacing: -1.5px; margin: 18px 0 22px; }
.lead { font-size: 16px; line-height: 1.9; color: var(--muted); max-width: 520px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.fineprint { font-size: 12px; color: var(--muted-2); margin-top: 18px; }

/* 首屏的面板示意（partials/lens-mock.html）：复刻扩展面板的样子。.seg 是可点击的句子片段，
   五种成分角色各有一组背景 / 文字 / 下划线颜色，都来自 :root 里的 token；.selected 由 site.js 在点击时切换。 */
.lens-mock { background: var(--paper); border: 1px solid #dbe2d6; border-radius: 18px; box-shadow: 0 24px 64px rgba(24, 54, 40, .12), 0 2px 8px rgba(24, 54, 40, .05); overflow: hidden; font-size: 13px; }
.mock-header { display: flex; align-items: center; gap: 11px; padding: 16px 20px; border-bottom: 1px solid #e8eadf; }
.mock-mark { background: #284e3b; color: #fff; font: 22px var(--serif); border-radius: 10px; width: 36px; height: 36px; display: grid; place-items: center; }
.mock-brand { font-weight: 650; font-size: 14px; letter-spacing: .5px; }
.mock-sub { font-size: 9px; letter-spacing: 1.5px; color: #829083; }
.mock-source { margin-left: auto; font-size: 11px; color: #7b897e; }
.mock-body { padding: 22px; }
.mock-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 1.8px; color: #889482; margin-bottom: 10px; }
.mock-pattern { font-size: 12px; color: #657b5b; margin-bottom: 12px; }
.mock-sentence { font: 21px/1.9 var(--serif); overflow-wrap: anywhere; }
.seg { display: inline; border: 0; border-radius: 3px; padding: 2px 1px; background: transparent; font: inherit; line-height: inherit; color: inherit; text-align: left; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.seg:hover, .seg.selected { filter: brightness(.94); box-shadow: 0 0 0 2px currentColor; }
.seg.subject { background: var(--subject-bg); color: var(--subject); text-decoration-color: var(--subject-line); }
.seg.predicate { background: var(--predicate-bg); color: var(--predicate); text-decoration-color: var(--predicate-line); }
.seg.object { background: var(--object-bg); color: var(--object); text-decoration-color: var(--object-line); }
.seg.complement { background: var(--complement-bg); color: var(--complement); text-decoration-color: var(--complement-line); }
.seg.modifier { background: var(--modifier-bg); color: var(--modifier); text-decoration-color: var(--modifier-line); }
.mock-legend { display: flex; gap: 7px 12px; flex-wrap: wrap; margin: 16px 0 12px; font-size: 10px; color: #667467; }
.mock-legend span { display: flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.subject { background: var(--subject-line); }
.dot.predicate { background: var(--predicate-line); }
.dot.object { background: var(--object-line); }
.dot.complement { background: var(--complement-line); }
.dot.modifier { background: var(--modifier-line); }
.mock-note { padding: 12px 14px; background: #f4f5ed; border: 1px solid #e8eadf; border-radius: 9px; font-size: 12px; min-height: 56px; line-height: 1.7; }
.mock-note strong { display: block; margin-bottom: 3px; font-size: 11px; color: #466441; }
.mock-section { margin-top: 22px; }
.mock-section h3 { font-size: 13px; font-weight: 650; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.num { font: 10px var(--serif); color: #8a9983; border: 1px solid #dfe5d7; border-radius: 5px; padding: 0 4px; }
.mock-backbone { background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: 11px; padding: 14px 16px; }
.backbone-text { font: 20px/1.5 var(--serif); color: #375733; margin-bottom: 8px; }
.explain { font-size: 12px; line-height: 1.8; color: #687663; }
.mock-clause { border-left: 2px solid #d3dfc5; padding-left: 14px; }
.clause-type { font-size: 12px; font-weight: 650; }
.attachment { font-size: 11px; color: #859080; margin: 3px 0 6px; }
.clause-text { font: 16px/1.7 var(--serif); margin-bottom: 6px; }

/* 通用区块：.section 控制每一大段的上下留白，.alt 给隔行的段落换一个更深一点的底色；
   .section-head 是每段开头的小标题组合（eyebrow 小字 + h2 + 引导语）。 */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font: 500 clamp(28px, 3.4vw, 40px)/1.3 var(--serif); letter-spacing: -.8px; margin-top: 14px; }
.section-lead { font-size: 15px; line-height: 1.9; color: var(--muted); margin-top: 14px; }

/* 首页「功能」四宫格：.feature-grid 是两列网格（repeat(2, ...)），手机上在末尾的 @media 里改成一列。 */
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.feature { background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 30px 30px 32px; }
.feature-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); font: 17px var(--serif); margin-bottom: 22px; }
.feature h3 { font-size: 19px; margin-bottom: 10px; }
.feature p { color: var(--muted); line-height: 1.85; }

/* 首页「怎么用」三步：有序列表去掉默认序号（list-style: none），用 .step-num 自己画圆形序号。 */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.step-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); border: 1px solid var(--brand-soft-line); font: 15px var(--serif); color: var(--brand-ink); margin-bottom: 16px; }
.steps h3 { font-size: 18px; margin-bottom: 8px; }
.steps p { color: var(--muted); line-height: 1.85; }

/* 首页「看得见依据」三栏：只用一条顶部细线做分隔，刻意比卡片轻一些。 */
.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.trust { border-top: 2px solid var(--brand-soft-line); padding-top: 18px; }
.trust h3 { font-size: 17px; margin-bottom: 8px; }
.trust p { color: var(--muted); line-height: 1.85; font-size: 14px; }

/* 订阅方案（partials/pricing.html）：.billing-toggle 是月付 / 年付切换按钮；.plans 三列卡片，.highlight 是推荐档；
   本节最后两条 [data-pricing][data-billing=...] 规则决定显示月付价还是年付价，属性本身由 site.js 在点击时修改。 */
.pricing-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.pricing-head h1 { font: 500 clamp(36px, 4.6vw, 54px)/1.2 var(--serif); letter-spacing: -1px; margin-top: 14px; }
.pricing-head .section-lead { margin: 14px auto 28px; }
.billing-toggle { display: inline-flex; gap: 4px; padding: 4px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 11px; }
.billing-toggle button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; border-radius: 8px; padding: 10px 22px; font-size: 14px; font-weight: 600; color: var(--muted); }
.billing-toggle button[aria-pressed="true"] { background: var(--brand-soft); color: var(--ink-strong); }
.tag { display: inline-block; font-size: 11px; line-height: 1.6; letter-spacing: .5px; padding: 1px 8px; border-radius: 4px; border: 1px solid var(--accent-line); background: var(--accent-bg); color: var(--brand-ink); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 12px; padding: 40px 36px 36px; }
.plan.highlight { border-color: var(--brand-soft-line); box-shadow: 0 18px 48px rgba(53, 88, 63, .1); }
.plan-badge { position: absolute; top: 26px; right: 28px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--brand-ink); }
.plan-name { font: 500 28px/1.2 var(--serif); }
.plan-tagline { color: var(--muted); margin-top: 10px; font-size: 15px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 44px 0 0; }
.plan-price .currency { font-size: 14px; color: var(--brand-ink); }
.plan-price .amount { font: 500 72px/1 var(--serif); color: var(--ink-strong); letter-spacing: -2px; }
.plan-price .period { font-size: 14px; color: var(--muted); }
.plan-price .original { font-size: 14px; color: var(--muted-2); text-decoration: line-through; margin-left: 8px; }
.plan-discount { display: flex; align-items: center; gap: 10px; min-height: 24px; margin-top: 12px; font-size: 12px; color: var(--muted-2); }
.plan-inherit { font-size: 12px; letter-spacing: .5px; color: var(--muted-2); margin: 36px 0 8px; }
.plan-features { list-style: none; padding: 0; margin: 0 0 36px; flex: 1; }
.plan-features li { position: relative; padding: 10px 0 10px 32px; font-size: 15px; }
.plan-features li::before { content: "✓"; position: absolute; left: 2px; top: 9px; font-weight: 700; color: var(--brand-ink); }
.plan-cta { margin-top: auto; width: 100%; padding: 14px; background: transparent; border-color: var(--brand-soft-line); color: var(--brand-ink); letter-spacing: 2px; }
.plan-cta:hover { background: var(--brand-soft); }
[data-pricing][data-billing="yearly"] .price-monthly { display: none; }
[data-pricing]:not([data-billing="yearly"]) .price-yearly { display: none; }

/* /subscribe 占位页（收款上线前的临时页面）。 */
.stub { text-align: center; padding: 24px 0; }
.stub h1 { font: 500 clamp(30px, 4vw, 44px)/1.25 var(--serif); letter-spacing: -.8px; margin-top: 14px; }
.stub .section-lead { margin: 14px auto 28px; }

/* 常见问题：用原生 <details> / <summary> 做折叠，不需要 JS；隐藏浏览器默认的三角标记，用 ::after 画 + / − 号随展开状态切换。 */
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-size: 16px; font-weight: 500; color: var(--ink-strong); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 20px var(--serif); color: var(--muted-2); flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; color: var(--muted); line-height: 1.9; max-width: 640px; }

/* 首页末尾的安装号召区。 */
.install { padding: 96px 0; }
.install-inner { text-align: center; max-width: 640px; }
.install h2 { font: 500 clamp(28px, 3.4vw, 40px)/1.3 var(--serif); letter-spacing: -.8px; margin: 14px 0 12px; }
.install .section-lead { margin: 0 0 28px; }

/* 页脚（partials/footer.html）。 */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 13px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.footer-tagline { margin-top: 14px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a:hover { color: var(--ink-strong); }
.footer-meta { margin-top: 32px; font-size: 12px; color: var(--muted-2); }

/* 响应式：视口不超过 960px（平板、竖屏窗口）时，多列网格改为单列，缩小留白。 */
@media (max-width: 960px) {
  .hero { padding: 64px 0 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .feature-grid, .plans, .steps, .trust-grid { grid-template-columns: 1fr; }
  .steps, .trust-grid { gap: 28px; }
  .section { padding: 64px 0; }
}
/* 响应式：视口不超过 720px（手机）时，进一步缩小留白、隐藏次要导航和表格里不重要的列。 */
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .nav-inner { height: 68px; gap: 16px; }
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .wordmark small { display: none; }
  .hero h1 br { display: none; }
  .mock-body { padding: 18px; }
  .mock-sentence { font-size: 19px; }
  .footer-inner { flex-direction: column; }
}

/* 导航右侧：登录 / 账户链接 + 安装按钮。.nav-links + .nav-actions 读作「紧跟在导航链接后面的动作区」，
   两者并存时取消 margin-left: auto，避免被推得太靠右。 */
.nav-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav-links + .nav-actions { margin-left: 0; }
.nav-auth { font-size: 13px; color: #6a7c61; }
.nav-auth:hover { color: var(--ink-strong); }

/* 一次性提示条（flash）：base.html / dashboard.html 按 kind 渲染成 .flash-info / .flash-success / .flash-error 之一。 */
.flash { padding: 12px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.flash-info { background: var(--accent-bg); color: var(--brand-ink); }
.flash-success { background: var(--complement-bg); color: var(--complement); }
.flash-error { background: var(--predicate-bg); color: var(--predicate); }

/* 登录页与验证码页（pages/login.html、login_code.html）：一张居中的卡片；.code-input 用大字号和字距让 6 位数字更醒目。 */
.auth .container.narrow { max-width: 480px; }
.auth-card { background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 40px 36px; }
.auth-card h1 { font: 500 30px/1.3 var(--serif); letter-spacing: -.5px; margin-top: 12px; }
.auth-card .section-lead { margin: 12px 0 24px; }
.auth-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.auth-form input { width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; font: inherit; color: var(--ink); margin-bottom: 16px; }
.auth-form input:focus { outline: 2px solid #aabd91; outline-offset: 0; border-color: #aabd91; }
.code-input { font: 500 28px/1.2 var(--serif); letter-spacing: 10px; text-align: center; }
.form-error { background: var(--predicate-bg); color: var(--predicate); border-radius: 9px; padding: 10px 14px; font-size: 13px; margin-bottom: 18px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted-2); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-links { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.auth-links a:hover { color: var(--ink-strong); }
.text-button { background: transparent; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.text-button:hover { color: var(--ink-strong); }

/* 账户区通用组件：.card 卡片、.table 表格、.token-box 设备令牌展示框、.inline-form 一行式表单、.pill 小标签，多个账户页共用。 */
.account .container.narrow { max-width: 820px; }
.account .section-head { margin-bottom: 28px; }
.account h1 { font: 500 34px/1.3 var(--serif); letter-spacing: -.6px; margin-top: 12px; }
.card { background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 28px 30px; margin-bottom: 20px; }
.card h2 { font-size: 16px; font-weight: 650; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.card .count { font: 500 12px var(--sans); color: var(--muted-2); }
.card .muted { color: var(--muted); font-size: 13px; line-height: 1.8; margin-bottom: 14px; }
.card .link { color: var(--brand-ink); text-decoration: underline; }
.profile { display: flex; align-items: center; gap: 16px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-fallback { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font: 22px var(--serif); }
.profile-name { font-size: 17px; font-weight: 600; }
.profile-email, .profile-meta { font-size: 13px; color: var(--muted); }
.plan-line { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.plan-line strong { font: 500 24px/1.2 var(--serif); }
.plan-line span { color: var(--muted); font-size: 13px; }
.limit-list { list-style: none; padding: 0; margin: 0 0 18px; font-size: 14px; }
.limit-list li { padding: 7px 0; border-top: 1px solid #eef0e6; }
.token-box { background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: 11px; padding: 14px 16px; margin-bottom: 16px; }
.token-label { font-size: 12px; font-weight: 600; color: var(--brand-ink); margin-bottom: 8px; }
.token { display: block; font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; user-select: all; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 18px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted-2); padding: 6px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 0; border-bottom: 1px solid #eef0e6; vertical-align: middle; }
.table td:last-child { text-align: right; }
.table form { display: inline; }
.pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); margin-left: 6px; vertical-align: middle; }
.text-button.danger { color: var(--predicate); }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 200px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 9px; font: inherit; color: var(--ink); background: #fff; }
.inline-form input:focus { outline: 2px solid #aabd91; outline-offset: 0; }
.empty { color: var(--muted-2); font-size: 14px; margin-bottom: 14px; }
.logout-form { margin-top: 6px; }
/* 响应式：视口不超过 720px（手机）时，进一步缩小留白、隐藏次要导航和表格里不重要的列。 */
@media (max-width: 720px) {
  .card { padding: 22px 18px; }
  .table th:nth-child(2), .table td:nth-child(2) { display: none; }
}

/* 登录后的账户区布局（layouts/dashboard.html）：.dash 是两列网格（240px 侧栏 + 自适应主区），
   侧栏 position: sticky 且高度占满视口；.dash-nav a.active 高亮当前模块；用户信息块靠 margin-top: auto 沉到侧栏底部。 */
.dash { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.dash-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 22px; background: var(--paper); border-right: 1px solid var(--line); }
.dash-side .wordmark { margin-bottom: 36px; }
.dash-nav { display: flex; flex-direction: column; gap: 4px; }
.dash-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; font-size: 14px; color: #5f7060; }
.dash-nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.dash-nav a:hover { background: #f1f4e9; color: var(--ink-strong); }
.dash-nav a.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.dash-back { margin-top: 18px; padding: 0 12px; font-size: 12px; color: var(--muted-2); }
.dash-back:hover { color: var(--ink-strong); }
.dash-user { margin-top: auto; display: flex; align-items: center; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.dash-user .avatar { width: 38px; height: 38px; font-size: 16px; }
.dash-user-name { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.dash-user-plan { font-size: 11px; color: var(--muted-2); }
.dash-main { padding: 56px 64px 80px; width: 100%; max-width: 1180px; }
.dash-flash { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 24px; }
.dash-head { margin-bottom: 36px; }
.dash-head h1 { font: 500 40px/1.2 var(--serif); letter-spacing: -.8px; }
.dash-subtitle { font: italic 15px/1.6 var(--serif); color: var(--muted); margin-top: 8px; }
.dash-grid { display: grid; gap: 24px; margin-bottom: 24px; }
.dash-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-label { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 1.5px; color: var(--muted-2); margin-bottom: 14px; }
.card-label svg { width: 16px; height: 16px; stroke: var(--brand-ink); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dot-square { width: 7px; height: 7px; background: var(--muted-2); display: inline-block; }
.dot-square.gold { background: #c9a961; }
.card-title { font: 500 26px/1.3 var(--serif); margin-bottom: 18px; }
.card-text { color: var(--muted); font-size: 14px; line-height: 1.9; margin-bottom: 22px; }
.card-text .link, .card .link { color: var(--brand-ink); text-decoration: underline; }
.card > .btn.outline { margin-top: 8px; }
.btn.outline { background: transparent; border-color: var(--brand-soft-line); color: var(--brand-ink); letter-spacing: 1px; }
.btn.outline:hover { background: var(--brand-soft); }

/* 会员中心（pages/account/membership.html）：.status-card::after 用一个巨大的半透明「S」做水印；
   .tier-list 是邀请奖励档位，已达成的档位由模板加上 .reached。 */
.status-card { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 360px; }
.status-card::after { content: "S"; position: absolute; right: 20px; top: 0; font: 260px/1 var(--serif); color: rgba(53, 88, 63, .05); pointer-events: none; }
.status-email { display: flex; align-items: center; gap: 8px; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); position: relative; }
.status-plan { margin: auto 0; padding: 36px 0; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; position: relative; }
.status-plan-name { font: 500 64px/1 var(--serif); color: var(--ink-strong); }
.status-plan-tag { font: italic 15px var(--serif); color: var(--muted-2); }
.status-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; position: relative; }
.status-foot .card-label { margin-bottom: 6px; }
.status-current { font: 500 20px var(--serif); }
.benefit-group { margin-bottom: 18px; }
.benefit-label { font-size: 11px; letter-spacing: 1px; color: var(--muted-2); margin-bottom: 4px; }
.benefit-list { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.benefit-list li { padding: 6px 0; }
/* 会员中心「本期用量」一行，放在额度列表下面。 */
.usage-line { font-size: 13px; color: var(--muted); margin-top: 8px; }
.usage-line strong { color: var(--ink-strong); }
.invite-row { display: flex; gap: 10px; flex-wrap: wrap; }
.invite-link { flex: 1; min-width: 200px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 9px; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: #fff; color: var(--ink); }
.tier-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.tier-list li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--muted); }
.tier-list li.reached { border-color: var(--brand-soft-line); background: var(--accent-bg); color: var(--ink); }
.tier-num { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; font: 12px var(--serif); flex-shrink: 0; }
.tier-text { flex: 1; }
.tier-reward { font: italic 13px var(--serif); color: var(--brand-ink); }
.tier-progress { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; font-size: 11px; letter-spacing: 1.5px; color: var(--muted-2); }
.tier-progress strong { color: var(--ink-strong); }

/* 设置页（settings_language.html、settings_account.html）：.tabs 顶部标签，.settings-form 每行一个设置项，
   .danger-card 是退出登录的「危险操作」区，用偏红的边框和底色提醒。 */
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.tabs a { padding: 10px 0 12px; margin-bottom: -1px; font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--ink-strong); }
.tabs a.active { color: var(--ink-strong); border-bottom-color: var(--brand); }
.dash-h2 { font: 500 24px/1.3 var(--serif); margin: 0 0 16px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dash-h2 em { font: italic 14px var(--serif); color: #b0913f; }
.dash-h2 em.danger { color: var(--predicate); }
.card + .dash-h2 { margin-top: 36px; }
.settings-form .setting-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; border-bottom: 1px solid #eef0e6; }
.settings-form .setting-row:first-child { padding-top: 4px; }
.setting-row label { font-size: 15px; }
.setting-hint { display: block; font-size: 12px; color: var(--muted-2); margin-top: 6px; }
.settings-form select { min-width: 220px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; font: inherit; color: var(--ink); }
.settings-form select:focus { outline: 2px solid #aabd91; outline-offset: 0; }
.setting-actions { padding-top: 22px; display: flex; justify-content: flex-end; }
.danger-card { border-color: #e6c9c0; background: #fdf7f4; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.danger-card h3 { font-size: 15px; margin-bottom: 6px; }
.danger-card p { font-size: 13px; color: var(--muted); }
.btn.danger { background: transparent; border-color: #d9a493; color: var(--predicate); }
.btn.danger:hover { background: var(--predicate-bg); }

/* 意见反馈页（feedback.html）：文本框允许竖向拖拽（resize: vertical）。 */
.feedback-form textarea { width: 100%; min-height: 160px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 9px; font: inherit; color: var(--ink); background: #fff; resize: vertical; margin: 0 0 18px; }
.feedback-form textarea:focus { outline: 2px solid #aabd91; outline-offset: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; }
.support-email { font: 14px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--brand-ink); text-decoration: underline; }

/* 响应式：视口不超过 960px（平板、竖屏窗口）时，多列网格改为单列，缩小留白。 */
@media (max-width: 960px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .dash-side .wordmark { margin: 0; }
  .dash-nav { flex-direction: row; margin-left: auto; gap: 2px; }
  .dash-nav a { padding: 8px 10px; font-size: 13px; }
  .dash-back, .dash-user { display: none; }
  .dash-main { padding: 32px 20px 60px; }
  .dash-head h1 { font-size: 32px; }
  .dash-grid.two { grid-template-columns: 1fr; }
  .status-card { min-height: 0; }
  .status-plan-name { font-size: 48px; }
  .settings-form .setting-row { flex-direction: column; align-items: stretch; }
  .settings-form select { width: 100%; }
}
