/*
Theme Name: vuntrong.com
Description: Theme doc lap cho blog lam vuon tai nha (rau, dat trong, phan bon, hat giong, dung cu lam vuon). Nen kem am, xanh la chu dao, card bo tron mem, font Be Vietnam Pro.
Author: vuntrong.com
Version: 1.0.6
Text Domain: vuntrong
*/

:root {
  --accent: #3f7d32;
  --accent-light: #6fae4f;
  --accent-dark: #2d5a22;
  --accent-soft: #e8f3e1;
  --clay: #a0522d;
  --clay-soft: #f3e6dc;
  --sun: #c98a1f;
  --sun-soft: #fdf1dd;
  --ink: #16230f;
  --ink-2: #273a21;
  --muted: #5c6b54;
  --bg: #f7f5ee;
  --surface: #ffffff;
  --surface-alt: #eef3e6;
  --line: #e1e7d6;
  --line-soft: #ecf0e4;
  --header-bg: #ffffff;
  --header-ink: #5c6b54;
  --header-search-bg: #eef3e6;
  --footer-bg: #ffffff;
  --footer-ink: var(--muted);
  --accent-gradient: linear-gradient(135deg, var(--accent-light), var(--accent) 45%, var(--accent-dark));
  --text-gradient: linear-gradient(100deg, var(--accent-light) 0%, var(--accent) 35%, var(--sun) 65%, var(--clay) 92%);
  --font-head: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-card: 0 1px 2px rgb(22 35 15 / 0.05), 0 10px 30px rgb(22 35 15 / 0.08);
  --measure: 680px;
  --container: 1300px;
  --placeholder: repeating-linear-gradient(135deg, #eef1e4 0 8px, #f5f6ee 8px 16px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

body {
  background: var(--bg) !important;
  color: var(--ink-2);
  font-family: var(--font-body) !important;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent-dark);
}

h1, h2 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#page, .site { background: var(--bg); }

.site-main { min-height: 60vh; }

.vuntrong-grad-text {
  background-image: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ===================== Buttons & forms ===================== */
.btn {
  height: 48px;
  padding: 0 24px;
  border-radius: var(--r-md);
  font: 600 16px/1 var(--font-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: filter 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary {
  background-image: var(--accent-gradient);
  color: #fff;
}
.btn--primary:hover { filter: brightness(1.05); }
.btn--outline { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.btn--outline:hover { background: var(--surface-alt); border-color: var(--accent); color: var(--ink); }

input[type="text"], input[type="search"], textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: 400 15px/1.5 var(--font-body);
  color: var(--ink-2);
  background: var(--surface);
}
input:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* ===================== Header ===================== */
.site-header {
  background: var(--header-bg);
  height: calc(64px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  position: sticky;
  top: 0;
  z-index: 30;
}
@media (min-width: 960px) { .site-header { height: calc(76px + env(safe-area-inset-top)); } }
.site-header__inner {
  max-width: var(--container);
  margin-inline: auto;
  height: 64px;
  padding: 0 var(--s-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 960px) { .site-header__inner { justify-content: flex-start; gap: 40px; } }
@media (min-width: 960px) {
  .site-header__inner { height: 76px; padding: 0 40px; }
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-header__leaf {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background-image: var(--accent-gradient);
  flex: 0 0 auto;
}
@media (min-width: 960px) { .site-header__leaf { width: 32px; height: 32px; } }
.site-header__logo-img { display: flex; align-items: center; flex: 0 0 auto; }
.site-header__logo-img img {
  height: 30px !important;
  width: 30px !important;
  border-radius: 9px;
  object-fit: contain;
}
@media (min-width: 960px) { .site-header__logo-img img { height: 32px !important; width: 32px !important; } }
.site-header__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
}
@media (min-width: 960px) { .site-header__name { font-size: 21px; } }
.site-header__desktop-group { display: flex; align-items: center; gap: 32px; }
.site-header__nav { display: none; }
@media (min-width: 960px) {
  .site-header__nav { display: flex; gap: 8px; font-size: 15px; font-weight: 500; }
  .site-header__nav a { color: var(--header-ink); text-decoration: none; padding: 8px 14px; border-radius: 10px; }
  .site-header__nav a:hover { color: var(--ink); background: var(--surface-alt); }
  .site-header__nav a.is-active { color: var(--ink); background: var(--accent-soft); font-weight: 600; }
  .nav-dropdown { position: relative; }
  .nav-dropdown__toggle {
    display: flex; align-items: center; gap: 4px; font: inherit;
    color: var(--header-ink); background: none; border: 0; cursor: pointer;
    padding: 8px 14px; border-radius: 10px;
  }
  .nav-dropdown__toggle:hover { color: var(--ink); background: var(--surface-alt); }
  .nav-dropdown.is-active .nav-dropdown__toggle { color: var(--ink); background: var(--accent-soft); font-weight: 600; }
  .nav-dropdown__caret { display: inline-block; flex-shrink: 0; transition: transform .15s ease; }
  .nav-dropdown:hover .nav-dropdown__caret, .nav-dropdown:focus-within .nav-dropdown__caret { transform: rotate(180deg); }
  .nav-dropdown__menu {
    display: none; flex-direction: column; position: absolute; top: 100%; left: 0; margin-top: 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 8px 24px rgba(22,35,15,.1); padding: 6px; min-width: 200px; z-index: 20;
  }
  .nav-dropdown:hover .nav-dropdown__menu, .nav-dropdown:focus-within .nav-dropdown__menu { display: flex; }
  .nav-dropdown__menu a { padding: 10px 12px; border-radius: 8px; white-space: nowrap; }
}
.site-header__right-group { display: flex; align-items: center; gap: 12px; }
@media (min-width: 960px) { .site-header__right-group { margin-left: auto; } }
.site-header__search { display: none; }
@media (min-width: 960px) {
  .site-header__search {
    display: flex; align-items: center; gap: 10px; width: 240px; height: 42px;
    background: var(--header-search-bg); border-radius: var(--r-pill); padding: 0 16px;
  }
  .site-header__search input { background: transparent; border: 0; height: auto; padding: 0; color: var(--ink-2); font-size: 14px; }
  .site-header__search input::placeholder { color: var(--muted); }
}
.site-header__menu-btn {
  width: 44px; height: 44px; display: flex; flex-direction: column; justify-content: center;
  align-items: center; gap: 5px; background: none; border: 0; cursor: pointer; margin-right: -12px;
}
@media (min-width: 960px) { .site-header__menu-btn { display: none; } }
.site-header__menu-btn span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
.site-header__mobile-panel {
  display: none; flex-direction: column; background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 8px var(--s-4) var(--s-5); gap: 2px;
}
.site-header__mobile-panel.is-open { display: flex; }
.site-header__mobile-panel a {
  color: var(--ink-2); text-decoration: none; padding: 12px 4px;
  border-top: 1px solid var(--line-soft); font-size: 15px; font-weight: 500;
}
.mobile-nav-group summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  color: var(--ink-2); padding: 12px 4px; border-top: 1px solid var(--line-soft); font-size: 15px; font-weight: 500;
}
.mobile-nav-group summary::-webkit-details-marker, .mobile-nav-group summary::marker { display: none; content: ""; }
.mobile-nav-group__caret { display: inline-block; flex-shrink: 0; transition: transform .15s ease; }
.mobile-nav-group[open] .mobile-nav-group__caret { transform: rotate(180deg); }
.mobile-nav-group__list { display: flex; flex-direction: column; padding-left: 14px; }
.mobile-nav-group__list a { border-top: 1px solid var(--line-soft); padding: 10px 4px; font-size: 14px; }
.site-header__mobile-search {
  margin-top: var(--s-3); height: 44px; background: var(--header-search-bg); border-radius: var(--r-pill);
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
}
.site-header__mobile-search input { background: transparent; border: 0; height: auto; padding: 0; color: var(--ink-2); font-size: 14px; }
.site-header__mobile-search input::placeholder { color: var(--muted); }
@media (min-width: 960px) { .site-header__mobile-panel { display: none !important; } }

/* ===================== Hero ===================== */
.hero { display: flex; flex-direction: column; gap: var(--s-4); padding: 28px var(--s-4) var(--s-6); }
@media (min-width: 960px) {
  .hero { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: center; padding: 64px 40px 56px; max-width: var(--container); margin-inline: auto; }
}
.hero__content { display: flex; flex-direction: column; gap: var(--s-4); }
@media (min-width: 960px) { .hero__content { gap: 20px; } }
.hero h1 { font-size: 32px; line-height: 1.15; font-weight: 700; }
@media (min-width: 960px) { .hero h1 { font-size: 48px; line-height: 1.1; } }
.hero__desc { margin: 0; font-size: 16px; line-height: 1.65; color: var(--muted); }
@media (min-width: 960px) { .hero__desc { font-size: 18px; line-height: 1.7; max-width: 480px; } }
.hero__search {
  height: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  display: flex; align-items: center; gap: 10px; padding: 0 16px; color: var(--muted);
}
@media (min-width: 960px) { .hero__search { display: none; } }
.hero__search input { border: 0; height: auto; padding: 0; font-size: 15px; }
.hero__media {
  height: 260px; background: transparent; display: flex; align-items: center;
  justify-content: center; font-family: var(--font-mono); font-size: 12px; color: var(--muted); overflow: visible; position: relative;
}
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; border-radius: var(--r-lg); }
@media (min-width: 960px) { .hero__media { height: 460px; font-size: 13px; } }
.hero__actions { display: none; }

/* ===================== Hero grow animation (mam cay) ===================== */
.grow-scene { position: relative; z-index: 1; width: 100%; height: 100%; display: block; }
.grow-soil { fill: var(--clay); }
.grow-soil-shadow { fill: rgba(22, 35, 15, 0.1); }

.grow-stem {
  fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: vtGrowStem 1.6s ease-out forwards;
}
.grow-stem--sm { stroke-width: 5; }

.grow-leaf {
  fill: var(--accent-light); opacity: 0; transform-box: fill-box; transform-origin: 85% 90%;
  animation: vtLeafPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.grow-leaf--l1 { animation-delay: 1s; transform-origin: 82% 92%; }
.grow-leaf--r1 { fill: var(--accent); animation-delay: 1.3s; transform-origin: 18% 92%; }
.grow-leaf--sm { animation-delay: 0.9s; }
.grow-leaf--flip { transform-origin: 18% 92%; }

.grow-sprout { transform-box: fill-box; transform-origin: 50% 100%; }
.grow-sprout--main { animation: vtSway 4.5s ease-in-out 2.1s infinite; }
.grow-sprout--left { animation: vtSway 4.5s ease-in-out 1.8s infinite; }
.grow-sprout--right { animation: vtSway 4.5s ease-in-out 2.4s infinite reverse; }

.grow-dot { fill: var(--sun); animation: vtDotFloat 3s ease-in-out infinite; }
.grow-dot--2 { fill: var(--accent-light); animation-delay: 0.6s; }
.grow-dot--3 { animation-delay: 1.2s; }

@keyframes vtGrowStem { to { stroke-dashoffset: 0; } }
@keyframes vtLeafPop {
  0% { transform: scale(0) rotate(-15deg); opacity: 0; }
  70% { transform: scale(1.08) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes vtSway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}
@keyframes vtDotFloat {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-14px); opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .grow-stem, .grow-leaf, .grow-sprout, .grow-dot { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; transform: none !important; }
}
@media (min-width: 960px) { .hero__actions { display: flex; gap: 12px; margin-top: 8px; } }

/* ===================== Section titles / category cards ===================== */
.section { padding: 8px var(--s-4) 28px; }
@media (min-width: 960px) { .section { max-width: var(--container); margin-inline: auto; padding: 0 40px 56px; } }
.section__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s-4); }
.section__head h3 { margin: 0; font-family: var(--font-head); font-size: 21px; font-weight: 700; color: var(--ink); }
@media (min-width: 960px) { .section__head h3 { font-size: 28px; } }
.section__head a { font-size: 14px; font-weight: 600; text-decoration: none; }

.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 960px) { .category-grid { gap: var(--s-5); } }
.category-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 12px;
  display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink-2);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.category-card:hover { box-shadow: var(--shadow-card); border-color: transparent; }
@media (min-width: 960px) {
  .category-card { flex-direction: row; align-items: center; gap: 16px; border-radius: var(--r-lg); padding: var(--s-5); }
}
.category-card__icon {
  width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
@media (min-width: 960px) { .category-card__icon { width: 52px; height: 52px; border-radius: 16px; } }
.category-card__name { font-weight: 700; font-size: 14px; line-height: 1.3; color: var(--ink); }
@media (min-width: 960px) { .category-card__name { font-size: 17px; } }
.category-card__sub { font-size: 12px; color: var(--muted); }
@media (min-width: 960px) { .category-card__sub { font-size: 14px; } }
.category-card__sub--desktop { display: none; }
@media (min-width: 960px) {
  .category-card__sub--desktop { display: block; }
  .category-card__sub--mobile { display: none; }
}

.home-latest-grid { display: flex; flex-direction: column; gap: var(--s-5); }
@media (min-width: 960px) { .home-latest-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; } }

/* ===================== Cards & post grid/list ===================== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: box-shadow 0.15s ease; }
.card:hover { box-shadow: var(--shadow-card); }
.card--featured { border: 0; box-shadow: var(--shadow-card); border-radius: var(--r-lg); }
.post-grid { display: grid; gap: var(--s-3); }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); } }
@media (min-width: 960px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; } }

.featured-card__media { height: 180px; }
@media (min-width: 960px) { .featured-card__media { height: 300px; } }
.featured-card__media, .grid-card__media {
  position: relative; background: var(--placeholder); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.card-media-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.grid-card__media { height: 190px; }
.featured-card__body, .grid-card__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 960px) { .featured-card__body { padding: var(--s-5); gap: 10px; } }
.card-tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--accent-dark); background: var(--accent-soft);
  padding: 4px 10px; border-radius: var(--r-pill); text-decoration: none;
}
.featured-card__title { font-family: var(--font-head); font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--ink); }
@media (min-width: 960px) { .featured-card__title { font-size: 26px; } }
.grid-card__title { font-family: var(--font-head); font-weight: 700; font-size: 19px; line-height: 1.35; color: var(--ink); }
.card-excerpt { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }
.card-meta { font-size: 13px; color: var(--muted); }

.post-row-list { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 960px) { .post-row-list { gap: 20px; } }
.post-row { display: flex; gap: 14px; text-decoration: none; color: inherit; padding-bottom: 14px; }
@media (min-width: 960px) { .post-row { gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line); } }
.post-row__thumb { position: relative; overflow: hidden; flex: 0 0 96px; height: 96px; border-radius: var(--r-sm); background: var(--placeholder); }
@media (min-width: 960px) { .post-row__thumb { flex-basis: 128px; height: 96px; } }
.post-row__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.post-row__cat { font-size: 12px; font-weight: 700; color: var(--accent); }
.post-row__title { font-weight: 700; font-size: 16px; line-height: 1.4; color: var(--ink); }
.post-row__meta { font-size: 13px; color: var(--muted); }

.empty-state { color: var(--muted); padding: var(--s-6) 0; }

/* ===================== Footer ===================== */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); border-top: 1px solid var(--line); padding: 24px var(--s-4) 32px; font-size: 13px; line-height: 1.6; margin-top: var(--s-7); }
@media (min-width: 960px) { .site-footer { padding: 40px 0; } }
.site-footer__inner { max-width: var(--container); margin-inline: auto; display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 960px) { .site-footer__inner { flex-direction: row; justify-content: space-between; gap: var(--s-8); padding-inline: 40px; } }
.site-footer__brand { font-family: var(--font-head); font-size: 18px; color: var(--ink); font-weight: 700; }
.site-footer__disclosure { max-width: 520px; }
.site-footer__links { display: none; }
@media (min-width: 960px) {
  .site-footer__links { display: flex; gap: var(--s-7); }
  .site-footer__links b { color: var(--ink); display: block; margin-bottom: 6px; }
  .site-footer__links a { display: block; color: var(--footer-ink); text-decoration: none; padding: 2px 0; }
  .site-footer__links a:hover { color: var(--accent); }
}

