/* =========================================================
   phanmemnho.vn — Giao diện "Hồ sơ & văn phòng phẩm"
   Dùng cho mọi trang (kèm trang.css ở các trang con).
   Một giao diện duy nhất: giấy kem
   ========================================================= */

:root {
  color-scheme: light;
  /* Giấy & mực */
  --paper: #faf7f0;
  --paper-2: #f3eee2;
  --card: #ffffff;
  --card-2: #f7f3ea;
  --ink: #1b2a4a;
  --ink-2: #4a5570;
  --ink-3: #6f7891;
  --line: #e6dfcf;
  --line-2: #d3c8b0;
  --rule: rgba(47, 93, 158, 0.075);      /* kẻ ô li */
  --ruled: rgba(47, 93, 158, 0.16);      /* kẻ dòng thẻ mục lục */

  /* Màu danh mục (tab bìa hồ sơ) */
  --office: #2f5d9e;
  --edu: #d9771f;
  --edu-ink: #a4560f;

  /* Bút & dấu */
  --red: #c0392b;
  --green: #2e7d4f;
  --amber: #a86a0c;
  --plum: #9a3b6c;
  --hl: #f6d77a;                          /* bút dạ quang */

  --btn-bg: #1b2a4a;
  --btn-fg: #faf7f0;
  --btn-edge: #0e1830;
  --ruler: #f3d98a;
  --ruler-ink: rgba(27, 42, 74, 0.55);
  --foot: #1b2a4a;
  --foot-ink: #e9e4d6;
  --foot-ink-2: #a9b0c2;

  --shadow: 0 1px 0 rgba(27, 42, 74, 0.04), 0 12px 28px -18px rgba(27, 42, 74, 0.35);
  --shadow-lg: 0 2px 0 rgba(27, 42, 74, 0.04), 0 30px 60px -36px rgba(27, 42, 74, 0.45);

  --serif: "Lora", "Noto Serif", Georgia, serif;
  --hand: "Patrick Hand", "Comic Sans MS", cursive;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 10px;
  --container: 1180px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}


*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.65;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
::selection { background: var(--hl); color: var(--ink); }
:focus-visible { outline: 2px solid var(--office); outline-offset: 3px; border-radius: 6px; }
svg:not([fill]) { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }

/* Bút dạ quang & bút đỏ */
.hl { background: linear-gradient(transparent 56%, var(--hl) 56%, var(--hl) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .08em; }
.redpen { color: var(--red); text-decoration: underline wavy var(--red); text-decoration-thickness: 2px; text-underline-offset: .16em; text-decoration-skip-ink: none; }
.hand { font-family: var(--hand); font-weight: 400; }

/* Nhãn hồ sơ (thay eyebrow) */
.label {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 4px 12px 4px 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line-2); border-radius: 4px;
}
.label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-2); }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px;
  border-radius: 8px; font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 3px 0 var(--btn-edge); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--btn-edge); }
