/* Public pages: a shared reading width, a quiet frame, and clear entry points. */
:root {
    --learn-ink: #172d46;
    --learn-muted: #50647b;
    --learn-blue: #2159c8;
    --learn-line: #dce5ed;
    --learn-bg: #f5f8fb;
    --site-wide-width: min(1440px, calc(100% - clamp(40px, 8vw, 112px)));
}

body { background: var(--learn-bg); }

body > .ui-header {
    background: #fff;
    border-bottom: 1px solid var(--learn-line);
    box-shadow: none;
    backdrop-filter: none;
}

body > .ui-header::before {
    height: 3px;
    background: linear-gradient(90deg, #2159c8, #1c9c99);
}

body > .ui-header::after, body > .ui-footer::before { display: none; }
.ui-header .ui-header-inner { min-height: 74px; }
.ui-header .ui-brand { font-size: 1.17rem; color: var(--learn-ink); }
.ui-header .ui-brand-text small { color: var(--learn-muted); }
.ui-header .ui-nav {
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.ui-header .ui-nav-link {
    padding: 10px 17px;
    border-radius: 8px;
    white-space: nowrap;
    color: var(--learn-muted);
    font-size: .95rem;
    font-weight: 700;
}
.ui-header .ui-nav-link:hover { background: #f0f5fb; transform: none; }
.ui-header .ui-nav-link.active { background: #eaf2ff; box-shadow: none; color: #19479e; }
.ui-header .ui-nav-link.active::after { display: none; }
.ui-header .ui-cta, .ui-header .ui-ghost {
    min-height: 42px;
    min-width: 0;
    padding: 8px 16px;
    border-radius: 9px;
    box-shadow: none;
    white-space: nowrap;
    font-size: .9rem;
}
.ui-header .ui-cta { background: var(--learn-blue); }
.ui-header .ui-cta:hover { background: #17459f; transform: none; }
.ui-header .ui-user { gap: 8px; }
body > .ui-footer { background: #fff; border-top: 1px solid var(--learn-line); }

@media (min-width: 1181px) {
    .ui-header .ui-header-inner { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; }
}
@media (min-width: 761px) and (max-width: 1180px) {
    .ui-header .ui-header-inner { gap: 7px 14px; padding: 10px 0; }
}

/* The home page has the larger introduction. Inner modules start with a short heading. */
body .hero.home-hero {
    padding: clamp(34px, 5.3vw, 76px) 0;
    background: #fff;
    border-bottom: 1px solid var(--learn-line);
}
.home-hero::after { display: none; }
body .home-hero > .hero-layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    gap: clamp(30px, 5vw, 72px);
}
body .hero.home-hero .eyebrow {
    margin-bottom: 14px;
    color: var(--learn-blue);
    letter-spacing: .08em;
}
body .hero.home-hero .eyebrow::before { width: 18px; background: #229c9c; }
body .hero.home-hero h1 {
    margin-bottom: 16px;
    color: var(--learn-ink);
    font-size: clamp(2.5rem, 4.6vw, 4.25rem);
    line-height: 1.16;
}
body .hero.home-hero .hero-copy {
    max-width: 31em;
    margin-bottom: 24px;
    color: var(--learn-muted);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
}
.home-hero-note { display: none; }
body .home-hero .knowledge-graph {
    width: 100%;
    max-width: none;
    min-height: 250px;
    aspect-ratio: 1.55;
    border: 1px solid #204564;
    border-radius: 20px;
    padding: 12px;
    background: radial-gradient(ellipse at 71% 33%, #185368 0%, transparent 66%),
        linear-gradient(145deg, #142c49, #14263e);
    box-shadow: none;
    opacity: 1;
}
body .home-hero .knowledge-graph::before {
    display: block;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle, #91d5e34a 1px, transparent 1.5px) 0 0 / 19px 19px;
    filter: none;
}
.home-hero .knowledge-graph svg { width: min(100%, 470px); max-height: 300px; }
.home-hero #graph-line stop:nth-child(1) { stop-color: #79b8ff; stop-opacity: .6; }
.home-hero #graph-line stop:nth-child(2) { stop-color: #5ce2d1; stop-opacity: .82; }
.home-hero #graph-line stop:nth-child(3) { stop-color: #81b5f1; stop-opacity: .7; }

body :is(.page-heading.public-listing-heading.module-hero-heading, .feelink-hero) {
    padding: clamp(22px, 3vw, 40px) 0;
    background: #fff;
    border-bottom: 1px solid var(--learn-line);
}
body :is(.public-listing-heading > .module-hero-layout, .feelink-hero > .feelink-hero-inner) {
    grid-template-columns: minmax(0, 1fr) clamp(135px, 19vw, 245px);
    min-height: 145px;
}
body :is(.page-heading.public-listing-heading.module-hero-heading, .feelink-hero) h1 {
    color: var(--learn-ink);
    font-size: clamp(2rem, 3.6vw, 3rem);
    letter-spacing: -.035em;
}
body :is(.page-heading.public-listing-heading.module-hero-heading, .feelink-hero) .hero-copy {
    color: var(--learn-muted);
}
body .public-listing-heading .module-hero-visual,
body .feelink-hero .feelink-emblem {
    box-shadow: none;
    opacity: 1;
}
body .public-listing-heading .module-hero-visual {
    padding: 0;
    border: 1px solid #e3edf5;
    border-radius: 16px;
    background: #edf6fc;
}
body .feelink-hero .feelink-emblem { border-radius: 18px; }
body :is(.hero.home-hero, .page-heading.public-listing-heading.module-hero-heading, .feelink-hero) .actions .button {
    min-height: 48px;
    padding: 10px 20px;
    border: 1px solid var(--learn-blue);
    border-radius: 9px;
    background: var(--learn-blue);
    color: #fff;
    font-size: 1rem;
    box-shadow: none;
}
body :is(.hero.home-hero, .page-heading.public-listing-heading.module-hero-heading, .feelink-hero) .actions .button:hover {
    background: #17459f;
}
body :is(.hero.home-hero, .page-heading.public-listing-heading.module-hero-heading, .feelink-hero) .actions .button.secondary {
    border-color: #b4c6e0;
    background: #fff;
    color: #19479e;
}
body :is(.hero.home-hero, .page-heading.public-listing-heading.module-hero-heading, .feelink-hero) .actions .button.secondary:hover {
    background: #edf4ff;
}

/* Entry cards and content cards use the same spacing and a single border. */
.page .section, .simple-ai .section, .tuzhi-public-page .section { padding-block: clamp(32px, 4.4vw, 62px); }
body .public-listing-heading + .section { padding-top: clamp(28px, 4vw, 52px); }
.page .section-head, .simple-ai .section-head { margin-bottom: 22px; }
.page .section-head h2, .simple-ai .section-head h2 {
    margin-bottom: 0;
    color: var(--learn-ink);
    font-size: clamp(1.45rem, 2.6vw, 2.1rem);
}
.page .section-head .eyebrow, .simple-ai .section-head .eyebrow { display: none; }
.home-section-copy { margin: 6px 0 0; color: var(--learn-muted); }
body .home-module-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
body .home-module {
    padding: 20px;
    border: 1px solid var(--learn-line);
    border-radius: 14px;
    color: var(--learn-ink);
    box-shadow: none;
}
body .home-module h3 { font-size: 1.11rem; margin-bottom: 6px; }
body .home-module p { margin-bottom: 18px; color: var(--learn-muted); font-size: .91rem; }
body .home-module-icon { width: 43px; height: 43px; margin-bottom: 14px; border-radius: 11px; }
.home-module-icon img { width: 32px; height: 32px; border-radius: 8px; }
body .home-module-entry { color: #19479e; }
body .home-module:hover { transform: translateY(-2px); border-color: #97b8ec; box-shadow: 0 8px 22px #1831530d; }
.page .section :is(.card, .category-card, .feature), .simple-ai .section .category-card, .tuzhi-public-page .section .feature {
    border: 1px solid var(--learn-line);
    border-radius: 14px;
    box-shadow: none;
}
.simple-ai .section .category-card[aria-current="true"] { border-color: #709bdf; background: #edf4ff; }
.page .section :is(.card, .category-card, .feature) :is(h2, h3) { color: var(--learn-ink); }
.page .section :is(.card, .category-card) :is(h2, h3) { font-size: clamp(1rem, 1.55vw, 1.22rem); }
.page .section .project-card-summary p { color: var(--learn-muted); }
.page form[action$="/projects"] :is(input, select, button) {
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #b8c9db;
    border-radius: 8px;
    background: #fff;
    color: var(--learn-ink);
}
.page form[action$="/projects"] button {
    background: var(--learn-blue);
    border-color: var(--learn-blue);
    color: #fff;
    cursor: pointer;
}
.ui-header a:focus-visible, .page a:focus-visible, .page button:focus-visible {
    outline: 3px solid #2159c8;
    outline-offset: 3px;
}

@media (max-width: 1050px) {
    body .home-module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    :root { --site-wide-width: calc(100% - 28px); }
    .ui-header .ui-nav { gap: 3px; }
    .ui-header .ui-nav-link { padding: 8px 10px; font-size: .9rem; }
    .ui-header .ui-cta, .ui-header .ui-ghost { padding-inline: 11px; }
    body .home-hero > .hero-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    body .home-hero .knowledge-graph { min-height: 0; max-height: 250px; justify-self: stretch; }
    body .home-hero .knowledge-graph svg { max-width: 300px; max-height: 205px; }
    body .home-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body :is(.public-listing-heading > .module-hero-layout, .feelink-hero > .feelink-hero-inner) {
        grid-template-columns: minmax(0, 1fr) clamp(72px, 23vw, 150px);
        min-height: 0;
        gap: 12px;
    }
    body :is(.page-heading.public-listing-heading.module-hero-heading, .feelink-hero) h1 { font-size: clamp(1.55rem, 5.8vw, 2.2rem); }
    body :is(.hero.home-hero, .page-heading.public-listing-heading.module-hero-heading, .feelink-hero) .actions .button {
        min-height: 44px;
        min-width: 0;
        padding-inline: 13px;
        font-size: .92rem;
    }
}
@media (max-width: 420px) {
    body .home-module-grid { grid-template-columns: minmax(0, 1fr); }
    body .hero.home-hero h1 { font-size: clamp(1.8rem, 8.1vw, 2.3rem); }
}
@media (prefers-reduced-motion: reduce) {
    body .home-module:hover { transform: none; }
}
