@charset "utf-8";
/* ===========================================================================
   CogniLearn — docs.css
   Chỉ dùng cho trang tài liệu. Dùng lại biến màu, phông và các lớp chung
   trong styles.css. Không ẩn nội dung bằng CSS; mọi thứ đọc được khi JS tắt.
   =========================================================================== */

.docs-page [hidden]{display:none !important;}

/* ---------- Đầu trang ---------- */

.docs-hero{
  padding-top:clamp(28px,4.4vw,46px);
  padding-bottom:clamp(4px,1vw,10px);
}

.docs-hero .eyebrow{margin-bottom:0;}

.docs-hero h1{
  margin-top:18px;
  max-width:18em;
  font-family:var(--display);font-weight:600;
  font-size:clamp(1.95rem,4.6vw,3rem);
  line-height:1.07;letter-spacing:-.03em;
  text-wrap:balance;
}

.docs-hero .lede{margin-top:16px;max-width:62ch;}

/* ---------- Ô lọc nhanh (JS mới hiện) ---------- */

.docs-search{
  margin-top:26px;
  max-width:560px;
  padding:12px 14px 10px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:4px;
}

.docs-search label{
  display:block;
  font-family:var(--mono);font-size:10.5px;font-weight:500;
  letter-spacing:.13em;text-transform:uppercase;color:var(--muted);
}

.docs-search__row{display:flex;gap:8px;margin-top:8px;}

.docs-search input{
  flex:1 1 auto;min-width:0;
  min-height:44px;padding:9px 12px;
  border:1px solid var(--line-strong);border-radius:3px;
  background:var(--paper);color:var(--ink);
  font-family:var(--sans);font-size:15px;line-height:1.4;
}
.docs-search input::placeholder{color:var(--faint);}
.docs-search input:focus{border-color:var(--ink);outline:2px solid var(--accent);outline-offset:1px;}

.docs-search__clear{
  flex:none;min-height:44px;min-width:44px;padding:8px 12px;
  border:1px solid var(--line-strong);border-radius:3px;
  background:var(--paper);color:var(--muted);
  font-family:var(--mono);font-size:11px;
  cursor:pointer;
}
.docs-search__clear:hover{color:var(--ink);border-color:var(--ink);}

.docs-search__status{
  min-height:1.2em;margin-top:6px;
  font-family:var(--mono);font-size:10.5px;line-height:1.6;color:var(--muted);
}

.docs-search__empty{
  margin-top:18px;
  max-width:60ch;
  color:var(--muted);font-size:15px;line-height:1.7;
}

/* ---------- Thẻ lối tắt ---------- */

.docs-quick{
  margin-top:clamp(28px,4vw,42px);
  padding-top:clamp(22px,3vw,30px);
  border-top:1px solid var(--line);
}

.docs-quick__title{
  margin:0;
  font-family:var(--display);font-weight:600;
  font-size:clamp(1.2rem,2.4vw,1.55rem);
  line-height:1.25;letter-spacing:-.018em;
}

.docs-cards{
  list-style:none;margin:16px 0 0;padding:0;
  display:grid;gap:10px;
  grid-template-columns:repeat(auto-fill,minmax(228px,1fr));
}

.docs-card{
  display:flex;flex-direction:column;gap:5px;
  min-height:44px;padding:13px 15px 14px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:3px;
  text-decoration:none;
  transition:border-color .16s ease,transform .16s ease;
}
.docs-card:hover{border-color:var(--ink);transform:translateY(-2px);}

.docs-card__title{
  font-family:var(--display);font-weight:600;
  font-size:15px;line-height:1.35;letter-spacing:-.008em;
  color:var(--ink);
}

.docs-card__hint{font-size:12.5px;line-height:1.55;color:var(--muted);}

/* ---------- Khung hai cột ---------- */

.docs-shell{
  padding-top:clamp(26px,4vw,38px);
  padding-bottom:clamp(40px,6vw,72px);
}

