/* Long-form text and data tables: the explanatory sections under each tool and the
   generated 万年历 pages (tools/gen-pages.js). Loaded next to either page stylesheet,
   so colors fall back across both token sets (--text/--muted and --ink/--ink-3). */

.content {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px 16px;
  color: var(--text, var(--ink));
}
.content.wide { max-width: 72rem; }

.content > section {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.content h2 { margin: 0 0 10px; font-size: 18px; font-weight: 600; line-height: 1.4; }
.content h3 { margin: 18px 0 6px; font-size: 15px; font-weight: 600; line-height: 1.5; }
.content p, .content li { margin: 0 0 10px; font-size: 15px; line-height: 1.75; }
.content ul { margin: 0 0 10px; padding-left: 1.4em; }
.content ol { margin: 0 0 10px; padding-left: 1.6em; }
.content section > :last-child { margin-bottom: 0; }
.content a { color: var(--accent); text-underline-offset: 3px; }
.content .note { color: var(--muted, var(--ink-3)); font-size: 13px; }

/* ---------- link lists ---------- */

.content .link-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.content .link-row li { margin: 0; }
.content .link-row a {
  display: block; padding: 4px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: inherit;
  font-size: 14px; text-decoration: none; white-space: nowrap;
}
.content .link-row a:hover { border-color: var(--accent); color: var(--accent); }

.year-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 15px; }

.content .year-grid {
  display: grid; gap: 8px; margin: 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.content .year-grid li { margin: 0; }
.content .year-grid a {
  display: block; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  color: inherit; text-decoration: none; line-height: 1.4;
}
.year-grid a:hover { border-color: var(--accent); }
.year-grid b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.year-grid span { font-size: 12px; color: var(--muted, var(--ink-3)); }

/* ---------- data tables ---------- */

.table-wrap { overflow-x: auto; }

.data {
  width: 100%; border-collapse: collapse;
  font-size: 14px; font-variant-numeric: tabular-nums;
}
.data th, .data td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.data th { color: var(--muted, var(--ink-3)); font-size: 13px; font-weight: 400; }
.data tr:last-child td { border-bottom: 0; }
.data .we td:nth-child(2) { color: var(--accent); }
.data .first td:nth-child(3) { font-weight: 600; }
.data .mark { color: var(--accent); }
/* Tables of prose (explanations): text wraps, only the short label columns stay on one line. */
.data.wrap { margin-bottom: 10px; }
.data.wrap td { white-space: normal; line-height: 1.6; vertical-align: top; }
.data.wrap td.nw { white-space: nowrap; }

.months { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); margin-top: 16px; }
.months > section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