/* ===================== Breadcrumbs ===================== */
.breadcrumbs { font-size: 13px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

/* ===================== Article (post detail) ===================== */
.post-header { display: flex; flex-direction: column; gap: var(--s-4); padding: 24px var(--s-4) 0; }
@media (min-width: 960px) {
  .post-header { max-width: var(--container); margin-inline: auto; padding: 48px 40px 0; display: grid; grid-template-columns: minmax(0, var(--measure)) 280px; gap: 80px; justify-content: center; align-items: start; }
}
.post-header__content { display: flex; flex-direction: column; gap: 18px; }
.post-mobile-tag { align-self: flex-start; }
@media (min-width: 960px) { .post-mobile-tag { display: none; } }
.breadcrumbs-desktop { display: none; }
@media (min-width: 960px) { .breadcrumbs-desktop { display: block; } }
.post-header h1 { font-size: 28px; line-height: 1.2; font-weight: 700; }
@media (min-width: 960px) { .post-header h1 { font-size: 42px; line-height: 1.15; } }
.post-author { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.post-author__avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); display: flex;
  align-items: center; justify-content: center; flex: 0 0 auto;
}
.post-author__name { color: var(--ink); font-weight: 700; }

.post-cover-wrap { padding: 16px var(--s-4) 0; }
@media (min-width: 960px) { .post-cover-wrap { padding: 28px 40px 0; display: flex; justify-content: center; } }
.post-cover { width: calc(100% + var(--s-4) * 2); max-width: none; margin: 0 calc(var(--s-4) * -1); height: 220px; object-fit: cover; }
@media (min-width: 960px) { .post-cover { width: 1040px; max-width: 100%; margin: 0; height: 440px; border-radius: var(--r-lg); } }

