/* ════════════════════════════════════════════════════════════════════════
   ILMS Enterprise — Public Shipment Tracking Portal stylesheet
   Self-contained design system for the /track landing page (SRS §12, §91).
   Mobile-first, fully responsive (320 → 1440+). SRS §67, §68, §118.
   ════════════════════════════════════════════════════════════════════════ */

:root {
    --tk-primary: #1d4ed8;
    --tk-primary-dark: #1e3a8a;
    --tk-primary-light: #3b82f6;
    --tk-accent: #0ea5e9;
    --tk-ink: #0f172a;
    --tk-text: #1e293b;
    --tk-text-soft: #475569;
    --tk-muted: #64748b;
    --tk-faint: #94a3b8;
    --tk-surface: #ffffff;
    --tk-surface-2: #f8fafc;
    --tk-surface-3: #f1f5f9;
    --tk-border: #e2e8f0;
    --tk-border-soft: #eef2f7;
    --tk-success: #16a34a;
    --tk-success-bg: #f0fdf4;
    --tk-success-border: #bbf7d0;
    --tk-warning: #d97706;
    --tk-warning-bg: #fffbeb;
    --tk-warning-border: #fde68a;
    --tk-danger: #dc2626;
    --tk-danger-bg: #fef2f2;
    --tk-danger-border: #fecaca;
    --tk-info: #0891b2;
    --tk-info-bg: #ecfeff;
    --tk-info-border: #a5f3fc;
    --tk-radius: 14px;
    --tk-radius-sm: 10px;
    --tk-radius-xs: 8px;
    --tk-shadow-xs: 0 1px 2px rgba(15,23,42,.05);
    --tk-shadow-sm: 0 2px 4px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --tk-shadow: 0 4px 12px -2px rgba(15,23,42,.08), 0 2px 6px -2px rgba(15,23,42,.05);
    --tk-shadow-lg: 0 24px 60px -12px rgba(15,23,42,.22);
    --tk-shadow-glow: 0 0 0 4px rgba(29,78,216,.14);
    --tk-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }

