/* ============ Tokens ============ */
:root {
  color-scheme: light;
  --indigo-950: #0d1130;
  --indigo-900: #141a3c;
  --indigo-800: #1d2558;
  --indigo-600: #3443a0;
  --indigo-400: #6f7fe0;
  --madder: #c0392b;
  --madder-soft: #fbe9e5;
  --gold: #d9a441;
  --gold-soft: #fbf1dc;
  --jade: #23806b;
  --jade-soft: #e2f3ee;
  --amber: #b7791f;
  --amber-soft: #fdf0d5;
  --bg: #f6f2ea;
  --paper: #fffdf8;
  --ink: #1b1f33;
  --ink-2: #444a63;
  --muted: #747a91;
  --line: #e6dfd1;
  --line-2: #efe9dd;
  --shadow-sm: 0 1px 2px rgba(20, 26, 60, .06), 0 2px 8px rgba(20, 26, 60, .05);
  --shadow: 0 2px 4px rgba(20, 26, 60, .05), 0 12px 32px -8px rgba(20, 26, 60, .16);
  --shadow-lg: 0 30px 60px -20px rgba(20, 26, 60, .35);
  --r: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Hoa văn thổ cẩm H'Mông */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.2'%3E%3Cpath d='M28 6 50 28 28 50 6 28Z'/%3E%3Cpath d='M28 16 40 28 28 40 16 28Z'/%3E%3Cpath d='M24 28h8M28 24v8'/%3E%3Cpath d='M0 0l6 6M56 0l-6 6M0 56l6-6M56 56l-6-6'/%3E%3C/g%3E%3C/svg%3E");
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16.5px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  font-variant-numeric: lining-nums;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
b, h1, h2, h3, h4, .part-num, .ring-txt b { font-variant-numeric: lining-nums; }
p { margin: 0; }
svg { width: 1em; height: 1em; flex: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 860px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
::selection { background: var(--gold); color: var(--indigo-950); }

/* ============ Progress & topbar ============ */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100;
  background: linear-gradient(90deg, var(--gold), var(--madder));
  transform-origin: 0 50%; transform: scaleX(var(--sp, 0));
}
.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 16px; color: #fff; max-width: 1160px; margin: 0 auto;
}
@media (min-width: 720px) { .topbar { padding: 22px 28px; } }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: .01em; }
.brand b { font-weight: 700; color: var(--gold); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; position: relative;
  background: linear-gradient(135deg, var(--madder), var(--gold));
  box-shadow: 0 6px 18px -4px rgba(217, 164, 65, .6);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 8px; border: 2px solid #fff; transform: rotate(45deg); border-radius: 2px;
}
.topbar-sub { font-size: 14px; opacity: .65; display: none; }
@media (min-width: 640px) { .topbar-sub { display: block; } }

