/* Editorial treatments on existing A1 browsing and learning routes. */
.a1-designed {
  --a1-paper: #f8f7f3;
  --a1-white: #fffefa;
  --a1-ink: #1d372f;
  --a1-quiet: #4d5c55;
  --a1-gold: #c5a571;
  --a1-border: #e5e1d8;
  --a1-shadow: 0 8px 24px #29382c09;
  background: var(--a1-paper);
}

.a1-designed a:focus-visible,
.a1-designed button:focus-visible,
.a1-designed summary:focus-visible {
  outline: 2px solid #997023;
  outline-offset: 4px;
}

.a1-designed .site-header {
  background: #fffefa;
  border-color: #dfded2;
  box-shadow: 0 2px 16px #22382d08;
}

/* Homepage */
.a1-homepage .property-hero-slideshow { background: #112e27; }
.a1-homepage .ntd-slideshow-home .ntd-slide-media::after {
  background:
    linear-gradient(90deg, #102b25f5 0%, #142d26d9 29%, #142d2675 50%, #142d2608 76%),
    linear-gradient(0deg, #112d25f5 0%, #112d2500 33%);
}
.a1-homepage .property-hero-slideshow .property-hero-shell {
  min-height: clamp(610px, 48vw, 720px);
}
.a1-homepage .property-hero-copy { width: min(660px, 56%); }
.a1-homepage .property-hero-copy h1 {
  font: 400 clamp(44px, 4.48vw, 70px)/1.08 Lora, Georgia, serif;
  letter-spacing: -.042em;
  color: #fffaf0;
  margin-bottom: 23px;
  text-wrap: balance;
}
.a1-homepage .property-hero-copy h1 span { color: #f2dfb3; }
.a1-homepage .property-hero-copy > p:not(.eyebrow) {
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.76;
  color: #f2f1e9;
  max-width: 490px;
}
.a1-homepage .property-hero-copy .button {
  background: #ead2a2;
  color: #19362d;
  border: 1px solid #ead2a2;
  border-radius: 5px;
  padding: 14px 20px;
}
.a1-homepage .property-hero-copy .button:hover { background: #f4dfba; }
.a1-homepage .ntd-slideshow-home .ntd-slide-link {
  background: #132e28eb;
  color: #fff8e6;
  border: 1px solid #e7c68b7d;
  border-radius: 6px;
  box-shadow: 0 10px 35px #0f271d57;
}
.a1-homepage .ntd-slideshow-home .ntd-slide-link:hover { background: #1a3a30; }
.a1-homepage .ntd-slideshow-home .slide-image-kind { color: #ebd09d; }
.a1-homepage .project-explorer { border-bottom: 1px solid #ddd8c8; }
.a1-homepage .section-projects { background: #f0eee4; border-color: #e2dfd3; }
.a1-homepage .knowledge-home-entry {
  border-color: #e4e0d4;
  background: radial-gradient(ellipse at 88% 4%, #e8ece1 0%, transparent 45%), #f8f6ef;
}
.a1-homepage .caution-feature,
.a1-library .caution-feature {
  background: #ece9df;
  border-left: 3px solid #9b714e;
  border-radius: 5px 14px 14px 5px;
}
.a1-homepage .master-grid article,
.a1-library .master-grid article {
  position: relative;
  background: #fdfaf2;
  border: 1px solid var(--a1-border);
  border-top: 3px solid #a98655;
  border-radius: 12px;
  box-shadow: var(--a1-shadow);
}
.a1-homepage .master-grid article + article,
.a1-library .master-grid article + article {
  background: #213f35;
  border-color: #213f35;
  border-top-color: #c7aa71;
  color: #f9f5e8;
}
.a1-homepage .master-grid article + article a,
.a1-library .master-grid article + article a { color: #f4dead; }
.a1-designed .master-grid a { text-underline-offset: 5px; }

/* Cẩm nang */
.a1-library .knowledge-intro {
  position: relative;
  isolation: isolate;
  border-radius: 15px;
  padding: clamp(22px, 4vw, 52px);
  margin-top: clamp(16px, 3vw, 43px);
  margin-bottom: 31px;
  color: #f9f4e6;
  background: linear-gradient(120deg, #172f28, #274b3e 71%, #2d5546);
  box-shadow: 0 18px 48px #23382118;
}
.a1-library .knowledge-intro::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: repeating-radial-gradient(ellipse at 96% 20%, transparent 0 28px, #f7eacf17 29px 30px, transparent 31px 52px);
  mask-image: linear-gradient(90deg, transparent 40%, #000);
}
.a1-library .knowledge-intro .eyebrow { color: #e9cc94; }
.a1-library .knowledge-intro h1 {
  color: #fff9ea;
  font-size: clamp(34px, 4.3vw, 58px);
  line-height: 1.13;
  text-wrap: balance;
}
.a1-library .knowledge-intro header > p:not(.eyebrow),
.a1-library .knowledge-intro .knowledge-counts span { color: #edf0e0; }
.a1-library .knowledge-intro .knowledge-counts strong { color: #f4dca8; }
.a1-library .knowledge-intro .knowledge-search {
  padding: clamp(14px, 2vw, 24px);
  border-radius: 10px;
  border: 1px solid #dfcea271;
  background: #182d266e;
}
.a1-library .knowledge-search > div { border: 1px solid #e6d1a3; }
.a1-library .knowledge-search .button { background: #254d40; border-radius: 4px; }
.a1-library .knowledge-search .button:hover { background: #17362b; }

#thu-vien-chu-de { scroll-margin-top: 120px; }
.a1-designed .knowledge-directory-heading { margin-bottom: clamp(20px, 3vw, 36px); }
.a1-designed .knowledge-directory-heading h2 {
  color: var(--a1-ink);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.14;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.a1-designed .knowledge-directory-heading .text-link {
  white-space: normal;
  color: #3a553f;
  text-underline-offset: 4px;
}
.a1-designed .knowledge-directory-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.1vw, 26px);
}
.a1-designed .knowledge-directory-card.a1-topic-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e3dfd1;
  border-radius: 12px;
  background: var(--a1-white);
  box-shadow: var(--a1-shadow);
  transition: box-shadow .22s ease, border-color .22s ease;
}
.a1-designed .knowledge-directory-card.a1-topic-tile:hover {
  border-color: var(--a1-accent);
  box-shadow: 0 13px 35px #233b291a;
}
.a1-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--a1-soft);
  min-width: 0;
}
.a1-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--a1-crop); }
.a1-art.is-graphic {
  display: grid;
  place-items: center;
  background: var(--a1-soft);
}
.a1-art.is-graphic img {
  width: 84%;
  max-height: 81%;
  height: auto;
  object-fit: contain;
  border-radius: 5px;
  box-shadow: 0 3px 12px #233b2918;
}
.a1-art.is-photo img, .ntd-slideshow .ntd-slide-image { filter: saturate(.9); }
.a1-art-tile {
  aspect-ratio: 2.12;
  border-bottom: 1px solid var(--a1-border);
  flex: 0 0 auto;
}
.a1-art-tile img { transition: transform .32s ease; }
.a1-topic-tile:hover .a1-art-tile img { transform: scale(1.025); }
.a1-art-tile.is-portrait img { object-position: center 24%; }
.a1-topic-tile .a1-tile-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: clamp(15px, 2vw, 23px);
}
.a1-designed .a1-topic-tile h3 {
  font: 400 clamp(19px, 1.75vw, 25px)/1.29 Lora, Georgia, serif !important;
  letter-spacing: -.02em;
  margin: 0 0 10px !important;
  text-wrap: pretty;
}
.a1-designed .a1-topic-tile h3 a { color: var(--a1-accent); }
.a1-designed .a1-topic-tile h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.a1-topic-tile .a1-tile-body > p { margin: 0; color: var(--a1-quiet); font-size: 13px; line-height: 1.68; }
.a1-designed .a1-topic-tile .knowledge-directory-groups {
  border-top: 1px solid #e5e3da;
  margin-top: 16px;
  padding-top: 5px;
}
.a1-topic-tile .knowledge-directory-groups:empty { display: none; }
.a1-designed .a1-topic-tile .knowledge-directory-group {
  border: 0;
  color: #374b42;
  margin: 0;
  padding: 8px 0;
  line-height: 1.4;
  font-size: 12px;
}
.a1-topic-tile .knowledge-directory-group > span[aria-hidden] { color: var(--a1-accent); }
.a1-designed .a1-topic-tile .knowledge-directory-all {
  color: var(--a1-accent);
  padding: 13px 0 0;
  margin-top: auto;
  font-size: 13px;
}

/* Topic and project introductions */
.a1-topic .journey-page { max-width: 1240px; }
.a1-topic .journey-crumbs {
  color: var(--a1-quiet);
  margin-top: 0;
}
.a1-topic-header,
.a1-project-heading,
.a1-roadmap .journey-heading {
  background: var(--a1-white);
  color: var(--a1-ink);
  border: 1px solid var(--a1-border);
  border-radius: 10px;
}
.a1-topic .journey-heading.a1-topic-header,
.a1-project-directory .a1-project-heading {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: center;
  gap: clamp(18px, 3.5vw, 43px);
  padding: clamp(22px, 4vw, 51px);
  margin-top: 16px;
  margin-bottom: 32px;
}
.a1-project-directory .a1-project-heading {
  max-width: min(1240px, calc(100% - 36px));
  box-sizing: border-box;
}
.a1-topic-header .eyebrow, .a1-project-heading .eyebrow, .a1-roadmap .journey-heading .eyebrow { color: #765a35; }
.a1-topic-header h1,
.a1-project-heading h1,
.a1-roadmap .journey-heading h1 {
  font: 400 clamp(33px, 4.15vw, 57px)/1.12 Lora, Georgia, serif;
  letter-spacing: -.034em;
  color: var(--a1-ink);
  margin: 0 0 17px;
  text-wrap: balance;
}
.a1-topic-headline > p,
.a1-project-heading > div > p:not(.eyebrow),
.a1-roadmap .journey-heading > p:not(.eyebrow) {
  max-width: 64ch;
  margin: .68rem 0;
  color: var(--a1-quiet);
  line-height: 1.7;
}
.a1-topic-headline > p > strong { color: var(--a1-ink); }
.a1-read-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  margin-top: 13px;
  padding: 8px 15px;
  border-radius: 5px;
  border: 1px solid #dbba7c;
  background: #ecd4a4;
  font-weight: 700;
  font-size: .875rem;
  color: #1d342e;
  text-decoration: none;
}
.a1-read-start:hover { background: #f7e4bd; }
.a1-topic-artwork {
  margin: 0;
  padding: 0;
  min-width: 0;
  background: transparent;
}
.a1-art-cover { border-radius: 5px; aspect-ratio: 1.63; }
.a1-project-directory .a1-art-cover { aspect-ratio: 1.6; }
.a1-art-cover.is-portrait img { object-position: center 27%; }
.a1-topic-artwork figcaption { color: var(--a1-quiet); margin: 0; padding: 8px 0 0; font-size: .73rem; line-height: 1.5; }
.a1-topic .journey-map {
  background: var(--a1-white);
  border: 1px solid var(--a1-border);
  border-radius: 12px;
  box-shadow: var(--a1-shadow);
}
.a1-topic .journey-map li { background: #eeeee4; }
.a1-topic .journey-map li span { color: #5e5231; }
.a1-topic .journey-page > section {
  border-top: 1px solid #e2dfd2;
  padding-top: 12px;
  padding-bottom: 13px;
}
.a1-topic .journey-page > section > h2,
.a1-roadmap .journey-page h2 {
  color: var(--a1-ink);
  font-family: Lora, Georgia, serif;
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.28;
  text-wrap: pretty;
}
.a1-topic .journey-page > section a { text-underline-offset: 4px; }
.a1-topic .journey-page > .journey-faq { padding-block: 6px 20px; }
.a1-topic .journey-faq details { padding: 15px 0; }

.a1-topic-next {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 19px 0 35px;
  border-top: 1px solid var(--a1-border);
  font-size: .91rem;
}
.a1-topic-next a {
  display: grid;
  gap: 3px;
  color: #264739;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.a1-topic-next a:last-child { text-align: right; }
.a1-project-directory .directory-section { padding-top: 12px; }
.a1-designed .project-card { border-color: #dedbcc; border-radius: 11px; box-shadow: var(--a1-shadow); }
.a1-designed .project-card h3 { font-family: Lora, Georgia, serif; font-weight: 400; color: #214638; }
.a1-designed .directory-toolbar { border-radius: 10px; }

.a1-roadmap .journey-heading {
  max-width: none;
  padding: clamp(22px, 4.5vw, 52px);
}
.a1-roadmap .journey-lessons {
  padding-inline: clamp(13px, 2.9vw, 33px);
  border: 1px solid #e4e0d1;
  border-radius: 11px;
  background: var(--a1-white);
}
.a1-roadmap .journey-lessons li:last-child { border-bottom: 0; }
.a1-roadmap .journey-step { color: #705a32; }
.a1-exam .exam-heading {
  border-radius: 14px;
  padding: clamp(1.35rem, 3.8vw, 3.35rem);
  background: linear-gradient(122deg, #1a362d, #285144);
  box-shadow: 0 16px 40px #283c2c21;
}
.a1-exam .exam-heading h1 {
  max-width: 27ch;
  color: #fffdf2;
  font: 400 clamp(1.85rem, 4.5vw, 3.5rem)/1.15 Lora, Georgia, serif;
  text-wrap: balance;
}
.a1-exam .exam-mode,
.a1-exam .exam-home-tools { box-shadow: var(--a1-shadow); }

@media (max-width: 980px) {
  .a1-designed .knowledge-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a1-homepage .property-hero-copy { width: min(540px, 68%); }
}
@media (max-width: 700px) {
  .a1-topic .journey-heading.a1-topic-header,
  .a1-project-directory .a1-project-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 19px;
  }
  .a1-topic-header h1, .a1-project-heading h1 { text-wrap: pretty; }
  .a1-topic-artwork .a1-art-cover { aspect-ratio: 2.05; }
  #thu-vien-chu-de { scroll-margin-top: 84px; }
}
@media (max-width: 640px) {
  .a1-homepage .property-hero-slideshow .property-hero-shell {
    min-height: 662px;
    padding-block: 34px 225px;
  }
  .a1-homepage .property-hero-copy { width: 100%; }
  .a1-homepage .property-hero-copy h1 {
    font-size: clamp(37px, 10.2vw, 52px);
    max-width: 420px;
    text-wrap: pretty;
    margin-bottom: 16px;
  }
  .a1-homepage .property-hero-copy > p:not(.eyebrow) { max-width: 365px; margin-bottom: 18px; }
  .a1-homepage .ntd-slideshow-home .ntd-slide-media::after {
    background: linear-gradient(180deg, #102c25f8 0%, #142e27e5 31%, #132f287a 59%, #132f2800 74%, #102a22eb 100%);
  }
  .a1-homepage .property-hero-copy .button { padding: 12px 14px; }
}
@media (max-width: 600px) {
  .a1-designed .knowledge-directory-grid { grid-template-columns: minmax(0, 1fr); }
  .a1-designed .knowledge-directory-card.a1-topic-tile { flex-direction: row; }
  .a1-art-tile {
    width: clamp(90px, 26vw, 123px);
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: 2px solid var(--a1-accent);
  }
  .a1-art-tile:not(.is-graphic) img {
    position: absolute;
    inset: 0;
  }
  .a1-art-tile.is-graphic img { width: 89%; }
  .a1-art-tile.is-portrait img { object-position: 51% 24%; }
  .a1-designed .a1-topic-tile h3 { font-size: 20px !important; }
  .a1-topic-tile .a1-tile-body { padding: 13px 14px; }
  .a1-designed .a1-topic-tile .knowledge-directory-group { font-size: 13px; }
  .a1-topic-next a:last-child { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .a1-designed .a1-topic-tile, .a1-art-tile img { transition: none; }
}
.a1-topic #canh-giac-bon-diem { scroll-margin-top: 118px; }
.a1-homepage .property-hero-copy .a1-hero-library {
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 5px;
}
