/* ===================== SHARED STYLES ===================== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#f6f3ef;--surface:#fff;--border:#e6e0d8;
  --text:#1c1a18;--text2:#7a726a;--text3:#b5aea6;
  --green:#1a6b3c;--green2:#e6f4ed;--green3:rgba(26,107,60,0.06);
  --gold:#c4954a;--gold2:#faf2e4;
  --radius:16px;--rs:10px;
  --font:"Inter","PingFang SC","Noto Sans SC",sans-serif;
  --shadow:0 2px 8px rgba(0,0,0,0.05);
  --shadow-lg:0 16px 48px rgba(0,0,0,0.1);
}
html{scroll-behavior:smooth}
body{font-family:var(--font);background:var(--bg);color:var(--text);line-height:1.7;font-size:15px;-webkit-font-smoothing:antialiased;padding-top:58px}
::-webkit-scrollbar{width:4px}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:99px}
a{color:var(--green);text-decoration:none}
a:hover{text-decoration:underline}

/* ===== NAV ===== */
nav{position:fixed;top:0;left:0;right:0;height:58px;z-index:100;background:rgba(255,255,255,0.9);backdrop-filter:blur(16px) saturate(1.2);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 32px}
nav .brand{font-weight:700;font-size:16px;display:flex;align-items:center;gap:8px}
nav .brand mark{background:linear-gradient(135deg,#1a6b3c,#2d8a4e);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
nav .brand small{font-weight:400;font-size:11px;background:var(--border);padding:1px 8px;border-radius:99px;color:var(--text2);-webkit-text-fill-color:var(--text2)}
.nav-links{display:flex;gap:2px}
.nav-links a{padding:6px 14px;border-radius:8px;font-size:13px;font-weight:500;color:var(--text2);text-decoration:none;transition:all .2s;display:flex;align-items:center;gap:5px;white-space:nowrap}
.nav-links a:hover{color:var(--text)}
.nav-links a.active{background:var(--green);color:#fff}

/* ===== PAGE CONTAINER ===== */
.page{max-width:1060px;margin:0 auto;padding:0 28px 48px;overflow:hidden;min-width:0}
.page-header{margin:28px 0 20px}
.page-header h2{font-size:24px;font-weight:700;letter-spacing:-.3px}
.page-header p{color:var(--text2);font-size:14px;margin-top:4px}
.section-title{font-size:13px;font-weight:600;letter-spacing:1.5px;color:var(--text2);margin-bottom:16px;display:flex;align-items:center;gap:8px}
.section-title::after{content:'';flex:1;height:1px;background:var(--border)}
.skills{display:flex;flex-wrap:wrap;gap:6px}
.skills span{padding:5px 14px;background:var(--green3);color:var(--green);border-radius:99px;font-size:13px;font-weight:500}

/* ===== CARDS ===== */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--rs);padding:16px 18px;transition:all .2s}
.card:hover{box-shadow:var(--shadow);transform:translateY(-1px)}

/* ===== HERO ===== */
.hero{background:linear-gradient(135deg,#1a6b3c 0%,#2d8a4e 60%,#3a9d5e 100%);margin:0 -28px;padding:56px 40px 44px;position:relative;overflow:hidden}
.hero::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 70% 10%,rgba(255,255,255,0.12) 0%,transparent 60%),radial-gradient(ellipse at 20% 90%,rgba(255,255,255,0.05) 0%,transparent 50%)}
.hero-inner{position:relative;z-index:1;color:#fff}

/* ===== MODAL (for full report view) ===== */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.3);z-index:300;backdrop-filter:blur(6px);opacity:0;pointer-events:none;transition:opacity .25s}
.modal-overlay.open{opacity:1;pointer-events:auto}
.modal{position:fixed;top:5%;left:50%;transform:translate(-50%,0) scale(.95);width:92%;max-width:740px;max-height:90vh;background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow-lg);z-index:301;overflow-y:auto;opacity:0;pointer-events:none;transition:all .25s}
.modal.open{opacity:1;pointer-events:auto;transform:translate(-50%,0) scale(1)}
.modal-head{position:sticky;top:0;background:var(--surface);padding:20px 24px 12px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:flex-start;z-index:2}
.modal-head h2{font-size:18px;font-weight:700;padding-right:16px}
.modal-head .close{background:var(--bg);border:none;width:28px;height:28px;border-radius:50%;cursor:pointer;font-size:16px;color:var(--text2);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.modal-head .close:hover{background:var(--border)}
.modal-body{padding:20px 24px 28px;font-size:14px;line-height:1.8}
.modal-body h3{font-size:16px;font-weight:600;margin:20px 0 8px;padding-bottom:4px;border-bottom:1px solid var(--border)}
.modal-body h3:first-child{margin-top:0}
.modal-body h4{font-size:15px;font-weight:600;margin:16px 0 6px}
.modal-body p{margin-bottom:12px}
.modal-body .bx{background:var(--green2);border-left:3px solid var(--green);padding:12px 16px;border-radius:0 var(--rs) var(--rs) 0;margin:14px 0;font-size:13px;line-height:1.7}
.modal-body ul{margin:8px 0 8px 18px}
.modal-body li{margin-bottom:4px}

/* ===== CHAT BUBBLE ===== */
.chat-bubble{position:fixed;bottom:24px;right:24px;z-index:150;width:60px;height:60px;border-radius:50%;background:var(--green);color:#fff;border:none;display:flex;align-items:center;justify-content:center;font-size:24px;cursor:pointer;box-shadow:0 4px 20px rgba(26,107,60,.3);transition:all .2s;overflow:hidden}
.chat-bubble:hover{transform:scale(1.08);box-shadow:0 6px 28px rgba(26,107,60,.4)}
.chat-bubble .cat{width:40px;height:40px;object-fit:contain;filter:brightness(10)}
.chat-bubble .notification{position:absolute;top:-2px;right:-2px;width:18px;height:18px;background:#ff6b6b;border-radius:50%;color:#fff;font-size:10px;display:flex;align-items:center;justify-content:center;font-weight:600;border:2px solid #fff}
.chat-bubble .typing{display:none;position:absolute;inset:0;background:var(--green);border-radius:50%;align-items:center;justify-content:center;gap:3px}
.chat-bubble .typing span{width:4px;height:4px;background:#fff;border-radius:50%;animation:dot .8s infinite}
.chat-bubble .typing span:nth-child(2){animation-delay:.15s}
.chat-bubble .typing span:nth-child(3){animation-delay:.3s}
@keyframes dot{0%,60%,100%{opacity:.3}30%{opacity:1}}
.chat-panel{position:fixed;bottom:96px;right:24px;z-index:149;width:400px;max-width:calc(100vw - 48px);height:540px;max-height:calc(100vh - 160px);background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow-lg);border:1px solid var(--border);display:none;flex-direction:column;overflow:hidden}
.chat-panel.open{display:flex}
.chat-head{background:linear-gradient(135deg,#1a6b3c,#2d8a4e);color:#fff;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}
.chat-head .info{display:flex;align-items:center;gap:8px}
.chat-head .info .avatar{width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,0.2);display:flex;align-items:center;justify-content:center;font-size:18px}
.chat-head .info .name{font-weight:600;font-size:14px}
.chat-head .info .status{font-size:11px;opacity:.7}
.chat-head .close-chat{background:rgba(255,255,255,0.15);border:none;width:26px;height:26px;border-radius:50%;cursor:pointer;font-size:14px;color:#fff;display:flex;align-items:center;justify-content:center}
.chat-msgs{flex:1;overflow-y:auto;padding:14px 16px;display:flex;flex-direction:column;gap:8px}
.chat-msg{max-width:88%;padding:8px 14px;border-radius:12px;font-size:13px;line-height:1.6;animation:chatIn .2s}
@keyframes chatIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.chat-msg.user{background:var(--green);color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.chat-msg.bot{background:var(--bg);color:var(--text);align-self:flex-start;border-bottom-left-radius:4px}
.chat-msg.bot .emo{font-size:18px;display:block;margin-bottom:4px}
.chat-msg .suggestions{display:flex;gap:4px;flex-wrap:wrap;margin-top:6px}
.chat-msg .suggestions a{padding:3px 10px;background:var(--green3);border:1px solid var(--green);border-radius:99px;font-size:11px;cursor:pointer;color:var(--green);transition:all .1s}
.chat-msg .suggestions a:hover{background:var(--green);color:#fff;text-decoration:none}
.chat-input-wrap{display:flex;padding:10px 14px;border-top:1px solid var(--border);gap:8px;flex-shrink:0}
.chat-input-wrap input{flex:1;padding:8px 12px;border:1px solid var(--border);border-radius:99px;font-size:13px;outline:none;font-family:var(--font)}
.chat-input-wrap input:focus{border-color:var(--green)}
.chat-input-wrap button{padding:8px 16px;background:var(--green);color:#fff;border:none;border-radius:99px;font-size:13px;cursor:pointer;font-weight:500;font-family:var(--font)}
.chat-welcome-cat{text-align:center;padding:12px 0 4px}
.chat-welcome-cat .c{font-size:48px;margin-bottom:4px}

/* ===== RESPONSIVE ===== */
@media(max-width:768px){
  nav{padding:0 12px;overflow-x:auto}
  .nav-links a{padding:5px 8px;font-size:12px}
  .nav-links a span{display:none}
  .hero{margin:0 -16px;padding:36px 20px 32px}
.page{padding:0 16px 36px}
  .modal{top:0;max-height:100vh;width:100%;border-radius:0}
  .chat-panel{right:14px;bottom:80px;width:calc(100vw - 28px);height:55vh}
  .chat-bubble{bottom:16px;right:14px}
}

/* ===== FLASHCARD TABLES ===== */
.table-wrap{overflow-x:auto;margin:12px 0}
.fc-modal table,.fc-modal .table-wrap table{width:100%;border-collapse:collapse;font-size:12px;line-height:1.4}
.fc-modal table th,.fc-modal .table-wrap table th{background:#e8e0d4;padding:8px 10px;text-align:center;font-weight:600;border:2px solid #555;white-space:normal;word-break:break-word}
.fc-modal table td,.fc-modal .table-wrap table td{padding:8px 10px;border:2px solid #555;vertical-align:middle;white-space:normal;word-break:break-word}
.fc-modal table tr:first-child th{border-top:2px solid #333}
.fc-modal table tr:last-child td{border-bottom:2px solid #333}
.fc-modal table th:first-child,.fc-modal table td:first-child{border-left:2px solid #333}
.fc-modal table th:last-child,.fc-modal table td:last-child{border-right:2px solid #333}
.fc-modal table tr:hover td{background:#faf8f5}