/* ============ Hero ============ */
.hero, .phead, .ahead {
  position: relative; color: #fff; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 10% 0%, var(--indigo-800), var(--indigo-950) 70%);
}
.hero { padding: 130px 0 120px; }
.phead { padding: 110px 0 70px; }
.ahead { padding: 104px 0 56px; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-pattern {
  position: absolute; inset: -56px; background-image: var(--pattern); background-size: 56px;
  opacity: .07; animation: drift 60s linear infinite;
  mask-image: radial-gradient(80% 80% at 70% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 80% at 70% 30%, #000 20%, transparent 75%);
}
@keyframes drift { to { transform: translate(56px, 56px); } }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: float 14s var(--ease) infinite alternate; }
.o1 { width: 420px; height: 420px; background: #3a4bd1; top: -140px; right: -80px; }
.o2 { width: 340px; height: 340px; background: var(--madder); bottom: -160px; left: -60px; opacity: .45; animation-delay: -5s; }
.o3 { width: 260px; height: 260px; background: var(--gold); top: 30%; right: 25%; opacity: .25; animation-delay: -9s; }
@keyframes float { to { transform: translate(-40px, 40px) scale(1.12); } }
.hero-wave {
  position: absolute; bottom: -1px; left: 0; right: 0; height: 60px; background: var(--bg);
  clip-path: polygon(0 60%, 12% 40%, 25% 62%, 38% 38%, 50% 60%, 62% 36%, 75% 60%, 88% 40%, 100% 62%, 100% 100%, 0 100%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ""; width: 28px; height: 1.5px; background: currentColor; }
.hero h1 { font: 700 clamp(40px, 10.5vw, 88px)/1.18 var(--serif); margin: 18px 0 22px; letter-spacing: -.01em; }
.hero h1 em, .ahead h1 em { font-style: italic; background: linear-gradient(90deg, var(--gold), #f3c77a 40%, var(--madder)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 620px; font-size: clamp(16.5px, 2.4vw, 19px); line-height: 1.75; color: rgba(255, 255, 255, .78); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-stats > div {
  min-width: 120px; padding: 14px 20px; border-radius: 16px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(10px);
}
.hero-stats b { display: block; font: 700 30px/1.1 var(--serif); }
.hero-stats span { font-size: 14px; color: rgba(255, 255, 255, .65); }

.anim { opacity: 0; transform: translateY(22px); animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--d) * 110ms + 80ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ============ Section titles ============ */
.sec-title { margin: 64px 0 26px; }
.kicker { font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--madder); }
.sec-title h2 { font: 700 clamp(26px, 6vw, 40px)/1.3 var(--serif); margin-top: 6px; }

/* ============ People grid ============ */
.people { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.person {
  position: relative; display: block; padding: 24px; border-radius: 22px; background: var(--paper);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
  transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(var(--ty, 0));
}
.person:hover { --ty: -6px; box-shadow: var(--shadow-lg); border-color: transparent; }
.person-glow {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(217, 164, 65, .18), transparent 45%);
}
.person:hover .person-glow { opacity: 1; }
.person::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(135deg, var(--gold), var(--madder), var(--indigo-600));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .4s;
}
.person:hover::before { opacity: 1; }
.pc-head { display: flex; align-items: center; gap: 14px; }
.pc-head h3 { font: 700 25px/1.3 var(--serif); }
.pc-go {
  margin-left: auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); color: var(--indigo-800); font-size: 18px; transition: all .4s var(--ease);
}
.person:hover .pc-go { background: var(--indigo-900); color: #fff; transform: rotate(-45deg); }
.avatar {
  --s: 54px; width: var(--s); height: var(--s); border-radius: 16px; flex: none; display: inline-grid; place-items: center;
  font: 700 calc(var(--s) * .44)/1 var(--serif); color: #fff;
  background: linear-gradient(135deg, hsl(var(--h1) 70% 52%), hsl(var(--h2) 65% 38%));
  box-shadow: 0 8px 20px -8px hsl(var(--h2) 65% 38% / .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.avatar.xl { --s: 84px; border-radius: 24px; }
.avatar.sm { --s: 26px; border-radius: 8px; margin-right: 8px; font-size: 14px; }
.dept { display: inline-block; margin-top: 6px; padding: 3px 11px; border-radius: 99px; font-size: 14px; font-weight: 600; }
.dept-nh { background: var(--madder-soft); color: var(--madder); }
.dept-lt { background: #e5e8fb; color: var(--indigo-600); }
.phead .dept-nh, .phead .dept-lt { background: rgba(255, 255, 255, .12); color: #fff; }
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 22px 0 16px; padding: 14px 0; border-block: 1px dashed var(--line); }
.pc-stats div { text-align: center; }
.pc-stats div + div { border-left: 1px solid var(--line-2); }
.pc-stats b { display: block; font: 700 22px/1.2 var(--serif); color: var(--indigo-900); }
.pc-stats span { font-size: 14px; color: var(--muted); }
.pc-prog { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.pc-prog span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--jade), #4fc3a1); transition: width 1.2s var(--ease); }
.pc-latest { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.pc-latest em { margin-left: auto; font-style: normal; font-size: 14px; color: var(--muted); }
.pc-latest.muted { color: var(--muted); font-weight: 400; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.done { background: var(--jade); } .dot.wait { background: var(--amber); } .dot.todo { background: var(--indigo-400); animation: ping 2s infinite; } .dot.late { background: var(--madder); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(111, 127, 224, .6); } 80%, 100% { box-shadow: 0 0 0 8px rgba(111, 127, 224, 0); } }

/* ============ How it works ============ */
.how { display: grid; gap: 14px; margin: 56px 0 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.how-step { display: flex; gap: 14px; padding: 18px; border-radius: 16px; background: rgba(255, 255, 255, .55); border: 1px solid var(--line); }
.how-step > span {
  width: 36px; height: 36px; border-radius: 11px; flex: none; display: grid; place-items: center;
  font: 700 17px var(--serif); color: var(--gold); background: var(--indigo-900);
}
.how-step b { font-size: 15px; }
.how-step p { font-size: 14px; color: var(--muted); }

/* ============ Person page ============ */
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, .7); transition: color .2s, gap .3s var(--ease); }
.back:hover { color: #fff; gap: 12px; }
.phead-row { display: flex; align-items: center; gap: 20px; margin-top: 26px; }
.phead h1 { font: 700 clamp(38px, 9vw, 64px)/1.2 var(--serif); margin: 4px 0 2px; }
.assigns { display: grid; gap: 14px; }
.assign {
  display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--r);
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.assign:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold); }
.as-icon {
  width: 52px; height: 52px; border-radius: 15px; flex: none; display: grid; place-items: center; font-size: 26px;
  color: var(--gold); background: linear-gradient(135deg, var(--indigo-800), var(--indigo-950));
  transition: transform .5s var(--ease);
}
.assign:hover .as-icon { transform: rotate(-8deg) scale(1.06); }
.as-main { flex: 1; min-width: 0; }
.as-main h3 { font: 700 21px/1.35 var(--serif); }
.as-main p { font-size: 14.5px; color: var(--muted); margin-top: 2px; }
.as-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.as-meta span + span::before { content: "•"; margin-right: 14px; color: var(--line); }
.as-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.as-score { font: 700 26px/1 var(--serif); color: var(--jade); }
.as-score small { font-size: 14px; color: var(--muted); }
@media (max-width: 560px) {
  .assign { flex-wrap: wrap; }
  .as-side { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; padding-left: 68px; }
}
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.done { background: var(--jade-soft); color: var(--jade); }
.status.wait { background: var(--amber-soft); color: var(--amber); }
.status.todo { background: #e8ebfb; color: var(--indigo-600); }
.status.late { background: var(--madder-soft); color: var(--madder); }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--r); }

/* ============ Assignment header ============ */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14.5px; color: rgba(255, 255, 255, .6); margin-bottom: 26px; }
.crumbs a:hover { color: #fff; }
.crumbs b { color: #fff; font-weight: 500; }
.ahead h1 { font: 700 clamp(32px, 7.5vw, 52px)/1.25 var(--serif); margin: 14px 0 10px; max-width: 820px; }
.ameta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 30px; max-width: 820px; }
.ameta > div { padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.ameta > div > span { display: block; font-size: 13.5px; color: rgba(255, 255, 255, .55); text-transform: uppercase; letter-spacing: .08em; }
.ameta b { font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px; border-radius: 12px; border: 0;
  font-weight: 600; font-size: 14.5px; color: var(--indigo-950);
  background: linear-gradient(135deg, #f3c77a, var(--gold)); box-shadow: 0 8px 24px -8px rgba(217, 164, 65, .7);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(217, 164, 65, .8); }
.btn svg { font-size: 18px; }
.btn.ghost { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .18); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, .16); }
main .btn.ghost { background: var(--paper); color: var(--indigo-900); border-color: var(--line); }
main .btn.ghost:hover { border-color: var(--gold); }

/* ============ Review ============ */
.review { margin-top: 30px; padding-top: 54px; position: relative; }
.review::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 14px; background-image: var(--pattern); background-size: 14px; filter: invert(1); opacity: .12; }
.review-empty { text-align: center; padding: 44px 24px; border-radius: 22px; border: 2px dashed var(--line); background: rgba(255, 255, 255, .45); }
.review-empty h3 { font: 700 24px var(--serif); margin: 18px 0 8px; }
.review-empty p { max-width: 500px; margin: 0 auto; color: var(--muted); }
.re-art { display: inline-flex; gap: 8px; }
.re-art span { width: 12px; height: 12px; border-radius: 3px; transform: rotate(45deg); background: var(--gold); animation: bob 1.6s var(--ease) infinite; }
.re-art span:nth-child(2) { background: var(--madder); animation-delay: .2s; }
.re-art span:nth-child(3) { background: var(--indigo-600); animation-delay: .4s; }
@keyframes bob { 50% { transform: rotate(45deg) translate(-6px, -6px); } }

.rv-hero {
  display: flex; gap: 28px; align-items: center; padding: 28px; border-radius: 24px; color: #fff; position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, var(--indigo-800), var(--indigo-950)); box-shadow: var(--shadow-lg);
}
.rv-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--pattern); background-size: 48px; opacity: .06; }
@media (max-width: 600px) { .rv-hero { flex-direction: column; text-align: center; } }
.ring { position: relative; width: 140px; height: 140px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: rgba(255, 255, 255, .12); }
.ring-fg { stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.8s var(--ease) .2s; }
.ring.in .ring-fg { stroke-dashoffset: calc(100 - var(--p)); }
.ring.good .ring-fg { stroke: #4fc3a1; } .ring.mid .ring-fg { stroke: var(--gold); } .ring.low .ring-fg { stroke: #ef6f5e; }
.ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-txt b { font: 700 40px/1 var(--serif); }
.ring-txt span { font-size: 14px; color: rgba(255, 255, 255, .6); }
.rv-sum h3 { font: 700 26px var(--serif); }
.rv-date { font-size: 14px; color: rgba(255, 255, 255, .55); margin: 2px 0 10px; }
.rv-sum > p:last-child { color: rgba(255, 255, 255, .86); font-size: 16px; white-space: pre-line; }
.badge-xl { display: inline-block; margin-bottom: 10px; padding: 4px 14px; border-radius: 99px; font-size: 14px; font-weight: 700; color: var(--indigo-950); background: linear-gradient(135deg, #f3c77a, var(--gold)); }
.rv-h { display: flex; align-items: center; gap: 10px; font: 700 21px var(--serif); margin: 38px 0 14px; }
.rv-h .cnt { font: 700 12.5px var(--sans); padding: 2px 9px; border-radius: 99px; background: var(--madder-soft); color: var(--madder); }
.pgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.pcard { padding: 18px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.pc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pc-top h4 { font-size: 15px; font-weight: 600; }
.p-score { font: 700 22px var(--serif); color: var(--indigo-900); }
.p-score small { font-size: 14px; color: var(--muted); }
.pbar { height: 6px; border-radius: 99px; background: var(--line-2); margin: 10px 0 12px; overflow: hidden; }
.pbar span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 1.4s var(--ease) .2s; }
.pcard.in .pbar span { width: var(--w); }
.pbar.good span { background: linear-gradient(90deg, var(--jade), #4fc3a1); }
.pbar.mid span { background: linear-gradient(90deg, var(--amber), var(--gold)); }
.pbar.low span { background: linear-gradient(90deg, var(--madder), #ef6f5e); }
.pcard p { font-size: 14.5px; color: var(--ink-2); white-space: pre-line; }
.fixes { display: grid; gap: 10px; }
.fix { display: flex; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.fix-where { flex: none; min-width: 74px; font-size: 14px; font-weight: 700; color: var(--indigo-600); text-transform: uppercase; letter-spacing: .05em; padding-top: 3px; }
.fix-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.fix-main p { font-size: 15.5px; }
.fix-wrong span, .fix-right span { display: inline-block; width: 82px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.fix-wrong del { color: var(--madder); text-decoration-thickness: 1.5px; background: var(--madder-soft); padding: 1px 6px; border-radius: 6px; }
.fix-right ins { color: var(--jade); text-decoration: none; font-weight: 600; background: var(--jade-soft); padding: 1px 6px; border-radius: 6px; }
.fix-why { font-size: 14px !important; color: var(--muted); padding-left: 10px; border-left: 2px solid var(--line); }
@media (max-width: 560px) { .fix { flex-direction: column; gap: 6px; } }
.gb { display: grid; gap: 12px; margin-top: 30px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.gb-col { padding: 20px 22px; border-radius: 18px; }
.gb-col h4 { font: 700 19px var(--serif); margin-bottom: 10px; }
.gb-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.gb-col li { position: relative; padding-left: 26px; font-size: 15px; }
.gb-col li::before { position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.gb-good { background: var(--jade-soft); } .gb-good h4 { color: var(--jade); } .gb-good li::before { content: "✓"; background: var(--jade); }
.gb-bad { background: var(--amber-soft); } .gb-bad h4 { color: var(--amber); } .gb-bad li::before { content: "!"; background: var(--amber); }
.advice { position: relative; margin: 30px 0 0; padding: 26px 26px 26px 70px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.advice svg { position: absolute; left: 24px; top: 24px; font-size: 30px; color: var(--gold); }
.advice p { font: italic 600 18px/1.6 var(--serif); color: var(--indigo-900); white-space: pre-line; }
.note { margin-top: 30px; padding: 16px 20px; border-radius: 14px; background: var(--madder-soft); color: var(--madder); font-weight: 500; white-space: pre-line; }
.next-nav { margin: 50px 0 10px; text-align: center; }

/* ============ Footer ============ */
.foot { position: relative; margin-top: 80px; padding: 46px 16px 40px; text-align: center; color: rgba(255, 255, 255, .7); background: var(--indigo-950); font-size: 14px; overflow: hidden; }
.foot-pattern { position: absolute; top: 0; left: 0; right: 0; height: 10px; background: repeating-linear-gradient(90deg, var(--madder) 0 20px, var(--gold) 20px 40px, var(--indigo-600) 40px 60px, var(--jade) 60px 80px); }
.foot-sub { font-size: 14px; opacity: .6; margin-top: 4px; }
.notfound { text-align: center; padding: 160px 16px 40px; }
.notfound h1 { font: 700 120px var(--serif); color: var(--indigo-800); }
.notfound p { margin-bottom: 20px; color: var(--muted); }
body:has(.notfound) .topbar { color: var(--ink); }

/* ============ Reveal ============ */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--rd, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; animation-delay: 0s !important; scroll-behavior: auto !important; }
  .anim { opacity: 1; transform: none; }
}

/* Số liệu: dùng font sans cho chữ số thẳng hàng */
.hero-stats b, .pc-stats b, .ring-txt b, .p-score, .as-score { font-family: var(--sans); letter-spacing: -.02em; }

@media (min-width: 720px) { body { font-size: 17px; } }

/* ============ Khối nội dung trang bài ============ */
.block { padding-top: 48px; }
.part-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.part-num {
  width: 56px; height: 56px; border-radius: 16px; flex: none; display: grid; place-items: center;
  font: 700 26px/1 var(--sans); color: var(--gold); background: linear-gradient(135deg, var(--indigo-800), var(--indigo-950));
  box-shadow: var(--shadow);
}
.part-num.rv { color: #fff; background: linear-gradient(135deg, var(--gold), var(--madder)); }
.part-kicker { font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--madder); }
.part-head h3 { font: 700 clamp(23px, 5.5vw, 30px)/1.3 var(--serif); }
.part-sub { font-size: 15px; color: var(--muted); margin-top: 2px; }

/* Danh sách file tải về */
.files { display: grid; gap: 12px; }
.file {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; min-height: 76px; border-radius: 18px;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
  -webkit-tap-highlight-color: transparent;
}
.file:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold); }
.file:active { transform: scale(.98); }
.f-icon {
  width: 50px; height: 50px; border-radius: 14px; flex: none; display: grid; place-items: center; font-size: 26px; color: #fff;
}
.file.doc .f-icon { background: linear-gradient(135deg, #3b6fd8, #1f45a3); box-shadow: 0 8px 18px -8px #1f45a3; }
.file.audio .f-icon { background: linear-gradient(135deg, #e0644f, var(--madder)); box-shadow: 0 8px 18px -8px var(--madder); }
.f-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.f-main b { font-weight: 600; font-size: 17px; line-height: 1.4; }
.f-main small { font-size: 14px; color: var(--muted); }
.f-dl {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 21px;
  color: var(--indigo-900); background: var(--bg); transition: background .3s, color .3s, transform .4s var(--ease);
}
.file:hover .f-dl { background: var(--indigo-900); color: var(--gold); }
.file.got .f-dl { background: var(--jade); color: #fff; animation: pop .5s var(--ease); }
@keyframes pop { 40% { transform: scale(1.25); } }
.zip-btn { margin-top: 16px; width: 100%; justify-content: center; padding: 15px 20px; font-size: 16px; }
@media (min-width: 640px) { .zip-btn { width: auto; } }

/* Ô số bài trong danh sách */
.as-icon { flex-direction: column; gap: 0; color: #fff; }
.as-icon b { font: 700 22px/1 var(--sans); color: var(--gold); }
.as-icon small { font-size: 12px; opacity: .75; margin-top: 2px; }
.as-meta span + span::before { content: none; }
.as-meta span { padding: 2px 10px; border-radius: 8px; background: var(--bg); }

/* Điện thoại: thu gọn khoảng cách, giữ vùng bấm lớn */
@media (max-width: 560px) {
  .hero { padding: 104px 0 96px; }
  .phead { padding: 96px 0 56px; }
  .ahead { padding: 92px 0 44px; }
  .hero-stats > div { min-width: 0; flex: 1 1 calc(50% - 12px); padding: 12px 16px; }
  .ameta { grid-template-columns: 1fr 1fr; }
  .person { padding: 20px; }
  .sec-title { margin: 44px 0 20px; }
  .rv-hero { padding: 24px 20px; }
  .advice { padding: 22px 20px 22px 58px; }
  .advice svg { left: 18px; top: 22px; font-size: 26px; }
  .advice p { font-size: 17px; }
  .file { padding: 14px; gap: 14px; }
}
/* Tiêu đề có số bài: dùng font sans để số "1" không giống chữ "ı" */
.ahead h1 { font-family: var(--sans); font-weight: 700; letter-spacing: -.02em; }
.as-main h3 { font-family: var(--sans); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.fix-heard span { display: inline-block; width: 82px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.fix-heard em { font-style: normal; color: var(--amber); background: var(--amber-soft); padding: 1px 6px; border-radius: 6px; }

/* Đáp án hẹn giờ */
.file.key .f-icon { background: linear-gradient(135deg, #2fa384, var(--jade)); box-shadow: 0 8px 18px -8px var(--jade); }
.file.locked { background: transparent; border-style: dashed; box-shadow: none; opacity: .85; }
.file.locked:hover { transform: none; box-shadow: none; border-color: var(--line); }
.file.locked .f-icon { background: var(--line-2); color: var(--muted); }

/* Hướng dẫn nộp bài */
.guide { list-style: none; counter-reset: g; margin: 0; padding: 6px 20px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.guide li { counter-increment: g; position: relative; padding: 14px 0 14px 46px; font-size: 16px; }
.guide li + li { border-top: 1px dashed var(--line-2); }
.guide li::before {
  content: counter(g); position: absolute; left: 0; top: 13px; width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--gold); background: var(--indigo-900);
}
.guide b { font-weight: 600; color: var(--indigo-900); }

/* Nhận xét: lần sau nộp bài */
.next-time { margin-top: 12px; padding: 20px 22px; border-radius: 18px; background: #eef0fb; }
.next-time h4 { font: 700 19px var(--serif); color: var(--indigo-600); margin-bottom: 10px; }
.next-time ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.next-time li { position: relative; padding-left: 26px; font-size: 15.5px; }
.next-time li::before { content: "→"; position: absolute; left: 0; top: 0; font-weight: 700; color: var(--indigo-600); }
