/* Stage 8.2a — account experience */
.account-body{background:radial-gradient(ellipse at 18% 20%,#1a2b3c 0,transparent 42%),radial-gradient(ellipse at 88% 78%,#2a1b13 0,transparent 32%),var(--bg)}
.account-header{width:min(1180px,calc(100% - 48px));margin:0 auto;padding:24px 0;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #263546}
.account-brand{display:inline-flex;align-items:center;gap:10px;color:#f5f8fb;font-weight:900;letter-spacing:.1em;font-size:1rem}
.account-brand:hover{text-decoration:none;color:#fff}
.account-brand>span:last-child span{color:var(--orange-2)}
.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:linear-gradient(145deg,#ffad68,#ff7b22);color:#17100a;font-size:1.2rem;font-weight:950;box-shadow:0 6px 22px #ff8a3230}
.back-link{font-size:.9rem;color:#b7c5d3}
.account-main{width:min(1120px,calc(100% - 48px));margin:clamp(34px,6vw,76px) auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(380px,480px);gap:clamp(40px,8vw,112px);align-items:center;flex:1}
.account-intro{max-width:510px}
.account-eyebrow,.auth-kicker{font-size:.72rem;font-weight:850;letter-spacing:.16em;color:var(--orange-2)}
.account-intro h1{font-size:clamp(2.55rem,5.2vw,4.5rem);line-height:1.04;letter-spacing:-.065em;color:#f6f8fb;margin:18px 0}
.account-intro h1 span{color:var(--orange-2)}
.account-lead{font-size:1.04rem;line-height:1.8;color:#b7c5d3;max-width:490px}
.account-benefits{display:grid;gap:20px;margin:38px 0 30px}
.benefit-item{display:flex;align-items:flex-start;gap:15px}
.benefit-icon{display:grid;place-items:center;flex:0 0 42px;height:42px;border:1px solid #ff8a3248;border-radius:12px;background:#ff8a3212;color:var(--orange-2);font-size:1.35rem}
.benefit-item h2{font-size:1rem;color:#f1f5f9;margin:0 0 3px}
.benefit-item p{font-size:.9rem;color:#9eafc1;line-height:1.55}
.account-manifesto{color:#70869b;font-size:.78rem;font-weight:750;letter-spacing:.16em;text-transform:uppercase}
.auth-card{background:linear-gradient(150deg,#172230f5,#101720f5);border:1px solid #34475a;border-radius:22px;padding:clamp(23px,4vw,34px);box-shadow:0 24px 75px #0007}
.auth-card-heading h2{font-size:1.75rem;line-height:1.2;letter-spacing:-.04em;color:#f5f8fb;margin:8px 0}
.auth-card-heading>p:last-child{font-size:.91rem;color:#9eafc1}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:24px 0 20px;padding:5px;border-radius:11px;background:#0b121a;border:1px solid #29394a}
.auth-tab{background:transparent;color:#9eafc1;border:1px solid transparent;padding:9px 8px;border-radius:8px;font-size:.87rem;font-weight:750}
.auth-tab:hover{background:#ffffff08;color:#e9f0f7}
.auth-tab.active{background:#243345;border-color:#3b5065;color:#fff;box-shadow:0 2px 8px #0003}
.google-button{display:flex;justify-content:center;align-items:center;gap:12px;width:100%;min-height:48px;background:#f7f9fc;color:#202a35;border:1px solid #d9e0e8;border-radius:10px;font-weight:800;font-size:.94rem;transition:background .18s,transform .18s}
.google-button:hover{background:#e9eef5;transform:translateY(-1px)}
.google-button svg{width:18px;height:18px}
.auth-divider{display:flex;align-items:center;gap:12px;margin:19px 0;color:#7f91a4;font-size:.76rem}
.auth-divider:before,.auth-divider:after{content:"";height:1px;background:#2b3b4c;flex:1}
.auth-form{display:grid;gap:9px}
.auth-form label{font-size:.82rem;font-weight:750;color:#dce5ee;margin-top:5px}
.auth-form label span{color:#7f91a4;font-size:.72rem;font-weight:500;margin-left:5px}
.auth-form input{min-height:46px;border:1px solid #33465a;border-radius:9px;background:#0b121a;color:#f0f5fa;padding:10px 13px;font:inherit;font-size:.91rem;transition:border-color .18s,box-shadow .18s}
.auth-form input::placeholder{color:#64778b}
.auth-form input:focus{outline:none;border-color:var(--orange);box-shadow:0 0 0 3px #ff8a321c}
.password-wrap{position:relative}
.password-wrap input{padding-right:64px}
.password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);padding:5px 7px;background:transparent;color:#9eafc1;font-size:.75rem}
.password-toggle:hover{background:#ffffff0b;color:#fff}
.field-hint{color:#7f91a4;font-size:.74rem;margin-top:-3px}
.auth-submit{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:48px;margin-top:10px;padding:11px 16px;border-radius:10px;background:linear-gradient(110deg,#ff9a4a,#ff7b22);color:#1b120b;font-weight:850;box-shadow:0 8px 24px #ff8a3224}
.auth-submit:hover{background:linear-gradient(110deg,#ffb36b,#ff9140)}
.auth-submit span{font-size:1.1rem}
.forgot-link{justify-self:end;background:none;color:var(--orange-2);padding:4px 0;font-size:.8rem;font-weight:700}
.forgot-link:hover{background:none;color:#ffd0a5;text-decoration:underline}
.recovery-copy{color:#aebdcb;font-size:.9rem;margin:0 0 18px;line-height:1.65}
.back-to-login{margin-top:14px}
.auth-status{margin-top:18px;padding:10px 12px;border:1px solid #34475a;border-radius:9px;background:#0b121a;color:#91a5b9;font-size:.76rem;line-height:1.5}
.auth-status.is-notice{border-color:#76502f;background:#2b1e14;color:#ffd0a5}
.auth-terms{margin-top:16px;color:#718499;font-size:.7rem;line-height:1.6;text-align:center}
.account-footer{width:min(1180px,calc(100% - 48px));margin:auto auto 0;padding:20px 0;display:flex;justify-content:space-between;gap:14px;border-top:1px solid #263546;color:#72869a;font-size:.76rem}
.account-footer a{color:#9eafc1}
@media(max-width:850px){.account-main{grid-template-columns:1fr;max-width:540px;gap:34px;margin-top:38px}.account-intro{max-width:none}.account-intro h1{font-size:clamp(2.5rem,8vw,3.7rem)}.account-benefits{grid-template-columns:1fr 1fr;gap:16px}.benefit-item{gap:10px}.benefit-icon{flex-basis:36px;height:36px}.account-manifesto{display:none}}
@media(max-width:560px){.account-header,.account-footer{width:calc(100% - 32px)}.account-main{width:calc(100% - 32px);margin:28px auto 38px;gap:28px}.account-header{padding:17px 0}.account-brand{font-size:.88rem}.back-link{font-size:.78rem}.account-intro h1{font-size:2.55rem;margin:12px 0}.account-lead{font-size:.94rem}.account-benefits{grid-template-columns:1fr;gap:13px;margin:24px 0 0}.benefit-item h2{font-size:.94rem}.benefit-item p{font-size:.83rem}.auth-card{padding:22px 18px;border-radius:17px}.auth-card-heading h2{font-size:1.55rem}.account-footer{flex-wrap:wrap;justify-content:center}.account-footer span:nth-child(2){display:none}}
@media(prefers-reduced-motion:reduce){.account-body *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Stage 8.2b — authentication states */
.auth-status.is-success{border-color:#286348;background:#10251d;color:#a7e4c3}
.auth-status.is-error{border-color:#754044;background:#2a171a;color:#ffc0c5}
.signed-in-email{overflow-wrap:anywhere;color:#f1f5f9;font-weight:750;font-size:.98rem;margin:0 0 18px;padding:13px 14px;border:1px solid #33465a;border-radius:9px;background:#0b121a}
.auth-submit:disabled,.google-button:disabled{opacity:.65;cursor:wait;transform:none}

/* Stage 8.3a — profile basics */
.profile-form{margin:18px 0 16px;padding-top:17px;border-top:1px solid #2b3b4c}
.profile-form label{margin-top:0}
.profile-form input:disabled{opacity:.65;cursor:wait}
.profile-logout{margin-top:0}


/* Stage 8.3a — focused signed-in account dashboard */
.account-body.is-signed-in .account-main{grid-template-columns:minmax(0,620px);justify-content:center;max-width:720px;margin-top:clamp(42px,8vw,96px);margin-bottom:clamp(42px,8vw,96px)}
.account-body.is-signed-in .account-intro{display:none}
.account-body.is-signed-in .auth-card{width:100%}
.account-body.is-signed-in .auth-status[hidden],.account-body.is-signed-in .auth-terms[hidden]{display:none}
.account-body.is-signed-in .profile-form{gap:12px}
.account-body.is-signed-in .profile-form label{margin:0 0 2px}
.account-body.is-signed-in .profile-form input{width:100%}
.account-body.is-signed-in .profile-logout{background:#202d3b;color:#e5edf5;border:1px solid #405267;box-shadow:none}
.account-body.is-signed-in .profile-logout:hover{background:#2a3a4c}
@media(max-width:850px){.account-body.is-signed-in .account-main{max-width:620px;margin-top:42px}}

.account-body.is-signed-in #auth-status{display:none!important}

/* Ensure the native hidden attribute wins over component display rules. */
.auth-tabs[hidden]{display:none!important}


/* Stage 8.3c — personal library dashboard */
.account-body.is-signed-in .account-main{width:min(1380px,calc(100% - 48px));max-width:1380px;display:block;margin:28px auto 48px}
.account-body.is-signed-in .auth-card{padding:0;width:100%;max-width:none;overflow:hidden;border-radius:20px}
.account-body.is-signed-in .auth-card-heading,.account-body.is-signed-in .auth-status,.account-body.is-signed-in .auth-terms{display:none!important}
.account-dashboard{display:grid;grid-template-columns:245px minmax(0,1fr);min-height:680px;background:#101923}
.library-sidebar{display:flex;flex-direction:column;padding:25px 17px;background:linear-gradient(180deg,#111d29,#0c141d);border-right:1px solid #293a4b}
.sidebar-heading{display:flex;align-items:center;gap:11px;padding:0 7px 25px;border-bottom:1px solid #283848}
.sidebar-mark{display:grid;place-items:center;width:37px;height:37px;border-radius:11px;background:linear-gradient(145deg,#ffad68,#ff7b22);color:#17100a;font-weight:950;font-size:1.2rem}
.sidebar-heading strong,.sidebar-heading small,.sidebar-user strong,.sidebar-user small{display:block}
.sidebar-heading strong{font-size:.72rem;letter-spacing:.12em;color:#f3f6fa}
.sidebar-heading small{font-size:.72rem;color:#7f93a8;margin-top:3px}
.library-nav{display:grid;gap:6px;margin-top:24px}
.library-nav-item{display:flex;align-items:center;gap:11px;width:100%;padding:11px 12px;border:1px solid transparent;border-radius:9px;background:transparent;color:#a9b9c9;text-align:left;font-size:.88rem;font-weight:700}
.library-nav-item>span:first-child{width:18px;text-align:center;font-size:1.05rem;color:#91a6bb}
.library-nav-item:hover{background:#ffffff08;color:#f4f7fa}
.library-nav-item.active{background:#ff8a3218;border-color:#ff8a3238;color:#ffd0a5}
.library-nav-item.active>span:first-child{color:#ffad68}
.nav-count{margin-left:auto;color:#91a6bb;font-size:.72rem}
.sidebar-user{display:flex;align-items:center;gap:10px;margin-top:auto;padding:18px 5px 14px;border-top:1px solid #283848;min-width:0}
.sidebar-avatar{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:50%;background:#29394a;color:#ffbd8a;font-weight:850}
.sidebar-user>span:last-child{min-width:0}
.sidebar-user strong{font-size:.78rem;color:#e8eef4}
.sidebar-user small{font-size:.68rem;color:#7f93a8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:155px;margin-top:3px}
.sidebar-logout{padding:10px 12px;text-align:left;border:1px solid #35485b;border-radius:9px;background:#172431;color:#b9c7d5;font-size:.82rem;font-weight:700}
.sidebar-logout:hover{background:#253647;color:#fff}
.dashboard-main{min-width:0;padding:28px clamp(20px,4vw,48px) 42px}
.dashboard-topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-bottom:23px;border-bottom:1px solid #293a4b}
.dashboard-breadcrumb,.dashboard-eyebrow{font-size:.65rem;letter-spacing:.15em;font-weight:850;color:#ffad68;margin:0 0 7px}
.dashboard-breadcrumb span{color:#62778b;padding:0 5px}
.dashboard-topbar h2{font-size:1.55rem;letter-spacing:-.04em;color:#f4f7fa;margin:0}
.dashboard-site-link,.text-action{color:#ffb47b;font-size:.8rem;font-weight:750;background:none;border:0;padding:7px 0}
.dashboard-site-link:hover,.text-action:hover{color:#ffd0a5;text-decoration:underline}
.dashboard-view{padding-top:26px}
.dashboard-welcome{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:25px 27px;border:1px solid #39485a;border-radius:15px;background:radial-gradient(ellipse at 90% 0%,#ff8a321b,transparent 45%),linear-gradient(120deg,#1b2a39,#17212d)}
.dashboard-welcome h3,.dashboard-page-intro h3{font-size:clamp(1.35rem,2.4vw,1.85rem);letter-spacing:-.045em;color:#f5f8fb;margin:5px 0}
.dashboard-welcome p:last-child,.dashboard-page-intro p:last-child{color:#9eafc1;font-size:.88rem;margin:7px 0 0}
.welcome-orbit{display:grid;place-items:center;width:65px;height:65px;border:1px solid #ffad6855;border-radius:50%;color:#ffad68;font-size:2rem;background:#ff8a3210}
.dashboard-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin:17px 0 32px}
.dashboard-stat{padding:17px 18px;border:1px solid #2c3e50;border-radius:12px;background:#141f2a}
.dashboard-stat span,.dashboard-stat small{display:block;color:#91a5b9;font-size:.75rem}
.dashboard-stat strong{display:block;color:#f4f7fa;font-size:1.8rem;line-height:1.2;margin:7px 0 4px}
.dashboard-section-heading{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:28px 0 13px}
.dashboard-section-heading h3{font-size:1.12rem;color:#edf3f8;margin:0}
.dashboard-section-heading .dashboard-eyebrow{margin-bottom:4px}
.collection-preview{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}
.collection-preview-card{display:grid;gap:8px;text-align:left;padding:15px;border:1px solid #2d4053;border-radius:11px;background:#141f2a;color:#ffb47b}
.collection-preview-card:hover{border-color:#ff9a4a;background:#1b2936}
.collection-preview-card>span{font-size:1.2rem}
.collection-preview-card strong{color:#eaf0f6;font-size:.86rem}
.collection-preview-card small{color:#91a5b9;font-size:.7rem}
.dashboard-empty{padding:20px;border:1px dashed #35495d;border-radius:10px;color:#91a5b9;font-size:.84rem;line-height:1.6}
.recent-resources{display:grid;gap:0;border:1px solid #2c3e50;border-radius:11px;overflow:hidden}
.recent-resource-row{display:flex;align-items:center;gap:14px;padding:13px 15px;border-bottom:1px solid #28394a}
.recent-resource-row:last-child{border-bottom:0}
.recent-resource-row a{color:#e8eef4;font-size:.86rem;font-weight:700}
.dashboard-page-intro{margin-bottom:22px}
.dashboard-page-intro h3{margin:4px 0}
.collection-create-form{display:grid;grid-template-columns:minmax(180px,1fr) minmax(220px,1.5fr) auto;align-items:center;gap:12px;padding:16px;border:1px solid #34485b;border-radius:13px;background:#151f2b}
.collection-form-copy strong,.collection-form-copy span{display:block}
.collection-form-copy strong{font-size:.85rem;color:#f0f4f8}
.collection-form-copy span{font-size:.7rem;color:#8296aa;margin-top:4px}
.collection-create-form input,.collection-select{min-width:0;width:100%;height:42px;padding:9px 11px;border:1px solid #35495e;border-radius:8px;background:#0c141d;color:#e9f0f6;font:inherit;font-size:.8rem}
.dashboard-primary,.collection-add-button{height:42px;padding:0 15px;border:0;border-radius:8px;background:linear-gradient(110deg,#ff9a4a,#ff7b22);color:#1b120b;font-size:.8rem;font-weight:850}
.dashboard-primary:disabled,.collection-add-button:disabled{opacity:.55;cursor:wait}
.collection-feedback{min-height:18px;color:#9fb4c8;font-size:.76rem;margin:10px 2px}
.collection-feedback[data-state="success"]{color:#9fe0b8}
.collection-feedback[data-state="error"]{color:#ffb0b7}
.collection-grid{display:grid;gap:10px}
.collection-card{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:13px;padding:15px;border:1px solid #2c4053;border-radius:11px;background:#141f2a}
.collection-card-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;background:#ff8a3215;color:#ffad68;font-size:1.25rem}
.collection-card-copy{min-width:0}
.collection-card-copy strong{color:#eef3f8;font-size:.9rem}
.collection-card-copy p{color:#879caf;font-size:.76rem;margin:4px 0 0}
.collection-card-actions{display:flex;align-items:center;gap:7px}
.collection-open,.collection-icon-action{padding:7px 9px;border:1px solid #3a5065;border-radius:7px;background:#1a2937;color:#c3d0dc;font-size:.72rem;font-weight:700}
.collection-open:hover,.collection-icon-action:hover{border-color:#ff9a4a;color:#ffd0a5}
.collection-icon-action.danger:hover{border-color:#9d5158;color:#ffb7bd}
.collection-detail{margin-top:24px;padding-top:20px;border-top:1px solid #2c3e50}
.collection-detail-heading h3{color:#f1f5f9;font-size:1.15rem;margin:12px 0 4px}
.collection-detail-heading p{color:#91a5b9;font-size:.8rem}
.collection-detail-list{display:grid;gap:8px;margin-top:15px}
.collection-resource-row{display:grid;grid-template-columns:70px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px;border:1px solid #2d4053;border-radius:9px;background:#141f2a}
.collection-resource-row>span{color:#ffb47b;font-size:.68rem;text-transform:uppercase}
.collection-resource-row a{color:#eaf0f6;font-size:.84rem;font-weight:700}
.saved-resource-toolbar{padding:12px 0;color:#91a5b9;font-size:.78rem}
.library-list{display:grid;gap:9px}
.library-item{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border:1px solid #2d4053;border-radius:10px;background:#141f2a}
.library-item-main{display:grid;gap:5px;min-width:0}
.library-item-main>a{color:#eaf0f6;font-size:.87rem;font-weight:750;overflow-wrap:anywhere}
.library-item-meta{font-size:.65rem;letter-spacing:.08em;text-transform:uppercase;color:#ffb47b}
.saved-resource-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.saved-resource-actions .collection-select{width:auto;max-width:170px;height:34px;font-size:.72rem}
.collection-add-button{height:34px;padding:0 11px;font-size:.72rem}
.library-remove{padding:7px 10px;border:1px solid #405367;border-radius:7px;background:#1b2936;color:#b9c7d5;font-size:.72rem;font-weight:700}
.library-remove:hover{border-color:#a24e55;color:#ffb7bd}
.account-settings-card{max-width:620px;padding:20px;border:1px solid #304457;border-radius:13px;background:#141f2a}
.account-settings-card>label{font-size:.78rem;font-weight:750;color:#9eafc1}
.account-settings-card .signed-in-email{margin-top:8px}
.account-settings-card .profile-form{border-top:1px solid #2c3e50}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.account-body.is-signed-in .auth-card{background:#101923}
.account-body.is-signed-in .account-main{align-items:stretch}
.account-body.is-signed-in .auth-card-heading{display:none}
.account-body.is-signed-in .auth-panel{margin:0}
.account-body.is-signed-in .auth-panel[hidden],.dashboard-view[hidden],.collection-detail[hidden]{display:none!important}
.account-body.is-signed-in button:focus-visible,.account-body.is-signed-in a:focus-visible,.account-body.is-signed-in input:focus-visible,.account-body.is-signed-in select:focus-visible{outline:2px solid #ffad68;outline-offset:3px}
@media(max-width:900px){.account-dashboard{grid-template-columns:205px minmax(0,1fr)}.library-sidebar{padding:20px 12px}.dashboard-main{padding:24px 20px}.collection-create-form{grid-template-columns:1fr 1fr}.collection-form-copy{grid-column:1/-1}}
@media(max-width:680px){.account-body.is-signed-in .account-main{width:calc(100% - 24px);margin:14px auto 28px}.account-dashboard{grid-template-columns:1fr}.library-sidebar{padding:13px;border-right:0;border-bottom:1px solid #293a4b}.sidebar-heading{padding-bottom:12px}.sidebar-heading small{display:none}.library-nav{display:flex;overflow-x:auto;gap:6px;margin-top:12px;padding-bottom:2px}.library-nav-item{flex:0 0 auto;width:auto;padding:9px 11px;font-size:.76rem}.nav-count{display:none}.sidebar-user{display:none}.sidebar-logout{position:absolute;top:20px;right:19px;padding:7px 9px;font-size:.72rem}.dashboard-main{padding:20px 14px 28px}.dashboard-topbar{padding-bottom:15px}.dashboard-topbar h2{font-size:1.3rem}.dashboard-welcome{padding:18px}.welcome-orbit{width:48px;height:48px;flex:0 0 48px}.dashboard-stats{gap:7px;margin:12px 0 24px}.dashboard-stat{padding:12px 10px}.dashboard-stat span,.dashboard-stat small{font-size:.64rem}.dashboard-stat strong{font-size:1.45rem}.collection-create-form{grid-template-columns:1fr}.collection-form-copy{grid-column:auto}.collection-card{grid-template-columns:36px minmax(0,1fr)}.collection-card-icon{width:35px;height:35px}.collection-card-actions{grid-column:2;justify-content:flex-start}.library-item{align-items:flex-start;flex-direction:column}.saved-resource-actions{width:100%;justify-content:flex-start}.saved-resource-actions .collection-select{max-width:none;flex:1}.collection-resource-row{grid-template-columns:1fr auto;gap:7px}.collection-resource-row>span{grid-column:1/-1}.dashboard-section-heading{align-items:center}}
@media(prefers-reduced-motion:reduce){.account-body.is-signed-in *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.account-body.is-signed-in .library-sidebar{position:relative}
