/* TrackingKaro — mobile-first. Built for phones; on larger screens the same
   single-column layout is centred (max 560px) so it still looks like the app. */
:root {
  --bg: #f4f5fa; --card: #fff; --text: #14161f; --muted: #5f6577; --line: #e2e5ee;
  --accent: #3b5bfd; --accent-ink: #fff; --ok: #12924f; --warn: #b26f00; --bad: #c62f2f;
  --radius: 16px; --tap: 48px;
  --pad: max(16px, env(safe-area-inset-left));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0f1117; --card: #181b24; --text: #eceef4; --muted: #9aa1b2; --line: #2a2f3c; --accent: #7088ff; }
}
:root[data-theme="dark"] { --bg: #0f1117; --card: #181b24; --text: #eceef4; --muted: #9aa1b2; --line: #2a2f3c; --accent: #7088ff; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; }
a { color: var(--accent); }
main, .top, .foot { max-width: 560px; margin: 0 auto; }
main { padding: 0 var(--pad) 32px; }

/* header: sticky, thumb-friendly */
.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: max(10px, env(safe-area-inset-top)) var(--pad) 10px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.brand { font-weight: 800; font-size: 19px; text-decoration: none; color: var(--text); min-height: var(--tap); display: flex; align-items: center; gap: 6px; }
.logo { color: var(--accent); }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; min-height: var(--tap); display: flex; align-items: center; padding: 0 4px; }

.hero { padding: 12px 0 4px; }
.hero h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 6px; letter-spacing: -.3px; }
.sub { color: var(--muted); margin: 0 0 16px; font-size: 15px; }

