/* ============================================================
   Tracking — public pages base + iHub theme
   Self-contained scope under .tp-page; no Bootstrap overrides.
   ============================================================ */

.tp-page {
    --ink: #0F1E33;
    --ink-soft: #4B5A70;
    --ink-mute: #8A95A5;
    --paper: #F7F4ED;
    --surface: #FFFFFF;
    --surface-alt: #FBF8F1;
    --line: #E5DED1;
    --brand: #1E5BB8;
    --brand-deep: #143F84;
    --brand-soft: #DCE7F7;
    --accent: #F25C2B;
    --accent-soft: #FCE2D5;
    --success: #1F7A4D;
    --success-soft: #DBEFE3;
    --danger: #B73121;
    --danger-soft: #F6DDD8;

    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 20px;
    --r-xl: 28px;

    --shadow-sm: 0 1px 2px rgba(15, 30, 51, .06), 0 1px 3px rgba(15, 30, 51, .05);
    --shadow-md: 0 8px 24px -10px rgba(15, 30, 51, .14), 0 2px 6px rgba(15, 30, 51, .05);
    --shadow-lg: 0 24px 60px -24px rgba(15, 30, 51, .25);

    --font-display: 'Sofia Sans Semi Condensed', 'Sofia Sans', system-ui, -apple-system, sans-serif;
    --font-body: 'Sofia Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    min-height: 100vh;
    background-color: var(--paper);
    background-image:
        radial-gradient(60% 40% at 85% -10%, rgba(30, 91, 184, .08), transparent 60%),
        radial-gradient(50% 35% at 5% 110%, rgba(242, 92, 43, .07), transparent 60%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.tp-page * { box-sizing: border-box; }

.tp-page a { color: var(--brand); text-decoration: none; }
.tp-page a:hover { text-decoration: underline; }

/* Layout */
.tp-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 24px 64px;
}

@media (max-width: 640px) {
    .tp-shell { padding: 16px 14px 48px; }
}

/* Brand header */
.tp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0 28px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 36px;
}
.tp-header__logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.01em;
}
.tp-header__logo img { height: 36px; width: auto; display: block; }
.tp-header__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 500;
    letter-spacing: 0.02em;
}
.tp-header__chip::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--success);
}

/* Hero (no project state) */
.tp-hero {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
    align-items: center;
    padding: 32px 0 16px;
}
@media (max-width: 880px) {
    .tp-hero { grid-template-columns: 1fr; gap: 28px; }
}
.tp-hero__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(40px, 6.4vw, 68px);
    line-height: 0.98;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin: 0 0 16px;
}
.tp-hero__title em {
    font-style: italic;
    color: var(--brand);
    font-weight: 700;
}
.tp-hero__lede {
    font-size: 17px;
    color: var(--ink-soft);
    max-width: 38ch;
    margin: 0 0 8px;
}

/* Search card */
.tp-search-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 28px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.tp-search-card::before {
    content: "";
    position: absolute;
    inset: -1px -1px auto auto;
    width: 110px; height: 110px;
    background: radial-gradient(circle at 80% 20%, var(--accent), transparent 60%);
    opacity: 0.18;
    border-top-right-radius: var(--r-xl);
    pointer-events: none;
}
.tp-search-card__label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-mute);
    font-weight: 600;
    margin-bottom: 10px;
}
.tp-search-card__input-wrap {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.tp-search-card__input {
    flex: 1;
    appearance: none;
    border: 2px solid var(--line);
    background: var(--surface-alt);
    border-radius: var(--r-md);
    padding: 14px 16px;
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--ink);
    width: 100%;
    transition: border-color .15s, box-shadow .15s, background .15s;
    letter-spacing: 0.04em;
}
.tp-search-card__input::placeholder { color: var(--ink-mute); letter-spacing: 0.06em; }
.tp-search-card__input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}
.tp-search-card__btn {
    appearance: none;
    border: 0;
    background: var(--ink);
    color: var(--surface);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    padding: 0 22px;
    border-radius: var(--r-md);
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: transform .15s, background .15s;
    white-space: nowrap;
}
.tp-search-card__btn:hover { background: var(--brand); transform: translateY(-1px); }
.tp-search-card__btn:active { transform: translateY(0); }

