/**
 * Nipun Schools — Learning Resources (hub, guide articles, homepage content blocks).
 * Uses the global tokens from hp-design-tokens.css.
 */

.ng-wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.ng-narrow { width: min(780px, 100% - 32px); margin-inline: auto; }

/* ---------- Shared section heads ---------- */
.ng-section { padding: clamp(48px, 6vw, 88px) 0; }
.ng-section--soft { background: var(--hp-soft, #f4f6f8); }
.ng-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--hp-brand, #1a4a8c); margin: 0 0 10px;
}
.ng-section-head { max-width: 760px; margin: 0 0 32px; }
.ng-section-head--center { margin-inline: auto; text-align: center; }
.ng-section-head h2 {
    font-family: var(--hp-font-display, Georgia, serif);
    font-size: clamp(1.7rem, 2.6vw + .6rem, 2.5rem); line-height: 1.15;
    color: var(--hp-navy, #0b1f3a); margin: 0 0 12px;
}
.ng-section-head p { color: var(--hp-muted, #5b6575); font-size: 1.05rem; line-height: 1.65; margin: 0; }

/* ---------- Audience columns (homepage + hub) ---------- */
.ng-audience-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ng-audience {
    background: #fff; border: 1px solid var(--hp-border, #e2e6ec); border-radius: 18px;
    padding: 26px 24px 22px; display: flex; flex-direction: column;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.ng-audience-icon {
    width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
    background: var(--hp-brand-soft, #eef2f7); color: var(--hp-brand, #1a4a8c); font-size: 1.2rem; margin-bottom: 14px;
}
.ng-audience h3 { font-size: 1.25rem; color: var(--hp-navy, #0b1f3a); margin: 0 0 6px; }
.ng-audience > p { color: var(--hp-muted, #5b6575); margin: 0 0 14px; line-height: 1.55; }
.ng-audience ul { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 2px; }
.ng-audience li a {
    display: flex; gap: 10px; align-items: flex-start; padding: 9px 0;
    color: var(--hp-ink, #0f172a); text-decoration: none; font-weight: 600; line-height: 1.4;
    border-bottom: 1px dashed var(--hp-border, #e2e6ec);
}
.ng-audience li:last-child a { border-bottom: 0; }
.ng-audience li a i { color: var(--hp-gold, #c4a35a); margin-top: 4px; font-size: .8rem; }
.ng-audience li a:hover { color: var(--hp-brand, #1a4a8c); }
.ng-audience-more { margin-top: auto; font-weight: 700; color: var(--hp-brand, #1a4a8c); text-decoration: none; }
.ng-audience-more:hover { text-decoration: underline; }

/* ---------- Guide cards ---------- */
.ng-card-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ng-card {
    position: relative; background: #fff; border: 1px solid var(--hp-border, #e2e6ec); border-radius: 16px;
    padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .2s, transform .2s;
}
.ng-card:hover { box-shadow: 0 12px 30px rgba(11, 31, 58, .08); transform: translateY(-2px); }
.ng-card-meta { display: flex; gap: 10px; align-items: center; font-size: .8rem; color: var(--hp-muted, #5b6575); }
.ng-card-tag {
    display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .72rem;
    letter-spacing: .04em; text-transform: uppercase; background: var(--hp-brand-soft, #eef2f7); color: var(--hp-brand, #1a4a8c);
}
.ng-card-tag--students { background: #ecfdf5; color: #047857; }
.ng-card-tag--schools { background: #fff7ed; color: #c2410c; }
.ng-card h3 { margin: 0; font-size: 1.12rem; line-height: 1.35; }
.ng-card h3 a { color: var(--hp-navy, #0b1f3a); text-decoration: none; }
.ng-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.ng-card h3 a:focus-visible { outline: none; }
.ng-card h3 a:focus-visible::after { outline: 3px solid var(--hp-brand, #1a4a8c); outline-offset: 2px; }
.ng-card p { margin: 0; color: var(--hp-muted, #5b6575); line-height: 1.55; font-size: .95rem; }
.ng-card-read { margin-top: auto; font-weight: 700; color: var(--hp-brand, #1a4a8c); font-size: .9rem; }

/* ---------- Homepage quick-help tips ---------- */
.ng-tips-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ng-tip { background: #fff; border-radius: 18px; padding: 26px; border-top: 4px solid var(--hp-brand, #1a4a8c); }
.ng-tip--students { border-top-color: #059669; }
.ng-tip--schools { border-top-color: var(--hp-orange, #ea580c); }
.ng-tip h3 { margin: 0 0 12px; font-size: 1.15rem; color: var(--hp-navy, #0b1f3a); }
.ng-tip ol { margin: 0 0 14px; padding-left: 1.2em; display: grid; gap: 8px; color: var(--hp-ink, #0f172a); line-height: 1.55; }
.ng-tip a { font-weight: 700; color: var(--hp-brand, #1a4a8c); }

/* ---------- About block ---------- */
.ng-about { display: grid; gap: 40px; grid-template-columns: 1.2fr 1fr; align-items: start; }
.ng-about-copy p { color: var(--hp-ink, #0f172a); line-height: 1.75; margin: 0 0 14px; font-size: 1.02rem; }
.ng-facts { background: var(--hp-soft, #f4f6f8); border-radius: 18px; padding: 24px; margin: 0; }
.ng-facts div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hp-border, #e2e6ec); }
.ng-facts div:last-child { border-bottom: 0; }
.ng-facts dt { font-weight: 700; color: var(--hp-navy, #0b1f3a); }
.ng-facts dd { margin: 0; color: var(--hp-muted, #5b6575); }

/* ---------- Hub hero ---------- */
.ng-hub-hero { padding: clamp(40px, 6vw, 80px) 0 32px; background: linear-gradient(180deg, #eef2f7 0%, #fff 100%); }
.ng-hub-hero h1 {
    font-family: var(--hp-font-display, Georgia, serif); font-size: clamp(2rem, 3.4vw + .6rem, 3.1rem);
    color: var(--hp-navy, #0b1f3a); margin: 0 0 14px; line-height: 1.1;
}
.ng-hub-hero p { font-size: 1.12rem; color: var(--hp-muted, #5b6575); max-width: 720px; line-height: 1.65; margin: 0; }
.ng-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ng-jump a {
    padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--hp-border, #e2e6ec);
    color: var(--hp-navy, #0b1f3a); font-weight: 600; text-decoration: none;
}
.ng-jump a:hover { border-color: var(--hp-brand, #1a4a8c); color: var(--hp-brand, #1a4a8c); }
.ng-hub-cat { padding: 36px 0; scroll-margin-top: 110px; }
.ng-hub-cat h2 { display: flex; align-items: center; gap: 12px; font-size: 1.6rem; color: var(--hp-navy, #0b1f3a); margin: 0 0 6px; }
.ng-hub-cat > .ng-wrap > p { color: var(--hp-muted, #5b6575); margin: 0 0 22px; }

/* ---------- Breadcrumb ---------- */
.ng-crumbs { font-size: .88rem; color: var(--hp-muted, #5b6575); margin: 0 0 18px; }
.ng-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.ng-crumbs li + li::before { content: "/"; margin-right: 6px; color: #9aa3af; }
.ng-crumbs a { color: var(--hp-brand, #1a4a8c); text-decoration: none; }

/* ---------- Article ---------- */
.ng-article-head { padding: clamp(36px, 5vw, 64px) 0 24px; background: linear-gradient(180deg, #eef2f7 0%, #fff 100%); }
.ng-article-head h1 {
    font-family: var(--hp-font-display, Georgia, serif); font-size: clamp(1.9rem, 2.8vw + .7rem, 2.8rem);
    line-height: 1.15; color: var(--hp-navy, #0b1f3a); margin: 8px 0 14px;
}
.ng-article-lead { font-size: 1.12rem; color: var(--hp-muted, #5b6575); line-height: 1.6; margin: 0 0 16px; }
.ng-byline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; color: var(--hp-muted, #5b6575); }
.ng-byline i { color: var(--hp-gold, #c4a35a); margin-right: 4px; }

.ng-article { padding: 8px 0 40px; color: var(--hp-ink, #0f172a); font-size: 1.06rem; line-height: 1.8; }
.ng-article h2 {
    font-family: var(--hp-font-display, Georgia, serif); font-size: clamp(1.4rem, 1.2vw + 1rem, 1.75rem);
    color: var(--hp-navy, #0b1f3a); margin: 2.2em 0 .6em; line-height: 1.25; scroll-margin-top: 110px;
}
.ng-article h3 { font-size: 1.2rem; color: var(--hp-navy, #0b1f3a); margin: 1.6em 0 .5em; }
.ng-article p { margin: 0 0 1.1em; }
.ng-article ul, .ng-article ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.ng-article li { margin-bottom: .45em; }
.ng-article a { color: var(--hp-brand, #1a4a8c); text-decoration: underline; text-underline-offset: 2px; }
.ng-article blockquote {
    margin: 0 0 1.2em; padding: 14px 18px; background: var(--hp-soft, #f4f6f8);
    border-left: 4px solid var(--hp-brand, #1a4a8c); border-radius: 0 12px 12px 0; font-size: .98rem;
}
.ng-article blockquote p:last-child { margin-bottom: 0; }

.ng-keypoints {
    background: #f0f6ff; border: 1px solid #d6e4f7; border-radius: 16px; padding: 18px 22px 8px; margin: 0 0 28px;
}
.ng-article .ng-keypoints h2 { font-family: var(--hp-font-sans, system-ui, sans-serif); font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; color: var(--hp-brand, #1a4a8c); }
.ng-keypoints ul { margin-bottom: .8em; }

.ng-callout {
    background: #fffaf0; border: 1px solid #f5deb0; border-radius: 14px; padding: 14px 18px; margin: 0 0 1.3em; font-size: 1rem;
}
.ng-table { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--hp-border, #e2e6ec); border-radius: 14px; -webkit-overflow-scrolling: touch; }
.ng-table table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; min-width: 520px; }
.ng-table th, .ng-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hp-border, #e2e6ec); }
.ng-table thead th { background: var(--hp-navy, #0b1f3a); color: #fff; font-weight: 700; }
.ng-table tbody tr:nth-child(even) td { background: #f8fafc; }
.ng-table tbody tr:last-child td { border-bottom: 0; }

.ng-faq { border: 1px solid var(--hp-border, #e2e6ec); border-radius: 12px; margin: 0 0 10px; background: #fff; }
.ng-faq summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--hp-navy, #0b1f3a); list-style: none; position: relative; padding-right: 44px; }
.ng-faq summary::-webkit-details-marker { display: none; }
.ng-faq summary::after { content: "+"; position: absolute; right: 18px; top: 10px; font-size: 1.4rem; color: var(--hp-brand, #1a4a8c); }
.ng-faq[open] summary::after { content: "\2212"; }
.ng-faq p { padding: 0 18px 14px; margin: 0; }

.ng-author-box {
    display: flex; gap: 16px; align-items: flex-start; background: var(--hp-soft, #f4f6f8);
    border-radius: 16px; padding: 20px; margin: 32px 0 0; font-size: .95rem; line-height: 1.6;
}
.ng-author-box i { font-size: 1.6rem; color: var(--hp-brand, #1a4a8c); margin-top: 4px; }
.ng-author-box p { margin: 0 0 6px; }

.ng-toc { background: #fff; border: 1px solid var(--hp-border, #e2e6ec); border-radius: 14px; padding: 16px 20px; margin: 0 0 28px; font-size: .95rem; }
.ng-toc strong { display: block; margin-bottom: 6px; color: var(--hp-navy, #0b1f3a); }
.ng-toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 28px; }
.ng-toc li { margin-bottom: 4px; break-inside: avoid; }
.ng-toc a { color: var(--hp-brand, #1a4a8c); text-decoration: none; }

.ng-share-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.ng-share-row a {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px;
    border: 1px solid var(--hp-border, #e2e6ec); color: var(--hp-navy, #0b1f3a); text-decoration: none; font-weight: 600; font-size: .9rem;
}

/* ---------- Plain legal / policy pages ---------- */
.ng-prose { font-size: 1.04rem; line-height: 1.8; color: var(--hp-ink, #0f172a); padding: 8px 0 56px; }
.ng-prose h2 { font-size: 1.35rem; color: var(--hp-navy, #0b1f3a); margin: 1.8em 0 .5em; }
.ng-prose a { color: var(--hp-brand, #1a4a8c); }

@media (max-width: 960px) {
    .ng-audience-grid, .ng-card-grid, .ng-tips-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ng-about { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .ng-audience-grid, .ng-card-grid, .ng-tips-grid { grid-template-columns: 1fr; }
    .ng-toc ol { columns: 1; }
    .ng-facts div { grid-template-columns: 1fr; gap: 2px; }
    .ng-article { font-size: 1.02rem; }
}
.ng-about-title { font-family: var(--hp-font-display, Georgia, serif); font-size: clamp(1.7rem, 2.6vw + .6rem, 2.4rem); color: var(--hp-navy, #0b1f3a); margin: 0 0 16px; }

/* Homepage section order — the older home-*.css files reorder <main> children by id; this is the current layout. */
.hp-home-page main > #home { order: 0 !important; }
.hp-home-page main > #proof { order: 1 !important; }
.hp-home-page main > #how-it-works { order: 2 !important; }
.hp-home-page main > #learn { order: 3 !important; }
.hp-home-page main > #quick-help { order: 4 !important; }
.hp-home-page main > #latest { order: 5 !important; }
.hp-home-page main > #modules { order: 6 !important; }
.hp-home-page main > #about-nipun { order: 7 !important; }
.hp-home-page main > #credentials { order: 8 !important; }
.hp-home-page main > #home-faq { order: 9 !important; }
.hp-home-page main > #demo-register { order: 10 !important; }

/* Labelled ad slots inside guides */
.ng-ad { margin: 2em 0; padding: 10px 0; border-top: 1px solid var(--hp-border, #e2e6ec); border-bottom: 1px solid var(--hp-border, #e2e6ec); min-height: 120px; }
.ng-ad-label { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #9aa3af; text-align: center; margin-bottom: 6px; }

/* Hero title: brand on its own line at every width (mobile showed "Nipun SchoolsBetter…") */
.hp-home-page #home h1 .hp-dyn-hero-title-a,
.hp-home-page #home h1 .hp-dyn-hero-title-b { display: block !important; }

/* Floating WhatsApp/Call buttons: icon only (labels were clipped on inner pages) */
.hp-floating-actions .hp-fab-label { display: none !important; }
