:root {
  --ink: #111111;
  --paper: #ffffff;
  --paper-soft: #f6f5f2;
  --accent: #c8341f;
  --muted: #666666;
  --rule: #d8d6d1;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
  font-size: 17px;
  line-height: 1.85;
}

/* ---- 布局：单列词典 ---- */
main {
  max-width: 34em;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--paper);
  color: var(--accent);
  padding: .5rem 1rem;
  border: 2px solid var(--accent);
}
.skip:focus { left: 0; z-index: 10; }

.masthead {
  max-width: 34em;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 0;
}
.kicker {
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .8rem;
  letter-spacing: .25em;
  color: var(--muted);
  border-bottom: 3px solid var(--ink);
  padding-bottom: .75rem;
}
.masthead-note {
  margin: .75rem 0 0;
  font-size: .85rem;
  color: var(--muted);
}

/* ---- 词条词头 ---- */
h1 {
  font-size: 2.1rem;
  line-height: 1.3;
  margin: 2.25rem 0 .5rem;
  font-weight: 700;
}
.entry-meta {
  font-size: .85rem;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.25rem;
  margin: 0 0 2rem;
  overflow-wrap: anywhere;
}
.w-red { color: var(--accent); font-family: ui-monospace, Menlo, Consolas, monospace; }

h2 {
  font-size: 1.35rem;
  margin: 3rem 0 1rem;
  padding-left: .8rem;
  border-left: 5px solid var(--accent);
  line-height: 1.4;
}

h3 { font-size: 1.1rem; margin: 0 0 .5rem; }

p { margin: 0 0 1rem; }

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover, a:focus { color: var(--accent); }
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---- 核心定义：大字号 ---- */
.def-block .definition {
  font-size: 1.25rem;
  line-height: 1.9;
}
.definition-note {
  font-size: .9rem;
  color: var(--muted);
  background: var(--paper-soft);
  padding: .75rem 1rem;
  border-left: 3px solid var(--rule);
}
.src {
  font-size: .82rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ---- 词条拆解：词典条目 ---- */
.terms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.terms li {
  min-width: 0;
  padding: 1.25rem 0 1rem 1.1rem;
  border-top: 1px solid var(--rule);
  position: relative;
}
.terms li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.5rem;
  width: .45rem;
  height: .45rem;
  background: var(--accent);
}
.terms li:last-child { border-bottom: 1px solid var(--rule); }

/* ---- 承载示意图 ---- */
.carrier {
  margin: 1.25rem 0;
}
.carrier svg {
  width: 100%;
  height: auto;
  display: block;
  background: var(--paper-soft);
  border: 1px solid var(--rule);
}
.carrier figcaption {
  font-size: .8rem;
  color: var(--muted);
  margin-top: .5rem;
}

/* ---- 误解问答：details ---- */
.qa-item {
  border: 1px solid var(--ink);
  border-top: none;
}
.qa-item:first-of-type { border-top: 1px solid var(--ink); }
.qa-item summary {
  cursor: pointer;
  padding: .85rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  list-style-position: inside;
}
.qa-item summary::-webkit-details-marker { color: var(--accent); }
.qa-item[open] summary { border-bottom: 1px solid var(--rule); color: var(--accent); }
.qa-body { padding: .25rem 1rem 1rem; font-size: .95rem; }
.qa-body p:first-child { margin-top: .75rem; }

/* ---- 核对清单 ---- */
.check {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.check li {
  min-width: 0;
  padding: .5rem 0 .5rem 1.5rem;
  position: relative;
  border-bottom: 1px dashed var(--rule);
}
.check li::before {
  content: "?";
  position: absolute;
  left: 0;
  top: .5rem;
  color: var(--accent);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 700;
}

.outbound ul { padding-left: 1.25rem; }
.outbound li { margin-bottom: .5rem; }

.colophon {
  border-top: 3px solid var(--ink);
  max-width: 34em;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
  font-size: .82rem;
  color: var(--muted);
}

/* ---- 移动端 ---- */
@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.65rem; }
  .def-block .definition { font-size: 1.1rem; }
  h2 { font-size: 1.2rem; }
  main, .masthead, .colophon { padding-left: 1rem; padding-right: 1rem; }
}
