/* ============================================================
   Hanzi Studio — This Week in China（研发版）
   复用 kit.css 骨架；此处只放本页专有样式
   ============================================================ */

/* 预览列与左栏等高 */
.tw-page .kit-studio__grid { align-items: stretch; }
.tw-page .kit-stage { position: relative; top: 0; display: flex; flex-direction: column; }

/* Hero 特效位：本周话题图（城市漫步） */
.tw-page .reveal-img {
  background: url('../../content/this-week/2026-10-04/01-city-walk/cover.jpg') center / cover no-repeat;
}

/* ---------- 三个级别卡片：各自主题色 ---------- */
.tw-card { border-top: 3px solid var(--tw-ac, var(--line)); }
.tw-card--l13 { --tw-ac: #38775F; }
.tw-card--l46 { --tw-ac: #2E5E8E; }
.tw-card--l79 { --tw-ac: #78526E; }
.tw-card .kit-card__num { color: var(--tw-ac); border-color: currentColor; }
.tw-levels { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 三级题目说明 ---------- */
.tw-depths {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; margin-top: 34px;
  background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.tw-depth { background: var(--surface); padding: 20px 22px; }
.tw-depth__k {
  display: block; font-family: var(--serif, Georgia, serif); font-size: 13px;
  letter-spacing: .04em; color: var(--seal); margin-bottom: 8px;
}
.tw-depth p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
/* tw-depths 区块已按需求移除，样式保留无害 */

/* ---------- 左栏 ---------- */
.tw-opt { font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--ink-3); margin-left: 6px; }

.tw-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.tw-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--ink-2); cursor: pointer;
  padding: 6px 8px; border-radius: 8px; border: 1px solid transparent;
  transition: background .18s, border-color .18s;
}
.tw-check:hover { background: var(--seal-soft); }
.tw-check input { accent-color: var(--seal); width: 15px; height: 15px; margin: 0; }
.tw-check input:checked + span { color: var(--ink); font-weight: 500; }

.tw-panel-foot { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 14px; }
.tw-panel-foot .btn { width: 100%; justify-content: center; }
.tw-status { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.tw-note { font-size: 12.5px; line-height: 1.55; color: var(--ink-2); margin: 8px 0 0; }
.tw-note a { color: var(--seal); }
.tw-note code, .tw-rules code, .tw-cmd code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; background: #F3F0E8; padding: 1px 5px; border-radius: 4px; color: var(--ink-2);
}

/* ---------- 预览舞台 ---------- */
#twDoc { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tw-doc-wrap { flex: 1; min-height: 0; display: flex; justify-content: center; overflow: auto; padding: 8px 14px; }
.tw-doc-paper {
  height: 100%; width: auto; max-width: 100%;
  aspect-ratio: 210 / 297;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 18px 44px -30px rgba(40, 32, 24, .45);
  padding: 10px; display: flex;
}
.tw-doc-paper canvas { width: 100%; height: 100%; display: block; border-radius: 4px; }
.tw-doc-paper { transform-origin: top center; transition: transform .18s ease; }
.tw-zoom {
  font: 600 12px/1 var(--sans, system-ui, sans-serif); color: var(--ink-2);
  background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 8px; cursor: pointer; margin-left: 14px;
}
.tw-zoom:focus { outline: 2px solid var(--seal, #B23A2C); outline-offset: 1px; }

.tw-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; color: var(--ink-3);
  border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 30px;
}
.tw-empty[hidden] { display: none; }
.tw-empty p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.tw-empty__sub { font-size: 12px !important; color: var(--ink-3) !important; }

/* ---------- 自己加内容 ---------- */
.tw-files { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: start; }
.tw-tree {
  margin: 0; background: #FBF8F1; border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; line-height: 1.85; color: var(--ink-2); white-space: pre;
}
.tw-tree--cmd { background: #241F1A; color: #F4EFE6; border-color: #241F1A; }
.tw-tree--cmd code { color: #F4EFE6; }

.tw-rules h3, .tw-format h3 {
  font-family: var(--serif, Georgia, serif); font-size: 19px; margin: 0 0 12px; color: var(--ink);
}
.tw-rules ol { margin: 0; padding-left: 20px; }
.tw-rules li { font-size: 13.5px; line-height: 1.75; color: var(--ink-2); margin-bottom: 8px; }
.tw-rules b { color: var(--ink); }

.tw-format { margin-top: 34px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: start; }
.tw-format > h3 { grid-column: 1 / -1; margin-bottom: 0; }
.tw-cmd p { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.tw-cmd p.small { font-size: 12.5px; color: var(--ink-3); margin-top: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .tw-levels, .tw-depths { grid-template-columns: 1fr 1fr; }
  .tw-files, .tw-format { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .tw-levels, .tw-depths { grid-template-columns: 1fr; }
  .tw-doc-paper { height: auto; width: 100%; }
  .tw-checks { grid-template-columns: 1fr; }
}
