/* MD Viewer website — Apple product-page style */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --hair: rgba(0, 0, 0, 0.12);
  --blue: #0071e3;
  --link: #0066cc;
  --card: #ffffff;
  --nav: rgba(255, 255, 255, 0.72);
  --orange: #ff9500;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #161617;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --faint: #86868b;
    --hair: rgba(255, 255, 255, 0.16);
    --blue: #0a84ff;
    --link: #2997ff;
    --card: #1c1c1e;
    --nav: rgba(22, 22, 23, 0.72);
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}
body {
  margin: 0;
  font: 17px/1.47 var(--font);
  letter-spacing: -0.022em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
code,
kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  letter-spacing: 0;
}
code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
kbd {
  display: inline-block;
  min-width: 1.8em;
  padding: 2px 7px;
  text-align: center;
  border-radius: 6px;
  border: 0.5px solid var(--hair);
  box-shadow: 0 1px 0 var(--hair);
  background: var(--card);
  font-weight: 600;
}
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--hair);
}
.nav .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 52px;
  padding-right: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}
.nav a.nl {
  font-size: 12px;
  letter-spacing: -0.01em;
  color: var(--ink);
  opacity: 0.8;
}
.nav a.nl:hover {
  opacity: 1;
  text-decoration: none;
}
@media (max-width: 640px) {
  .nav a.nl.opt {
    display: none;
  }
  .nav .wrap {
    gap: 16px;
  }
}

/* ---------------------------------------------------------------- sister apps (top-right) */
.apps {
  position: fixed;
  top: 60px;
  right: 12px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.apps a {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 4px 0 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  background: var(--nav);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.28), 0 0 0 0.5px var(--hair);
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.apps a:hover {
  text-decoration: none;
  color: var(--blue);
  transform: translateY(-1px) scale(1.06);
  background: var(--card);
  box-shadow: 0 10px 22px -8px rgba(0, 113, 227, 0.45), 0 0 0 1.5px var(--blue);
}
.apps a.on {
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.28), 0 0 0 1.5px var(--blue);
}
.apps a.on:hover {
  box-shadow: 0 10px 22px -8px rgba(0, 113, 227, 0.45), 0 0 0 2px var(--blue);
}
.apps img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: block;
}
@media (max-width: 720px) {
  .nav .wrap {
    padding-right: 22px;
  }
}
@media (max-width: 960px) {
  .apps {
    position: static;
    flex-flow: row wrap;
    justify-content: flex-end;
    padding: 8px;
  }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
  background: var(--blue);
  color: #fff;
  transition: filter 0.15s;
}
.btn:hover {
  text-decoration: none;
  filter: brightness(1.08);
}
.btn.sm {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
}
.more {
  font-size: 17px;
}
.more::after {
  content: " ›";
}
.ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 28px;
}

