/* WePoker Hall Bot — warm dark teahouse skin over Concrete.css */

/* ---- Palette: deep brown/ink bg, paper-cream text, jade accent ---- */
:root {
  --ink: #16110c;
  --bg: #1d1712;
  --surface: #261d15;
  --surface-2: #2f2418;
  --line: #4a3a28;
  --fg: #f1e7d6;       /* paper cream */
  --muted: #c3b39a;
  --jade: #3fae86;
  --jade-soft: #6fcead;
  --jade-dim: #2a6e54;
}
/* Re-assert palette inside dark MQ so Concrete's flip can't win */
@media (prefers-color-scheme: dark) {
  :root { --fg: #f1e7d6; --bg: #1d1712; }
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
:lang(zh) body, .zh body, html[lang="zh"] body {
  font-family: "Noto Sans SC", "DM Sans", "PingFang SC", system-ui, sans-serif;
}

img, svg, table, pre { max-width: 100%; }
img { height: auto; }

a { color: var(--jade); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: .12rem; }

h1, h2, h3 { line-height: 1.22; overflow-wrap: anywhere; color: var(--fg); }
h1 { font-size: 2.6rem; font-weight: 700; letter-spacing: -.01em; margin: 0 0 1.4rem; }
h2 { font-size: 2.05rem; font-weight: 700; margin: 3.2rem 0 1rem; }
h3 { font-size: 1.55rem; font-weight: 600; margin: 2rem 0 .6rem; color: var(--jade); }
p, li { font-size: 1.45rem; color: var(--fg); }
.muted { color: var(--muted); }

main { max-width: 74rem; padding: 0 1.4rem; }

/* ---- Header / nav ---- */
header.site {
  padding: 1.4rem 0;
  font-size: 1em;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink), var(--bg));
}
.bar {
  max-width: 74rem; margin: auto; padding: 0 1.4rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem;
}
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 700; font-size: 1.5rem; color: var(--fg); }
.brand img { width: 30px; height: 30px; }
.brand .cn { color: var(--muted); font-weight: 500; font-size: 1.2rem; }
nav.main { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; align-items: center; font-size: 1.3rem; }
nav.main a { color: var(--muted); }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--jade); text-decoration: none; }
.sep { color: var(--line); }
.spacer { flex: 1 1 auto; }
.cta {
  display: inline-block; background: var(--jade); color: var(--ink);
  border: 1px solid var(--jade); border-radius: 999px;
  padding: .45rem 1.2rem; font-size: 1.25rem; font-weight: 600; margin: 0;
}
.cta:hover { background: var(--jade-dim); color: var(--fg); text-decoration: none; }

/* ---- Hero ---- */
.hero {
  margin: 2.4rem 0 1rem; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; position: relative; background: var(--surface);
}
.hero img { width: 100%; display: block; }
.hero .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: .6rem 1rem; font-size: 1.05rem; color: var(--muted);
  background: linear-gradient(0deg, rgba(22,17,12,.9), transparent);
}

/* ---- Answer-first lede ---- */
.lede {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--jade); border-radius: 8px;
  padding: 1.4rem 1.6rem; margin: 1.8rem 0;
}
.lede p { margin: .4rem 0; }
.lede strong { color: var(--jade); }

/* ---- Sections / panels ---- */
section { padding: 1.6rem 0; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 1.4rem 1.6rem; margin: 1.2rem 0;
}
.grid2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1.2rem; }
@media (max-width: 640px){ .grid2 { grid-template-columns: minmax(0,1fr); } }

/* ---- Tables ---- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; margin: 1.4rem 0; }
table { width: 100%; border-spacing: 0; background: var(--surface); color: var(--fg); font-size: 1.32rem; }
th, td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); color: var(--fg); }
th { background: var(--surface-2); color: var(--jade); border-bottom: 2px solid var(--jade-dim); font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* ---- code / pre (avoid dark-on-dark + bleed) ---- */
pre, code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
code { background: var(--surface-2); color: var(--jade); padding: .12rem .4rem; border-radius: 4px; font-size: .92em; }
pre { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--jade); border-radius: 8px; padding: 1rem 1.3rem; overflow-x: auto; color: var(--fg); }
pre code { background: transparent; color: inherit; padding: 0; }

/* ---- author block ---- */
.author {
  display: flex; gap: 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.1rem 1.3rem; margin: 2.4rem 0;
}
.author img { width: 58px; height: 58px; border-radius: 50%; flex: 0 0 auto; border: 2px solid var(--jade-dim); }
.author .who { font-size: 1.3rem; }
.author .who b { color: var(--fg); }
.author .who span { color: var(--muted); display: block; font-size: 1.15rem; }

/* ---- figures / SVG ---- */
figure { margin: 2rem 0; }
figure svg { width: 100%; height: auto; display: block; background: var(--ink); border: 1px solid var(--line); border-radius: 10px; }
figcaption { color: var(--muted); font-size: 1.15rem; margin-top: .6rem; text-align: center; }

/* ---- footer ---- */
footer.site {
  border-top: 1px solid var(--line); margin-top: 4rem; padding: 2.4rem 0;
  color: var(--muted); font-size: 1.2rem; text-align: left;
}
footer.site .bar { display: block; }
footer.site a { color: var(--muted); }

/* ---- crosslinks ---- */
.next { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2.4rem 0; }
.next a {
  flex: 1 1 240px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 1rem 1.2rem; color: var(--fg);
  display: flex; flex-direction: column;
}
.next a:hover { border-color: var(--jade-dim); text-decoration: none; }
.next a b { color: var(--jade); }
.next a span { color: var(--muted); font-size: 1.15rem; }

.breadcrumb { font-size: 1.15rem; color: var(--muted); margin: 1.6rem 0 0; }
.breadcrumb a { color: var(--muted); }
.tag { display:inline-block; font-size: 1.05rem; color: var(--jade); border: 1px solid var(--jade-dim); border-radius: 999px; padding: .15rem .8rem; margin-bottom: 1rem; }
