/* Chinese learning portal — scoped only. Do not edit hub.css. */
#chinese-portal {
  --cp-ok: #2d6a4f;
  --cp-bad: #8b2942;
  margin: 1.4rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
}
#chinese-portal h2 {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0 0 .55rem;
}
#chinese-portal h3 {
  font-size: 15px;
  font-weight: 650;
  margin: 1rem 0 .35rem;
}
#chinese-portal p { margin: .45rem 0; }
#chinese-portal a { color: var(--lilac); }
#chinese-portal .cp-lead,
#chinese-portal .cp-muted { color: var(--muted); font-size: 13px; }
#chinese-portal .cp-toolbar,
#chinese-portal .cp-stepper,
#chinese-portal .cp-quiz-nav,
#chinese-portal .cp-pager,
#chinese-portal .cp-links {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}
#chinese-portal .cp-toolbar { margin: .35rem 0 .55rem; }
#chinese-portal .cp-stepper { margin: 0 0 .45rem; }
#chinese-portal .cp-stepper .arrow { color: var(--muted); font-size: 12.5px; }
#chinese-portal .cp-status { font-size: 13px; color: var(--muted); margin: .2rem 0 .7rem; }
#chinese-portal .cp-btn,
#chinese-portal button.cp-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--ink);
  border-radius: 8px;
  padding: .4rem .75rem;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
#chinese-portal .cp-btn.primary,
#chinese-portal .cp-btn[aria-pressed="true"],
#chinese-portal .cp-stepper button.is-now {
  background: var(--lilac);
  color: #fbfafc;
  border-color: var(--lilac);
}
#chinese-portal .cp-btn.ghost {
  background: var(--surface);
  color: var(--ink);
}
#chinese-portal .cp-btn:disabled { opacity: .55; cursor: not-allowed; }
#chinese-portal .cp-note {
  margin: 0 0 .75rem;
  font-size: 13px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .7rem .85rem;
}
#chinese-portal .cp-layout {
  display: grid;
  grid-template-columns: minmax(180px, 216px) minmax(0, 1fr);
  gap: .85rem;
  align-items: start;
}
#chinese-portal .cp-side {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .75rem .7rem;
}
#chinese-portal .cp-side h2 { font-size: 13px; letter-spacing: .04em; margin: .35rem 0 .4rem; color: var(--muted); }
#chinese-portal .cp-navitem {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: .45rem .55rem;
  margin: 0 0 .15rem;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
#chinese-portal .cp-navitem:hover,
#chinese-portal .cp-navitem[aria-current="true"] {
  background: var(--lilac-soft);
}
#chinese-portal .cp-tag {
  font-size: 11px;
  color: var(--lilac);
  margin-left: .25rem;
  font-weight: 650;
}
#chinese-portal .cp-card,
#chinese-portal .cp-mod {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .75rem .85rem;
  margin: 0 0 .55rem;
}
#chinese-portal .cp-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lilac);
  font-weight: 700;
}
#chinese-portal .cp-src {
  font-size: 13px;
  color: var(--muted);
  border-left: 3px solid var(--lilac);
  padding: .15rem 0 .15rem .65rem;
}
#chinese-portal .cp-callout,
#chinese-portal .cp-plain,
#chinese-portal details.cp-explain {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .65rem .8rem;
  margin: .65rem 0;
}
#chinese-portal details.cp-explain > summary { cursor: pointer; font-weight: 650; }
#chinese-portal .cp-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}
#chinese-portal table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  margin: .5rem 0;
}
#chinese-portal th, #chinese-portal td {
  border: 1px solid var(--line);
  padding: .4rem .5rem;
  text-align: left;
  vertical-align: top;
}
#chinese-portal th { background: var(--lilac-soft); font-weight: 650; }
#chinese-portal .cp-flow { width: 100%; height: auto; display: block; margin: .6rem 0; }
#chinese-portal .cp-filters {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)) auto;
  gap: .5rem;
  align-items: end;
  margin: 0 0 .85rem;
}
#chinese-portal .cp-filters label {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
#chinese-portal input[type="search"],
#chinese-portal input[type="text"],
#chinese-portal textarea,
#chinese-portal select {
  font: inherit;
  font-size: 14px;
  padding: .4rem .65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}
#chinese-portal textarea { min-height: 6rem; resize: vertical; }
#chinese-portal .cp-mat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .65rem;
}
#chinese-portal .cp-badge {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 999px;
  padding: .08rem .45rem;
  margin: 0 .25rem .2rem 0;
}
#chinese-portal .cp-empty {
  padding: 1.1rem .9rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border-radius: 10px;
  border: 1px dashed var(--line);
}
#chinese-portal .cp-opt {
  display: block;
  padding: .35rem .5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: .3rem 0;
  background: var(--surface);
}
#chinese-portal .cp-ok { color: var(--cp-ok); font-weight: 700; }
#chinese-portal .cp-bad { color: var(--cp-bad); font-weight: 700; }
#chinese-portal .cp-recite .cover {
  position: relative;
  border-radius: 10px;
  padding: .7rem .85rem;
  line-height: 1.8;
  min-height: 4rem;
}
#chinese-portal .cp-recite:not(.is-show) .cover {
  background: var(--lilac-soft);
  color: transparent;
  user-select: none;
}
#chinese-portal .cp-recite:not(.is-show) .cover::after {
  content: attr(data-mask);
  position: absolute;
  inset: 0;
  background: var(--lilac-soft);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 13.5px;
  text-align: center;
  padding: .5rem;
}
#chinese-portal .cp-recite.is-show .cover { background: var(--surface); color: var(--ink); }
#chinese-portal .cp-review-block {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: .8rem;
}
#chinese-portal .cp-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42, 39, 48, .28);
  z-index: 40;
}
#chinese-portal .cp-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--line);
  z-index: 41;
  padding: 1rem 1.05rem 2rem;
  overflow: auto;
  transform: translateX(100%);
}
#chinese-portal .cp-drawer.open { transform: none; }
#chinese-portal [hidden] { display: none !important; }
@media (max-width: 860px) {
  #chinese-portal .cp-layout,
  #chinese-portal .cp-compare,
  #chinese-portal .cp-filters { grid-template-columns: 1fr; }
}