/* search card: stacked, full-width controls, 16px+ inputs (stops iOS zoom) */
.search { display: grid; gap: 10px; background: var(--card); padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(20,30,80,.07); }
.field { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); }
.field:focus-within, .search #courier:focus { border-color: var(--accent); }
.search input { font: inherit; font-size: 17px; color: var(--text); background: transparent; border: 0; outline: none; padding: 0 14px; min-height: 52px; min-width: 0; width: 100%; }
.search #awb { letter-spacing: .6px; font-weight: 600; }
.search #courier { border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 16px; }
.paste { flex: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent); background: transparent; border: 0; padding: 0 14px; min-height: var(--tap); cursor: pointer; }
.search button[type=submit] { font: inherit; font-size: 17px; font-weight: 700; border: 0; border-radius: 12px; min-height: 54px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.search button:disabled { opacity: .6; }
.hint { min-height: 22px; color: var(--muted); font-size: 14px; margin: 10px 2px 0; }
.recent { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-top: 4px; padding-bottom: 2px; }
.recent::-webkit-scrollbar { display: none; }
.chip { flex: none; font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 0 14px; min-height: 38px; cursor: pointer; }

/* result */
.result { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin-top: 14px; scroll-margin-top: 76px; }
.r-head { display: flex; flex-direction: column; gap: 8px; }
.r-head h2 { margin: 0; font-size: 22px; word-break: break-all; }
.courier-name { color: var(--muted); font-size: 14px; }
.badge { align-self: flex-start; font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.badge.delivered { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.exception { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.badge.pending { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.step { margin: 14px 0 0; font-size: 15px; }
.notice { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 12%, transparent); font-size: 14px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.btn { display: flex; align-items: center; justify-content: center; text-align: center; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 12px; min-height: var(--tap); padding: 8px 12px; cursor: pointer; }
.btn.primary { grid-column: 1 / -1; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.big { min-height: 54px; font-size: 16px; }

.timeline { list-style: none; margin: 20px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 24px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 2px solid var(--muted); }
.timeline li:first-child::before { background: var(--accent); border-color: var(--accent); }
.t-what { font-weight: 600; }
.t-meta { color: var(--muted); font-size: 14px; }

/* courier list */
.couriers, .content { margin-top: 32px; }
.couriers h2, .content h2 { font-size: 20px; margin: 0 0 12px; }
.couriers h2 small { color: var(--muted); font-weight: 500; font-size: 15px; }
.filters { display: grid; gap: 10px; margin-bottom: 12px; }
.filters input { font: inherit; font-size: 16px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; min-height: var(--tap); width: 100%; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; font: inherit; font-size: 15px; border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 0 16px; min-height: 40px; cursor: pointer; }
.tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 56px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.3; }
.card:active { border-color: var(--accent); }
.dot { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; }
.empty { color: var(--muted); grid-column: 1 / -1; }

/* content pages */
.crumbs { font-size: 13px; color: var(--muted); margin-top: 6px; }
.crumbs a { color: var(--muted); }
.hero-sm h1 { font-size: 26px; }
.content ol { padding-left: 20px; margin: 0; } .content li { margin-bottom: 8px; }
.content p { margin: 0 0 12px; }
.content h2 + p, .content h2 + ol { margin-top: 0; }
.content h2:not(:first-child) { margin-top: 28px; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 600; padding: 14px 16px; min-height: var(--tap); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 0; padding: 0 16px 14px; color: var(--muted); }

/* Hindi / English: both are in the page (so Google reads both); only the chosen one shows */
.lang-toggle { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin: 6px 0 4px; }
.lang-toggle button { font: inherit; font-size: 15px; font-weight: 600; border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 0 18px; min-height: 40px; cursor: pointer; }
html[data-lang="hi"] .lang-toggle [data-set-lang="hi"], html[data-lang="en"] .lang-toggle [data-set-lang="en"] { background: var(--accent); color: var(--accent-ink); }
.swapping [data-swap] { opacity: .45; transition: opacity .15s; }
html[lang="hi"] body { line-height: 1.7; }
.hero h1 small { display: block; font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.lead { font-size: 16px; }
.content ul { padding-left: 20px; margin: 0 0 12px; }
.tbl { overflow-x: auto; margin: 0 calc(-1 * var(--pad)) 8px; padding: 0 var(--pad); }
.tbl table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 13px; color: var(--muted); font-weight: 600; background: color-mix(in srgb, var(--accent) 6%, var(--card)); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { width: 38%; }

/* first-visit language chooser: docked at the bottom, page stays visible and usable */
.lang-pop { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: center;
  padding: 0 12px max(12px, env(safe-area-inset-bottom)); pointer-events: none; animation: rise .2s ease-out; }
.lang-pop[hidden] { display: none; }
.lang-card { pointer-events: auto; position: relative; width: 100%; max-width: 420px; background: var(--card); color: var(--text); border-radius: 18px;
  border: 1px solid var(--line); padding: 20px 16px 16px; text-align: center; box-shadow: 0 -6px 40px rgba(0,0,0,.18); }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.lang-card h2 { margin: 0 0 4px; font-size: 20px; }
.lang-card p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.lang-x { position: absolute; top: 6px; right: 6px; width: var(--tap); height: var(--tap); border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; border-radius: 12px; }
.lang-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lang-choices button { font: inherit; font-size: 16px; font-weight: 700; display: grid; gap: 4px; justify-items: center; padding: 18px 8px;
  min-height: 92px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); cursor: pointer; }
.lang-choices button:active, .lang-choices button:focus-visible { border-color: var(--accent); }
.lang-choices .glyph { font-size: 32px; font-weight: 500; line-height: 1.1; }
@keyframes fade { from { opacity: 0; } }

.guide-list { display: grid; gap: 8px; margin-bottom: 8px; }
.sources { font-size: 14px; }
.checked { font-size: 13px; color: var(--muted); }

.ad-slot { margin: 20px 0; min-height: 100px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 20px var(--pad) max(28px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.foot a { color: var(--muted); }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

.note { margin: 8px 2px 0; font-size: 13px; color: var(--muted); }

.more { margin: 10px 2px 0; font-size: 15px; }

/* courier logos + contact box */
.logo { width: 30px; height: 30px; flex: none; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.contact-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 20px; }
.contact-box h2 { margin: 0 0 8px; font-size: 18px; }
.contact-box ul { list-style: none; margin: 0 0 8px; padding: 0; }
.contact-box .links li { margin: 0; }
.contact-box .links a { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); text-decoration: none; }
.contact-box .links li:last-child a { border-bottom: 0; }
.contact-box .phones li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; }
.contact-box .call { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.contact-box .phones span { color: var(--muted); font-size: 14px; }
.contact-box .warn { margin: 8px 0 0; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 12%, transparent); }

/* state-wise branch directory */
.filter { margin: 4px 0 10px; background: var(--card); }
.filter input { font: inherit; font-size: 16px; color: var(--text); background: transparent; border: 0; outline: none; padding: 0 14px; min-height: 48px; width: 100%; }
.state-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad) 6px; }
.state-chips::-webkit-scrollbar { display: none; }
.state-chips a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; font-size: 14px; }
.state-chips small { color: var(--muted); }
.branches details { scroll-margin-top: 70px; }
.branches summary h2 { display: inline; font-size: 17px; margin: 0; }
.branches summary small { color: var(--muted); font-weight: 400; }
.branch-list { list-style: none; margin: 0; padding: 0 12px 6px; }
.branch { border-top: 1px solid var(--line); padding: 12px 0; }
.branch:first-child { border-top: 0; }
.branch h3 { font-size: 16px; margin: 0 0 4px; }
.branch p { margin: 0 0 6px; color: var(--text); font-size: 14px; padding: 0; }
.branch .ph { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.call-sm { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 700; text-decoration: none; }
.branch .em a { word-break: break-all; }
.area { font-size: 14px; color: var(--muted); margin: 14px 12px 4px; text-transform: uppercase; letter-spacing: .4px; }

.country-pick { margin: 0 2px 10px; font-size: 14px; color: var(--muted); }
.country-pick select { font: inherit; font-size: 15px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-height: 40px; padding: 0 10px; margin-left: 4px; }
