/*
Theme Name: LearningPick
Theme URI: https://github.com/linghulaoqi/LearningPick
Author: LearningPick
Description: An accessible evidence-led learning decision theme for LearningPick V0.1.
Version: 0.1.1
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: learningpick
*/

:root {
    --lp-ink: #172033;
    --lp-muted: #5f6b7a;
    --lp-border: #dce3ec;
    --lp-surface: #f6f8fb;
    --lp-accent: #1769aa;
    --lp-accent-dark: #0f4f82;
    --lp-white: #ffffff;
    --lp-warm: #f2a900;
    --lp-radius: 0.75rem;
    --lp-shadow: 0 0.75rem 2rem rgba(23, 32, 51, 0.08);
    --lp-max-width: 70rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--lp-ink);
    background: var(--lp-white);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    overflow-wrap: normal;
}
a { color: var(--lp-accent-dark); }
a:hover { color: var(--lp-accent); }
img { max-width: 100%; height: auto; }
.lp-prose, .lp-card, .lp-component, .lp-task-card, .lp-career-action, .lp-entity-facts { overflow-wrap: break-word; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus, .skip-link:focus { position: fixed; z-index: 1000; top: 1rem; left: 1rem; width: auto; height: auto; padding: 0.75rem 1rem; margin: 0; overflow: visible; clip: auto; color: var(--lp-white); background: var(--lp-ink); white-space: normal; }
.skip-link { position: absolute; left: -9999px; }

.site-header { border-bottom: 1px solid var(--lp-border); background: var(--lp-white); }
.site-header__inner, .site-main, .site-footer__inner { width: min(calc(100% - 2rem), var(--lp-max-width)); min-width: 0; margin: 0 auto; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.75rem; gap: 2rem; }
.site-brand { color: var(--lp-ink); font-size: 1.28rem; font-weight: 800; letter-spacing: -0.015em; text-decoration: none; white-space: nowrap; }
.site-navigation { margin-left: auto; }
.site-navigation__toggle { display: none; padding: 0.5rem 0.75rem; color: var(--lp-ink); background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: 0.4rem; font: inherit; }
.site-navigation ul { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.65rem); padding: 0; margin: 0; list-style: none; }
.site-navigation a { display: block; padding: 0.55rem 0; color: var(--lp-ink); font-size: 0.94rem; font-weight: 650; text-decoration: none; }
.site-navigation a:hover { color: var(--lp-accent); }

