:root{color-scheme:light;--navy:#0b2447;--navy2:#12345d;--gold:#c79856;--gold-light:#f4d59b;--cream:#fffef5;--paper:#fff;--ink:#1d2b3b;--muted:#6d7884;--line:#e5e8ec;--green:#2d815f;--red:#a44842;--shadow:0 18px 60px #0b244714;font-family:"DM Sans",Arial,sans-serif;color:var(--ink);background:#f6f7f8}*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}a{color:inherit}.loading{min-height:100vh;display:grid;align-content:center;justify-items:center;color:var(--muted)}.brand-mark{display:grid;place-items:center;width:43px;height:43px;background:var(--navy);color:var(--gold-light);font:700 23px Georgia;border-radius:13px;box-shadow:0 8px 22px #0b244733}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse at 10% 0,#f4e8d6 0,transparent 38%),linear-gradient(145deg,#f9f7ef,#edf1f5)}.auth-card{width:min(450px,100%);padding:clamp(26px,6vw,48px);background:white;border:1px solid #fff;border-radius:24px;box-shadow:var(--shadow)}.brand{display:flex;align-items:center;gap:12px;color:var(--navy);font-size:13px;font-weight:700;letter-spacing:.12em}.brand small{display:block;margin-top:3px;color:#88919a;font-size:9px;font-weight:600;letter-spacing:.17em}.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:10px;font-weight:700;color:#9a7042}.auth-card .eyebrow{margin-top:32px}.auth-card h1,.page-head h1{margin:8px 0 10px;color:var(--navy);font:700 clamp(30px,5vw,42px)/1.1 "Playfair Display",Georgia,serif}.muted,.auth-card>p,.page-head p{color:var(--muted);line-height:1.65;font-size:14px}.field{display:grid;gap:7px;margin:17px 0}.field label{font-size:12px;font-weight:700;color:#334256}.field input,.field select,.field textarea,.search{width:100%;padding:12px 13px;border:1px solid #d9dfe4;border-radius:11px;background:white;color:var(--ink);outline:none}.field input:focus,.field select:focus,.field textarea:focus,.search:focus{border-color:#ad844e;box-shadow:0 0 0 3px #c7985626}.field textarea{resize:vertical;min-height:108px;line-height:1.55}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:10px 16px;border:0;border-radius:10px;background:var(--navy);color:white;font-weight:700;text-decoration:none;cursor:pointer;transition:transform .15s,background .15s}.btn:hover{background:var(--navy2);transform:translateY(-1px)}.btn.gold{background:var(--gold-light);color:#3d2c18}.btn.ghost{background:#eef1f4;color:#334256}.btn.danger{background:#fbefed;color:var(--red)}.btn.full{width:100%;margin-top:8px}.link-button{padding:0;border:0;background:none;color:#855c2f;font-weight:700;cursor:pointer}.auth-foot{text-align:center;margin-top:21px;font-size:12px;color:var(--muted)}.error{margin:12px 0;padding:11px 13px;border-radius:10px;background:#fff0ed;color:#8f382f;font-size:12px}.notice{padding:12px 14px;border-radius:12px;background:#f7f2e8;color:#715634;font-size:12px;line-height:1.6}.app{min-height:100vh;display:grid;grid-template-columns:250px minmax(0,1fr)}.sidebar{position:sticky;top:0;height:100vh;padding:24px 16px 16px;background:var(--navy);color:#eff3f8;display:flex;flex-direction:column}.sidebrand{display:flex;align-items:center;gap:12px;padding:2px 8px 28px;font-size:12px;font-weight:700;letter-spacing:.12em}.sidebrand .brand-mark{background:#19395d;color:var(--gold-light)}.sidebrand small{display:block;margin-top:4px;color:#a9b8ca;font-size:9px;letter-spacing:.16em}.nav-label{padding:14px 10px 8px;color:#98abc0;text-transform:uppercase;font-size:9px;font-weight:700;letter-spacing:.16em}.nav-list{display:grid;gap:5px}.nav-link{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:10px;color:#d2dbe5;font-size:13px;text-decoration:none;cursor:pointer}.nav-link:hover,.nav-link.active{background:#ffffff17;color:white}.nav-link .nav-icon{width:20px;text-align:center;font-size:16px}.side-bottom{margin-top:auto;border-top:1px solid #ffffff1a;padding-top:16px}.user-mini{padding:10px;color:#b9c6d3;font-size:11px;line-height:1.6;overflow-wrap:anywhere}.main{min-width:0}.topbar{height:82px;position:sticky;top:0;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 clamp(18px,4vw,52px);border-bottom:1px solid var(--line);background:#ffffffed;backdrop-filter:blur(12px)}.crumb{font-size:12px;color:var(--muted)}.crumb b{color:var(--navy)}.top-right{display:flex;align-items:center;gap:12px}.presence{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:99px;background:#eff4f1;color:#3f715a;font-size:11px;font-weight:700}.presence i{width:7px;height:7px;background:#42a477;border-radius:50%}.presence.offline{background:#f1f2f4;color:#707a84}.presence.offline i{background:#9ba3aa}.avatar{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#f0dfc4;color:#664820;font-size:12px;font-weight:700}.content{max-width:1220px;margin:auto;padding:clamp(22px,4vw,48px)}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:27px}.page-head h1{font-size:clamp(30px,4vw,40px)}.page-head p{margin:0;max-width:650px}.grid{display:grid;gap:17px}.summary-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:22px}.card{background:var(--paper);border:1px solid var(--line);border-radius:16px;box-shadow:0 4px 16px #0b244706}.summary-card{padding:20px}.summary-label{font-size:11px;color:var(--muted)}.summary-value{margin-top:8px;color:var(--navy);font:700 28px "Playfair Display",Georgia,serif}.summary-note{margin-top:3px;color:var(--muted);font-size:10px}.section-card{padding:22px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}.section-head h2,.card h2{margin:0;color:var(--navy);font:700 20px "Playfair Display",Georgia,serif}.section-head p{margin:5px 0 0;color:var(--muted);font-size:12px}.list{display:grid;gap:10px}.list-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border:1px solid var(--line);border-radius:12px}.list-row h3{margin:0;color:var(--navy);font-size:14px}.list-row p{margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.55}.status{display:inline-flex;white-space:nowrap;padding:6px 9px;border-radius:99px;background:#edf1f5;color:#536272;font-size:10px;font-weight:700}.status.pending_review{background:#fff4dd;color:#865d21}.status.published,.status.approved{background:#e6f4ed;color:#27704f}.status.needs_changes{background:#fff0e4;color:#985527}.status.declined,.status.withdrawn{background:#f8e9e7;color:#9a453c}.empty{padding:36px 20px;text-align:center;border:1px dashed #d7dde2;border-radius:13px;color:var(--muted);font-size:13px;line-height:1.7}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.span-2{grid-column:1/-1}.modal-back{position:fixed;inset:0;z-index:15;display:grid;place-items:center;padding:18px;background:#0a1a2dcc;overflow:auto}.modal{width:min(700px,100%);max-height:calc(100vh - 36px);overflow:auto;padding:clamp(22px,5vw,36px);border-radius:18px;background:white;box-shadow:0 24px 90px #0004}.modal h2{margin:7px 0;color:var(--navy);font:700 28px "Playfair Display",Georgia,serif}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.directory-controls{display:flex;gap:10px;margin-bottom:17px}.search{max-width:420px}.expert-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.expert-card{padding:19px}.expert-top{display:flex;align-items:center;gap:11px;margin-bottom:13px}.expert-initials{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#f2e8da;color:#754f26;font-weight:700}.expert-card h3{margin:0;color:var(--navy);font-size:15px}.expert-card .role{margin-top:3px;color:var(--muted);font-size:11px}.tag-row{display:flex;flex-wrap:wrap;gap:5px;margin:11px 0}.tag{padding:5px 8px;border-radius:99px;background:#f1f3f5;color:#526171;font-size:10px}.expert-bio{min-height:54px;color:#586777;font-size:12px;line-height:1.6}.guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.guide-card{padding:20px;cursor:pointer;transition:transform .15s,border .15s}.guide-card:hover{transform:translateY(-2px);border-color:#c9a875}.guide-card .guide-category{color:#9a7042;font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}.guide-card h3{margin:9px 0 7px;color:var(--navy);font:700 19px "Playfair Display",Georgia,serif}.guide-card p{margin:0;color:var(--muted);font-size:12px;line-height:1.6}.guide-body{color:#425264;font-size:14px;line-height:1.75}.guide-body h3{color:var(--navy);font:700 20px "Playfair Display",Georgia,serif}.guide-body ul,.guide-body p{margin:8px 0 17px}.chat-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:16px;align-items:start}.chat-card{overflow:hidden}.chat-header{display:flex;align-items:center;justify-content:space-between;padding:17px 20px;border-bottom:1px solid var(--line)}.chat-header h2{margin:0;color:var(--navy);font:700 20px "Playfair Display",Georgia,serif}.chat-messages{height:min(55vh,540px);min-height:300px;overflow:auto;padding:18px;background:#fafbfc;display:flex;flex-direction:column;gap:11px}.bubble{max-width:min(78%,520px);align-self:flex-start;padding:11px 13px;border-radius:14px 14px 14px 4px;background:#fff;border:1px solid var(--line);color:#334256;font-size:12px;line-height:1.6;overflow-wrap:anywhere}.bubble.mine{align-self:flex-end;border:0;border-radius:14px 14px 4px 14px;background:var(--navy);color:white}.bubble small{display:block;margin-top:5px;opacity:.7;font-size:9px}.chat-compose{display:flex;gap:9px;padding:14px;border-top:1px solid var(--line)}.chat-compose textarea{flex:1;min-height:43px;max-height:100px;resize:vertical;padding:11px 12px;border:1px solid var(--line);border-radius:11px;outline:none}.chat-aside{padding:19px}.chat-aside h3{margin:0 0 9px;color:var(--navy);font:700 17px "Playfair Display",Georgia,serif}.chat-aside p{color:var(--muted);font-size:11px;line-height:1.65}.chat-connection{font-size:10px;color:#348564}.toast{position:fixed;right:20px;bottom:20px;z-index:30;padding:12px 16px;border-radius:11px;background:#142c4a;color:white;box-shadow:var(--shadow);font-size:12px}.mobile-menu{display:none}.guide-footnote{margin-top:18px;color:#78828b;font-size:10px;line-height:1.55}.danger-copy{color:#98634b;font-size:11px;line-height:1.6}
@media(max-width:900px){.app{grid-template-columns:205px minmax(0,1fr)}.expert-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.chat-layout{grid-template-columns:1fr}.chat-aside{order:-1}.chat-aside p{margin-bottom:0}}
@media(max-width:650px){.app{display:block}.sidebar{position:fixed;z-index:12;inset:auto 0 0;height:auto;padding:8px 8px max(8px,env(safe-area-inset-bottom));display:block;border-radius:16px 16px 0 0;box-shadow:0 -8px 26px #0b244722}.sidebrand,.sidebar .nav-label,.side-bottom{display:none}.nav-list{display:flex;justify-content:space-around;gap:3px}.nav-link{flex:1;justify-content:center;flex-direction:column;gap:3px;padding:8px 3px;font-size:9px}.nav-link .nav-icon{font-size:18px}.main{padding-bottom:70px}.topbar{height:63px;padding:0 16px}.presence{font-size:0;gap:0;padding:8px}.presence i{width:8px;height:8px}.content{padding:23px 15px}.page-head{align-items:flex-start;flex-direction:column}.page-head .btn{width:100%}.summary-grid{grid-template-columns:1fr 1fr;gap:9px}.summary-card{padding:15px}.summary-value{font-size:23px}.section-card{padding:15px}.form-grid{grid-template-columns:1fr}.span-2{grid-column:auto}.expert-grid,.guide-grid{grid-template-columns:1fr}.directory-controls{flex-direction:column}.search{max-width:none}.list-row{align-items:flex-start}.list-row .status{font-size:9px}.chat-messages{height:48vh;min-height:260px}.chat-compose .btn{padding:10px}.modal-actions{flex-wrap:wrap}.modal-actions .btn{flex:1}.bubble{max-width:88%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

.auth-switch{padding:0;border:0;background:transparent;color:var(--navy2);font-weight:700;text-decoration:underline;cursor:pointer}.auth-switch:hover{color:var(--gold)}