/* Mục lục thu gọn trên điện thoại (<1024px). */
.docs-toc{
  margin-bottom:22px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:3px;
}

.docs-toc > summary{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:52px;padding:13px 16px;
  font-family:var(--display);font-weight:600;font-size:16px;
  line-height:1.3;color:var(--ink);
  cursor:pointer;list-style:none;
}
.docs-toc > summary::-webkit-details-marker{display:none;}
.docs-toc > summary::after{
  content:"";flex:none;
  width:8px;height:8px;margin-right:3px;
  border-right:1.5px solid var(--muted);
  border-bottom:1.5px solid var(--muted);
  transform:rotate(45deg) translateY(-2px);
  transition:transform .15s ease;
}
.docs-toc[open] > summary::after{transform:rotate(-135deg) translateY(-2px);}

.docs-toc .docs-nav{padding:2px 16px 16px;border-top:1px solid var(--line);}

/* Thanh điều hướng bên trái trên máy tính. */
.docs-side{display:none;}

@media (min-width:1024px){
  .docs-shell{
    display:grid;
    grid-template-columns:260px minmax(0,760px);
    gap:clamp(36px,5vw,64px);
    align-items:start;
  }
  .docs-side{
    display:block;
    position:sticky;
    top:calc(var(--header-h) + 20px);
    max-height:calc(100vh - var(--header-h) - 40px);
    overflow-y:auto;
    padding-right:6px;
    scrollbar-width:thin;
  }
  .docs-toc{display:none;}
}

/* ---------- Danh sách mục lục ---------- */

.docs-nav__label{
  margin-bottom:10px;
  font-family:var(--mono);font-size:10px;font-weight:500;
  letter-spacing:.16em;text-transform:uppercase;color:var(--muted);
}

.docs-nav__list,
.docs-nav__sub{list-style:none;margin:0;padding:0;}

.docs-nav__l1{
  display:flex;align-items:center;
  min-height:40px;padding:7px 0;
  font-family:var(--display);font-weight:600;
  font-size:14px;line-height:1.35;
  color:var(--ink);text-decoration:none;
  border-bottom:1px solid var(--line);
}
.docs-nav__l1:hover{color:var(--accent);}

.docs-nav__sub{
  margin:2px 0 10px;
  padding-left:12px;
  border-left:1px solid var(--line);
}
.docs-nav__sub a{
  display:flex;align-items:center;
  min-height:34px;padding:5px 0;
  font-size:13.5px;line-height:1.4;
  color:var(--muted);text-decoration:none;
}
.docs-nav__sub a:hover{color:var(--ink);}
.docs-nav__sub a[aria-current="location"]{color:var(--ink);font-weight:600;}
.docs-nav__group.is-current > .docs-nav__l1{color:var(--ink);border-bottom-color:var(--ink);}

/* Bản thu gọn: mục chạm phải từ 44px trở lên. */
.docs-nav--mobile .docs-nav__l1{min-height:48px;font-size:15.5px;}
.docs-nav--mobile .docs-nav__sub a{min-height:44px;font-size:15px;}

/* ---------- Cột nội dung ---------- */

.docs-body{min-width:0;}

.docs-section{
  padding:clamp(26px,4vw,40px) 0;
  border-top:1px solid var(--line);
  scroll-margin-top:12px;
}
.docs-body > .docs-section:first-child{border-top:0;padding-top:0;}

.docs-body h2{
  margin:0 0 10px;
  max-width:24em;
  font-family:var(--display);font-weight:600;
  font-size:clamp(1.5rem,3.1vw,2.05rem);
  line-height:1.16;letter-spacing:-.022em;
  scroll-margin-top:12px;
}

.docs-body h3{
  margin:32px 0 8px;
  max-width:30em;
  font-family:var(--display);font-weight:600;
  font-size:clamp(1.12rem,2vw,1.3rem);
  line-height:1.32;letter-spacing:-.012em;
  scroll-margin-top:12px;
}

.docs-section > h3:first-child,
.docs-section > h2 + h3{margin-top:18px;}