.disclosure-line {
  font-size: 13px; line-height: 1.55; color: var(--muted); padding: 10px 0;
}

.read-progress { height: 3px; background: var(--line); position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 20; }
@media (min-width: 960px) { .read-progress { top: calc(76px + env(safe-area-inset-top)); } }
.read-progress > span { display: block; height: 100%; background-image: var(--accent-gradient); width: 0%; transition: width 0.1s linear; }

.article-layout { padding: 24px var(--s-4) var(--s-7); display: grid; gap: var(--s-6); min-width: 0; }
.article-layout > article { min-width: 0; }
@media (min-width: 960px) {
  .article-layout { max-width: var(--container); margin-inline: auto; padding: 48px 40px 72px; grid-template-columns: minmax(0, var(--measure)) 280px; gap: 80px; justify-content: center; align-items: start; }
  .article-layout .toc--desktop { position: sticky; top: calc(76px + env(safe-area-inset-top) + 20px); }
}

.toc { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.toc--mobile summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc--mobile summary::-webkit-details-marker { display: none; }
.toc--mobile .toc__links { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
@media (min-width: 960px) { .toc--mobile { display: none; } }
.toc--desktop { display: none; }
@media (min-width: 960px) {
  .toc--desktop { display: flex; flex-direction: column; gap: 20px; }
  .toc--desktop .toc__title { font-weight: 700; color: var(--ink); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
  .toc--desktop .toc__links { display: flex; flex-direction: column; gap: 8px; }
}
.toc__link { text-decoration: none; color: var(--muted); }
.toc__link.is-active { font-weight: 700; color: var(--accent); }
.toc__link:hover { color: var(--accent); }

.prose { max-width: var(--measure); font-size: 17px; line-height: 1.75; display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; color: var(--ink-2); }
@media (min-width: 960px) { .prose { font-size: 18px; } }
.prose h2 { font-size: 23px; line-height: 1.3; margin-top: var(--s-6); scroll-margin-top: 80px; font-weight: 700; }
.prose h3 { font-family: var(--font-body); font-size: 19px; line-height: 1.4; font-weight: 700; color: var(--ink); margin-top: var(--s-5); }
@media (min-width: 960px) { .prose h2 { font-size: 28px; } .prose h3 { font-size: 21px; } }
.prose ul, .prose ol { padding-left: 22px; margin: 0; }
.prose li + li { margin-top: 6px; }
.prose img { width: 100%; height: auto; border-radius: var(--r-md); }
.prose p { margin: 0 0 var(--s-4); }
.prose blockquote {
  margin-inline: 0; padding: 4px 0 4px 20px; box-shadow: inset 3px 0 0 var(--accent);
  font-style: italic; color: var(--ink);
}

.table-wrap { overflow-x: auto; margin-block: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); -webkit-overflow-scrolling: touch; }
.table-wrap table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 15px; line-height: 1.45; }
.table-wrap th { background: var(--ink); color: #fff; text-align: left; font-weight: 700; padding: 12px 16px; }
.table-wrap td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.table-wrap tr:nth-child(even) td { background: var(--surface-alt); }

.related-posts { border-top: 1px solid var(--line); margin-top: var(--s-4); padding-top: var(--s-6); display: flex; flex-direction: column; gap: 14px; }
.related-posts__title { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--ink); }
.related-posts__item { display: flex; gap: 12px; text-decoration: none; color: inherit; }
.related-posts__thumb { position: relative; overflow: hidden; flex: 0 0 72px; height: 72px; border-radius: var(--r-sm); background: var(--placeholder); }
.related-posts__item-title { font-weight: 700; font-size: 15px; line-height: 1.45; color: var(--ink); }

/* ===================== Author box (E-E-A-T) ===================== */
.author-box {
  display: flex; gap: 14px; align-items: flex-start; margin-top: var(--s-6);
  padding: 18px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--r-md);
}
.author-box__avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  background-image: var(--accent-gradient); color: #fff; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.author-box__name { font-weight: 700; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.author-box__bio { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.6; }

