/**
 * GKSchools student typography system
 * One readable family, responsive sizes, comfortable line-height.
 */

:root {
    --gks-font: Inter, "Noto Sans Devanagari", "Nirmala UI", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --gks-fs-h1: clamp(1.875rem, 1.4vw + 1.45rem, 3.125rem);   /* 30–50 */
    --gks-fs-h2: clamp(1.625rem, 1.1vw + 1.25rem, 2.25rem);    /* 26–36 */
    --gks-fs-h3: clamp(1.375rem, 0.7vw + 1.15rem, 1.75rem);    /* 22–28 */
    --gks-fs-h4: clamp(1.1875rem, 0.4vw + 1.08rem, 1.5rem);    /* 19–24 */
    --gks-fs-sub: clamp(1.0625rem, 0.3vw + 1rem, 1.25rem);     /* 17–20 */
    --gks-fs-body: clamp(1.0625rem, 0.2vw + 1.02rem, 1.125rem);/* 17–18 */
    --gks-fs-small: clamp(0.875rem, 0.15vw + 0.84rem, 1rem);   /* 14–16 */
    --gks-fs-btn: clamp(0.9375rem, 0.2vw + 0.9rem, 1.0625rem); /* 15–17 */
    --gks-lh-head: 1.22;
    --gks-lh-body: 1.65;
    --gks-fw-regular: 400;
    --gks-fw-medium: 500;
    --gks-fw-semibold: 600;
    --gks-fw-bold: 700;
    --gks-fw-extrabold: 800;
}

@media (max-width: 991px) {
    :root {
        --gks-fs-h1: clamp(1.35rem, 4.8vw + 0.35rem, 1.7rem);   /* ~22–27 */
        --gks-fs-h2: clamp(1.15rem, 3.4vw + 0.4rem, 1.4rem);    /* ~18–22 */
        --gks-fs-h3: clamp(1.05rem, 2.6vw + 0.45rem, 1.25rem);  /* ~17–20 */
        --gks-fs-h4: clamp(1rem, 1.8vw + 0.55rem, 1.125rem);    /* ~16–18 */
        --gks-fs-sub: clamp(0.95rem, 1.4vw + 0.55rem, 1.0625rem);
        --gks-fs-body: clamp(0.9375rem, 1.1vw + 0.62rem, 1rem); /* 15–16 */
        --gks-fs-small: clamp(0.75rem, 1vw + 0.52rem, 0.875rem); /* 12–14 */
        --gks-fs-btn: clamp(0.8125rem, 1.2vw + 0.55rem, 0.9375rem); /* 13–15 */
        --gks-lh-head: 1.28;
        --gks-lh-body: 1.55;
    }
}

@media (max-width: 380px) {
    :root {
        --gks-fs-h1: 1.25rem;
        --gks-fs-h2: 1.125rem;
        --gks-fs-body: 0.9375rem;
        --gks-fs-small: 0.75rem;
        --gks-fs-btn: 0.8125rem;
    }
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--gks-font) !important;
    font-size: var(--gks-fs-body) !important;
    font-weight: var(--gks-fw-regular);
    line-height: var(--gks-lh-body);
    letter-spacing: 0.01em;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--gks-font);
    font-weight: var(--gks-fw-extrabold);
    line-height: var(--gks-lh-head);
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h1 { font-size: var(--gks-fs-h1); }
h2 { font-size: var(--gks-fs-h2); }
h3 { font-size: var(--gks-fs-h3); }
h4 { font-size: var(--gks-fs-h4); }
h5, h6 { font-size: var(--gks-fs-sub); font-weight: var(--gks-fw-bold); }

p {
    line-height: var(--gks-lh-body);
    margin-top: 0;
}

p + p {
    margin-top: 0.85em;
}

li {
    line-height: var(--gks-lh-body);
}

small,
.small,
.meta,
.muted {
    font-size: var(--gks-fs-small);
    line-height: 1.5;
}

a {
    text-underline-offset: 0.15em;
}

button,
.btn,
input[type="submit"],
input[type="button"],
.gks-btn,
.footer-cta-btn,
.btn-cta-nav,
.nc-btn,
.search-submit-btn {
    font-family: var(--gks-font);
    font-size: var(--gks-fs-btn);
    font-weight: var(--gks-fw-bold);
    line-height: 1.3;
}

input,
select,
textarea {
    font-family: var(--gks-font);
    font-size: var(--gks-fs-body);
    line-height: 1.45;
}

label {
    font-family: var(--gks-font);
    font-size: var(--gks-fs-small);
    font-weight: var(--gks-fw-semibold);
    line-height: 1.45;
}

table {
    font-size: var(--gks-fs-body);
}