.tp-search-card__hint {
    margin-top: 12px;
    font-size: 13px;
    color: var(--ink-mute);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

.tp-alert {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    border: 1px solid var(--danger-soft);
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.tp-alert::before {
    content: "!";
    flex: 0 0 22px;
    width: 22px; height: 22px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    font-weight: 700;
    font-size: 14px;
}

/* ===== Status board (project found) ===== */
.tp-board {
    margin-top: 8px;
    display: grid;
    gap: 24px;
}

/* Headline row */
.tp-headline {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px 32px;
    align-items: start;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.tp-headline::before {
    content: "";
    position: absolute; inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
}
@media (max-width: 720px) {
    .tp-headline { grid-template-columns: 1fr; padding: 24px; }
}

.tp-headline__eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-mute);
    font-weight: 700;
    margin-bottom: 8px;
}
.tp-headline__number {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.02em;
    word-break: break-all;
}
.tp-copy-btn {
    appearance: none;
    border: 1px solid var(--line);
    background: var(--surface-alt);
    border-radius: var(--r-sm);
    padding: 4px 10px;
    font-size: 12px;
    color: var(--ink-soft);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all .15s;
}
.tp-copy-btn:hover { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.tp-copy-btn[data-copied="true"] { background: var(--success); color: #fff; border-color: var(--success); }

.tp-headline__meta {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    color: var(--ink-soft);
    font-size: 14px;
}
.tp-headline__meta-item dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    font-weight: 600;
    margin-bottom: 4px;
}
.tp-headline__meta-item dd { margin: 0; font-weight: 500; color: var(--ink); }

.tp-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.02em;
    background: var(--brand-soft);
    color: var(--brand-deep);
    border: 1px solid transparent;
    white-space: nowrap;
}
.tp-pill::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 3px rgba(30, 91, 184, 0.18);
}
.tp-pill[data-tone="success"] { background: var(--success-soft); color: var(--success); }
.tp-pill[data-tone="success"]::before { background: var(--success); box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.18); }
.tp-pill[data-tone="danger"] { background: var(--danger-soft); color: var(--danger); }
.tp-pill[data-tone="danger"]::before { background: var(--danger); box-shadow: 0 0 0 3px rgba(183, 49, 33, 0.18); }
.tp-pill[data-tone="accent"] { background: var(--accent-soft); color: var(--accent); }
.tp-pill[data-tone="accent"]::before { background: var(--accent); box-shadow: 0 0 0 3px rgba(242, 92, 43, 0.18); }

/* ===== Stepper ===== */
.tp-stepper {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 32px 32px 28px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    position: relative;
}
.tp-stepper__title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-mute);
    font-weight: 700;
    margin: 0 0 22px;
}
.tp-stepper__track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: relative;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}
.tp-step {
    position: relative;
    text-align: center;
    padding-top: 28px;
    color: var(--ink-mute);
    opacity: 0;
    animation: tpFadeUp .4s ease-out forwards;
}
.tp-step:nth-child(1) { animation-delay: 0ms; }
.tp-step:nth-child(2) { animation-delay: 80ms; }
.tp-step:nth-child(3) { animation-delay: 160ms; }
.tp-step:nth-child(4) { animation-delay: 240ms; }

.tp-step__dot {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: var(--surface);
    z-index: 2;
    transition: all .3s;
}
.tp-step__icon {
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: transparent;
    font-size: 12px;
    line-height: 1;
}
.tp-step__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-mute);
    letter-spacing: 0.01em;
}
.tp-step__sub {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    margin-top: 2px;
    font-weight: 600;
    opacity: 0.75;
}

/* connector lines */
.tp-step::before {
    content: "";
    position: absolute;
    top: 10px; left: -50%;
    width: 100%; height: 2px;
    background: var(--line);
    z-index: 1;
}
.tp-step:first-child::before { display: none; }