.docs-lede{
  max-width:64ch;
  color:var(--muted);font-size:15.5px;line-height:1.72;
}

.docs-when{
  max-width:66ch;
  margin-top:6px;
  color:var(--muted);font-size:15px;line-height:1.7;
}
.docs-when strong{color:var(--ink);font-weight:600;}

/* ---------- Bước đánh số ---------- */

.docs-steps{
  list-style:none;
  counter-reset:docstep;
  margin:18px 0 0;padding:0;
  max-width:66ch;
}
.docs-steps li{
  counter-increment:docstep;
  position:relative;
  padding:1px 0 15px 42px;
  font-size:16px;line-height:1.68;color:var(--ink);
}
.docs-steps li:last-child{padding-bottom:0;}
.docs-steps li::before{
  content:counter(docstep);
  position:absolute;left:0;top:0;
  width:27px;height:27px;
  display:flex;align-items:center;justify-content:center;
  border:1px solid var(--line-strong);border-radius:50%;
  background:var(--white);color:var(--muted);
  font-family:var(--mono);font-size:11.5px;line-height:1;
}
.docs-steps a{color:var(--ink);text-decoration:underline;text-decoration-color:var(--line-strong);text-underline-offset:2px;}
.docs-steps a:hover{text-decoration-color:var(--ink);}

/* ---------- Ảnh chụp màn hình ---------- */

.shot{margin:24px 0 0;max-width:720px;}

.shot__link{
  position:relative;
  display:block;
  background:#ECECE7;
  border:1px solid var(--line);
  border-radius:5px;
  overflow:hidden;
  box-shadow:0 14px 28px -24px rgba(11,27,63,.6);
  line-height:0;
  transition:border-color .16s ease;
}
.shot__link:hover{border-color:var(--line-strong);}
.shot__link:focus-visible{outline:2px solid var(--accent);outline-offset:3px;}

.shot__link img{
  display:block;width:100%;height:auto;
  background:#ECECE7;
  color:var(--muted);
  font-family:var(--mono);font-size:12px;line-height:1.7;
}

/* Ảnh chưa có hoặc lỗi: giữ đúng khung tỉ lệ, hiện chú thích thay ảnh vỡ.
   Khung xám có sẵn bằng CSS nên không cần JS vẫn thấy khung. */
.shot.is-missing .shot__link img{visibility:hidden;}
.shot.is-missing .shot__link::after{
  content:attr(data-alt);
  position:absolute;inset:0;
  display:flex;align-items:center;justify-content:center;
  padding:24px;
  text-align:center;
  font-family:var(--mono);font-size:12px;line-height:1.75;
  color:var(--muted);
  background:#ECECE7;
}

.shot figcaption{max-width:72ch;}

.shot--strip{max-width:620px;}

/* ---------- Ô Lưu ý / Chưa có ---------- */

.docs-callout{
  margin-top:20px;
  max-width:68ch;
  padding:13px 16px;
  background:#F0F2F8;
  border-left:3px solid var(--accent);
  border-radius:0 3px 3px 0;
  color:var(--muted);font-size:14.5px;line-height:1.7;
}
.docs-callout strong{color:var(--ink);font-weight:600;}
.docs-callout a{color:var(--ink);text-decoration:underline;text-underline-offset:2px;text-decoration-color:var(--line-strong);}
.docs-callout a:hover{text-decoration-color:var(--ink);}

.docs-callout--soon{
  background:transparent;
  border:1px dashed var(--faint);
  border-left:1px dashed var(--faint);
}

.docs-status{margin-top:10px;}

.docs-top{
  display:inline-flex;align-items:center;gap:6px;
  min-height:44px;margin-top:12px;
  font-family:var(--mono);font-size:11px;line-height:1.5;
  color:var(--muted);text-decoration:none;
  border-bottom:1px solid transparent;
}
.docs-top::before{content:"\2191";}
.docs-top:hover{color:var(--ink);border-bottom-color:var(--ink);}

