/* Trang chủ theo frame Figma "N1 · Trang chủ twinread.cloud — Desktop" (file Twinread Y khoa); trang nội dung theo N2–N5
   (mobile: N2m), trang 404 theo N6. Dùng cho index.html, các trang nội dung và 404.html;
   privacy.html / terms.html vẫn dùng style.css. Token như extension (components/base.css): chỉ giao diện sáng. */
:root {
  --pri: #0f766e;
  --pri-hover: #115e59;
  --soft: #ccfbf1;
  --vi: #f0fdfa;
  --fg: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #f8fafc;
  --grad: linear-gradient(135deg, #14a394, #0f5f59);
  --wrap: 1200px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: #fff;
  color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--pri); }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pri); }

/* Nút */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 24px; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s;
}
.btn-lg { padding: 14px 24px; font-size: 17px; }
.btn-primary { background: var(--pri); color: #fff; }
.btn-primary:hover { background: var(--pri-hover); }
.btn-white { background: #fff; color: var(--pri); }
.btn-white:hover { background: var(--vi); }
.btn-ghost { background: rgb(255 255 255 / .12); color: #fff; border-color: rgb(255 255 255 / .4); }
.btn-ghost:hover { background: rgb(255 255 255 / .2); }
.btn-outline { background: #fff; color: var(--pri); border-color: var(--pri); }
.btn-outline:hover { background: var(--vi); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--pri); outline-offset: 2px; }
.hero .btn:focus-visible, .cta .btn:focus-visible { outline-color: #fff; }

/* Thanh trên */
.nav { position: sticky; top: 0; z-index: 10; background: rgb(255 255 255 / .96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 700; font-size: 20px; }
.brand img { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 36px; }
.nav-links a, .nav-en, .nav-locale { color: var(--body); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-en, .nav-locale { color: var(--muted); white-space: nowrap; }
.nav-links a:hover, .nav-en:hover, .nav-locale:hover { color: var(--pri); }
.nav-right { display: flex; align-items: center; gap: 24px; }

/* Hero */
.hero { background: var(--grad); color: #fff; text-align: center; padding-top: 80px; overflow: hidden; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; background: rgb(255 255 255 / .15); border: 1px solid rgb(255 255 255 / .25); }
.pill .ic { width: 16px; height: 16px; }
.hero h1 { font-size: 60px; line-height: 70px; font-weight: 700; max-width: 980px; letter-spacing: -.01em; }
.hero .lead { font-size: 20px; line-height: 32px; color: var(--soft); max-width: 780px; }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.micro { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: 14px; color: #99f6e4; list-style: none; margin: 0; padding: 0; }
.micro li + li::before { content: "·"; margin-right: 16px; }
.hero-shot { width: 100%; max-width: 1216px; margin-top: 24px; aspect-ratio: 1216 / 620; overflow: hidden; }

/* Dải cam kết */
.trust { border-bottom: 1px solid var(--line); }
.trust ul { list-style: none; margin: 0 auto; padding: 28px 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.trust li { display: flex; align-items: center; gap: 12px; }
.trust b { display: block; font-size: 15px; font-weight: 600; line-height: 22px; }
.trust span { display: block; font-size: 14px; color: var(--muted); line-height: 20px; }
.tile { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--vi); color: var(--pri); }
.tile-sm { width: 40px; height: 40px; }

/* Khung mục */
.section { padding: 96px 0; }
.section-alt { background: var(--card); }
.head { text-align: center; max-width: 900px; margin: 0 auto 48px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.head h2 { font-size: 40px; line-height: 50px; font-weight: 700; letter-spacing: -.01em; }
.head p { font-size: 18px; line-height: 28px; color: var(--muted); max-width: 760px; }

/* Tính năng */
.feature { display: grid; grid-template-columns: 1fr 620px; gap: 80px; align-items: center; margin-top: 96px; }
.feature.flip { grid-template-columns: 620px 1fr; }
.feature.flip .visual { order: -1; }
.feature-text { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.feature-text h3 { font-size: 32px; line-height: 40px; font-weight: 700; }
.feature-text > p { font-size: 17px; line-height: 28px; color: var(--body); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; color: var(--body); line-height: 25px; }
.checks .ic { width: 18px; height: 18px; stroke-width: 2.4; color: var(--pri); margin-top: 3px; }
.visual { display: grid; place-items: center; min-height: 420px; padding: 24px; border-radius: 24px; background: linear-gradient(135deg, var(--vi), var(--soft)); }
.visual img { width: 100%; max-width: 572px; }
.more { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 96px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.card h3 { font-size: 17px; line-height: 24px; font-weight: 600; }
.card p { font-size: 15px; line-height: 23px; color: var(--muted); }

/* Các bước */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps .card { padding: 32px; gap: 14px; border-radius: 20px; counter-increment: step; }
.steps .card::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--pri); color: #fff; font-weight: 700; font-size: 18px; }
.steps h3 { font-size: 20px; line-height: 28px; }
.steps p { font-size: 16px; line-height: 25px; }

/* Giá */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 520px)); justify-content: center; gap: 24px; align-items: start; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.plan.featured { border: 2px solid var(--pri); box-shadow: 0 12px 32px rgb(15 23 42 / .08); }
.plan-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.plan-title h3 { font-size: 22px; line-height: 30px; }
.badge { font-size: 12px; font-weight: 600; line-height: 16px; color: var(--pri); background: var(--soft); border-radius: 999px; padding: 4px 10px; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.price b { font-size: 40px; line-height: 48px; font-weight: 700; }
.price span, .plan-note { color: var(--muted); }
.plan-note { font-size: 15px; line-height: 22px; }
.plan hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 0; }
.topup { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin: 40px auto 0; padding: 14px 20px; border-radius: 12px; background: var(--vi); color: var(--body); font-size: 15px; line-height: 22px; }
.topup .ic { color: var(--pri); }

/* Link tới trang nội dung, thẻ "Xem thêm" (trang con, 404) */
.more-link { font-weight: 600; font-size: 15px; line-height: 22px; text-decoration: none; }
.more-link:hover { text-decoration: underline; }
.related { margin-top: 0; }
.related-3 { grid-template-columns: repeat(3, 1fr); }
a.card { color: inherit; text-decoration: none; transition: border-color .15s; }
a.card:hover { border-color: var(--pri); }

/* Hero trang con: breadcrumb, không có ảnh lớn */
.hero-sub { padding-bottom: 72px; }
.crumb a { color: #fff; text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb [aria-current] { color: var(--soft); }

/* Câu hỏi */
.faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; align-items: start; }
.faq .card { padding: 28px; gap: 8px; }
.faq h3 { font-size: 18px; line-height: 26px; }
.faq p { font-size: 16px; line-height: 26px; color: var(--body); }

/* CTA cuối */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 56px; border-radius: 28px; background: var(--grad); color: #fff; }
.cta h2 { font-size: 36px; line-height: 44px; font-weight: 700; }
.cta p { margin-top: 12px; font-size: 18px; line-height: 28px; color: var(--soft); }
.cta-btns { display: flex; flex-wrap: wrap; gap: 12px; flex: none; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 56px 0; }
.footer-top { display: grid; grid-template-columns: 1.2fr .8fr .9fr 1.3fr; gap: 40px; }
.footer h2 { font-size: 13px; font-weight: 700; line-height: 18px; text-transform: uppercase; margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-top a { color: var(--muted); text-decoration: none; font-size: 15px; }
.footer-top a:hover { color: var(--pri); }
.footer-top p { color: var(--muted); font-size: 15px; line-height: 22px; margin-top: 12px; }
.footer .brand { font-size: 18px; }
.footer .brand img { width: 28px; height: 28px; }
#en p { font-size: 14px; line-height: 21px; margin: 0 0 10px; }
#en a.en-cta { color: var(--pri); font-weight: 600; font-size: 14px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* Màn nhỏ */
@media (max-width: 1100px) {
  .feature, .feature.flip { grid-template-columns: 1fr 1fr; gap: 48px; }
  .visual { min-height: 0; }
  .trust ul, .more { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .nav-edge { display: none; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero { padding-top: 56px; }
  .hero-sub { padding-bottom: 56px; }
  .hero h1 { font-size: 40px; line-height: 48px; }
  .hero .lead { font-size: 18px; line-height: 28px; }
  .section { padding: 64px 0; }
  .head h2 { font-size: 30px; line-height: 38px; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; margin-top: 64px; }
  .feature.flip .visual { order: 0; }
  .feature-text h3 { font-size: 26px; line-height: 34px; }
  .more { margin-top: 64px; }
  .steps, .plans, .faq, .related-3 { grid-template-columns: 1fr; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .cta { flex-direction: column; align-items: flex-start; padding: 36px 28px; }
  .cta h2 { font-size: 28px; line-height: 36px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .nav .wrap, .nav-right { gap: 8px; }
  .nav-en { display: none; }
  .nav .btn { padding: 8px 12px; font-size: 14px; white-space: normal; text-align: center; }
  .nav .btn .ic { display: none; }
  .hero h1 { font-size: 32px; line-height: 40px; }
  .hero .lead { font-size: 17px; line-height: 27px; }
  .ctas { width: 100%; flex-direction: column; }
  .ctas .btn { width: 100%; white-space: normal; }
  .micro li + li::before { content: none; }
  .trust ul, .more, .footer-top { grid-template-columns: 1fr; }
  .trust ul { padding: 24px 16px; }
  .plan { padding: 28px 22px; }
  .plan .btn { white-space: normal; text-align: center; }
  .price b { font-size: 34px; line-height: 42px; }
  .topup { align-items: flex-start; }
  .cta-btns { width: 100%; flex-direction: column; }
  .cta .btn { width: 100%; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, a.card { transition: none; } }

/* Hộp "gửi link về máy tính" (src.js chèn khi mở bằng điện thoại) */
.send-desktop { margin: 12px 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--vi); font-size: 15px; color: var(--body); }
.send-desktop p { margin-bottom: 10px; }
.send-desktop .btn { width: 100%; }

/* Ảnh dọc nhỏ (popup) trong khối .visual: không phóng to quá cỡ gốc. */
.visual img.visual-narrow { width: auto; max-width: min(100%, 359px); }
/* Ảnh dọc (side panel, danh sách kết quả): giới hạn bề rộng để khối không quá cao. */
.visual img.visual-portrait { width: auto; max-width: min(100%, 400px); }