th, td {
    line-height: 1.5;
}

article p,
.gks-copy p,
.gks-content-card p,
.kl-story p,
.nc-note p,
.c6-note p {
    max-width: 70ch;
}

/* Header / nav */
.gks-premium-header,
.header-container,
.desktop-navbar,
.mobile-navigation-drawer,
.gks-premium-footer,
.gks-home,
.gks-sitemap,
.gks-study-main,
.search-overlay-modal,
.upp-page,
.exm-page,
.upb-page,
.kl-page,
.ots-wrap,
.sgk-page,
.nc-page,
.c6-page,
.gks-quiz-page {
    font-family: var(--gks-font) !important;
    font-size: var(--gks-fs-body);
}

.nav-item-link {
    font-size: var(--gks-fs-btn);
}

.column-title {
    font-size: 11px;
    color: #fff;
}

.mega-column a,
.standard-drop-link,
.login-nav-link {
    font-size: 13px;
}

.mega-column a .mega-hint {
    font-size: 11px;
    line-height: 1.3;
}

.mobile-navigation-drawer .collapse-toggle,
.mobile-nav-links a {
    font-size: 15px;
    line-height: 1.4;
}

/* Homepage */
.gks-kicker {
    font-size: var(--gks-fs-small);
}

.gks-hero h1 {
    font-size: var(--gks-fs-h1);
    line-height: var(--gks-lh-head);
    max-width: 18ch;
}

.gks-hero p.lead {
    font-size: var(--gks-fs-sub);
    line-height: 1.55;
}

.gks-today h2 {
    font-size: var(--gks-fs-h3);
}

.gks-today p,
.gks-count {
    font-size: var(--gks-fs-small);
    line-height: 1.55;
}

.gks-path {
    font-size: var(--gks-fs-small);
}

.gks-search-hero input,
.gks-search-hero button {
    font-size: var(--gks-fs-body);
}

.gks-section h2 {
    font-size: var(--gks-fs-h2);
    line-height: var(--gks-lh-head);
}

.gks-section .gks-lead,
.gks-copy,
.gks-faq p,
.gks-faq summary {
    font-size: var(--gks-fs-body);
    line-height: var(--gks-lh-body);
}

.gks-copy h3 {
    font-size: var(--gks-fs-h4);
}

.gks-card strong,
.gks-step strong {
    font-size: var(--gks-fs-sub);
    line-height: 1.3;
}

.gks-card span,
.gks-step span,
.gks-card .meta,
.gks-card em {
    font-size: var(--gks-fs-small);
    line-height: 1.5;
}

.gks-chip,
.gks-btn {
    font-size: var(--gks-fs-btn);
}

/* Footer */
.cta-text h3 {
    font-size: var(--gks-fs-h3);
}

.cta-text p,
.footer-column ul li a,
.footer-heading,
.bottom-links a,
.copyright-text {
    font-size: var(--gks-fs-small);
    line-height: 1.5;
}

.footer-heading {
    font-size: var(--gks-fs-small);
    letter-spacing: 0.03em;
}

/* Breadcrumbs */
.gks-breadcrumb,
.nc-crumb,
.c6-crumb,
.kl-crumb {
    font-size: var(--gks-fs-small);
    line-height: 1.45;
}

/* Study / article / quiz cards */
.gks-study-hero h1 {
    font-size: var(--gks-fs-h1);
}

.gks-content-card h2 {
    font-size: var(--gks-fs-h2);
}

.gks-content-card h3 {
    font-size: var(--gks-fs-h3);
}

.gks-content-card,
.gks-sidebar-list a,
.gks-hero-intro,
.gks-qcard,
.qus_border,
.radiodiv1,
.my-content-div2 {
    font-size: var(--gks-fs-body);
    line-height: var(--gks-lh-body);
}

/* Search modal */
.search-modal-input,
.search-submit-btn,
.popular-searches-box a {
    font-size: var(--gks-fs-body);
}

/* Keep compact UI chrome readable, never below 14px */
.gks-stat-pill .label,
.result-stat-pill .label,
.gks-category-badge {
    font-size: var(--gks-fs-small);
}

@media (max-width: 767px) {
    .gks-hero h1 {
        max-width: none;
    }
    .gks-card,
    .gks-step {
        min-height: 0;
    }
    .gks-study-hero h1,
    .gks-content-card h2,
    .gks-content-card h3,
    .gks-qcard-title {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .gks-chip,
    .gks-btn,
    .gks-study-hero-cta {
        font-family: var(--gks-font);
        font-size: var(--gks-fs-btn);
    }
    article p,
    .gks-copy p,
    .gks-content-card p,
    .gks-hero-intro {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body {
        letter-spacing: 0;
    }
}
