/* ==========================================================================
   单词词条页 —— 皮肤
   色板与卡片节奏跟 /vocab/ 一致（同一套 --brand / --line / 12px 圆角 / 920 净宽），
   但规则自带一份，不跨站引 /vocab/style.css —— 免得 vocab 改一次这里跟着漂。
   ========================================================================== */

:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --ink: #1f2733;
  --muted: #6b7785;
  --line: #e3e8ef;
  --brand: #0e7490;
  --brand-dark: #155e75;
  --brand-soft: #e0f2f7;
  --accent: #d97706;
  --accent-soft: #fdf1e3;
  --good: #15803d;
  --bad: #b91c1c;
  --chip: #eef2f6;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --page-w: 960px;
  --page-pad: 20px;
  --page-inner: calc(var(--page-w) - var(--page-pad) * 2);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
html, body { overflow-x: clip; }
a { color: var(--brand); }
img { max-width: 100%; }

/* ---------- 站点条：与全站同一套实现（.lt-topstrip > .xsite-bar > .xsite-in）
   桌面平铺七项；手机只留「英语测评 + 菲律宾游学 + 更多英语工具」，
   点「更多」在条下展开两列面板。颜色、断点、圆角全部照 www.linguatest.cn 首页那份。 ---------- */
.lt-topstrip { position: static; box-shadow: none; background: #0e7490; }
.lt-topstrip .xsite-bar { background: transparent; border-bottom: 0; }
.lt-topstrip .xsite-in {
  max-width: var(--page-inner); margin: 0 auto; padding: 0;
  height: 38px; display: flex; align-items: center; gap: 2px;
  font-size: 12.5px; line-height: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.lt-topstrip .xsite-in > .xsite-link:first-child { padding-left: 0; }

.xsite-link {
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; line-height: 1; color: rgba(255, 255, 255, .82); text-decoration: none;
  display: inline-flex; align-items: center; white-space: nowrap; flex: 0 0 auto;
  transition: background .15s, color .15s;
}
.xsite-link:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.lt-topstrip .xsite-link.cur {
  color: #fff; background: transparent; font-weight: 700; cursor: default;
  box-shadow: inset 0 -2px 0 #a5e4ef; border-radius: 0;
}
.lt-topstrip .xsite-link.cur:hover { background: transparent; }
.lt-topstrip .xsite-link.xsite-ext { color: #e8d6b0; }
.lt-topstrip .xsite-link.xsite-ext:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* 桌面：.xsite-menu 用 display:contents 不参与布局，与改前视觉一致 */
.xsite-menu { display: contents; }
.xsite-more { display: none; }

@media (max-width: 640px) {
  /* 窄屏照线上首页那套 grid：三格 auto/1fr/auto，中间那项自己占中间一段，
     不再跟「英语测评」贴在一起（原来 flex + gap 2px，三项挤成一条） */
  .lt-topstrip .xsite-in {
    max-width: none; margin: 0 var(--page-pad); height: 34px;
    display: grid; grid-template-columns: auto 1fr auto;
    align-items: center; gap: 2px 8px;
  }
  .xsite-in { overflow: visible; position: relative; }
  .xsite-more {
    display: inline-flex; align-items: center; gap: 5px;
    margin-left: 0; flex: none;
    height: 22px; padding: 0 9px;
    border: 0; border-radius: 11px; cursor: pointer;
    background: rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .92);
    font: inherit; font-size: 12px; line-height: 1;
    -webkit-tap-highlight-color: transparent;
  }
  .xsite-more:active { background: rgba(255, 255, 255, .26); }
  .xsite-more::after {
    content: ''; width: 0; height: 0;
    border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform .16s ease;
  }
  .xsite-bar.menu-open .xsite-more::after { transform: rotate(180deg); }

  .xsite-in > .xsite-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  /* 兄弟站那项占中间整格，文字在格里居中，跟线上首页一致 */
  .xsite-in > .xsite-link.xsite-ext { justify-content: center; }

  .xsite-menu { display: none; }
  .xsite-bar.menu-open .xsite-menu {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px 4px;
    position: absolute; top: 100%; left: 6px; right: 6px; z-index: 60;
    padding: 9px 10px 11px;
    background: #0d4353;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .32);
  }
  .xsite-bar.menu-open .xsite-menu .xsite-link {
    height: 32px; padding: 0 8px; font-size: 12.5px;
    justify-content: flex-start; border-radius: 8px;
  }
  .xsite-bar.menu-open .xsite-menu .xsite-link:hover { background: rgba(255, 255, 255, .18); }
  .xsite-bar.menu-open .xsite-menu .xsite-link.cur {
    box-shadow: none; border-radius: 8px; background: rgba(255, 255, 255, .14);
  }
}

/* ---------- 版心 ---------- */
.wrap { max-width: var(--page-inner); margin: 0 auto; padding: 0 0 56px; }

/* ---------- 面包屑 ---------- */
.crumb {
  font-size: 12.5px; color: var(--muted); padding: 14px 0 0;
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--brand); }
.crumb .sp { color: #c4ccd6; }

/* ---------- 词头 ---------- */
.headword {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 26px 28px 22px; margin-top: 14px;
}
.hw-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; }
/* 音标和喇叭绑成一组，窄屏放不下时整组换行，别把喇叭单独甩到下一行 */
.hw-snd { display: inline-flex; align-items: center; gap: 12px; }
h1.hw {
  font-size: 40px; line-height: 1.2; margin: 0; letter-spacing: -.5px;
  font-family: Georgia, "Times New Roman", serif; font-weight: 600;
}
.hw-ipa { font-size: 16px; color: var(--muted);
  font-family: "Lucida Sans Unicode", "DejaVu Sans", "Segoe UI", Arial, sans-serif; }
.hw-ipa .lb { font-size: 11px; color: #9aa5b1; margin-right: 3px; }

.speak {
  border: 1px solid var(--line); background: #fff; color: var(--brand);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0; transition: .15s;
}
.speak:hover { background: var(--brand-soft); border-color: var(--brand); }

.pos-zh { margin: 14px 0 0; font-size: 17px; }
.pos-zh .pos {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); padding: 2px 7px; border-radius: 3px;
  margin-right: 8px; vertical-align: 2px;
}
.hw-def { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; }

/* 元信息小卡：词频位次 / 档位 / CEFR / 考试 */
.meta-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px;
  padding-top: 16px; border-top: 1px dashed var(--line);
}
.meta-chip {
  background: var(--chip); border-radius: 4px; padding: 5px 10px;
  font-size: 12.5px; color: var(--muted); line-height: 1.4;
}
.meta-chip b { color: var(--ink); font-weight: 600; }
.meta-chip.exam { background: var(--accent-soft); color: #8a5a12; }
.meta-chip.exam b { color: #8a5a12; }

/* ---------- 通用区块 ---------- */
.sec {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 24px 28px; margin-top: 16px;
}
.sec h2 {
  font-size: 18px; margin: 0 0 4px; letter-spacing: .2px;
  display: flex; align-items: baseline; gap: 10px;
}
.sec h2 .n {
  font-size: 12px; color: #fff; background: var(--brand);
  width: 21px; height: 21px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; flex: 0 0 auto;
  font-weight: 700; transform: translateY(-1px);
  font-variant-numeric: tabular-nums; font-family: Georgia, serif;
}
.sec .lead { color: var(--muted); font-size: 13.5px; margin: 0 0 16px 30px; }
.sec p { margin: 0 0 12px; }
.sec h3 { font-size: 15.5px; margin: 20px 0 6px; }
.sec p:last-child { margin-bottom: 0; }

/* 义项 */
.sense { margin-top: 14px; padding-left: 14px; border-left: 2px solid var(--brand-soft); }
.sense .k { font-weight: 700; font-size: 15px; }
.sense .k .t { color: var(--brand); font-family: Georgia, serif; font-style: italic; margin-right: 6px; }
.sense .d { color: #47505c; font-size: 14.5px; margin-top: 3px; }

/* 辨析表 */
/* 对比表：窄屏横向滚动。表格本身不能加 display:block（会破坏表格布局），
   必须套一层 .cmp-wrap —— 外面滚，表格保持 table 算法 */
.cmp-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 6px; }
/* 会横向滚的表（四列以上）在左右边缘给一层阴影，滚动时自动出现和消失，
   让人一眼看出右边还有列，不用先读提示文字 */
.cmp-wrap.scrollable {
  background:
    linear-gradient(to right, #fff 40%, rgba(255, 255, 255, 0)) left center,
    linear-gradient(to left, #fff 40%, rgba(255, 255, 255, 0)) right center,
    radial-gradient(farthest-side at 0 50%, rgba(16, 24, 40, .14), rgba(16, 24, 40, 0)) left center,
    radial-gradient(farthest-side at 100% 50%, rgba(16, 24, 40, .14), rgba(16, 24, 40, 0)) right center;
  background-repeat: no-repeat;
  background-size: 34px 100%, 34px 100%, 11px 100%, 11px 100%;
  background-attachment: local, local, scroll, scroll;
}
.cmp { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cmp th, .cmp td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp th { background: #fafbfc; font-size: 13px; color: var(--muted); font-weight: 600; }
.cmp td.w { font-family: Georgia, serif; font-size: 16px; font-weight: 600; white-space: nowrap; }
.cmp tr:last-child td { border-bottom: 0; }
.mnemonic {
  background: var(--accent-soft); border-radius: 8px; padding: 13px 16px;
  margin-top: 14px; font-size: 14.5px; color: #7a4f0e;
}
.mnemonic b { color: #6b4210; }

/* 表格滑动提示：只在窄屏出现，桌面表格本来就放得下 */
.cmp-hint { display: none; margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }

/* 发音失败提示：不弹窗，按钮旁边出小字，3 秒消失 */
.spk-tip {
  display: none; margin-left: 6px; font-size: 12.5px; color: #b45309;
  background: var(--accent-soft); border-radius: 4px; padding: 2px 7px;
  vertical-align: middle;
}
.spk-tip.on { display: inline-block; }

/* 适合谁看：跟上面的考试标签呼应，一句轻量引导 */
.fit {
  margin: 10px 0 0; font-size: 13px; color: var(--muted);
}
.fit b { color: #0e7490; font-weight: 600; }

/* 例句 */
.ex { margin: 0; padding: 0; list-style: none; }
.ex li { padding: 11px 0; border-bottom: 1px dashed var(--line); }
.ex li:last-child { border-bottom: 0; padding-bottom: 0; }
.ex .en { font-size: 15.5px; }
.ex .en em { font-style: normal; font-weight: 700; color: var(--brand-dark); }
.ex .zh { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

/* 搭配 */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin-top: 4px; }
.cols .it { font-size: 14.5px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.cols .it code {
  font-family: Georgia, serif; font-size: 15px; color: var(--brand-dark);
  background: none; font-weight: 600;
}
.cols .it span { color: var(--muted); font-size: 13px; display: block; }

/* 错误对照 */
.err { margin: 0; padding: 0; list-style: none; }
.err li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.err li:last-child { border-bottom: 0; }
.err .mk { flex: 0 0 auto; font-weight: 700; font-size: 15px; line-height: 1.5; }
.err .mk.no { color: var(--bad); }
.err .mk.ok { color: var(--good); }
.err .tx em { font-style: normal; background: #fdecea; padding: 0 2px; }
.err .tx.good em { background: #eaf5ee; }
.err .note { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* 词族 */
.fam { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.fam span {
  background: var(--chip); border-radius: 4px; padding: 6px 10px; font-size: 13.5px;
}
.fam span i { font-style: normal; color: var(--muted); font-size: 12.5px; margin-left: 4px; }

/* 跟测评的关系 */
.tool-box {
  background: linear-gradient(135deg, #f0f9fb 0%, #f7fbfc 100%);
  border: 1px solid #cfe9ef; border-radius: 12px; padding: 22px 26px; margin-top: 16px;
}
.tool-box h2 { font-size: 17px; margin: 0 0 8px; }
.tool-box p { color: #3f5560; font-size: 14.5px; margin: 0 0 14px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-block; text-decoration: none; border-radius: 6px;
  padding: 9px 18px; font-size: 14px; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; transition: .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #fff; color: var(--brand); border-color: #bfdbe3; }
.btn-secondary:hover { background: var(--brand-soft); }
.tool-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* 相邻词 */
.adj { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.adj a {
  display: block; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 18px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: .15s;
}
.adj a:hover { border-color: var(--brand); }
.adj .lb { font-size: 12px; color: var(--muted); display: block; }
.adj .w { display: block; font-family: Georgia, serif; font-size: 19px; font-weight: 600; }
.adj .z { display: block; font-size: 13px; color: var(--muted); }
.adj .goto-test { text-align: right; }

/* ---------- 索引页：级别块 / 词条 chips / 筛选器 ---------- */
.sec h2 .lvb {
  font-size: 11.5px; color: #fff; background: var(--brand);
  padding: 2px 7px; border-radius: 4px; font-weight: 700;
  letter-spacing: .4px; align-self: center;
}
.seg {
  font-size: 13px; color: var(--muted); font-weight: 600;
  margin: 20px 0 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--line);
}
.seg span { color: #9aa5b1; font-weight: 400; margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: Georgia, "Times New Roman", serif; font-size: 14px;
  padding: 3px 9px; border-radius: 4px; text-decoration: none;
  background: #fff; border: 1px solid var(--line); color: var(--brand-dark);
  line-height: 1.5; transition: .12s;
}
.chip:hover { border-color: var(--brand); background: var(--brand-soft); }
.chip.off {
  background: #f7f9fb; border-style: dashed; color: #97a1ad;
  font-size: 13px; cursor: default;
}
.chip.off:hover { border-color: var(--line); background: #f7f9fb; }

.finder {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; margin-top: 16px;
}
.finder input {
  width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 6px;
  padding: 0 12px; font-size: 14px; color: var(--ink); background: #fff;
  font-family: inherit;
}
.finder input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.az { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.az button {
  min-width: 26px; height: 26px; padding: 0 6px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; border-radius: 4px;
  font-size: 12.5px; color: var(--muted); font-family: inherit;
}
.az button:hover { border-color: var(--brand); color: var(--brand); }
.az button.az-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.finder-note { font-size: 12.5px; color: var(--muted); margin-top: 8px; min-height: 18px; }

/* ---------- 页脚：与 www.linguatest.cn 首页同一份（白底居中、12.5px 浅灰、链接青色） ---------- */
.foot-note {
  max-width: var(--page-inner); margin: 28px auto 0;
  color: #9aa5b1; font-size: 12px; line-height: 1.8; text-align: center;
}
.site-footer {
  background: transparent; color: var(--muted);
  padding: 18px var(--page-pad) 26px; margin: 0; font-size: 12.5px;
  text-align: center; border-top: 0;
}
.site-footer-in {
  max-width: var(--page-inner); margin: 0 auto;
  display: block; text-align: center; line-height: 1.9; color: var(--muted);
}
.site-footer a { color: var(--brand); text-decoration: none; padding: 0; white-space: nowrap; }
.site-footer a:hover { text-decoration: underline; color: #0b5f75; }
.site-footer .sep { color: #c3ccd6; }

/* ---------- 窄屏 ---------- */
@media (max-width: 760px) {
  :root { --page-pad: 14px; }
  h1.hw { font-size: 32px; }
  .headword, .sec { padding: 20px 18px; }
  .cols { grid-template-columns: 1fr; }
  .adj { grid-template-columns: 1fr; }
  .adj .goto-test { text-align: left; }
  .sec .lead { margin-left: 0; }
  .chip { font-size: 13.5px; padding: 3px 8px; }
  .az button { min-width: 24px; height: 24px; font-size: 12px; }
  .finder { padding: 10px 12px; }
  /* 390 宽下三四列的表都放不下一句完整中文，硬挤会把词拆成两半。
     窄屏改成竖排卡片：一行一个词，第一格是词头，其余各格带「表头：」前缀。
     桌面端仍是原来的表格。 */
  .cmp-wrap { overflow: visible; }
  .cmp-wrap.scrollable { background: none; }
  .cmp { display: block; min-width: 0; }
  .cmp thead { display: none; }
  .cmp tbody { display: block; }
  .cmp tbody tr {
    display: block; margin-top: 8px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 8px; background: #fff;
  }
  .cmp tbody td {
    display: block; border: 0; padding: 1px 0; white-space: normal;
    font-size: 13.5px; line-height: 1.5;
  }
  .cmp tbody td.w { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
  .cmp tbody td[data-label]::before {
    content: attr(data-label) "："; color: var(--muted); font-size: 12.5px;
  }
  .cmp tr:last-child td { border-bottom: 0; }
  .spk-tip { margin-left: 0; }
  .cmp th, .cmp td { padding: 9px 10px; }
  .wrap { padding: 0 var(--page-pad) 40px; }
  /* 词头一行放下：单词 + 英式 + 美式 + 发音，窄屏缩音标字号，别让喇叭掉到第二行 */
  .hw-line { gap: 6px 10px; }
  .hw-snd { gap: 8px; }
  .hw-ipa { font-size: 13.5px; }
  .hw-ipa .lb { font-size: 10.5px; }
  .speak { width: 30px; height: 30px; font-size: 13px; }
  .site-footer { padding: 16px 14px 22px; }
  .foot-note { margin-top: 22px; }
}

/* ---------- 打印：只留词条正文，导航、按钮、相邻词、页脚全部隐去 ---------- */
@media print {
  .lt-topstrip, .btns, .adj, .site-footer, .foot-note, .spk-tip, .speak, .fit, .cmp-hint { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  body { background: #fff; }
  .headword, .sec, .tool-box {
    box-shadow: none; border: 0; border-radius: 0;
    padding: 10px 0; margin: 0;
  }
  /* 整节不许拆会把后半页留空，只锁小节内的块 */
  .sec { break-inside: auto; }
  .sec h2 { break-after: avoid; }
  .cmp, .ex li, .sense, .err { break-inside: avoid; }
  .cmp-wrap { overflow: visible; }
  .cmp { min-width: 0; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10px; color: #666; }
}