body.tk-page {
    font-family: var(--tk-font);
    color: var(--tk-text);
    line-height: 1.65;
    font-size: 16px;
    background: var(--tk-surface-3);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.tk-page * { max-width: 100%; }
a { color: var(--tk-primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--tk-primary-dark); text-decoration: underline; }

/* ── Top bar (sticky brand nav) ─────────────────────────────────────────── */
.tk-nav {
    position: sticky; top: 0; z-index: 50;
    background: var(--header, #0b1220);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 12px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.tk-nav-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.tk-nav-brand:hover { text-decoration: none; }
.tk-nav-brand img { height: 36px; width: 36px; border-radius: 9px; object-fit: contain; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.tk-nav-brand .tk-nav-icon { font-size: 26px; color: var(--tk-primary-light); }
.tk-nav-brand .tk-nav-name { font-size: 18px; font-weight: 800; color: #f8fafc; letter-spacing: -.01em; }
.tk-nav-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-nav-links a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 600;
    color: #cbd5e1; border: 1px solid rgba(255,255,255,.12); transition: all .15s;
}
.tk-nav-links a:hover { color: #fff; background: rgba(255,255,255,.1); text-decoration: none; border-color: rgba(255,255,255,.25); }
.tk-nav-links a.tk-nav-cta {
    background: linear-gradient(135deg, var(--tk-primary), var(--tk-primary-dark));
    color: #fff; border-color: transparent; box-shadow: 0 4px 14px color-mix(in srgb, var(--tk-primary) 40%, transparent);
}
.tk-nav-links a.tk-nav-cta:hover { transform: translateY(-1px); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.tk-hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 400px at 82% -12%, color-mix(in srgb, var(--tk-primary) 36%, transparent), transparent 60%),
        radial-gradient(680px 320px at 4% 112%, color-mix(in srgb, var(--tk-accent) 30%, transparent), transparent 60%),
        linear-gradient(135deg, var(--header, #0b1220) 0%, var(--tk-primary-dark) 46%, var(--tk-primary) 100%);
    color: #fff; text-align: center; padding: 60px 20px 110px;
}
.tk-hero::before {
    content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.08) 1px, transparent 0);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent);
            mask-image: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent);
}
.tk-hero::after {
    content: ''; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
    width: 100%; max-width: 1200px; height: 24px;
    background: linear-gradient(180deg, transparent, var(--tk-surface-3));
}
.tk-hero > * { position: relative; z-index: 1; }
.tk-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px;
    padding: 7px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
    color: color-mix(in srgb, var(--tk-primary-light) 30%, white); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
}
.tk-hero-eyebrow i { color: var(--tk-primary-light); }
.tk-hero h1 {
    font-size: clamp(30px, 6vw, 50px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08;
    margin-bottom: 16px; max-width: 760px; margin-left: auto; margin-right: auto;
}
.tk-hero-lead {
    font-size: clamp(16px, 2.4vw, 20px); color: color-mix(in srgb, var(--tk-primary-light) 30%, white); font-weight: 400;
    max-width: 600px; margin: 0 auto 8px; line-height: 1.6;
}

/* ── Search widget (floats over hero/section boundary) ──────────────────── */
.tk-search-wrap { max-width: 680px; margin: 0 auto; position: relative; z-index: 5; }
.tk-search-card {
    background: var(--tk-surface); border-radius: 18px; padding: 10px;
    box-shadow: 0 30px 70px rgba(2,8,23,.30); border: 1px solid rgba(255,255,255,.5);
    margin-top: -56px;
}
.tk-form { display: flex; gap: 10px; align-items: stretch; }
.tk-field {
    flex: 1; display: flex; align-items: center; gap: 12px; background: var(--tk-surface-2);
    border-radius: 12px; padding: 0 18px; border: 2px solid var(--tk-border); transition: all .2s;
}
.tk-field:focus-within { border-color: var(--tk-primary); box-shadow: var(--tk-shadow-glow); background: #fff; }
.tk-field > i { color: var(--tk-primary); font-size: 19px; flex: 0 0 auto; }
.tk-field input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 17px 0;
    font-size: 16px; font-weight: 600; color: var(--tk-ink); letter-spacing: .01em; box-shadow: none;
    font-family: var(--tk-font);
}
.tk-field input::placeholder { color: var(--tk-faint); font-weight: 500; }
.tk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0 28px; border: 0; cursor: pointer; font-size: 16px; font-weight: 700;
    color: #fff; border-radius: 12px; white-space: nowrap; font-family: var(--tk-font);
    background: linear-gradient(135deg, var(--tk-primary), var(--tk-primary-dark));
    box-shadow: 0 12px 28px rgba(29,78,216,.38); transition: transform .15s, box-shadow .2s, opacity .15s;
    min-height: 54px;
}
.tk-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(29,78,216,.48); }
.tk-btn:active { transform: translateY(0); }
.tk-btn:disabled { cursor: progress; opacity: .78; transform: none; }
.tk-btn .tk-spinner {
    width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
    border-radius: 50%; animation: tkSpin .7s linear infinite;
}
@keyframes tkSpin { to { transform: rotate(360deg); } }

/* ── Section scaffold ───────────────────────────────────────────────────── */
.tk-section { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 20px; }
.tk-section + .tk-section { margin-top: 28px; }