/* ===================== FAQ section (AEO) ===================== */
.faq-section { margin-top: var(--s-6); }
.faq-section__title { font-size: 22px; margin: 0 0 var(--s-4); }
.faq-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 4px 18px; margin-bottom: 10px;
}
.faq-item summary {
  cursor: pointer; font-weight: 700; color: var(--ink); padding: 14px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 20px; color: var(--accent); flex: 0 0 auto; font-weight: 400;
  transition: transform .15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* ===================== Home: 5 buoc nguoi moi ===================== */
.home-steps { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
@media (min-width: 760px) { .home-steps { flex-direction: row; align-items: stretch; gap: 16px; } }
.home-steps__item {
  flex: 1; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 22px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s ease, transform .15s ease;
}
.home-steps__item:hover { border-color: var(--accent); transform: translateY(-2px); }
.home-steps__head { display: flex; align-items: center; gap: 10px; }
.home-steps__num {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: var(--r-pill); background-image: var(--accent-gradient); color: #fff;
  font: 700 14px/1 var(--font-head); display: flex; align-items: center; justify-content: center;
}
.home-steps__title { font: 700 16px/1.3 var(--font-head); color: var(--ink); }
.home-steps__desc { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.55; }

/* ===================== Share row (single post) ===================== */
.share-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.share-row__label { font-size: 13px; color: var(--muted); font-weight: 600; }
.share-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font: 600 12.5px/1 var(--font-body); text-decoration: none; cursor: pointer;
}
.share-btn:hover { border-color: var(--accent); color: var(--ink); }
.share-btn--fb { color: #1877f2; border-color: #d7e6fd; }
.share-btn--fb:hover { background: #f0f6ff; }
.share-btn--zalo { color: #0068ff; border-color: #d2e4ff; }
.share-btn--zalo:hover { background: #eef5ff; }
.share-toast {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font: 600 11.5px/1 var(--font-body); padding: 6px 10px;
  border-radius: 8px; white-space: nowrap; z-index: 5;
}
.share-toast::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--ink);
}

/* ===================== Continue reading (home) ===================== */
.continue-reading__card {
  display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit;
  background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 18px;
}
.continue-reading__thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.continue-reading__body { min-width: 0; flex: 1; }
.continue-reading__label { font: 700 11.5px/1 var(--font-body); text-transform: uppercase; letter-spacing: .03em; color: var(--accent-dark); margin-bottom: 4px; }
.continue-reading__title { font: 700 14.5px/1.35 var(--font-head); color: var(--ink); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.continue-reading__arrow { flex: 0 0 auto; font-size: 18px; color: var(--accent-dark); }