/* ---------- Liên kết neo trên tiêu đề ---------- */

.docs-anchor{
  margin-left:8px;
  font-family:var(--mono);font-size:.62em;font-weight:400;
  color:var(--faint);text-decoration:none;
  opacity:0;
  transition:opacity .15s ease;
  vertical-align:baseline;
}
.docs-body h2:hover .docs-anchor,
.docs-body h3:hover .docs-anchor,
.docs-anchor:focus-visible{opacity:1;}

@media (hover:none){
  .docs-anchor{opacity:.55;}
}

/* ---------- Bảng so sánh ---------- */

.docs-table-wrap{margin-top:18px;max-width:100%;}

.docs-table{
  width:100%;
  border-collapse:collapse;
  font-size:14.5px;line-height:1.6;
}
.docs-table th,
.docs-table td{
  text-align:left;vertical-align:top;
  padding:11px 14px 11px 0;
  border-bottom:1px solid var(--line);
}
.docs-table thead th{
  font-family:var(--mono);font-size:10px;font-weight:500;
  letter-spacing:.1em;text-transform:uppercase;color:var(--muted);
}
.docs-table tbody th{font-weight:600;color:var(--ink);}
.docs-table td{color:var(--muted);}
.docs-table__note{
  display:block;margin-top:5px;
  font-family:var(--mono);font-size:10px;line-height:1.5;color:var(--faint);
}

@media (max-width:599px){
  .docs-table,
  .docs-table tbody,
  .docs-table tr,
  .docs-table th,
  .docs-table td{display:block;}
  .docs-table thead{
    position:absolute;width:1px;height:1px;margin:-1px;padding:0;
    overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;
  }
  .docs-table tr{padding:14px 0;border-bottom:1px solid var(--line);}
  .docs-table th,
  .docs-table td{padding:0;border:0;}
  .docs-table tbody th{font-size:15.5px;}
  .docs-table td{margin-top:6px;font-size:14px;}
  .docs-table td::before{
    content:attr(data-label) ": ";
    font-family:var(--mono);font-size:9.5px;letter-spacing:.05em;
    text-transform:uppercase;color:var(--faint);
  }
  .docs-table td:last-child{margin-top:8px;}
}

/* ---------- Hỏi đáp ---------- */

.docs-section > h3 + p{margin-top:5px;max-width:68ch;color:var(--muted);font-size:15.5px;line-height:1.7;}

/* ---------- Thuật ngữ ---------- */

.docs-terms{margin:18px 0 0;padding:0;display:grid;gap:0;}
.docs-terms > div{padding:13px 0;border-bottom:1px solid var(--line);}
.docs-terms dt{
  font-family:var(--display);font-weight:600;
  font-size:15.5px;line-height:1.4;color:var(--ink);
}
.docs-terms dd{margin:4px 0 0;max-width:66ch;color:var(--muted);font-size:14.5px;line-height:1.65;}

/* ---------- Cần giúp thêm ---------- */

.docs-help{
  margin-top:clamp(10px,2vw,18px);
  padding:clamp(20px,3vw,28px);
  background:var(--white);
  border:1px solid var(--line);
  border-radius:4px;
  scroll-margin-top:12px;
}
.docs-help h2{font-size:clamp(1.3rem,2.4vw,1.6rem);}
.docs-help p{margin-top:8px;max-width:60ch;color:var(--muted);font-size:15.5px;line-height:1.7;}
.docs-help .btn{margin-top:14px;}

/* ---------- Điện thoại hẹp ---------- */

@media (max-width:399px){
  .docs-hero h1{font-size:1.85rem;}
  .docs-cards{grid-template-columns:1fr;}
  .docs-search__row{flex-wrap:wrap;}
  .docs-search__clear{width:100%;}
}

/* ---------- Giảm chuyển động ---------- */

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  .docs-card,
  .docs-anchor,
  .shot__link,
  .docs-toc > summary::after{transition:none;}
  .docs-card:hover{transform:none;}
}
