:root {
  --red: #c8202a;
  --ink: #1f2933;
  --soft: #52606d;
  --line: #e3e8ee;
  --tint: #fbf3f3;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 "Inter", "Segoe UI", Roboto, "Noto Sans", "Noto Sans CJK HK", "PingFang HK", "Microsoft JhengHei", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

header { text-align: center; padding: 2.5rem 1rem 1.5rem; background: linear-gradient(180deg, var(--tint), #fff); }
header img { width: 170px; height: 170px; border-radius: 24px; }
h1 { margin: .25rem 0 0; font-size: 2.6rem; line-height: 1.2; }
.tagline { margin: .35rem 0 1.1rem; font-size: 1.2rem; color: var(--soft); }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 0; }
.links a { padding: .5rem 1.1rem; border-radius: 999px; background: var(--red); color: #fff; font-weight: 600; }
.links a:hover { text-decoration: none; filter: brightness(1.1); }
.links .soon { padding: .4rem 1rem; border: 2px dashed var(--red); border-radius: 999px; color: var(--red); font-weight: 600; cursor: default; }

nav { position: sticky; top: 0; z-index: 2; display: flex; gap: 1.25rem; justify-content: safe center; overflow-x: auto; white-space: nowrap; padding: .65rem 1rem; background: rgba(255, 255, 255, .96); border-block: 1px solid var(--line); font-size: .95rem; }
nav a { color: var(--soft); }

.research { margin: .9rem 0 0; font-size: .95rem; color: var(--soft); }

main { max-width: 1180px; margin: 0 auto; padding: 0 1rem; }
section { padding-top: 1rem; scroll-margin-top: 3rem; }
section + section { border-top: 1px solid var(--line); margin-top: 2rem; }
h2 { color: var(--red); font-size: 1.55rem; margin: 1.25rem 0 .5rem; }
code { font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Noto Sans Mono CJK HK", monospace; font-size: .9em; background: #f3f5f8; border-radius: 4px; padding: .08em .3em; }

figure { margin: 1rem 0; }
.figure-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; padding: .5rem; }
.figure-scroll img { display: block; width: 100%; min-width: 720px; height: auto; margin: 0 auto; max-width: 1040px; }
figcaption { color: var(--soft); font-size: .92rem; text-align: center; margin-top: .5rem; }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.25rem; }
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid var(--line); padding: .7rem .8rem; vertical-align: middle; text-align: left; }
th { background: var(--tint); font-size: .92rem; }
td.text { min-width: 14rem; }
td.case { width: 12rem; font-weight: 600; }
td.case .said { font-weight: 400; }
td.au { width: 292px; }
td.ref { width: 292px; }
audio { display: block; width: 270px; max-width: 100%; height: 38px; }
.cap { display: block; font-size: .85rem; color: var(--soft); margin: .15rem 0 .25rem; }
.said { display: block; font-size: .85rem; color: var(--soft); margin-top: .35rem; }
.jp { font-family: monospace; font-weight: 700; color: var(--ink); }
.jp.good { color: var(--red); }
code.ssml { display: block; white-space: pre-wrap; word-break: break-word; padding: .5rem .6rem; line-height: 1.7; }
code.ssml b { color: var(--red); font-weight: 600; }
.en { color: var(--red); font-weight: 600; }
table.refs td { width: 50%; }

footer { margin-top: 2.5rem; padding: 1.25rem 1rem 2rem; border-top: 1px solid var(--line); text-align: center; color: var(--soft); font-size: .9rem; }

@media (max-width: 800px) {
  h1 { font-size: 2.1rem; }
  nav { justify-content: flex-start; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100% !important; }
  tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: .9rem; overflow: hidden; }
  td { border: 0; border-bottom: 1px solid var(--line); }
  td:last-child { border-bottom: 0; }
  td::before { content: attr(data-label); display: block; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); font-weight: 600; margin-bottom: .25rem; }
  td.text { min-width: 0; }
  audio { width: 100%; }
}