.btn--primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--btn-edge); }
.btn--ghost { background: var(--card); border: 1.5px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--ink-3); }
.btn--sm { padding: 9px 14px; font-size: 14px; }
.btn--lg { padding: 15px 26px; font-size: 16px; }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 8px;
  background: var(--card); border: 1px solid var(--line-2); transition: border-color .2s, transform .2s var(--ease);
}
.icon-btn:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h); display: flex; align-items: center;
  background: var(--paper); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 20px -18px rgba(27, 42, 74, .5); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header__actions { display: flex; align-items: center; gap: 8px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.logo__mark { width: 32px; height: 32px; flex: none; }
.logo__mark svg { width: 100%; height: 100%; }
/* Logo màu phẳng (Dung_chung/logo_icon/xuat/phanmemnho_vn): chữ xám đậm, "nho" mỗi chữ một màu, sao vàng */
.logo__text { color: #474c58; }
.logo__text b { font-weight: 800; }
.logo__text b span:nth-child(1) { color: #8b7bff; }
.logo__text b span:nth-child(2) { color: #4fd1ff; }
.logo__text b span:nth-child(3) { color: #ff5fb0; }
.logo__star { fill: #f5b400; }
.footer .logo__star { fill: #ffcd00; }
.logo__text i { font-style: normal; font-weight: 500; }
.logo__star { position: relative; display: inline-block; width: .357em; height: .357em; margin: 0 -.027em 0 -.116em; vertical-align: -.034em; }

#catBtn svg { width: 16px; height: 16px; flex: none; }
.logo__text { white-space: nowrap; }
@media (max-width: 400px) { #catBtn svg { display: none; } }

/* ---------- Mở đầu: thực trạng ---------- */
.pitch { position: relative; padding: calc(clamp(24px, 3.5vw, 42px) - 24px) 0 clamp(56px, 7vw, 96px); isolation: isolate; }
.pitch::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent);
}
/* ---------- Bảng thông báo: chồng giấy note, gió thổi bay tờ trên để hiện tờ dưới ---------- */
.promo-stack { position: relative; display: grid; width: fit-content; max-width: 100%; margin: 22px auto 30px; }
.promo {
  --note: #fff1a8; --note-fold: #ecd77a; --a: var(--red); --rot: -.4deg;
  grid-area: 1 / 1; position: relative; z-index: 1; display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 14px 18px;
  padding: 14px 26px 14px 20px;
  /* Giấy note, góc phải dưới gấp mép */
  background: linear-gradient(315deg, transparent 13px, var(--note) 13px); border-radius: 2px;
  /* box-shadow thay cho filter: filter + xoay làm trình duyệt vẽ cả khối thành ảnh nên chữ bị nhoè */
  box-shadow: 0 1px 0 rgba(27, 42, 74, .06), 0 10px 18px -8px rgba(27, 42, 74, .28); transform: rotate(var(--rot));
}
.promo--blue { --note: #dcebff; --note-fold: #b7d0f0; --a: var(--office); --rot: .8deg; }
/* Có JS: chỉ tờ đang hiện mới thấy; tờ kế tiếp lộ ra bên dưới lúc gió thổi */
.promo-stack.is-ready .promo { visibility: hidden; }
.promo-stack.is-ready .promo.is-on { visibility: visible; z-index: 3; }
.promo-stack.is-ready .promo.is-under { visibility: visible; z-index: 2; }
.promo.is-blown { animation: noteBlow 1.5s cubic-bezier(.5, 0, .75, .4) forwards; pointer-events: none; }
@keyframes noteBlow {
  0%   { transform: rotate(var(--rot)); }
  10%  { transform: rotate(calc(var(--rot) + 5deg)) skewX(-4deg); }
  20%  { transform: rotate(calc(var(--rot) - 3deg)) skewX(3deg); }
  32%  { transform: translate(-14px, -8px) rotate(calc(var(--rot) - 9deg)) skewX(5deg); opacity: 1; }
  /* bay về hướng 10 giờ: sang trái, chếch lên ~30° */
  100% { transform: translate(-420px, -240px) rotate(calc(var(--rot) - 80deg)) scale(.5); opacity: 0; }
}
.promo.is-landing { animation: noteLand .45s var(--ease); }
@keyframes noteLand { from { transform: rotate(calc(var(--rot) - 2deg)) scale(1.02); } }

/* Vệt gió */
/* lật ngang + xoay để gió thổi từ hướng 4 giờ về hướng 10 giờ, cùng hướng tờ giấy bay */
.wind { position: absolute; z-index: 4; left: -60px; top: 50%; width: calc(100% + 160px); height: 120px; margin-top: -60px; overflow: visible; pointer-events: none; opacity: 0; transform: rotate(30deg) scaleX(-1); }
.wind path { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 90 400; stroke-dashoffset: 90; opacity: .55; }
.promo-stack.is-windy .wind { opacity: 1; }
.promo-stack.is-windy .wind path { animation: windGust 1.1s ease-in forwards; }
.promo-stack.is-windy .wind path:nth-child(2) { animation-delay: .12s; }
.promo-stack.is-windy .wind path:nth-child(3) { animation-delay: .24s; }
@keyframes windGust { 0% { stroke-dashoffset: 90; opacity: 0; } 20% { opacity: .6; } 100% { stroke-dashoffset: -420; opacity: 0; } }

.promo::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 18px; height: 18px;
  background: linear-gradient(315deg, transparent 50%, var(--note-fold) 50%); border-radius: 0 0 0 3px;
}
.promo__tape { position: absolute; top: -10px; width: 74px; height: 20px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(27, 42, 74, .06); box-shadow: 0 1px 2px rgba(27, 42, 74, .1); }
.promo__tape--l { left: 22px; transform: rotate(-6deg); }
.promo__tape--r { right: 22px; transform: rotate(5deg); }
.promo__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--a); background: var(--card); border: 1.5px solid color-mix(in srgb, var(--a) 35%, transparent); }
.promo__icon svg { width: 26px; height: 26px; }
.promo__text { min-width: 0; }
.promo__note { display: block; font-family: var(--hand); font-size: 18px; line-height: 1.2; color: var(--a); }
.promo__title { font-family: var(--serif); font-size: clamp(18px, 2.1vw, 24px); font-weight: 700; line-height: 1.3; }
.promo__title b { color: var(--a); }
.promo__title a:hover b { text-decoration: underline; text-underline-offset: .15em; }
.promo__stamp {
  display: inline-flex; flex-direction: column; align-items: center; padding: 4px 14px 6px; line-height: 1;
  font-family: var(--serif); font-size: 34px; font-weight: 700; color: var(--red);
  border: 3px double var(--red); border-radius: 8px; transform: rotate(-7deg);
}
.promo__stamp small { margin-bottom: 3px; font-family: var(--sans); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.promo__stamp--ok { font-size: 21px; white-space: nowrap; color: var(--green); border-color: var(--green); }
@media (prefers-reduced-motion: reduce) {
  .promo.is-blown { animation: noteFade .4s forwards; }
  .promo.is-landing { animation: none; }
  .wind { display: none; }
  @keyframes noteFade { to { opacity: 0; } }
}

/* Màn rộng: chồng note dán ở góc trái, cạnh tiêu đề */
@media (min-width: 1200px) {
  .pitch > .container { position: relative; }
  .promo-stack { position: absolute; left: 0; top: 14px; z-index: 5; width: 204px; margin: 0; }
  .promo {
    --rot: -3deg;
    grid-template-columns: 1fr; justify-items: center; gap: 8px; padding: 20px 14px 16px; text-align: center;
  }
  .promo--blue { --rot: 2deg; }
  .promo__tape--l { left: 50%; top: -11px; transform: translateX(-50%) rotate(-4deg); }
  .promo__tape--r { display: none; }
  .promo__icon { width: 36px; height: 36px; }
  .promo__icon svg { width: 20px; height: 20px; }
  .promo__note { font-size: 16px; }
  .promo__title { font-size: 17px; }
  .promo__title b { display: block; white-space: nowrap; }
  .promo__stamp { margin-top: 2px; font-size: 24px; padding: 3px 10px 5px; }
  .promo__stamp small { font-size: 10px; }
  .promo__stamp--ok { font-size: 17px; }
  /* chừa chỗ cho tờ note để không đè lên thẻ "Bản quyền" */
  .pitch .pitch__intro { padding-top: 120px; margin-bottom: 72px; }
  .pitch .pitch__note { top: -48px; }
}

.pitch__intro { max-width: 820px; margin: 0 auto 48px; text-align: center; }
.pitch__note { position: relative; top: 0; display: inline-block; margin-bottom: 4px; font-family: var(--hand); font-size: 19px; color: var(--red); transform: rotate(-2deg); }
.pitch__lead { margin: 0 0 30px; text-align: center; }
.marker__line { display: inline-block; }

/* Chữ viết tay: bút lông trên giấy */
.ink-filters { position: absolute; width: 0; height: 0; overflow: hidden; }
.marker {
  font-family: "Pangolin", var(--hand); font-weight: 400; color: var(--ink);
  -webkit-text-stroke: .025em currentColor; paint-order: stroke fill;
  text-shadow: 0 0 .6px currentColor; filter: url(#f-marker);
}
.marker__em { color: var(--red); }
.pitch__title.marker { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.15; letter-spacing: 0; transform: rotate(-1deg); }
.pitch__sub.marker { margin-top: 14px; font-size: clamp(21px, 2.6vw, 32px); line-height: 1.3; color: var(--ink-2); -webkit-text-stroke: .015em currentColor; transform: rotate(-.6deg); }

.pains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pain {
  --c: var(--red);
  position: relative; display: flex; flex-direction: column; padding: 22px 20px 18px; margin-top: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 2px 10px 10px 10px; box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.pain:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: var(--shadow-lg); }
/* Tiêu đề, khung minh hoạ, mô tả của 3 thẻ thẳng hàng, khung minh hoạ cao bằng nhau */
@supports (grid-template-rows: subgrid) {
  .pains .pain { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
}
.pain--2 { --c: var(--amber); }
.pain--3 { --c: var(--plum); }
.pain__tab {
  position: absolute; left: -1px; top: -24px; padding: 3px 12px 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--card); background: var(--c); border-radius: 6px 6px 0 0;
}
.pain__clip { position: absolute; right: 16px; top: -12px; width: 22px; height: 37px; color: var(--ink-3); transform: rotate(8deg); }
.pain__clip svg { width: 100%; height: 100%; stroke-width: 1.6; }
.pain h3 { font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.3; }
.pain h3 b { color: var(--c); }
.pain > p { margin-top: 12px; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.pain__hl { color: var(--c); font-weight: 700; }
.pain__visual {
  margin-top: 12px; padding: 12px; min-height: 116px; display: flex; flex-direction: column; justify-content: center; gap: 8px;
  background: var(--paper-2); border-radius: 6px;
}

/* 01: công văn có dấu đỏ */
.notice { position: relative; padding: 10px 12px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 3px; font-size: 12.5px; }
.notice__head { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.notice b { display: block; margin-top: 7px; line-height: 1.35; }
.notice small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 11.5px; }
.stamp {
  display: inline-block; padding: 3px 10px; font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.3;
  color: var(--red); border: 2.5px double var(--red); border-radius: 6px; transform: rotate(-8deg); opacity: .9;
}
.notice { padding-bottom: 32px; }
.notice .stamp { position: absolute; right: 10px; bottom: 7px; font-size: 11.5px; padding: 2px 8px; }

/* 02: hoá đơn răng cưa */
.receipt {
  --z: 7px;
  padding: 8px 12px calc(10px + var(--z)); background: var(--card); font-size: 12.5px; color: var(--ink-2);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--z)) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--z)) 100%;
}
.receipt div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.receipt div + div { border-top: 1px dashed var(--line-2); }
.receipt .total { flex-wrap: wrap; align-items: baseline; margin-top: 4px; padding-top: 8px; color: var(--ink); font-weight: 700; }
.receipt .total b { margin-left: auto; white-space: nowrap; color: var(--amber); font-family: var(--serif); font-size: 16px; }

/* 03: dữ liệu rò ra ngoài */
.leak { display: flex; align-items: center; gap: 8px; }
.leak__file, .leak__cloud { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; flex: none; font-size: 11.5px; color: var(--ink-2); text-align: center; }
.leak__file svg, .leak__cloud svg { width: 36px; height: 36px; padding: 8px; border-radius: 8px; background: var(--card); border: 1px solid var(--line-2); }
.leak__cloud svg { color: var(--plum); border-color: color-mix(in srgb, var(--plum) 45%, transparent); }
.leak__line { position: relative; flex: 1; height: 2px; margin-bottom: 22px; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--plum) 55%, transparent) 0 6px, transparent 6px 11px); }
.leak__line i { position: absolute; top: 50%; left: 0; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--plum); animation: leakDot 2.6s linear infinite; }
.leak__line i:nth-child(2) { animation-delay: .87s; }
.leak__line i:nth-child(3) { animation-delay: 1.73s; }
@keyframes leakDot { from { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } to { left: calc(100% - 7px); opacity: 0; } }
.leak__tag { align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 4px; color: var(--plum); border: 1px dashed color-mix(in srgb, var(--plum) 55%, transparent); }
.leak__tag svg { width: 14px; height: 14px; }

