/* vietnamese */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/archivo-82201aea.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/archivo-9baef66e.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/archivo-b8d3d79c.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/archivo-82201aea.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/archivo-9baef66e.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/archivo-b8d3d79c.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/archivo-82201aea.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/archivo-9baef66e.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(font/archivo-b8d3d79c.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* trang.css — giao diện trang đặt xe.
 *
 * Ý chính: NHÂN VẬT CHÍNH LÀ NƠI KHÁCH SẮP VỀ, không phải cái xe.
 * Mỗi tỉnh có tranh riêng của chính nó (hinh.js). Màu ở đây lấy ra từ chính
 * cảnh trong tranh — trời lúc chưa sáng, phù sa, mặt nước, biển vàng — nên
 * tranh và trang là một, không phải ảnh dán lên nền.
 *
 * Biển vàng chỉ dùng cho ĐÚNG MỘT VIỆC: số điện thoại. Dùng vàng cho mọi thứ
 * thì nó thành nền, không còn là nút bấm.
 */

/* ── Màu ───────────────────────────────────────────────────────────── */
:root {
  --giay:  #EEF2F3;   /* nền trang */
  --the:   #FFFFFF;   /* nền thẻ */
  --muc:   #15272E;   /* chữ chính */
  --nhat:  #5B7078;   /* chữ phụ */
  --vien:  #D3DDE0;
  --sau:   #1C3B45;   /* khối tối: hero, chân trang */
  --nhan:  #E8B33A;   /* biển vàng — chỉ dành cho số điện thoại */
  --nhan-dam: #C9922A;

  /* Màu trong tranh. Đổi ở đây là cả 14 bức đổi theo. */
  --h-troi: #DCE7EA;
  --h-xa:   #9FB7BE;
  --h-gan:  #2C4A54;
  --h-dat:  #CBC3A8;
  --h-nuoc: #A9C6CE;
  --h-nhan: #E8B33A;
  --h-duong: #2C4A54;  /* mặt đường */
  --h-xe:    #CBC3A8;  /* thân xe */

  --rong: 1080px;
  --bo: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --giay: #0E1E24; --the: #152B33; --muc: #E7EEF0; --nhat: #9DB2B9;
    --vien: #27444E; --sau: #0A171C;
    --h-troi: #1B3A44; --h-xa: #3C6472; --h-gan: #DCE7EA;
    --h-dat: #2A4A4A; --h-nuoc: #214653;
    --h-duong: #0A1A20; --h-xe: #9FB7BE;
    --h-nhan: #E8B33A;   /* biển vàng ban đêm vẫn vàng — cố ý giữ nguyên */
  }
}
:root[data-theme="dark"] {
  --giay: #0E1E24; --the: #152B33; --muc: #E7EEF0; --nhat: #9DB2B9;
  --vien: #27444E; --sau: #0A171C;
  --h-troi: #1B3A44; --h-xa: #3C6472; --h-gan: #DCE7EA;
  --h-dat: #2A4A4A; --h-nuoc: #214653;
    --h-duong: #0A1A20; --h-xe: #9FB7BE;
    --h-nhan: #E8B33A;   /* biển vàng ban đêm vẫn vàng — cố ý giữ nguyên */
}

/* ── Nền chung ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--giay);
  color: var(--muc);
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

.khoi { width: 100%; max-width: var(--rong); margin-inline: auto; padding-inline: var(--bo); }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.022em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(32px, 6.4vw, 60px); font-weight: 800; }
h2 { font-size: clamp(25px, 3.9vw, 38px); font-weight: 800; }
h3 { font-size: clamp(18px, 2.1vw, 21px); font-weight: 700; }
p { margin: 0; max-width: 62ch; }

.bo-qua {
  position: absolute; left: -9999px;
  background: var(--nhan); color: #14130f; padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.bo-qua:focus { left: 12px; top: 12px; z-index: 50; }
:focus-visible { outline: 3px solid var(--nhan-dam); outline-offset: 3px; border-radius: 4px; }

/* ── Biển số vàng: dành riêng cho số điện thoại ────────────────────── */
.bien {
  display: inline-block;
  background: var(--nhan);
  color: #14130f;
  border: 3px solid #14130f;
  border-radius: 9px;
  padding: .22em .46em .26em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: .012em;
  text-decoration: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .3);
}
.bien:hover { background: #F2C14E; }
.bien-to {
  font-size: clamp(31px, 8.2vw, 54px);
  border-width: 4px; border-radius: 13px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .34);
}

/* ── Đầu trang ─────────────────────────────────────────────────────── */
.dinh {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--giay) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--vien);
}
.dinh > .khoi { display: flex; align-items: center; gap: 18px; min-height: 60px; }
.hieu { font-weight: 800; letter-spacing: -.02em; text-decoration: none; font-size: 16px;
  margin-right: auto; display: flex; align-items: center; min-height: 44px; }
