:root {
    --anp-bg: #edf2fb;
    --anp-bg-2: #f7f9fe;
    --anp-surface: #ffffff;
    --anp-surface-soft: #f8fbff;
    --anp-ink: #0f172a;
    --anp-ink-soft: #334155;
    --anp-muted: #64748b;
    --anp-line: #dfe7f4;
    --anp-accent: #315efb;
    --anp-accent-2: #6f4df6;
    --anp-accent-3: #00a7ff;
    --anp-accent-soft: #ecf2ff;
    --anp-success-soft: #edfdf3;
    --anp-shadow: 0 18px 50px rgba(15, 23, 42, .08);
    --anp-shadow-soft: 0 8px 24px rgba(15, 23, 42, .05);
    --anp-radius-xl: 28px;
    --anp-radius-lg: 22px;
    --anp-radius-md: 16px;
}
html { background: var(--anp-bg); }
body.anp-standalone-portal {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 0% 0%, rgba(49,94,251,.12), transparent 24%),
        radial-gradient(circle at 100% 0%, rgba(111,77,246,.10), transparent 20%),
        linear-gradient(180deg, #f5f7fd 0%, #eef3fb 100%);
    color: var(--anp-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
.anp-site-frame { min-height: 100vh; display: flex; flex-direction: column; }
.anp-site-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px clamp(18px, 3.5vw, 48px);
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(223,231,244,.85);
    position: sticky;
    top: 0;
    z-index: 30;
}
.anp-brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--anp-ink); }
.anp-brand-mark {
    width: 46px; height: 46px; border-radius: 15px;
    display: inline-grid; place-items: center;
    background: linear-gradient(135deg, var(--anp-accent), var(--anp-accent-2));
    color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .05em;
    box-shadow: 0 12px 26px rgba(49,94,251,.24);
}
.anp-brand-copy { display: grid; gap: 2px; }
.anp-brand-copy strong { font-size: 18px; letter-spacing: -.02em; }
.anp-brand-copy small { color: var(--anp-muted); font-size: 12px; }
.anp-user-chip, .anp-site-status {
    display: inline-flex; align-items: center; min-height: 38px; padding: 8px 13px;
    border-radius: 999px; background: rgba(49,94,251,.08); color: #1f49cc; font-size: 13px; font-weight: 700;
    border: 1px solid rgba(49,94,251,.08);
}
.anp-site-main { width: 100%; flex: 1; padding: 34px 0 56px; }
.anp-site-footer {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 8px;
    padding: 18px 20px 26px; color: #7b8798; font-size: 12px;
}
.anp-footer-dot { color: #aab2c0; }

.anp-portal-shell,
.anp-portal-card {
    --anp-ink: #0f172a;
    --anp-muted: #64748b;
    --anp-line: #dfe7f4;
    --anp-soft: #f8fbff;
    --anp-accent: #315efb;
    color: var(--anp-ink);
    box-sizing: border-box;
}
.anp-portal-shell *, .anp-portal-card * { box-sizing: border-box; }
.anp-portal-card {
    max-width: 560px; margin: 64px auto; padding: 36px;
    border: 1px solid rgba(223,231,244,.95); border-radius: 28px;
    background: rgba(255,255,255,.96); box-shadow: var(--anp-shadow);
}
.anp-login-card { max-width: 520px; }
.anp-portal-shell { max-width: 1240px; margin: 0 auto; padding: 14px 24px 58px; }
.anp-portal-kicker { font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: var(--anp-accent); margin-bottom: 10px; }
.anp-portal-card h1, .anp-portal-shell h1 { margin: 0 0 8px; font-size: clamp(34px, 4.2vw, 54px); line-height: 1.04; letter-spacing: -.045em; color: var(--anp-ink); }
.anp-portal-card h2, .anp-portal-shell h2 { margin: 5px 0 9px; letter-spacing: -.03em; }
.anp-portal-muted, .anp-meta { color: var(--anp-muted); }
.anp-portal-form { display: grid; gap: 11px; margin-top: 24px; }
.anp-portal-form label { font-weight: 700; margin-top: 4px; font-size: 14px; }
.anp-portal-form input[type="text"], .anp-portal-form input[type="password"], .anp-portal-form input[type="email"] {
    width: 100%; min-height: 52px; border: 1px solid #cfd8e6; border-radius: 14px;
    padding: 12px 14px; font: inherit; background: #fff; color: var(--anp-ink);
}
.anp-portal-form input:focus { outline: 4px solid rgba(49,94,251,.12); border-color: var(--anp-accent); }
.anp-check { display: flex; gap: 8px; align-items: center; font-weight: 400 !important; margin: 5px 0 8px; }
.anp-btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 18px;
    border-radius: 14px; text-decoration: none !important; border: 1px solid var(--anp-accent);
    background: linear-gradient(135deg, var(--anp-accent), var(--anp-accent-2)); color: #fff !important; font-weight: 780; cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
    box-shadow: 0 10px 24px rgba(49,94,251,.18);
}
.anp-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(49,94,251,.22); }
.anp-btn-block { width: 100%; }
.anp-btn-secondary { background: rgba(255,255,255,.14); color: #fff !important; border-color: rgba(255,255,255,.28); box-shadow: none; }
.anp-btn-secondary:hover { background: rgba(255,255,255,.22); box-shadow: none; }
.anp-portal-links { margin: 18px 0 0; text-align: center; }
.anp-portal-links a { color: var(--anp-accent); font-weight: 700; }
.anp-portal-notice { margin: 16px 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--anp-line); background: var(--anp-soft); }
.anp-portal-notice.anp-error { border-color: #f3b3b3; background: #fff5f5; }
.anp-portal-notice.anp-success { border-color: #a7e1c1; background: #f2fff8; }

.anp-dashboard-head {
    position: relative;
    display: flex; justify-content: space-between; gap: 24px; align-items: flex-start;
    padding: 34px 36px; border: 0; border-radius: 30px;
    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,.18), transparent 28%),
        radial-gradient(circle at 100% 100%, rgba(0,167,255,.18), transparent 32%),
        linear-gradient(135deg, #11214f 0%, #1a3ca1 58%, #3a60ff 100%);
    box-shadow: 0 22px 56px rgba(17,33,79,.18);
    margin-bottom: 26px;
    color: #fff;
    overflow: hidden;
}
.anp-dashboard-head::after {
    pointer-events: none;
    content: "";
    position: absolute;
    right: -40px;
    top: -30px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 68%);
}
.anp-dashboard-head .anp-portal-kicker,
.anp-dashboard-head h1,
.anp-dashboard-head .anp-portal-muted { color: #fff; position: relative; z-index: 1; }
.anp-dashboard-head .anp-portal-kicker { color: rgba(255,255,255,.84); margin-bottom: 12px; }
.anp-dashboard-head .anp-portal-muted { max-width: 620px; opacity: .88; font-size: 15px; line-height: 1.65; }
.anp-context-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.anp-context-chip {
    display: inline-flex; align-items: center; min-height: 32px; padding: 6px 12px; border-radius: 999px;
    background: rgba(255,255,255,.16); color: #fff; font-size: 12px; font-weight: 760;
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(8px);
}
.anp-context-chip-muted { background: rgba(15,23,42,.16); color: rgba(255,255,255,.9); }

.anp-learning-grid, .anp-module-grid, .anp-teacher-learning { display: grid; gap: 20px; }
.anp-learning-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.anp-learning-card, .anp-class-panel {
    border: 1px solid rgba(223,231,244,.95); border-radius: 24px; padding: 28px;
    background: rgba(255,255,255,.98); box-shadow: var(--anp-shadow-soft);
}
.anp-learning-card { position: relative; overflow: hidden; }
.anp-learning-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
    background: linear-gradient(180deg, var(--anp-accent), var(--anp-accent-2));
}
.anp-learning-card::after {
    content: ""; position: absolute; right: -20px; top: -20px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(49,94,251,.08), transparent 70%);
}
.anp-learning-card h2 { font-size: clamp(26px, 2.2vw, 36px); margin-top: 8px; margin-bottom: 6px; }
.anp-learning-card p, .anp-teacher-learning p { font-size: 1.04em; line-height: 1.74; }
.anp-label { color: var(--anp-accent); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .11em; }
.anp-seed-statement { margin: 18px 0 0; font-size: 22px !important; line-height: 1.6 !important; color: var(--anp-ink-soft); letter-spacing: -.015em; }
.anp-curriculum-line { margin: 16px 4px 32px; color: var(--anp-muted); font-size: 13px; }

