/* cleardi.com: every page (scripts/web/site.py's shared layout). The home page is mockup v0.2 (the design canvas boards
   "Website · Trang chủ (vi)" and "· điện thoại", owner OK 2026-11-19): one responsive page, the phone layout below
   720 px. No script: the phone menu is a <details>, the screenshot tabs are radio buttons. */

/* Be Vietnam Pro (SIL OFL 1.1; docs/licenses/be-vietnam-pro-OFL.txt), self-hosted: no third-party request. */
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/BeVietnamPro-Regular.woff2") format("woff2"); }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/BeVietnamPro-Medium.woff2") format("woff2"); }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/BeVietnamPro-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/BeVietnamPro-Bold.woff2") format("woff2"); }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/BeVietnamPro-ExtraBold.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #15131f;
  --muted: #3a3850;
  --subtle: #55556a;
  --accent: #4a3aff;       /* links and accent text */
  --accent-hover: #2f22c9;
  --brand: #4a3aff;        /* fills with white text (chips, the call to action): the same in both modes */
  --tint: #f2f0ff;
  --tint-ink: #2a2160;
  --section: #f8f7ff;
  --card: #ffffff;
  --rule: #ecebf3;
  --rule-strong: #e4e3ec;
  --danger: #d13438;
  --dark-button: #15131f;
  --dark-button-ink: #ffffff;
  --header: rgba(255, 255, 255, 0.94);
  --mark: #fff3b0;
  --shadow: rgba(40, 30, 120, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0c14;
    --fg: #f2f1f8;
    --muted: #c9c7da;
    --subtle: #aeacc0;
    --accent: #a59dff;
    --accent-hover: #c4bfff;
    --tint: #1d1a33;
    --tint-ink: #dcd7ff;
    --section: #14131e;
    --card: #1b1a27;
    --rule: #2a2937;
    --rule-strong: #34333f;
    --danger: #ff7b7f;
    --dark-button: #f2f1f8;
    --dark-button-ink: #15131f;
    --header: rgba(13, 12, 20, 0.94);
    --mark: #5a4a00;
    --shadow: rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.55 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 0.15em; overflow-wrap: anywhere; }
a:hover { color: var(--accent-hover); }
a:focus-visible, summary:focus-visible, .tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
img { max-width: 100%; }
[id] { scroll-margin-top: 80px; }

/* Wide / narrow: the header's two forms, the screenshot tabs, the bottom bar. */
.narrow { display: none; }
@media (max-width: 719.98px) {
  .wide { display: none !important; }
  .narrow { display: revert; }
}

