:root {
    --hc-bg: #fbfcfe;
    --hc-surface: #ffffff;
    --hc-surface-soft: #f6f8fc;
    --hc-border: #e6ebf2;
    --hc-border-strong: #d9e0ea;
    --hc-text: #1c2430;
    --hc-text-soft: #667085;
    --hc-primary: #3f57cf;
    --hc-primary-soft: #eef2ff;
    --hc-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
    --hc-radius-lg: 22px;
    --hc-radius-md: 18px;
    --hc-radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.hc-body {
    margin: 0;
    background: var(--hc-bg);
    color: var(--hc-text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.hc-lang-si {
    font-family: "Noto Sans Sinhala", "Iskoola Pota", "Malithi Web", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.hc-lang-si .hc-hero h1,
body.hc-lang-si .hc-section-head h2,
body.hc-lang-si .hc-surface h2,
body.hc-lang-si .hc-list-item h3,
body.hc-lang-si .hc-topic-card h3 {
    letter-spacing: 0;
    line-height: 1.35;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.hc-wrap {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.hc-shell {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(251, 252, 254, 0.92);
    border-bottom: 1px solid var(--hc-border);
    backdrop-filter: blur(12px);
}

.hc-shell-accent {
    display: none;
}

.hc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 74px;
}

.hc-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.hc-brand img {
    width: 148px;
    height: auto;
    display: block;
}

.hc-brand span {
    color: var(--hc-text-soft);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
}

.hc-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.hc-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    color: var(--hc-text-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.18s ease;
}

.hc-nav-link:hover,
.hc-nav-link.is-active {
    color: var(--hc-text);
}

.hc-nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -22px;
    height: 2px;
    border-radius: 999px;
    background: var(--hc-primary);
}

.hc-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hc-language-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-sm);
    background: var(--hc-surface);
}

.hc-language-link {
    min-width: 38px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--hc-text-soft);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.hc-language-link:hover,
.hc-language-link.is-active {
    background: var(--hc-surface-soft);
    color: var(--hc-text);
}

.hc-open-app {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-sm);
    background: var(--hc-surface);
    color: var(--hc-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.hc-open-app:hover {
    background: var(--hc-surface-soft);
    border-color: var(--hc-border-strong);
}

.hc-hero {
    padding: 76px 0 54px;
}

.hc-hero::before,
.hc-hero::after {
    display: none;
}

.hc-hero.is-compact {
    padding: 42px 0 24px;
}

.hc-hero-inner {
    max-width: 760px;
}

.hc-hero h1 {
    margin: 0;
    color: var(--hc-text);
    font-size: clamp(34px, 4.8vw, 52px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hc-hero p {
    max-width: 700px;
    margin: 16px 0 0;
    color: var(--hc-text-soft);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.75;
}

.hc-hero.is-compact .hc-hero-inner {
    max-width: 820px;
}

.hc-hero.is-compact h1 {
    font-size: clamp(28px, 3.6vw, 40px);
}

.hc-hero.is-compact p {
    font-size: 16px;
}

.hc-search {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 720px;
    margin-top: 28px;
    padding: 8px 8px 8px 16px;
    border: 1px solid var(--hc-border);
    border-radius: 18px;
    background: var(--hc-surface);
    box-shadow: var(--hc-shadow);
}

.hc-hero.is-compact .hc-search {
    max-width: 680px;
    margin-top: 22px;
}

.hc-search-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--hc-surface-soft);
    color: var(--hc-text-soft);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

.hc-search input {
    width: 100%;
    padding: 12px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--hc-text);
    font-size: 15px;
    font-weight: 400;
}

.hc-search input::placeholder {
    color: #98a2b3;
}

.hc-search button {
    min-width: 102px;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: var(--hc-text);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.hc-search button:hover {
    background: #111827;
}

.hc-hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hc-hero-links a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--hc-border);
    border-radius: 999px;
    background: var(--hc-surface);
    color: var(--hc-text-soft);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.hc-main {
    padding: 0;
}

.hc-section {
    padding: 0 0 72px;
}

.hc-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.hc-section-head h2 {
    margin: 0;
    color: var(--hc-text);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.hc-section-head p {
    margin: 10px 0 0;
    color: var(--hc-text-soft);
    font-size: 15px;
    line-height: 1.75;
}

.hc-section-head a {
    color: var(--hc-text-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.hc-section-head a:hover {
    color: var(--hc-text);
}

.hc-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.hc-topic-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hc-topic-card,
.hc-surface,
.hc-sidebar-card,
.hc-list-item,
.hc-entry-card,
.hc-glossary-item,
.hc-summary-block,
.hc-empty {
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-lg);
    background: var(--hc-surface);
    box-shadow: none;
}

.hc-topic-card,
.hc-list-item,
.hc-entry-card,
.hc-glossary-item {
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.hc-topic-card:hover,
.hc-list-item:hover,
.hc-entry-card:hover,
.hc-glossary-item:hover {
    border-color: var(--hc-border-strong);
    box-shadow: var(--hc-shadow);
}

.hc-topic-card {
    display: block;
    min-height: 192px;
    padding: 22px;
    text-decoration: none;
}

.hc-topic-card::before {
    display: none;
}

.hc-topic-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--hc-surface-soft);
    color: var(--hc-primary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.hc-topic-card h3 {
    margin: 0 0 10px;
    color: var(--hc-text);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.hc-topic-card p {
    margin: 0;
    color: var(--hc-text-soft);
    font-size: 14px;
    line-height: 1.72;
}

.hc-topic-card strong {
    display: inline-flex;
    align-items: center;
    margin-top: 16px;
    color: var(--hc-text-soft);
    font-size: 13px;
    font-weight: 500;
}

.hc-layout {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.hc-sidebar {
    position: sticky;
    top: 94px;
}

.hc-sidebar-card {
    margin-bottom: 16px;
    overflow: hidden;
}

.hc-sidebar-card h3 {
    margin: 0;
    padding: 18px 18px 10px;
    color: var(--hc-text-soft);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hc-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0 10px 10px;
}

.hc-sidebar-list li + li {
    margin-top: 4px;
}

.hc-sidebar-link {
    display: block;
    padding: 10px 12px;
    border-radius: var(--hc-radius-sm);
    color: var(--hc-text-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
}

.hc-sidebar-link:hover,
.hc-sidebar-link.is-active {
    background: var(--hc-surface-soft);
    color: var(--hc-text);
}

.hc-sidebar-meta {
    display: grid;
    gap: 8px;
    padding: 0 18px 18px;
}

.hc-sidebar-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-sm);
    background: var(--hc-surface-soft);
}

.hc-sidebar-stat span {
    color: var(--hc-text-soft);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hc-sidebar-stat strong {
    color: var(--hc-text);
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}

.hc-content {
    min-width: 0;
}

.hc-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: #98a2b3;
    font-size: 13px;
    font-weight: 500;
}

.hc-breadcrumbs a {
    color: var(--hc-text-soft);
    text-decoration: none;
}

.hc-breadcrumbs a:hover {
    color: var(--hc-text);
}

.hc-summary-block {
    padding: 24px 26px;
    background: var(--hc-surface-soft);
}

.hc-summary-block strong {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    color: var(--hc-text-soft);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hc-summary-block p {
    margin: 0;
    color: var(--hc-text);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.7;
}

.hc-surface {
    padding: 26px;
}

.hc-surface + .hc-surface,
.hc-surface + .hc-list-stack,
.hc-list-stack + .hc-surface,
.hc-surface + .hc-grid-2,
.hc-grid-2 + .hc-surface {
    margin-top: 18px;
}

.hc-block-space {
    margin-top: 26px;
}

.hc-block-space-lg {
    margin-top: 34px;
}

.hc-surface h2,
.hc-surface h3,
.hc-entry-card h3,
.hc-glossary-item h3,
.hc-list-item h3 {
    margin: 0 0 10px;
    color: var(--hc-text);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.hc-surface p,
.hc-surface li,
.hc-entry-card p,
.hc-entry-card li,
.hc-list-item p,
.hc-glossary-item p {
    color: var(--hc-text-soft);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.8;
}

.hc-note-list,
.hc-steps-list,
.hc-plain-list {
    margin: 0;
    padding-left: 18px;
}

.hc-note-list li + li,
.hc-steps-list li + li,
.hc-plain-list li + li {
    margin-top: 10px;
}

.hc-list-stack {
    display: grid;
    gap: 16px;
}

.hc-block-stack {
    margin-top: 26px;
}

.hc-list-item,
.hc-glossary-item,
.hc-entry-card {
    display: block;
    padding: 22px 24px;
    color: inherit;
    text-decoration: none;
}

.hc-list-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.hc-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--hc-surface-soft);
    color: var(--hc-text-soft);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hc-badge.is-link {
    background: var(--hc-primary-soft);
    color: var(--hc-primary);
}

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

.hc-link-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hc-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--hc-text);
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.hc-link-button:hover {
    background: #111827;
}

.hc-text-link {
    color: var(--hc-text-soft);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.hc-text-link:hover {
    color: var(--hc-text);
}

.hc-empty {
    padding: 28px;
    color: var(--hc-text-soft);
    text-align: center;
    font-size: 15px;
    line-height: 1.8;
}

.hc-footer {
    padding: 28px 0 40px;
    border-top: 1px solid var(--hc-border);
    background: transparent;
}

.hc-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hc-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--hc-text-soft);
    font-size: 13px;
    font-weight: 500;
}

.hc-footer-brand img {
    width: 110px;
    height: auto;
}

.hc-footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.hc-footer-meta a {
    color: var(--hc-text-soft);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.hc-footer-meta a:hover {
    color: var(--hc-text);
}

@media (max-width: 1100px) {
    .hc-topic-grid,
    .hc-topic-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .hc-wrap {
        width: min(1120px, calc(100% - 28px));
    }

    .hc-topbar,
    .hc-section-head,
    .hc-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .hc-nav {
        flex-wrap: wrap;
        gap: 14px;
    }

    .hc-actions {
        flex-wrap: wrap;
    }

    .hc-nav-link.is-active::after {
        bottom: -10px;
    }

    .hc-layout,
    .hc-grid-2 {
        grid-template-columns: 1fr;
    }

    .hc-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .hc-wrap {
        width: calc(100% - 24px);
    }

    .hc-topbar {
        padding: 14px 0;
    }

    .hc-brand {
        gap: 10px;
    }

    .hc-brand img {
        width: 132px;
    }

    .hc-hero {
        padding: 56px 0 40px;
    }

    .hc-hero h1 {
        font-size: 32px;
    }

    .hc-hero p {
        font-size: 15px;
    }

    .hc-search {
        flex-wrap: wrap;
        border-radius: 18px;
    }

    .hc-search button {
        width: 100%;
    }

    .hc-topic-grid,
    .hc-topic-grid--compact {
        grid-template-columns: 1fr;
    }

    .hc-topic-card,
    .hc-surface,
    .hc-summary-block,
    .hc-list-item,
    .hc-entry-card,
    .hc-glossary-item {
        padding: 20px;
    }
}
