/* hkkao.com shared styles. Mobile-first: most readers are on phones. */
:root {
  --green: #1f5e3b;      /* tram green */
  --green-dark: #144029;
  --cream: #fbf7ee;
  --ink: #222;
  --muted: #666;
  --line: #e4ddcc;
  --accent: #e8a33d;
  --max: 720px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.8;
}
a { color: var(--green); }
a:hover { color: var(--green-dark); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 18px; }

/* Header */
.site-header { background: var(--green); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.logo { color: #fff; text-decoration: none; font-weight: 700; font-size: 22px; letter-spacing: 1px; }
.logo small { font-weight: 400; font-size: 13px; opacity: .85; margin-left: 6px; }
.nav a { color: #fff; text-decoration: none; margin-left: 16px; font-size: 15px; }
.nav a:first-child { margin-left: 0; }
.nav a:hover { text-decoration: underline; }

/* Hero */
.hero { padding: 36px 0 20px; }
.hero h1 { font-size: 28px; line-height: 1.4; margin: 0 0 10px; }
.hero p { color: var(--muted); margin: 0; }
.mascot-slot { width: 96px; height: 96px; border-radius: 50%; background: #fff; border: 2px dashed var(--line); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); margin-bottom: 14px; }

.mascot { display: block; width: 96px; height: 96px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); margin-bottom: 14px; object-fit: cover; }
.about-hero { display: block; width: 100%; max-width: 420px; height: auto; border-radius: 12px; margin: 10px 0 20px; }

/* Lists and cards */
.section-title { font-size: 20px; margin: 30px 0 10px; padding-left: 10px; border-left: 4px solid var(--accent); }
.card-list { list-style: none; padding: 0; margin: 0; }
.card-list li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.card-list a { font-weight: 600; text-decoration: none; }
.card-list .meta { display: block; font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); font-size: 15px; }

/* Article */
.article { padding: 26px 0 10px; }
.article h1 { font-size: 26px; line-height: 1.45; margin: 0 0 6px; }
.article .meta { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.article h2 { font-size: 21px; margin-top: 32px; }
.article h3 { font-size: 18px; margin-top: 24px; }
.article img { max-width: 100%; height: auto; }

/* Term table: Simplified / Traditional / English */
.terms { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; background: #fff; }
.terms th, .terms td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.terms th { background: #f1ebdc; }

.note { background: #fff8e6; border-left: 4px solid var(--accent); padding: 10px 14px; margin: 18px 0; font-size: 15px; }
.sources { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 36px; padding-top: 12px; }
.sources ol { padding-left: 20px; }

/* Footer */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); padding: 20px 0 36px; font-size: 13px; color: var(--muted); }
.site-footer a { color: var(--muted); margin-right: 14px; }

@media (min-width: 720px) {
  .hero h1 { font-size: 32px; }
}

/* Language switch */
.nav a.lang { border: 1px solid rgba(255,255,255,.6); border-radius: 12px; padding: 1px 10px; font-size: 13px; }

/* Wide tables scroll sideways on phones */
.table-wrap { overflow-x: auto; margin: 16px 0; }
.table-wrap .terms { margin: 0; min-width: 420px; }

/* Practice questions */
.q { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 16px 0; }
.q .opts { list-style: none; padding-left: 0; margin: 8px 0; }
.q .opts li { padding: 2px 0; }
.q details { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 8px; }
.q summary { cursor: pointer; color: var(--green); font-weight: 600; }
p.note { background: #fff8e6; border-left: 4px solid var(--accent); padding: 10px 14px; margin: 18px 0; font-size: 15px; }