/* --- The header -------------------------------------------------------------------------------------------------- */
.top-in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.brand:hover { color: var(--fg); }
.mark { display: block; width: 48px; height: 48px; border-radius: 12px; }
.mark.small { width: 40px; height: 40px; border-radius: 10px; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 30px; font-size: 18px; font-weight: 500; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav a.lang, .compact a.lang { color: var(--accent); font-weight: 600; }
.compact { align-items: center; gap: 6px; }
.compact a.lang { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: 15px; text-decoration: none; }
.menu { position: relative; }
.menu summary {
  list-style: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu summary::-webkit-details-marker { display: none; }
.menu-icon { stroke-width: 2.2; }
.menu nav {
  position: absolute;
  right: 0;
  top: 52px;
  min-width: 15rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: 0 16px 40px var(--shadow);
  padding: 6px;
}
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 10px; color: var(--fg); font-weight: 500; text-decoration: none; }
.menu li a:hover { background: var(--tint); }

@media (max-width: 719.98px) {
  .top { position: sticky; top: 0; z-index: 5; background: var(--header); border-bottom: 1px solid var(--rule); }
  .top-in { padding: 6px 16px; }
  .brand { font-size: 21px; gap: 10px; }
  .brand .mark { width: 36px; height: 36px; border-radius: 9px; }
  .compact { display: flex; }
}

/* --- The home page ----------------------------------------------------------------------------------------------- */
main.home > section { max-width: 1120px; margin: 0 auto; padding: 72px 24px; }
.home h2 { font-size: 38px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.intro { display: flex; flex-direction: column; gap: 10px; max-width: 40rem; margin-bottom: 36px; }
.intro p { font-size: 18px; color: var(--muted); }

.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
main.home > .hero { padding-top: 32px; }
.hero-text, .hero-art { flex: 1 1 420px; min-width: 0; }
.hero-text { display: flex; flex-direction: column; gap: 20px; }
.badge { align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--tint-ink); background: var(--tint); padding: 6px 12px; border-radius: 999px; }
.hero h1 { font-size: 56px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.lead { font-size: 19px; color: var(--muted); max-width: 34rem; }
.hero-store { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.hint { font-size: 14px; color: var(--subtle); }
.store { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 20px; border-radius: 14px; font-size: 16px; font-weight: 600; text-decoration: none; }
.store.dark { background: var(--dark-button); color: var(--dark-button-ink); }
.store.light { background: #ffffff; color: #15131f; }
a.store:hover { opacity: 0.9; }

.hero-art { border-radius: 36px; background: var(--tint); overflow: hidden; display: flex; flex-direction: column; }
.stack { position: relative; height: 396px; }
.stack .side, .stack .front { position: absolute; left: 50%; object-fit: cover; }
.stack .side { top: 48px; width: 190px; height: 254px; border-radius: 22px; opacity: 0.55; filter: saturate(0.6); }
.stack .left { margin-left: -210px; transform: rotate(-9deg); }
.stack .right { margin-left: 20px; transform: rotate(9deg); }
.stack .front { top: 28px; width: 214px; height: 290px; margin-left: -107px; border-radius: 26px; border: 5px solid var(--brand); box-shadow: 0 18px 40px rgba(40, 30, 120, 0.28); }
.chip { background: var(--brand); color: #ffffff; font-weight: 600; border-radius: 999px; }
.chip.big { position: absolute; left: 50%; top: 300px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; font-size: 16px; padding: 7px 14px 7px 10px; }
.chip-icon { stroke-width: 3; }
.band { min-height: 64px; display: flex; align-items: center; justify-content: center; padding: 8px 16px; text-align: center; font-size: 15px; font-weight: 600; color: var(--tint-ink); }

/* The screenshots: four phones side by side; on a phone, one at a time behind a segmented control (radios). */
main.home > .screens { padding-top: 24px; padding-bottom: 80px; }
.shot-r { display: none; }
.phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; align-items: start; }
.shot { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.phone { display: block; width: 100%; max-width: 250px; height: auto; aspect-ratio: 600 / 1304; object-fit: cover; border-radius: 34px; border: 6px solid #15131f; box-shadow: 0 24px 48px var(--shadow); }
.shot figcaption { font-size: 17px; font-weight: 600; text-align: center; }

/* How it works. */
main.home > .how { max-width: none; background: var(--section); }
.how > .intro, .steps { max-width: 1072px; margin-left: auto; margin-right: auto; }
.how > .intro { margin-bottom: 36px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.step { background: var(--card); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; }
.art { margin: 12px 12px 0; height: 196px; }
.art .photo, .art .tile { display: block; width: 100%; height: 100%; object-fit: cover; }
.art picture { display: block; min-width: 0; min-height: 0; }
.art.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, 96px); gap: 4px; height: auto; }
.art.grid .tile { border-radius: 10px; }
.art.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.art.pair .photo { border-radius: 12px; }
.art.pair .kept { position: relative; min-width: 0; }
.art.pair .kept .photo { border: 3px solid var(--brand); }
.art.pair .photo { height: 196px; }  /* explicit, as the mockup: a percentage resolves against an auto grid row */
.art.pair .chip { position: absolute; left: 10px; bottom: 10px; font-size: 13px; padding: 4px 10px; }
.art .faded { opacity: 0.6; }
.art.confirm { position: relative; border-radius: 16px; overflow: hidden; }
.art.confirm picture { position: absolute; inset: 0; }
.art.confirm .photo { object-position: 50% 65%; }
.art.confirm::after { content: ""; position: absolute; inset: 0; background: rgba(21, 19, 31, 0.32); }
.dialog {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 220px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.97);
  color: #15131f;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 14px;
}
.dialog-icon { color: #4a3aff; stroke-width: 2; }
.dialog strong { font-size: 15px; }
.dialog > span { font-size: 12.5px; line-height: 1.4; color: #55556a; padding: 0 16px 8px; }
.dialog-buttons { align-self: stretch; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #e4e3ec; font-size: 15px; }
.dialog-buttons span { padding: 10px 0; }
.dialog-buttons .cancel { color: #4a3aff; font-weight: 600; border-right: 1px solid #e4e3ec; }
.dialog-buttons .delete { color: #d13438; }
.step-text { padding: 20px 24px 26px; display: flex; flex-direction: column; gap: 8px; }
.step-n { font-size: 14px; font-weight: 700; color: var(--accent); }
.step h3 { font-size: 21px; font-weight: 700; line-height: 1.3; }
.step p { font-size: 16px; color: var(--muted); }

/* Privacy. */
.privacy { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.privacy-art, .privacy-text { flex: 1 1 420px; min-width: 0; }
.privacy-art { border-radius: 32px; overflow: hidden; background: var(--tint); display: flex; flex-direction: column; }
.privacy-art .band { min-height: 56px; }
.privacy-photo { position: relative; height: 320px; }
.privacy-photo picture { position: absolute; inset: 0; }
.privacy-photo .photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.lock { position: absolute; left: 50%; top: 28px; transform: translateX(-50%); width: 72px; height: 72px; border-radius: 50%; background: rgba(255, 255, 255, 0.94); color: #4a3aff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.lock-icon { stroke-width: 2; }
.privacy-text { display: flex; flex-direction: column; gap: 22px; }
.point { display: flex; gap: 14px; align-items: flex-start; }
.point-icon { flex-shrink: 0; color: var(--accent); stroke-width: 1.8; }
.point > div { display: flex; flex-direction: column; gap: 4px; }
.point strong { font-size: 18px; }
.point span { font-size: 16px; color: var(--muted); }

/* The call to action. */
main.home > .cta { padding-top: 0; }
.cta-in { border-radius: 36px; background: var(--brand); color: #ffffff; padding: 48px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-icon { display: block; width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35); }
.cta-text { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.home .cta h2 { font-size: 34px; }
.cta p { font-size: 17px; color: #e4e0ff; }

/* The bottom bar (phone only). */
.bar { position: sticky; bottom: 0; z-index: 5; padding: 12px 16px 20px; background: linear-gradient(rgba(255, 255, 255, 0), var(--bg) 35%); }
.bar-in { display: flex; align-items: center; gap: 12px; background: #15131f; color: #ffffff; border-radius: 16px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(21, 19, 31, 0.25); }
.bar-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.bar-text strong { font-size: 15px; }
.bar-text span { font-size: 13px; color: #c9c6dd; }
.store.small { min-height: 44px; padding: 10px 14px; border-radius: 12px; font-size: 14px; white-space: nowrap; }

@media (max-width: 719.98px) {
  main.home > section { padding: 44px 16px; }
  .home h2 { font-size: 28px; line-height: 1.2; }
  .intro { gap: 8px; margin-bottom: 16px; }
  .intro p { font-size: 16px; }
  main.home > .hero { flex-direction: column; align-items: stretch; gap: 28px; padding-top: 24px; padding-bottom: 40px; }
  .hero-text, .hero-art, .privacy-art, .privacy-text { flex: none; }
  .hero-text { gap: 16px; }
  .hero h1 { font-size: 38px; line-height: 1.1; }
  .lead { font-size: 17px; }
  .stack { height: 316px; }
  .stack .side { width: 150px; height: 210px; }
  .stack .left { margin-left: -175px; }
  .stack .right { margin-left: 25px; }
  .stack .front { top: 24px; width: 180px; height: 244px; margin-left: -90px; }
  .chip.big { top: 250px; }

  main.home > .screens { padding-top: 16px; }
  .tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; background: var(--tint); padding: 4px; border-radius: 14px; }
  .tab { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 4px; border-radius: 11px; font-size: 13.5px; font-weight: 600; line-height: 1.2; color: var(--muted); text-align: center; cursor: pointer; }
  /* The radios stay focusable for the keyboard (arrow keys), visually hidden. */
  .shot-r { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
  #shot-1:checked ~ .tabs [for="shot-1"], #shot-2:checked ~ .tabs [for="shot-2"],
  #shot-3:checked ~ .tabs [for="shot-3"], #shot-4:checked ~ .tabs [for="shot-4"] { background: var(--card); color: var(--accent); box-shadow: 0 1px 4px rgba(40, 30, 120, 0.15); }
  #shot-1:focus-visible ~ .tabs [for="shot-1"], #shot-2:focus-visible ~ .tabs [for="shot-2"],
  #shot-3:focus-visible ~ .tabs [for="shot-3"], #shot-4:focus-visible ~ .tabs [for="shot-4"] { outline: 3px solid var(--accent); outline-offset: 2px; }
  .phones { display: flex; justify-content: center; margin-top: 20px; }
  .shot { display: none; gap: 12px; }
  #shot-1:checked ~ .phones .shot-1, #shot-2:checked ~ .phones .shot-2,
  #shot-3:checked ~ .phones .shot-3, #shot-4:checked ~ .phones .shot-4 { display: flex; }
  .phone { width: 210px; border-radius: 30px; border-width: 5px; }
  .shot figcaption { font-size: 15px; }

  .steps { grid-template-columns: 1fr; gap: 16px; }
  .art.grid { grid-template-rows: repeat(2, 92px); }
  main.home > .privacy { flex-direction: column; align-items: stretch; gap: 24px; }
  .privacy-art { border-radius: 28px; }
  .privacy-photo { height: 240px; }
  .privacy-text { gap: 18px; }
  .cta-in { flex-direction: column; text-align: center; border-radius: 28px; padding: 32px 22px; gap: 16px; }
  .cta-icon { width: 72px; height: 72px; border-radius: 18px; }
  .cta-text { flex: none; }
  .home .cta h2 { font-size: 26px; line-height: 1.2; }
  .bar.narrow { display: block; }
}

/* --- The footer -------------------------------------------------------------------------------------------------- */
.foot { border-top: 1px solid var(--rule); }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 36px 24px 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; font-size: 17px; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand div { display: flex; flex-direction: column; gap: 2px; }
.foot-brand strong { font-size: 20px; font-weight: 800; }
.foot-brand span { color: var(--subtle); font-size: 15px; }
.links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 28px; font-weight: 500; }
.links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.links a:hover, .links a.mail { color: var(--accent); }
@media (max-width: 719.98px) {
  .foot-in { flex-direction: column; align-items: stretch; padding: 28px 16px 32px; font-size: 16px; }
  .links { flex-direction: column; }
  .links li { border-bottom: 1px solid var(--rule); }
  .links a { display: flex; min-height: 48px; }
}

/* --- The other pages: 404 and the legal pages (Terms, Privacy, Support) ------------------------------------------ */
main.notfound, main.legal { max-width: 46rem; margin: 0 auto; padding: 8px 16px 48px; }
.notfound { text-align: center; padding-top: 48px; }
.notfound h1 { font-size: 2.25rem; line-height: 1.15; margin-bottom: 12px; }
.notfound .lead { margin: 0 auto; }
.legal h1 { font-size: 1.75rem; line-height: 1.25; margin: 1rem 0; }
.legal h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
.legal h3 { font-size: 1.05rem; margin: 1.5rem 0 .25rem; }
.legal p { margin: 0 0 1rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin: .35rem 0; }
mark { background: var(--mark); color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
