:root {
    --th-bg: #f8fafc;
    --th-surface: #ffffff;
    --th-text: #0f172a;
    --th-muted: #64748b;
    --th-border: #e2e8f0;
    --th-primary: #0f766e;
    --th-primary-dark: #115e59;
    --th-accent: #f59e0b;
    --th-radius: 18px;
    --th-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--th-bg);
    color: var(--th-text);
    font-family: "Hind Siliguri", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
img { max-width: 100%; }
a { color: inherit; }

.th-container {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

/* One global header system for both legacy and v2 pages. */
.th-nav {
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--th-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(14px);
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.035);
}

.th-nav__inner {
    width: min(1240px, calc(100% - 32px));
    min-height: 72px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}

.th-brand {
    display: inline-flex;
    align-items: center;
    font-size: 1.55rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.025em;
    text-decoration: none;
    color: var(--th-text);
    white-space: nowrap;
}
.th-brand--footer { color: #fff; display: inline-block; margin-bottom: 8px; }
.th-brand__accent { color: var(--th-primary); }

.th-nav__menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-width: 0;
}

.th-nav__link,
.th-nav__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 11px;
    text-decoration: none;
    font-weight: 700;
    font-size: .94rem;
    line-height: 1;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.th-nav__link {
    color: #334155;
    padding: 0 12px;
}
.th-nav__link:hover,
.th-nav__link.is-active {
    background: #ecfdf5;
    color: var(--th-primary-dark);
}