.anp-module-grid { grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 28px; }
.anp-module-card {
    position: relative;
    display: flex; gap: 16px; align-items: flex-start;
    border: 1px solid rgba(223,231,244,.95); border-radius: 22px; padding: 22px;
    background: rgba(255,255,255,.95); min-height: 168px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    box-shadow: var(--anp-shadow-soft);
}
.anp-module-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(15,23,42,.08); border-color: #cfdbef; }
.anp-module-icon {
    width: 48px; height: 48px; border-radius: 16px; flex: 0 0 auto;
    display: grid; place-items: center; background: linear-gradient(135deg, rgba(49,94,251,.1), rgba(111,77,246,.12)); color: #2e4dc9;
    font-weight: 850; font-size: 14px;
}
.anp-module-content { min-width: 0; }
.anp-module-card h3 { margin: 2px 0 7px; font-size: 18px; letter-spacing: -.02em; }
.anp-module-card p { margin: 0; color: var(--anp-muted); line-height: 1.58; font-size: 14px; }
.anp-status-pill { display: inline-block; margin-top: 12px; padding: 5px 10px; border-radius: 999px; background: #eef2ff; color: #2f4ca8; font-size: 11px; font-weight: 800; }

.anp-class-panel { margin: 0 0 24px; }
.anp-class-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--anp-line); padding-bottom: 18px; margin-bottom: 18px; }
.anp-class-count { text-align: right; min-width: 88px; }
.anp-class-count strong { display: block; font-size: 32px; line-height: 1; }
.anp-class-count span { color: var(--anp-muted); font-size: 13px; }
.anp-teacher-learning { grid-template-columns: repeat(2, minmax(0,1fr)); margin-bottom: 20px; }
.anp-teacher-learning > div { border-left: 3px solid var(--anp-accent); padding-left: 14px; }
.anp-teacher-learning span { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--anp-muted); margin-bottom: 4px; }
.anp-subhead { margin-top: 22px; letter-spacing: -.02em; }
.anp-responsive-table { overflow-x: auto; border: 1px solid var(--anp-line); border-radius: 16px; }
.anp-responsive-table table { width: 100%; border-collapse: collapse; background: #fff; }
.anp-responsive-table th, .anp-responsive-table td { text-align: left; border-bottom: 1px solid var(--anp-line); padding: 12px 12px; }
.anp-responsive-table th { font-size: 12px; color: var(--anp-muted); text-transform: uppercase; letter-spacing: .04em; background: #f8fbff; }
.anp-responsive-table tbody tr:last-child td { border-bottom: none; }

@media (max-width: 980px) {
    .anp-learning-grid, .anp-teacher-learning, .anp-module-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .anp-site-header { padding: 12px 16px; }
    .anp-brand-copy small { display: none; }
    .anp-portal-shell { padding: 8px 16px 42px; }
    .anp-dashboard-head, .anp-class-head { flex-direction: column; }
    .anp-dashboard-head { padding: 26px 22px; border-radius: 26px; }
    .anp-class-count { text-align: left; }
    .anp-portal-card { margin: 28px 14px; padding: 24px; }
    .anp-module-card { min-height: auto; }
}
@media (max-width: 480px) {
    .anp-user-chip { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .anp-brand-mark { width: 40px; height: 40px; border-radius: 14px; }
    .anp-brand-copy strong { font-size: 16px; }
    .anp-portal-shell { padding-left: 12px; padding-right: 12px; }
    .anp-learning-card { padding: 22px; }
    .anp-seed-statement { font-size: 20px !important; }
}


/* v0.2.3 readability refinements: stronger contrast on white surfaces */
.anp-learning-card,
.anp-module-card,
.anp-class-panel {
    color: #0f172a;
}
.anp-learning-card .anp-meta,
.anp-class-panel .anp-meta {
    color: #475569;
    font-weight: 650;
}
.anp-seed-statement {
    color: #1f2937 !important;
    font-weight: 520;
}
.anp-curriculum-line {
    color: #475569;
    font-weight: 600;
}
.anp-module-card h3 {
    color: #111827;
    font-weight: 760;
}
.anp-module-card p {
    color: #475569;
    font-size: 15px;
    line-height: 1.58;
    font-weight: 500;
}
.anp-status-pill {
    color: #2440a8;
    background: #e9efff;
    border: 1px solid #dbe5ff;
}
.anp-label {
    color: #2457f5;
}


.anp-auth-shell {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr .95fr;
    gap: 28px;
    align-items: stretch;
}
.anp-auth-hero {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    padding: 36px 36px 34px;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
      radial-gradient(circle at top right, rgba(82,157,255,.28), transparent 28%),
      radial-gradient(circle at bottom left, rgba(0,167,255,.18), transparent 30%),
      linear-gradient(145deg, #0f1f53 0%, #18398e 48%, #315efb 100%);
    color: #fff;
    box-shadow: 0 24px 56px rgba(17,33,79,.20);
}
.anp-auth-hero-secondary {
    background:
      radial-gradient(circle at top right, rgba(255,255,255,.14), transparent 25%),
      linear-gradient(145deg, #142859 0%, #2b4097 55%, #4d6fff 100%);
    min-height: 460px;
}
.anp-auth-hero .anp-portal-kicker,
.anp-auth-hero h1,
.anp-auth-hero p,
.anp-auth-hero strong,
.anp-auth-hero span,
.anp-auth-hero div { color: #fff; }
.anp-auth-hero h1 { font-size: clamp(38px, 4vw, 56px); line-height: 1.03; margin: 8px 0 18px; }
.anp-auth-lead { max-width: 600px; font-size: 17px; line-height: 1.8; opacity: .95; margin: 0 0 22px; }
.anp-auth-feature-list { display: grid; gap: 14px; margin-top: auto; }
.anp-auth-feature, .anp-auth-note {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(10px);
}
.anp-auth-feature strong { display: block; margin-bottom: 4px; font-size: 16px; }
.anp-auth-feature span, .anp-auth-note { display: block; font-size: 14px; line-height: 1.65; color: rgba(255,255,255,.92); }
.anp-auth-panel {
    max-width: none;
    margin: 0;
    padding: 34px 34px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 520px;
    background: rgba(255,255,255,.98);
}
.anp-auth-panel h2 { font-size: clamp(28px, 2.4vw, 38px); margin-bottom: 10px; }
.anp-auth-panel .anp-portal-muted { font-size: 15px; line-height: 1.7; }
.anp-auth-panel .anp-portal-links { margin-top: 18px; }
.anp-auth-panel .anp-portal-form { margin-top: 18px; }
@media (max-width: 980px) {
   .anp-auth-shell { grid-template-columns: 1fr; }
   .anp-auth-hero, .anp-auth-panel { min-height: auto; }
   .anp-auth-hero { padding: 28px 24px; }
}

/* v0.2.6: keep dashboard controls clickable above decorative layers */
.anp-dashboard-head > * { position: relative; z-index: 2; }
.anp-dashboard-head .anp-btn { position: relative; z-index: 3; pointer-events: auto; }
