/* ReviewDao — style chung */
:root {
  --bg: #fffdf9;
  --surface: #ffffff;
  --ink: #2a1f1d;
  --ink-soft: #5c4d48;
  --muted: #8a7a72;
  --line: #ece3d6;
  --brand: #a93b2c;
  --brand-dark: #842c20;
  --brand-soft: #f8ebe6;
  --accent: #c8952f;
  --accent-soft: #f8eedb;
  --warn-soft: #fdebe8;
  --warn: #9e2a1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 42, 46, .05), 0 6px 20px rgba(31, 42, 46, .06);
  --wrap: 1100px;
  --read: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.3; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: .2em 0 .4em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin: 2em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 .4em; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: .45em; }
strong { color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.read { max-width: var(--read); margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 10; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 12px 20px; min-height: 68px; flex-wrap: wrap;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none;
}
.logo img { width: 36px; height: 36px; }
.logo span b { color: var(--brand); }
.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; justify-content: center; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 600;
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }
.head-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center;
  color: var(--ink-soft); border: 1px solid var(--line);
}
.icon-btn:hover, .icon-btn[aria-current="page"] { color: var(--brand-dark); background: var(--brand-soft); border-color: transparent; }
.cta {
  background: var(--accent); color: #2b1a03; font-weight: 700; font-size: .95rem; text-decoration: none;
  padding: 9px 16px; border-radius: 999px; white-space: nowrap;
}
.cta:hover { background: #b8842a; color: #2b1a03; }
.menu-btn {
  display: none; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 1.15rem; cursor: pointer; color: var(--ink);
}

/* Dải cam kết trên cùng */
.topbar { background: #2e2622; color: #e9ddd3; font-size: .85rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #fff; font-weight: 600; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }

@media (max-width: 960px) {
  .menu-btn { display: grid; place-items: center; }
  .head-actions { margin-left: auto; }
  .nav {
    display: none; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch;
    padding: 4px 0 12px; border-top: 1px solid var(--line);
  }
  .menu-open .nav { display: flex; }
  .nav a { padding: 11px 12px; border-radius: 10px; }
}
@media (max-width: 480px) {
  .hide-sm { display: none; }
  .logo { gap: 8px; }
  .logo img { width: 32px; height: 32px; }
  .logo span { font-size: 1.05rem; }
  .head-actions { gap: 6px; }
  .cta { padding: 8px 11px; font-size: .85rem; }
  .icon-btn, .menu-btn { width: 36px; height: 36px; }
  .site-header .wrap { gap: 8px; min-height: 60px; }
}

/* Trang chủ đề, tìm kiếm */
.hero-sm { padding: 8px 0 8px; }
.hero-sm .breadcrumb { padding-top: 20px; }
.search-box input {
  font: inherit; font-size: 1.05rem; width: 100%; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.search-box input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.search-count { color: var(--muted); font-size: .92rem; margin: 12px 0; }
.search-results { list-style: none; padding: 0; }
.search-results li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px; }
.search-results a { display: block; font-weight: 700; font-size: 1.08rem; color: var(--ink); text-decoration: none; margin: 2px 0 4px; }
.search-results a:hover { color: var(--brand); }
.search-results p { margin: 0; color: var(--ink-soft); font-size: .94rem; }

/* Hero */
.hero { padding: 56px 0 36px; }
.hero .eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 600; color: var(--brand-dark);
  background: var(--brand-soft); padding: 4px 12px; border-radius: 999px;
}
.hero h1 { max-width: 760px; }
.hero p.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 680px; }
.hero-points {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px; margin-top: 28px; padding: 0; list-style: none;
}
.hero-points li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; font-size: .95rem; color: var(--ink-soft); margin: 0;
}
.hero-points li strong { display: block; color: var(--ink); }

