.student-body { min-height: 100vh; background: #eef2f7; }
.student-subject-link { min-height: 40px; display: inline-flex; align-items: center; padding: .52rem .75rem; border: 1px solid rgba(255,255,255,.24); border-radius: 9px; color: white; font-size: .78rem; font-weight: 800; text-decoration: none; }
.student-app { width: min(1320px,calc(100% - 2rem)); margin: 0 auto; padding: 1.4rem 0 4rem; }
.student-loading { min-height: 65vh; display: grid; place-items: center; align-content: center; gap: .75rem; color: #657187; }
.student-loading span { width: 34px; height: 34px; border: 3px solid #d7dce5; border-top-color: #16859b; border-radius: 50%; animation: student-spin .8s linear infinite; }
@keyframes student-spin { to { transform: rotate(360deg); } }

.student-gate { min-height: calc(100vh - 120px); display: grid; place-items: center; }
.student-gate-card { width: min(690px,100%); padding: clamp(1.4rem,5vw,3.2rem); border: 1px solid #d9e0e9; border-radius: 24px; background: white; box-shadow: 0 24px 70px rgba(19,35,69,.12); }
.student-gate-mark { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 15px; background: #101a34; color: #ffca58; font: 800 1.2rem Georgia,serif; }
.student-gate h1 { margin: 1.1rem 0 .65rem; font: 500 clamp(2.2rem,7vw,4.3rem)/.96 Georgia,serif; letter-spacing: -.045em; }
.student-gate p { color: #5f6d82; }
.student-gate-list { display: grid; grid-template-columns: repeat(3,1fr); gap: .65rem; margin: 1.2rem 0; }
.student-gate-list div { padding: .85rem; border: 1px solid #dfe4ed; border-radius: 11px; background: #f8fafc; }
.student-gate-list strong { display: block; font-size: .82rem; }
.student-gate-list span { display: block; margin-top: .22rem; color: #748196; font-size: .73rem; }
.student-primary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: .58rem .86rem; border: 1px solid #101a34; border-radius: 9px; background: #101a34; color: white; font-weight: 850; text-decoration: none; cursor: pointer; }
.student-secondary { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: .54rem .8rem; border: 1px solid #cbd3e0; border-radius: 9px; background: white; color: #101a34; font-weight: 800; text-decoration: none; cursor: pointer; }

.student-welcome { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1rem; align-items: end; padding: clamp(1.2rem,4vw,2.1rem); border-radius: 20px; background: #101a34; color: white; overflow: hidden; position: relative; }
.student-welcome::after { content: ""; position: absolute; width: 300px; height: 300px; right: -145px; top: -170px; border: 48px solid rgba(65,196,215,.11); border-radius: 50%; }
.student-welcome > * { position: relative; z-index: 1; }
.student-welcome .eyebrow { color: #ffca58; }
.student-welcome h1 { margin: 0; font: 500 clamp(2.15rem,5vw,4rem)/.98 Georgia,serif; letter-spacing: -.04em; }
.student-welcome p { max-width: 720px; margin: .7rem 0 0; color: #c6cfdf; }
.student-profile-chip { display: grid; gap: .2rem; min-width: 170px; padding: .8rem .95rem; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; background: rgba(255,255,255,.07); }
.student-profile-chip span { color: #aeb9cc; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.student-profile-chip strong { color: #ffca58; }

.student-tabs { position: sticky; z-index: 12; top: 72px; display: flex; gap: .4rem; margin: 1rem 0; padding: .42rem; border: 1px solid #dce2ea; border-radius: 12px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); overflow-x: auto; }
.student-tab { flex: 0 0 auto; min-height: 40px; padding: .48rem .72rem; border: 0; border-radius: 8px; background: transparent; color: #647187; font-weight: 800; cursor: pointer; }
.student-tab.active { background: #101a34; color: white; }
.student-panel { display: grid; gap: 1rem; }
.student-section { padding: clamp(1rem,3vw,1.35rem); border: 1px solid #dce2ea; border-radius: 16px; background: white; box-shadow: 0 7px 28px rgba(28,44,79,.045); }
.student-section-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: 1rem; }
.student-section h2 { margin: .15rem 0 0; color: #101a34; font: 500 clamp(1.45rem,3vw,2rem)/1.08 Georgia,serif; letter-spacing: -.025em; }
.student-section-head > p { max-width: 600px; margin: .25rem 0 0; color: #6b788c; font-size: .82rem; }
.status-pill { flex: 0 0 auto; padding: .28rem .55rem; border-radius: 999px; background: #eef2f7; color: #5d6b80; font-size: .68rem; font-weight: 850; }
.status-pill.good { background: #e8f7ef; color: #176a49; }
.status-pill.warn { background: #fff3d4; color: #77530b; }

.rank-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.rank-card { position: relative; overflow: hidden; min-height: 280px; padding: 1.15rem; border: 1px solid #dce2ea; border-radius: 15px; background: linear-gradient(150deg,#fff 0%,#f6f9fc 100%); }
.rank-card.main { --rank-accent: #16859b; }
.rank-card.advanced { --rank-accent: #a97309; }
.rank-label { display: flex; align-items: center; justify-content: space-between; gap: .6rem; color: #66738a; font-size: .72rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.rank-label span:last-child { color: var(--rank-accent); }
.rank-value { margin-top: .8rem; color: #101a34; font: 500 clamp(2rem,5vw,3.5rem)/1 Georgia,serif; letter-spacing: -.035em; }
.rank-range { margin-top: .25rem; color: #5e6b80; font-size: .8rem; }
.rank-benchmark { margin: .75rem 0 0; padding: .62rem .7rem; border-left: 3px solid var(--rank-accent); border-radius: 0 8px 8px 0; background: #f3f6f9; color: #46546a; font-size: .78rem; }
.rank-evidence { display: grid; grid-template-columns: repeat(3,1fr); gap: .45rem; margin-top: .8rem; }
.rank-evidence div { padding: .5rem; border: 1px solid #e2e7ee; border-radius: 8px; background: white; }
.rank-evidence strong { display: block; color: #101a34; font-size: .78rem; }
.rank-evidence span { color: #7a8698; font-size: .65rem; }
.rank-spark { width: 100%; height: 52px; display: block; margin-top: .7rem; }
.rank-empty { display: grid; align-content: center; min-height: 190px; }
.rank-empty strong { font: 500 1.6rem Georgia,serif; }
.rank-empty p { margin: .45rem 0 .9rem; color: #6a778c; font-size: .82rem; }
.rank-disclaimer { margin: 0; padding: .75rem .85rem; border: 1px solid #ead596; border-radius: 10px; background: #fff8e3; color: #67541e; font-size: .76rem; }

.action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.action-card { padding: 1rem; border: 1px solid #dfe4ed; border-radius: 13px; background: #f8fafc; }
.action-card .action-kicker { color: #16859b; font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.action-card h3 { margin: .35rem 0; font-size: 1rem; }
.action-card p { margin: 0 0 .85rem; color: #68758a; font-size: .8rem; }
.action-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .85rem; }
.action-meta span { padding: .2rem .42rem; border-radius: 999px; background: white; color: #657187; font-size: .67rem; font-weight: 750; }

.diagnostic-intro { display: grid; grid-template-columns: repeat(3,1fr); gap: .65rem; margin: .9rem 0; }
.diagnostic-intro div { padding: .75rem; border: 1px solid #dfe4ed; border-radius: 10px; background: #f8fafc; }
.diagnostic-intro strong { display: block; }
.diagnostic-intro span { color: #6d798d; font-size: .72rem; }
.diagnostic-list { display: grid; gap: .8rem; }
.diagnostic-question { padding: .95rem; border: 1px solid #dfe4ed; border-radius: 11px; background: white; }
.diagnostic-question header { display: flex; justify-content: space-between; gap: .8rem; color: #728095; font-size: .68rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.diagnostic-question h3 { margin: .65rem 0; font-size: .94rem; line-height: 1.45; }
.diagnostic-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem; }
.diagnostic-option { display: grid; grid-template-columns: auto 1fr; gap: .55rem; align-items: start; padding: .55rem .6rem; border: 1px solid #e1e6ed; border-radius: 8px; color: #4f5d72; font-size: .82rem; cursor: pointer; }
.diagnostic-option:has(input:checked) { border-color: #16859b; background: #edf8fa; color: #164e5d; }
.diagnostic-toolbar { position: sticky; z-index: 8; bottom: .75rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-top: 1rem; padding: .75rem; border: 1px solid #ccd5e1; border-radius: 12px; background: rgba(255,255,255,.96); box-shadow: 0 12px 35px rgba(16,26,52,.12); }
.diagnostic-toolbar p { margin: 0; color: #66738a; font-size: .78rem; }
.diagnostic-result { padding: 1rem; border: 1px solid #b8d9c7; border-radius: 11px; background: #eff9f3; }
.diagnostic-result h3 { margin: 0 0 .35rem; }
.diagnostic-result p { margin: .25rem 0; color: #476454; font-size: .82rem; }

.daily-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: .6rem; }
.daily-summary div { padding: .72rem; border: 1px solid #dfe4ed; border-radius: 10px; background: #f8fafc; }
.daily-summary strong { display: block; font-size: .9rem; }
.daily-summary span { color: #6d798d; font-size: .7rem; }
.daily-tabs { display: flex; gap: .45rem; margin: .85rem 0; }
.daily-tab { min-height: 40px; padding: .48rem .72rem; border: 1px solid #cbd3e0; border-radius: 8px; background: white; color: #59677d; font-weight: 800; cursor: pointer; }
.daily-tab.active { border-color: #101a34; background: #101a34; color: white; }
.daily-solution { margin-top: .6rem; padding: .65rem .7rem; border-radius: 8px; background: #f0f8f3; color: #346049; font-size: .78rem; }

.access-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; }
.access-card { padding: .9rem; border: 1px solid #dfe4ed; border-radius: 11px; background: #f8fafc; }
.access-card strong { display: block; }
.access-card p { margin: .3rem 0 0; color: #68758a; font-size: .76rem; }
.access-card a { display: inline-block; margin-top: .6rem; color: #14758a; font-size: .76rem; font-weight: 850; }
.method-list { padding-left: 1.1rem; color: #5e6b80; font-size: .8rem; }

.archive-list { display: grid; gap: .55rem; }
.archive-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .8rem; border: 1px solid #dfe4ed; border-radius: 9px; background: #f8fafc; }
.archive-list strong { color: #101a34; font-size: .78rem; }
.archive-list span,.empty-copy { color: #6b788c; font-size: .75rem; }
.compact-upgrade > div { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; }
.compact-upgrade h2 { margin-bottom: .4rem; }
.compact-upgrade p { margin: 0; color: #647187; font-size: .8rem; }
.mastery-legend { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.1rem; }
.mastery-legend span { padding: .32rem .5rem; border-radius: 999px; background: #eef2f7; color: #5c697e; font-size: .68rem; }
.mastery-legend b { color: #101a34; }
.mastery-subject + .mastery-subject { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid #e0e5ec; }
.mastery-subject-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .65rem; }
.mastery-subject-head h3 { margin: 0; font: 500 1.35rem Georgia,serif; }
.mastery-subject-head span { color: #738096; font-size: .7rem; font-weight: 800; }
.mastery-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.mastery-card { display: grid; grid-template-columns: minmax(0,1fr) auto 34px; gap: .7rem; align-items: center; padding: .68rem .72rem; border: 1px solid #e0e5ec; border-radius: 9px; background: #fafbfd; }
.mastery-card strong,.mastery-card span { display: block; }
.mastery-card strong { font-size: .78rem; }
.mastery-card span { margin-top: .15rem; color: #7a8698; font-size: .65rem; }
.mastery-card b { color: #101a34; font-size: .74rem; text-align: right; }
.mastery-meter { display: flex; gap: 3px; }
.mastery-meter i { width: 16px; height: 7px; border-radius: 99px; background: #dfe4eb; }
.mastery-meter i.filled { background: #16859b; }
.upgrade-panel { min-height: 370px; display: grid; place-content: center; justify-items: start; background: linear-gradient(135deg,#fff 0%,#edf8fa 100%); }
.upgrade-panel > p:not(.eyebrow) { max-width: 680px; color: #5f6d82; }
.upgrade-facts { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0 1.1rem; }
.upgrade-facts span { padding: .35rem .55rem; border: 1px solid #cbdbe2; border-radius: 999px; background: white; color: #376170; font-size: .7rem; font-weight: 750; }
.focus-recommendations { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; margin-bottom: 1rem; }
.focus-recommendations article { padding: .8rem; border: 1px solid #dfe4ed; border-radius: 10px; background: #f8fafc; }
.focus-recommendations span { color: #16859b; font-size: .64rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.focus-recommendations strong { display: block; margin-top: .25rem; font-size: .83rem; }
.focus-recommendations p { margin: .25rem 0 0; color: #6d798d; font-size: .7rem; }
.personal-set-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 1.2rem 0 .65rem; }
.personal-set-head h3 { margin: 0; }
.personal-set-head span { color: #748196; font-size: .7rem; }
.dashboard-plans { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; }
.dashboard-plan { display: flex; flex-direction: column; padding: .9rem; border: 1px solid #dfe4ed; border-radius: 11px; background: #f8fafc; }
.dashboard-plan.active { border: 2px solid #16859b; background: #edf8fa; }
.dashboard-plan > span { color: #16859b; font-size: .65rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.dashboard-plan h3 { margin: .3rem 0; font: 500 1.25rem Georgia,serif; }
.dashboard-plan > strong { font: 500 1.55rem Georgia,serif; }
.dashboard-plan > strong small { color: #748196; font: 500 .65rem Inter,system-ui,sans-serif; }
.dashboard-plan p { flex: 1; color: #677489; font-size: .75rem; }

@media (max-width:850px) {
  .student-welcome { grid-template-columns: 1fr; }
  .student-profile-chip { width: fit-content; }
  .rank-grid,.action-grid { grid-template-columns: 1fr; }
  .diagnostic-options { grid-template-columns: 1fr; }
  .access-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-plans { grid-template-columns: 1fr; }
}
@media (max-width:600px) {
  .student-app { width: min(100% - 1rem,1320px); padding-top: .6rem; }
  .student-welcome { border-radius: 15px; }
  .student-tabs { top: 64px; }
  .student-section-head { display: grid; }
  .student-gate-list,.diagnostic-intro,.daily-summary,.rank-evidence,.access-grid,.mastery-grid,.focus-recommendations { grid-template-columns: 1fr; }
  .compact-upgrade > div { display: grid; }
  .student-subject-link { display: none; }
}
