/* AirTracking Tool: tông xanh ngọc bích (jade) đậm kiểu hãng bay, chữ trắng, điểm nhấn xanh bạc hà */
[hidden] { display: none !important; }
:root {
  --brand: #006564;
  --brand-dark: #004846;
  --deep: #003B3A;
  --sign: #A8E2D8;
  --sign-deep: #6FC3B5;
  --sign-soft: #E4F3F0;
  --ink: #16181D;
  --ink-2: #2B2F37;
  --soft: #4B5260;
  --muted: #6B7280;
  --bg: #EEF2F1;
  --paper: #FFFFFF;
  --field: #F6F7F9;
  --line: #D8DCE2;
  --ok: #0F7B53;
  --bad: #C62828;
  --link: #00706E;
  --head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sign-soft: #10302E;
    --brand: #2FA89A;
    --brand-dark: #23897E;
    --ink: #F1F2F4;
    --ink-2: #D9DCE1;
    --soft: #B4BAC4;
    --muted: #8D95A1;
    --bg: #0E1514;
    --paper: #162120;
    --field: #111A19;
    --line: #29403D;
    --ok: #3DD598;
    --bad: #FF6B6B;
    --link: #7FD6C8;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 1.02rem; line-height: 1.6; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sign-deep); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

/* ---------- Header: dải đen như bảng chỉ dẫn ---------- */
.site-header { background: var(--deep); color: #fff; }
.header-inner { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--head); font-size: 1.35rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.logo b { color: var(--sign); font-weight: 800; }
.logo img { display: block; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { display: inline-flex; align-items: center; gap: 8px; color: #CFE5E1; text-decoration: none; font-weight: 600; font-size: .95rem; padding: 7px 12px; border-radius: 8px; }
.nav a:hover { background: var(--brand-dark); color: #fff; }
.nav a[aria-current="page"] { color: var(--deep); background: var(--sign); }
.nav-code { font-family: var(--head); font-weight: 800; font-size: .8rem; letter-spacing: .04em; border: 1.5px solid currentColor; border-radius: 4px; padding: 0 4px; line-height: 1.3; }
.lang { color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; border: 1px solid #3E7A75; border-radius: 8px; padding: 6px 12px; white-space: nowrap; }
.lang:hover { border-color: var(--sign); color: var(--sign); }
@media (max-width: 900px) { .nav { display: none; } .header-inner { justify-content: space-between; } }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--head); letter-spacing: .005em; line-height: 1.1; }
h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); font-weight: 800; margin: 0 0 12px; }
h2 { font-size: 1.7rem; font-weight: 700; margin: 44px 0 12px; }
h3 { font-size: 1.25rem; font-weight: 700; margin: 0 0 8px; }
.lead { font-size: 1.12rem; color: var(--soft); max-width: 62ch; margin: 0 0 26px; }
.sign-chip { display: inline-block; font-family: var(--head); font-weight: 800; letter-spacing: .04em; background: var(--sign); color: var(--deep); border-radius: 5px; padding: 1px 8px; font-size: .95rem; line-height: 1.4; }

/* ---------- Buttons, inputs ---------- */
button, .btn {
  font: inherit; font-weight: 600; font-size: .95rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid var(--brand); border-radius: 8px; padding: 9px 16px; cursor: pointer; text-decoration: none;
  background: var(--brand); color: #fff; transition: background-color .15s, color .15s;
}
button:hover, .btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.ghost, button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover, button.ghost:hover { border-color: var(--brand); background: transparent; color: var(--brand); }
@media (prefers-color-scheme: dark) { button, .btn { color: #04201F; } button:hover, .btn:hover { color: #04201F; } .btn.ghost, button.ghost { color: var(--ink); } }
input[type="search"], input[type="text"], textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--field);
  border: 2px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
input:focus, textarea:focus { outline: none; border-color: var(--brand); background: var(--paper); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sign) 60%, transparent); }
.big { font-family: var(--head); font-size: 1.7rem; font-weight: 700; letter-spacing: .02em; padding: 12px 16px; }
textarea.big { font-size: 1.35rem; resize: vertical; line-height: 1.35; }
label { display: block; font-weight: 600; margin-bottom: 8px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.options label { display: inline-flex; gap: 8px; align-items: center; margin: 0; font-weight: 500; font-size: .92rem; color: var(--soft); padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; }
.options label:has(input:checked) { border-color: var(--brand); color: var(--ink); background: var(--sign-soft); }
.hint { font-size: .9rem; color: var(--muted); margin: 8px 0 0; }
.error { color: var(--bad); font-weight: 600; margin: 12px 0 0; }
.notice { padding: 12px 16px; border-radius: 10px; background: var(--field); border: 1px solid var(--line); margin: 14px 0 0; }
.notice.ok { background: color-mix(in srgb, var(--ok) 10%, var(--paper)); border-color: color-mix(in srgb, var(--ok) 40%, var(--paper)); }
.toast { color: var(--ok); font-weight: 600; font-size: .92rem; }
kbd { font-family: inherit; font-size: .82em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--paper); }

/* ---------- Tool panel ---------- */
.tool-page { padding-top: 36px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: 0 20px 40px -30px rgba(0,59,58,.35); }
@media (max-width: 600px) { .panel { padding: 18px 14px; } .wrap { padding: 0 16px; } }

/* Danh sách dạng hàng (hãng bay, sân bay) */
.rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.rows > li { border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: none; }
.row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 10px 14px; }
.row:hover { background: var(--field); }
.code { font-family: var(--head); font-weight: 800; font-size: 1.35rem; letter-spacing: .03em; color: var(--ink); }
.row .code { background: var(--brand); color: #fff; border-radius: 6px; text-align: center; padding: 2px 0; font-size: 1.15rem; }
@media (prefers-color-scheme: dark) { .row .code { color: #04201F; } }
.row-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.row-main strong { font-size: 1rem; }
.row-main .muted { font-size: .88rem; }
.row-meta { font-size: .82rem; color: var(--muted); }
.row .btn { padding: 7px 14px; font-size: .88rem; white-space: nowrap; }
.empty { padding: 18px; color: var(--muted); }
.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 22px 0 8px; font-family: var(--head); font-size: 1.2rem; }
.size-L { color: var(--ok); font-weight: 700; }
.size-M { color: var(--soft); font-weight: 600; }
.hub-tag { font-family: var(--head); font-weight: 700; font-size: .78rem; letter-spacing: .04em; color: var(--deep); background: var(--sign); border-radius: 4px; padding: 0 6px; margin-left: 6px; vertical-align: 2px; }
@media (max-width: 600px) { .row { grid-template-columns: 52px 1fr; } .row .btn { grid-column: 2; justify-self: start; } }

/* ---------- Content ---------- */
.content { max-width: 760px; }
.content p, .content li { color: var(--soft); }
.content strong { color: var(--ink); }
.content table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .95rem; }
.content th, .content td { padding: 9px 14px; text-align: left; }
.content td { border-top: 1px solid var(--line); color: var(--soft); }
.content th { background: var(--field); font-weight: 600; }
.content td:first-child { font-family: var(--head); font-weight: 800; color: var(--brand); letter-spacing: .03em; }
.content code { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
details { border-bottom: 1px solid var(--line); padding: 14px 2px; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--head); font-weight: 800; font-size: 1.3rem; line-height: 1.2; }
details[open] summary::after { content: "–"; }
details p { margin: 8px 0 0; }

/* ---------- Related, footer ---------- */
.related { padding-bottom: 36px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.related-card { display: flex; flex-direction: column; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px; color: var(--ink); text-decoration: none; }
.related-card:hover { border-color: var(--brand); }
.related-card .sign-chip { align-self: flex-start; }
.related-card strong { font-family: var(--head); font-size: 1.3rem; }
.related-card span:last-child { color: var(--soft); font-size: .93rem; }
.site-footer { background: var(--deep); color: #CFE5E1; margin-top: 40px; font-size: .92rem; }
.site-footer a { color: var(--sign); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 26px; }
.footer-inner p { margin: 0; }
.site-footer .muted { color: #93B9B3; }