.site-main { min-height: 60vh; padding: 2rem 0 5rem; }
.hero { padding: clamp(2rem, 7vw, 5rem) clamp(1.25rem, 5vw, 4rem); color: var(--lp-white); background: linear-gradient(135deg, #113b62, #1769aa); border-radius: var(--lp-radius); box-shadow: var(--lp-shadow); }
.hero h1, .hero p { max-width: 42rem; }
.hero h1 { margin: 0 0 1rem; font-size: clamp(2.25rem, 6vw, 4rem); line-height: 1.1; }
.hero p { color: #e8f3fb; font-size: 1.15rem; }
.hero__eyebrow, .lp-section__eyebrow { margin: 0 0 0.5rem; color: var(--lp-accent); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.hero .hero__eyebrow { color: #cdeafa; }

.button, button, input[type="submit"] { display: inline-block; padding: 0.7rem 1rem; color: var(--lp-white); background: var(--lp-accent-dark); border: 1px solid var(--lp-accent-dark); border-radius: 0.45rem; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover, button:hover, input[type="submit"]:hover { color: var(--lp-white); background: var(--lp-accent); }
.button--secondary { color: var(--lp-accent-dark); background: var(--lp-white); }
.button--secondary:hover { color: var(--lp-white); background: var(--lp-accent-dark); }
.hero .button { color: var(--lp-ink); background: var(--lp-white); border-color: var(--lp-white); }
.hero .button:hover { color: var(--lp-white); background: var(--lp-accent-dark); }

#lp-search { scroll-margin-top: 1rem; }
.search-form { display: flex; max-width: 42rem; gap: 0.5rem; margin-top: 1.5rem; }
.search-form label { flex: 1; }
.search-form input[type="search"] { width: 100%; min-height: 2.75rem; padding: 0.65rem 0.75rem; border: 1px solid var(--lp-border); border-radius: 0.45rem; font: inherit; }

.lp-section { margin-top: 3.5rem; }
.lp-section--quiet, .lp-empty-state { padding: 1.5rem; background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius); }
.lp-section__heading { margin-bottom: 1.25rem; }
.lp-section__heading h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.15rem); line-height: 1.2; }
.lp-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.lp-card-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lp-card, .content-card, .lp-feature-card { padding: 1.25rem; background: var(--lp-white); border: 1px solid var(--lp-border); border-radius: var(--lp-radius); box-shadow: var(--lp-shadow); }
.lp-card h3, .content-card h2 { margin: 0; line-height: 1.25; }
.lp-card__eyebrow, .content-card__meta { margin: 0 0 0.55rem; color: var(--lp-muted); font-size: 0.82rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; }
.lp-card__meta { margin-top: 0.6rem; }
.lp-card__score { margin-bottom: 0; color: var(--lp-accent-dark); }
.lp-card__excerpt { margin-top: 0.75rem; color: var(--lp-muted); }
.lp-card__excerpt p { margin: 0; }
.entry-title { margin-top: 0; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; }
.entry-title--card { font-size: 1.35rem; }
.entry-title--card a { text-decoration: none; }
.content-card { max-width: 48rem; margin: 0 auto; }
.content-card__meta { margin-bottom: 1rem; }
.lp-page { max-width: 68rem; min-width: 0; margin: 0 auto; }
.lp-page__header { max-width: 52rem; min-width: 0; margin: 0 auto 2rem; }
.lp-page__subhead { color: var(--lp-muted); font-size: 1.1rem; }
.lp-layout { display: grid; gap: 2rem; }
.lp-layout--main { grid-template-columns: minmax(0, 1fr) minmax(15rem, 22rem); }
.lp-layout__aside { display: grid; align-content: start; gap: 1rem; }
.lp-prose { max-width: 48rem; min-width: 0; }
.lp-prose table { display: block; max-width: 100%; overflow-x: auto; }
.lp-prose > :first-child { margin-top: 0; }
.lp-prose > :last-child { margin-bottom: 0; }
.lp-lead { padding: 1.25rem 1.5rem; margin: 1.5rem 0; background: #eef7fd; border-left: 0.3rem solid var(--lp-accent); border-radius: 0 var(--lp-radius) var(--lp-radius) 0; }
.lp-notice { padding: 1rem 1.25rem; border-radius: var(--lp-radius); }
.lp-notice--warning { background: #fff7df; border: 1px solid #e8c46a; }
.lp-empty-state { margin-top: 2rem; }
.lp-decision-callout { padding: 1rem 1.25rem; margin: 1.25rem 0; background: #f2f7fb; border: 1px solid #c7dceb; border-radius: var(--lp-radius); }
.lp-decision-callout h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.lp-decision-callout p { margin: 0; }
.lp-decision-callout--action { background: #f7fbf3; border-color: #c9dfbf; }

.lp-breadcrumbs { width: min(calc(100% - 2rem), var(--lp-max-width)); margin: 1.5rem auto 0; color: var(--lp-muted); font-size: 0.9rem; }
.lp-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; min-width: 0; padding: 0; margin: 0; list-style: none; }
.lp-breadcrumbs li { min-width: 0; overflow-wrap: anywhere; }
.lp-breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--lp-border); }

.lp-fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 1rem 0 0; }
.lp-fact-grid div { padding: 0.85rem; background: var(--lp-surface); border-radius: 0.5rem; }
.lp-fact-grid dt { color: var(--lp-muted); font-size: 0.8rem; font-weight: 700; }
.lp-fact-grid dd { margin: 0.15rem 0 0; font-weight: 700; }
.lp-fact-summary { margin-top: 2rem; }
.lp-fact-summary h2 { margin-top: 0; font-size: 1.35rem; }
.lp-component { margin-top: 2rem; padding: 1.25rem; background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius); }
.lp-component h2 { margin-top: 0; font-size: 1.25rem; }
.lp-score__value { margin: 0; color: var(--lp-accent-dark); font-size: 2rem; }
.lp-score__value + p { margin-bottom: 0; color: var(--lp-muted); }
.lp-component__disclosure { margin: -0.5rem 0 0; color: var(--lp-muted); font-size: 0.8rem; }
.lp-last-verified, .lp-research-confidence { margin-top: 0; }
.lp-decision-matrix, .lp-comparison-table { margin-top: 2rem; }
.lp-table-scroll { overflow-x: auto; }
.lp-decision-matrix table { width: 100%; min-width: 38rem; border-collapse: collapse; }
.lp-decision-matrix th, .lp-decision-matrix td { padding: 0.75rem; border-bottom: 1px solid var(--lp-border); text-align: left; vertical-align: top; }
.lp-decision-matrix thead th { color: var(--lp-white); background: var(--lp-accent-dark); }
.lp-decision-matrix tbody th { width: 28%; background: var(--lp-surface); }
.lp-decision-matrix td, .lp-decision-matrix th { overflow-wrap: normal; word-break: normal; }
.lp-comparison-cards { display: none; }
.lp-comparison-card { padding: 1rem; background: var(--lp-white); border: 1px solid var(--lp-border); border-radius: var(--lp-radius); box-shadow: var(--lp-shadow); }
.lp-comparison-card h3 { margin: 0 0 0.75rem; font-size: 1.05rem; }
.lp-comparison-card dl { margin: 0; }
.lp-comparison-card dl > div { padding: 0.65rem 0; border-top: 1px solid var(--lp-border); }
.lp-comparison-card dt { color: var(--lp-muted); font-size: 0.8rem; font-weight: 750; }
.lp-comparison-card dd { margin: 0.15rem 0 0; }
.lp-trust-summary { max-width: 48rem; padding: 0.85rem 1rem; margin: 1rem 0 1.5rem; color: var(--lp-muted); background: #fbfcfe; border: 1px solid var(--lp-border); border-radius: 0.6rem; font-size: 0.9rem; }
.lp-trust-summary p { margin: 0.2rem 0; }
.lp-entity-facts { padding: 1rem 1.15rem; margin: 1.5rem 0; background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius); }
.lp-entity-facts h3 { margin: 0 0 0.75rem; font-size: 1.15rem; }
.lp-entity-facts__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem 1rem; margin: 0; }
.lp-entity-facts__list > div { min-width: 0; padding-bottom: 0.55rem; border-bottom: 1px solid var(--lp-border); }
.lp-entity-facts__list dt { color: var(--lp-muted); font-size: 0.78rem; font-weight: 750; }
.lp-entity-facts__list dd { margin: 0.15rem 0 0; }
.lp-entity-facts__details { margin-top: 1rem; }
.lp-entity-facts__details summary { color: var(--lp-accent-dark); font-weight: 750; cursor: pointer; }
.lp-task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.lp-task-card { display: flex; flex-direction: column; gap: 0.45rem; min-height: 9rem; padding: 1.15rem; color: var(--lp-ink); background: var(--lp-white); border: 1px solid var(--lp-border); border-radius: var(--lp-radius); box-shadow: var(--lp-shadow); text-decoration: none; }
.lp-task-card:hover { border-color: var(--lp-accent); transform: translateY(-1px); }
.lp-task-card strong { font-size: 1.05rem; }
.lp-task-card span { color: var(--lp-muted); }
.lp-task-card__action { margin-top: auto; color: var(--lp-accent-dark) !important; font-weight: 750; }
.lp-career-actions { margin-top: 2rem; }
.lp-career-actions__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.lp-career-action { padding: 1.15rem; background: var(--lp-white); border: 1px solid var(--lp-border); border-left: 0.3rem solid var(--lp-accent); border-radius: var(--lp-radius); box-shadow: var(--lp-shadow); }
.lp-career-action h3 { margin-top: 0; }
.lp-career-action p { margin: 0.5rem 0; }
.lp-career-action .button { margin-top: 0.35rem; }
.lp-sources ul { padding-left: 1.25rem; margin-bottom: 0; }
.lp-methodology-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.lp-methodology-step { padding: 1.25rem; background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius); }
.lp-methodology-step h2 { margin-top: 0; font-size: 1.25rem; }

