:root {
  color-scheme: dark;
  --bg: #080a12;
  --bg-soft: #0c0f1b;
  --surface: rgba(18, 22, 38, .72);
  --surface-strong: #111526;
  --line: rgba(167, 180, 224, .13);
  --text: #f3f5ff;
  --muted: #9da4ba;
  --blue: #6ea8ff;
  --purple: #a884ff;
  --cyan: #88e2ed;
  --font-display: "Manrope", sans-serif;
  --font-body: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.65; overflow-x: hidden; }
body::before { position: fixed; z-index: -1; inset: 0; background: radial-gradient(ellipse at 74% 8%, rgba(84, 69, 173, .13), transparent 34%), radial-gradient(ellipse at 5% 50%, rgba(48, 113, 188, .08), transparent 33%); content: ""; pointer-events: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: #fff; background: rgba(123, 108, 255, .48); }
.container { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid rgba(167, 180, 224, .08); background: rgba(8, 10, 18, .77); backdrop-filter: blur(20px); }
.nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid rgba(152, 162, 255, .4); border-radius: 12px; background: linear-gradient(140deg, rgba(91, 149, 255, .23), rgba(169, 112, 255, .2)); color: #dbe1ff; font: 800 13px var(--font-display); letter-spacing: -.08em; box-shadow: inset 0 1px rgba(255,255,255,.1); }
.brand-copy { display: grid; line-height: 1.15; gap: 4px; }
.brand-copy strong { font: 800 12px var(--font-display); letter-spacing: .13em; }
.brand-copy small { color: #9199b2; font-size: 8px; font-weight: 700; letter-spacing: .2em; }
.nav-links { display: flex; align-items: center; gap: 29px; color: #b7bdd0; font-size: 13px; font-weight: 500; }
.nav-links a:not(.button) { transition: color .2s ease; }
.nav-links [hidden] { display: none !important; }
.nav-links a:not(.button):hover, .nav-links a[aria-current="page"] { color: #fff; }
.nav-login { margin-left: 10px; }
.nav-links button.nav-login { padding: 0; border: 0; background: transparent; color: #b7bdd0; cursor: pointer; font: inherit; transition: color .2s ease; }
.nav-links button.nav-login:hover { color: #fff; }
.nav-links button.nav-login:disabled { cursor: wait; opacity: .7; }
.button { min-height: 49px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 0 21px; border: 1px solid transparent; border-radius: 9px; color: #fff; font-weight: 700; font-size: 13px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: linear-gradient(108deg, #568fff, #8b70f4 58%, #ad73ec); box-shadow: 0 8px 26px rgba(100, 105, 242, .24), inset 0 1px rgba(255,255,255,.3); }
.button-primary:hover { box-shadow: 0 12px 32px rgba(100, 105, 242, .36), inset 0 1px rgba(255,255,255,.3); }
.button-secondary { border-color: rgba(151, 165, 216, .2); background: rgba(124, 132, 167, .12); color: #d7dced; }
.button-secondary:hover { border-color: rgba(151, 165, 216, .38); background: rgba(124, 132, 167, .2); }
.button-small { min-height: 39px; padding-inline: 16px; border-radius: 7px; font-size: 12px; }
.button-full { width: 100%; margin-top: 9px; cursor: pointer; }
.menu-toggle { display: none; }
.hero { position: relative; min-height: 664px; display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; padding-top: 35px; padding-bottom: 95px; }
.hero-copy { position: relative; z-index: 2; padding-bottom: 9px; }
.eyebrow { color: #9aa8d0; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.hero-copy > .eyebrow { display: flex; align-items: center; gap: 9px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #75dcbd; box-shadow: 0 0 12px rgba(117,220,189,.7); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); }
.hero h1 { margin: 24px 0 18px; font-size: clamp(43px, 5.1vw, 66px); font-weight: 700; line-height: 1.12; letter-spacing: -.065em; }
.gradient-text { color: #aaa1ff; background: linear-gradient(100deg, #80c4ff 4%, #9f9fff 55%, #c08aff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-lede { max-width: 470px; margin-bottom: 27px; color: #a9afc2; font-size: 15px; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; }
.text-link { display: inline-flex; align-items: center; gap: 10px; color: #d0d5e5; font-size: 12px; font-weight: 600; transition: color .2s ease; }
.text-link:hover { color: #fff; }
.hero-proof { display: flex; align-items: center; gap: 12px; margin-top: 48px; }
.avatar-stack { display: flex; }
.avatar-stack span { width: 31px; height: 31px; display: grid; place-items: center; margin-left: -6px; border: 2px solid var(--bg); border-radius: 50%; background: linear-gradient(145deg, #507cac, #606091); color: white; font-size: 12px; }
.avatar-stack span:first-child { margin-left: 0; background: linear-gradient(140deg, #687cb7, #77599c); }
.avatar-stack span:last-child { background: linear-gradient(140deg, #428d9d, #525d9b); }
.hero-proof p { margin: 0; color: #9098b0; font-size: 10px; line-height: 1.55; }
.hero-proof strong { color: #d4d8e6; font-size: 11px; font-weight: 600; }
.supabase-status { margin: 13px 0 0; color: #7f89a1; font-size: 9px; }
.hero-visual { position: relative; height: 450px; display: grid; place-items: center; }
.visual-glow { position: absolute; width: 355px; height: 355px; border-radius: 50%; background: linear-gradient(145deg, rgba(57, 134, 218, .24), rgba(140, 80, 204, .25)); filter: blur(82px); }
.orbit { position: absolute; border: 1px solid rgba(160, 173, 235, .09); border-radius: 50%; transform: rotate(-24deg); }
.orbit-one { width: 476px; height: 255px; }
.orbit-two { width: 420px; height: 205px; transform: rotate(38deg); }
.glass-card { border: 1px solid rgba(170, 184, 231, .16); background: linear-gradient(145deg, rgba(23, 29, 49, .88), rgba(13, 16, 29, .83)); box-shadow: 0 26px 70px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.055); backdrop-filter: blur(18px); }
.study-card { position: relative; z-index: 2; width: min(340px, 82%); min-height: 282px; padding: 27px; border-radius: 17px; transform: rotate(-3deg); animation: float 6s ease-in-out infinite; }
.study-top { display: flex; justify-content: space-between; align-items: center; }
.study-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(128, 180, 255, .28); border-radius: 10px; background: rgba(90, 142, 255, .14); color: #a9c5ff; font-size: 20px; }
.live-pill { padding: 5px 8px; border: 1px solid rgba(146, 161, 206, .15); border-radius: 20px; color: #a2acc8; font-size: 7px; font-weight: 700; letter-spacing: .13em; }
.study-label { margin: 31px 0 8px; color: #9ca5c0; font-size: 11px; }
.study-card h2 { margin: 0; font-size: 27px; letter-spacing: -.05em; line-height: 1.25; }
.study-divider { height: 1px; margin-top: 22px; background: rgba(172, 181, 222, .13); }
.study-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 17px; color: #a1a8bc; font-size: 9px; }
.mini-bars { height: 23px; display: flex; align-items: end; gap: 3px; }
.mini-bars i { width: 5px; height: 46%; border-radius: 3px; background: #629ef0; }
.mini-bars i:nth-child(2) { height: 72%; background: #758af5; }.mini-bars i:nth-child(3) { height: 56%; background: #8d7af5; }.mini-bars i:nth-child(4) { height: 88%; background: #9c79ed; }.mini-bars i:nth-child(5) { height: 61%; background: #b183eb; }.mini-bars i:nth-child(6) { height: 98%; background: #78b9f5; }.mini-bars i:nth-child(7) { height: 75%; background: #7f8af0; }
.float-chip { position: absolute; z-index: 3; display: flex; align-items: center; gap: 9px; padding: 11px 14px; border: 1px solid rgba(190, 196, 232, .15); border-radius: 10px; background: rgba(22, 27, 45, .87); box-shadow: 0 12px 30px rgba(0,0,0,.22); color: #d8dced; font-size: 10px; font-weight: 600; backdrop-filter: blur(14px); }
.float-chip span { color: #a6a0ff; font-size: 16px; }
.chip-top { top: 67px; right: 3px; transform: rotate(4deg); }.chip-bottom { bottom: 60px; left: 3px; transform: rotate(-4deg); }.decor { position: absolute; color: rgba(168, 155, 255, .68); }.decor-plus { top: 72px; left: 20px; font-size: 24px; }.decor-star { right: 38px; bottom: 56px; font-size: 20px; }
.hero-scroll { position: absolute; bottom: 29px; left: 0; display: flex; align-items: center; gap: 11px; color: #67718c; font-size: 8px; letter-spacing: .16em; }
.hero-scroll span { width: 24px; height: 1px; background: linear-gradient(90deg, #83b9ff, transparent); }
.ticker { overflow: hidden; border-block: 1px solid rgba(166, 177, 218, .1); background: rgba(17, 20, 35, .48); }
.ticker-track { min-width: max-content; min-height: 58px; display: flex; align-items: center; justify-content: space-around; gap: 35px; padding-inline: 25px; color: #abb2c7; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.ticker-track i { color: #8c82ed; font-size: 11px; font-style: normal; }
.section { padding-top: 116px; padding-bottom: 100px; }
.section-heading { margin-bottom: 38px; }
.section-heading h2, .membership-copy h2, .closing h2 { margin: 13px 0 0; font-size: clamp(32px, 4vw, 45px); letter-spacing: -.06em; line-height: 1.18; }
.muted-gradient { color: #aab1c9; }
.about-grid { display: grid; grid-template-columns: .72fr 1.28fr; align-items: start; gap: 75px; }
.about-intro { max-width: 320px; margin: 4px 0 0; color: #a6adc0; font-size: 14px; line-height: 1.9; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feature-card { position: relative; min-height: 204px; padding: 20px 17px; border-radius: 12px; transition: transform .25s ease, border-color .25s ease; }
.feature-card:hover, .subject-card:hover { transform: translateY(-4px); border-color: rgba(145, 161, 255, .35); }
.feature-number { position: absolute; top: 18px; right: 15px; color: #68728c; font-size: 9px; letter-spacing: .1em; }
.feature-icon { display: grid; width: 34px; height: 34px; place-items: center; margin-bottom: 23px; border-radius: 10px; background: linear-gradient(140deg, rgba(79, 159, 255, .19), rgba(157, 105, 241, .2)); color: #b7c8ff; font-size: 19px; }
.feature-card h3 { margin-bottom: 8px; font-size: 13px; letter-spacing: -.02em; }
.feature-card p { margin-bottom: 0; color: #969eb4; font-size: 10px; line-height: 1.75; }
.subject-section { padding-block: 99px 86px; border-block: 1px solid rgba(166, 177, 218, .08); background: linear-gradient(180deg, rgba(15, 19, 34, .6), rgba(12, 14, 26, .27)); }
.heading-row { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.heading-row > p { max-width: 330px; margin: 0 0 5px; color: #9ea6bb; font-size: 12px; line-height: 1.85; }
.subject-preview { display: flex; flex-wrap: wrap; gap: 9px; }
.subject-preview span { padding: 8px 12px; border: 1px solid rgba(151, 165, 216, .12); border-radius: 6px; background: rgba(255,255,255,.018); color: #bac1d4; font-size: 10px; }
.section-footnote { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; color: #7f89a1; font-size: 10px; }
.lock-icon { color: #a694ff; font-size: 15px; }
.membership-section { padding-top: 91px; padding-bottom: 92px; }
.membership-card { position: relative; display: grid; grid-template-columns: 1fr .73fr; align-items: center; gap: 50px; overflow: hidden; padding: 48px 55px; border-radius: 18px; }
.membership-copy, .price-card { position: relative; z-index: 1; }
.membership-copy h2 { margin: 15px 0; font-size: 39px; }
.membership-copy p { max-width: 405px; margin-bottom: 23px; color: #a0a8bd; font-size: 12px; line-height: 1.85; }
.membership-copy .text-link { color: #bdc5de; }
.price-card { padding: 24px; border: 1px solid rgba(169, 175, 227, .16); border-radius: 13px; background: rgba(8, 11, 20, .4); }
.price-caption, .history-label { color: #929cb8; font-size: 8px; font-weight: 700; letter-spacing: .16em; }
.price { margin: 5px 0 12px; font: 700 37px var(--font-display); letter-spacing: -.06em; }
.price span { padding-left: 5px; color: #9ca4b9; font: 500 10px var(--font-body); letter-spacing: 0; }
.coming-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid rgba(117, 220, 189, .2); border-radius: 20px; color: #a8e8d5; font-size: 8px; font-weight: 700; letter-spacing: .13em; }
.coming-badge .status-dot { width: 5px; height: 5px; }
.price-card p { margin: 15px 0 0; color: #818ba3; font-size: 9px; }
.membership-decoration { position: absolute; top: -105px; right: 210px; color: rgba(143, 126, 238, .08); font-size: 310px; }
.closing { display: grid; justify-items: center; padding-top: 18px; padding-bottom: 116px; text-align: center; }
.closing h2 { margin: 12px 0 23px; }
.site-footer { border-top: 1px solid rgba(166, 177, 218, .09); background: rgba(9, 11, 19, .45); }
.footer-inner { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-inner > p { margin: 0; color: #8e97ad; font-size: 10px; }
.footer-inner > span, .auth-footer { color: #798299; font-size: 9px; }

/* Account preview pages */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-layout { flex: 1; display: grid; grid-template-columns: 1fr .78fr; align-items: center; gap: 100px; padding-block: 58px; }
.auth-aside { position: relative; overflow: hidden; padding-block: 30px; }
.auth-aside h1 { margin: 18px 0; font-size: clamp(45px, 5.5vw, 67px); line-height: 1.09; letter-spacing: -.07em; }
.auth-aside > p { max-width: 410px; color: #a6aec2; font-size: 14px; line-height: 1.85; }
.auth-aside-quote { max-width: 350px; margin-top: 58px; padding-left: 15px; border-left: 2px solid rgba(143, 132, 245, .55); color: #bdc3d6; font-size: 12px; font-style: italic; }
.auth-aside-quote span { display: block; margin-top: 12px; color: #808aa5; font-size: 8px; font-style: normal; font-weight: 700; letter-spacing: .15em; }
.auth-decoration { position: absolute; right: 30px; bottom: 12px; color: rgba(144, 130, 244, .15); font-size: 100px; }
.auth-panel { padding: 35px; border-radius: 16px; }
.auth-panel-heading { margin-bottom: 22px; }
.auth-panel-heading h2 { margin: 9px 0 3px; font-size: 28px; letter-spacing: -.05em; }
.auth-panel-heading p { margin: 0; color: #9da5ba; font-size: 12px; }
.notice { display: flex; gap: 12px; border-radius: 10px; }
.notice-info { margin-bottom: 23px; padding: 13px; border: 1px solid rgba(111, 160, 255, .21); background: rgba(82, 125, 219, .09); color: #b2caff; }
.notice-info > span { flex: 0 0 auto; padding-top: 1px; color: #8db7ff; }
.notice-info p { margin: 0; color: #b4c3e6; font-size: 10px; line-height: 1.6; }
.auth-form { display: grid; }
.auth-form label { margin: 0 0 7px; color: #cdd2e1; font-size: 10px; font-weight: 600; }
.auth-form input { width: 100%; min-height: 46px; margin-bottom: 16px; padding: 0 13px; border: 1px solid rgba(158, 171, 214, .18); border-radius: 7px; outline: none; background: rgba(7, 9, 17, .46); color: var(--text); font-size: 12px; transition: border-color .2s ease, box-shadow .2s ease; }
.auth-form input::placeholder { color: #606a84; }
.auth-form input:focus, .search-field:focus-within { border-color: rgba(125, 153, 255, .6); box-shadow: 0 0 0 3px rgba(111, 138, 243, .1); }
.form-feedback { min-height: 0; margin: 0; color: #b4c3e6; font-size: 10px; }
.form-feedback:not(:empty) { min-height: 16px; margin-top: 8px; }
.form-feedback[data-state="error"] { color: #ffaaa9; }
.form-feedback[data-state="success"] { color: #9de2c7; }
.field-optional { color: #818ba3; font-size: 9px; font-weight: 400; }
.auth-session-status { min-height: 16px; margin: -10px 0 16px; color: #929cb5; font-size: 10px; }
.auth-form button:disabled { cursor: wait; opacity: .75; }
.auth-form button:disabled:hover { transform: none; }
.auth-switch { margin: 17px 0 0; color: #a2a9bc; text-align: center; font-size: 10px; }
.auth-switch a { color: #bdb1ff; font-weight: 700; }
.auth-privacy { margin: 14px 0 0; color: #727d96; text-align: center; font-size: 9px; }
.auth-footer { width: min(1120px, calc(100% - 48px)); display: flex; justify-content: space-between; padding-block: 17px; border-top: 1px solid rgba(166, 177, 218, .08); }
.auth-home-link { font-size: 11px; }

/* Member page previews */
.member-page { min-height: calc(100vh - 171px); padding-top: 35px; padding-bottom: 100px; }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #747f99; font-size: 10px; }
.breadcrumb a { color: #aeb6cc; }
.breadcrumb a:hover { color: #fff; }
.member-hero { padding-block: 53px 32px; }
.member-hero h1 { margin: 12px 0 10px; font-size: clamp(39px, 5vw, 57px); letter-spacing: -.065em; line-height: 1.15; }
.member-hero > p { margin: 0; color: #9ea6bb; font-size: 13px; }
.notice-lock { align-items: flex-start; margin: 4px 0 42px; padding: 17px 18px; border: 1px solid rgba(167, 134, 255, .22); background: linear-gradient(100deg, rgba(106, 92, 206, .12), rgba(53, 105, 172, .09)); }
.notice-symbol { flex: 0 0 auto; color: #bdabff; font-size: 19px; line-height: 1.2; }
.notice-lock strong { color: #e2dcff; font-size: 11px; }
.notice-lock p { margin: 4px 0 6px; color: #a3abc0; font-size: 10px; line-height: 1.7; }
.notice-lock a { color: #b8c5ff; font-size: 10px; font-weight: 600; }
.notice-lock .member-security-note { margin: 4px 0 0; color: #a3abc0; font-size: 10px; line-height: 1.7; }
.auth-session-inline { display: block; margin-bottom: 4px; color: #d7ceff; font-weight: 700; }
.member-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.member-toolbar h2 { margin: 0; font-size: 17px; letter-spacing: -.04em; }
.member-toolbar h2 span { margin-left: 8px; color: #7e88a2; font: 500 9px var(--font-body); letter-spacing: 0; }
.search-field { display: flex; align-items: center; gap: 9px; min-width: 220px; min-height: 38px; padding: 0 11px; border: 1px solid rgba(151, 165, 216, .15); border-radius: 7px; background: rgba(12, 15, 26, .68); color: #959fba; transition: border-color .2s ease, box-shadow .2s ease; }
.search-field > span { font-size: 19px; line-height: 1; }
.search-field input { width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: #e6e9f4; font-size: 10px; }
.search-field input::placeholder { color: #6e7890; }
.subject-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.subject-card { min-height: 73px; display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 10px; transition: transform .2s ease, border-color .2s ease; }
.subject-card[hidden] { display: none; }
.subject-card[aria-disabled="true"] { cursor: default; }
.subject-card > span { color: #8590ac; font-size: 9px; }
.subject-card strong { flex: 1; color: #dfe3f1; font-size: 11px; font-weight: 600; }
.subject-card i { color: #9a8dff; font-size: 13px; font-style: normal; opacity: .7; }
.empty-state { margin: 26px 0; color: #9da5ba; font-size: 12px; text-align: center; }
.library-preview { min-height: 340px; padding: 21px; border-radius: 13px; }
.library-toolbar { display: flex; justify-content: space-between; gap: 12px; }
.library-toolbar .search-field { flex: 1; max-width: 420px; }
.library-toolbar .search-field input:disabled { cursor: not-allowed; }
.pdf-resource-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-top: 25px; padding: 18px; border: 1px solid rgba(151, 165, 216, .14); border-radius: 10px; background: rgba(8, 11, 20, .42); }
.pdf-resource-icon { width: 43px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(143, 150, 231, .2); border-radius: 8px; background: rgba(128, 117, 236, .1); color: #b3a5ff; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.pdf-resource-icon[data-file-category="Image"] { border-color: rgba(92, 195, 190, .23); background: rgba(65, 164, 159, .1); color: #8eddd5; font-size: 18px; }
.pdf-resource-icon[data-file-category="Video"] { border-color: rgba(106, 159, 239, .24); background: rgba(76, 126, 207, .1); color: #a9c7ff; font-size: 18px; }
.pdf-resource-icon[data-file-category="Audio"] { border-color: rgba(194, 144, 240, .24); background: rgba(139, 94, 195, .12); color: #d3aaff; font-size: 20px; }
.pdf-resource-icon[data-file-category="Document"] { border-color: rgba(118, 157, 238, .24); background: rgba(85, 117, 193, .1); color: #b2c9ff; font-size: 18px; }
.pdf-resource-icon[data-file-category="Archive"] { border-color: rgba(227, 174, 102, .23); background: rgba(192, 132, 59, .1); color: #f0c58c; font-size: 18px; }
.pdf-resource-copy h2 { margin: 4px 0; font-size: 15px; letter-spacing: -.035em; }
.pdf-resource-copy p { margin: 0; color: #929bb0; font-size: 10px; }
.pdf-download-button { min-height: 41px; padding-inline: 15px; cursor: pointer; }
.pdf-download-button:disabled { cursor: wait; opacity: .7; }
.pdf-download-button:disabled:hover { transform: none; }
.pdf-download-feedback { grid-column: 2 / -1; min-height: 0; margin: -8px 0 0; color: #b4c3e6; font-size: 10px; }
.pdf-download-feedback:not(:empty) { min-height: 16px; }
.pdf-download-feedback[data-state="error"] { color: #ffaaa9; }
.pdf-download-feedback[data-state="success"] { color: #9de2c7; }
.resource-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.resource-action-button { min-height: 39px; padding-inline: 12px; font-size: 10px; }
.resource-action-button:disabled, .resource-actions .pdf-download-button:disabled { cursor: wait; opacity: .58; }
.resource-view-unavailable { max-width: 150px; color: #8993aa; font-size: 9px; line-height: 1.5; text-align: right; }
.resource-viewer-dialog { width: min(1120px, calc(100vw - 24px)); height: min(92vh, 900px); height: min(92dvh, 900px); max-width: none; max-height: none; padding: 0; overflow: hidden; border: 1px solid rgba(151, 165, 216, .22); border-radius: 14px; background: #0c1020; color: #edf0fc; box-shadow: 0 24px 80px rgba(0, 0, 0, .58); }
.resource-viewer-dialog::backdrop { background: rgba(3, 5, 12, .82); backdrop-filter: blur(7px); }
.resource-viewer-header { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 17px; border-bottom: 1px solid rgba(167, 180, 224, .1); background: linear-gradient(110deg, rgba(33, 45, 76, .9), rgba(32, 24, 58, .92)); }
.resource-viewer-heading { min-width: 0; }
.resource-viewer-heading h2 { margin: 3px 0 0; overflow: hidden; color: #edf0fc; font: 700 15px var(--font-display); text-overflow: ellipsis; white-space: nowrap; }
.resource-viewer-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.resource-viewer-controls .button { min-height: 34px; padding: 6px 10px; font-size: 9px; }
.resource-viewer-status { min-height: 18px; margin: 0; padding: 7px 17px; color: #aab4ca; font-size: 9px; }
.resource-viewer-status[data-state="loading"] { color: #b7c8f5; }
.resource-viewer-status[data-state="loading"]::before { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border: 1px solid rgba(183, 200, 245, .35); border-top-color: #b7c8f5; border-radius: 50%; content: ""; vertical-align: -1px; animation: resource-viewer-spin .8s linear infinite; }
@keyframes resource-viewer-spin { to { transform: rotate(360deg); } }
.resource-viewer-status[data-state="success"] { color: #9be0c3; }
.resource-viewer-status[data-state="error"] { color: #f0a8b1; }
.resource-viewer-content { display: grid; width: 100%; height: calc(100% - 112px); min-height: 0; place-items: center; overflow: auto; background: #080a12; }
.resource-viewer-content:fullscreen { width: 100vw; height: 100vh; padding: 14px; background: #080a12; }
.resource-viewer-pdf { width: 100%; height: 100%; border: 0; background: #252a37; }
.resource-viewer-image { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.resource-viewer-video { width: 100%; max-height: 100%; background: #000; }
.resource-viewer-audio { width: min(620px, calc(100% - 32px)); }
.resource-viewer-text { width: 100%; height: 100%; margin: 0; padding: 18px; overflow: auto; color: #d7dced; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.resource-viewer-fullscreen[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .resource-viewer-status[data-state="loading"]::before { animation: none; } }
.pdf-test-note { margin: 13px 3px 0; color: #7d879e; font-size: 9px; }
.filter-button { display: flex; align-items: center; gap: 25px; min-width: 132px; justify-content: space-between; padding: 0 11px; border: 1px solid rgba(151, 165, 216, .14); border-radius: 7px; background: rgba(12, 15, 26, .65); color: #919bb2; font-size: 10px; }
.filter-button:disabled { opacity: .65; }
.library-empty { min-height: 250px; display: grid; align-content: center; justify-items: center; padding: 25px; text-align: center; }
.empty-icon { width: 43px; height: 43px; display: grid; place-items: center; margin-bottom: 13px; border: 1px solid rgba(143, 150, 231, .18); border-radius: 12px; background: rgba(128, 117, 236, .1); color: #b3a5ff; font-size: 22px; }
.library-empty h2 { margin: 0 0 5px; font-size: 17px; letter-spacing: -.04em; }
.library-empty p { max-width: 370px; margin: 0; color: #919ab0; font-size: 10px; }
.library-load-status { min-height: 22px; color: #a7b0c9; font-size: 11px; }
.library-load-status[hidden], .library-content[hidden], .library-empty[hidden], .subject-card[hidden] { display: none; }
.library-content { padding-bottom: 20px; }
.library-main-toolbar { align-items: end; margin: 4px 0 20px; }
.library-main-toolbar .search-field { min-height: 46px; }
.library-main-toolbar .search-field input { font-size: 12px; }
.library-filter-label { display: grid; gap: 5px; min-width: 205px; color: #9da7c0; font-size: 9px; font-weight: 600; }
.library-main-toolbar .filter-button { width: 100%; min-height: 46px; padding: 0 12px; font: 500 11px var(--font-body); cursor: pointer; }
.library-main-toolbar .filter-button:focus-visible, .subject-card:focus-visible { outline: 2px solid rgba(146, 160, 255, .8); outline-offset: 2px; }
.library-main-toolbar .filter-button option { background: #111526; color: #e6e9f4; }
.library-columns { display: grid; grid-template-columns: minmax(280px, .82fr) minmax(0, 1.4fr); align-items: start; gap: 20px; }
.subject-browser { padding: 19px; border-radius: 13px; }
.library-section-heading, .resource-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.library-section-heading .eyebrow, .resource-heading .eyebrow { font-size: 8px; }
.library-section-heading h2, .resource-heading h2 { margin: 3px 0 0; font: 700 16px var(--font-display); letter-spacing: -.04em; }
.subject-total, .resource-count { flex: 0 0 auto; color: #a8b1c9; font-size: 10px; }
.subject-total { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(151, 165, 216, .15); border-radius: 9px; background: rgba(136, 119, 239, .09); color: #c9c1ff; font-weight: 700; }
.subject-search-field { min-width: 0; min-height: 38px; margin: 14px 0; }
.library-subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.library-subject-grid .subject-card { min-width: 0; min-height: 62px; padding: 9px; border: 1px solid rgba(151, 165, 216, .12); background: rgba(8, 11, 20, .42); color: inherit; text-align: left; cursor: pointer; }
.library-subject-grid .subject-card:hover { border-color: rgba(145, 161, 255, .35); background: rgba(109, 117, 218, .09); }
.library-subject-grid .subject-card.is-active { border-color: rgba(145, 161, 255, .5); background: linear-gradient(120deg, rgba(89, 134, 218, .14), rgba(151, 109, 220, .12)); }
.library-subject-grid .subject-icon { flex: 0 0 25px; display: grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; background: rgba(139, 127, 245, .12); color: #b6a9ff; font-size: 14px; }
.library-subject-grid .subject-card strong { min-width: 0; color: #dfe3f1; font-size: 9px; line-height: 1.35; }
.library-subject-grid .subject-count { color: #838ca4; font-size: 8px; }
.library-subject-grid .subject-card.is-active .subject-count { color: #c3b9ff; }
.resource-browser { min-width: 0; }
.resource-heading { min-height: 43px; margin: 0 0 12px; }
.resource-list { display: grid; gap: 12px; }
.resource-list:empty { display: none; }
.resource-list .pdf-resource-card { grid-template-columns: auto minmax(0, 1fr) auto; margin: 0; padding: 16px; }
.pdf-resource-copy h2, .pdf-resource-copy h3 { margin: 5px 0 3px; font: 700 14px var(--font-display); letter-spacing: -.035em; }
.pdf-resource-copy p { margin: 3px 0 0; color: #929bb0; font-size: 10px; line-height: 1.55; }
.pdf-resource-copy .resource-subject { color: #b8c2df; font-size: 9px; }
.resource-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.resource-tier, .resource-development { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; border: 1px solid rgba(112, 218, 180, .2); border-radius: 999px; background: rgba(69, 173, 131, .09); color: #9de2c7; font-size: 8px; font-weight: 700; letter-spacing: .04em; }
.resource-extension { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; border: 1px solid rgba(151, 165, 216, .18); border-radius: 999px; background: rgba(124, 132, 167, .08); color: #c1c9dc; font-size: 8px; font-weight: 700; letter-spacing: .04em; }
.resource-tier.is-premium { border-color: rgba(180, 145, 255, .3); background: rgba(138, 108, 226, .13); color: #d1bcff; }
.resource-development { border-color: rgba(131, 167, 255, .22); background: rgba(97, 132, 220, .1); color: #b6c8ff; }
.resource-list .pdf-download-button { min-height: 39px; padding-inline: 12px; font-size: 10px; }
.resource-list .pdf-download-button:disabled { cursor: not-allowed; opacity: .58; }
.resource-list .pdf-download-button:disabled:hover { transform: none; }
.resource-list .pdf-download-feedback { grid-column: 2 / -1; margin: -5px 0 0; }
.resource-list .pdf-download-feedback[data-state="error"] { color: #ffaaa9; }
.resource-list .pdf-download-feedback[data-state="success"] { color: #9de2c7; }
.resource-browser .library-empty { min-height: 240px; padding: 26px; border-radius: 13px; }
.premium-security-note { margin: 13px 2px 0; color: #818ba3; font-size: 9px; line-height: 1.65; }
.library-content > .pdf-test-note { margin-top: 20px; }
.profile-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profile-placeholder { min-height: 220px; padding: 24px; border-radius: 12px; }
.placeholder-icon { display: grid; width: 38px; height: 38px; place-items: center; margin-bottom: 17px; border-radius: 10px; background: rgba(127, 123, 236, .13); color: #b3a9ff; font-size: 21px; }
.profile-placeholder h2 { margin: 7px 0; font-size: 16px; letter-spacing: -.04em; }
.profile-placeholder p { max-width: 350px; margin: 0; color: #929bb0; font-size: 10px; line-height: 1.7; }
.profile-form { width: 100%; margin-top: 16px; }
.profile-retry { margin-top: 10px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.profile-retry[hidden] { display: none; }
.history-preview { min-height: 330px; }
.history-heading { display: flex; justify-content: space-between; }

@keyframes float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 900px) {
  .hero { min-height: 600px; grid-template-columns: 1.05fr .95fr; }
  .hero h1 { font-size: clamp(42px, 6vw, 57px); }
  .hero-visual { transform: scale(.88); }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-intro { max-width: 600px; }
  .auth-layout { gap: 48px; }
}
@media (max-width: 700px) {
  .container { width: min(100% - 36px, 540px); }
  .nav { min-height: 68px; }
  .menu-toggle { width: 39px; height: 39px; display: grid; align-content: center; justify-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.03); }
  .menu-toggle span { width: 15px; height: 1px; background: #d9deef; transition: transform .2s ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }
  .nav-links { position: absolute; top: calc(100% + 1px); right: 0; left: 0; display: none; align-items: stretch; gap: 0; padding: 10px 18px 17px; border-bottom: 1px solid var(--line); background: rgba(8, 10, 18, .97); }
  .nav-links.is-open { display: flex; flex-direction: column; }
  .nav-links > a:not(.button) { padding: 11px 2px; }
  .nav-links > button.nav-login { margin-left: 0; padding: 11px 2px; text-align: left; }
  .nav-login { margin-left: 0; }
  .nav-links .button { margin-top: 8px; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 70px; padding-bottom: 68px; }
  .hero h1 { margin-top: 19px; font-size: clamp(42px, 11vw, 61px); }
  .hero-lede { max-width: 510px; font-size: 13px; }
  .hero-proof { margin-top: 31px; }
  .hero-visual { width: 100%; height: 365px; margin-top: 20px; transform: none; }
  .study-card { width: min(340px, 78%); }
  .orbit-one { width: 390px; }.orbit-two { width: 350px; }
  .chip-top { top: 37px; right: 0; }.chip-bottom { bottom: 28px; left: 0; }
  .hero-scroll { bottom: 14px; }
  .ticker-track { min-height: 49px; gap: 22px; font-size: 8px; }
  .section { padding-top: 79px; padding-bottom: 72px; }
  .section-heading h2, .membership-copy h2, .closing h2 { font-size: 35px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: auto; padding: 18px; }
  .feature-icon { margin-bottom: 15px; }
  .feature-card p { max-width: 360px; }
  .subject-section { padding-block: 74px 68px; }
  .heading-row { display: block; }
  .heading-row > p { margin-top: 17px; }
  .subject-preview { gap: 7px; }
  .subject-preview span { padding: 7px 9px; font-size: 9px; }
  .membership-section { padding-top: 65px; padding-bottom: 67px; }
  .membership-card { grid-template-columns: 1fr; gap: 28px; padding: 28px 22px; }
  .membership-copy h2 { font-size: 34px; }
  .membership-decoration { top: 100px; right: -40px; font-size: 220px; }
  .closing { padding-bottom: 78px; }
  .footer-inner { min-height: 120px; flex-wrap: wrap; justify-content: space-between; padding-block: 18px; }
  .footer-inner > p { display: none; }
  .footer-inner > span { text-align: right; }
  .auth-layout { grid-template-columns: 1fr; gap: 20px; padding-block: 31px 45px; }
  .auth-aside { padding-block: 12px 0; }
  .auth-aside h1 { font-size: clamp(42px, 10vw, 55px); }
  .auth-aside > p { font-size: 12px; }
  .auth-aside-quote { display: none; }
  .auth-panel { padding: 24px 20px; }
  .auth-footer { width: min(100% - 36px, 540px); }
  .register-layout { padding-top: 24px; }
  .member-page { padding-top: 24px; padding-bottom: 70px; }
  .member-hero { padding-block: 41px 25px; }
  .member-hero h1 { font-size: 42px; }
  .member-toolbar { align-items: stretch; flex-direction: column; }
  .search-field { min-width: 100%; }
  .library-columns { grid-template-columns: 1fr; }
  .library-main-toolbar { align-items: stretch; flex-direction: column; }
  .library-filter-label { min-width: 100%; }
  .library-subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subject-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .subject-card { min-height: 66px; gap: 8px; padding: 10px; }
  .subject-card strong { font-size: 10px; }
  .profile-preview-grid { grid-template-columns: 1fr; }
  .pdf-resource-card { grid-template-columns: auto 1fr; gap: 12px; }
  .resource-actions { grid-column: 1 / -1; justify-content: stretch; }
  .resource-actions .button { flex: 1 1 130px; }
  .resource-view-unavailable { max-width: none; text-align: left; }
  .resource-viewer-dialog { width: calc(100vw - 14px); height: calc(100vh - 14px); height: calc(100dvh - 14px); border-radius: 10px; }
  .resource-viewer-header { min-height: 62px; padding: 10px; }
  .resource-viewer-heading h2 { max-width: 42vw; font-size: 12px; }
  .resource-viewer-controls { gap: 5px; }
  .resource-viewer-controls .button { min-height: 32px; padding: 5px 8px; }
  .resource-viewer-content { height: calc(100% - 100px); }
  .pdf-download-button { grid-column: 1 / -1; width: 100%; }
  .pdf-download-feedback { grid-column: 1 / -1; margin-top: -3px; }
}
@media (max-width: 390px) {
  .container { width: calc(100% - 30px); }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 16px; }
  .hero-visual { height: 325px; }
  .study-card { padding: 21px; }
  .float-chip { padding: 9px 10px; font-size: 9px; }
  .subject-grid { grid-template-columns: 1fr; }
  .auth-footer { width: calc(100% - 30px); gap: 10px; }
}

/* My Devices */
.device-access-status { margin-bottom: 28px; }
.device-access-status[data-state="error"] { border-color: rgba(255, 119, 142, .32); background: rgba(173, 64, 87, .1); }
.device-access-status[data-state="success"] { border-color: rgba(112, 220, 189, .24); background: rgba(58, 149, 123, .09); }
.device-manager { padding: 25px; border-radius: 14px; }
.device-manager[hidden] { display: none; }
.device-manager-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid rgba(166, 177, 218, .1); }
.device-manager-header h2 { margin: 5px 0 0; font-size: 19px; letter-spacing: -.04em; }
.device-limit-badge { flex: 0 0 auto; padding: 7px 11px; border: 1px solid rgba(128, 157, 255, .23); border-radius: 7px; background: rgba(102, 121, 218, .1); color: #c1c9ff; font-size: 10px; font-weight: 700; }
.device-security-note { max-width: 760px; margin: 16px 0 18px; color: #98a2ba; font-size: 11px; line-height: 1.7; }
.device-list-status { min-height: 24px; margin-bottom: 13px; color: #a9b5d1; font-size: 11px; }
.device-list-status[data-state="error"] { color: #ffabb7; }
.device-list-status[data-state="success"] { color: #8edbc0; }
.device-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.device-card { min-width: 0; padding: 17px; border: 1px solid rgba(151, 165, 216, .14); border-radius: 10px; background: rgba(8, 11, 20, .42); }
.device-card-heading { display: flex; align-items: center; gap: 10px; min-width: 0; margin-bottom: 16px; }
.device-card-icon { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(128, 180, 255, .22); border-radius: 9px; background: rgba(90, 142, 255, .1); color: #a9c5ff; font-size: 17px; }
.device-card-heading h3 { overflow-wrap: anywhere; margin: 0; color: #e6e9f4; font-size: 13px; letter-spacing: -.02em; }
.device-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.device-detail { min-width: 0; display: grid; gap: 4px; }
.device-detail-label { color: #818ba4; font-size: 9px; }
.device-detail-value { overflow-wrap: anywhere; color: #c1c8db; font-size: 10px; font-weight: 500; }
.device-revoke-button { width: 100%; min-height: 39px; margin-top: 16px; border-color: rgba(255, 123, 145, .25); background: rgba(173, 64, 87, .1); color: #ffb5c0; cursor: pointer; font-size: 11px; }
.device-revoke-button:hover { border-color: rgba(255, 123, 145, .45); background: rgba(173, 64, 87, .18); }
.device-revoke-button:disabled, .device-refresh-button:disabled { cursor: wait; opacity: .65; }
.device-revoke-button:disabled:hover { transform: none; }
.device-action-unavailable { margin: 14px 0 0; color: #9da5ba; font-size: 10px; }
.device-refresh-button { min-height: 40px; margin-top: 17px; cursor: pointer; font-size: 11px; }
.device-registration-banner { position: relative; z-index: 1; align-items: flex-start; margin-top: 16px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid rgba(255, 119, 142, .27); background: linear-gradient(100deg, rgba(106, 92, 206, .13), rgba(53, 105, 172, .1)); }
.device-registration-banner[hidden] { display: none; }
.device-registration-banner[data-state="error"] { border-color: rgba(255, 119, 142, .34); background: linear-gradient(100deg, rgba(173, 64, 87, .13), rgba(53, 105, 172, .08)); }
.device-registration-banner strong { color: #ffe0e4; font-size: 11px; }
.device-registration-banner p { margin: 4px 0 0; color: #b7bfd3; font-size: 10px; line-height: 1.65; }
.device-registration-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 10px; }
.device-registration-action { min-height: 33px; display: inline-flex; align-items: center; justify-content: center; padding: 5px 11px; border: 1px solid rgba(157, 167, 224, .26); border-radius: 6px; background: rgba(111, 121, 205, .14); color: #d6dcff; font: 600 10px var(--font-body); cursor: pointer; }
.device-registration-action:hover { border-color: rgba(157, 167, 224, .48); background: rgba(111, 121, 205, .22); }
.device-registration-action:disabled { cursor: wait; opacity: .65; }
.auth-panel .device-registration-banner { margin: 0 0 16px; }

@media (max-width: 700px) {
  .device-manager { padding: 19px 15px; }
  .device-manager-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .device-list { grid-template-columns: 1fr; }
  .device-registration-banner { margin-top: 12px; margin-bottom: 12px; padding: 12px; }
}
