@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Noto+Serif+SC:wght@500;600;700&display=swap');

:root { --ink: #202728; --muted: #75807f; --line: #dfe7e3; --paper: #f7faf8; --white: #fff; --green: #b8e4c7; --green-dark: #276044; --shadow: 0 18px 50px rgba(32, 53, 44, .08); }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); font-family: Manrope, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.loading-screen { min-height: 100vh; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font: 500 10px/1.4 'DM Mono', monospace; letter-spacing: .1em; text-transform: uppercase; }
.brand-mark { display: flex; gap: 8px; align-items: baseline; color: var(--ink); font-weight: 800; letter-spacing: -.04em; }
.brand-mark i { color: #92b6a0; font-style: normal; }
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 560px) minmax(420px, 1fr); background: var(--paper); }
.auth-panel { align-self: center; width: min(100% - 80px, 410px); margin: auto; padding: 38px 0; }
.auth-panel h1 { margin: 48px 0 14px; font: 600 clamp(36px, 5vw, 56px)/1.05 'Noto Serif SC', serif; letter-spacing: -.06em; }
.auth-copy { max-width: 390px; margin: 0 0 28px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.auth-tabs { display: flex; gap: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.auth-tab { position: relative; border: 0; padding: 12px 0 14px; color: var(--muted); background: transparent; font-weight: 700; }
.auth-tab.active { color: var(--ink); }
.auth-tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--ink); content: ''; }
.auth-form { display: grid; gap: 15px; }
.auth-aside { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 70px 9vw; background: #d7e9df; }
.auth-aside h2 { position: relative; max-width: 590px; margin: 0 0 38px; font: 600 clamp(32px, 4vw, 62px)/1.12 'Noto Serif SC', serif; letter-spacing: -.07em; }
.aside-orb { position: absolute; top: 13%; right: 9%; width: min(33vw, 420px); height: min(33vw, 420px); border: 1px solid rgba(39, 96, 68, .3); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.18), 0 0 0 84px rgba(255,255,255,.12); }
.aside-orb::after { position: absolute; top: 16%; left: 12%; width: 40%; height: 40%; border-radius: 50%; background: #9ecfb0; content: ''; filter: blur(1px); }
.aside-steps { position: relative; display: flex; gap: 30px; color: #4e6f5a; font-size: 12px; }
.aside-steps span { display: flex; gap: 8px; align-items: center; }
.aside-steps b { font: 11px 'DM Mono', monospace; }
.field { display: grid; gap: 7px; }
.field label { color: #52615e; font-size: 12px; font-weight: 700; }
.field input, .field textarea, .auth-form input, .source-actions input { width: 100%; border: 1px solid var(--line); border-radius: 4px; outline: 0; background: rgba(255,255,255,.72); color: var(--ink); transition: border .2s, box-shadow .2s; }
.field input, .auth-form input, .source-actions input { height: 43px; padding: 0 13px; }
.field textarea { min-height: 94px; padding: 11px 13px; resize: vertical; }
input:focus, textarea:focus { border-color: #77a189; box-shadow: 0 0 0 3px rgba(119,161,137,.14); }
.button { border: 1px solid transparent; border-radius: 3px; padding: 12px 18px; font-size: 12px; font-weight: 800; letter-spacing: .01em; transition: transform .2s, background .2s, opacity .2s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button-dark { background: var(--ink); color: #fff; }
.button-wide { width: 100%; justify-content: center; }
.button span { margin-left: 13px; font-size: 15px; }
.form-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.error-message { min-height: 18px; margin: 14px 0 0; color: #af584f; font-size: 12px; }

.app-screen { min-height: 100vh; }
.app-header { display: flex; min-height: 78px; align-items: center; justify-content: space-between; padding: 17px clamp(20px, 6vw, 86px); border-bottom: 1px solid var(--line); background: rgba(247,250,248,.92); }
.app-brand { display: flex; gap: 10px; align-items: center; color: var(--ink); font-size: 14px; font-weight: 800; text-decoration: none; }
.app-brand small { margin-left: 4px; color: #86a392; font: 10px 'DM Mono', monospace; }
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: #7db48e; box-shadow: 0 0 0 5px #dcefe3; }
.header-user { display: flex; gap: 17px; align-items: center; }
.profile-button { display: flex; gap: 9px; align-items: center; border: 0; padding: 0; background: transparent; text-align: left; }
.profile-button > span:last-child { display: grid; gap: 2px; }
.profile-button strong { font-size: 11px; }
.profile-button small { color: var(--muted); font: 10px 'DM Mono', monospace; }
.avatar { display: grid; width: 34px; height: 34px; flex-shrink: 0; place-items: center; border-radius: 50%; background: var(--green); color: var(--green-dark); font-weight: 800; }
.save-state, .text-button { color: var(--muted); font-size: 11px; }
.text-button { border: 0; padding: 0; background: transparent; }
.text-button:hover { color: #ad5e51; }

.hub { max-width: 1160px; margin: 0 auto; padding: 58px clamp(20px, 5vw, 70px) 80px; }
.hub-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 30px; }
.hub-heading h1 { margin: 0; font: 600 clamp(30px, 4vw, 48px)/1.15 'Noto Serif SC', serif; letter-spacing: -.06em; }
.hub-heading p:not(.eyebrow) { max-width: 610px; margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.profile-entry { display: flex; min-width: 210px; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 5px; padding: 10px 13px; background: #fff; text-align: left; box-shadow: 0 8px 30px rgba(31,58,44,.035); }
.profile-entry span:nth-child(2) { display: grid; gap: 4px; }
.profile-entry strong { font-size: 12px; }
.profile-entry small { color: var(--muted); font-size: 10px; }
.profile-entry b { margin-left: auto; color: #6b9980; font-size: 17px; }
.status-strip { display: flex; gap: 28px; align-items: center; margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.58); color: var(--muted); font-size: 11px; }
.status-strip span { display: flex; gap: 5px; align-items: baseline; }
.status-strip b { color: var(--ink); font-size: 16px; }
.status-note { margin-left: auto; color: #6c9278; }
.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.skill-card { position: relative; display: flex; min-height: 230px; flex-direction: column; align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; padding: 20px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 8px 30px rgba(31,58,44,.035); transition: transform .2s, box-shadow .2s, border .2s; }
.skill-card:hover { border-color: #a3c3ad; box-shadow: 0 18px 40px rgba(31,58,44,.11); transform: translateY(-3px); }
.skill-card::before { position: absolute; top: 0; right: 0; left: 0; height: 5px; background: #b8e4c7; content: ''; }
.skill-card.blue::before { background: #badcea; }.skill-card.purple::before { background: #ded0ea; }.skill-card.orange::before { background: #f0d5ad; }.skill-card.rose::before { background: #edc9c6; }.skill-card.green::before { background: #b8e4c7; }
.card-index { color: #8ca39a; font: 11px 'DM Mono', monospace; }
.skill-card-main { display: grid; gap: 5px; margin-top: 28px; }
.skill-card .eyebrow { margin-bottom: 3px; font-size: 9px; }
.skill-card strong { font: 600 24px/1.25 'Noto Serif SC', serif; letter-spacing: -.04em; }
.skill-subtitle { color: #5f726b; font-size: 12px; }
.skill-preview { display: -webkit-box; overflow: hidden; margin-top: 13px; color: var(--muted); font-size: 11px; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-arrow { position: absolute; right: 20px; bottom: 18px; color: #6e9c7e; font-size: 19px; }
.hub-footnote { margin: 18px 0 0; color: #95a39e; font-size: 10px; text-align: center; }
.hub-admin { max-width: 900px; margin: 0 auto; }
.admin-shortcut { display: flex; gap: 16px; align-items: center; padding: 23px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.admin-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--green); color: var(--green-dark); font-size: 24px; }
.admin-shortcut strong { font-size: 14px; }.admin-shortcut p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }

.overlay { position: fixed; z-index: 10; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(25, 38, 33, .43); backdrop-filter: blur(5px); }
.chat-panel, .modal-panel { width: min(100%, 820px); border: 1px solid #d2dfd7; border-radius: 8px; background: var(--paper); box-shadow: 0 28px 90px rgba(18, 43, 31, .2); }
.chat-panel { display: flex; height: min(760px, calc(100vh - 48px)); flex-direction: column; overflow: hidden; }
.chat-header, .modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 27px 17px; border-bottom: 1px solid var(--line); background: #fff; }
.chat-heading { display: flex; gap: 14px; align-items: flex-start; }.skill-number { color: #82a08d; font: 12px 'DM Mono', monospace; }.chat-header h2, .modal-header h2 { margin: 0; font: 600 28px 'Noto Serif SC', serif; letter-spacing: -.05em; }.chat-header .eyebrow { margin-bottom: 4px; }.chat-header p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.icon-button { border: 0; padding: 0; background: transparent; color: #789083; font-size: 27px; line-height: 1; }.icon-button:hover { color: var(--ink); }
.chat-intro { margin: 18px 27px 0; padding: 14px 16px; border-left: 3px solid #a5ccb1; background: #edf7ef; color: #527060; font-size: 12px; line-height: 1.8; }
.project-source { display: grid; gap: 10px; margin: 14px 27px 0; padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }.source-actions { display: flex; gap: 9px; }.source-actions input { flex: 1; }.source-actions .button { white-space: nowrap; }
.messages { flex: 1; overflow: auto; padding: 21px 27px 10px; }.message { display: flex; gap: 10px; max-width: 91%; margin-bottom: 17px; }.message.user { margin-right: 0; margin-left: auto; flex-direction: row-reverse; }.message-label { flex: 0 0 auto; margin-top: 5px; color: #86a093; font: 9px 'DM Mono', monospace; }.message.user .message-label { color: #9f9287; }.message-body { padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px 10px 10px 10px; background: #fff; color: #52625c; font-size: 12px; line-height: 1.85; overflow-wrap: anywhere; }.message.user .message-body { border-color: #d9eadf; border-radius: 10px 4px 10px 10px; background: #e6f3e9; color: #3e5d49; }
.composer { padding: 13px 27px 20px; border-top: 1px solid var(--line); background: #fff; }.composer textarea { display: block; width: 100%; min-height: 58px; border: 1px solid var(--line); border-radius: 4px; padding: 12px; outline: 0; background: #fbfdfc; color: var(--ink); resize: vertical; }.composer textarea:focus { border-color: #77a189; box-shadow: 0 0 0 3px rgba(119,161,137,.14); }.composer-foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 9px; color: #9aa6a2; font-size: 10px; }.composer-foot .button { padding: 9px 14px; }
.modal-panel { padding-bottom: 25px; }.modal-copy { margin: 20px 27px; color: var(--muted); font-size: 12px; line-height: 1.8; }.profile-modal > .field { margin: 0 27px; }.profile-textarea { min-height: 250px !important; background: #fff !important; }.modal-actions { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin: 17px 27px 0; }.modal-actions .button { white-space: nowrap; }
.admin-form { display: flex; gap: 12px; align-items: end; margin: 0 27px; }.admin-form .field { flex: 0 0 112px; }.admin-form .field-wide { flex: 1; }.admin-form .button { white-space: nowrap; }.invite-list { display: grid; gap: 8px; max-height: 370px; overflow: auto; margin: 22px 27px 0; }.invite-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }.invite-row code { display: block; color: var(--green-dark); font: 600 15px 'DM Mono', monospace; letter-spacing: .08em; }.invite-row span:not(.tag) { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }.invite-actions { display: flex; gap: 12px; align-items: center; }.tag { display: inline-flex; padding: 5px 8px; border-radius: 20px; background: #e3f1e7; color: var(--green-dark); font-size: 10px; }.tag.inactive { background: #f0f2f1; color: var(--muted); }
.empty-state { display: grid; gap: 7px; min-height: 100px; place-items: center; align-content: center; padding: 20px; color: var(--muted); font-size: 11px; text-align: center; }.empty-state strong { color: var(--ink); font-size: 13px; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: 340px; padding: 12px 16px; border: 1px solid #c7ddd0; border-radius: 4px; background: #f0f8f2; color: #37664a; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) { .auth-screen { grid-template-columns: 1fr; }.auth-panel { width: min(100% - 48px, 460px); }.auth-aside { display: none; }.skill-grid { grid-template-columns: repeat(2, 1fr); }.hub-heading { align-items: flex-start; flex-direction: column; }.profile-entry { width: 100%; }.admin-form { flex-wrap: wrap; }.admin-form .field, .admin-form .field-wide { flex: 1 1 130px; } }
@media (max-width: 600px) { .app-header { padding: 14px 18px; }.header-user { gap: 10px; }.save-state { display: none; }.profile-button > span:last-child { display: none; }.hub { padding: 36px 18px 55px; }.hub-heading h1 { font-size: 34px; }.status-strip { flex-wrap: wrap; gap: 12px 20px; }.status-note { width: 100%; margin-left: 0; }.skill-grid { grid-template-columns: 1fr; }.skill-card { min-height: 195px; }.overlay { padding: 0; }.chat-panel { width: 100%; height: 100%; border: 0; border-radius: 0; }.chat-header, .modal-header { padding: 19px 18px 14px; }.chat-intro { margin-right: 18px; margin-left: 18px; }.project-source { margin-right: 18px; margin-left: 18px; }.source-actions { align-items: stretch; flex-direction: column; }.messages { padding-right: 18px; padding-left: 18px; }.composer { padding-right: 18px; padding-left: 18px; }.composer-foot { align-items: flex-start; flex-direction: column; }.composer-foot .button { width: 100%; }.modal-panel { width: 100%; min-height: 100%; border: 0; border-radius: 0; }.modal-copy, .profile-modal > .field, .modal-actions { margin-right: 18px; margin-left: 18px; }.admin-form { align-items: stretch; flex-direction: column; margin-right: 18px; margin-left: 18px; }.admin-form .field, .admin-form .field-wide { flex: auto; }.invite-list { margin-right: 18px; margin-left: 18px; }.invite-row { align-items: flex-start; flex-direction: column; }.invite-actions { flex-wrap: wrap; } }
