@font-face { font-family: "Jakarta"; src: url("/font.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
:root {
  --accent: #c4242a; --accent-h: #a51d22; --accent-soft: #fbeaea;
  --ink: #16191d; --muted: #5b616b; --line: #e2e5e9; --line-s: #c9ced5;
  --bg: #f6f7f8; --card: #ffffff; --ok: #157347; --ok-soft: #e8f5ee;
  --r: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: "Jakarta", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-in { max-width: 720px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 16px; }
.logo { height: 40px; width: auto; flex: none; }
.top-co { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); line-height: 1.4; border-left: 1px solid var(--line); padding-left: 16px; }
.top-co strong { color: var(--ink); font-size: 13px; }
@media (max-width: 520px) { .top-in { flex-direction: column; align-items: flex-start; gap: 8px; } .top-co { border-left: 0; padding-left: 0; } .logo { height: 34px; } }

.wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 140px; }
.intro { padding: 12px 2px 18px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
h1 { font-size: clamp(28px, 6vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin: 4px 0 10px; }
.lead { color: var(--muted); max-width: 60ch; }
.steps { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; counter-reset: s; margin-top: 14px; font-size: 13px; color: var(--muted); }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 11px; margin-right: 6px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 18px; margin-bottom: 14px; }
h2 { font-size: 17px; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
h2 .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; }
.sub, .hint { color: var(--muted); font-size: 13.5px; }
.hint { margin-top: 6px; font-size: 12.5px; }

label, .lbl, legend { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
.req { color: var(--accent); }
input[type=text], input:not([type]), input[type=tel], input[type=email], input[type=date], textarea, select {
  width: 100%; min-height: 46px; padding: 11px 12px; border: 1.5px solid var(--line-s); border-radius: 10px;
  font: inherit; font-size: 16px; background: #fff; color: var(--ink); appearance: none;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 25, 29, .08); }
.err { border-color: var(--accent) !important; background: #fff8f8 !important; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

.seg { border: 0; margin-top: 4px; }
.seg legend { margin-bottom: 8px; }
.seg label { display: inline-flex; align-items: center; gap: 8px; margin: 0 8px 0 0; padding: 10px 14px; border: 1.5px solid var(--line-s); border-radius: 999px; font-weight: 500; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: #fff; }
.seg input { accent-color: var(--accent); }

.toggle, .chk { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; font-size: 14.5px; cursor: pointer; }
.toggle { margin-top: 18px; padding: 12px 14px; border: 1.5px dashed var(--line-s); border-radius: 10px; }
.toggle input, .chk input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.chks { display: grid; gap: 8px; margin-top: 12px; }
.chk { margin: 0; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; }
.chk:has(input:checked) { border-color: var(--ink); background: #fafbfc; }
.chk.opt { border-style: dashed; color: var(--muted); }
.chk a { color: var(--accent); }
.chk.err { border-color: var(--accent); }

.dd { margin-top: 12px; }
.note { font-size: 13.5px; background: #fff8e6; border-left: 3px solid #d99a00; padding: 10px 12px; border-radius: 0 8px 8px 0; }
.dd-row { border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px 14px; margin-top: 10px; position: relative; }
.dd-row .x { position: absolute; top: 8px; right: 8px; }
.ghost { background: none; border: 1.5px solid var(--line-s); border-radius: 8px; padding: 8px 14px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; margin-top: 10px; }
.ghost:hover { border-color: var(--ink); }

.ups { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 520px) { .ups { grid-template-columns: 1fr; } }
.up { position: relative; border: 1.5px dashed var(--line-s); border-radius: 12px; padding: 18px 12px; text-align: center; min-height: 130px; display: grid; place-content: center; gap: 4px; background: #fcfcfd; }
.up input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.up .t { font-weight: 600; font-size: 14.5px; }
.up .s { font-size: 12.5px; color: var(--muted); }
.up img { max-width: 100%; max-height: 160px; border-radius: 8px; margin: 6px auto 0; display: block; }
.up.ok { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.up.err { border-color: var(--accent); }

.doc { margin-top: 12px; max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 18px 16px; font-size: 14px; line-height: 1.6; background: #fdfdfd; }
.doc h3 { text-align: center; color: var(--accent); font-size: 19px; letter-spacing: .04em; }
.doc .dt { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.doc h4 { font-size: 14px; margin: 14px 0 4px; }
.doc h4.ben { color: var(--accent); }
.doc ul { list-style: none; padding-left: 12px; }
.doc li { margin: 2px 0; }

.pdpl { margin-top: 10px; font-size: 13.5px; background: #f3f6f9; border-radius: 10px; padding: 12px 14px; }
.pdpl a { display: inline-block; margin-top: 6px; color: var(--accent); font-weight: 600; }

.sig { position: relative; border: 2px dashed var(--line-s); border-radius: 12px; background: #fff; touch-action: none; }
.sig.ok { border-style: solid; border-color: var(--ink); }
.sig.err { border-color: var(--accent); }
.sig canvas { display: block; width: 100%; height: 200px; border-radius: 12px; cursor: crosshair; }
.sig-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #aab0b8; pointer-events: none; }
.sig-act { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }

.foot { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 18px; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); z-index: 5; }
.bar-in { max-width: 720px; margin: 0 auto; }
.msg { font-size: 13.5px; color: var(--accent); background: #fff3f3; border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; max-height: 30vh; overflow: auto; }
.btn { width: 100%; min-height: 52px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font: inherit; font-size: 16.5px; font-weight: 700; cursor: pointer; transition: background .15s, transform .1s; }
.btn:hover { background: var(--accent-h); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }

.done { text-align: center; padding-top: 48px; }
.done p { margin-top: 10px; color: var(--muted); }
.done b { color: var(--ink); }
.tick { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 38px; display: grid; place-items: center; }
.muted { font-size: 13.5px; }

/* Trang chinh sach */
.policy h2 { margin-top: 22px; }
.policy p, .policy li { margin-top: 8px; }
.policy ul { padding-left: 20px; }
.policy table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.policy td, .policy th { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
