/* =========================================================
   Ai PANTHIYA — RESPONSIVE STYLES
   Mobile-first adjustments for tablets and phones
   ========================================================= */


/* =========================================================
   LARGE TABLETS / SMALL LAPTOPS
   ========================================================= */

@media (max-width: 1180px) {
    .header-inner {
        min-height: 72px;
    }

    .header-inner {
        gap: var(--space-lg);
    }

    .main-nav,
    .header-actions .button {
        display: none;
    }

    .mobile-menu-button {
        display: grid;
    }

    .main-nav.is-open {
        position: absolute;
        top: 72px;
        right: 0;
        left: 0;
        display: grid;
        max-height: calc(100vh - 72px);
        gap: 0;
        padding: 12px 20px 20px;
        overflow-y: auto;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(31, 31, 31, 0.99);
        box-shadow: 0 18px 35px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        overscroll-behavior: contain;
    }

    .main-nav.is-open > a,
    .main-nav.is-open .nav-more__menu a {
        padding: 0.9rem 0.2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        font-size: 0.86rem;
    }

    .main-nav.is-open a::after,
    .main-nav.is-open .nav-more__button {
        display: none;
    }

    .main-nav.is-open .nav-more,
    .main-nav.is-open .nav-more__menu {
        position: static;
        display: grid;
        width: auto;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .hero-grid {
        gap: 2.8rem;
    }

    .hero-title {
        font-size: clamp(3rem, 6vw, 5rem);
    }

    .hero-sinhala-tagline {
        max-width: 680px;
        font-size: clamp(1.05rem, 1.8vw, 1.32rem);
    }

    .hero-photo-card {
        width: min(100%, 400px);
    }

    .hero-photo-frame {
        min-height: 430px;
    }

    .footer-grid {
        grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
        gap: var(--space-xl);
    }
}


/* =========================================================
   TABLETS
   ========================================================= */

@media (max-width: 1000px) {
    .dictionary-hero__grid,
    .dictionary-tree-workspace,
    .dictionary-graph {
        grid-template-columns: 1fr;
    }

    .dictionary-view-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dictionary-type-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dictionary-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dictionary-entry-preview {
        position: static;
        min-height: 0;
    }

    .dictionary-graph__centre {
        width: 210px;
        margin: auto;
    }

    .taxonomy-hero__grid,
    .taxonomy-workspace {
        grid-template-columns: 1fr;
    }

    .taxonomy-preview {
        position: static;
        min-height: 0;
    }

    .taxonomy-heading,
    .taxonomy-type-guide,
    .taxonomy-next-stage {
        align-items: flex-start;
        flex-direction: column;
    }

    .taxonomy-type-guide__items {
        justify-content: flex-start;
    }

    .algorithm-detail-hero__grid,
    .algorithm-detail-layout {
        grid-template-columns: 1fr;
    }

    .library-view-controls,
    .library-featured__grid,
    .library-type-grid,
    .library-compare-dialog__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .problem-browser-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .algorithm-catalogue-layout {
        grid-template-columns: 1fr;
    }

    .algorithm-filter-panel {
        position: static;
    }

    .header-inner {
        min-height: 72px;
    }

    .main-nav,
    .header-actions .button {
        display: none;
    }

    .mobile-menu-button {
        display: grid;
    }

    .main-nav.is-open {
        position: absolute;
        top: 72px;
        right: 0;
        left: 0;
        display: grid;
        gap: 0;
        padding: 12px 20px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(31, 31, 31, 0.99);
        box-shadow: 0 18px 35px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .main-nav.is-open a {
        padding: 0.95rem 0.2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .main-nav.is-open a:last-child {
        border-bottom: 0;
    }

    .main-nav.is-open a::after {
        display: none;
    }

    .hero {
        padding-block: 78px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-title {
        max-width: 760px;
    }

    .hero-sinhala-tagline {
        max-width: 760px;
    }

    .hero-description {
        max-width: 760px;
    }

    .hero-visual {
        min-height: 500px;
    }

    .hero-photo-card {
        width: min(100%, 420px);
    }

    .hero-photo-frame {
        min-height: 450px;
    }

    .ai-orbit {
        width: 390px;
        height: 390px;
    }

    .ai-orbit::before {
        width: 290px;
        height: 290px;
    }

    .ai-orbit::after {
        width: 190px;
        height: 190px;
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .learning-path-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .algorithm-preview {
        grid-template-columns: 1fr;
    }

    .page-hero__grid,
    .course-catalogue-feature {
        grid-template-columns: 1fr;
    }

    .page-hero__visual {
        min-height: 350px;
    }

    .course-card-grid,
    .learning-cycle {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .course-overview-hero__grid,
    .course-promise,
    .course-outcomes-layout,
    .solution-canvas-layout {
        grid-template-columns: 1fr;
    }

    .course-overview-hero__visual {
        min-height: 390px;
    }

    .course-overview-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .course-overview-stat:nth-child(3) {
        border-right: 0;
    }

    .course-overview-stat:nth-child(n + 4) {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .course-outcomes-layout__intro {
        position: static;
    }

    .audience-grid,
    .daily-format-grid,
    .course-resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .path-foundation-card,
    .path-finder {
        grid-template-columns: 1fr;
    }

    .path-finder__result {
        position: static;
    }

    .path-catalogue-grid,
    .path-connection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .selector-workspace {
        grid-template-columns: 1fr;
    }

    .selector-results {
        position: static;
        max-height: none;
    }

    .selector-comparison__grid,
    .selector-method-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .selector-boundary-intro .container {
        align-items: flex-start;
        flex-direction: column;
    }

    .course-feature {
        grid-template-columns: 1fr;
    }

    .course-feature__content {
        max-width: 720px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }
}


/* =========================================================
   LARGE PHONES / SMALL TABLETS
   ========================================================= */

@media (max-width: 760px) {
    .dictionary-principle .container,
    .dictionary-filter-link,
    .dictionary-view-heading,
    .dictionary-boundary {
        align-items: flex-start;
        flex-direction: column;
    }

    .dictionary-principle b {
        align-self: center;
    }

    .dictionary-stats,
    .dictionary-view-tabs,
    .dictionary-topic-grid,
    .dictionary-graph__connections {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dictionary-view-heading > div:last-child {
        flex-wrap: wrap;
    }

    .dictionary-type-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .taxonomy-overview__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .taxonomy-search-row {
        flex-wrap: wrap;
    }

    .taxonomy-search-row input {
        width: 100%;
        flex-basis: 100%;
    }

    .taxonomy-node__name {
        align-items: flex-start;
        flex-direction: column;
        gap: .15rem;
    }

    .taxonomy-node__name small {
        white-space: normal;
    }

    [data-mobile-filter] {
        display: inline-flex;
    }

    .algorithm-detail-do-dont {
        grid-template-columns: 1fr;
    }

    .library-selector-bridge .container,
    .library-panel-heading,
    .library-compare-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .problem-browser-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .problem-browser-result,
    .algorithm-library-grid {
        grid-template-columns: 1fr;
    }

    .algorithm-filter-panel {
        display: none;
    }

    .algorithm-filter-panel.is-open {
        display: block;
    }

    .library-filter-toggle {
        display: inline-flex;
    }

    .library-compare-bar > div:last-child {
        width: 100%;
    }

    :root {
        --container-padding: 20px;
        --space-3xl: 4rem;
    }

    .page-hero {
        padding-block: 38px 64px;
    }

    .breadcrumb {
        margin-bottom: 2rem;
    }

    .page-hero__title {
        font-size: clamp(2.7rem, 11vw, 4rem);
    }

    .page-hero__actions,
    .course-catalogue-feature__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .page-hero__actions .button,
    .course-catalogue-feature__actions .button {
        width: 100%;
    }

    .course-catalogue-feature__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .course-card-grid,
    .learning-cycle {
        grid-template-columns: 1fr;
    }

    .course-overview-hero {
        padding-top: 38px;
    }

    .course-overview-hero__title {
        font-size: clamp(3rem, 13vw, 4.8rem);
    }

    .course-overview-hero__actions,
    .course-final-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .course-overview-hero__actions .button,
    .course-final-actions .button {
        width: 100%;
    }

    .course-overview-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .course-overview-stat,
    .course-overview-stat:nth-child(3) {
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .course-overview-stat:nth-child(odd) {
        border-right: 0;
    }

    .course-overview-stat:first-child,
    .course-overview-stat:nth-child(2) {
        border-top: 0;
    }

    .course-overview-stat:last-child {
        grid-column: 1 / -1;
        border-right: 0;
    }

    .course-promise__comparison,
    .course-outcomes-list,
    .course-day-grid,
    .audience-grid,
    .daily-format-grid,
    .evidence-grid,
    .solution-canvas-grid,
    .course-resource-grid {
        grid-template-columns: 1fr;
    }

    .course-boundary {
        grid-template-columns: 1fr;
    }

    .path-catalogue-grid,
    .path-connection-grid {
        grid-template-columns: 1fr;
    }

    .path-boundary {
        grid-template-columns: 1fr;
    }

    .paths-final-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .paths-final-actions .button {
        width: 100%;
    }

    .path-comparison-wrapper {
        overflow: visible;
        border: 0;
        box-shadow: none;
    }

    .path-comparison-table {
        min-width: 0;
    }

    .path-comparison-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .path-comparison-table,
    .path-comparison-table tbody,
    .path-comparison-table tr,
    .path-comparison-table th,
    .path-comparison-table td {
        display: block;
        width: 100%;
    }

    .path-comparison-table tr {
        margin-bottom: var(--space-md);
        overflow: hidden;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        background: var(--color-white);
        box-shadow: var(--shadow-sm);
    }

    .path-comparison-table tbody th {
        padding: 1rem;
        border: 0;
        background: var(--color-charcoal);
        color: var(--color-white);
        font-size: 1rem;
    }

    .path-comparison-table td {
        display: grid;
        grid-template-columns: 130px 1fr;
        gap: var(--space-md);
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--color-border);
    }

    .path-comparison-table td::before {
        color: var(--color-charcoal);
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 850;
        text-transform: uppercase;
    }

    .path-comparison-table td:last-child {
        border-bottom: 0;
    }

    .selector-choice-grid--large,
    .selector-choice-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .selector-selection-summary__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .selector-validation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .selector-privacy-boundary {
        grid-template-columns: 1fr;
    }

    .selector-final-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .selector-final-actions .button {
        width: 100%;
    }

    .site-logo img {
        width: 44px;
        height: 44px;
    }

    .site-logo__title {
        font-size: 0.95rem;
    }

    .site-logo__subtitle {
        font-size: 0.66rem;
    }

    .hero {
        padding-block: 64px;
    }

    .hero-title {
        font-size: clamp(2.8rem, 11vw, 4.2rem);
        line-height: 1;
    }

    .hero-sinhala-tagline {
        max-width: 100%;
        margin-top: -0.1rem;
        margin-bottom: var(--space-md);
        padding-left: 15px;
        font-size: 1.08rem;
        line-height: 1.65;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.65;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions .button {
        width: 100%;
    }

    .hero-visual {
        min-height: 450px;
        margin-top: 10px;
    }

    .hero-photo-card {
        width: min(100%, 380px);
        padding: 17px;
        border-radius: 24px;
    }

    .hero-photo-frame {
        min-height: 400px;
        border-radius: 18px;
    }

    .hero-brand-mark {
        top: 8px;
        width: min(72%, 245px);
    }

    .hero-photo {
        max-width: 320px;
    }

    .hero-photo-name {
        font-size: 1.3rem;
    }

    .hero-photo-tagline {
        font-size: 0.9rem;
    }

    .ai-orbit {
        width: 330px;
        height: 330px;
    }

    .ai-orbit::before {
        width: 245px;
        height: 245px;
    }

    .ai-orbit::after {
        width: 165px;
        height: 165px;
    }

    .section-title {
        font-size: clamp(1.9rem, 8vw, 2.8rem);
    }

    .section-description {
        font-size: 1rem;
    }

    .card-grid,
    .stats-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .learning-path-grid {
        grid-template-columns: 1fr;
    }

    .learning-path-card {
        padding: var(--space-lg);
    }

    .algorithm-preview__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .algorithm-preview__actions .button {
        width: 100%;
    }

    .course-feature {
        padding: 2rem;
    }

    .course-feature__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .course-feature__title {
        font-size: clamp(2.4rem, 10vw, 3.6rem);
    }

    .footer-grid > div:first-child {
        grid-column: auto;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   MOBILE PHONES
   ========================================================= */

@media (max-width: 560px) {
    .dictionary-hero__actions,
    .dictionary-hero__actions .button,
    .dictionary-filter-link .button {
        width: 100%;
    }

    .dictionary-hero__orbit {
        width: min(300px, 88vw);
    }

    .dictionary-orbit-node--2 { right: -1%; }
    .dictionary-orbit-node--5 { left: -1%; }

    .dictionary-stats,
    .dictionary-view-tabs,
    .dictionary-topic-grid,
    .dictionary-card-grid,
    .dictionary-type-grid,
    .dictionary-graph__connections {
        grid-template-columns: 1fr;
    }

    .dictionary-tree,
    .dictionary-entry-preview,
    .dictionary-graph {
        padding: .8rem;
        border-radius: var(--radius-md);
    }

    .dictionary-tree ul ul {
        margin-left: .3rem;
        padding-left: .5rem;
    }

    .dictionary-tree-node__row > button:nth-child(2) {
        align-items: flex-start;
        flex-direction: column;
        gap: .12rem;
    }

    .dictionary-tree-node__row em {
        display: none;
    }

    .taxonomy-hero__map,
    .taxonomy-overview__grid,
    .taxonomy-preview__facts {
        grid-template-columns: 1fr;
    }

    .taxonomy-hero__actions,
    .taxonomy-hero__actions .button,
    .taxonomy-search-row button,
    .taxonomy-next-stage .button {
        width: 100%;
    }

    .taxonomy-tree-panel,
    .taxonomy-preview {
        padding: .8rem;
        border-radius: var(--radius-md);
    }

    .taxonomy-tree-list ul {
        margin-left: .35rem;
        padding-left: .55rem;
    }

    .taxonomy-node__row {
        gap: .2rem;
        padding-inline: .1rem;
    }

    .taxonomy-node__ready,
    .taxonomy-node__row > em {
        display: none;
    }

    .algorithm-detail-actions,
    .algorithm-detail-actions .button {
        width: 100%;
    }

    .algorithm-detail-status {
        padding: 1rem;
    }

    .library-view-controls,
    .library-featured__grid,
    .problem-browser-grid,
    .library-type-grid,
    .library-compare-dialog__grid {
        grid-template-columns: 1fr;
    }

    .library-search {
        align-items: flex-start;
        flex-direction: column;
    }

    .library-search input {
        width: 100%;
    }

    .algorithm-family-tree details details {
        margin-left: 0.45rem;
    }

    .algorithm-relationship-graph {
        display: grid;
        gap: var(--space-sm);
        min-height: auto;
        padding: var(--space-md);
    }

    .relationship-graph__centre,
    .relationship-graph__nodes > * {
        position: static;
        width: 100%;
        transform: none;
    }

    .relationship-graph__lines {
        display: none;
    }

    .library-compare-bar > div,
    .library-compare-bar > div:last-child,
    .library-compare-bar > div:last-child .button,
    .library-compare-bar > div:last-child button {
        width: 100%;
    }

    :root {
        --container-padding: 16px;
        --space-2xl: 2.25rem;
        --space-3xl: 3.25rem;
    }

    .header-inner {
        min-height: 68px;
    }

    .site-logo {
        gap: 9px;
    }

    .site-logo img {
        width: 40px;
        height: 40px;
    }

    .site-logo__title {
        font-size: 0.9rem;
    }

    .site-logo__subtitle {
        margin-top: 2px;
        font-size: 0.6rem;
        letter-spacing: 0.06em;
    }

    .mobile-menu-button {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }

    .main-nav.is-open {
        top: 68px;
    }

    .hero {
        padding-block: 52px;
    }

    .hero-badge {
        padding: 0.5rem 0.8rem;
        font-size: 0.76rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 13vw, 3.6rem);
        letter-spacing: -0.045em;
    }

    .hero-sinhala-tagline {
        margin-top: 0;
        margin-bottom: var(--space-md);
        padding-left: 13px;
        font-size: 1rem;
        line-height: 1.65;
    }

    .hero-sinhala-tagline::before {
        width: 3px;
    }

    .hero-description {
        margin-bottom: var(--space-lg);
        font-size: 0.96rem;
    }

    .button {
        min-height: 46px;
        padding: 0.78rem 1rem;
        font-size: 0.94rem;
    }

    .hero-visual {
        min-height: auto;
        margin-top: 18px;
    }

    .hero-photo-card {
        width: 100%;
        max-width: 340px;
        padding: 14px;
        border-radius: 22px;
    }

    .hero-photo-card::before {
        top: 18px;
        right: -6px;
        width: 54px;
        height: 54px;
        border-radius: 17px;
    }

    .hero-photo-card::after {
        bottom: 72px;
        left: -7px;
        width: 34px;
        height: 34px;
    }

    .hero-photo-frame {
        min-height: 340px;
        border-radius: 16px;
    }

    .hero-photo {
        max-width: 275px;
    }

    .hero-photo-info {
        padding-top: 14px;
    }

    .hero-photo-role {
        font-size: 0.7rem;
    }

    .hero-photo-name {
        font-size: 1.15rem;
    }

    .hero-photo-tagline {
        font-size: 0.84rem;
    }

    .ai-orbit {
        width: 270px;
        height: 270px;
    }

    .ai-orbit::before {
        width: 205px;
        height: 205px;
    }

    .ai-orbit::after {
        width: 135px;
        height: 135px;
    }

    .section-label {
        font-size: 0.74rem;
    }

    .section-title {
        font-size: clamp(1.75rem, 9vw, 2.4rem);
    }

    .card__content {
        padding: var(--space-lg);
    }

    .card__title {
        font-size: 1.2rem;
    }

    .course-feature {
        padding: 1.4rem;
        border-radius: 20px;
    }

    .course-feature__title {
        font-size: 2.3rem;
    }

    .course-feature__description {
        font-size: 0.96rem;
    }

    .course-feature__stats {
        gap: 0.6rem;
    }

    .course-feature__stats > div {
        padding: 0.9rem 0.5rem;
    }

    .course-day {
        grid-template-columns: 62px 1fr;
        min-height: 70px;
        padding: 0.85rem;
    }

    .course-day h4 {
        font-size: 0.92rem;
    }

    .algorithm-preview__form,
    .algorithm-result-preview {
        padding: 1.25rem;
        border-radius: 20px;
    }

    .algorithm-preview__title {
        font-size: 2rem;
    }

    .selector-options {
        display: grid;
        grid-template-columns: 1fr;
    }

    .selector-option {
        width: 100%;
        text-align: left;
    }

    .algorithm-result-preview__title {
        font-size: 1.45rem;
    }

    .page-hero__visual {
        min-height: 290px;
    }

    .course-map-visual {
        width: 270px;
    }

    .course-map-visual__core {
        width: 84px;
        height: 84px;
        border-radius: 24px;
        font-size: 1.8rem;
    }

    .course-map-node {
        min-width: 72px;
        min-height: 36px;
        font-size: 0.68rem;
    }

    .course-catalogue-feature {
        padding: 1.4rem;
        border-radius: 20px;
    }

    .course-catalogue-feature__title {
        font-size: 2.5rem;
    }

    .catalogue-day {
        grid-template-columns: 46px 1fr;
        padding: 0.8rem;
    }

    .course-list-card,
    .learning-cycle__item {
        padding: var(--space-lg);
    }

    .course-overview-hero__visual {
        min-height: 310px;
    }

    .seven-day-orbit {
        width: 270px;
    }

    .seven-day-orbit__core {
        width: 90px;
        height: 90px;
        border-radius: 26px;
    }

    .seven-day-orbit__core strong {
        font-size: 2.2rem;
    }

    .seven-day-node {
        width: 40px;
        height: 40px;
        font-size: 0.68rem;
    }

    .course-overview-stat {
        padding: 1rem 0.6rem;
    }

    .course-overview-stat strong {
        font-size: 1.55rem;
    }

    .course-overview-stat span {
        font-size: 0.66rem;
    }

    .promise-column,
    .audience-card,
    .full-course-day,
    .daily-format-card,
    .evidence-card,
    .course-resource-card {
        padding: var(--space-lg);
    }

    .full-course-day__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .full-course-day__actions .button {
        width: 100%;
    }

    .course-boundary__icon {
        width: 54px;
        height: 54px;
        border-radius: 17px;
        font-size: 1.7rem;
    }

    .path-map-visual {
        width: 270px;
    }

    .path-map-visual__core {
        width: 92px;
        height: 92px;
        border-radius: 26px;
        font-size: 0.72rem;
    }

    .path-map-node {
        min-width: 72px;
        min-height: 36px;
        font-size: 0.66rem;
    }

    .path-foundation-card,
    .path-finder__group,
    .path-catalogue-card,
    .path-connection-grid a {
        padding: var(--space-lg);
    }

    .path-foundation-card__route {
        min-height: 250px;
    }

    .path-finder__options {
        display: grid;
        grid-template-columns: 1fr;
    }

    .path-finder__options button {
        width: 100%;
        text-align: left;
    }

    .path-catalogue-card dl {
        grid-template-columns: 1fr;
    }

    .path-comparison-table td {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .path-boundary__icon {
        width: 54px;
        height: 54px;
        border-radius: 17px;
        font-size: 1.7rem;
    }

    .selector-hero-visual {
        min-height: 290px;
    }

    .selector-hero-visual__engine {
        width: 105px;
        height: 105px;
        border-radius: 30px;
    }

    .selector-hero-visual__engine strong {
        font-size: 2.4rem;
    }

    .selector-hero-visual__input,
    .selector-hero-visual__output {
        min-width: 96px;
        min-height: 42px;
        font-size: 0.66rem;
    }

    .selector-hero-visual::before,
    .selector-hero-visual::after {
        width: 75px;
    }

    .selector-hero-visual::before {
        transform: translate(-48px, -50%);
    }

    .selector-hero-visual::after {
        transform: translate(48px, -50%) rotate(180deg);
    }

    .guided-selector-panel__header,
    .selector-progress,
    .selector-step,
    .selector-navigation,
    .selector-results__header {
        padding-right: var(--space-lg);
        padding-left: var(--space-lg);
    }

    .selector-selection-summary {
        margin-right: var(--space-lg);
        margin-left: var(--space-lg);
        padding: var(--space-md);
    }

    .selector-selection-summary__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }

    .selector-selection-summary__header small {
        max-width: none;
        text-align: left;
    }

    .selector-selection-summary__grid {
        grid-template-columns: 1fr;
    }

    .selector-selection-summary__grid button {
        min-height: 58px;
    }

    .selector-step {
        min-height: auto;
    }

    .selector-choice-grid,
    .selector-choice-grid--large,
    .selector-choice-grid--compact {
        grid-template-columns: 1fr;
    }

    .selector-choice-grid--compact button {
        align-items: flex-start;
        text-align: left;
    }

    .selector-navigation {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .selector-navigation .button {
        width: 100%;
    }

    .selector-best {
        margin-right: var(--space-md);
        margin-left: var(--space-md);
        padding: var(--space-lg);
    }

    .selector-alternatives,
    .selector-advanced,
    .selector-guidance {
        padding-right: 0;
        padding-left: 0;
        margin-right: var(--space-md);
        margin-left: var(--space-md);
    }

    .selector-result-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .selector-result-actions .button,
    .selector-result-actions .selector-compare-button {
        width: 100%;
    }

    .selector-result-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }

    .selector-comparison {
        padding: var(--space-lg);
    }

    .selector-comparison__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .selector-comparison__grid,
    .selector-method-grid,
    .selector-validation-grid {
        grid-template-columns: 1fr;
    }

    .selector-method-grid article,
    .selector-validation-grid article {
        padding: var(--space-lg);
    }

    .selector-privacy-boundary__icon {
        width: 54px;
        height: 54px;
        border-radius: 17px;
        font-size: 1.7rem;
    }

    .feature-card {
        padding: var(--space-lg);
    }

    .stat-card {
        padding: 1.2rem;
    }

    .cta-panel {
        padding: 1.7rem;
    }

    .cta-panel__title {
        font-size: 1.9rem;
    }

    .footer-title {
        margin-top: var(--space-sm);
    }
}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {
    .site-logo__subtitle {
        display: none;
    }

    .hero-title {
        font-size: 2.35rem;
    }

    .hero-sinhala-tagline {
        padding-left: 11px;
        font-size: 0.94rem;
        line-height: 1.65;
    }

    .hero-photo-card {
        max-width: 310px;
    }

    .hero-photo-frame {
        min-height: 310px;
    }

    .hero-photo {
        max-width: 245px;
    }

    .ai-orbit {
        width: 240px;
        height: 240px;
    }

    .ai-orbit::before {
        width: 180px;
        height: 180px;
    }

    .ai-orbit::after {
        width: 120px;
        height: 120px;
    }
}


/* =========================================================
   LANDSCAPE MOBILE
   ========================================================= */

@media (max-width: 900px) and (orientation: landscape) {
    .hero {
        padding-block: 54px;
    }

    .hero-grid {
        grid-template-columns: 1fr 0.8fr;
        gap: 2rem;
    }

    .hero-title {
        font-size: clamp(2.4rem, 5vw, 3.6rem);
    }

    .hero-sinhala-tagline {
        margin-bottom: var(--space-md);
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-visual {
        min-height: 360px;
    }

    .hero-photo-card {
        max-width: 320px;
    }

    .hero-photo-frame {
        min-height: 320px;
    }

    .hero-photo {
        max-width: 250px;
    }

    .ai-orbit {
        width: 270px;
        height: 270px;
    }

    .ai-orbit::before {
        width: 200px;
        height: 200px;
    }

    .ai-orbit::after {
        width: 130px;
        height: 130px;
    }
}


/* =========================================================
   PRINT
   ========================================================= */

@media print {
    .site-header,
    .site-footer,
    .mobile-menu-button,
    .hero-actions {
        display: none !important;
    }

    .hero,
    .section,
    .section--dark,
    .section--ash {
        padding-block: 24px;
        background: #ffffff !important;
        color: #000000 !important;
    }

    .hero-title,
    .hero-sinhala-tagline,
    .section-title,
    .hero-description,
    .section-description,
    .hero-photo-name,
    .hero-photo-tagline {
        color: #000000 !important;
    }

    .hero-sinhala-tagline {
        padding-left: 0;
    }

    .hero-sinhala-tagline::before {
        display: none;
    }

    .hero-grid,
    .card-grid,
    .footer-grid,
    .stats-grid,
    .course-feature,
    .course-feature__days {
        display: block;
    }

    .card,
    .hero-photo-card,
    .course-day {
        margin-bottom: 20px;
        border: 1px solid #bbbbbb;
        box-shadow: none;
    }

    .course-feature__content,
    .course-feature__days {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .course-feature__title,
    .course-feature__description,
    .course-feature__stats strong,
    .course-feature__stats span {
        color: #000000 !important;
    }
}
