  :root {
    --paper: #F3F5F7;
    --ink: #14213D;
    --muted: #5B6577;
    --line: #D7DCE3;
    --marker: #FFE14D;
    --done: #1F8A5B;
    --white: #FFFFFF;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: "Be Vietnam Pro", system-ui, sans-serif;
    background: var(--paper);
    color: var(--ink);
    font-size: 17px;
    line-height: 1.6;
  }
  a { color: inherit; }
  :focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
  .wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

  /* Header */
  header { position: sticky; top: 0; z-index: 50; padding: 14px 0; background: var(--paper); border-bottom: 2px solid var(--ink); }
  header .wrap { display: flex; justify-content: space-between; align-items: center; }
  .logo { font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -0.02em; }
  .btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
  }
  .btn-main { background: var(--ink); color: var(--white); }
  .btn-main:hover { background: #22325A; }
  .btn-line { background: transparent; color: var(--ink); }
  .btn-line:hover { background: var(--white); }
  header .btn { padding: 8px 18px; font-size: 15px; }

  /* Hero */
  .hero { padding-top: 56px; padding-bottom: 88px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
  h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.08; letter-spacing: -0.035em; font-weight: 800; }
  .lead { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 34em; }
  .actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

  /* Danh sách việc: điểm nhấn duy nhất của trang */
  .chores {
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 6px;
    padding: 28px 28px 20px;
    box-shadow: 8px 8px 0 var(--ink);
  }
  .chores h2 { font-size: 15px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
  .chores ul { list-style: none; }
  .chores li {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 12px 0; border-top: 1px solid var(--line);
  }
  .chores li:first-child { border-top: 0; }
  .task {
    background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 55% / 0 2px;
    transition: background-size .5s ease;
  }
  .time { color: var(--muted); white-space: nowrap; font-size: 15px; }
  .chores li.done .task { background-size: 100% 2px; }
  .chores li.done .task { color: var(--muted); }
  .chores li.done .time { color: var(--done); font-weight: 700; }
  .chores p { margin-top: 12px; font-size: 15px; color: var(--muted); }

  /* Sections */
  section { padding: 72px 0; border-top: 2px solid var(--ink); }
  h2.title { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -0.025em; font-weight: 800; max-width: 18em; }
  .intro { margin-top: 12px; color: var(--muted); max-width: 40em; }

  .services { margin-top: 40px; display: grid; gap: 0; }
  .service { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; padding: 28px 0; border-top: 1px solid var(--line); }
  .service h3 { font-size: 22px; letter-spacing: -0.01em; }
  .service .eg { color: var(--muted); }
  .service .eg mark { background: var(--marker); color: var(--ink); padding: 0 4px; }

  .steps { margin-top: 40px; list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .steps li { counter-increment: s; }
  .steps li::before {
    content: counter(s); display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--marker); font-weight: 800; margin-bottom: 14px;
  }
  .steps h3 { font-size: 18px; margin-bottom: 6px; }
  .steps p { color: var(--muted); font-size: 16px; }

  .tiktok { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }

  /* Liên hệ */
  .contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; }
  .direct { margin-top: 28px; list-style: none; }
  .direct li { padding: 12px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; }
  .direct span { color: var(--muted); }
  .direct a { font-weight: 700; text-decoration: none; }
  .direct a:hover { text-decoration: underline; }
  form { display: grid; gap: 14px; }
  label { font-weight: 700; font-size: 15px; display: grid; gap: 6px; }
  input, textarea, select {
    font: inherit; font-weight: 400; color: var(--ink);
    padding: 12px 14px; border: 2px solid var(--line); border-radius: 6px; background: var(--white);
  }
  input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); }
  .msg { padding: 16px; border-radius: 6px; border: 2px solid var(--ink); }
  .msg.ok { background: #E3F4EC; }
  .msg.err { background: #FDECEC; }
  [hidden] { display: none !important; }

  footer { padding: 32px 0 48px; border-top: 2px solid var(--ink); color: var(--muted); font-size: 15px; }
  footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

  @media (max-width: 860px) {
    .hero, .contact { grid-template-columns: 1fr; gap: 40px; }
    .hero { padding-top: 32px; }
    .service { grid-template-columns: 1fr; gap: 8px; }
    .steps { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 520px) {
    .steps { grid-template-columns: 1fr; }
    .chores { box-shadow: 5px 5px 0 var(--ink); padding: 20px; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .task { transition: none; }
  }

/* Nav */
header nav { display: flex; align-items: center; gap: 20px; }
header nav > a:not(.btn) { font-weight: 700; text-decoration: none; }
header nav > a:not(.btn):hover { text-decoration: underline; }

/* Blog: danh sách */
.page-head { padding: 40px 0 32px; }
.posts { list-style: none; border-top: 2px solid var(--ink); }
.posts li { border-bottom: 1px solid var(--line); }
.posts a { display: block; padding: 28px 0; text-decoration: none; }
.posts h2 { font-size: 24px; letter-spacing: -0.015em; line-height: 1.25; }
.posts a:hover h2 { text-decoration: underline; }
.posts p { margin-top: 6px; color: var(--muted); max-width: 40em; }
.posts time, .post-meta { font-size: 15px; color: var(--muted); }

/* Blog: bài viết */
article { max-width: 680px; padding: 40px 0 72px; }
article h1 { font-size: clamp(32px, 4.6vw, 48px); }
.post-meta { margin: 16px 0 40px; }
article h2 { font-size: 26px; letter-spacing: -0.015em; line-height: 1.25; margin: 44px 0 12px; }
article p, article li { margin-bottom: 16px; }
article ul, article ol { padding-left: 24px; }
article strong { background: linear-gradient(transparent 60%, var(--marker) 60%); }
.post-cta { margin-top: 48px; padding: 28px; background: var(--white); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 6px 6px 0 var(--ink); }
.post-cta h2 { margin-top: 0; }
.back { display: inline-block; margin-bottom: 20px; font-weight: 700; }
article h3 { font-size: 20px; line-height: 1.3; margin: 28px 0 8px; }

/* Blog: lọc + lưới bài */
.blog-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 28px; }
.cats { display: flex; gap: 8px; flex-wrap: wrap; }
.cat {
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 2px solid var(--ink);
  background: transparent; color: var(--ink);
}
.cat:hover { background: var(--white); }
.cat[aria-pressed="true"] { background: var(--ink); color: var(--white); }
#q { width: 260px; max-width: 100%; border-radius: 999px; padding: 9px 18px; }

.posts-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 72px; }
.posts-grid a {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  padding: 24px; text-decoration: none;
  background: var(--white); border: 2px solid var(--ink); border-radius: 6px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.posts-grid a:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.posts-grid h2 { font-size: 21px; line-height: 1.3; letter-spacing: -0.015em; }
.posts-grid p { color: var(--muted); font-size: 16px; flex: 1; }
.posts-grid time { font-size: 14px; color: var(--muted); }
.tag { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--marker); }

/* Bài mới nhất: chiếm cả hàng */
.posts-grid li:first-child { grid-column: 1 / -1; }
.posts-grid li:first-child a { padding: 40px; box-shadow: 8px 8px 0 var(--ink); }
.posts-grid li:first-child h2 { font-size: clamp(26px, 3.4vw, 36px); max-width: 22em; }
.posts-grid li:first-child p { font-size: 18px; max-width: 40em; flex: none; }
.empty { padding-bottom: 72px; color: var(--muted); }

@media (max-width: 860px) { .posts-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .posts-grid { grid-template-columns: 1fr; }
  .posts-grid li:first-child a { padding: 24px; }
  #q { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .posts-grid a { transition: none; } .posts-grid a:hover { transform: none; } }

/* Bài viết: thành phần phụ */
.toc { margin: 0 0 40px; padding: 20px 24px; border-left: 4px solid var(--marker); background: var(--white); }
.toc p { font-weight: 700; margin-bottom: 8px; }
.toc ol { margin: 0; }
.toc li { margin-bottom: 4px; }
.note { margin: 24px 0; padding: 18px 22px; border: 2px solid var(--ink); border-radius: 6px; background: var(--white); }
.note > :last-child { margin-bottom: 0; }
.template { margin: 20px 0 28px; padding: 20px 22px; background: var(--ink); color: var(--white); border-radius: 6px; white-space: pre-line; font-size: 16px; }
.template-label { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: -12px; }
.table-wrap { overflow-x: auto; margin: 20px 0 28px; }
article table { width: 100%; border-collapse: collapse; font-size: 16px; background: var(--white); }
article th, article td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
article th { background: var(--ink); color: var(--white); }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { padding-left: 32px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 4px; }
.faq h3 { margin-top: 24px; }
.template { position: relative; padding-top: 48px; }
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  padding: 4px 14px; border-radius: 999px; border: 0;
  background: var(--marker); color: var(--ink); white-space: normal;
}
.copy-btn:focus-visible { outline: 3px solid var(--marker); outline-offset: 2px; }

/* Công cụ tính thời gian */
.calc { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; padding-bottom: 56px; }
.calc-input { display: grid; gap: 16px; }
.calc-table { width: 100%; border-collapse: collapse; }
.calc-table th { text-align: left; font-size: 14px; color: var(--muted); padding: 0 8px 8px 0; }
.calc-table td { padding: 0 8px 10px 0; }
.calc-table input { width: 100%; }
.calc-table td:nth-child(2) { width: 130px; }
.calc-table td:last-child { width: 40px; padding-right: 0; }
.row-del { width: 40px; height: 44px; font-size: 22px; cursor: pointer; border: 2px solid var(--line); border-radius: 6px; background: var(--white); color: var(--muted); }
.row-del:hover { border-color: var(--ink); color: var(--ink); }
#add { justify-self: start; }
.calc-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.calc-result { position: sticky; top: 24px; padding: 32px; background: var(--white); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 8px 8px 0 var(--ink); }
.calc-label { font-weight: 700; color: var(--muted); }
.calc-big { font-size: clamp(40px, 5.4vw, 60px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; margin: 4px 0; }
.calc-big span { background: linear-gradient(transparent 62%, var(--marker) 62%); }
.calc-note, .calc-hint { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.calc-hint { margin: 12px 0 0; color: var(--done); font-weight: 700; }
.calc-after { padding: 56px 0 72px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 860px) {
  .calc { grid-template-columns: 1fr; }
  .calc-result { position: static; }
}
@media (max-width: 520px) {
  .calc-settings { grid-template-columns: 1fr; }
  .calc-table td:nth-child(2) { width: 90px; }

}
.calc-big small { font-size: 20px; letter-spacing: 0; margin-left: 6px; color: var(--muted); }
.calc-block { padding-bottom: 20px; }
.calc-save { padding-top: 20px; border-top: 2px dashed var(--line); }
.calc-save .calc-big span { background: linear-gradient(transparent 62%, #BFE8D3 62%); }
.calc-sub { color: var(--muted); }
.calc-sub strong { color: var(--ink); }
.calc-how { margin: 4px 0 16px; font-size: 15px; }
.calc-how summary { cursor: pointer; font-weight: 700; }
.calc-how p { margin-top: 8px; color: var(--muted); }
.calc-settings label { min-width: 0; }
.calc-settings input, .calc-settings select { width: 100%; }
.calc-wide { grid-column: 1 / -1; }

/* Hội thoại mẫu trong bài */
.chat { margin: 20px 0 28px; padding: 20px; background: var(--white); border: 2px solid var(--line); border-radius: 6px; display: grid; gap: 10px; }
.chat-title { font-size: 14px; font-weight: 700; color: var(--muted); margin: 0 !important; }
.msg-k, .msg-b { max-width: 85%; padding: 10px 14px; border-radius: 14px; margin: 0 !important; font-size: 16px; }
.msg-k { justify-self: end; background: var(--ink); color: var(--white); border-bottom-right-radius: 4px; }
.msg-b { justify-self: start; background: var(--paper); border-bottom-left-radius: 4px; }
.chat.bad { border-color: #E5A3A3; }
.chat.good { border-color: #9FD3B8; }
.verdict { margin: 24px 0 32px; padding: 24px; background: var(--ink); color: var(--white); border-radius: 6px; }
.verdict h2 { margin-top: 0 !important; color: var(--white); }
.verdict a { color: var(--marker); }
.verdict strong { background: none; color: var(--marker); }

/* Header: chữ menu không xuống dòng */
header nav > a { white-space: nowrap; }
html { scroll-padding-top: 90px; }


/* Điện thoại */
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  header { padding: 10px 0; }
  header nav { gap: 12px; font-size: 14px; }
  header nav .btn { padding: 6px 12px; font-size: 14px; }
  .hero { padding-top: 28px; padding-bottom: 56px; gap: 32px; }
  section { padding: 52px 0; }
  .lead { font-size: 17px; }
  .actions .btn { flex: 1 1 100%; text-align: center; }
  .chores { box-shadow: 5px 5px 0 var(--ink); padding: 18px; }
  .chores li { flex-direction: column; gap: 2px; }
  .service { padding: 22px 0; }
  .contact { gap: 32px; }
  .direct li { flex-direction: column; gap: 2px; }
  footer .wrap { flex-direction: column; }

  /* Công cụ tính */
  .calc > * { min-width: 0; }
  .calc-table { table-layout: fixed; }
  .calc-table th:nth-child(2), .calc-table td:nth-child(2) { width: 72px; }
  .calc-table th:last-child, .calc-table td:last-child { width: 40px; }
  .calc-table input { padding: 10px; min-width: 0; }
  .calc-settings { grid-template-columns: 1fr; }
  .calc-result { padding: 22px; box-shadow: 5px 5px 0 var(--ink); }
  .calc-big { font-size: 40px; }
  .calc-big small { display: block; margin: 0; font-size: 16px; }

  /* Bài viết */
  article { padding-top: 28px; }
  .post-cta { padding: 20px; box-shadow: 4px 4px 0 var(--ink); }
  .template { font-size: 15px; padding-left: 16px; padding-right: 16px; }
  article th, article td { padding: 8px; font-size: 15px; }
}
@media (max-width: 360px) { header nav > a:first-child { display: none; } }

/* Bài viết: breadcrumb, chia sẻ, tác giả, bài liên quan */
.crumbs { font-size: 15px; font-weight: 700; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--ink); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 48px 0 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.share span { font-weight: 700; margin-right: 6px; }
.share .btn { padding: 8px 16px; font-size: 15px; }
.author { padding: 18px 20px; background: var(--white); border-left: 4px solid var(--ink); font-size: 16px; }
.author p { margin: 0; }
.related { margin-top: 56px; }
.related h2 { margin-top: 0; }
.related ul { list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.related li { margin: 0; }
.related a { display: grid; gap: 6px; padding: 16px 18px; text-decoration: none; background: var(--white); border: 2px solid var(--ink); border-radius: 6px; }
.related a:hover { box-shadow: 4px 4px 0 var(--ink); }
.related .tag { justify-self: start; }
article code { font-size: 0.9em; padding: 1px 6px; background: var(--white); border: 1px solid var(--line); border-radius: 4px; }
/* Chỉ tô vàng câu chốt trong đoạn văn; tên nút, mục trong danh sách/bảng để đậm thường cho đỡ rối */
article li strong, article td strong, article .note strong { background: none; }
