/* Cẩm nang (/cam-nang): bài viết dài về tiền bạc cho người mới đi làm. Màu và chữ theo home.css. */
:root {
  --page: #FFF4F8;
  --surface: #FFFFFF;
  --blush: #FFDCE9;
  --peach: #FFF0E2;
  --pink: #F7A3C5;
  --raspberry: #C2427C;
  --ink: #3E1A2E;
  --ink-soft: #5E2E48;
  --mist: #8A6A7B;
  --line: #F6D9E5;
  --gold: #F2B53C;
  --plum: #2A0E2E;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.75;
}
a { color: var(--raspberry); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; }

h1, h2, h3 { font-family: 'Bricolage Grotesque', 'Be Vietnam Pro', sans-serif; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }

/* Thanh trên cùng */
.top { max-width: 1080px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 22px; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 4px 12px rgba(194, 66, 124, 0.22); }
.top nav { display: flex; gap: 20px; font-size: 15px; font-weight: 600; }
.top nav a { color: var(--ink); text-decoration: none; opacity: 0.78; }
.top nav a:hover, .top nav a[aria-current] { opacity: 1; }
.top nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* Đầu bài */
.hero { max-width: 1080px; margin: 0 auto; padding: 28px 20px 8px; display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 32px; align-items: end; }
.crumbs { font-size: 14px; color: var(--mist); margin: 0 0 14px; }
.crumbs a { color: var(--mist); }
.hero h1 { margin: 0; font-size: clamp(34px, 5.4vw, 60px); line-height: 1.05; max-width: 18ch; }
.deck { margin: 18px 0 0; max-width: 56ch; font-size: 20px; line-height: 1.6; color: var(--ink-soft); }
.meta { margin: 18px 0 0; font-size: 14px; color: var(--mist); }
.hero figure { margin: 0; justify-self: end; }
.hero figure img { width: 220px; height: auto; }

/* Thân bài: cột chữ hẹp, dễ đọc */
.article { max-width: 1080px; margin: 0 auto; padding: 8px 20px 0; }
.prose { max-width: 66ch; }
.prose > * + * { margin-top: 1.05em; }
.prose p, .prose li { color: var(--ink-soft); }
.prose strong { color: var(--ink); }
.prose h2 { margin: 2.2em 0 0; font-size: clamp(25px, 3.4vw, 32px); line-height: 1.18; }
.prose h2 + * { margin-top: 0.6em; }
.prose h3 { margin: 1.6em 0 0; font-size: 21px; line-height: 1.3; }
.prose h3 + * { margin-top: 0.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--raspberry); font-weight: 700; }
.lede { font-size: 20px; color: var(--ink) !important; }

/* Phép tính: in như một tờ hoá đơn, mỗi dòng một con số */
.slip { margin: 1.6em 0; max-width: 460px; background: var(--surface); border-radius: 18px 18px 6px 6px; padding: 20px 22px 18px; font-size: 16px; line-height: 1.5; box-shadow: 0 14px 34px rgba(194, 66, 124, 0.1); font-variant-numeric: tabular-nums; position: relative; }
.slip::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px; background: radial-gradient(circle at 10px -2px, transparent 8px, var(--surface) 8.5px) 0 0 / 20px 10px repeat-x; }
.slip h3 { margin: 0 0 10px; font-size: 16px; font-family: 'Be Vietnam Pro', sans-serif; letter-spacing: 0; color: var(--mist); font-weight: 600; }
.slip dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; }
.slip dt { color: var(--ink-soft); }
.slip dd { margin: 0; text-align: right; color: var(--ink); font-weight: 600; }
.slip .sum { border-top: 2px dashed var(--line); padding-top: 10px; margin-top: 4px; font-weight: 800; color: var(--ink); }
.slip .sum + dd { border-top: 2px dashed var(--line); padding-top: 10px; margin-top: 4px; font-weight: 800; color: var(--raspberry); font-size: 19px; }
.slip p { margin: 12px 0 0; font-size: 14px; color: var(--mist); }

