:root {
  color-scheme: light;
  --hsk-ink: #17372e;
  --hsk-muted: #455d54;
  --hsk-jade: #176049;
  --hsk-line: #dbe6df;
  --hsk-tint: #f1f7f3;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--hsk-ink);
  background: #fff;
  font: 1rem/1.55 system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
a { color: var(--hsk-jade); }
a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #be8136;
  outline-offset: 4px;
}
.skip { position: absolute; left: .75rem; top: -6rem; padding: .7rem; background: #fff; z-index: 2; }
.skip:focus { top: .75rem; }
.wrapper { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.site-heading { border-bottom: 1px solid var(--hsk-line); }
.site-heading .wrapper {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-heading img { display: block; width: 7.4rem; height: auto; }
.site-heading a:last-child { font-size: .95rem; font-weight: 650; text-underline-offset: .2em; }
main { padding-block: clamp(2rem, 5vw, 4rem); }
h1 { margin: 0; font: 600 clamp(2.1rem, 6vw, 4rem)/1.04 Georgia, serif; letter-spacing: -.035em; }
.summary { margin: 1rem 0 1.7rem; color: var(--hsk-muted); max-width: 65ch; }
.table-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem; }
.levels, .downloads { display: flex; flex-wrap: wrap; gap: .5rem; }
.levels a, .downloads a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .45rem .8rem;
  border: 1px solid var(--hsk-line);
  border-radius: .45rem;
  color: var(--hsk-ink);
  background: white;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 675;
}
.levels a[aria-current="page"] { background: var(--hsk-jade); color: white; border-color: var(--hsk-jade); }
.levels a:not([aria-current="page"]):hover, .downloads a:hover { background: var(--hsk-tint); border-color: var(--hsk-jade); }
.list-heading { margin: 1.15rem 0 .55rem; font-size: 1rem; color: var(--hsk-muted); }
.table-scroll { overflow-x: auto; border: 1px solid var(--hsk-line); border-radius: .65rem; }
table { width: 100%; min-width: 40rem; border-collapse: collapse; text-align: left; }
thead { background: var(--hsk-tint); }
th, td { padding: .75rem clamp(.55rem, 1.6vw, 1.1rem); vertical-align: top; }
thead th { font-size: .875rem; text-align: left; }
tbody tr:nth-child(even) { background: #fafcfb; }
tbody tr { border-top: 1px solid var(--hsk-line); }
.number { color: var(--hsk-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.hanzi, .pinyin { white-space: nowrap; }
.hanzi, .example-zh { font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif; }
.hanzi { font-size: 1.14rem; font-weight: 700; }
.hanzi sup { margin-inline-start: .15em; color: var(--hsk-muted); font-size: .65em; }
.example-zh, .example-en { display: block; }
.example-en { margin-top: .15rem; color: var(--hsk-muted); }
.source { margin-top: 1rem; font-size: .875rem; color: var(--hsk-muted); }
@media print {
  @page { size: A4; margin: 12mm 11mm; }
  .site-heading, .skip, .table-tools { display: none; }
  .wrapper { width: 100%; }
  body { font-size: 9pt; color: #17241e; }
  main { padding: 0; }
  h1 { font-size: 23pt; }
  .summary, .list-heading { margin: 0 0 4mm; }
  .summary { margin-top: 2mm; }
  .table-scroll { overflow: visible; border: 0; }
  table { min-width: 0; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  th, td { padding: 1.6mm 2mm; }
  thead th, .hanzi, .source { font-size: 9pt; }
  .example-en { color: #24392e; }
  a { color: inherit; }
  * { print-color-adjust: exact; }
}
@media screen and (max-width: 640px) {
  table { display: block; min-width: 0; }
  thead, tbody { display: block; }
  tr { display: grid; grid-template-columns: 3rem minmax(5rem, 1fr) minmax(0, 1fr); }
  th, td { padding: .45rem .5rem; }
  thead th:nth-child(n + 4) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  tbody td:nth-child(4), tbody td:nth-child(5) { grid-column: 2 / -1; padding-top: 0; }
  tbody td:nth-child(5) { padding-bottom: .75rem; }
  .pinyin { white-space: normal; overflow-wrap: anywhere; }
}