/* Section */
.section { padding: 28px 0 48px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0 0 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.chips button {
  font: inherit; font-size: .9rem; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  padding: 6px 14px; border-radius: 999px;
}
.chips button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
  transition: transform .15s ease;
}
.card:hover { transform: translateY(-2px); }
.card-top { padding: 22px 20px 6px; display: flex; align-items: center; gap: 10px; }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.35rem; background: var(--brand-soft); flex-shrink: 0;
}
.tag {
  font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--brand-dark);
}
.card h3 { margin: 6px 20px 8px; font-size: 1.12rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card[hidden] { display: none; }
.card p { margin: 0 20px 18px; color: var(--ink-soft); font-size: .95rem; flex: 1; }
.card .meta { margin: 0 20px 18px; font-size: .85rem; color: var(--muted); }

/* Callout / CTA */
.band {
  background: var(--brand); color: #fff; border-radius: var(--radius);
  padding: 28px 24px; display: grid; gap: 8px;
}
.band h2 { color: #fff; margin: 0; }
.band p { margin: 0; color: #f8dedb; }
.band a { color: #fff; font-weight: 600; }

/* Article */
.breadcrumb { font-size: .9rem; color: var(--muted); padding-top: 28px; }
.breadcrumb a { color: var(--muted); }
.article-head { padding-bottom: 8px; }
.article-meta { color: var(--muted); font-size: .92rem; display: flex; gap: 14px; flex-wrap: wrap; }
.article-lead { font-size: 1.15rem; color: var(--ink-soft); margin-top: 16px; }

.box {
  border-radius: var(--radius); padding: 18px 20px; margin: 24px 0;
  background: #f7f1e6; border: 1px solid #e8dcc5;
}
.box > :last-child { margin-bottom: 0; }
.box-title { font-weight: 700; margin-bottom: 6px; display: block; }
.box.tip { background: var(--accent-soft); border-color: #e9d3a3; }
.box.warn { background: var(--warn-soft); border-color: #f0c4bd; }
.box.warn .box-title { color: var(--warn); }

.toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; margin: 24px 0; font-size: .95rem;
}
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; }
.toc li { margin-bottom: .2em; }

.checklist { list-style: none; padding-left: 0; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 6px; background: var(--brand); color: #fff;
  font-size: .75rem; display: grid; place-items: center; font-weight: 700;
}

.table-wrap { overflow-x: auto; margin: 20px 0 24px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--surface); }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: #f7f1e6; }

.related { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 8px; }
.related ul { list-style: none; padding: 0; }
.related li { margin-bottom: .6em; }

.score {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 20px 0;
}
.score div {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
}
.score b { display: block; font-size: 1.6rem; color: var(--brand); line-height: 1.2; }
.score span { font-weight: 600; }
.score p { margin: 6px 0 0; font-size: .93rem; color: var(--ink-soft); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line); background: var(--surface);
  margin-top: 56px; padding: 32px 0; font-size: .92rem; color: var(--ink-soft);
}
.site-footer .wrap { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer strong { color: var(--ink); }
.site-footer ul { list-style: none; padding: 0; margin: 6px 0 0; }
.site-footer li { margin-bottom: .3em; }
.site-footer .copy { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; margin: 0; }

/* 404 */
.notfound { text-align: center; padding: 80px 0 40px; }
.notfound .big { font-size: 5rem; font-weight: 800; color: var(--brand); line-height: 1; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding: 36px 0 24px; }
  .site-header { position: static; }
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; }
}

/* Form */
.form { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 24px 0; }
.form label { font-weight: 600; margin-top: 10px; font-size: .95rem; }
.form .opt { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea {
  font: inherit; font-size: 16px; width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.form button {
  font: inherit; font-weight: 700; margin-top: 14px; padding: 12px 18px; border: 0; border-radius: 999px;
  background: var(--brand); color: #fff; cursor: pointer; justify-self: start;
}
.form button:disabled { opacity: .6; cursor: wait; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-status { margin: 6px 0 0; font-size: .95rem; min-height: 1.4em; }
.form-status.ok { color: var(--brand-dark); font-weight: 600; }
.form-status.err { color: var(--warn); font-weight: 600; }

/* Ảnh thật: trang chủ, thẻ bài, đầu bài */
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px 40px; align-items: center; }
.hero-grid .hero-points { grid-column: 1 / -1; margin-top: 8px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn, .btn-ghost {
  display: inline-block; font-weight: 700; text-decoration: none; padding: 11px 20px; border-radius: 999px; font-size: .97rem;
}
.btn { background: var(--brand); color: #fff; }
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.hero-photo { margin: 0; position: relative; }
.hero-photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 22px; box-shadow: 0 18px 40px rgba(42, 31, 29, .16);
}
.hero-photo figcaption {
  position: absolute; left: 16px; bottom: 16px; background: rgba(255, 253, 249, .94); color: var(--ink);
  font-size: .88rem; font-weight: 600; padding: 7px 14px; border-radius: 999px;
}
.card-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.card .card-img + .card-top { padding-top: 16px; }
.article-img { margin: 22px 0 6px; }
.article-img img { display: block; width: 100%; height: auto; border-radius: 16px; }
.article-img figcaption { font-size: .82rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .hero-photo img { aspect-ratio: 16 / 10; border-radius: 16px; }
}
.card-img + .card-top .card-icon { display: none; }