.site-footer { padding: 2.75rem 0 1.25rem; color: var(--lp-muted); background: #f8fafc; border-top: 1px solid var(--lp-border); }
.site-footer__inner { display: grid; gap: 1.75rem; }
.site-footer__grid { display: grid; grid-template-columns: minmax(20rem, 1.6fr) minmax(9rem, 0.6fr) minmax(13rem, 0.85fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.site-footer__brand { display: grid; align-content: start; gap: 0.45rem; max-width: 30rem; }
.site-footer__title { width: fit-content; color: var(--lp-ink); font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; text-decoration: none; }
.site-footer__tagline { margin: 0; color: var(--lp-ink); font-size: 0.94rem; font-weight: 650; }
.site-footer__description { max-width: 27rem; margin: 0.15rem 0 0; font-size: 0.88rem; line-height: 1.55; }
.site-footer__email { width: fit-content; margin-top: 0.4rem; color: var(--lp-accent-dark); font-size: 0.88rem; font-weight: 700; text-decoration: none; }
.site-footer__group { min-width: 0; }
.site-footer__heading { margin: 0 0 0.7rem; color: var(--lp-ink); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.site-footer__links { display: grid; gap: 0.38rem; padding: 0; margin: 0; list-style: none; }
.site-footer__links li { margin: 0; }
.site-footer__links a { color: var(--lp-muted); font-size: 0.88rem; font-weight: 600; line-height: 1.45; text-decoration: none; }
.site-footer__links a:hover, .site-footer__email:hover { color: var(--lp-accent); text-decoration: underline; text-underline-offset: 0.18em; }
.site-footer__bottom { padding-top: 1.1rem; border-top: 1px solid var(--lp-border); }
.site-footer__bottom p { margin: 0; color: var(--lp-muted); font-size: 0.78rem; }

@media (max-width: 60rem) {
    .lp-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-layout--main { grid-template-columns: minmax(0, 1fr); }
    .lp-layout__aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer__grid { grid-template-columns: minmax(16rem, 1.4fr) minmax(8rem, 0.6fr) minmax(11rem, 0.8fr); gap: 2rem; }
}

@media (max-width: 48rem) {
    body { overflow-x: hidden; }
    .site-header__inner { flex-wrap: wrap; padding: 0.75rem 0; }
    .site-navigation__toggle { display: inline-block; }
    .site-navigation { display: none; flex-basis: 100%; }
    .site-navigation.is-open { display: block; }
    .site-navigation ul { align-items: stretch; flex-direction: column; gap: 0; padding: 0.5rem 0; }
    .site-navigation a { padding: 0.7rem 0; }
    .lp-card-grid, .lp-card-grid--two, .lp-methodology-grid, .lp-layout__aside, .lp-task-grid, .lp-career-actions__grid { grid-template-columns: 1fr; }
    .lp-fact-grid { grid-template-columns: 1fr; }
    .lp-entity-facts__list { grid-template-columns: 1fr; }
    .lp-decision-matrix > .lp-table-scroll { display: none; }
    .lp-comparison-cards { display: grid; gap: 0.75rem; }
    .lp-comparison-card { min-width: 0; }
    .search-form { flex-direction: column; }
    .site-footer { padding-top: 2.25rem; }
    .site-footer__grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .site-footer__brand { max-width: none; }
    .site-footer__links { gap: 0.45rem; }
    .site-main { padding-top: 1.5rem; }
}

:focus-visible { outline: 0.2rem solid var(--lp-warm); outline-offset: 0.15rem; }
