/* Copied from TOOL/web/src/style.css by TOOL/online/build_online.py. Do not edit here: edit the original and rebuild. */
/* Layout: one reading column on a celadon-grey ground; the chart is the only "object" on the page.
   Stems and branches take the colour of their element (五行), which is the page's one decoration. */
:root {
  --bg: #f2f5f3; --surface: #ffffff; --ink: #17252b; --muted: #56676c; --line: #d3dcd9;
  --accent: #1f4e79; --accent-soft: #e2ebf3; --on-accent: #ffffff;
  --wood: #2a7a4b; --fire: #bd3524; --earth: #8f6217; --metal: #66707c; --water: #1c5ea6;
  --warn-bg: #fff3d1; --warn-ink: #5f4300; --warn-line: #e6c56a;
  --now-bg: #e2ebf3;
  --hanzi: "Noto Serif SC", "Songti SC", "SimSun", "PMingLiU", serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10181b; --surface: #17232a; --ink: #e6eeec; --muted: #9bafb0; --line: #2c3b41;
    --accent: #8ab8e6; --accent-soft: #1b2e3f; --on-accent: #0d1a24;
    --wood: #6fcf97; --fire: #f08a7e; --earth: #e0b162; --metal: #c3c9d1; --water: #80b5f1;
    --warn-bg: #382d0f; --warn-ink: #f3d98a; --warn-line: #7a6220;
    --now-bg: #1b2e3f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10181b; --surface: #17232a; --ink: #e6eeec; --muted: #9bafb0; --line: #2c3b41;
  --accent: #8ab8e6; --accent-soft: #1b2e3f; --on-accent: #0d1a24;
  --wood: #6fcf97; --fire: #f08a7e; --earth: #e0b162; --metal: #c3c9d1; --water: #80b5f1;
  --warn-bg: #382d0f; --warn-ink: #f3d98a; --warn-line: #7a6220;
  --now-bg: #1b2e3f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; }
.wrap { max-width: 860px; margin: 0 auto; padding-block: 28px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 28px; }
header.page h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 6px; font-weight: 600; text-wrap: balance; }
header.page p { margin: 0; color: var(--muted); max-width: 65ch; }
h2 { font-size: 1.15rem; margin: 0 0 10px; font-weight: 600; text-wrap: balance; }
h3 { font-size: 1rem; margin: 0 0 6px; font-weight: 600; }
p { margin: 0 0 10px; max-width: 68ch; }
section { min-width: 0; }
.zh { font-family: var(--hanzi); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.label { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px; }
.scroll { overflow-x: auto; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.e-wood { color: var(--wood); } .e-fire { color: var(--fire); } .e-earth { color: var(--earth); }
.e-metal { color: var(--metal); } .e-water { color: var(--water); }

/* four pillars */
.pillars { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.pillar { padding: 14px 8px 12px; text-align: center; border-left: 1px solid var(--line); min-width: 0; }
.pillar:first-child { border-left: 0; }
.pillar.alt { background: var(--bg); }
.pillar .who { font-size: 0.8125rem; color: var(--muted); min-height: 2.4em; }
.pillar .who b { display: block; color: var(--ink); font-weight: 600; font-size: 0.875rem; }
.pillar .god { font-size: 0.875rem; margin-top: 6px; }
.pillar .char { font-family: var(--hanzi); font-weight: 700; font-size: clamp(2rem, 9vw, 3.1rem); line-height: 1.15; }
.pillar .el { font-size: 0.8125rem; color: var(--muted); }
.pillar .hidden { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 0.875rem;
  display: flex; flex-direction: column; gap: 2px; }
.pillar .hidden span.zh { font-weight: 700; }
.dm { display: inline-block; font-size: 0.75rem; padding: 1px 7px; border-radius: 10px; background: var(--accent); color: var(--on-accent); }

/* tables */
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
td.gz { font-family: var(--hanzi); font-weight: 700; font-size: 1.25rem; white-space: nowrap; }
tr.now td { background: var(--now-bg); }
.pill { display: inline-block; font-size: 0.75rem; padding: 1px 8px; border-radius: 10px; background: var(--accent); color: var(--on-accent); white-space: nowrap; }
tr.annual-row > td { padding-top: 0; border-bottom: 1px solid var(--line); background: transparent; }
.annual-wrap summary { cursor: pointer; font-size: 0.875rem; color: var(--muted); padding: 4px 0; }
.annual-wrap[open] summary { margin-bottom: 4px; }
table.annual { font-size: 0.875rem; }
table.annual th, table.annual td { padding: 4px 8px; }

dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0; font-size: 0.9375rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { dl.facts { grid-template-columns: 1fr; gap: 0; } dl.facts dd { margin-bottom: 8px; } }

.checks { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); border-radius: 6px; padding: 12px 16px; }
.checks ul { margin: 4px 0 0; padding-left: 18px; }
.note { border-left: 3px solid var(--accent); padding: 2px 0 2px 14px; }
.note p:last-child { margin-bottom: 0; }
