/* West & East — 纸本记事本的感觉：暖纸色、朱红（东）与墨蓝（西）两种笔迹 */
:root {
  --paper: #faf6ee;
  --card: #fffdf8;
  --ink: #23201b;
  --muted: #6f675b;
  --line: #e7dfcf;
  --east: #c8402b;
  --east-soft: #fbe9e4;
  --west: #2b5c9e;
  --west-soft: #e6eefa;
  --both: #7a5aa6;
  --both-soft: #efe9f7;
  --hl: #ffe9a8;
  --shadow: 0 1px 0 rgba(60, 40, 10, .06), 0 8px 24px -12px rgba(60, 40, 10, .25);
  --serif: "Noto Serif SC", "Fraunces", "Songti SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17150f; --card: #211e17; --ink: #efe8da; --muted: #a59b88; --line: #3a3427;
    --east: #ff8a73; --east-soft: #3a2420; --west: #8fb6ff; --west-soft: #1f2a3d;
    --both: #c4a6f0; --both-soft: #2c2438; --hl: #5b4a17;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.75 var(--sans);
  background-image: radial-gradient(var(--line) .6px, transparent .6px);
  background-size: 18px 18px;
}
a { color: inherit; }

/* 刊头 */
.mast { text-align: center; padding: 44px 16px 8px; }
.brand { text-decoration: none; font: 800 clamp(40px, 9vw, 72px)/1 "Fraunces", var(--serif); letter-spacing: -.02em; }
.brand .w { color: var(--west); }
.brand .e { color: var(--east); }
.brand .amp { color: var(--muted); font-style: italic; font-weight: 600; margin: 0 .12em; display: inline-block; transform: rotate(-8deg); }
.tag { margin: 10px 0 0; color: var(--muted); font-size: 15px; letter-spacing: .08em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px 56px; }
.wrap.narrow { max-width: 760px; }

.intro { max-width: 640px; margin: 18px auto 24px; text-align: center; color: var(--muted); }
.intro p { margin: 0; }