/* ── Inline status messages (alert / notice) ────────────────────────────── */
.tk-notice {
    margin-top: 16px; padding: 14px 18px; border-radius: 12px; display: flex; align-items: flex-start;
    gap: 12px; font-weight: 600; font-size: 14.5px; line-height: 1.5;
}
.tk-notice i { font-size: 18px; margin-top: 1px; flex: 0 0 auto; }
.tk-notice-error { background: var(--tk-danger-bg); color: #991b1b; border: 1px solid var(--tk-danger-border); }
.tk-notice-error i { color: var(--tk-danger); }
.tk-notice-warn { background: var(--tk-warning-bg); color: #92400e; border: 1px solid var(--tk-warning-border); }
.tk-notice-warn i { color: var(--tk-warning); }
.tk-notice-info { background: var(--tk-info-bg); color: #155e75; border: 1px solid var(--tk-info-border); }
.tk-notice-info i { color: var(--tk-info); }
.tk-notice-title { font-weight: 800; display: block; margin-bottom: 2px; }

/* ── Result card ────────────────────────────────────────────────────────── */
.tk-card {
    --tk-accent: var(--tk-primary);
    background: var(--tk-surface); border-radius: 18px; overflow: hidden;
    box-shadow: var(--tk-shadow-lg); border: 1px solid var(--tk-border-soft);
    animation: tkRise .4s ease both;
}
@keyframes tkRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.tk-card-head {
    display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px;
    padding: 24px 26px; background: linear-gradient(135deg, var(--tk-surface-2), #fff);
    border-bottom: 1px solid var(--tk-border-soft);
}
.tk-id-block { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tk-id-label { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--tk-faint); }
.tk-id-value { font-size: 21px; font-weight: 800; color: var(--tk-ink); letter-spacing: -.01em; word-break: break-all; }
.tk-id-meta { font-size: 12.5px; color: var(--tk-muted); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.tk-id-meta i { color: var(--tk-accent); }

.tk-badge {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 17px; border-radius: 999px;
    font-weight: 700; font-size: 13.5px; color: #fff; background: var(--tk-accent);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--tk-accent) 42%, transparent);
    white-space: nowrap;
}
.tk-badge i { font-size: 11px; }
.tk-badge.is-delivered { background: var(--tk-success); }
.tk-badge.is-out_for_delivery { background: var(--tk-accent); }
.tk-badge.is-in_transit { background: #6366f1; }
.tk-badge.is-arrived { background: var(--tk-info); }
.tk-badge.is-returned, .tk-badge.is-cancelled, .tk-badge.is-lost { background: var(--tk-danger); }
.tk-badge.is-pending { background: var(--tk-muted); }

/* ── Route visual ───────────────────────────────────────────────────────── */
.tk-route {
    display: flex; align-items: stretch; gap: 12px; padding: 20px 26px;
    background: linear-gradient(135deg, var(--tk-surface-2), #eef4ff);
    border-bottom: 1px solid var(--tk-border-soft);
}
.tk-route-pt { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.tk-route-pt.dest { text-align: right; align-items: flex-end; }
.tk-route-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--tk-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tk-accent) 22%, transparent); margin-bottom: 7px; }
.tk-route-pt.dest .tk-route-dot { background: var(--tk-success); box-shadow: 0 0 0 4px rgba(22,163,74,.22); }
.tk-route-lbl { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--tk-faint); }
.tk-route-name { font-size: 15.5px; font-weight: 700; color: var(--tk-ink); word-break: break-word; }
.tk-route-line {
    flex: 0 0 auto; width: 70px; display: flex; align-items: center; justify-content: center;
    color: var(--tk-accent); position: relative;
}
.tk-route-line::before {
    content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px;
    background: repeating-linear-gradient(90deg, var(--tk-accent) 0 8px, transparent 8px 16px);
}
.tk-route-line i { background: #fff; padding: 3px 7px; font-size: 16px; position: relative; z-index: 1; border-radius: 6px; }

/* ── Summary detail grid ────────────────────────────────────────────────── */
.tk-body { padding: 24px 26px; }
.tk-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 26px; }
.tk-cell { background: var(--tk-surface-2); border-radius: 12px; padding: 14px 16px; border: 1px solid var(--tk-border-soft); }
.tk-cell-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tk-faint); margin-bottom: 5px; display: flex; align-items: center; gap: 6px; }
.tk-cell-label i { color: var(--tk-accent); font-size: 12px; }
.tk-cell-value { font-size: 15px; font-weight: 700; color: var(--tk-ink); word-break: break-word; }
.tk-cell-value .tk-soft { font-weight: 500; color: var(--tk-muted); }

/* ── Progress stepper ────────────────────────────────────────────────────── */
.tk-progress {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 4px;
    margin: 0 0 28px; padding: 22px 10px 10px;
    background: linear-gradient(180deg, var(--tk-surface-2), #fff); border-radius: 14px;
    border: 1px solid var(--tk-border-soft); position: relative;
}
.tk-progress::before { content: ''; position: absolute; top: 40px; left: 12%; right: 12%; height: 3px; background: var(--tk-border); border-radius: 3px; z-index: 0; }
.tk-progress::after {
    content: ''; position: absolute; top: 40px; left: 12%; width: var(--tk-fill, 0%); height: 3px;
    background: linear-gradient(90deg, var(--tk-accent), color-mix(in srgb, var(--tk-accent) 60%, #fff));
    border-radius: 3px; z-index: 1; transition: width .5s ease;
}
.tk-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; z-index: 2; min-width: 0; }
.tk-step-dot {
    width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 14px; background: #fff; border: 3px solid var(--tk-border); color: var(--tk-faint); transition: all .25s;
}
.tk-step.done .tk-step-dot { background: var(--tk-accent); border-color: var(--tk-accent); color: #fff; }
.tk-step.current .tk-step-dot {
    background: #fff; border-color: var(--tk-accent); color: var(--tk-accent); transform: scale(1.14);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--tk-accent) 18%, transparent);
}
.tk-step.current .tk-step-dot i { animation: tkPulse 1.7s ease-in-out infinite; }
.tk-step-name { font-size: 10.5px; font-weight: 700; color: var(--tk-faint); text-align: center; line-height: 1.2; max-width: 84px; }
.tk-step.done .tk-step-name, .tk-step.current .tk-step-name { color: var(--tk-ink); }
@keyframes tkPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.2); } }

/* ── Timeline ───────────────────────────────────────────────────────────── */
.tk-timeline-wrap { border-top: 1px solid var(--tk-border-soft); padding-top: 22px; }
.tk-timeline-title {
    font-size: 15px; font-weight: 800; color: var(--tk-ink); margin-bottom: 18px;
    display: flex; align-items: center; gap: 9px;
}
.tk-timeline-title i { color: var(--tk-accent); }
.tk-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tk-timeline::before { content: ''; position: absolute; left: 15px; top: 10px; bottom: 10px; width: 2px; background: var(--tk-border); }
.tk-tl-item { display: flex; gap: 16px; padding-bottom: 24px; position: relative; }
.tk-tl-item:last-child { padding-bottom: 0; }
.tk-tl-icon {
    flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 13px; background: #fff; border: 3px solid var(--tk-border);
    color: var(--tk-faint); z-index: 1; transition: all .25s;
}
.tk-tl-item.done .tk-tl-icon { background: var(--tk-accent); border-color: var(--tk-accent); color: #fff; }
.tk-tl-item.current .tk-tl-icon {
    background: #fff; border-color: var(--tk-accent); color: var(--tk-accent);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--tk-accent) 18%, transparent);
}
.tk-tl-item.current .tk-tl-icon i { animation: tkPulse 1.7s ease-in-out infinite; }
.tk-tl-body { flex: 1; min-width: 0; padding-top: 2px; }
.tk-tl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.tk-tl-status { font-weight: 800; color: var(--tk-ink); font-size: 15px; }
.tk-tl-time { font-size: 12.5px; color: var(--tk-faint); font-weight: 600; white-space: nowrap; }
.tk-tl-loc { font-size: 13px; color: var(--tk-text-soft); font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 5px; }
.tk-tl-loc i { color: var(--tk-accent); }
.tk-tl-desc { font-size: 13.5px; color: var(--tk-muted); line-height: 1.55; }
.tk-tl-by { font-size: 11.5px; color: var(--tk-faint); margin-top: 4px; font-style: italic; }
.tk-tl-item.current .tk-tl-body { background: color-mix(in srgb, var(--tk-accent) 6%, transparent); border-radius: 10px; margin: -6px -10px 0; padding: 8px 10px; }

/* ── Exception status block (returned/cancelled/lost) ───────────────────── */
.tk-exception {
    display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; margin-bottom: 24px;
    border-radius: 12px; background: var(--tk-danger-bg); border: 1px solid var(--tk-danger-border); color: #991b1b;
}
.tk-exception i { font-size: 20px; margin-top: 1px; }
.tk-exception strong { display: block; font-size: 15px; margin-bottom: 2px; }
.tk-exception span { font-size: 13.5px; color: #b91c1c; }

/* ── Empty state (initial, no search yet) ───────────────────────────────── */
.tk-empty {
    text-align: center; padding: 36px 24px; color: var(--tk-muted);
    background: var(--tk-surface); border-radius: 16px; border: 1px dashed var(--tk-border);
    box-shadow: var(--tk-shadow-sm);
}
.tk-empty-icon {
    width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 26px;
    background: var(--tk-surface-3); color: var(--tk-primary);
}
.tk-empty h3 { font-size: 17px; font-weight: 800; color: var(--tk-ink); margin-bottom: 6px; }
.tk-empty p { font-size: 14px; max-width: 380px; margin: 0 auto; }

/* ── Skeleton loading state ─────────────────────────────────────────────── */
.tk-skel { display: flex; flex-direction: column; gap: 14px; padding: 26px; }
.tk-skel-line { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--tk-surface-3) 25%, #eef2f7 37%, var(--tk-surface-3) 63%); background-size: 400% 100%; animation: tkShimmer 1.4s ease infinite; }
.tk-skel-line.short { width: 45%; } .tk-skel-line.med { width: 72%; } .tk-skel-line.long { width: 100%; }
@keyframes tkShimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ── Features strip ─────────────────────────────────────────────────────── */
.tk-features {
    width: 100%; max-width: 1040px; margin: 0 auto; padding: 48px 20px 8px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px;
}
.tk-feature {
    text-align: center; padding: 30px 22px; background: var(--tk-surface); border-radius: 16px;
    box-shadow: var(--tk-shadow-sm); border: 1px solid var(--tk-border-soft); transition: transform .2s, box-shadow .2s;
}
.tk-feature:hover { transform: translateY(-4px); box-shadow: var(--tk-shadow); }
.tk-feature .tk-feat-icon {
    width: 58px; height: 58px; margin: 0 auto 15px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center; font-size: 24px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe); color: var(--tk-primary);
}
.tk-feature h3 { font-size: 17px; font-weight: 800; margin-bottom: 7px; color: var(--tk-ink); }
.tk-feature p { color: var(--tk-muted); font-size: 14px; line-height: 1.6; }

/* ── Portal links ───────────────────────────────────────────────────────── */
.tk-portal-links { text-align: center; margin: 8px auto 0; max-width: 640px; padding: 0 20px; }
.tk-portal-links a {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; background: var(--tk-surface);
    border: 1.5px solid var(--tk-border); border-radius: 999px; color: var(--tk-ink); font-weight: 700; font-size: 14px;
    margin: 6px; transition: all .2s;
}
.tk-portal-links a:hover { border-color: var(--tk-primary); color: var(--tk-primary); text-decoration: none; transform: translateY(-2px); box-shadow: var(--tk-shadow-xs); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.tk-footer { background: var(--header, #0b1220); color: var(--tk-faint); padding: 38px 20px; margin-top: auto; text-align: center; }
/* How-tracking-works feature trio under the result area */
.tk-features { max-width: 980px; margin: 34px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tk-feature { background: #fff; border: 1px solid var(--tk-border); border-radius: 14px; padding: 20px; box-shadow: 0 2px 10px rgba(10, 15, 30, .05); }
.tk-feature-icon { width: 42px; height: 42px; border-radius: 10px; background: #e0f2fe; color: #0284c7; display: grid; place-items: center; font-size: 17px; margin-bottom: 11px; }
.tk-feature h3 { font-size: 15px; margin: 0 0 5px; }
.tk-feature p { font-size: 13px; color: var(--tk-faint); margin: 0; line-height: 1.45; }
@media (max-width: 768px) { .tk-features { grid-template-columns: 1fr; } }

.tk-footer .tk-footer-links { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; }
.tk-footer .tk-footer-links a { color: #cbd5e1; font-size: 14px; text-decoration: none; }
.tk-footer .tk-footer-links a:hover { color: #fff; text-decoration: none; }
.tk-footer .tk-footer-contact { margin-bottom: 12px; color: var(--tk-muted); font-size: 13px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.tk-footer .tk-footer-contact span { display: inline-flex; align-items: center; gap: 6px; }
.tk-footer .tk-footer-copy { font-size: 13px; color: #475569; }

/* ══ Responsive (SRS §67/§118 — mobile-first, no horizontal scroll) ══════ */
@media (max-width: 1024px) {
    .tk-hero { padding: 52px 20px 100px; }
}
@media (max-width: 768px) {
    .tk-card { border-radius: 16px; }
    .tk-card-head { padding: 20px 20px; }
    .tk-route { padding: 18px 20px; }
    .tk-body { padding: 20px 20px; }
    .tk-progress { flex-wrap: nowrap; overflow-x: auto; gap: 2px; padding: 20px 6px 10px; -webkit-overflow-scrolling: touch; }
    .tk-progress::-webkit-scrollbar { height: 4px; }
    .tk-progress::-webkit-scrollbar-thumb { background: var(--tk-border); border-radius: 4px; }
    .tk-step-name { font-size: 10px; max-width: 72px; }
    .tk-features { padding: 36px 20px 4px; gap: 18px; }
}
@media (max-width: 540px) {
    .tk-nav { padding: 11px 16px; }
    .tk-nav-brand .tk-nav-name { font-size: 16px; }
    .tk-nav-links a { padding: 7px 12px; font-size: 12.5px; }
    .tk-hero { padding: 44px 16px 92px; }
    .tk-search-card { margin-top: -48px; padding: 8px; }
    .tk-form { flex-direction: column; gap: 8px; }
    .tk-field { padding: 0 16px; }
    .tk-field input { font-size: 16px; padding: 15px 0; }
    .tk-btn { width: 100%; padding: 15px; }
    .tk-card-head { flex-direction: column; align-items: flex-start; }
    .tk-id-value { font-size: 18px; }
    .tk-route { flex-direction: column; gap: 8px; padding: 16px; }
    .tk-route-pt.dest { text-align: left; align-items: flex-start; }
    .tk-route-line { width: 100%; height: 28px; }
    .tk-route-line::before { left: 50%; right: auto; top: 0; bottom: 0; width: 2px; height: 100%;
        background: repeating-linear-gradient(180deg, var(--tk-accent) 0 8px, transparent 8px 16px); }
    .tk-summary { grid-template-columns: 1fr 1fr; gap: 10px; }
    .tk-cell { padding: 12px 13px; }
    .tk-tl-head { flex-direction: column; align-items: flex-start; gap: 2px; }
    .tk-tl-time { font-size: 12px; }
}
@media (max-width: 380px) {
    .tk-summary { grid-template-columns: 1fr; }
    .tk-hero h1 { font-size: 27px; }
    .tk-nav-links a span.tk-nav-label { display: none; }
    .tk-nav-links a { padding: 8px 11px; }
    .tk-nav-links a i { margin: 0; }
}
@media (max-width: 320px) {
    .tk-hero { padding: 38px 12px 86px; }
    .tk-card-head, .tk-route, .tk-body { padding-left: 16px; padding-right: 16px; }
    .tk-progress { padding: 18px 2px 8px; }
    .tk-step-dot { width: 32px; height: 32px; font-size: 12px; }
}

/* ── Print ──────────────────────────────────────────────────────────────── */
@media print {
    .tk-nav, .tk-hero, .tk-features, .tk-portal-links, .tk-footer, .tk-search-wrap { display: none !important; }
    body.tk-page { background: #fff; }
    .tk-card { box-shadow: none; border: 1px solid #ddd; }
}