/* ---------------------------------------------------------------- hero */
.hero {
  padding: 80px 0 0;
  text-align: center;
  overflow: hidden;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(90deg, #2f80ff, #8a5cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 80px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.hero .sub {
  max-width: 640px;
  margin: 18px auto 30px;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--muted);
}
.window {
  margin: 56px auto 0;
  max-width: 1080px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 0.5px solid var(--hair);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.3), 0 10px 30px -10px rgba(0, 0, 0, 0.12);
}
.window .chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  background: color-mix(in srgb, var(--bg-alt) 85%, var(--card));
  border-bottom: 0.5px solid var(--hair);
}
.window .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.window .dot:nth-child(1) { background: #ff5f57; }
.window .dot:nth-child(2) { background: #febc2e; }
.window .dot:nth-child(3) { background: #28c840; }
.window .url {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  height: 24px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  font: 12px/24px var(--font);
  color: var(--muted);
  text-align: center;
  letter-spacing: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 10px;
}
.hero-fade {
  height: 80px;
}

/* ---------------------------------------------------------------- sections */
section {
  padding: 100px 0;
}
.alt {
  background: var(--bg-alt);
}
.head {
  text-align: center;
  margin-bottom: 56px;
}
.head h2 {
  margin: 0;
  font-size: clamp(36px, 5.5vw, 56px);
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.head p {
  max-width: 640px;
  margin: 14px auto 0;
  font-size: 21px;
  line-height: 1.4;
  color: var(--muted);
}

/* feature tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tile {
  padding: 32px 28px;
  border-radius: 22px;
  background: var(--card);
}
.alt .tile {
  background: var(--card);
}
.tile .ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  color: #fff;
}
.tile h3 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.tile p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}
@media (max-width: 860px) {
  .tiles {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .tiles {
    grid-template-columns: 1fr;
  }
}

/* dark showcase */
.dark {
  background: #000;
  color: #f5f5f7;
}
.dark .head p {
  color: #a1a1a6;
}
.dark .shot {
  border-radius: 18px;
  overflow: hidden;
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 80px -20px rgba(41, 151, 255, 0.25);
}

/* ---------------------------------------------------------------- guide */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 48px;
  align-items: center;
  padding: 44px 0;
  border-top: 0.5px solid var(--hair);
}
.step:first-child {
  border-top: 0;
  padding-top: 0;
}
.step:nth-child(even) .txt {
  order: 2;
}
/* bước có ảnh rộng: chữ 2 cột phía trên, ảnh full chiều ngang bên dưới */
.step.wide {
  grid-template-columns: 1fr;
  gap: 28px;
}
.step.wide .txt {
  order: 0 !important;
}
.step.wide .legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 32px;
}
@media (max-width: 700px) {
  .step.wide .legend {
    grid-template-columns: 1fr;
  }
}
.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0;
}
.step h3 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.step p,
.step li {
  font-size: 17px;
  color: var(--muted);
}
.step p {
  margin: 0 0 10px;
}
.step ol,
.step ul {
  margin: 8px 0 0;
  padding-left: 1.3em;
}
.step li {
  margin: 6px 0;
}
.step li strong,
.step p strong {
  color: var(--ink);
  font-weight: 600;
}
.note {
  margin-top: 14px !important;
  padding: 12px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--orange) 12%, transparent);
  color: var(--ink) !important;
  font-size: 15px !important;
}
.fig {
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  border: 0.5px solid var(--hair);
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.3);
}
.fig.pad {
  padding: 26px;
  display: flex;
  justify-content: center;
}
.fig.narrow img {
  max-width: 360px;
  margin: 0 auto;
}
.legend {
  list-style: none;
  padding: 0 !important;
}
.legend li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.legend b {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0;
}
@media (max-width: 820px) {
  .step {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .step:nth-child(even) .txt {
    order: 0;
  }
}

/* mock UI (Chrome dialog / toolbar / context menu) */
.mock {
  width: 100%;
  max-width: 420px;
  font: 13px/1.4 var(--font);
  letter-spacing: -0.005em;
  color: var(--ink);
}
.mock-dialog {
  padding: 20px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 0 0 0.5px var(--hair);
}
.mock-dialog .t {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
}
.mock-dialog .t img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.mock-dialog .d {
  margin: 12px 0 18px;
  color: var(--muted);
}
.mock-dialog .b {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.mock-btn {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0.5px solid var(--hair);
  font-weight: 500;
}
.mock-btn.pri {
  background: var(--blue);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 70%, transparent);
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 0 0 0.5px var(--hair);
}
.mock-bar .addr {
  flex: 1;
  height: 28px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  padding: 0 12px;
  line-height: 28px;
  color: var(--muted);
}
.mock-bar .tb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--muted);
}
.mock-bar .tb.hl {
  box-shadow: 0 0 0 3px var(--orange);
}
.mock-bar .tb img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}
.mock-menu {
  margin: 10px 0 0 auto;
  width: 290px;
  padding: 6px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 0 0 0.5px var(--hair);
}
.mock-menu .mi {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
}
.mock-menu .mi img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.mock-menu .mi .pin {
  margin-left: auto;
  color: var(--blue);
}
.mock-menu .mi.sel {
  background: var(--blue);
  color: #fff;
}
.mock-menu .sep {
  height: 0.5px;
  margin: 5px 8px;
  background: var(--hair);
}
.mock-menu .mi.dim {
  color: var(--muted);
}
.mock-link {
  display: inline-block;
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--link);
  text-decoration: underline;
  background: color-mix(in srgb, var(--blue) 12%, transparent);
}