.th-nav__cta {
    margin-left: 6px;
    padding: 0 16px;
    background: var(--th-primary);
    color: #fff;
    box-shadow: 0 7px 18px rgba(15,118,110,.14);
}
.th-nav__cta:hover {
    background: var(--th-primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.th-nav__toggle {
    display: none;
    place-items: center;
    border: 1px solid var(--th-border);
    background: var(--th-surface);
    color: #334155;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1rem;
}

.th-hero {
    padding: 72px 0 48px;
    background: linear-gradient(180deg, #ecfdf5 0%, #f8fafc 100%);
}
.th-hero--compact { padding-bottom: 40px; }

.th-hero__eyebrow {
    color: var(--th-primary);
    font-weight: 800;
    margin-bottom: 12px;
}

.th-hero h1 {
    max-width: 820px;
    font-size: clamp(2.1rem, 5vw, 4.4rem);
    line-height: 1.08;
    margin: 0 0 20px;
}

.th-hero--compact h1 { font-size: clamp(2rem, 4vw, 3.4rem); }

.th-hero p {
    max-width: 720px;
    color: #475569;
    font-size: 1.1rem;
    line-height: 1.8;
}

.th-hero__actions,
.th-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.th-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
}
.th-button--primary,
.th-button:not(.th-button--secondary) { background: var(--th-primary); color: #fff; }
.th-button--primary:hover,
.th-button:not(.th-button--secondary):hover { background: var(--th-primary-dark); }
.th-button--secondary { background: #fff; border: 1px solid var(--th-border); color: var(--th-text); }

.th-section { padding: 56px 0; }
.th-section--surface { background: #fff; }

.th-section__heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 24px;
}

.th-section__heading h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.th-section__heading p {
    margin: 6px 0 0;
    color: var(--th-muted);
}

.th-section__heading > a {
    color: var(--th-primary);
    font-weight: 800;
    text-decoration: none;
}

.th-tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.th-tool-card {
    display: flex;
    gap: 14px;
    padding: 22px;
    background: var(--th-surface);
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.th-tool-card:hover,
.th-article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--th-shadow);
    border-color: #a7f3d0;
}

.th-tool-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #ecfdf5;
    color: var(--th-primary);
    flex: 0 0 auto;
}

.th-tool-card__body { display: flex; flex-direction: column; min-width: 0; }
.th-tool-card__title { font-size: 1.05rem; margin-bottom: 7px; }
.th-tool-card__description { color: var(--th-muted); line-height: 1.55; font-size: .92rem; }
.th-tool-card__cta { margin-top: auto; padding-top: 16px; color: var(--th-primary); font-weight: 700; font-size: .9rem; }

.th-article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.th-article-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.th-article-card__image-wrap {
    display: block;
    background: #e2e8f0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.th-article-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.th-article-card__body { padding: 20px; }
.th-article-card__meta {
    display: flex;
    gap: 10px;
    color: var(--th-muted);
    font-size: .78rem;
    margin-bottom: 10px;
}
.th-article-card h3 {
    margin: 0 0 10px;
    font-size: 1.08rem;
    line-height: 1.45;
}
.th-article-card h3 a { text-decoration: none; }
.th-article-card p {
    margin: 0;
    color: var(--th-muted);
    line-height: 1.65;
    font-size: .92rem;
}
.th-article-card__cta {
    display: inline-block;
    margin-top: 16px;
    color: var(--th-primary);
    font-weight: 800;
    text-decoration: none;
}

.th-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}
.th-filter-chip {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 9px 13px;
    background: #fff;
    border: 1px solid var(--th-border);
    border-radius: 999px;
    text-decoration: none;
    color: #475569;
    font-weight: 700;
}
.th-filter-chip span { color: #94a3b8; font-size: .78rem; }
.th-filter-chip.is-active {
    color: #fff;
    background: var(--th-primary);
    border-color: var(--th-primary);
}
.th-filter-chip.is-active span { color: #d1fae5; }

.th-empty-state {
    border: 1px dashed var(--th-border);
    border-radius: var(--th-radius);
    background: #fff;
    padding: 48px 36px;
    text-align: center;
    color: var(--th-muted);
}
.th-empty-state h1 { margin: 0 0 10px; color: var(--th-text); }
.th-empty-state p { margin: 0; }
.th-empty-state__code {
    color: var(--th-primary);
    font-size: clamp(3rem, 9vw, 7rem);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.05em;
    margin-bottom: 16px;
}
.th-empty-state .th-actions { justify-content: center; }

.th-ad-slot {
    margin: 28px auto;
    padding: 14px;
    border: 1px solid var(--th-border);
    border-radius: 14px;
    background: #fff;
    min-height: 90px;
}

.th-ad-slot__label {
    display: block;
    text-align: center;
    color: #94a3b8;
    font-size: .72rem;
    margin-bottom: 8px;
}

.th-footer {
    padding: 48px 0 20px;
    background: #0f172a;
    color: #cbd5e1;
}
.th-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr .8fr 1fr;
    gap: 36px;
}
.th-footer strong { color: #fff; }
.th-footer p { max-width: 720px; line-height: 1.7; }
.th-footer ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.th-footer a { color: inherit; text-decoration: none; }
.th-footer a:hover { color: #fff; }
.th-footer__bottom {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid #334155;
    font-size: .85rem;
    color: #94a3b8;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1120px) {
    .th-nav__link { padding-inline: 9px; font-size: .9rem; }
    .th-nav__cta { padding-inline: 13px; font-size: .9rem; }
    .th-nav__inner { gap: 18px; }
}

@media (max-width: 980px) {
    .th-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .th-article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .th-footer__grid { grid-template-columns: 1fr 1fr; }
    .th-nav__toggle { display: inline-grid; }
    .th-nav__menu {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 16px;
        right: 16px;
        padding: 12px;
        background: #fff;
        border: 1px solid var(--th-border);
        border-radius: 16px;
        box-shadow: var(--th-shadow);
        flex-direction: column;
        align-items: stretch;
        gap: 3px;
    }
    .th-nav__menu.is-open { display: flex; }
    .th-nav__link,.th-nav__cta { justify-content:flex-start; min-height:44px; padding:0 13px; margin-left:0; }
}

@media (max-width: 560px) {
    .th-tool-grid,
    .th-article-grid,
    .th-footer__grid { grid-template-columns: 1fr; }
    .th-nav__inner { width:min(100% - 24px,1240px); min-height:66px; }
    .th-brand { font-size:1.4rem; }
    .th-hero { padding-top: 46px; }
    .th-section { padding: 40px 0; }
    .th-section__heading { align-items: flex-start; flex-direction: column; }
}
