:root {
  --ink: #0F1B2D;
  --ink-soft: rgba(15, 27, 45, 0.62);
  --ink-faint: rgba(15, 27, 45, 0.35);
  --paper: #FAFAF7;
  --card: #FFFFFF;
  --brand: #0a5694;
  --brand-deep: #171e60;
  --accent: #C9A961;
  --accent-soft: #E5D4A8;
  --rule: rgba(15, 27, 45, 0.12);
  --ok: #1f7a4d;
  --bad: #b3261e;
  --ff-body: 'IBM Plex Sans', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --ff-display: 'Newsreader', 'Noto Serif SC', 'Songti SC', serif;
  --max: 1180px;
  --pad: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--ff-body); }
a { color: var(--brand); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
main.wrap { padding-top: 28px; padding-bottom: 64px; min-height: 60vh; }
.narrow { max-width: 560px; }
.muted { color: var(--ink-soft); font-size: 0.92em; }
.empty { color: var(--ink-soft); padding: 48px 0; }

/* Masthead */
.masthead { background: var(--ink); color: var(--paper); border-bottom: 3px solid var(--accent); }
.masthead__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-block: 10px; }
.brand { color: var(--paper); text-decoration: none; font: 600 1.45rem/1 var(--ff-display); letter-spacing: 0.01em; }
.brand__mark { color: var(--accent); }
.brand__zh { font-size: 0.7em; opacity: 0.7; margin-left: 6px; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 0.92rem; }
.nav a { color: rgba(250, 250, 247, 0.85); text-decoration: none; }
.nav a:hover { color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 6px; padding: 10px 18px;
  background: var(--brand); color: #fff; font: 500 0.95rem/1.2 var(--ff-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.12); transition: background 0.15s, box-shadow 0.15s, transform 0.05s, color 0.15s; }
.btn:hover { background: var(--brand-deep); box-shadow: 0 2px 6px rgba(15, 27, 45, 0.18); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn--gold { background: var(--accent); color: var(--ink) !important; }
.btn--gold:hover { background: var(--accent-soft); }
.btn--ghost { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 1px #c9d6e4; }
.btn--ghost:hover { background: #f1f6fb; box-shadow: inset 0 0 0 1px var(--brand); }
.btn--ok { background: var(--ok); color: #fff; }
.btn--ok:hover { background: #17603c; }
.btn--ok-soft { background: #e3f3ea; color: var(--ok); box-shadow: inset 0 0 0 1px #b8dfc8; }
.btn--ok-soft:hover { background: var(--ok); color: #fff; box-shadow: none; }
.btn--danger { background: #fff; color: var(--bad); box-shadow: inset 0 0 0 1px #f0c4c0; }
.btn--danger:hover { background: var(--bad); color: #fff; }
.btn--sm { padding: 6px 12px; font-size: 0.85rem; border-radius: 5px; }
.btn--wide { width: 100%; }
.btn__meta { font-size: 0.75em; font-weight: 400; opacity: 0.7; }
.link { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; }
.link--danger { color: var(--bad); }

/* Category tabs */
.cats { display: flex; gap: 6px 22px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.cats a { color: var(--ink-soft); text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; font-weight: 500; }
.cats a.is-on, .cats a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.page-title { font: 600 clamp(1.7rem, 3vw, 2.3rem)/1.2 var(--ff-display); margin: 0 0 20px; }
.section-title { font: 600 1.35rem var(--ff-display); margin: 40px 0 16px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.card__link { display: block; color: inherit; text-decoration: none; height: 100%; }
.card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card__body { padding: 16px 18px 20px; }
.card__title { font: 600 1.25rem/1.3 var(--ff-display); margin: 6px 0 8px; }
.card__link:hover .card__title { color: var(--brand); }
.card__summary { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
@media (min-width: 900px) {
  .card--lead { grid-column: 1 / -1; }
  .card--lead .card__link:has(.card__img) { display: grid; grid-template-columns: 3fr 2fr; }
  .card--lead .card__body { max-width: 760px; }
  .card--lead .card__img { height: 100%; aspect-ratio: auto; min-height: 320px; }
  .card--lead .card__body { padding: 32px; align-self: center; }
  .card--lead .card__title { font-size: 2rem; }
}
.kicker { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.kicker a { color: var(--brand); text-decoration: none; }
.lock { color: #8a6d1f; }
.lock::before { content: "● "; color: var(--accent); }
.pager { display: flex; justify-content: space-between; margin-top: 36px; }

/* Story */
.story { max-width: 720px; margin: 0 auto; }
.story__title { font: 600 clamp(2rem, 4.5vw, 3rem)/1.15 var(--ff-display); margin: 10px 0 14px; }
.story__dek { font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 12px; }
.byline { font-size: 0.9rem; color: var(--ink-soft); }
.story__cover { width: 100%; border-radius: 4px; margin: 20px 0; }
.prose { font-size: 1.1rem; line-height: 1.75; }
.prose h2, .prose h3 { font-family: var(--ff-display); line-height: 1.3; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1.4em 0; padding: 0.2em 0 0.2em 1.1em; color: var(--ink-soft); font-style: italic; }
.prose img { margin: 1.4em auto; border-radius: 4px; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose--fade { position: relative; max-height: 22em; overflow: hidden; }
.prose--fade::after { content: ""; position: absolute; inset: auto 0 0 0; height: 8em; background: linear-gradient(transparent, var(--paper)); }
.paywall { border-top: 3px solid var(--accent); background: var(--card); padding: 28px; margin-top: 8px; text-align: center; border-radius: 0 0 6px 6px; box-shadow: 0 1px 0 var(--rule); }
.paywall h2 { font: 600 1.5rem var(--ff-display); margin: 0 0 6px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 20px 0; }
.plan { display: flex; flex-direction: column; gap: 2px; padding: 16px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); text-decoration: none; cursor: pointer; }
.plan:hover, .plans--pick .plan:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plans--pick input { position: absolute; opacity: 0; }
.plan__name { font-weight: 600; }
.plan__price { font: 600 1.4rem var(--ff-display); }
.plan__days { color: var(--ink-soft); font-size: 0.85rem; }
.notice { background: #fff7e2; border: 1px solid var(--accent-soft); padding: 10px 14px; border-radius: 4px; }
.error { background: #fdecea; border: 1px solid #f5c2bd; color: var(--bad); padding: 10px 14px; border-radius: 4px; }
.lede { font-size: 1.1rem; color: var(--ink-soft); }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 18px 20px; margin: 16px 0 24px; }
.panel .btn { margin: 4px 6px 0 0; }

/* Forms */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: 0.92rem; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea, .search input {
  font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 4px; background: #fff; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus, .search input:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; }
.form-row > label { flex: 1 1 180px; }
.form-actions { display: flex; gap: 10px; }
.search { display: flex; gap: 10px; margin-bottom: 20px; max-width: 560px; }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; padding-bottom: 12px; margin-bottom: 24px; border-bottom: 1px solid var(--rule); }
.admin-nav a { text-decoration: none; font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 28px; }
.stats div { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 14px 16px; }
.stats b { display: block; font: 600 1.6rem var(--ff-display); }
.stats span { color: var(--ink-soft); font-size: 0.85rem; }
.table { width: 100%; border-collapse: collapse; background: var(--card); font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table th { font-weight: 600; color: var(--ink-soft); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
@media (max-width: 720px) { .table { display: block; overflow-x: auto; white-space: nowrap; } }
.status { font-size: 0.78rem; padding: 2px 8px; border-radius: 10px; background: #eceae4; }
.status--published, .status--paid { background: #dff1e6; color: var(--ok); }
.status--scheduled, .status--pending { background: #fff2cc; color: #7a5a00; }
.status--review { background: #e3ecf7; color: var(--brand); }
.status--failed, .status--cancelled { background: #fdecea; color: var(--bad); }
.editor #editor { background: #fff; min-height: 420px; font-size: 1.05rem; }
.cover-now { display: flex; align-items: center; gap: 10px; }
.cover-now img { width: 96px; border-radius: 4px; }
.inline { display: flex; gap: 6px; align-items: center; }
.inline select, .inline input { padding: 5px 6px; border: 1px solid var(--rule); border-radius: 4px; font: inherit; }
.short { width: 76px; }
.plan-row { padding: 12px 0; border-bottom: 1px solid var(--rule); }

.foot { border-top: 1px solid var(--rule); padding: 22px 0; color: var(--ink-soft); font-size: 0.88rem; }
.foot__row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot a { color: inherit; }

/* v2: language switch, front page rail, badges, share, captions */
.langs { display: inline-flex; gap: 4px; color: rgba(250, 250, 247, 0.5); }
.langs a { padding: 0 2px; }
.langs a.is-on { color: var(--accent); }
.front { display: grid; gap: 32px; margin-top: 28px; }
@media (min-width: 1000px) { .front { grid-template-columns: minmax(0, 1fr) 280px; } }
.rail { border-top: 3px solid var(--ink); padding-top: 12px; align-self: start; position: sticky; top: 16px; }
.rail__title { font: 600 1.1rem var(--ff-display); margin: 0 0 8px; }
.rail__list { margin: 0; padding-left: 1.3em; }
.rail__list li { padding: 8px 0; border-bottom: 1px solid var(--rule); font: 500 1rem/1.35 var(--ff-display); }
.rail__list li::marker { color: var(--accent); font-weight: 600; }
.rail__list a { color: var(--ink); text-decoration: none; }
.rail__list a:hover { color: var(--brand); }
.breaking { color: #fff; background: var(--bad); padding: 0 6px; border-radius: 2px; font-weight: 600; }
.story__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-block: 1px solid var(--rule); padding: 8px 0; margin: 14px 0; }
.story__meta .byline { margin: 0; }
.share { display: flex; gap: 14px; font-size: 0.85rem; }
.share a, .share .link { color: var(--ink-soft); text-decoration: none; }
.share a:hover, .share .link:hover { color: var(--brand); }
.story__cover { margin: 20px 0; }
.story__cover img { width: 100%; border-radius: 4px; }
.story__cover figcaption, .prose figcaption { font-size: 0.85rem; color: var(--ink-soft); padding-top: 6px; }
.stats a { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 14px 16px; color: inherit; text-decoration: none; }
.stats a:hover { border-color: var(--accent); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters select, .filters input { padding: 7px 10px; border: 1px solid var(--rule); border-radius: 4px; font: inherit; }
.tag { display: inline-block; font-size: 0.7rem; padding: 1px 6px; margin-left: 6px; border-radius: 3px; background: #eceae4; color: var(--ink-soft); vertical-align: middle; }
.tag--ai { background: #ece6fb; color: #5a3fb0; }
.tag--red { background: #fdecea; color: var(--bad); }
.page-title .tag { font-size: 0.8rem; }
#wordcount { margin: -6px 0 0; }
code { background: #eceae4; padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }

.editor .ql-editor p { margin-bottom: 0.8em; }
.editor .ql-editor { font: 1.05rem/1.7 var(--ff-body); }
.versions { margin: 8px 0 0; font-size: 0.9rem; }
.versions a { margin-right: 14px; font-weight: 500; }

/* v3 admin: newsroom desk, pills, bulk bar, two-column editor */
.admin-nav .admin-nav__front { margin-left: auto; color: var(--ink-soft); }
.desk { margin-bottom: 32px; }
.desk h2 { font: 600 1.25rem var(--ff-display); margin: 0 0 12px; }
.desk__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.desk-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.desk-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #eceae4; display: block; }
.desk-card__img--empty { display: grid; place-items: center; color: var(--ink-soft); font-size: 0.9rem; }
.desk-card__body { display: grid; gap: 8px; padding: 12px 14px 14px; flex: 1; align-content: start; }
.desk-card__tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.78rem; color: var(--ink-soft); }
.desk-card__title { font: 600 1.02rem/1.35 var(--ff-display); margin: 0; }
.desk-card__versions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; }
.desk-card__versions form { margin: 0; }
.pill { display: inline-block; font-size: 0.76rem; font-weight: 500; padding: 2px 9px; border-radius: 10px; background: #eceae4; color: var(--ink-soft); white-space: nowrap; }
.pill--ok { background: #dff1e6; color: var(--ok); }
.pill--warn { background: #fff2cc; color: #7a5a00; }
.pill--bad { background: #fdecea; color: var(--bad); }
.pill--none { background: #eceae4; color: var(--ink-soft); }
.bulkbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 10px; background: var(--card); border: 1px solid var(--rule); border-bottom: 0; border-radius: 6px 6px 0 0; font-size: 0.9rem; }
.bulkbar select { padding: 5px 8px; border: 1px solid var(--rule); border-radius: 4px; font: inherit; }
.table--stories td:first-child, .table--stories th:first-child { width: 28px; }
.t-title { white-space: normal; min-width: 240px; }
.t-title a { font-weight: 500; }
.pager { display: flex; gap: 16px; justify-content: center; margin: 18px 0; }

.edit-head { margin-bottom: 14px; }
.edit-layout { align-items: start; }
.edit-main { display: grid; gap: 14px; min-width: 0; }
.edit-side { display: grid; gap: 14px; }
.side-box { display: grid; gap: 12px; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 14px; }
.side-box h3 { font: 600 0.95rem var(--ff-body); margin: 0; }
.side-box p { margin: 0; }
.side-box--notes { border-color: var(--accent-soft); background: #fffcf3; }
.side-box--notes textarea { font-size: 0.85rem !important; line-height: 1.5; }
.input-title { font: 600 1.35rem var(--ff-display) !important; }
@media (min-width: 1000px) {
  .edit-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
  .edit-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
}
@media (max-width: 720px) {
  .desk__grid { grid-template-columns: 1fr; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1; }
  .editor #editor { min-height: 300px; }
}

/* v4: public sources list, publish shortcuts */
.sources { margin: 36px 0 8px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 0.88rem; }
.sources h2 { font: 600 0.8rem var(--ff-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin: 0 0 8px; }
.sources ol { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; }
.sources a { color: var(--ink); overflow-wrap: anywhere; }
.sources .muted { font-size: 0.8rem; }
.edit-head__actions { display: flex; gap: 10px; margin: 6px 0 10px; }

/* v4: sticky save bar, desk buttons */
.savebar { position: sticky; bottom: 0; z-index: 20; grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; margin: 8px -12px 0; padding: 10px 12px; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(6px);
  border-top: 1px solid var(--rule); box-shadow: 0 -4px 14px rgba(15, 27, 45, 0.07); }
.savebar__info { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; }
.savebar__actions { display: flex; gap: 8px; flex-wrap: wrap; }
#savestate.is-dirty { color: #a15c00; }
.bulkbar .btn { padding: 5px 14px; }
.table--stories td:last-child { text-align: right; }
@media (max-width: 720px) {
  .savebar { margin: 8px -16px 0; padding: 10px 16px; }
  .savebar__actions { width: 100%; }
  .savebar__actions .btn { flex: 1; }
}
.story__cover figcaption .cap, .story__cover figcaption .credit { display: block; }
.story__cover figcaption .credit { font-size: 0.78rem; letter-spacing: 0.02em; opacity: 0.85; margin-top: 2px; }
.desk-card__actions { display: grid; gap: 8px; margin-top: auto; padding-top: 4px; }
.btnrow { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.btnrow .btn { padding-inline: 8px; }
.dot { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 500; color: var(--ink-soft); }
.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; }
.dot--review::before { background: #d4a017; }
.dot--published::before { background: var(--ok); }
.dot--draft::before { background: #9ca3af; }
.desk-card__body { display: flex; flex-direction: column; }

/* Email newsletter */
.nl-box { margin-top: 24px; padding: 16px 18px; background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: 6px; }
.story .nl-box, article .nl-box { margin-top: 36px; }
.nl-box__title { font: 600 1.05rem var(--ff-display); margin: 0 0 4px; }
.nl-box .muted { font-size: 0.88rem; margin: 0 0 10px; }
.nl-form { gap: 10px; }
.nl-langs { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nl-langs legend { float: left; font-weight: 500; font-size: 0.92rem; margin-right: 6px; padding: 0; }
.panel--warn { background: #fff7e2; border-color: var(--accent-soft); }
.panel--warn h3 { margin: 0 0 6px; }
.nl-today { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-bottom: 24px; }
.nl-list { margin: 0; padding-left: 1.3em; font-size: 0.9rem; display: grid; gap: 3px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* Trash */
.admin-nav .count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 0.72rem; text-align: center; }
.desk-card { position: relative; }
.desk-card__trash { position: absolute; top: 8px; right: 8px; padding: 4px 8px; background: rgba(255, 255, 255, 0.92); }
.btn--icon { background: #fff; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--rule); padding: 5px 8px; margin-left: 4px; }
.btn--icon:hover { background: #fdecea; color: var(--bad); box-shadow: inset 0 0 0 1px #f0c4c0; }
.t-actions { white-space: nowrap; }
.t-actions form { display: inline-block; margin-left: 4px; }
.trash-empty { margin-top: 16px; text-align: right; }
.notice--trash { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.site-notice { background: var(--accent); color: var(--ink); font-size: 0.92rem; font-weight: 500; padding: 8px 0; text-align: center; }

/* Settings */
.settings { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .settings { grid-template-columns: 190px minmax(0, 1fr); } }
.settings__nav { display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 900px) { .settings__nav { flex-direction: column; position: sticky; top: 16px; } }
.settings__nav a { padding: 8px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 0.92rem; background: var(--card); border: 1px solid var(--rule); }
.settings__nav a:hover { border-color: var(--brand); color: var(--brand); }
.settings__body { display: grid; gap: 20px; }
.set-card { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 20px 22px; scroll-margin-top: 16px; }
.set-card header { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.set-card h2 { font: 600 1.15rem var(--ff-display); margin: 0 0 4px; }
.set-card h3 { font: 600 0.95rem var(--ff-body); margin: 0 0 8px; }
.set-card header p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 12px 0; border-bottom: 1px dashed var(--rule); }
.set-row--stack { flex-direction: column; align-items: stretch; }
.set-row__text { display: grid; gap: 3px; }
.set-row__text span { color: var(--ink-soft); font-size: 0.85rem; }
.set-actions { padding-top: 12px; }
.set-2col { display: grid; gap: 14px; }
@media (min-width: 700px) { .set-2col { grid-template-columns: 1fr 1fr; } }
.set-2col--top { align-items: start; }
.set-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.set-stats div { background: #faf9f5; border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; }
.set-stats b { display: block; font: 600 1.35rem var(--ff-display); }
.set-stats span { color: var(--ink-soft); font-size: 0.8rem; }
.set-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 14px; font-size: 0.9rem; }
.set-list dt { color: var(--ink-soft); }
.set-list dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.set-staff { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; font-size: 0.9rem; }
@media (max-width: 600px) { .set-list { grid-template-columns: 1fr; } .set-list dt { margin-top: 6px; } }
/* Toggle switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd4db; border-radius: 26px; transition: background 0.15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.form .switch { display: inline-block; }
.form .set-row input.short { width: 84px; flex: none; text-align: center; }

/* Editor layout hardening: plain block flow in the main column, Quill grows with its text */
.edit-layout { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .edit-layout { grid-template-columns: minmax(0, 1fr) 340px; } }
.edit-main { display: flex; flex-direction: column; gap: 14px; }
.edit-main > * { flex: none; }
.editor #editor { min-height: 0; height: auto; }
.editor .ql-container { height: auto; }
.editor .ql-editor { min-height: 420px; overflow-y: visible; }
.side-box--versions .version-row { display: flex; align-items: center; gap: 8px; }
.link-pick { display: flex; gap: 6px; }
.link-pick select { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 4px; font: inherit; font-size: 0.85rem; }

/* Quill's header picker labels come from CSS; show them in Chinese on Chinese pages. */
html[lang="zh-CN"] .ql-snow .ql-picker.ql-header .ql-picker-label::before,
html[lang="zh-CN"] .ql-snow .ql-picker.ql-header .ql-picker-item::before { content: "正文"; }
html[lang="zh-CN"] .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
html[lang="zh-CN"] .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { content: "标题 2"; }
html[lang="zh-CN"] .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
html[lang="zh-CN"] .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: "标题 3"; }

/* ===== Newsroom features (v10) ===== */
/* Nav: newsroom tools, then admin-only pages; wraps on small screens */
.admin-nav { align-items: center; }
.admin-nav__sep { width: 1px; height: 16px; background: var(--rule); }
@media (max-width: 720px) {
  .admin-nav { gap: 6px 14px; font-size: 0.92rem; }
  .admin-nav__sep { flex-basis: 100%; height: 0; }
  .admin-nav .admin-nav__front { margin-left: 0; }
}
.crumbs { margin: 0 0 6px; font-size: 0.9rem; }
.btnrow--inline, .rev-head .btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rev-head .btnrow form { display: inline; }

/* Editor sidebar: history + preview link, media picker */
.side-link { font-weight: 500; text-decoration: none; }
.preview-link { display: grid; gap: 6px; }
.copy-row { display: flex; gap: 6px; }
.copy-row input { flex: 1; min-width: 0; font-size: 0.8rem; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 4px; background: #faf9f5; }
.editor-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.editor-tools p { margin: 0; }
.media-picker { width: min(920px, 94vw); max-height: 86vh; border: 1px solid var(--rule); border-radius: 8px; padding: 16px; }
.media-picker::backdrop { background: rgba(15, 27, 45, 0.45); }
.media-picker__head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.media-picker__head h2 { font: 600 1.1rem var(--ff-display); margin: 0; flex: none; }
.media-picker__head input { flex: 1; min-width: 160px; padding: 7px 10px; border: 1px solid var(--rule); border-radius: 4px; font: inherit; }
.media-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.media-grid--picker { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 10px; }
.media-tile { border: 2px solid transparent; border-radius: 6px; padding: 0; background: #eceae4; cursor: pointer; aspect-ratio: 4 / 3; overflow: hidden; }
.media-tile img { width: 100%; height: 100%; object-fit: cover; }
.media-tile:hover, .media-tile:focus-visible { border-color: var(--brand); outline: none; }

/* Media library page */
.media-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 8px; }
.media-upload { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px; }
.media-upload input[name=credit] { padding: 6px 8px; border: 1px solid var(--rule); border-radius: 4px; font: inherit; width: 150px; }
.media-card { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.media-card__img { display: block; aspect-ratio: 4 / 3; background: #eceae4; }
.media-card__img img { width: 100%; height: 100%; object-fit: cover; }
.media-card__body { padding: 10px 12px; display: grid; gap: 6px; font-size: 0.85rem; }
.media-card__body p { margin: 0; }
.media-card__name code { font-size: 0.75rem; word-break: break-all; }
.media-card__form { display: grid; gap: 6px; }
.media-card__form label { display: grid; gap: 2px; font-size: 0.78rem; color: var(--ink-soft); }
.media-card__form input { padding: 5px 8px; border: 1px solid var(--rule); border-radius: 4px; font: inherit; font-size: 0.85rem; color: var(--ink); }
.media-card .btnrow { display: flex; flex-wrap: wrap; gap: 6px; }

/* Revisions and diffs */
.diff-size ins, .diff ins, .rev-meta ins { background: #dff1e6; color: #0f5132; text-decoration: none; border-bottom: 2px solid #8fd1ab; }
.diff-size del, .diff del, .rev-meta del { background: #fdecea; color: var(--bad); text-decoration: line-through; }
.diff-size { font-size: 0.82rem; white-space: nowrap; }
.diff-size ins, .diff-size del { border: 0; padding: 0 4px; border-radius: 3px; }
.diff { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font-size: 0.95rem; }
.rev-diff .section-title { font-size: 1.05rem; margin: 24px 0 8px; }
.rev-head { display: grid; gap: 8px; margin-bottom: 16px; }
.rev-head p { margin: 0; }
.rev-meta { margin-bottom: 8px; }
.rev-meta td { overflow-wrap: anywhere; }

/* Stats */
.stat-card { margin-bottom: 18px; }
.stat-card h2 { font: 600 1.05rem var(--ff-display); margin: 0 0 12px; }
.stat-2col { display: grid; gap: 18px; }
@media (min-width: 860px) { .stat-2col { grid-template-columns: 1fr 1fr; } .stat-2col .stat-card { margin-bottom: 0; } .stat-2col { margin-bottom: 18px; } }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart__grid { stroke: var(--rule); stroke-width: 1; }
.chart__tick { fill: var(--ink-soft); font: 11px var(--ff-body); }
.chart__label { fill: var(--ink); font: 12px var(--ff-body); }
.chart__line { stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart__area { fill: rgba(10, 86, 148, 0.1); }
.chart__dot { fill: var(--brand); }
.chart__bar { fill: var(--brand); }
.chart__bar:hover, .chart__dot:hover { fill: var(--brand-deep); }
.chart--spark { height: 36px; }
.chart--stack { height: 22px; border-radius: 4px; overflow: hidden; background: #eceae4; margin-top: 4px; }
.chart__seg { fill: var(--ink-faint); }
.chart__seg--ok { fill: var(--ok); }
.chart__seg--bad { fill: var(--bad); }
.top-list { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; font-size: 0.92rem; }
.dash-trend { display: grid; gap: 14px 24px; grid-template-columns: minmax(0, 1fr); align-items: center; background: var(--card); border: 1px solid var(--rule);
  border-radius: 6px; padding: 12px 16px; margin: -12px 0 28px; color: inherit; text-decoration: none; }
.dash-trend:hover { border-color: var(--accent); }
@media (min-width: 760px) { .dash-trend { grid-template-columns: 220px minmax(0, 1fr) auto; } }
.dash-trend__spark, .dash-trend__top { display: grid; gap: 4px; font-size: 0.88rem; }
.dash-trend__top ol { margin: 0; padding-left: 1.3em; }
.dash-trend__top li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-trend__more { color: var(--brand); font-weight: 500; font-size: 0.88rem; }

/* Editorial calendar */
.cal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.cal-head__kicker { margin: 0; font-size: 0.8rem; letter-spacing: 0.06em; color: var(--ink-soft); }
.cal-head__month { margin: 2px 0 0; font: 600 clamp(1.6rem, 3vw, 2.2rem)/1.1 var(--ff-display); letter-spacing: -0.01em; }
.cal-nav { display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); overflow: hidden; }
.cal-nav a { text-decoration: none; color: var(--ink); padding: 7px 14px; font-size: 0.88rem; }
.cal-nav__btn { font-size: 1.2rem !important; line-height: 1; padding: 5px 14px !important; }
.cal-nav a:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.cal-nav__today { border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); font-weight: 600; }
.cal-nav__today.is-on { color: var(--brand); }
.cal-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cal-sum div { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 14px; }
.cal-sum b { display: block; font: 600 1.5rem/1.1 var(--ff-display); }
.cal-sum span { font-size: 0.8rem; color: var(--ink-soft); }
.cal-sum--warn b { color: #b7791f; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.8rem; margin-bottom: 10px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cal-dot--live { background: var(--brand); }
.cal-dot--sched { border: 1.5px dashed #b7791f; }
.cal-dot--event { background: #8e5ac9; }
.cal { border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--card); }
.cal__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal__row + .cal__row { border-top: 1px solid var(--rule); }
.cal__row--head div { padding: 8px 10px; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 4%, var(--card)); }
.cal__row--head .is-weekend { color: var(--ink-faint); }
.cal__cell { min-height: 118px; padding: 8px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cal__cell + .cal__cell { border-left: 1px solid var(--rule); }
.cal__cell--weekend { background: color-mix(in srgb, var(--ink) 2.5%, var(--card)); }
.cal__cell--out { background: color-mix(in srgb, var(--ink) 5%, var(--card)); }
.cal__cell--out > * { opacity: 0.45; }
.cal__dayrow { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cal__day { display: inline-flex; align-items: center; gap: 4px; }
.cal__wd { display: none; font-size: 0.78rem; color: var(--ink-soft); }
.cal__num { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%; font-weight: 600; font-size: 0.86rem; }
.cal__cell--past:not(.cal__cell--out) .cal__num { color: var(--ink-soft); }
.cal__cell--today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal__cell--today .cal__num { background: var(--accent); color: #1b1505; }
.cal__count { font-size: 0.7rem; color: var(--ink-soft); background: color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 999px; padding: 1px 7px; }
.cal__event { display: flex; flex-direction: column; gap: 1px; text-decoration: none; color: var(--ink); font-size: 0.76rem; line-height: 1.3;
  padding: 4px 7px; border-radius: 6px; background: color-mix(in srgb, #8e5ac9 13%, var(--card)); border-left: 3px solid #8e5ac9; }
.cal__event-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 600; }
.cal__until { font-size: 0.68rem; color: var(--ink-soft); }
.cal__item { --tone: var(--brand); position: relative; display: flex; gap: 4px; align-items: flex-start; border-radius: 6px; padding: 5px 6px 5px 8px;
  background: color-mix(in srgb, var(--tone) 9%, var(--card)); border-left: 3px solid var(--tone); }
.cal__item:hover { background: color-mix(in srgb, var(--tone) 16%, var(--card)); }
.cal__item--sched { background: transparent; border: 1.5px dashed #b7791f; border-left-width: 3px; border-left-style: solid; border-left-color: #b7791f; }
.cal__item--more { display: none; }
.cal__cell.is-open .cal__item--more { display: flex; }
.cal__cell.is-open .cal__morebtn { display: none; }
.cal__link { flex: 1; min-width: 0; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.cal__meta { display: flex; gap: 6px; align-items: center; font-size: 0.68rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; }
.cal__time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.cal__cat { overflow: hidden; text-overflow: ellipsis; }
.cal__ai { font-size: 0.6rem; font-weight: 700; padding: 0 4px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.cal__title { font-size: 0.78rem; line-height: 1.32; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal__langs { display: flex; flex-direction: column; gap: 2px; }
.cal__langs a { font-size: 0.64rem; font-weight: 700; text-decoration: none; color: var(--tone); border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent);
  border-radius: 4px; padding: 0 4px; line-height: 1.5; text-align: center; }
.cal__langs a:hover { background: var(--tone); color: var(--card); }
.cal__morebtn { align-self: flex-start; border: 0; background: none; color: var(--brand); font-size: 0.76rem; font-weight: 600; cursor: pointer; padding: 2px 0; }
/* One colour per category (by id), so a week's mix of sections is visible at a glance. */
.cal-tone0 { --tone: #2b6cb0; } .cal-tone1 { --tone: #2f855a; } .cal-tone2 { --tone: #c05621; }
.cal-tone3 { --tone: #b83280; } .cal-tone4 { --tone: #2c7a7b; } .cal-tone5 { --tone: #6b46c1; }
html[data-theme="dark"] .cal-tone0 { --tone: #7fb2e5; } html[data-theme="dark"] .cal-tone1 { --tone: #68d391; }
html[data-theme="dark"] .cal-tone2 { --tone: #f6ad55; } html[data-theme="dark"] .cal-tone3 { --tone: #f687b3; }
html[data-theme="dark"] .cal-tone4 { --tone: #4fd1c5; } html[data-theme="dark"] .cal-tone5 { --tone: #b794f4; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .cal-tone0 { --tone: #7fb2e5; } html:not([data-theme="light"]) .cal-tone1 { --tone: #68d391; }
  html:not([data-theme="light"]) .cal-tone2 { --tone: #f6ad55; } html:not([data-theme="light"]) .cal-tone3 { --tone: #f687b3; }
  html:not([data-theme="light"]) .cal-tone4 { --tone: #4fd1c5; } html:not([data-theme="light"]) .cal-tone5 { --tone: #b794f4; }
}
/* Phones: an agenda of the days that have something (and today), with the weekday spelled out. */
@media (max-width: 720px) {
  .cal { border-radius: 10px; }
  .cal__row--head { display: none; }
  .cal__row { grid-template-columns: 1fr; }
  .cal__row + .cal__row { border-top: 0; }
  .cal__cell { min-height: 0; padding: 10px 12px; }
  .cal__cell + .cal__cell { border-left: 0; }
  .cal__cell:not(.cal__cell--out) { border-top: 1px solid var(--rule); }
  .cal__cell--out, .cal__cell--empty:not(.cal__cell--today) { display: none; }
  .cal__wd { display: inline; }
  .cal__item--more { display: flex; }
  .cal__morebtn { display: none; }
  .cal__title { -webkit-line-clamp: 3; font-size: 0.86rem; }
}

/* Audit log */
.audit-filters label.inline { display: inline-flex; gap: 6px; align-items: center; font-size: 0.88rem; }
.audit-table td { font-size: 0.86rem; }
.audit-table code { font-size: 0.78rem; }
.notice--preview { background: #fdecea; border-color: #f0c4c0; color: var(--bad); font-weight: 600; text-align: center; }
/* ===== Reader features (v10) ===== */
/* Dark theme (reader pages only; the newsroom stays light). Follows the system unless the reader picked one. */
html[data-theme="dark"] body.is-reader {
  --ink: #E6E9EE; --ink-soft: rgba(230, 233, 238, 0.68); --ink-faint: rgba(230, 233, 238, 0.4);
  --paper: #0D1520; --card: #152131; --brand: #7FB2E5; --brand-deep: #A9CBEE;
  --accent: #C9A961; --accent-soft: #6B5A34; --rule: rgba(230, 233, 238, 0.14); --ok: #5cc28e; --bad: #f08a80;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body.is-reader {
    --ink: #E6E9EE; --ink-soft: rgba(230, 233, 238, 0.68); --ink-faint: rgba(230, 233, 238, 0.4);
    --paper: #0D1520; --card: #152131; --brand: #7FB2E5; --brand-deep: #A9CBEE;
    --accent: #C9A961; --accent-soft: #6B5A34; --rule: rgba(230, 233, 238, 0.14); --ok: #5cc28e; --bad: #f08a80;
    color-scheme: dark;
  }
}
/* Pieces with fixed light colours, restated for the dark theme. */
html[data-theme="dark"] body.is-reader .masthead, html[data-theme="dark"] body.is-reader .brand { background: #0B2340; color: #FAFAF7; }
html[data-theme="dark"] body.is-reader .notice { background: #2a2414; border-color: #5a4a26; }
html[data-theme="dark"] body.is-reader .error { background: #3a1a18; border-color: #6e2e29; }
html[data-theme="dark"] body.is-reader .form input:not([type=checkbox]):not([type=radio]),
html[data-theme="dark"] body.is-reader .form textarea, html[data-theme="dark"] body.is-reader .form select,
html[data-theme="dark"] body.is-reader .search input { background: #0f1a27; color: var(--ink); }
html[data-theme="dark"] body.is-reader .btn--ghost { background: transparent; }
html[data-theme="dark"] body.is-reader code { background: #1d2a3b; }
html[data-theme="dark"] body.is-reader .lock { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body.is-reader .masthead, html:not([data-theme="light"]) body.is-reader .brand { background: #0B2340; color: #FAFAF7; }
  html:not([data-theme="light"]) body.is-reader .notice { background: #2a2414; border-color: #5a4a26; }
  html:not([data-theme="light"]) body.is-reader .error { background: #3a1a18; border-color: #6e2e29; }
  html:not([data-theme="light"]) body.is-reader .form input:not([type=checkbox]):not([type=radio]),
  html:not([data-theme="light"]) body.is-reader .form textarea, html:not([data-theme="light"]) body.is-reader .form select,
  html:not([data-theme="light"]) body.is-reader .search input { background: #0f1a27; color: var(--ink); }
  html:not([data-theme="light"]) body.is-reader .btn--ghost { background: transparent; }
  html:not([data-theme="light"]) body.is-reader code { background: #1d2a3b; }
  html:not([data-theme="light"]) body.is-reader .lock { color: var(--accent); }
}
.brand { background: none; }
.theme-toggle { background: none; border: 1px solid rgba(250, 250, 247, 0.3); color: rgba(250, 250, 247, 0.85); border-radius: 50%;
  width: 30px; height: 30px; padding: 0; font-size: 1rem; line-height: 1; cursor: pointer; }
.theme-toggle:hover { color: #fff; border-color: var(--accent); }

/* Reading progress, text size */
.read-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 50; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.prose { font-size: calc(1.1rem * var(--prose-scale, 1)); }
.textsize { display: inline-flex; gap: 4px; }
.textsize button { background: none; border: 1px solid var(--rule); border-radius: 4px; color: var(--ink-soft); font: 500 0.8rem var(--ff-body);
  padding: 2px 8px; cursor: pointer; }
.textsize button:hover { color: var(--brand); border-color: var(--brand); }

/* Pictures: <picture> wrappers behave like the image inside */
picture { display: block; }
.card picture { display: block; }
.story__cover picture img { width: 100%; height: auto; border-radius: 4px; }
@media (min-width: 900px) { .card--lead picture { height: 100%; } }
.zoomable { cursor: zoom-in; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(5, 12, 22, 0.94); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; margin: 0; touch-action: pinch-zoom; }
.lightbox__close { position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
body.no-scroll { overflow: hidden; }

/* Video embeds (16:9) */
.prose .video { position: relative; margin: 1.4em 0; aspect-ratio: 16 / 9; background: #000; border-radius: 4px; overflow: hidden; }
.prose .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; aspect-ratio: auto; }

/* Tags and topics */
.tag-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; }
.chip { display: inline-block; padding: 4px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card);
  color: var(--ink-soft); text-decoration: none; font-size: 0.85rem; }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip--topic { border-color: var(--accent); color: var(--ink); }
.chip--topic::before { content: "◆ "; color: var(--accent); font-size: 0.7em; vertical-align: 1px; }
.rail__title--topics { margin-top: 24px; }
.topics { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.topics a { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--accent);
  color: var(--ink); text-decoration: none; font-size: 0.88rem; }
.topics a:hover { background: var(--accent); color: #0F1B2D; }
.topics .muted { font-size: 0.75rem; }
.tag-head { margin-bottom: 24px; }
.tag-head .page-title { margin-bottom: 6px; }
.tag-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-edit input:not([type=checkbox]) { padding: 5px 7px; border: 1px solid var(--rule); border-radius: 4px; font: inherit; width: 130px; }
.tag-edit input[name=description] { width: 220px; }
.tag-edit .check { display: inline-flex; gap: 4px; align-items: center; }
.t-actions .inline { display: inline-flex; }

/* Tips */
.tip-line { margin: 28px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--card); font-size: 0.95rem; }
.tip-line a { font-weight: 600; }
.tips__anon { margin-top: -6px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.tip-tabs a { text-decoration: none; }
.tip-body { white-space: pre-wrap; font-size: 1rem; line-height: 1.6; }
.tip-photos { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.tip-photos img { width: 180px; height: 135px; object-fit: cover; border-radius: 4px; border: 1px solid var(--rule); }
.form-actions form { margin: 0; }

/* Comments */
.comments { max-width: 720px; margin: 40px auto 0; }
.comments .section-title .muted { font-size: 0.8rem; font-weight: 400; margin-left: 6px; }
.comment-list { list-style: none; margin: 0 0 20px; padding: 0; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.comment--pending { opacity: 0.75; }
.comment__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.85rem; color: var(--ink-soft); }
.comment__meta b { color: var(--ink); }
.comment__body { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.comment-form { display: grid; gap: 8px; }
.comment-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px; font: inherit; background: var(--card); color: var(--ink); resize: vertical; }
.comment-form__rules { font-size: 0.82rem; margin: 0; }
.comment-form .btn { justify-self: start; }
.comment-gate { margin: 8px 0 0; }
.notice--warn { background: #fdecea; border-color: #f0c4c0; }
.cm-body { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 520px; }

/* The hidden attribute always wins over component display rules. */
[hidden] { display: none !important; }
/* Gold buttons keep dark text in both themes (--ink turns light in dark mode). */
.btn--gold, .btn--gold:hover { color: #0F1B2D !important; }
/* Desk cards: button rows wrap instead of overflowing narrow cards. */
.desk__grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.btnrow .btn { flex: 1 1 auto; min-width: 0; padding-inline: 10px; }
.desk-card__actions .btnrow .btn--ok { flex-basis: 100%; }
@media (min-width: 1300px) { .desk-card__actions .btnrow .btn--ok { flex-basis: auto; } }
.bulkbar input[data-for], .bulkbar select[data-for] { padding: 5px 8px; border: 1px solid var(--rule); border-radius: 4px; font: inherit; min-width: 180px; }

/* ===== Front page redesign (v11) ===== */
/* Top info bar */
.topbar { background: #081a30; color: rgba(250, 250, 247, 0.72); font-size: 0.8rem; }
.topbar__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 34px; flex-wrap: wrap; }
.topbar__nav { display: flex; align-items: center; gap: 16px; }
.topbar a { color: rgba(250, 250, 247, 0.85); text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar .theme-toggle { width: 26px; height: 26px; font-size: 0.85rem; }
/* Masthead */
.masthead--reader { background: #0B2340; border-bottom: 0; }
.masthead__brand { display: grid; justify-items: center; text-align: center; padding-block: 22px 18px; position: relative; }
.brand--big { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.01em; color: #FAFAF7; }
.brand--big .brand__zh { font-size: 0.42em; opacity: 0.75; margin-left: 12px; letter-spacing: 0.2em; vertical-align: middle; }
.masthead__tagline { margin: 8px 0 0; font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(250, 250, 247, 0.6); }
.masthead__cta { position: absolute; right: var(--pad); top: 50%; transform: translateY(-50%); }
/* Sticky section bar */
.sectionbar { position: sticky; top: 0; z-index: 30; background: var(--card); border-bottom: 1px solid var(--rule); box-shadow: 0 1px 0 rgba(15, 27, 45, 0.04); border-top: 3px solid var(--accent); }
.sectionbar__row { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.sectionbar__row::-webkit-scrollbar { display: none; }
.sectionbar a { flex: none; padding: 13px 14px 11px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.sectionbar a:hover { color: var(--brand); }
.sectionbar a.is-on { border-bottom-color: var(--brand); color: var(--brand); }
.sectionbar__search { margin-left: auto; color: var(--ink-soft) !important; font-weight: 500 !important; }
/* Kicker */
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.76rem; color: var(--ink-soft); letter-spacing: 0.02em; }
.kicker__cat { color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
/* Breaking ticker */
.ticker { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 10px 14px; background: #fff3f1; border: 1px solid #f3c7c2; border-radius: 6px; overflow: hidden; }
.ticker__label { flex: none; background: var(--bad); color: #fff; font-weight: 700; font-size: 0.78rem; padding: 3px 8px; border-radius: 3px; letter-spacing: 0.05em; }
.ticker__items { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.ticker__items a { flex: none; color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.ticker__items a:hover { color: var(--bad); }
/* Top stories: lead + headlines */
.topstories { display: grid; gap: 28px; margin: 28px 0 8px; padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
@media (min-width: 1000px) { .topstories { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); } }
.leadstory a { color: inherit; text-decoration: none; display: block; }
.leadstory__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; }
.leadstory picture { display: block; overflow: hidden; border-radius: 6px; }
.leadstory__body { padding-top: 16px; }
.leadstory__title { font: 600 clamp(1.6rem, 3.2vw, 2.45rem)/1.18 var(--ff-display); margin: 8px 0 10px; letter-spacing: -0.01em; }
.leadstory a:hover .leadstory__title { color: var(--brand); }
.leadstory__summary { font-size: 1.06rem; line-height: 1.6; color: var(--ink-soft); margin: 0; }
.heads { display: grid; align-content: start; gap: 0; }
.blockhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 6px; padding-top: 10px; border-top: 3px solid var(--ink); font: 700 1.2rem var(--ff-display); }
.blockhead a { color: var(--ink); text-decoration: none; }
.blockhead a:hover { color: var(--brand); }
.blockhead__more { font: 600 0.82rem var(--ff-body) !important; color: var(--brand) !important; letter-spacing: 0.03em; }
/* Compact items */
.item { border-bottom: 1px solid var(--rule); }
.item:last-child { border-bottom: 0; }
.item__link { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; color: inherit; text-decoration: none; }
.item__link picture { flex: none; }
.item__img { width: 112px; height: 76px; object-fit: cover; border-radius: 4px; display: block; flex: none; transition: transform 0.25s; }
.item__link:hover .item__img { transform: scale(1.04); }
.item__link picture, .item__link > .item__img { overflow: hidden; border-radius: 4px; }
.item__body { min-width: 0; display: grid; gap: 5px; }
.item__title { font: 600 1.02rem/1.38 var(--ff-display); margin: 0; }
.item__link:hover .item__title { color: var(--brand); }
.item__summary { margin: 2px 0 0; color: var(--ink-soft); font-size: 0.93rem; line-height: 1.55; }
.item--big .item__link { flex-direction: column; gap: 12px; padding-top: 4px; }
.item--big .item__img { width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 6px; }
.item--big picture { width: 100%; }
.item--big .item__title { font-size: 1.32rem; line-height: 1.28; }
/* Sections */
.front__main { min-width: 0; display: grid; gap: 34px; }
.section__grid { display: grid; gap: 22px; }
@media (min-width: 760px) { .section__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.section__list .item:first-child .item__link { padding-top: 4px; }
.river { display: grid; }
@media (min-width: 760px) { .river { grid-template-columns: 1fr 1fr; column-gap: 28px; } .river .item:nth-last-child(2) { border-bottom: 0; } }
.river__more { margin: 18px 0 0; text-align: center; }
.front .rail { position: sticky; top: 64px; }
/* Reader footer */
.foot--reader { background: #0B2340; color: rgba(250, 250, 247, 0.72); border-top: 3px solid var(--accent); margin-top: 56px; padding: 40px 0 0; font-size: 0.9rem; }
.foot--reader a { color: rgba(250, 250, 247, 0.88); text-decoration: none; }
.foot--reader a:hover { color: #fff; text-decoration: underline; }
.foot__grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
@media (min-width: 900px) { .foot__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot__col h3 { font: 700 0.78rem var(--ff-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.foot__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot__col--about p { margin: 12px 0 0; line-height: 1.6; max-width: 36ch; }
.foot--reader .brand { font-size: 1.5rem; }
.foot__base { margin-top: 32px; padding-block: 16px; border-top: 1px solid rgba(250, 250, 247, 0.12); font-size: 0.8rem; color: rgba(250, 250, 247, 0.5); }
/* Dark theme adjustments */
html[data-theme="dark"] .ticker { background: #2a1512; border-color: #5c2a24; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .ticker { background: #2a1512; border-color: #5c2a24; } }
/* Mobile */
@media (max-width: 640px) {
  .topbar__date { display: none; }
  .topbar__row { justify-content: flex-end; }
  .masthead__brand { padding-block: 16px 12px; }
  .masthead__tagline { font-size: 0.7rem; letter-spacing: 0.12em; }
  .masthead__cta { position: static; transform: none; margin-top: 10px; }
  .sectionbar__search span { display: none; }
  .item__img { width: 96px; height: 66px; }
  .front .rail { position: static; }
}
/* A section with a single story: picture beside the text, full width. */
@media (min-width: 760px) {
  .section__grid--solo { grid-template-columns: 1fr; }
  .section__grid--solo .item--big .item__link { flex-direction: row; gap: 24px; align-items: center; }
  .section__grid--solo .item--big picture, .section__grid--solo .item--big .item__img { width: 48%; flex: none; }
  .section__grid--solo .item--big .item__img { width: 100%; }
}
/* Newsletter language choice: label on its own line, options side by side. */
.nl-langs legend { float: none; width: 100%; margin: 0 0 6px; }
.nl-langs { gap: 6px 18px; }

/* ===== Article typography (v12): separate Chinese and English reading styles ===== */
.story { max-width: 740px; }
.story { --zh-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
         --zh-serif: "Songti SC", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", serif; }
.story__title { letter-spacing: -0.01em; text-wrap: balance; }
.story__dek { line-height: 1.6; text-wrap: pretty; }
.prose { color: var(--ink); overflow-wrap: break-word; }
.prose > * { margin-block: 0; }
.prose p { margin: 0 0 1.25em; }
.prose a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong, .prose b { font-weight: 700; color: var(--ink); }
.prose h2 { font-size: 1.42em; margin: 1.9em 0 0.7em; line-height: 1.3; }
.prose h3 { font-size: 1.18em; margin: 1.6em 0 0.6em; line-height: 1.35; }
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 1.5em; }
.prose li { margin: 0 0 0.5em; padding-left: 0.2em; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose blockquote { margin: 1.8em 0; padding: 0.9em 1.2em; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); border-radius: 0 6px 6px 0; color: var(--ink); font-style: normal; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; text-align: center; margin: 2.2em 0; }
.prose hr::before { content: "• • •"; color: var(--accent); letter-spacing: 0.6em; font-size: 0.9em; }
.prose img, .prose picture img { display: block; width: 100%; height: auto; margin: 1.8em auto 0.6em; border-radius: 6px; }
.prose figure { margin: 1.8em 0; }
.prose figure img { margin: 0; }
.prose figcaption { font-size: 0.8em; line-height: 1.55; color: var(--ink-soft); padding-top: 8px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.9em; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: left; }
.prose th { font-weight: 700; border-bottom-width: 2px; }
.prose pre, .prose code { font-size: 0.85em; }
.prose .video { margin: 1.8em 0; }
.story__cover { margin: 26px 0 30px; }
.story__cover figcaption { font-size: 0.82rem; line-height: 1.55; padding-top: 8px; }

/* Chinese: sans body, generous leading, justified, ~36 characters per line */
.story[lang="zh"] .story__title { font-family: var(--zh-serif); font-weight: 700; line-height: 1.3; letter-spacing: 0.01em; }
.story[lang="zh"] .story__dek { font-family: var(--zh-sans); font-size: 1.12rem; line-height: 1.75; }
.story[lang="zh"] .prose { font-family: var(--zh-sans); font-size: calc(1.14rem * var(--prose-scale, 1)); line-height: 1.95; letter-spacing: 0.02em;
  text-align: justify; text-justify: inter-character; hanging-punctuation: allow-end; }
.story[lang="zh"] .prose p { margin-bottom: 1.35em; }
.story[lang="zh"] .prose h2 { font-family: var(--zh-sans); font-weight: 700; font-size: 1.3em; letter-spacing: 0.03em; padding-left: 14px; position: relative; text-align: left; }
.story[lang="zh"] .prose h2::before { content: ""; position: absolute; left: 0; top: 0.2em; bottom: 0.2em; width: 4px; border-radius: 2px; background: var(--accent); }
.story[lang="zh"] .prose h3 { font-family: var(--zh-sans); font-weight: 700; font-size: 1.12em; text-align: left; }
.story[lang="zh"] .prose blockquote { font-size: 1em; }
.story[lang="zh"] .prose em, .story[lang="zh"] .prose i { font-style: normal; font-weight: 600; }   /* CJK has no true italics */
.story[lang="zh"] .prose li, .story[lang="zh"] .prose figcaption { text-align: left; }

/* English: serif body, ~68 characters per line, drop cap on the first paragraph */
.story:not([lang="zh"]) .prose { font-family: "Newsreader", Georgia, "Times New Roman", serif; font-size: calc(1.24rem * var(--prose-scale, 1));
  line-height: 1.68; font-optical-sizing: auto; hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; }
.story:not([lang="zh"]) .prose h2, .story:not([lang="zh"]) .prose h3 { font-family: var(--ff-display); font-weight: 600; }
.story:not([lang="zh"]) .prose blockquote { font-style: italic; font-size: 1.05em; }
.story:not([lang="zh"]) .prose figcaption, .story:not([lang="zh"]) .prose table { font-family: var(--ff-body); }
.story:not([lang="zh"]) .prose > p:first-of-type::first-letter { float: left; font-family: var(--ff-display); font-weight: 600; font-size: 3.4em; line-height: 0.82; margin: 0.08em 0.1em 0 0; color: var(--brand); }

/* Phones: slightly smaller type, same rhythm; keep lines comfortably short */
@media (max-width: 640px) {
  .story__title { font-size: clamp(1.65rem, 7vw, 2.1rem); }
  .story__dek { font-size: 1.02rem; }
  .story[lang="zh"] .prose { font-size: calc(1.06rem * var(--prose-scale, 1)); line-height: 1.9; letter-spacing: 0.015em; }
  .story:not([lang="zh"]) .prose { font-size: calc(1.12rem * var(--prose-scale, 1)); line-height: 1.64; }
  .prose h2 { margin-top: 1.6em; }
  .prose blockquote { padding: 0.7em 0.9em; margin: 1.4em 0; }
  .story__cover { margin: 18px calc(-1 * var(--pad)) 22px; }
  .story__cover img, .story__cover picture img { border-radius: 0; }
  .story__cover figcaption { padding-inline: var(--pad); }
}
.prose blockquote > :last-child, .story[lang="zh"] .prose blockquote p:last-child { margin-bottom: 0; }
@media (max-width: 640px) { .story__cover { width: auto; } }
/* Cloud backup card */
.cloud-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
.cloud-actions form { margin: 0; }
.cloud-setup { margin: 12px 0; padding: 12px 14px; background: #faf9f5; border: 1px solid var(--rule); border-radius: 6px; }
.cloud-setup summary { cursor: pointer; font-weight: 600; }
.cloud-steps { margin: 12px 0; padding-left: 1.3em; display: grid; gap: 8px; font-size: 0.9rem; line-height: 1.6; }
.cloud-uri { display: inline-block; margin-top: 4px; word-break: break-all; user-select: all; }
.cloud-files { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; font-size: 0.9rem; }
/* Categories: inline-editable rows */
.cat-list { display: grid; gap: 8px; margin: 16px 0 28px; }
.cat-row { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr 80px 70px auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; margin: 0; }
.cat-row--head { background: none; border: 0; padding: 0 12px; font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.cat-row label { display: block; margin: 0; }
.cat-row input { width: 100%; padding: 7px 9px; border: 1px solid var(--rule); border-radius: 4px; font: inherit; background: #fff; }
.cat-row__label { display: none; }
.cat-slug { display: flex; align-items: center; gap: 2px; color: var(--ink-soft); font-size: 0.85rem; }
.cat-slug input { font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; }
.cat-count a { text-decoration: none; font-weight: 600; }
.cat-actions { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 860px) {
  .cat-row { grid-template-columns: 1fr 1fr; }
  .cat-row--head { display: none; }
  .cat-row__label { display: block; font-size: 0.75rem; color: var(--ink-soft); margin-bottom: 3px; }
  .cat-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Lead & breaking desk */
.feat-card { margin-bottom: 20px; }
.feat-item { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.feat-item__img { width: 180px; aspect-ratio: 3/2; object-fit: cover; border-radius: 6px; flex: none; background: var(--rule); }
.feat-item__img--empty { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.feat-item__body { flex: 1; min-width: 0; }
.feat-item .kicker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.82rem; color: var(--ink-soft); }
.feat-item__title { font: 600 1.15rem/1.35 var(--ff-display); margin: 6px 0 10px; }
.feat-item__title a { color: inherit; text-decoration: none; }
.feat-item__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.feat-item__actions form { margin: 0; }
.feat-pick { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding-top: 14px; border-top: 1px dashed var(--rule); }
.feat-pick label { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; }
.feat-pick select { width: 100%; }
.feat-list { display: flex; flex-direction: column; }
.feat-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.feat-row form { margin: 0; }
.feat-row__title { color: inherit; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feat-clear { margin-top: 12px; }
@media (max-width: 640px) {
  .feat-item { flex-direction: column; }
  .feat-item__img { width: 100%; }
  .feat-row { grid-template-columns: 1fr auto; }
  .feat-row__title { grid-column: 1 / -1; white-space: normal; }
}

/* Copy desk (chief copy editor) */
.status--copyedit { background: #fff2cc; color: #7a5a00; }
.copydesk { border: 1px solid #e8c766; background: #fffaf0; border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.copydesk--hold { border-color: #f0c4c0; background: #fdf3f2; }
.copydesk--done { border-color: var(--rule); background: transparent; }
.copydesk--edits { border-color: #b9d3ee; background: #f3f8fd; }
.copydesk__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.copydesk__actions form { margin: 0; }
.copydesk--edits .muted { margin: 6px 0 0; font-size: 0.85rem; }
.copydesk-send { margin: 0 0 16px; }
html[data-theme="dark"] .copydesk--edits { background: #14202c; border-color: #2b4560; }
.copydesk__head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.copydesk__head form { margin: 0; }
.copydesk summary { cursor: pointer; font-weight: 600; margin-top: 8px; }
.copydesk--done summary { margin-top: 0; }
.copydesk__report { white-space: pre-wrap; font-size: 0.88rem; line-height: 1.6; margin-top: 8px; color: var(--ink); }
.desk-card__copy { font-size: 0.85rem; margin: 4px 0 8px; }
.desk-card__copy summary { cursor: pointer; color: var(--ink-soft); }
.desk-card__copy .copydesk__report { max-height: 220px; overflow: auto; }
html[data-theme="dark"] .copydesk { background: #2a2414; border-color: #5a4a26; }
html[data-theme="dark"] .copydesk--hold { background: #2e1a19; border-color: #6a3430; }
html[data-theme="dark"] .copydesk--done { background: transparent; border-color: var(--rule); }

/* Events guide */
.ev-head { margin: 8px 0 18px; max-width: 760px; }
.ev-head .page-title { margin-bottom: 8px; }
.ev-filters { display: grid; gap: 10px; margin: 0 0 26px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.ev-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { color: var(--ink); text-decoration: none; font-size: 0.9rem; }
.chip--sm { font-size: 0.82rem; padding: 3px 10px; }
.chip--on, .chip--on:hover { background: var(--ink); border-color: var(--ink); color: var(--paper, #fff); }
.chip--on .muted { color: inherit; opacity: 0.7; }
.ev-featured { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 0 0 30px; }
.ev-feat { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; color: var(--ink); text-decoration: none; }
.ev-feat:hover strong { text-decoration: underline; }
.ev-feat__img, .ev-feat picture img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.ev-feat__img--none { display: grid; place-items: center; background: linear-gradient(135deg, #0B2340, #0A5694); color: var(--accent); font: 600 1.2rem var(--ff-display); }
.ev-feat__body { display: grid; gap: 6px; padding: 14px 16px 16px; }
.ev-feat__body strong { font: 600 1.15rem/1.3 var(--ff-display); }
.ev-group { margin: 0 0 30px; }
.ev-group__title { font: 600 1.1rem var(--ff-display); margin: 0 0 4px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.ev-row { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.ev-row:has(.ev-row__img) { grid-template-columns: 64px 1fr 150px; }
.ev-date { display: grid; justify-items: center; padding: 6px 0 7px; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); color: var(--ink); text-decoration: none; line-height: 1.1; }
.ev-date__wd, .ev-date__m { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.ev-date__m { color: #9A7B34; font-weight: 600; }
.ev-date__d { font: 700 1.6rem/1.15 var(--ff-display); }
.ev-row__title { font: 600 1.2rem/1.3 var(--ff-display); margin: 4px 0 4px; }
.ev-row__title a { color: var(--ink); text-decoration: none; }
.ev-row__title a:hover { text-decoration: underline; }
.ev-row__meta { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.ev-row__sum { margin: 6px 0 0; font-size: 0.95rem; }
.ev-row__actions { margin: 8px 0 0; display: flex; gap: 16px; font-size: 0.9rem; font-weight: 600; }
.ev-row__img img { width: 150px; height: 100px; object-fit: cover; border-radius: 6px; display: block; }
.ev-now { color: var(--ok); font-weight: 700; }
.ev-free { color: var(--ok); font-weight: 700; }
.ev-tix { color: #9A7B34; }
.ev-disclaimer { font-size: 0.85rem; margin: 18px 0; }
@media (max-width: 640px) {
  .ev-row, .ev-row:has(.ev-row__img) { grid-template-columns: 54px 1fr; gap: 12px; }
  .ev-row__img { display: none; }
}

.event { margin-top: 8px; }
.event__title { font: 600 clamp(1.8rem, 3.6vw, 2.6rem)/1.15 var(--ff-display); margin: 6px 0 10px; max-width: 900px; }
.event__dek { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 18px; max-width: 760px; }
.event__layout { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .event__layout { grid-template-columns: minmax(0, 1fr) 330px; } .event__card { position: sticky; top: 64px; } }
.event__cover { margin: 0 0 20px; }
.event__cover img { width: 100%; height: auto; border-radius: 8px; display: block; }
.event__cover figcaption { font-size: 0.8rem; color: var(--ink-soft); margin-top: 6px; }
.event__sec { margin: 0 0 24px; }
.event__sec h2 { font: 600 0.8rem var(--ff-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin: 0 0 8px; }
.prose--event { font-size: 1.05rem; }
.event__info { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.event__card { background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: 8px; padding: 18px; display: grid; gap: 16px; }
.facts { margin: 0; display: grid; gap: 14px; }
.facts dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin-bottom: 3px; }
.facts dd { margin: 0; font-size: 0.95rem; line-height: 1.5; }
.tix h2 { font: 600 0.8rem var(--ff-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin: 0 0 8px; }
.tix__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--rule); border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 0.92rem; }
.tix__row:hover { border-color: var(--accent); }
.tix__row--main { background: #C9A961; border-color: #C9A961; color: #0F1B2D; }
.tix__row--main .muted { color: rgba(15, 27, 45, 0.7); }
.tix__price { font-weight: 600; }
.tix__go { white-space: nowrap; font-weight: 700; }
.tix__note { font-size: 0.8rem; margin: 4px 0 0; }
.event__cal { display: flex; flex-wrap: wrap; gap: 8px; }
.event__share { display: flex; gap: 14px; font-size: 0.88rem; margin: 0; }
.ev-form fieldset { border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px 16px; display: grid; gap: 12px; margin: 0; }
.ev-form legend { font-weight: 600; padding: 0 6px; }
.ev-form__row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ev-table .nowrap { white-space: nowrap; }

/* Fact check on the story editor */
.notice--figures { background: #fdecea; border-color: #f0c4c0; }
.facts-table table { margin-top: 10px; font-size: 0.88rem; }
.facts-table td { vertical-align: top; }
.facts-table .nowrap { white-space: nowrap; }
.ev-thumb { float: right; margin-left: 8px; }
.ev-thumb img { width: 72px; height: 48px; object-fit: cover; border-radius: 4px; display: block; }

/* Correction note under a story */
.correction { margin: 30px 0 0; padding: 12px 16px; border-left: 3px solid var(--bad); background: var(--card); font-size: 0.95rem; }
.correction h2 { font: 600 0.85rem var(--ff-body); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 4px; }
.correction p { margin: 0; }
.policy .prose h2 { margin-top: 1.6em; }
.status--hold { background: #fdecea; color: var(--bad); }
.dot--copyedit::before { background: #d4a017; }
.dot--hold::before { background: #c0392b; }
/* Phones: queue tables become cards, title on its own line and the action buttons at the bottom, no sideways scroll. */
@media (max-width: 720px) {
  .table.table--cards { display: block; overflow: visible; white-space: normal; background: transparent; }
  .table--cards tbody, .table--cards tr, .table--cards td { display: block; }
  .table--cards tr:first-child:has(th) { display: none; }
  .table--cards tr { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; position: relative; }
  .table--cards td { border: 0; padding: 3px 0; }
  .table--cards td:empty { display: none; }
  .table--cards td:first-child:has(> input[type=checkbox]) { position: absolute; top: 10px; right: 12px; padding: 0; }
  .table--cards td.t-title, .table--cards td:nth-child(2) { font-weight: 600; padding-right: 32px; }
  .table--cards td:last-child { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
  .table--cards td:last-child .btn { min-height: 36px; }
}
/* Chinese headlines break only between words (see wrapTitle); a word longer than the line may still wrap. */
.wt { word-break: keep-all; overflow-wrap: anywhere; }
.leadstory__title, .card__title, .item__title, .event__title, .ev-row__title { text-wrap: balance; }
@media (max-width: 720px) {
  main.wrap { padding-top: 16px; }
  .topstories { margin-top: 0; }
  .leadstory__title { font-size: 1.55rem; line-height: 1.25; }
  .story__title { font-size: 1.75rem; line-height: 1.25; }
}
/* Newsroom notes */
.nr-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px; }
.nr-tabs a { text-decoration: none; color: var(--ink); padding: 7px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); font-size: 0.9rem; }
.nr-tabs a.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.nr-add { display: grid; grid-template-columns: 1.2fr 1fr 0.7fr 1.2fr 1.2fr auto; gap: 8px; margin: 10px 0 14px; }
@media (max-width: 860px) { .nr-add { grid-template-columns: 1fr 1fr; } }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86rem; line-height: 1.55; width: 100%; }
.nr-leads { list-style: none; padding: 0; margin: 0; }
.nr-leads li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 0.9rem; flex-wrap: wrap; }
.nr-leads li a { flex: 1; min-width: 220px; color: var(--ink); text-decoration: none; }
.nr-leads li a:hover { color: var(--brand); }
.nr-src { font-size: 0.72rem; font-weight: 600; color: var(--ink-soft); min-width: 110px; }
.nr-src.is-pri { color: #b7791f; }
.nr-edit { border-bottom: 1px solid var(--rule); padding: 6px 0; }
.nr-edit summary { cursor: pointer; }
.nr-edit del { background: color-mix(in srgb, var(--bad) 15%, transparent); text-decoration: line-through; }
.nr-edit ins { background: color-mix(in srgb, var(--ok) 18%, transparent); text-decoration: none; }
.social-card textarea, .social-card input { width: 100%; }
.social-card .copy-row { display: flex; gap: 8px; align-items: flex-start; }
.social-preview { border: 1px solid var(--rule); border-radius: 8px; padding: 16px; background: #fff; color: #222; max-height: 420px; overflow: auto; margin: 10px 0; }
.side-list { margin: 4px 0 0; padding-left: 18px; font-size: 0.86rem; }
.desk-card__reject { display: inline-block; }
.desk-card__reject > summary { list-style: none; cursor: pointer; }
.desk-card__reject > summary::-webkit-details-marker { display: none; }
.desk-card__reasons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding: 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); }
.thread-note { font-size: 0.92rem; color: var(--ink-soft); border-left: 3px solid var(--accent); padding: 4px 0 4px 10px; margin: 0 0 18px; }
.thread { margin: 28px 0; padding: 14px 18px; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); }
.thread h2 { font-size: 1rem; margin: 0 0 8px; }
.thread ol { margin: 0; padding-left: 20px; }