/* shortcuts + FAQ */
.keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.key {
  padding: 26px;
  border-radius: 20px;
  background: var(--card);
  text-align: center;
}
.key kbd {
  font-size: 22px;
  padding: 8px 16px;
  border-radius: 10px;
}
.key p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}
@media (max-width: 640px) {
  .keys {
    grid-template-columns: 1fr;
  }
}
.faq {
  max-width: 760px;
  margin: 0 auto;
}
.faq details {
  border-bottom: 0.5px solid var(--hair);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 36px 22px 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 18px;
  font-size: 26px;
  font-weight: 300;
  color: var(--faint);
  transition: transform 0.2s;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  margin: -6px 0 22px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- footer */
footer {
  padding: 28px 0 40px;
  background: var(--bg-alt);
  color: var(--faint);
  font-size: 12px;
  letter-spacing: -0.01em;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  border-top: 0.5px solid var(--hair);
  padding-top: 18px;
}
footer a {
  color: var(--muted);
}

/* ---------------------------------------------------------------- legal page */
.legal {
  max-width: 740px;
  margin: 0 auto;
  padding: 72px 22px 100px;
}
.legal h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.legal .updated {
  margin: 12px 0 36px;
  color: var(--faint);
  font-size: 14px;
}
.legal .summary {
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--bg-alt);
  font-size: 19px;
  line-height: 1.45;
}
.legal h2 {
  margin: 44px 0 12px;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.legal p,
.legal li {
  color: var(--ink);
}
.legal ul {
  padding-left: 1.3em;
}
.legal li {
  margin: 10px 0;
}
.legal li::marker {
  color: var(--faint);
}

/* mô phỏng trang chi tiết extension của Chrome (bước 3) */
.mock-settings {
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14), 0 0 0 0.5px var(--hair);
  overflow: visible;
  font-size: 14px;
}
.ms-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 0.5px solid var(--hair);
}
.ms-head img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.ms-head span {
  margin-left: auto;
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}
.ms-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 0.5px solid var(--hair);
}
.ms-row:last-child {
  border-bottom: 0;
}
.ms-row.dim {
  color: var(--muted);
}
.ms-row.hl {
  position: relative;
  z-index: 1;
  margin: 0 -6px;
  padding: 0 22px;
  border-radius: 10px;
  border-bottom-color: transparent;
  background: var(--card);
  box-shadow: 0 0 0 3px var(--orange), 0 8px 24px rgba(0, 0, 0, 0.12);
  font-weight: 600;
}
.tg {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
}
.tg::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.tg.on {
  background: #1a73e8;
}
.tg.on::after {
  left: 18px;
}

/* màu riêng */
:root { --blue: #5b4be0; --link: #5b4be0; }
@media (prefers-color-scheme: dark) { :root { --blue: #5b4be0; --link: #a99fff; } }
.eyebrow { background: none; color: var(--link); }

/* lang-bar */
.langbar { display: inline-flex; flex: none; gap: 2px; padding: 3px; border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.2; }
.langbar a { color: var(--ink); text-decoration: none; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.langbar a:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); text-decoration: none; }
.langbar a[aria-current] { background: var(--ink); color: var(--bg); }
.langbar a:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.nav .btn, .nav .nl { white-space: nowrap; }
@media (max-width: 1260px) { .apps { position: static; flex-flow: row wrap; justify-content: flex-end; padding: 8px; } }
@media (max-width: 760px) {
  .nav .wrap { flex-wrap: wrap; height: auto; min-height: 52px; gap: 8px 14px; padding-top: 8px; padding-bottom: 8px; }
  .nav .wrap .langbar, nav .wrap .langbar { order: 9; }
}

.fig.icon { min-height: 190px; align-items: center; background: var(--bg-alt); box-shadow: none; }
.fig.icon img { width: 84px; height: 84px; border-radius: 20px; }
.soon { width: 100%; margin: 0; color: var(--muted); font-size: 15px; }
.keys.few { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); max-width: 760px; margin: 0 auto; }