/* states */
.tp-step[data-state="done"] .tp-step__dot {
    background: var(--brand);
    border-color: var(--brand);
}
.tp-step[data-state="done"] .tp-step__icon { color: #fff; }
.tp-step[data-state="done"] + .tp-step::before { background: var(--brand); }
.tp-step[data-state="done"] .tp-step__label { color: var(--ink); }

.tp-step[data-state="current"] .tp-step__dot {
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 0 0 rgba(242, 92, 43, 0.45);
    animation: tpPulse 2.4s ease-in-out infinite;
}
.tp-step[data-state="current"] .tp-step__icon { color: var(--accent); }
.tp-step[data-state="current"] .tp-step__label { color: var(--ink); font-weight: 700; }

.tp-stepper[data-state="exception"] .tp-step[data-state="current"] .tp-step__dot {
    border-color: var(--danger);
    animation-name: tpPulseDanger;
}
.tp-stepper[data-state="exception"] .tp-step[data-state="current"] .tp-step__icon { color: var(--danger); }

@keyframes tpPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(242, 92, 43, 0.45); }
    50%      { box-shadow: 0 0 0 10px rgba(242, 92, 43, 0); }
}
@keyframes tpPulseDanger {
    0%, 100% { box-shadow: 0 0 0 0 rgba(183, 49, 33, 0.45); }
    50%      { box-shadow: 0 0 0 10px rgba(183, 49, 33, 0); }
}
@keyframes tpFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes tpSlideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

@media (max-width: 720px) {
    .tp-stepper { padding: 24px 16px 20px; }
    .tp-step__label { font-size: 12px; }
    .tp-step__sub { display: none; }
}

/* ===== Timeline ===== */
.tp-timeline {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}
.tp-timeline__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    margin: 0 0 24px;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.tp-timeline__list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}
.tp-timeline__item {
    position: relative;
    padding: 12px 12px 18px 36px;
    border-radius: var(--r-md);
    transition: background .15s;
    opacity: 0;
    animation: tpSlideIn .3s ease-out forwards;
}
.tp-timeline__item:nth-child(1) { animation-delay: 200ms; }
.tp-timeline__item:nth-child(2) { animation-delay: 260ms; }
.tp-timeline__item:nth-child(3) { animation-delay: 320ms; }
.tp-timeline__item:nth-child(4) { animation-delay: 380ms; }
.tp-timeline__item:nth-child(n+5) { animation-delay: 440ms; }

.tp-timeline__item:hover { background: var(--surface-alt); }

/* Dot — vertically centered on the date row */
.tp-timeline__item::before {
    content: "";
    position: absolute;
    left: 6px; top: 18px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--line);
    z-index: 2;
}
.tp-timeline__item[aria-current="true"]::before {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.tp-timeline__item[data-tone="exception"]::before {
    background: var(--danger);
    border-color: var(--danger);
}

/* Connector line — drawn from each item's dot down to the next item; last item has no connector */
.tp-timeline__item::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 32px;
    bottom: -2px;
    width: 2px;
    background: var(--line);
    border-radius: 2px;
    z-index: 1;
}
.tp-timeline__item:first-child::after {
    background: linear-gradient(180deg, var(--accent), var(--line) 60%);
}
.tp-timeline__item:last-child::after { display: none; }

.tp-timeline__date {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-mute);
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.tp-timeline__status {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.35;
}
.tp-timeline__office {
    margin-top: 4px;
    font-size: 13px;
    color: var(--ink-soft);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tp-timeline__office::before {
    content: "↦";
    color: var(--ink-mute);
    font-weight: 700;
}
.tp-timeline__partner-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    background: var(--brand-soft);
    color: var(--brand-deep);
    vertical-align: middle;
}
.tp-timeline__empty {
    padding: 28px;
    text-align: center;
    color: var(--ink-mute);
    font-style: italic;
}

/* Footer */
.tp-footer {
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--ink-mute);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* Print */
@media print {
    .tp-page { background: #fff; }
    .tp-search-card, .tp-header__chip, .tp-copy-btn, .tp-footer { display: none !important; }
    .tp-headline, .tp-stepper, .tp-timeline {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    .tp-step[data-state="current"] .tp-step__dot { animation: none; }
    .tp-timeline__item { animation: none; opacity: 1; }
    .tp-step { animation: none; opacity: 1; }
}

/* Accessibility focus ring uniform */
.tp-page :focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}