/* Bảng số */
.table-wrap { margin: 1.6em 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; background: var(--surface); border-radius: 16px; overflow: hidden; }
caption { caption-side: bottom; text-align: left; padding-top: 8px; font-size: 14px; color: var(--mist); }
th, td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
thead th { background: var(--blush); color: var(--ink); font-weight: 700; font-size: 15px; }
tbody tr:last-child td { border-bottom: 0; }
td { color: var(--ink-soft); }
td:first-child { color: var(--ink); font-weight: 600; }

/* Ghi chú bên lề */
.aside { margin: 1.6em 0; padding: 16px 20px; border-left: 4px solid var(--gold); background: var(--peach); border-radius: 0 14px 14px 0; font-size: 16px; }
.aside p { margin: 0; color: var(--ink-soft); }

/* Cuối bài: Bunny làm phần này thế nào */
.bunny-note { margin: 3em 0 0; max-width: 66ch; display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start; padding: 22px 24px; border-radius: 26px; background: linear-gradient(150deg, #FFE6F0, #FFF3E6); }
.bunny-note img { width: 96px; height: auto; }
.bunny-note h2 { margin: 0; font-size: 22px; line-height: 1.25; }
.bunny-note p { margin: 8px 0 0; font-size: 16px; line-height: 1.65; color: var(--ink-soft); }
.bunny-note a { font-weight: 700; }

/* Đọc tiếp */
.more { max-width: 66ch; margin: 3em 0 0; padding-top: 1.4em; border-top: 1px solid var(--line); }
.more h2 { margin: 0 0 0.4em; font-size: 22px; }
.more ul { list-style: none; margin: 0; padding: 0; }
.more li { margin: 0; }
.more a { display: block; padding: 10px 0; font-weight: 600; font-size: 17px; text-decoration: none; color: var(--ink); }
.more a span { display: block; font-weight: 400; font-size: 15px; color: var(--mist); }
.more a:hover { color: var(--raspberry); }

/* Trang mục lục /cam-nang */
.index-hero { max-width: 1080px; margin: 0 auto; padding: 36px 20px 10px; }
.index-hero h1 { margin: 0; font-size: clamp(40px, 7vw, 76px); line-height: 1; }
.index-hero p { margin: 18px 0 0; max-width: 52ch; font-size: 20px; line-height: 1.6; color: var(--ink-soft); }
.shelf { max-width: 1080px; margin: 0 auto; padding: 20px 20px 0; list-style: none; }
.shelf li { border-top: 1px solid var(--line); }
.shelf li:last-child { border-bottom: 1px solid var(--line); }
.shelf a { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 22px 0; text-decoration: none; color: var(--ink); }
.shelf img { width: 112px; height: 112px; object-fit: contain; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.shelf h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; }
.shelf p { margin: 6px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-soft); max-width: 60ch; }
.shelf .time { font-size: 14px; color: var(--mist); white-space: nowrap; }
.shelf a:hover h2 { color: var(--raspberry); }
@media (hover: hover) { .shelf a:hover img { transform: rotate(-4deg) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .shelf img { transition: none; } }

/* Chân trang (giống trang chủ) */
.foot { margin-top: 72px; background: var(--plum); color: rgba(255, 238, 248, 0.72); font-size: 15px; }
.foot-in { max-width: 1080px; margin: 0 auto; padding: 44px 20px 30px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.foot .brand { color: #fff; }
.foot-in p { margin: 12px 0 0; max-width: 30ch; line-height: 1.6; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 26px; align-content: flex-start; max-width: 460px; }
.foot a { color: rgba(255, 238, 248, 0.8); text-decoration: none; }
.foot a:hover { color: #fff; }
.foot-base { max-width: 1080px; margin: 0 auto; padding: 16px 20px 28px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }

@media (max-width: 720px) {
  body { font-size: 17px; }
  .top nav { gap: 14px; }
  .hero { grid-template-columns: 1fr; gap: 0; padding-top: 14px; }
  .hero figure { grid-row: 1; justify-self: start; margin-bottom: 10px; }
  .hero figure img { width: 112px; }
  .deck { font-size: 18px; }
  .lede { font-size: 18px; }
  .bunny-note { grid-template-columns: 1fr; padding: 20px; }
  .bunny-note img { width: 72px; }
  .shelf a { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 18px 0; }
  .shelf img { width: 72px; height: 72px; }
  .shelf .time { grid-column: 2; margin-top: -8px; }
  .index-hero p { font-size: 18px; }
}