.dinh nav { display: flex; gap: 20px; font-size: 15px; }
.dinh nav a { color: var(--nhat); text-decoration: none; }
.dinh nav a:hover { color: var(--muc); }
.dinh .bien { font-size: 15px; border-width: 2px; padding: .56em .62em .6em; }
@media (max-width: 720px) { .dinh nav { display: none; } }

/* ── Hero ──────────────────────────────────────────────────────────
 *
 * Tranh ĐỨNG RIÊNG MỘT Ô, không làm nền bị phủ tối. Bản trước tôi để tranh
 * phía sau rồi đổ một lớp đen lên cho chữ đọc được — kết quả là chiếc xe
 * thành bóng ma và mặt trời thành màu ô-liu đục. Chữ nằm trên nền phẳng,
 * tranh nằm trong khung của nó, cả hai cùng sạch.
 */
.hero { background: var(--sau); color: #EDF3F4; }
.hero .khoi {
  padding-block: clamp(38px, 5vw, 64px);
  display: grid; gap: clamp(28px, 4vw, 52px);
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  align-items: center;
}
.hero .tranh {
  border-radius: 16px; overflow: hidden;
  /* Khớp đúng tỉ lệ của bức vẽ, nếu không hai hàng cây hai bên bị cắt đôi.
   * Tranh tỉnh là 160×100, tranh con đường ở trang chủ là 320×150. */
  aspect-ratio: 8 / 5; background: var(--h-troi);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
}
.hero .tranh svg { width: 100%; height: 100%; }
.hero .tranh-duong { aspect-ratio: 32 / 15; }
.hero h1 { max-width: 18ch; }
.hero .dan { margin-top: 14px; font-size: clamp(16.5px, 1.75vw, 19px); color: #C4D6DA; max-width: 40ch; }
/* Biển số xuống dòng riêng, lời nhắc nằm dưới. Để cạnh nhau thì biển rộng
 * quá, lời nhắc bị ép thành ba dòng cụt ngủn. */
.goi-chinh { margin-top: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.goi-chinh .ghi { font-size: 14.5px; color: #B2C5CB; max-width: 42ch; line-height: 1.5; }

@media (max-width: 860px) {
  .hero .khoi { grid-template-columns: 1fr; gap: 24px; }
  .hero .tranh, .hero .tranh-duong { aspect-ratio: 16 / 9; }
}

/* Ba lời hứa ngắn dưới hero. Mỗi cái là một khối riêng — bản trước để chữ
 * đậm và chữ thường chạy liền nhau nên xuống dòng là thành một mớ vô nghĩa. */
.chot { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 9px 10px; list-style: none; padding: 0; }
.chot li {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px; line-height: 1.35;
  display: flex; align-items: baseline; gap: 6px;
}
.chot b { font-weight: 800; white-space: nowrap; }
.chot span { color: #B2C5CB; }

/* ── Phần chung ────────────────────────────────────────────────────── */
.phan { padding-block: clamp(48px, 7vw, 82px); }
.phan > .khoi > .dau { margin-bottom: 30px; }
.dau p { margin-top: 10px; color: var(--nhat); }

/* ── Bốn cái cớ: câu nói của khách là nhân vật chính của thẻ ───────── */
.co { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); list-style: none; padding: 0; margin: 0; }
.co li {
  background: var(--the); border: 1px solid var(--vien); border-radius: 14px;
  padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 12px;
}
.co .loi {
  font-size: clamp(19px, 2.3vw, 23px); font-weight: 700; line-height: 1.28;
  letter-spacing: -.018em; margin: 0;
  /* Dấu ngoặc kép treo ra ngoài lề cho ra giọng người nói */
  text-indent: -.42em;
}
.co h3 {
  font-size: 13px; font-weight: 700; color: var(--nhat);
  letter-spacing: .01em; order: -1;
}
.co p { font-size: 15.5px; color: var(--nhat); margin: 0; }

/* ── Cam kết: từng lời hứa là một dòng to, có vạch ngăn ────────────── */
.hua { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--vien); }
.hua li {
  border-bottom: 1px solid var(--vien);
  padding: 20px 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 6px 32px;
  align-items: start;
}
.hua .ten { font-size: clamp(19px, 2.5vw, 26px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.hua p { color: var(--nhat); font-size: 15.5px; }
@media (max-width: 760px) { .hua li { grid-template-columns: 1fr; } }

/* ── 14 tỉnh: mỗi ô một bức tranh ──────────────────────────────────── */
/* Khoá số cột theo bề ngang màn hình. Để auto-fill tự co thì ở màn rộng nó
 * nhồi thành sáu ô một hàng, tên tỉnh và số km vỡ dòng hết. */
.tinh { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .tinh { gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 920px) { .tinh { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tinh a {
  display: flex; flex-direction: column; text-decoration: none; height: 100%;
  background: var(--the); border: 1px solid var(--vien); border-radius: 14px; overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.tinh a:hover { border-color: var(--nhan-dam); transform: translateY(-2px); }
.tinh .k { aspect-ratio: 16 / 10; background: var(--h-troi); }
.tinh .k svg { width: 100%; height: 100%; }
.tinh .chu {
  margin-top: auto; padding: 13px 15px 15px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; align-items: center;
}
.tinh .ma {
  grid-row: 1; width: 42px; height: 31px; display: grid; place-items: center;
  background: var(--nhan); color: #14130f; border: 2px solid #14130f; border-radius: 5px;
  font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums;
}
.tinh .ten { font-weight: 700; font-size: 17.5px; letter-spacing: -.015em; line-height: 1.18; }
/* Số km và giờ chạy nằm thẳng lề với tên tỉnh, không phải dạt sang phải —
 * ô hẹp mà nhét ba thứ trên một hàng thì tên tỉnh bị đẩy vỡ dòng. */
.tinh .xa { grid-column: 2; font-size: 13px; color: var(--nhat); display: flex; gap: 7px; white-space: nowrap; }
.tinh .xa .s2::before { content: '·'; padding-right: 7px; color: var(--vien); }
/* Giá chỉ hiện khi cau-hinh.js có điền. Là thứ khách hỏi đầu tiên nên cho nó
 * đậm hơn số km, nhưng vẫn dưới tên tỉnh. */
.tinh .gia { grid-column: 2; font-size: 15px; font-weight: 700; color: var(--muc); margin-top: 2px; }

/* ── Trang tuyến ───────────────────────────────────────────────────── */
/* Trên hero tối phải dùng màu riêng. Dùng --nhat (màu chữ phụ của nền sáng)
 * thì tỉ lệ tương phản chỉ còn 2.29 — Playwright đo ra, mắt tôi không thấy. */
.duong-dan { font-size: 14px; color: #A9C2C8; padding-top: 16px; }
.duong-dan a { color: #CBDCE0; }
.duong-dan li { padding-block: 0; }
.duong-dan a { display: inline-block; padding-block: 12px; }
.duong-dan ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.duong-dan li + li::before { content: '›'; padding-right: 8px; color: var(--vien); }

.so-lieu { display: flex; flex-wrap: wrap; gap: 10px 30px; margin-top: 26px; list-style: none; padding: 0; }
.so-lieu div { display: flex; flex-direction: column; }
.so-lieu dt { font-size: 13px; color: #A9C2C8; }
.so-lieu dd { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }

.diem { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; padding: 0; margin: 0; }
.diem li {
  background: var(--the); border: 1px solid var(--vien); border-radius: 999px;
  padding: 7px 14px; font-size: 15px;
}
/* Danh sách tuyến: phải để chính thẻ <a> ăn hết ô, nếu không ngón tay chỉ có
 * 16px chiều cao để bấm còn cái ô tròn thì không bấm được. */
.diem-lk li { padding: 0; }
.diem-lk a { display: block; padding: 12px 15px; text-decoration: none; }
.diem-lk a:hover { color: var(--nhan-dam); }

/* ── Hỏi đáp ───────────────────────────────────────────────────────── */
.hoi { border-top: 1px solid var(--vien); }
.hoi details { border-bottom: 1px solid var(--vien); }
.hoi summary {
  cursor: pointer; list-style: none; padding: 17px 36px 17px 0; position: relative;
  font-weight: 700; font-size: 17.5px; letter-spacing: -.012em;
}
.hoi summary::-webkit-details-marker { display: none; }
.hoi summary::after {
  content: ''; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px;
  border-right: 2.4px solid var(--nhat); border-bottom: 2.4px solid var(--nhat);
  transform: translateY(-70%) rotate(45deg); transition: transform .18s;
}
.hoi details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.hoi .dap { padding: 0 0 20px; color: var(--nhat); }

/* ── Dải gọi ───────────────────────────────────────────────────────── */
.goi-cuoi { background: var(--sau); color: #EDF3F4; }
.goi-cuoi .khoi { padding-block: clamp(44px, 6vw, 72px); display: flex; flex-wrap: wrap; gap: 22px 36px; align-items: center; }
.goi-cuoi h2 { max-width: 16ch; }
.goi-cuoi p { color: #BACBD0; margin-top: 10px; }

.chan { background: var(--sau); color: #9FB6BC; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14.5px; }
.chan .khoi { padding-block: 30px; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.chan a { color: #C7D8DC; display: inline-block; padding-block: 11px; }

/* ── Thanh gọi dính đáy trên điện thoại ────────────────────────────── */
.goi-day { display: none; }
@media (max-width: 760px) {
  .goi-day {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: auto 1fr; gap: 9px;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--giay) 93%, transparent);
    backdrop-filter: blur(10px); border-top: 1px solid var(--vien);
  }
  .goi-day a {
    display: grid; place-items: center; min-height: 48px; border-radius: 11px;
    font-weight: 800; text-decoration: none; font-size: 16px;
  }
  .goi-day .zalo { background: var(--the); border: 1px solid var(--vien); color: var(--muc); padding-inline: 20px; }
  .goi-day .so { background: var(--nhan); color: #14130f; border: 2px solid #14130f; }
  body { padding-bottom: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