/* 筛选 */
.filters { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.filters button {
  font: 500 14px var(--sans); color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.filters button small { color: var(--muted); margin-left: 6px; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filters button[aria-pressed="true"] small { color: inherit; opacity: .7; }

/* 按周分组 */
.week { margin: 0 0 40px; }
.week[hidden] { display: none; }
.week-h {
  display: flex; align-items: baseline; gap: 10px; margin: 0 0 16px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--line); font: 600 15px var(--sans); color: var(--muted); letter-spacing: .02em;
}
.week-h span { color: var(--ink); }
.week-h em { font-style: normal; font-size: 12px; color: var(--paper); background: var(--east); border-radius: 999px; padding: 1px 8px; }
.week-h small { margin-left: auto; font-size: 13px; }

/* 卡片墙 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column; gap: 10px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 20px 16px; box-shadow: var(--shadow);
  border-top: 5px solid var(--accent); transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px) rotate(-.25deg); }
.card[hidden] { display: none; }
.r-cn { --accent: var(--east); --soft: var(--east-soft); }
.r-us { --accent: var(--west); --soft: var(--west-soft); }
.r-both { --accent: var(--both); --soft: var(--both-soft); }

.card-top { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.flag { color: var(--accent); font-weight: 600; }
.card-top time { margin-left: auto; font-variant-numeric: tabular-nums; }
.detail .card-top time { margin-left: 0; }
.detail .card-top .heat { margin-left: auto; }

.card h2 { margin: 0; font: 800 21px/1.35 var(--serif); }
.emo { margin-right: 6px; }
.en { margin: -4px 0 0; color: var(--muted); font: italic 14px/1.4 "Fraunces", serif; }
.sum { margin: 0; }
.vox {
  background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; line-height: 1.65;
}
.vox b { display: block; color: var(--accent); font-size: 12px; letter-spacing: .1em; margin-bottom: 2px; }
.card-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; font-size: 12.5px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; color: var(--muted); }
.more { margin-left: auto; color: var(--accent); font-weight: 600; }
.heat { color: var(--accent); letter-spacing: 1px; font-size: 11px; }
.heat i { font-style: normal; opacity: .22; }

/* 详情 */
.back { display: inline-block; margin: 8px 0 18px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--ink); }
.detail {
  background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--accent);
  border-radius: 16px; padding: 28px clamp(18px, 4vw, 40px) 32px; box-shadow: var(--shadow);
}
.detail h1 { font: 800 clamp(26px, 5vw, 36px)/1.3 var(--serif); margin: 12px 0 4px; }
.detail .lede { font-size: 18px; margin: 16px 0 8px; padding-left: 14px; border-left: 3px solid var(--accent); }
.detail h2 {
  font: 800 19px/1.4 var(--serif); margin: 34px 0 10px;
  display: inline-block; background: linear-gradient(transparent 62%, var(--hl) 62%);
}
.detail p { margin: 0 0 12px; }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px dashed var(--line); }
.timeline li { position: relative; padding: 0 0 12px 18px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline time { display: block; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.voices { display: grid; gap: 12px; margin: 14px 0 4px; }
.voice { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); position: relative; }
.voice blockquote { margin: 0; font-size: 15px; }
.voice figcaption { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.voice.v-pro { border-left: 4px solid #3f9b5a; }
.voice.v-con { border-left: 4px solid #c25b4a; }
.voice.v-mid { border-left: 4px solid var(--muted); }

.insight { background: var(--soft); border-radius: 12px; padding: 14px 16px 4px; }
.watch { padding-left: 20px; margin: 0; }
.watch li { margin-bottom: 6px; }
.watch li::marker { content: "👀  "; }

.sources { padding-left: 22px; font-size: 14px; }
.sources li { margin-bottom: 6px; word-break: break-word; }
.sources span { color: var(--muted); }
.updated { margin-top: 18px; font-size: 12.5px; color: var(--muted); }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; border-top: 1px dashed var(--line); max-width: 760px; margin: 0 auto; }
.foot .small { font-size: 12px; }
.foot a { color: var(--muted); }

@media (max-width: 520px) {
  .mast { padding-top: 32px; }
  .card { padding: 18px 16px 14px; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }

/* 每日速记 */
.daily-strip { margin: 0 0 36px; }
.daily-strip .week-h a { margin-left: auto; font-size: 13px; color: var(--muted); text-decoration: none; }
.daily-strip .week-h a:hover { color: var(--ink); }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.dcard {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px 12px; border-left: 4px solid var(--accent);
}
.dcard h3 { margin: 2px 0 0; font: 700 16px/1.4 var(--serif, inherit); color: var(--ink); }
.dcard .en { margin: 0; font-size: 12.5px; color: var(--muted); }
.dcard .sum { margin: 2px 0 0; font-size: 14px; line-height: 1.6; }
.dcard .why { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.dcard .why b { color: var(--accent); margin-right: 6px; font-weight: 600; }
.dcard .dsrc { margin: auto 0 0; font-size: 12px; color: var(--muted); }
.dcard .dsrc a { color: inherit; }
.dcard .more { font-size: 13px; color: var(--accent); text-decoration: none; }
.dcard[hidden] { display: none; }

/* 栏目导航 */
.sitenav { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 14px 0 0; font-size: 14px; }
.sitenav a { color: var(--muted); text-decoration: none; padding: 3px 12px; border-radius: 999px; border: 1px solid transparent; }
.sitenav a:hover { color: var(--ink); border-color: var(--line); }
.sitenav a[aria-current="page"] { color: var(--ink); border-color: var(--ink); font-weight: 600; }

/* 社会沉淀：东西两条时间线 */
.rcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px; }
.rlist { display: flex; flex-direction: column; gap: 16px; border-left: 2px dashed var(--line); padding-left: 16px; }
.rcard {
  position: relative; display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px 14px; box-shadow: var(--shadow); border-left: 4px solid var(--accent);
}
.rcard::before { content: ""; position: absolute; left: -25px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); }
.rcard .card-top .chip { margin-left: auto; }
.rcard h3 { margin: 0; font: 800 19px/1.35 var(--serif); }
.rcard .sum { font-size: 14.5px; line-height: 1.65; }
.rcard:hover h3 { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.empty { color: var(--muted); font-size: 14px; }
.detail .card-top .chip { margin-left: auto; }
.legacy { padding-left: 20px; margin: 0; }
.legacy li { margin-bottom: 6px; }

/* 浏览量 */
.stats { display: inline-flex; gap: 10px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.stats:empty { display: none; }
.rcard .card-foot { padding-top: 0; }
.detail .card-top .stats { margin-left: auto; }
.detail .card-top .chip + .stats { margin-left: 8px; }

/* 个人日记与随想 */
.notes [hidden] { display: none !important; }
.notes {
  margin: 28px 0 0; padding: 20px 22px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
}
.notes h2 { margin: 0 0 4px; font: 800 20px/1.35 var(--serif); }
.notes h3 { margin: 22px 0 8px; font: 700 15px/1.4 var(--sans); }
.notes h3 small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.notes .hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.notes textarea, .notes input[type=email], .notes input[type=password], .notes input[name=code], .notes input[name=name] {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
}
.notes textarea { resize: vertical; min-height: 96px; line-height: 1.65; }
.notes textarea:focus, .notes input:focus { outline: 2px solid var(--west); outline-offset: 1px; }
.notes .opts { display: flex; flex-direction: column; gap: 2px; margin: 10px 0; font-size: 14px; }
.notes .opts label { cursor: pointer; }
.notes .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.notes .row input { flex: 1 1 200px; width: auto; }
.notes .who { font-size: 13px; color: var(--muted); }
.notes .msg { font-size: 13.5px; color: var(--east); margin: 6px 0 0; min-height: 1em; }
.notes .msg:empty { display: none; }
.login { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 8px; }
.btn {
  font: inherit; font-size: 14px; padding: 7px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.link { font: inherit; font-size: inherit; background: none; border: 0; padding: 0; color: var(--west); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.notes-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.note { border-left: 3px solid var(--line); padding: 4px 0 4px 12px; }
.note p { margin: 4px 0 0; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.note-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.note-h b { color: var(--ink); font-size: 13.5px; }
.note-h a { color: var(--west); }
.note-h .link { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.st { font-weight: 600; }
.st-pending { color: var(--both); }
.st-approved { color: var(--west); }
.st-rejected { color: var(--east); }
.me-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; margin-bottom: 14px; }
.me-h label { display: inline-flex; gap: 6px; align-items: center; }
.me-h input { width: 12em !important; }
.vt { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.vt th, .vt td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.vt th:first-child, .vt td:first-child { text-align: left; }
@media (max-width: 520px) { .notes { padding: 16px; } }

/* 知多少：中美常识答题 */
.quiz-strip {
  display: flex; align-items: center; gap: 14px; max-width: 640px; margin: 0 auto 32px; padding: 14px 20px;
  text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  background-image: linear-gradient(90deg, var(--west-soft), transparent 40%, transparent 60%, var(--east-soft));
}
.quiz-strip:hover { border-color: var(--ink); }
.qs-flags { font-size: 28px; letter-spacing: 2px; }
.qs-text b { display: block; font: 800 19px/1.3 var(--serif); }
.qs-text small { color: var(--muted); font-size: 13.5px; }

.quiz-hero { text-align: center; padding: 8px 0 36px; }
.kicker { margin: 0 0 6px; color: var(--muted); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; }
.quiz-hero h1 {
  margin: 0; font: 800 clamp(40px, 10vw, 84px)/1.08 var(--serif); letter-spacing: -.01em;
  background: linear-gradient(100deg, var(--west) 0%, var(--west) 38%, var(--east) 62%, var(--east) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-en { margin: 12px 0 0; font: italic 600 clamp(17px, 3vw, 22px)/1.4 "Fraunces", serif; color: var(--ink); }
.hero-sub { max-width: 600px; margin: 16px auto 28px; color: var(--muted); }
.hero-note { max-width: 620px; margin: 20px auto 0; color: var(--muted); font-size: 13.5px; }
.qsides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; max-width: 820px; margin: 0 auto; }
.qside {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--accent);
  border-radius: 16px; padding: 20px 22px 18px; box-shadow: var(--shadow); transition: transform .18s ease;
}
.qside:hover { transform: translateY(-4px) rotate(-.4deg); border-color: var(--accent); }
.qside-flag { font-size: 40px; line-height: 1; }
.qside-t { font: 800 26px/1.25 var(--serif); color: var(--accent); }
.qside-en { font: italic 15px/1.3 "Fraunces", serif; color: var(--muted); }
.qside-teaser { margin: 6px 0 2px; padding: 8px 12px; background: var(--soft); border-radius: 10px; font-size: 14.5px; align-self: stretch; }
.qside-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qside-go { margin-top: 6px; font-weight: 700; color: var(--accent); }

.quiz-play {
  max-width: 720px; margin: 0 auto 36px; padding: 22px 24px 20px; scroll-margin-top: 16px;
  background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--accent, var(--ink)); border-radius: 16px; box-shadow: var(--shadow);
}
.quiz-play[hidden], .quiz-hero[hidden] { display: none; }
.qprog { display: flex; gap: 5px; margin-bottom: 12px; }
.qprog i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.qprog i.now { background: var(--accent); opacity: .45; }
.qprog i.ok { background: #3f9b5a; }
.qprog i.no { background: #c25b4a; }
.qhead { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qhead .quit { margin-left: auto; color: var(--muted); font-size: 13px; }
.lv { font-weight: 700; border-radius: 999px; padding: 0 8px; font-size: 12px; border: 1px solid currentColor; }
.lv1 { color: #3f9b5a; } .lv2 { color: #c58a1b; } .lv3 { color: #c25b4a; }
.qtext { margin: 14px 0 18px; font: 800 clamp(20px, 4vw, 25px)/1.45 var(--serif); }
.qopts { display: grid; gap: 10px; }
.qopt {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; cursor: pointer;
  font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px;
}
.qopt b { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line); font-size: 13px; color: var(--muted); }
.qopt:not(:disabled):hover { border-color: var(--accent); }
.qopt:not(:disabled):hover b { border-color: var(--accent); color: var(--accent); }
.qopt:disabled { cursor: default; }
.qopt.picked { border-color: var(--ink); }
.qopt.right { border-color: #3f9b5a; background: color-mix(in srgb, #3f9b5a 12%, var(--paper)); }
.qopt.right b { background: #3f9b5a; border-color: #3f9b5a; color: #fff; }
.qopt.wrong { border-color: #c25b4a; background: color-mix(in srgb, #c25b4a 12%, var(--paper)); }
.qopt.wrong b { background: #c25b4a; border-color: #c25b4a; color: #fff; }
.qafter { margin-top: 16px; }
.verdict { margin: 0; font-weight: 700; }
.verdict.ok { color: #3f9b5a; } .verdict.no { color: #c25b4a; }
.expl { margin: 6px 0 0; padding: 10px 14px; background: var(--soft, var(--paper)); border-radius: 10px; font-size: 15px; }
.quiz-play .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.quiz-play .row.center { justify-content: center; }
.quiz-play .msg { font-size: 13.5px; color: var(--east); margin: 8px 0 0; overflow-wrap: anywhere; }
.quiz-play .msg:empty { display: none; }

.qresult { text-align: center; }
.qresult .big { font-size: 64px; line-height: 1.1; margin: 4px 0; }
.qresult .score { margin: 0; font-size: 18px; }
.qresult .score b { font: 800 44px/1 var(--serif); color: var(--accent); margin: 0 4px; }
.qresult .score small { display: block; color: var(--muted); font-size: 13px; }
.qresult .title { margin: 10px 0 0; font: 800 26px/1.3 var(--serif); }
.qresult .title span { display: block; font: italic 15px/1.4 "Fraunces", serif; color: var(--muted); }
.qresult .standing { margin: 6px 0 0; color: var(--muted); }
.qresult .standing b { color: var(--ink); }
.rank-box { margin-top: 18px; text-align: left; }
.rank-box .nick { margin: 0; box-shadow: none; }

.quiz-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; align-items: start; }
.quiz-cols .notes { margin-top: 0; }
.board { padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); scroll-margin-top: 16px; }
.board h2, .notes h2 small { font-weight: 400; }
.board h2 { margin: 0 0 12px; font: 800 20px/1.35 var(--serif); }
.board h2 small, .notes h2 small { color: var(--muted); font: italic 14px "Fraunces", serif; margin-left: 4px; }
.board-tabs { justify-content: flex-start; margin-bottom: 14px; gap: 6px; }
.board-tabs .sep { flex: 0 0 8px; }
.board .hint { color: var(--muted); font-size: 14px; }
.board .hint.small { font-size: 12.5px; margin: 12px 0 0; }
.btable td.rk { text-align: center; width: 2.5em; }
.btable td.nm { text-align: left; max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btable th:nth-child(2) { text-align: left; }
.btable tr.self td { background: var(--hl); font-weight: 700; }
.btable tr.gap td { text-align: center; color: var(--muted); border: 0; padding: 0; }
.quiz-credit { text-align: center; color: var(--muted); font-size: 13px; margin: 28px auto 0; max-width: 620px; }
@media (max-width: 520px) {
  .quiz-play, .board { padding: 16px; }
  .qside { padding: 16px 18px; }
  .board-tabs .sep { flex-basis: 100%; height: 0; }
}
@media (prefers-reduced-motion: reduce) { .qside { transition: none; } .qside:hover { transform: none; } }
