/* Word-list landing pages (generated by tools/build_pages.py). Hand-written; not generated.
   Chinese text uses system fonts: the site's Chinese web fonts are subsets and lack most gloss characters. */
@font-face { font-family: "Andika"; src: url("../fonts/andika-bold.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #1b1d4d;
  --paper: #fff8ec;
  --pink: #ff7ab6;
  --blue: #3b6bff;
  --yellow: #ffd23f;
  --mint: #3fdcb0;
  --muted: #5a5c86;
  --cn: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --en: "Andika", "Avenir Next", "Segoe UI", var(--cn);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--cn);
  font-weight: 600;
  line-height: 1.6;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8% 10%, rgba(255, 122, 182, .14) 0 140px, transparent 141px),
    radial-gradient(circle at 94% 60%, rgba(59, 107, 255, .1) 0 180px, transparent 181px),
    linear-gradient(rgba(59, 107, 255, .1) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(59, 107, 255, .1) 1.5px, transparent 1.5px);
  background-size: auto, auto, 26px 26px, 26px 26px;
  overflow-wrap: anywhere;
}
a { color: var(--blue); }
a:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; border-radius: 8px; }

.top { max-width: 820px; margin: 0 auto; padding: 14px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 900; letter-spacing: .04em; }
.brand img { display: block; }
.top-go { flex: none; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 800; padding: 6px 14px; border: 2.5px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 0 3px 0 var(--ink); }
.top-go:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

main { max-width: 820px; margin: 0 auto; padding: 4px 16px 24px; }
.crumbs { font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); }
h1 { font-size: clamp(24px, 5.6vw, 34px); line-height: 1.3; margin: 4px 0 6px; font-weight: 900; }
h1 small { display: block; font-family: var(--en); font-size: .62em; color: var(--blue); font-weight: 700; margin-top: 2px; }
h2 { font-size: 19px; margin: 0 0 10px; font-weight: 900; }
.lead { margin: 0 0 14px; color: var(--muted); }
.lead b { color: var(--ink); }
.note { font-size: 14px; color: var(--muted); margin: 8px 0 0; }

.card { background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 rgba(27, 29, 77, .85); padding: 18px 18px 16px; margin: 18px 0; }

.cta-wrap { margin: 12px 0 4px; }
.cta { display: inline-block; padding: 14px 30px; border: 3px solid var(--ink); border-radius: 999px; color: #fff; text-decoration: none; font-size: 20px; font-weight: 900; letter-spacing: .04em;
  background: linear-gradient(180deg, #ff9bd0, #ff4f9a 60%, #ee3a86); text-shadow: 0 2px 0 rgba(150, 20, 85, .45); box-shadow: 0 6px 0 #c22d77, 0 12px 22px rgba(255, 79, 154, .3); }
.cta:hover { filter: brightness(1.04); }
.cta:active { transform: translateY(4px); box-shadow: 0 2px 0 #c22d77; }

.words { width: 100%; border-collapse: collapse; font-size: 17px; }
.words th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 700; padding: 0 10px 6px; border-bottom: 2.5px solid var(--ink); }
.words td { padding: 9px 10px; border-bottom: 1.5px dashed rgba(27, 29, 77, .2); vertical-align: baseline; }
.words tbody tr:last-child td { border-bottom: 0; }
.words tbody tr:nth-child(odd) { background: rgba(255, 210, 63, .1); }
.words .i { width: 2.4em; color: var(--muted); font-size: 13px; text-align: right; padding-right: 4px; }
.words td.w { font-family: var(--en); font-weight: 700; font-size: 20px; color: var(--ink); white-space: nowrap; width: 42%; }
.words td.zh { color: #33355e; }
.words tr.lite td.w { color: #8689b3; }
.words tr.lite td.zh { color: #7c7fa6; }

.how ol { margin: 0; padding-left: 1.4em; }
.how li { margin: 4px 0; }
.how li b { color: #e0337f; }

.units { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.unit { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "n c" "t t" "p p"; gap: 2px 8px; height: 100%; padding: 12px 14px; border: 2.5px solid var(--ink); border-radius: 16px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 4px 0 rgba(27, 29, 77, .8); }
.unit:hover { background: #fffaf0; }
.unit:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(27, 29, 77, .8); }
.unit b { grid-area: n; font-family: var(--en); font-size: 18px; }
.unit .c { grid-area: c; justify-self: end; align-self: center; font-size: 13px; color: #fff; background: var(--blue); border-radius: 999px; padding: 0 10px; }
.unit .t { grid-area: t; font-family: var(--en); font-size: 17px; color: #e0337f; }
.unit .p { grid-area: p; font-family: var(--en); font-size: 14px; color: var(--muted); font-weight: 600; }
.book h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.book h2 a { color: var(--ink); }
.book h2 .c { font-size: 14px; color: var(--muted); font-weight: 700; }

.pager { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.pn { flex: 1 1 180px; display: flex; flex-direction: column; padding: 10px 14px; border: 2.5px solid var(--ink); border-radius: 16px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 800; box-shadow: 0 4px 0 rgba(27, 29, 77, .8); }
.pn span { font-size: 12px; color: var(--muted); font-weight: 700; }
.pn.next { text-align: right; }
.pn.up { text-align: center; background: #fffbe6; }
.pn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(27, 29, 77, .8); }

.foot { text-align: center; font-size: 13px; color: var(--muted); padding: 8px 16px 28px; }

@media (max-width: 480px) {
  .card { padding: 14px 12px 12px; border-radius: 18px; }
  .words { font-size: 16px; }
  .words td { padding: 8px 6px; }
  .words td.w { font-size: 18px; white-space: normal; }
  .cta { display: block; text-align: center; padding: 14px 16px; }
}