/* Cầu nối viết tay */
.bridge { display: flex; flex-direction: column; align-items: center; margin: 28px 0 8px; color: var(--red); }
.bridge__text { font-family: var(--hand); font-size: 28px; line-height: 1; transform: rotate(-2deg); }
.bridge svg { width: 54px; height: 64px; margin-top: 4px; stroke-width: 2.2; }

/* ---------- Giải pháp: bìa hồ sơ ---------- */
.folder { position: relative; margin-top: 44px; }
.folder__tabs { display: flex; gap: 6px; padding-left: 0; }
.folder__tab {
  --c: var(--ink);
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px 12px; margin-bottom: -2px;
  font-size: 14px; font-weight: 700; color: #fff; background: var(--c); border-radius: 10px 10px 0 0;
  transition: transform .2s var(--ease);
}
.folder__tab:hover { transform: translateY(-3px); }
.folder__tab svg { width: 16px; height: 16px; }
.folder__tab--main { --c: var(--card); color: var(--ink); border: 1px solid var(--line); border-bottom: 0; z-index: 1; margin-bottom: -1px; }
.folder__tab--main:hover { transform: none; }
.folder__tab--office { --c: #2f5d9e; }
.folder__tab--edu { --c: #d9771f; }
.folder__body {
  position: relative; padding: clamp(24px, 4vw, 48px); background: var(--card);
  border: 1px solid var(--line); border-radius: 0 14px 14px 14px; box-shadow: var(--shadow-lg);
}
.solution__top { display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.solution__brand.logo { display: flex; width: fit-content; font-size: clamp(20px, 2.2vw, 26px); gap: .45em; }
.solution__brand .logo__mark { width: 1.5em; height: 1.5em; }
.solution h2 { margin-top: 14px; font-family: var(--serif); font-size: clamp(30px, 3.8vw, 46px); font-weight: 700; letter-spacing: -.01em; }
.solution__lead { margin-top: 16px; font-size: 17px; color: var(--ink-2); }
.solution__lead em { font-style: normal; color: var(--ink); font-weight: 600; }
.solution__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 28px; }
.solution__aside { font-family: var(--hand); font-size: 19px; color: var(--ink-3); }

/* Thẻ mục lục */
.perks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.perk {
  --c: var(--office);
  position: relative; padding: 18px 18px 16px; background-color: var(--card-2); border: 1px solid var(--line); border-radius: 4px;
  background-image: linear-gradient(var(--red), var(--red)), repeating-linear-gradient(transparent 0 25px, var(--ruled) 25px 26px);
  background-size: 100% 2px, 100% 100%; background-position: 0 44px, 0 46px; background-repeat: no-repeat, repeat;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.perk:nth-child(odd) { transform: rotate(-.6deg); }
.perk:nth-child(even) { transform: rotate(.5deg); }
.perk:hover { transform: translateY(-3px) rotate(0); box-shadow: var(--shadow); }
.perk__head { display: flex; align-items: center; gap: 10px; height: 28px; margin-bottom: 18px; }
.perk__head svg { width: 22px; height: 22px; color: var(--c); flex: none; }
.perk__big { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1; color: var(--green); }
.perk h3 { font-size: 16px; font-weight: 700; }
.perk p { margin-top: 2px; font-size: 13.5px; line-height: 26px; color: var(--ink-2); }
.perk p b { color: var(--ink); font-weight: 600; }

/* Bảng chấm điểm */
.grade { margin-top: clamp(32px, 4vw, 48px); }
.grade__cap { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.grade__cap h3 { font-family: var(--serif); font-size: 21px; }
.grade__cap span { font-family: var(--hand); font-size: 18px; color: var(--ink-3); }
.vs { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 6px; background: var(--card); }
.vs table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.vs th, .vs td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.vs th + th, .vs td, .vs th + td { border-left: 1px solid var(--line); }
.vs tbody tr:last-child > * { border-bottom: 0; }
.vs thead th { font-size: 13px; font-weight: 600; color: var(--ink-3); background: var(--paper-2); vertical-align: bottom; }
.vs tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; background: var(--paper-2); }
.vs td { color: var(--ink-2); }
.vs td::before { display: inline-block; width: 18px; margin-right: 6px; font-family: var(--hand); font-size: 20px; line-height: 0; vertical-align: -2px; }
.vs td.no::before { content: "✗"; color: var(--red); }
.vs td.mid::before { content: "~"; color: var(--amber); }
.vs td.yes::before { content: "✓"; color: var(--green); font-weight: 700; }
.vs .vs__us { background: color-mix(in srgb, var(--hl) 30%, var(--card)); }
.vs thead .vs__us { color: var(--ink); font-weight: 700; background: color-mix(in srgb, var(--hl) 45%, var(--card)); }
.vs thead .vs__us .stamp { margin-left: 10px; font-size: 10.5px; padding: 1px 7px; vertical-align: 2px; color: var(--green); border-color: var(--green); }
.vs td.vs__us { color: var(--ink); font-weight: 600; }

/* ---------- Thước kẻ (thay dải chữ chạy) ---------- */
.ruler {
  position: relative; padding: 26px 0 16px; background-color: var(--ruler);
  background-image: repeating-linear-gradient(90deg, var(--ruler-ink) 0 1px, transparent 1px 10px), repeating-linear-gradient(90deg, var(--ruler-ink) 0 1.5px, transparent 1.5px 50px);
  background-size: 100% 9px, 100% 16px; background-repeat: repeat-x;
  border-block: 1px solid color-mix(in srgb, var(--ruler-ink) 50%, transparent);
}
/* Chữ chạy ngang như web cũ; thước (vạch chia) đứng yên, chữ trượt qua. Rê chuột thì dừng. */
.ruler { overflow: hidden; }
.ruler__track { display: flex; width: max-content; animation: rulerRun 40s linear infinite; }
.ruler:hover .ruler__track { animation-play-state: paused; }
@keyframes rulerRun { to { transform: translateX(-50%); } }
.ruler ul { display: flex; margin: 0; padding: 0; list-style: none; }
.ruler li { display: inline-flex; align-items: center; gap: 8px; padding: 0 26px; font-size: 14.5px; font-weight: 600; color: #1b2a4a; white-space: nowrap; }
.ruler li svg { width: 16px; height: 16px; color: var(--green); stroke-width: 2.6; }
@media (prefers-reduced-motion: reduce) {
  .ruler__track { width: auto; justify-content: center; animation: none; }
  .ruler ul { flex-wrap: wrap; justify-content: center; row-gap: 6px; }
  .ruler [data-copy] { display: none; }
}

/* ---------- Section ---------- */
.section { position: relative; padding: clamp(72px, 10vw, 120px) 0; }
.section--grid { background-color: var(--paper-2); background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 24px 24px; }
.section__head { max-width: 820px; margin: 0 auto 52px; text-align: center; }
.section__head h2 { font-family: var(--serif); font-size: clamp(30px, 4.2vw, 48px); font-weight: 700; letter-spacing: -.01em; }
.section__head p { margin-top: 14px; color: var(--ink-2); font-size: 17px; }
.section__head--left { text-align: left; margin: 0; }
.section__head--left .btn { margin-top: 26px; }

/* Lý do chọn */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile { position: relative; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.tile h3 { font-family: var(--serif); font-size: 21px; font-weight: 700; }
.tile p { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; }
.tile__icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 20px; border-radius: 8px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.tile__icon svg { width: 23px; height: 23px; }
.tile--stat { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.score { position: relative; display: inline-block; padding: 6px 22px 2px; font-family: var(--serif); font-size: clamp(56px, 6.5vw, 76px); font-weight: 700; line-height: 1; color: var(--red); }
.score svg { position: absolute; inset: -10px -14px -6px; width: calc(100% + 28px); height: calc(100% + 16px); color: var(--red); stroke-width: 2.4; overflow: visible; }
.score svg path { vector-effect: non-scaling-stroke; }
.tile--stat p { margin-top: 18px; }

/* Đánh giá: giấy nhớ */
.notes { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px 22px; padding: 10px 4px; }
.notes .note { flex: 0 1 270px; }
.note {
  --bgc: #fff3b0;
  position: relative; padding: 30px 22px 20px; background: var(--bgc); color: #2a2f3a; border-radius: 2px 2px 14px 2px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 14px 22px -16px rgba(40, 30, 0, .45);
  transform: rotate(var(--r, -1deg)); transition: transform .3s var(--ease);
}
.note:hover { transform: rotate(0) translateY(-4px); }
.note::before { content: ""; position: absolute; top: -11px; left: 50%; width: 84px; height: 22px; margin-left: -42px; background: rgba(214, 204, 176, .6); transform: rotate(-3deg); }
.note:nth-child(5n+2) { --bgc: #dcebfb; --r: 1.2deg; }
.note:nth-child(5n+3) { --bgc: #fbe0e6; --r: -.6deg; }
.note:nth-child(5n+4) { --bgc: #dff3dc; --r: 1.6deg; }
.note:nth-child(5n+5) { --bgc: #ffe4c7; --r: -1.4deg; }
.note .stars { color: #c98300; font-size: 13px; letter-spacing: 2px; }
.note p { margin-top: 6px; font-family: var(--hand); font-size: 19px; line-height: 1.35; }
.note__who { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.note__who span { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; font-weight: 700; font-size: 14px; color: #fff; background: var(--a, #2f5d9e); }
.note__who b { display: block; font-size: 14px; line-height: 1.3; }
.note__who small { font-size: 12.5px; color: #5d6370; }

/* Hỏi đáp: mục lục */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.faq { counter-reset: q; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 24px; }
.faq__item { counter-increment: q; border-bottom: 1px dashed var(--line-2); }
.faq__item:last-child { border-bottom: 0; }
.faq__item summary { position: relative; display: grid; grid-template-columns: 44px 1fr 20px; align-items: baseline; gap: 4px; padding: 18px 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before { content: counter(q, decimal-leading-zero); font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 18px; color: var(--office); }
.faq__item summary::after { content: "+"; justify-self: end; font-size: 22px; font-weight: 400; line-height: 1; color: var(--ink-3); transition: transform .3s var(--ease); }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:hover { color: var(--office); }
.faq__body { padding: 0 0 20px 48px; color: var(--ink-2); font-size: 15px; }
.faq__body a { color: var(--office); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Chân trang: bìa sổ ---------- */
.footer { position: relative; margin-top: 0; padding-top: 72px; background: var(--foot); color: var(--foot-ink); }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: repeating-linear-gradient(90deg, #2f5d9e 0 50%, #d9771f 50% 100%); background-size: 100% 100%; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr 1fr; gap: 40px; }
.footer .logo__text { color: #c9cbd6; }
.footer__brand p { margin-top: 16px; max-width: 300px; color: var(--foot-ink-2); font-size: 14.5px; }
.footer__studio { width: 160px; height: auto; margin-top: 22px; }
.footer h4 { margin-bottom: 16px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--foot-ink); }
.footer__grid > div:not(.footer__brand) { display: flex; flex-direction: column; gap: 9px; }
.footer__grid a:not(.logo) { width: fit-content; font-size: 14.5px; color: var(--foot-ink-2); transition: color .2s; }
.footer__grid a:not(.logo):hover { color: var(--foot-ink); text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding: 22px 0 26px; border-top: 1px solid rgba(233, 228, 214, .15); font-size: 13.5px; color: var(--foot-ink-2); }
.footer__bottom a:hover { color: var(--foot-ink); }

/* ---------- Tìm kiếm nhanh ---------- */
.spot { position: fixed; inset: 0; z-index: 170; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(27, 42, 74, .35); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.spot.is-open { opacity: 1; visibility: visible; }
.spot__box { width: min(620px, 100%); overflow: hidden; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); transform: translateY(-10px); transition: transform .3s var(--ease); }
.spot.is-open .spot__box { transform: none; }
.spot__input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.spot__input svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.spot__input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; }
.spot__input input::placeholder { color: var(--ink-3); }
kbd { padding: 2px 7px; border-radius: 5px; font: 600 11px/1.4 var(--sans); color: var(--ink-3); border: 1px solid var(--line-2); border-bottom-width: 2px; }
.spot__list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.spot__item { --c: var(--office); display: flex; align-items: center; gap: 14px; padding: 9px 10px; border-radius: 8px; border-left: 3px solid transparent; }
.spot__item[data-cat="edu"] { --c: var(--edu); }
.spot__item:hover, .spot__item.is-focus { background: var(--paper-2); border-left-color: var(--c); }
.spot__ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 8px; overflow: hidden; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.spot__ico img { width: 100%; height: 100%; object-fit: cover; }
.spot__ico svg { width: 20px; height: 20px; }
.spot__item b { display: block; font-size: 14.5px; }
.spot__item small { color: var(--ink-3); font-size: 12.5px; }
.spot__item em { margin-left: auto; font-style: normal; font-weight: 600; font-size: 14px; white-space: nowrap; }
.spot__item em.is-free { color: var(--green); }
.spot__none { padding: 28px; text-align: center; color: var(--ink-3); }

/* ---------- Hiện dần khi cuộn (chỉ khi có JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .leak__line i { animation: none; opacity: 0; }
  html { scroll-behavior: auto; }
}


/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .pains { grid-template-columns: 1fr 1fr; }
  .pains .pain:last-child { grid-column: 1 / -1; }
  .solution__top { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .tile--stat { grid-column: 1 / -1; }
  .faq-wrap { grid-template-columns: 1fr; gap: 32px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .header__inner { gap: 6px; }
  .header__brand { gap: 8px; }
  .header__actions { gap: 6px; }
  .logo { font-size: 16px; gap: 7px; }
  .logo__mark { width: 28px; height: 28px; }
  .icon-btn { width: 36px; height: 36px; }
  .cat-long { display: none; }
  #catBtn { padding: 8px 11px; gap: 6px; }
  .pains, .perks { grid-template-columns: 1fr; }
  .pains .pain:last-child { grid-column: auto; }
  .pain { padding: 22px 16px 16px; }
  .promo-stack { width: auto; margin: 18px 0 26px; }
  .promo { --rot: 0deg; grid-template-columns: auto 1fr auto; gap: 12px 14px; padding: 16px; }
  .promo__icon { width: 40px; height: 40px; }
  .promo__icon svg { width: 22px; height: 22px; }
  .promo__stamp { font-size: 26px; padding: 3px 10px 5px; }
  .promo__stamp--ok { font-size: 15px; }
  .promo__title { font-size: 17px; }
  .promo__title b { display: block; }
  .pitch__intro { margin-bottom: 40px; }
  .pitch__title.marker { text-wrap: balance; }
  .marker__line { display: inline; }
  .folder__tab { padding: 8px 12px 10px; font-size: 13px; }
  .folder__tab--main span { display: none; }
  .solution__cta .btn { width: 100%; }
  .bento { grid-template-columns: 1fr; }
  .faq { padding: 4px 16px; }
  .faq__item summary { grid-template-columns: 36px 1fr 18px; }
  .faq__body { padding-left: 40px; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .ruler li { padding: 0 18px; font-size: 13.5px; }
}
