:root {
  /* Bước Nhỏ / theme A (project-journal/design/theme-a.tokens.json): moss–cream base, rust + warm-yellow micro accents. */
  --bg: #F7F4ED; --surface: #FFFFFF; --text: #203C35; --muted: #55625d; --line: #E2DED3;
  --accent: #1F5E4A; --accent-soft: #E8EEE7; --warn: #8a4b00; --warn-soft: #fff3e0; --danger: #a12622; --demo: #6b4fa0; --demo-soft: #efe9f8;
  --rust: #C25A38;   /* decorative dots/marks only */
  --sun: #D6A64B;    /* decorative only — never text, CTA or status */
  --font-body: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Calistoga', Georgia, 'Times New Roman', serif;
  --radius: 16px; font-family: var(--font-body);
}
/* Bước Nhỏ guideline v1 defines a single light moss–cream theme (no dark variant): keep UA widgets light too. */
:root { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.65; font-size: 16px; font-family: var(--font-body); }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; line-height: 1.25; letter-spacing: 0.005em; }
.article { max-width: 720px; }
.article p, .article li { font-size: 18px; line-height: 1.65; }
.article h2 { font-size: clamp(30px, 5.5vw, 46px); margin: 0 0 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Micro accents (brand rule: 1–2 small details per block; yellow never carries meaning). */
#brand::after { content: ''; display: inline-block; width: 0.32em; height: 0.32em; margin-left: 0.12em; border-radius: 50%; background: var(--rust); vertical-align: baseline; }
footer .brand-dots::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--sun); margin-right: 6px; box-shadow: 10px 0 0 var(--rust); margin-right: 16px; vertical-align: middle; }
.day.done { position: relative; }
.day.done::after { content: ''; position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--sun); }
@media (prefers-reduced-motion: no-preference) { button, a, .day { transition: background-color 150ms, color 150ms; } }
button, input, select, textarea { min-height: 44px; font-family: var(--font-body); }
a { color: var(--accent); }
header.top { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
header.top h1 { font-size: 1.1rem; margin: 0; }
header.top nav { display: flex; gap: 12px; flex-wrap: wrap; }
main { max-width: 1120px; margin: 0 auto; padding: 16px 20px; }
body.admin main { max-width: 1440px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
@media (max-width: 720px) { .filters { grid-template-columns: 1fr 1fr; } .filters input[type=search] { grid-column: 1 / -1; } }
input, select, textarea, button { font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); width: 100%; }
button { background: var(--accent); color: #FFFFFF; border: none; cursor: pointer; width: auto; font-weight: 600; border-radius: 12px; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button:disabled { opacity: .5; cursor: not-allowed; }
.badge { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin: 2px 4px 2px 0; overflow-wrap: anywhere; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.demo { background: var(--demo-soft); color: var(--demo); }
.badge.muted { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.muted { color: var(--muted); font-size: .9rem; }
.notice { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: 8px; margin: 8px 0; font-size: .92rem; }
.item-row { display: block; text-decoration: none; color: inherit; }
.item-row h3 { margin: 0 0 4px; font-size: 1rem; }
.zh { color: var(--muted); font-size: .9rem; }
.article p, .article li { max-width: 70ch; }
details summary { cursor: pointer; color: var(--muted); }
pre.original { white-space: pre-wrap; word-break: break-word; font-size: .85rem; background: var(--bg); padding: 12px; border-radius: 8px; overflow-x: auto; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin: 12px 0; }
.day { text-align: center; padding: 6px 0; border-radius: 6px; border: 1px solid var(--line); font-size: .85rem; }
.day.done { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.day.today { outline: 2px solid var(--warn); }
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 12px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.stat { font-size: 1.6rem; font-weight: 700; }
.stat.null { color: var(--muted); font-size: 1rem; font-weight: 500; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap { overflow-x: auto; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 10px; overflow-x: auto; }
.kanban .col { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-height: 80px; }
.kanban .task { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; font-size: .88rem; cursor: pointer; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 160px; }
footer { text-align: center; padding: 24px 16px; color: var(--muted); font-size: .85rem; }
.hidden { display: none !important; }
.inline-check { width: auto; margin-right: 6px; }
.doc-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* Legacy-domain banner (old host during the parallel run). Link styled as a primary button, 44px target. */
.legacy-banner { max-width: 1080px; margin: 12px auto; border-left: 4px solid var(--accent); overflow-wrap: anywhere; }
@media (max-width: 1120px) { .legacy-banner { margin: 12px 20px; } }
a.button { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; background: var(--accent); color: #FFFFFF;
  border-radius: 12px; font-weight: 600; text-decoration: none; }
a.button:hover { filter: brightness(1.08); }
