:root{--ink:#16251e;--muted:#66756d;--green:#1c5d46;--green-dark:#104633;--sage:#e6eee9;--cream:#f7f5ef;--paper:#fffefa;--line:#dce5df;--orange:#d97951;--danger:#a64040;--shadow:0 12px 34px rgba(25,57,43,.08)}
*{box-sizing:border-box;margin:0;padding:0}html{scroll-behavior:smooth}body{font-family:Arial,Helvetica,sans-serif;background:var(--cream);color:var(--ink);min-height:100vh}a{color:inherit}button,input,textarea,select{font:inherit}button{cursor:pointer}.hidden{display:none!important}
.navbar{height:68px;padding:0 28px;background:var(--paper);border-bottom:1px solid var(--line);display:flex;align-items:center;position:sticky;top:0;z-index:20}.nav-logo{display:flex;align-items:center;gap:10px;text-decoration:none;font:700 25px Georgia,serif}.logo-mark{width:34px;height:34px;border-radius:11px 11px 11px 3px;background:var(--green);color:white;display:grid;place-items:center}.logo-dot{color:var(--orange)}.nav-links{display:flex;gap:30px;margin-left:60px;height:100%}.nav-links a{text-decoration:none;color:#6e7973;font-size:14px;font-weight:700;display:flex;align-items:center;position:relative}.nav-links a.active{color:var(--ink)}.nav-links a.active:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--green)}.nav-actions{margin-left:auto;display:flex;gap:10px}.nav-button,.avatar{border:1px solid var(--line);background:white;border-radius:50%;width:38px;height:38px}.avatar{background:#d99b7b;color:white;font-size:12px;font-weight:800}
.page{max-width:1440px;margin:auto;padding:34px 30px 70px}.page-head{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:28px}.eyebrow{display:block;font-size:12px;letter-spacing:.14em;font-weight:800;color:#77877e;margin-bottom:7px}.page-head h1,.detail-title{font:700 clamp(32px,4vw,48px)/1.05 Georgia,serif}.page-subtitle{margin-top:10px;color:var(--muted);line-height:1.6}.primary-button,.secondary-button,.danger-button{border:0;border-radius:9px;padding:11px 17px;font-weight:800;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:7px}.primary-button{background:var(--green);color:white}.primary-button:hover{background:var(--green-dark)}.secondary-button{background:white;color:var(--green);border:1px solid var(--line)}.danger-button{background:#fae6e2;color:var(--danger)}
.dashboard{display:grid;grid-template-columns:310px minmax(420px,1fr) 350px;min-height:calc(100vh - 68px)}.case-sidebar{padding:26px 18px;border-right:1px solid var(--line);background:#f0f2ed;height:calc(100vh - 68px);position:sticky;top:68px;overflow:auto}.sidebar-title{display:flex;align-items:end;justify-content:space-between;margin-bottom:18px}.sidebar-title h1{font:700 30px Georgia,serif}.round-add{width:38px;height:38px;border:0;border-radius:50%;background:var(--green);color:#fff;font-size:25px;text-decoration:none;display:grid;place-items:center}.search-box{background:white;border:1px solid var(--line);border-radius:9px;padding:0 12px;height:42px;display:flex;align-items:center;gap:8px}.search-box input{border:0;outline:0;width:100%;background:transparent}.case-list{margin-top:14px;display:grid;gap:6px}.case-item{border:1px solid transparent;border-radius:10px;padding:15px 13px;text-align:left;background:transparent;width:100%}.case-item:hover,.case-item.active{background:white;border-color:var(--line);box-shadow:0 5px 18px rgba(33,58,47,.05)}.case-item strong{font:700 17px Georgia,serif;display:block}.case-item small{display:block;color:var(--muted);margin:5px 0 10px}.tag{display:inline-block;border-radius:20px;background:var(--sage);color:#466756;font-size:12px;padding:4px 8px;margin:2px}.empty-state{padding:22px 10px;color:var(--muted);line-height:1.6}.privacy-box{border-top:1px solid var(--line);margin-top:22px;padding:16px 8px;color:var(--muted);font-size:13px;line-height:1.5}.privacy-box strong{display:block;color:var(--ink);margin-bottom:3px}
.casebook-dashboard{grid-template-columns:310px minmax(420px,1fr)}
.case-detail{padding:40px clamp(25px,4vw,64px);height:calc(100vh - 68px);overflow:auto}.breadcrumb{font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:#698477;font-weight:800;margin-bottom:13px}.detail-meta{display:flex;gap:12px;align-items:center;margin:13px 0 27px;color:var(--muted);font-size:13px}.status{background:var(--sage);color:var(--green);padding:6px 10px;border-radius:20px;font-weight:800}.card{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:22px;box-shadow:var(--shadow)}.card+.card{margin-top:14px}.card-label{font-size:12px;letter-spacing:.12em;font-weight:800;color:#6a7a71;margin-bottom:12px}.card p,.card li{font-size:16px;line-height:1.65;color:#425149}.card ul{padding-left:20px}.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}.two-columns .card{margin-top:0}.detail-actions{display:flex;gap:9px;margin-top:20px;flex-wrap:wrap}.sources{display:flex;gap:9px;align-items:center;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:20px;margin-top:30px;color:var(--muted);font-size:13px}.sources a{background:var(--sage);color:var(--green);padding:6px 9px;border-radius:20px;text-decoration:none}
.assistant-panel{border-left:1px solid #cad8d0;background:#edf2ee;padding:24px 20px;height:calc(100vh - 68px);position:sticky;top:68px;display:flex;flex-direction:column}.assistant-title{display:flex;gap:10px;align-items:center}.assistant-orb{width:38px;height:38px;border-radius:12px 12px 12px 3px;background:var(--green);color:white;display:grid;place-items:center}.assistant-title h2{font:700 21px Georgia,serif}.assistant-context{margin:18px 0 8px;background:#dce9e1;border-radius:9px;padding:11px;color:var(--green);font-size:13px}.chat{flex:1;overflow:auto;min-height:150px}.message{display:flex;gap:8px;margin:12px 0}.message span{width:27px;height:27px;flex:0 0 27px;border-radius:8px;background:#d9e8df;display:grid;place-items:center;color:var(--green);font-size:12px}.message p{background:white;border:1px solid var(--line);border-radius:4px 10px 10px;padding:11px 12px;font-size:14px;line-height:1.55;white-space:pre-line}.message.student{flex-direction:row-reverse}.message.student p{background:#dce9e1;border-radius:10px 4px 10px 10px}.quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:10px 0}.quick-actions button{border:1px solid var(--line);background:white;border-radius:8px;padding:9px;font-size:13px;color:var(--green);font-weight:700}.assistant-form{background:white;border:1px solid #c5d6cc;border-radius:10px;padding:9px}.assistant-form textarea{border:0;outline:0;resize:none;width:100%;font-size:14px}.assistant-form div{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:11px}.assistant-form button{width:32px;height:32px;border:0;border-radius:8px;background:var(--green);color:white}.assistant-note{text-align:center;color:var(--muted);font-size:11px;margin-top:8px}
.form-card{max-width:760px;margin:auto;background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:30px;box-shadow:var(--shadow)}.safety-banner{background:#fae9de;color:#7d5139;padding:13px;border-radius:9px;margin-bottom:22px;line-height:1.5}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.form-field{display:block;font-size:14px;font-weight:800}.form-field.full{grid-column:1/-1}.form-field input,.form-field textarea,.form-field select{display:block;width:100%;margin-top:7px;border:1px solid #cfdad3;background:white;border-radius:9px;padding:12px;outline-color:var(--green)}.form-field textarea{resize:vertical}.form-help{display:block;color:var(--muted);font-size:12px;font-weight:400;margin-top:5px}.form-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;margin-top:5px}.notice{max-width:760px;margin:15px auto 0;padding:13px;border-radius:9px;background:#e3eee7;color:var(--green);display:none}.notice.error{background:#fae4e1;color:var(--danger)}
.library-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.topic-card{background:var(--paper);border:1px solid var(--line);border-radius:13px;padding:23px;box-shadow:var(--shadow)}.topic-icon{width:42px;height:42px;border-radius:12px;background:var(--sage);display:grid;place-items:center;color:var(--green);font-size:21px;margin-bottom:18px}.topic-card h2{font:700 22px Georgia,serif;margin-bottom:9px}.topic-card p{color:var(--muted);line-height:1.6;margin-bottom:16px}.topic-card ul{padding-left:18px;line-height:1.7}.topic-card a{display:inline-block;margin-top:17px;color:var(--green);font-weight:800}
.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-bottom:25px}.stat{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:22px}.stat strong{display:block;font:700 38px Georgia,serif;color:var(--green)}.stat span{color:var(--muted)}.progress-layout{display:grid;grid-template-columns:1.5fr 1fr;gap:18px}.progress-row{margin:18px 0}.progress-row div{display:flex;justify-content:space-between;margin-bottom:7px}.progress-bar{display:block;height:10px;border-radius:10px;background:#e5ebe7;overflow:hidden}.progress-bar i{display:block;height:100%;background:var(--green);border-radius:10px}.review-list{list-style:none}.review-list li{padding:13px 0;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:10px}
.home-page{max-width:1440px;margin:auto}.home-hero{min-height:610px;padding:70px clamp(28px,7vw,100px);display:grid;grid-template-columns:1.05fr .95fr;align-items:center;gap:70px;background:linear-gradient(135deg,#f7f5ef 55%,#e2ebe5 55%)}.hero-copy h1{font:700 clamp(48px,6vw,78px)/1 Georgia,serif;letter-spacing:-2px;margin:10px 0 24px}.hero-copy h1 em{color:var(--green);font-weight:400}.hero-copy>p{font-size:18px;line-height:1.7;color:var(--muted);max-width:630px}.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin:28px 0}.privacy-line{color:var(--muted);font-size:13px}.privacy-line span{color:var(--green);font-weight:800}.hero-notebook{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:28px;box-shadow:0 28px 80px rgba(24,75,54,.16);transform:rotate(1deg)}.notebook-top{display:flex;justify-content:space-between;padding-bottom:18px;border-bottom:1px solid var(--line);color:var(--muted)}.notebook-top b{color:var(--green)}.hero-notebook article{display:flex;gap:17px;align-items:center;padding:23px 0;border-bottom:1px solid var(--line)}.hero-notebook article:last-child{border-bottom:0}.topic-symbol{width:42px;height:42px;display:grid;place-items:center;border-radius:11px;background:var(--sage);color:var(--green);font:700 15px Georgia,serif}.hero-notebook strong{font:700 18px Georgia,serif}.hero-notebook p{color:var(--muted);font-size:13px;margin-top:5px}.home-tools{padding:70px clamp(28px,7vw,100px)}.home-tools h2{font:700 36px Georgia,serif}.home-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:28px}.home-card{display:grid;grid-template-columns:auto 1fr auto;align-items:start;gap:16px;background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:24px;text-decoration:none;box-shadow:var(--shadow)}.home-card>span{width:42px;height:42px;display:grid;place-items:center;border-radius:11px;background:var(--sage);color:var(--green);font-size:20px}.home-card h3{font:700 20px Georgia,serif}.home-card p{color:var(--muted);line-height:1.55;margin-top:7px}.home-card>b{color:var(--orange);font-size:20px}.home-card:hover{transform:translateY(-3px);border-color:#a8c0b3}
.case-image-wrap{margin-bottom:14px;border-radius:13px;border:1px solid var(--line);background:white;padding:12px}.case-image-gallery,.image-preview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.case-image-gallery img{display:block;width:100%;height:240px;object-fit:contain;border-radius:9px;background:#eef2ef}.snippet-card p{white-space:pre-wrap}.image-preview-grid{margin-top:13px}.image-preview-item{position:relative;min-width:0}.image-preview-item img{display:block;width:100%;height:180px;object-fit:contain;border:1px solid var(--line);border-radius:10px;background:#eef2ef}.image-preview-item button{position:absolute;top:7px;right:7px;width:30px;height:30px;border:0;border-radius:50%;background:#7c1738;color:#fff;font-weight:800;cursor:pointer;box-shadow:0 2px 8px #0004}.image-preview-item button:focus-visible{outline:3px solid #fff;outline-offset:2px}.image-preview-item small{display:block;margin-top:5px;color:#687873;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-fab{position:fixed;right:26px;bottom:24px;z-index:40;width:58px;height:58px;border:0;border-radius:18px 18px 18px 5px;background:var(--green);color:white;font-size:24px;box-shadow:0 14px 34px rgba(15,70,48,.3)}.chat-fab:hover{background:var(--green-dark);transform:translateY(-2px)}.floating-chat{position:fixed;right:26px;bottom:95px;z-index:39;width:min(380px,calc(100vw - 28px));height:min(650px,calc(100vh - 120px));display:none;flex-direction:column;background:#edf2ee;border:1px solid #cbd9d1;border-radius:16px;box-shadow:0 24px 70px rgba(22,50,38,.24);overflow:hidden}.floating-chat.open{display:flex}.floating-chat header{display:flex;align-items:center;justify-content:space-between;background:var(--paper);padding:16px;border-bottom:1px solid var(--line)}.floating-chat header>div{display:flex;gap:10px;align-items:center}.floating-chat header small,.floating-chat header strong{display:block}.floating-chat header small{font-size:10px;letter-spacing:.12em;color:var(--muted);font-weight:800}.floating-chat header strong{font:700 18px Georgia,serif}.floating-chat header>button{border:0;background:transparent;font-size:25px}.floating-context{padding:10px 15px;background:#dce9e1;color:var(--green);font-size:12px}.floating-chat .chat{padding:7px 14px}.floating-chat .quick-actions{padding:0 14px}.floating-chat .assistant-form{margin:0 14px 14px}
@media(max-width:1100px){.dashboard{grid-template-columns:280px 1fr}.case-detail{padding-right:75px}.library-grid{grid-template-columns:1fr 1fr}.home-hero{gap:35px}}
@media(max-width:760px){.navbar{height:auto;min-height:62px;padding:11px 15px;flex-wrap:wrap}.nav-links{order:3;width:100%;margin:9px 0 0;gap:20px;height:36px;overflow:auto}.nav-links a{white-space:nowrap}.dashboard{display:block}.case-sidebar{position:relative;top:0;height:auto;border-right:0}.case-list{grid-auto-flow:column;grid-auto-columns:82%;overflow:auto}.privacy-box{display:none}.case-detail{height:auto;padding:28px 17px 100px}.two-columns,.library-grid,.stats-grid,.progress-layout,.form-grid,.home-grid{grid-template-columns:1fr}.form-field,.form-field.full{grid-column:1}.page{padding:25px 16px 60px}.page-head{align-items:flex-start;flex-direction:column}.form-card{padding:20px}.home-hero{grid-template-columns:1fr;padding:55px 20px;background:linear-gradient(180deg,#f7f5ef 62%,#e2ebe5 62%)}.hero-copy h1{font-size:48px}.hero-notebook{transform:none}.home-tools{padding:50px 20px}.floating-chat{right:14px;bottom:88px}.chat-fab{right:15px;bottom:17px}}

/* LOGIN */
.login-page{background:#e9eef0;display:grid;place-items:center;padding:28px}.login-shell{width:min(1050px,100%);min-height:650px;display:grid;grid-template-columns:1.08fr .92fr;background:white;border-radius:22px;overflow:hidden;box-shadow:0 35px 90px rgba(24,42,35,.16)}.login-intro{background:linear-gradient(145deg,#173e32,#0e2520);color:white;padding:55px;display:flex;flex-direction:column;justify-content:space-between}.login-brand{display:flex;align-items:center;gap:10px;color:white;text-decoration:none;font:700 28px Georgia,serif}.login-intro h1{font:700 48px/1.05 Georgia,serif;max-width:500px;margin:12px 0 22px}.login-intro p{color:#c6d8d0;font-size:17px;line-height:1.7;max-width:500px}.login-intro ul{list-style:none;display:grid;gap:12px;color:#d8e5df}.login-intro li:before{content:"✓";color:#f3b685;margin-right:10px}.login-card{padding:65px 55px;display:flex;flex-direction:column;justify-content:center}.login-card h2{font:700 38px Georgia,serif;margin:7px 0}.login-card>div>p{color:var(--muted);line-height:1.5}.login-card form{display:grid;gap:18px;margin-top:32px}.login-card label{font-size:14px;font-weight:800}.login-card input{display:block;width:100%;margin-top:7px;border:1px solid #cbd6d0;border-radius:9px;padding:13px;outline-color:var(--green)}.login-card .primary-button{width:100%;padding:14px}.login-card .primary-button:disabled{opacity:.65;cursor:wait}.login-message{color:var(--danger);font-size:13px;min-height:18px;line-height:1.45}.login-message.success{color:var(--green)}.login-mode-toggle{border:0;background:transparent;color:var(--green);font-weight:800;margin-top:17px;text-align:center}.login-mode-toggle:hover{text-decoration:underline}.local-profile-note{font-size:12px;line-height:1.5;color:var(--muted);border-top:1px solid var(--line);padding-top:18px;margin-top:22px}

/* PORTAL-STYLE MEDICAL STUDENT HOMEPAGE */
.portal-body{background:#eef1f4;min-height:100vh}.portal-sidebar{position:fixed;left:0;top:0;bottom:0;width:225px;background:linear-gradient(180deg,#35363d,#1f2024);color:#e7e8ea;padding:24px 0 20px;display:flex;flex-direction:column;z-index:30}.portal-brand{display:flex;align-items:center;gap:10px;padding:0 22px 22px;text-decoration:none;color:white;font:700 24px Georgia,serif;border-bottom:1px solid #ffffff12}.portal-sidebar nav{padding:18px 10px;display:grid;gap:5px}.portal-sidebar nav a,.portal-sidebar nav button,.portal-logout{display:flex;align-items:center;gap:13px;width:100%;padding:12px 14px;border:0;border-radius:8px;background:transparent;color:#cfd1d5;text-decoration:none;text-align:left;font-size:14px}.portal-sidebar nav a span,.portal-sidebar nav button span,.portal-logout span{width:22px;text-align:center;color:white}.portal-sidebar nav a:hover,.portal-sidebar nav button:hover,.portal-sidebar nav a.active{background:#ffffff14;color:white}.portal-sidebar nav a.active{border-left:3px solid #68b589}.portal-logout{margin-top:auto;padding-left:25px}.sidebar-privacy{margin:14px 18px 0;padding:14px;border-top:1px solid #ffffff18;color:#aeb2b5;font-size:11px;line-height:1.5}.sidebar-privacy strong,.sidebar-privacy span{display:block}.sidebar-privacy strong{color:#e0b58a;margin-bottom:3px}.portal-main{margin-left:225px;padding:30px;max-width:1800px}.portal-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.portal-breadcrumb{font-size:12px;color:#82909b;margin-bottom:6px}.portal-top h1{font:700 24px Georgia,serif}.portal-top-actions{display:flex;align-items:center;gap:13px}.portal-notice{display:grid;grid-template-columns:auto 1fr auto;gap:15px;align-items:center;background:#fff;border:2px solid #3a84d8;border-radius:10px;padding:15px;margin-bottom:18px}.portal-notice>span{align-self:start;background:#3a84d8;color:white;border-radius:6px;padding:7px 10px;font-size:12px;font-weight:800}.portal-notice strong{font-size:14px}.portal-notice p{color:#788795;font-size:13px;margin-top:4px}.portal-notice a{color:#2467b1;font-weight:800;font-size:13px}.student-banner{min-height:112px;background:linear-gradient(110deg,#123e4d,#1e6577);color:white;border-radius:12px;padding:20px;display:flex;align-items:center;gap:17px;box-shadow:var(--shadow);overflow:hidden;position:relative}.student-banner:after{content:"";position:absolute;width:240px;height:240px;border-radius:50%;background:#ffffff0a;right:-60px}.student-avatar{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;background:#e7a477;border:3px solid #ffffff50;font-weight:800}.student-banner time{display:block;color:#bdd1d5;font-size:12px;font-style:italic}.student-banner h2{font:700 18px Georgia,serif;color:#ffe184;margin:5px 0}.student-banner span{font-size:12px;color:#d2e2e4}.student-banner-right{margin-left:auto;text-align:right;display:grid;gap:6px;z-index:1}.student-banner-right strong{color:#ffe184;font-size:13px}.student-banner-right span{font-style:italic}.student-banner-right i{justify-self:end;background:#297eea;padding:6px 9px;border-radius:5px;font-size:11px;font-style:normal;font-weight:800}.portal-widgets{display:grid;grid-template-columns:1.05fr 1.05fr 1fr;gap:16px;margin-top:18px}.portal-widget{background:white;border:1px solid #d3dfe0;border-radius:11px;box-shadow:0 3px 9px #1b31300d;overflow:hidden}.portal-widget>header{min-height:58px;background:#d8e7e5;padding:12px 15px;display:flex;align-items:center;gap:10px}.portal-widget>header>span{color:#1b5655}.portal-widget header h2{font-size:14px}.portal-widget header p{font-size:12px;color:#788795;margin-top:3px}.portal-widget header>a{margin-left:auto;color:#225e61;font-size:12px;font-weight:800}.quick-link-pills{padding:15px;display:flex;gap:7px;flex-wrap:wrap}.quick-link-pills a,.quick-link-pills button{border:1px solid #b9d1cf;background:#e3eeed;color:#214c4c;text-decoration:none;border-radius:18px;padding:7px 10px;font-size:12px;font-weight:800}.metric-row{display:grid;grid-template-columns:repeat(3,1fr);padding:16px}.metric-row div{text-align:center;border-right:1px solid var(--line)}.metric-row div:last-child{border-right:0}.metric-row strong,.metric-row span{display:block}.metric-row strong{font:700 30px Georgia,serif;color:#174c4e}.metric-row span{font-size:11px;text-transform:uppercase;color:#85929a;margin-top:5px}.prompt-widget blockquote{padding:18px 17px 8px;font:italic 17px/1.45 Georgia,serif;color:#2b4b47}.prompt-widget>button{border:0;background:transparent;color:#17695d;font-weight:800;font-size:12px;padding:0 17px 17px}.portal-lists{display:grid;grid-template-columns:1.4fr 1fr;gap:16px;margin-top:18px}.recent-cases{display:grid;grid-template-columns:1fr 1fr}.recent-cases>a{padding:15px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;justify-content:space-between;text-decoration:none}.recent-cases strong,.recent-cases small{display:block}.recent-cases small{color:var(--muted);margin-top:5px}.recent-cases b{color:#4b7772}.dashboard-review-list{list-style:none;padding:4px 15px}.dashboard-review-list li{display:flex;justify-content:space-between;padding:13px 0;border-bottom:1px solid var(--line);font-size:13px}.dashboard-review-list b{color:var(--green);font-size:11px}.dashboard-empty{padding:20px;color:var(--muted);font-size:13px}.dashboard-empty a{color:var(--green);font-weight:800}.portal-directory{margin-top:18px;background:white;border:1px solid #d3dfe0;border-radius:11px;overflow:hidden}.portal-directory>header{background:#174e5d;color:white;padding:11px 17px}.portal-directory header span{font-size:10px;color:#f3d26f;font-weight:800}.portal-directory header h2{font-size:14px;margin-top:3px}.portal-directory>div{display:grid;grid-template-columns:1fr 1fr}.portal-directory a{display:grid;grid-template-columns:auto 1fr auto;gap:13px;align-items:center;text-decoration:none;padding:14px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.portal-directory i{width:38px;height:38px;border-radius:7px;background:#3a87dc;color:white;display:grid;place-items:center;font-style:normal}.portal-directory a:nth-child(2) i{background:#55b76a}.portal-directory a:nth-child(3) i{background:#f39a35}.portal-directory a:nth-child(4) i{background:#e55266}.portal-directory strong,.portal-directory small{display:block}.portal-directory strong{font-size:13px}.portal-directory small{color:#86929a;margin-top:3px}.portal-directory b{color:#87949b;font-size:20px}
@media(max-width:1050px){.portal-widgets{grid-template-columns:1fr 1fr}.prompt-widget{grid-column:1/-1}.portal-lists{grid-template-columns:1fr}.student-banner-right{display:none}}
@media(max-width:760px){.login-page{padding:0}.login-shell{grid-template-columns:1fr;border-radius:0;min-height:100vh}.login-intro{display:none}.login-card{padding:38px 22px}.portal-sidebar{position:relative;width:100%;height:auto;padding:13px}.portal-brand{border:0;padding:0 4px 12px}.portal-sidebar nav{display:flex;overflow:auto;padding:0;gap:4px}.portal-sidebar nav a,.portal-sidebar nav button{width:auto;white-space:nowrap;padding:9px}.portal-logout{position:absolute;right:10px;top:10px;width:auto}.sidebar-privacy{display:none}.portal-main{margin-left:0;padding:15px}.portal-top{align-items:flex-end}.portal-notice{grid-template-columns:auto 1fr}.portal-notice>a{display:none}.student-banner{align-items:flex-start}.portal-widgets,.portal-lists,.portal-directory>div,.recent-cases{grid-template-columns:1fr}.prompt-widget{grid-column:auto}.portal-directory a{border-right:0}}

/* SHARED PORTAL PAGES */
.portal-page-main{min-height:100vh}.compact-notice{grid-template-columns:auto 1fr;margin-bottom:18px}.portal-casebook{display:grid;grid-template-columns:310px minmax(0,1fr);background:white;border:1px solid #d3dfe0;border-radius:11px;min-height:calc(100vh - 205px);overflow:hidden;box-shadow:0 3px 9px #1b31300d}.portal-case-list{background:#f5f7f7;border-right:1px solid #d3dfe0;padding:0 15px 20px}.portal-case-list>header{margin:0 -15px 15px;padding:14px 15px;background:#d8e7e5;display:flex;align-items:center;justify-content:space-between}.portal-case-list header h2{font-size:14px}.portal-case-list header p{font-size:12px;color:#71818a;margin-top:3px}.portal-case-list header a{width:30px;height:30px;display:grid;place-items:center;border-radius:7px;background:#1c5d46;color:white;text-decoration:none;font-size:20px}.portal-case-list .case-item{border-color:#d8e2df}.portal-case-detail{padding:27px;min-width:0}.case-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.case-heading .detail-actions{margin-top:0;justify-content:flex-end}.portal-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.portal-detail-grid .card{margin-top:0;box-shadow:none;border-color:#d8e2df}.portal-detail-grid .full-card{grid-column:1/-1}.portal-case-detail .case-image-wrap{margin-top:18px}.portal-case-detail .sources{margin-bottom:5px}
.portal-form-shell{max-width:980px;margin:0 auto;background:white;border:1px solid #d3dfe0;border-radius:11px;overflow:hidden;box-shadow:0 3px 9px #1b31300d}.portal-form-shell>header{background:#d8e7e5;padding:15px 20px;display:flex;align-items:center;gap:12px}.portal-form-shell>header>span{width:35px;height:35px;display:grid;place-items:center;background:#1c5d46;color:white;border-radius:7px}.portal-form-shell header h2{font-size:15px}.portal-form-shell header p{font-size:12px;color:#71818a;margin-top:3px}.portal-form{padding:24px}.portal-form .form-field input,.portal-form .form-field textarea,.portal-form .form-field select{border-color:#cad8d5;border-radius:7px}.portal-form .image-field{border:1px dashed #a9c0ba;border-radius:8px;padding:16px;background:#f7faf9}.portal-page-main>.notice{max-width:980px}
.library-overview{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:18px}.library-overview>div{display:flex;align-items:center;gap:14px;background:white;border:1px solid #d3dfe0;border-radius:10px;padding:17px}.library-overview strong{font:700 28px Georgia,serif;color:#174e5d}.library-overview span{font-size:12px;color:#73818a;text-transform:uppercase;font-weight:800}.portal-library-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.portal-topic-card{background:white;border:1px solid #d3dfe0;border-radius:11px;overflow:hidden;box-shadow:0 3px 9px #1b31300d}.portal-topic-card>header{display:flex;align-items:center;gap:12px;padding:17px;background:#d8e7e5}.portal-topic-card header>span{width:42px;height:42px;border-radius:8px;display:grid;place-items:center;color:white;font-size:19px}.blue-icon{background:#3a87dc}.green-icon{background:#50aa67}.orange-icon{background:#ed9132}.portal-topic-card small{font-size:10px;color:#6b7d82;font-weight:800;letter-spacing:.08em}.portal-topic-card h2{font:700 21px Georgia,serif;margin-top:3px}.portal-topic-card>p{padding:18px 18px 8px;color:#58676e;line-height:1.6;font-size:14px}.portal-topic-card ul{padding:5px 35px 12px;color:#40545a;line-height:1.8;font-size:14px}.portal-topic-card>div{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding:13px 17px}.portal-topic-card button{border:0;background:transparent;color:#17695d;font-weight:800;font-size:12px}.portal-topic-card a{color:#2467a5;font-weight:800;font-size:12px}.library-tip{margin-top:18px;background:#174e5d;color:white;border-radius:11px;padding:18px;display:grid;grid-template-columns:auto 1fr auto;gap:15px;align-items:center}.library-tip>span{width:38px;height:38px;border-radius:8px;background:#ffffff18;display:grid;place-items:center;color:#ffe184;font-weight:800}.library-tip strong{color:#ffe184}.library-tip p{font-size:13px;color:#c9dcdf;margin-top:4px}.library-tip button{border:1px solid #ffffff55;background:white;color:#174e5d;border-radius:7px;padding:9px 13px;font-weight:800}
.portal-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:18px}.portal-stats article{background:white;border:1px solid #d3dfe0;border-radius:10px;padding:18px;display:flex;align-items:center;gap:15px}.portal-stats article>span{width:42px;height:42px;border-radius:8px;background:#3a87dc;color:white;display:grid;place-items:center}.portal-stats article:nth-child(2)>span{background:#50aa67}.portal-stats article:nth-child(3)>span{background:#ed9132}.portal-stats strong,.portal-stats small{display:block}.portal-stats strong{font:700 29px Georgia,serif;color:#174e5d}.portal-stats small{color:#73818a;text-transform:uppercase;font-weight:800;font-size:11px;margin-top:3px}.portal-progress-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:16px}.posting-progress{padding:5px 20px 14px}.posting-progress .progress-row{margin:17px 0}.posting-progress .progress-row div{font-size:13px}.posting-progress .progress-bar{height:8px}.review-widget .dashboard-review-list{padding:7px 18px}.progress-actions{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:18px}.progress-actions>a,.progress-actions>button{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:13px;text-align:left;background:white;border:1px solid #d3dfe0;border-radius:10px;padding:16px;text-decoration:none}.progress-actions>*>span{width:38px;height:38px;border-radius:7px;background:#174e5d;color:white;display:grid;place-items:center}.progress-actions strong,.progress-actions small{display:block}.progress-actions small{color:#7c8991;margin-top:4px}.progress-actions b{color:#547476;font-size:20px}
@media(max-width:1100px){.portal-library-grid{grid-template-columns:1fr 1fr}.portal-casebook{grid-template-columns:280px minmax(0,1fr)}.case-heading{display:block}.case-heading .detail-actions{justify-content:flex-start;margin:14px 0}.portal-progress-grid{grid-template-columns:1fr}}
@media(max-width:760px){.compact-notice{grid-template-columns:auto 1fr}.portal-casebook{display:block}.portal-case-list{border-right:0;border-bottom:1px solid #d3dfe0}.portal-case-list .case-list{display:grid;grid-auto-flow:column;grid-auto-columns:82%;overflow:auto}.portal-case-detail{padding:18px}.portal-detail-grid,.portal-library-grid,.library-overview,.portal-stats,.progress-actions{grid-template-columns:1fr}.portal-detail-grid .full-card{grid-column:auto}.library-tip{grid-template-columns:auto 1fr}.library-tip button{grid-column:1/-1}.portal-form{padding:17px}}
@media(max-width:760px){.case-image-gallery,.image-preview-grid{grid-template-columns:1fr}.case-image-gallery img{height:220px}}

/* Structured clerking form and editable case record */
.clerking-form-shell{max-width:1120px}.clerking-form{display:block;padding:0}.form-section{border:0;border-bottom:1px solid #dbe4e2;margin:0;padding:25px 26px 28px}.form-section:last-of-type{border-bottom:0}.form-section legend{width:100%;display:flex;align-items:center;gap:12px;padding:0;margin:0 0 20px;color:#193d36;font-weight:800}.form-section legend>span:first-child{flex:0 0 34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#1c5d46;color:#fff;font-size:14px}.form-section legend .legend-copy{display:flex;flex-direction:column;font-size:17px}.form-section legend small{font-size:13px;font-weight:500;color:#70817c;margin-top:3px}.section-fields{display:grid;grid-template-columns:1fr;gap:17px}.section-fields.two-fields{grid-template-columns:1fr 1fr}.section-fields.three-fields{grid-template-columns:repeat(3,1fr);margin-top:17px}.section-fields .full-field{grid-column:1/-1}.clerking-guide,.system-review-guide{background:#edf5f2;border:1px solid #d4e5df;border-radius:8px;padding:13px 15px;color:#4d625d;font-size:13px}.clerking-guide{display:flex;flex-wrap:wrap;gap:8px}.clerking-guide strong{width:100%;color:#193d36}.clerking-guide span{background:#fff;border:1px solid #d8e5e1;border-radius:999px;padding:5px 9px}.system-review-guide{display:grid;grid-template-columns:repeat(2,1fr);gap:9px 18px;margin-bottom:18px}.system-review-guide span{line-height:1.45}.system-review-guide b{color:#1c5d46;margin-right:4px}.sticky-form-actions{position:sticky;bottom:0;z-index:2;padding:15px 26px;background:#f8faf9ef;border-top:1px solid #d7e2df;backdrop-filter:blur(8px)}
.case-demographics{display:flex;flex-wrap:wrap;gap:9px;margin:18px 0}.case-demographics span{background:#e8f1ee;border:1px solid #d2e2dd;color:#5d706b;border-radius:999px;padding:7px 11px;font-size:13px}.case-demographics b{color:#173f36}.clerking-detail-grid .card p{white-space:pre-wrap;line-height:1.65}.clerking-detail-grid .card{min-height:120px}
@media(max-width:760px){.form-section{padding:21px 17px}.section-fields.two-fields,.section-fields.three-fields,.system-review-guide{grid-template-columns:1fr}.section-fields .full-field{grid-column:auto}.sticky-form-actions{padding:13px 17px}.case-demographics{margin-top:14px}}

/* Refined clerking layout and profile management */
.avatar{display:grid;place-items:center;overflow:hidden;background-size:cover;background-position:center}.profile-avatar-link{text-decoration:none;flex:0 0 38px}
.clerking-form-shell{max-width:1180px}.form-section{padding:28px 32px 30px}.form-section-heading{display:flex;align-items:center;gap:13px;margin-bottom:24px;color:#193d36}.form-section-heading>span:first-child{flex:0 0 38px;height:38px;display:grid;place-items:center;border-radius:50%;background:#1c5d46;color:#fff;font-size:15px;font-weight:800}.form-section-heading>span:last-child{display:flex;flex-direction:column}.form-section-heading strong{font-size:18px}.form-section-heading small{font-size:13px;font-weight:500;color:#70817c;margin-top:4px}.section-fields{gap:19px}.demographics-fields{margin-top:19px}.portal-form .form-field input,.portal-form .form-field select{min-height:48px}.portal-form .form-field textarea{line-height:1.55}.clerking-guide,.system-review-guide{display:flex;flex-wrap:wrap;gap:9px;padding:14px 16px}.clerking-guide strong,.system-review-guide strong{width:100%;color:#193d36}.clerking-guide button,.system-review-guide button{background:#fff;border:1px solid #d1e0dc;border-radius:999px;padding:7px 11px;color:#456159}.clerking-guide button:hover,.system-review-guide button:hover,.system-review-guide button.active{background:#1c5d46;border-color:#1c5d46;color:#fff}.system-picker{display:grid;grid-template-columns:1fr 1fr;gap:19px;margin-bottom:14px}.system-review-guide{grid-template-columns:none;margin-bottom:19px}.sticky-form-actions{padding-left:32px;padding-right:32px}.case-system-selection{display:flex;gap:8px;align-items:center;margin-bottom:8px}.case-system-selection b{color:var(--green)}.case-system-selection span:not(:empty){background:var(--sage);border-radius:999px;padding:4px 8px;font-size:12px}
.profile-shell{max-width:1050px;margin:0 auto;display:grid;grid-template-columns:300px minmax(0,1fr);background:#fff;border:1px solid #d3dfe0;border-radius:12px;overflow:hidden;box-shadow:0 3px 9px #1b31300d}.profile-photo-panel{background:linear-gradient(155deg,#174e43,#10362f);color:#fff;padding:38px 28px;text-align:center;display:flex;flex-direction:column;align-items:center}.profile-photo-preview{width:132px;height:132px;border-radius:50%;background:#d99b7b;border:5px solid #ffffff35;display:grid;place-items:center;overflow:hidden;font:700 34px Georgia,serif}.profile-photo-preview img{width:100%;height:100%;object-fit:cover}.profile-photo-panel h2{font:700 23px Georgia,serif;margin-top:20px}.profile-photo-panel>p{color:#bfd2ca;margin-top:6px}.profile-upload-button{margin-top:26px;border-color:#ffffff75;color:#fff;background:#ffffff12}.profile-photo-panel .form-help{color:#bfd2ca;line-height:1.5;max-width:220px}.profile-form{padding:36px}.profile-form>header{margin-bottom:28px}.profile-form>header h2{font:700 28px Georgia,serif}.profile-form>header>p:last-child{color:var(--muted);margin-top:7px;line-height:1.55}.profile-form .section-fields{gap:21px}.profile-form .form-field input,.profile-form .form-field select{display:block;width:100%;margin-top:7px;border:1px solid #cad8d5;border-radius:8px;padding:12px;min-height:48px;outline-color:var(--green)}.profile-form input:disabled{background:#f1f4f2;color:#77837e}.username-input{display:flex;align-items:center;margin-top:7px;border:1px solid #cad8d5;border-radius:8px;overflow:hidden}.username-input span{padding-left:13px;color:#718078}.username-input input{margin:0!important;border:0!important}.profile-form .form-actions{margin-top:27px}.profile-notice{max-width:none;width:100%;margin-top:14px}.profile-upload-button:has(input:focus-visible){outline:2px solid #fff;outline-offset:2px}
@media(max-width:760px){.form-section{padding:23px 18px 25px}.form-section-heading{align-items:flex-start;margin-bottom:20px}.section-fields.two-fields,.section-fields.three-fields,.system-picker{grid-template-columns:1fr}.sticky-form-actions{padding-left:18px;padding-right:18px}.profile-shell{grid-template-columns:1fr}.profile-photo-panel{padding:28px 20px}.profile-form{padding:25px 18px}}
.profile-photo-preview>span,.profile-photo-preview>img{grid-area:1/1}

/* Login recovery and remembered sessions */
.login-session-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.remember-control{display:flex!important;align-items:center;gap:8px;color:var(--muted);font-weight:600!important}.remember-control input{width:17px!important;height:17px;margin:0!important;accent-color:var(--green)}.login-session-row>button{border:0;background:transparent;color:var(--green);font-weight:800}.login-session-row>button:hover,.reset-login-link:hover{text-decoration:underline}.login-session-row>button:disabled{opacity:.6}.reset-login-link{display:block;text-align:center;text-decoration:none}.reset-shell{min-height:610px}

/* Case-synchronized clinical library */
.library-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) 240px auto;gap:12px;align-items:end;background:#fff;border:1px solid #efd1dc;border-radius:11px;padding:14px;margin-bottom:14px;box-shadow:0 6px 18px rgba(154,45,88,.06)}
.library-toolbar .search-box{margin:0;height:48px}.library-toolbar>label:not(.search-box){display:grid;gap:6px;color:#694854;font-size:12px;font-weight:800}.library-toolbar select{height:48px;border:1px solid #ecc5d3;border-radius:8px;background:#fff;padding:0 12px;color:#432e38}.library-toolbar .secondary-button{height:48px}
.library-compare-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(100deg,#fff0f5,#f9dce7);border:1px solid #e9bacc;border-radius:11px;padding:14px 16px;margin-bottom:18px}.library-compare-bar>div{display:flex;align-items:center;gap:12px}.library-compare-bar>div>span{width:38px;height:38px;border-radius:9px;background:#8b6fc0;color:#fff;display:grid;place-items:center;font-size:20px}.library-compare-bar p strong,.library-compare-bar p small{display:block}.library-compare-bar p small{color:var(--muted);margin-top:3px}.library-compare-bar button:disabled{opacity:.45;cursor:not-allowed}
.library-groups{display:grid;gap:20px}.library-topic-group{background:#fff;border:1px solid #efd0db;border-radius:13px;overflow:hidden;box-shadow:0 8px 24px rgba(154,45,88,.07)}.library-topic-group>header{display:flex;align-items:center;gap:13px;padding:16px 18px;background:linear-gradient(90deg,#fde8ef,#fff4f7);border-bottom:1px solid #efd0db}.library-topic-icon{width:43px;height:43px;border-radius:10px;color:#fff;display:grid;place-items:center;font-size:20px;box-shadow:0 5px 12px rgba(53,35,44,.12)}.library-color-0{background:#5087d0}.library-color-1{background:#43a878}.library-color-2{background:#ee963a}.library-color-3{background:#a56cc1}.library-topic-group header small{font-size:10px;letter-spacing:.12em;color:#a02d59;font-weight:800}.library-topic-group header h2{font:700 22px Georgia,serif;margin-top:2px}.library-topic-group header p{font-size:12px;color:var(--muted);margin-top:3px}
.library-case-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;padding:16px}.library-case-card{min-width:0;border:1px solid #efd4de;border-radius:11px;background:#fffdfd;overflow:hidden;display:flex;flex-direction:column}.library-case-image{display:block;width:100%;height:220px;object-fit:contain;background:#fff4f7;border-bottom:1px solid #efd4de}.library-image-placeholder{height:92px;background:linear-gradient(135deg,#fff3f7,#fde5ee);color:#9b6b7d;display:grid;place-items:center;align-content:center;gap:5px;font-size:12px;border-bottom:1px solid #efd4de}.library-image-placeholder span{font-size:24px;color:#c34b77}.library-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 16px 8px}.library-card-heading small{color:#947481;font-size:10px;text-transform:uppercase;font-weight:800;letter-spacing:.06em}.library-card-heading h3{font:700 21px Georgia,serif;margin-top:5px}.compare-check{display:flex;align-items:center;gap:6px;color:#a12d59;font-size:12px;font-weight:800;white-space:nowrap}.compare-check input{width:17px;height:17px;accent-color:#c13f72}.library-card-tags{display:flex;gap:6px;flex-wrap:wrap;padding:0 16px}.library-card-tags:empty{display:none}.library-study-summary{padding:10px 16px 16px;display:grid;gap:12px}.library-study-summary>div{border-top:1px solid #f1dbe3;padding-top:10px}.library-study-summary dt{font-size:10px;text-transform:uppercase;letter-spacing:.09em;font-weight:800;color:#a02d59;margin-bottom:5px}.library-study-summary dd{font-size:13px;line-height:1.55;color:#4c3740;white-space:pre-wrap;overflow-wrap:anywhere}.library-saved-note{background:#fff4cf;border:1px solid #f1dda0!important;border-radius:8px;padding:11px!important}.library-saved-note dt{color:#91621c}.library-case-card footer{margin-top:auto;border-top:1px solid #efd4de;padding:12px 16px;display:flex;justify-content:space-between;gap:10px;align-items:center}.library-case-card footer button{border:0;background:transparent;color:#aa2e5e;font-weight:800;font-size:12px}.library-case-card footer a{color:#6e54a2;font-weight:800;font-size:12px;text-decoration:none}
.library-empty,.library-loading{text-align:center;background:#fff;border:1px solid #efd1dc;border-radius:12px;padding:55px 22px;color:var(--muted)}.library-empty>span{display:grid;place-items:center;width:50px;height:50px;margin:0 auto 13px;border-radius:12px;background:#f9dce7;color:#aa2e5e;font-size:24px}.library-empty h2{font:700 25px Georgia,serif;color:var(--ink)}.library-empty p{margin:8px auto 18px;max-width:520px;line-height:1.6}
.library-comparison{background:#fff;border:1px solid #e4b5c7;border-radius:13px;overflow:hidden;margin-bottom:20px;box-shadow:0 14px 35px rgba(154,45,88,.12);scroll-margin-top:18px}.library-comparison>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 19px;background:linear-gradient(100deg,#ad3764,#d66b92);color:#fff}.library-comparison header small{font-size:10px;letter-spacing:.13em;color:#ffe2ec;font-weight:800}.library-comparison header h2{font:700 23px Georgia,serif;margin-top:3px}.comparison-table-wrap{overflow:auto;max-height:72vh}.library-compare-table{border-collapse:collapse;width:100%;min-width:760px;table-layout:fixed}.library-compare-table th,.library-compare-table td{border-right:1px solid #efd6df;border-bottom:1px solid #efd6df;padding:13px;vertical-align:top;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.5}.library-compare-table thead th{position:sticky;top:0;background:#fbe5ed;color:#8f2851;z-index:2;font:700 16px Georgia,serif}.library-compare-table th:first-child{width:145px;background:#fff3f7;color:#963058;font-family:Arial,sans-serif;font-size:11px;text-transform:uppercase;letter-spacing:.06em}.library-compare-table img{display:block;width:100%;height:130px;object-fit:contain;background:#fff5f8;border-radius:7px}
@media(max-width:1000px){.library-case-grid{grid-template-columns:1fr}.library-toolbar{grid-template-columns:1fr 210px}.library-toolbar .secondary-button{grid-column:1/-1}}
@media(max-width:760px){.library-toolbar{grid-template-columns:1fr}.library-toolbar .secondary-button{grid-column:auto}.library-compare-bar{align-items:stretch;flex-direction:column}.library-case-grid{padding:11px}.library-card-heading{flex-direction:column}.library-comparison>header{align-items:flex-start;flex-direction:column}.library-case-card footer{align-items:flex-start;flex-direction:column}.library-case-image{height:190px}}
@media(max-width:520px){.login-session-row{align-items:flex-start;flex-direction:column;gap:10px}}

/* Pink Clerkly theme */
:root{--ink:#281c23;--muted:#765f6a;--green:#c13f72;--green-dark:#9f2d59;--sage:#fde8ef;--cream:#fff7fa;--paper:#fffdfd;--line:#f0cfda;--orange:#ee9859;--danger:#b82f55;--shadow:0 12px 34px rgba(154,45,88,.11)}
body,.portal-body{background:linear-gradient(135deg,#fff9fb 0%,#fff2f6 58%,#fce8f0 100%);color:var(--ink)}
.portal-sidebar{background:linear-gradient(180deg,#fff2f6 0%,#fce8ef 100%);color:var(--ink);border-right:1px solid #f1cfdb;box-shadow:8px 0 28px rgba(171,56,99,.06)}
.portal-brand{color:#2e2028;border-bottom-color:#efcfda}.logo-mark{background:linear-gradient(145deg,#b92f64,#d55c88);box-shadow:0 7px 16px rgba(183,45,96,.2)}.logo-dot{color:#d65c88}
.portal-sidebar nav a,.portal-sidebar nav button,.portal-logout{color:#49343f}.portal-sidebar nav a:hover,.portal-sidebar nav button:hover,.portal-sidebar nav a.active{background:#f8dce7;color:#992850}.portal-sidebar nav a.active{border-left-color:#c33c70}.portal-sidebar nav a span,.portal-sidebar nav button span,.portal-logout span{border-radius:7px;width:28px;height:28px;display:grid;place-items:center;color:#fff;background:#c43d72}
.portal-sidebar nav a:nth-of-type(1) span{background:#5b83c6}.portal-sidebar nav a:nth-of-type(2) span{background:#6f77b8}.portal-sidebar nav a:nth-of-type(3) span{background:#db4d7d}.portal-sidebar nav a:nth-of-type(4) span{background:#49a77b}.portal-sidebar nav a:nth-of-type(5) span{background:#ed8b36}.portal-sidebar nav a:nth-of-type(6) span{background:#8d6ab5}.portal-sidebar nav button span{background:linear-gradient(145deg,#a555cc,#e2538c)}.portal-logout span{background:#7b6f78}
.sidebar-privacy{border-top-color:#edcad7;background:#f9dfe8;border-radius:10px;color:#7a5b68}.sidebar-privacy strong{color:#ae315f}
.primary-button,.form-section-heading>span:first-child,.portal-form-shell>header>span,.portal-case-list header a,.chat-fab{background:linear-gradient(135deg,#b92f64,#d65b88);color:#fff}.primary-button:hover{background:linear-gradient(135deg,#a42656,#c94a78)}
.secondary-button{border-color:#e3b9c9;color:#a22d59;background:#fffafd}.danger-button{background:#b82f55;color:#fff}.danger-button:hover{background:#982244}.portal-notice{border-color:#d24d7e;background:#fffafd}.portal-notice>span{background:linear-gradient(135deg,#be356a,#dd668f)}.portal-notice a,.portal-widget header>a{color:#aa2e5e}
.student-banner{background:linear-gradient(115deg,#ae3d66 0%,#c9577d 55%,#db83a4 100%)}.student-banner time,.student-banner span{color:#ffeaf1}.student-banner h2,.student-banner-right strong{color:#fff0be}.student-banner-right i{background:#fff;color:#ab315e}
.portal-widget,.portal-casebook,.portal-form-shell,.portal-topic-card,.profile-shell,.portal-stats article,.progress-actions>a,.progress-actions>button,.portal-directory{border-color:#efd1dc;box-shadow:0 7px 20px rgba(154,45,88,.07)}
.portal-widget>header,.portal-case-list>header,.portal-form-shell>header,.portal-topic-card>header{background:linear-gradient(90deg,#fde8ef,#f9dce7)}.portal-widget>header>span,.portal-widget header h2{color:#512f3e}.quick-link-pills a,.quick-link-pills button,.case-demographics span{border-color:#edc6d4;background:#fff0f5;color:#8f2b53}.metric-row strong,.library-overview strong,.portal-stats strong{color:#ae315f}.prompt-widget blockquote{color:#4e303e}.prompt-widget>button,.portal-topic-card button{color:#ae315f}
.portal-directory>header,.library-tip{background:linear-gradient(105deg,#ae3d66,#d16a91)}.portal-directory header span,.library-tip strong{color:#fff0bd}.library-tip p{color:#ffeaf1}.library-tip button{color:#a22d59}.portal-directory i{box-shadow:0 4px 10px rgba(35,26,30,.12)}
.portal-case-list{background:#fff8fa;border-color:#efd1dc}.case-item.active{border-color:#cc4677;background:#fce4ed}.portal-detail-grid .card{border-color:#efd5de;background:#fffefe}.card-label{color:#a72d59}.status{background:#f8dbe6;color:#9c2853}.sources{border-color:#efcfdb}
.clerking-guide,.system-review-guide,.structured-history{background:#fff1f6;border-color:#efccda}.clerking-guide strong,.system-review-guide strong,.structured-history h3{color:#9f2d59}.clerking-guide button,.system-review-guide button{border-color:#e9bdce;color:#98305a}.clerking-guide button:hover,.system-review-guide button:hover,.system-review-guide button.active{background:#bf386d;border-color:#bf386d}
.profile-photo-panel,.login-intro{background:linear-gradient(150deg,#9f2d59,#c94f7b 62%,#dd83a5)}.profile-photo-panel>p,.profile-photo-panel .form-help,.login-intro p{color:#ffe8f0}.profile-upload-button{border-color:#fff;color:#fff}.profile-form input:disabled{background:#fff4f7}
.form-field input:focus,.form-field textarea:focus,.form-field select:focus{border-color:#c94072;box-shadow:0 0 0 3px rgba(201,64,114,.12)}

/* Structured HOPI and multi-system review */
.hopi-guide-toggle{display:grid;grid-template-columns:1fr auto;align-items:center}.hopi-guide-toggle strong{grid-column:1}.hopi-guide-toggle span{grid-column:1;color:#745f68}.hopi-guide-toggle button{grid-column:2;grid-row:1/3}
.hopi-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;background:#fffafd;border:1px solid #efd1dc;border-radius:10px;padding:18px}.hopi-detail-grid.hidden{display:none}.systemic-review-selector{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:19px}.system-review-card{border:1px solid #efd0dc;background:#fffafd;border-radius:10px;padding:15px}.system-review-card:first-child{grid-column:1/-1}.system-review-card h3{font-size:14px;color:#982b56;margin-bottom:10px}.system-review-options{display:flex;flex-wrap:wrap;gap:8px}.system-review-card button{border:1px solid #e7bdcd;background:#fff;color:#674652;border-radius:999px;padding:7px 11px;font-weight:700}.system-review-card button:hover{border-color:#c23d70}.system-review-card button.active{background:linear-gradient(135deg,#b92f64,#d65b88);border-color:#b92f64;color:#fff;box-shadow:0 4px 10px rgba(185,47,100,.18)}.system-review-card .system-other-button{border-style:dashed;color:#9f2d59}.system-review-other{display:grid;gap:9px;margin-top:12px;padding-top:12px;border-top:1px dashed #e8bdcd;color:#7a4b5d;font-size:12px;font-weight:800}.system-review-other-list{display:grid;gap:8px}.system-review-other-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.system-review-other input{width:100%;min-height:42px;border:1px solid #e5bfce;border-radius:8px;background:#fff;padding:10px 12px;color:var(--ink);font:inherit;font-weight:500;outline:none}.system-review-other input:focus{border-color:#c94072;box-shadow:0 0 0 3px rgba(201,64,114,.12)}.system-review-card .system-other-add{justify-self:start;border-style:dashed;color:#9f2d59;background:#fff7fa}.system-review-card .system-review-other-row button{border:0;border-radius:7px;background:#fff0f4;color:#a52d58;padding:9px 10px;font-size:11px}.system-review-card .system-review-other-row button:hover{background:#f8d9e4}
.structured-history{margin-top:22px;border:1px solid #efccda;border-radius:10px;padding:20px}.structured-history>p{color:var(--muted);font-size:13px;margin:5px 0 18px}
.print-only-identifiers{margin-top:20px;border:1px dashed #d69a4c;border-radius:10px;padding:17px;background:#fff9e8}.print-only-heading{display:flex;align-items:center;gap:11px;margin-bottom:15px}.print-only-heading>span{width:34px;height:34px;border-radius:8px;background:#e89b35;color:#fff;display:grid;place-items:center}.print-only-heading strong,.print-only-heading small{display:block}.print-only-heading strong{color:#744b16}.print-only-heading small{color:#8a6b43;font-size:12px;margin-top:3px}.print-only-identifiers .form-field{color:#694719}.print-only-identifiers input{border-color:#e5c184!important;background:#fffef9!important}
.print-identifier-dialog{width:min(500px,calc(100vw - 28px));border:0;border-radius:15px;padding:0;box-shadow:0 28px 80px rgba(74,25,45,.3);color:var(--ink)}.print-identifier-dialog::backdrop{background:rgba(51,26,37,.48);backdrop-filter:blur(3px)}.print-identifier-dialog form{padding:24px;display:grid;gap:17px}.print-identifier-dialog header{display:flex;align-items:center;gap:12px}.print-identifier-dialog header>span{width:42px;height:42px;border-radius:10px;background:#e89b35;color:#fff;display:grid;place-items:center}.print-identifier-dialog header small{font-size:10px;letter-spacing:.12em;color:#a22d59;font-weight:800}.print-identifier-dialog h2{font:700 24px Georgia,serif;margin-top:2px}.print-identifier-dialog form>p{font-size:13px;line-height:1.55;color:var(--muted);background:#fff5da;border:1px solid #efd79b;border-radius:8px;padding:11px}.print-identifier-dialog .form-actions{margin:2px 0 0}.print-identifier-dialog input{min-height:47px}.pdf-export-status{margin:0!important;background:#eef8f3!important;border-color:#b8deca!important;color:#35624d!important}.pdf-export-status.error{background:#fff0f2!important;border-color:#eab8c2!important;color:#a12849!important}.print-identifier-dialog button:disabled{opacity:.65;cursor:wait}
@media(max-width:760px){.hopi-detail-grid,.systemic-review-selector{grid-template-columns:1fr}.system-review-card:first-child{grid-column:auto}.hopi-guide-toggle{display:flex}.hopi-guide-toggle button{margin-left:auto}}
