:root{
  --bg:#0B0D10; --surface:#15181D; --surface-2:#1D2128; --surface-3:#242932;
  --border:#262B33; --text:#F2F0EB; --text-dim:#8B92A0; --text-faint:#565D69;
  --orange:#F7931A; --orange-soft:rgba(247,147,26,0.14); --dusk:#FF6B5E;
  --mastered:#3FCE8E; --mastered-soft:rgba(63,206,142,0.14);
  --locked:#3A3F48; --amber:#FBBF24; --radius:14px;
}
*{box-sizing:border-box; margin:0; padding:0;}
html,body{height:100%;}
body{
  background-color:var(--bg); color:var(--text); font-family:'Inter', sans-serif; -webkit-font-smoothing:antialiased;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Ctext x='20' y='40' font-family='Arial' font-size='26' font-weight='bold' fill='%23F7931A' opacity='0.05'%3E%E2%82%BF%3C/text%3E%3Ctext x='90' y='110' font-family='Arial' font-size='26' font-weight='bold' fill='%23F7931A' opacity='0.05'%3E%E2%82%BF%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
}

.login-screen{
  height:100vh; display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden;
  background:
    radial-gradient(circle at 30% 20%, #1a1410 0%, #0B0D10 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23F7931A' stroke-width='1.2' opacity='0.09'%3E%3Cpath d='M0 40 H70 V90 H160 V40 H240'/%3E%3Cpath d='M0 130 H50 V170 H120 V220 H240'/%3E%3Cpath d='M180 0 V60 H240'/%3E%3Cpath d='M20 240 V190 H90 V150'/%3E%3Ccircle cx='70' cy='40' r='4'/%3E%3Ccircle cx='160' cy='90' r='4'/%3E%3Ccircle cx='50' cy='130' r='4'/%3E%3Ccircle cx='120' cy='170' r='4'/%3E%3Ccircle cx='180' cy='60' r='4'/%3E%3Ccircle cx='90' cy='190' r='4'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
}
.login-screen::before{
  content:'₿'; position:absolute; font-family:'Space Grotesk', sans-serif; font-weight:700;
  font-size:min(70vw, 900px); color:var(--orange); opacity:0.035; z-index:0;
  top:50%; left:50%; transform:translate(-50%, -50%); pointer-events:none; line-height:1;
}
.login-card{position:relative; z-index:1;}
.login-card{width:380px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:36px;}
.ekasi-logo{width:110px; height:110px; margin-bottom:18px; display:block;}
.login-card h1{font-family:'Space Grotesk', sans-serif; font-size:42px; font-weight:700; margin-bottom:6px;}
.login-card p.sub{font-size:13px; color:var(--text-dim); margin-bottom:26px;}
.field{margin-bottom:14px;}
.field label{display:block; font-size:12px; color:var(--text-dim); margin-bottom:6px;}
.field input{width:100%; padding:11px 14px; background:var(--surface-2); border:1px solid var(--border); border-radius:9px; color:var(--text); font-size:14px; outline:none;}
.field input:focus{border-color:var(--orange);}
.login-btn{width:100%; padding:12px; background:var(--orange); border:none; border-radius:9px; color:#181008; font-family:'Space Grotesk', sans-serif; font-weight:600; font-size:14px; cursor:pointer; margin-top:8px;}
.login-error{color:var(--dusk); font-size:12.5px; margin-top:10px; min-height:16px;}

.app{display:none; height:100vh; width:100vw;}
.app.active{display:flex;}
.rail{
  width:84px; flex-shrink:0; background:var(--surface); border-right:1px solid var(--border);
  display:flex; flex-direction:column; align-items:center; padding:22px 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23F7931A' stroke-width='1' opacity='0.06'%3E%3Cpath d='M0 30 H50 V60 H120 V30 H160'/%3E%3Cpath d='M0 100 H40 V130 H90 V160'/%3E%3Ccircle cx='50' cy='30' r='3'/%3E%3Ccircle cx='120' cy='60' r='3'/%3E%3Ccircle cx='40' cy='100' r='3'/%3E%3Ccircle cx='90' cy='130' r='3'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
}
.rail-logo{width:38px; height:38px; border-radius:10px; background:linear-gradient(135deg, var(--orange), var(--dusk)); display:flex; align-items:center; justify-content:center; font-family:'Space Grotesk', sans-serif; font-weight:700; font-size:15px; color:#0B0D10; margin-bottom:34px;}
.rail-nav{display:flex; flex-direction:column; gap:6px; flex:1;}
.rail-btn{width:56px; height:56px; border-radius:12px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; background:transparent; border:none; cursor:pointer; color:var(--text-faint); transition:background .15s ease, color .15s ease;}
.rail-btn svg{width:20px; height:20px;}
.rail-btn span{font-size:9.5px; font-weight:500;}
.rail-btn:hover{background:var(--surface-2); color:var(--text-dim);}
.rail-btn.active{background:var(--orange-soft); color:var(--orange);}
.rail-logout{width:38px; height:38px; border-radius:50%; background:var(--surface-3); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--text-dim);}

.main{flex:1; display:flex; flex-direction:column; min-width:0;}
.topbar{height:64px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; padding:0 28px; flex-shrink:0;}
.topbar-title{font-family:'Space Grotesk', sans-serif; font-weight:600; font-size:15px; color:var(--text-dim);}
.topbar-title b{color:var(--text); font-weight:600;}
.topbar-right{display:flex; align-items:center; gap:18px;}

.price-ticker{display:flex; align-items:center; gap:7px; font-family:'JetBrains Mono', monospace; font-size:12px; background:var(--surface); border:1px solid var(--border); border-radius:20px; padding:6px 13px; color:var(--text-dim); white-space:nowrap;}
.price-ticker .btc-symbol{color:var(--orange); font-weight:600;}
.price-ticker .price-value{color:var(--text);}
.price-ticker .price-change{font-size:10.5px; padding:2px 6px; border-radius:10px;}
.price-ticker .price-change.up{color:var(--mastered); background:var(--mastered-soft);}
.price-ticker .price-change.down{color:var(--dusk); background:rgba(255,107,94,0.12);}

.view{flex:1; overflow-y:auto; display:none;}
.view.active{display:block;}

.course-layout{display:flex; align-items:flex-start; gap:0; height:100%;}
.chapter-nav{
  width:220px; flex-shrink:0; border-right:1px solid var(--border); background:var(--surface);
  padding:24px 16px; height:100%; overflow-y:auto;
}
.chapter-nav-title{font-family:'JetBrains Mono', monospace; font-size:11px; color:var(--orange); text-transform:uppercase; letter-spacing:.06em; margin-bottom:2px;}
.chapter-nav-sub{font-size:12px; color:var(--text-dim); margin-bottom:16px; line-height:1.4;}
.chapter-nav-item{
  display:flex; align-items:flex-start; gap:8px; width:100%; text-align:left; background:none; border:none;
  padding:8px 8px; border-radius:8px; cursor:pointer; margin-bottom:2px; color:var(--text-faint);
}
.chapter-nav-item:disabled{opacity:0.4; cursor:not-allowed;}
.chapter-nav-item:not(:disabled):hover{background:var(--surface-2); color:var(--text-dim);}
.chapter-nav-item.active{background:var(--orange-soft); color:var(--orange);}
.chapter-nav-item.mastered:not(.active){color:var(--mastered);}
.chapter-nav-item.reinforced:not(.active){color:var(--amber);}
.chapter-nav-num{font-family:'JetBrains Mono', monospace; font-size:10.5px; flex-shrink:0; margin-top:1px;}
.chapter-nav-label{font-size:12px; line-height:1.4;}
@media (max-width: 900px){ .chapter-nav{display:none;} }

.course-wrap{max-width:760px; margin:0 auto; padding:48px 32px 120px; flex:1;}
.crumb{font-family:'JetBrains Mono', monospace; font-size:11px; color:var(--text-faint); text-transform:uppercase; letter-spacing:.08em; margin-bottom:14px;}
.crumb span{color:var(--orange);}
h1.section-title{font-family:'Space Grotesk', sans-serif; font-size:42px; font-weight:700; line-height:1.15; margin-bottom:22px;}
.review-note{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:16px 20px; margin-bottom:16px; font-size:14px; line-height:1.6; color:var(--text-dim);}
.satoshi-intro p{font-size:14px; line-height:1.6; color:var(--text-dim); padding-top:2px;}
.body-text{
  font-size:20px; line-height:1.7; color:#D5D2CB; margin-bottom:18px; white-space:pre-line;
  padding:24px 26px; background:var(--surface); border:1.5px solid var(--orange);
  clip-path:polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}
.activity-badge{display:inline-flex; align-items:center; gap:6px; font-family:'JetBrains Mono', monospace; font-size:11px; color:var(--amber); background:rgba(251,191,36,0.12); padding:6px 12px; border-radius:20px; margin-bottom:20px;}
.btc-bullet{color:var(--orange); font-weight:700; font-family:'Space Grotesk', sans-serif; margin-right:2px;}

.checkpoint-card{margin-top:32px; background:var(--surface); border:1.5px solid var(--orange-soft); border-radius:var(--radius); padding:24px; box-shadow:0 0 24px rgba(247,147,26,0.06);}

.live-widget{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px 22px; margin-bottom:8px;}
.live-widget-loading{font-size:13px; color:var(--text-dim);}
.live-widget-head{display:flex; align-items:center; gap:8px; font-family:'JetBrains Mono', monospace; font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--text-dim); margin-bottom:16px;}
.live-dot{width:7px; height:7px; border-radius:50%; background:var(--mastered); box-shadow:0 0 0 3px var(--mastered-soft); animation:live-pulse 2s ease-in-out infinite;}
@keyframes live-pulse{0%,100%{opacity:1;} 50%{opacity:0.4;}}
.live-widget-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:16px;}
.live-stat-label{font-size:11.5px; color:var(--text-faint); margin-bottom:6px; line-height:1.4;}
.live-stat-value{font-family:'Space Grotesk', sans-serif; font-size:22px; font-weight:700; color:var(--orange);}
.live-stat-sub{font-family:'JetBrains Mono', monospace; font-size:10.5px; color:var(--text-faint); margin-top:4px;}
.live-widget-note{margin-top:16px; padding-top:14px; border-top:1px solid var(--border); font-size:11.5px; color:var(--text-faint); font-style:italic;}

/* Purchasing power comparison (Chapter 5) */
.pp-widget{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:22px; margin-bottom:8px;}
.pp-head{font-family:'JetBrains Mono', monospace; font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--text-dim); margin-bottom:18px;}
.pp-row{display:flex; align-items:center; gap:16px; margin-bottom:14px;}
.pp-row:last-of-type{margin-bottom:4px;}
.pp-label{width:150px; flex-shrink:0; font-size:13px; color:var(--text-dim);}
.pp-bar-track{flex:1; height:34px; background:var(--surface-2); border-radius:8px; overflow:hidden; position:relative;}
.pp-bar-fill{height:100%; border-radius:8px; display:flex; align-items:center; padding-left:12px; font-family:'JetBrains Mono', monospace; font-size:12.5px; font-weight:600; color:#0B0D10; white-space:nowrap; transition:width .5s ease;}
.pp-bar-fill.cash{background:linear-gradient(90deg, var(--dusk), #C94A3F);}
.pp-bar-fill.btc{background:linear-gradient(90deg, var(--orange), #FFC15C);}
.pp-note{font-size:11.5px; color:var(--text-faint); font-style:italic; margin-top:14px; padding-top:14px; border-top:1px solid var(--border); line-height:1.6;}

.checkpoint-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:16px;}
.pill-tag{font-family:'JetBrains Mono', monospace; font-size:10.5px; color:var(--text-faint); background:var(--surface-2); border:1px solid var(--border); padding:3px 9px; border-radius:12px;}
.checkpoint-label{font-family:'JetBrains Mono', monospace; font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--amber);}
.checkpoint-q{font-size:15px; font-weight:500; margin-bottom:16px; line-height:1.5;}
.quiz-options{display:flex; flex-direction:column; gap:8px;}
.quiz-opt{padding:12px 16px; background:var(--surface-2); border:1px solid var(--border); border-radius:9px; font-size:14px; color:var(--text-dim); cursor:pointer;}
.quiz-opt:hover{border-color:var(--orange); color:var(--text);}
.quiz-opt.correct{border-color:var(--mastered); background:var(--mastered-soft); color:var(--text);}
.quiz-opt.incorrect{border-color:var(--dusk); color:var(--text);}
.quiz-opt.disabled{pointer-events:none;}
.decision-note{margin-top:18px; display:flex; gap:10px; font-size:13px; color:var(--text-dim); line-height:1.6;}

.mining-anim{margin-top:16px; padding:14px 16px; background:var(--surface-2); border:1px solid var(--border); border-radius:9px; display:flex; align-items:center; justify-content:space-between; gap:14px;}
.mining-hash{font-family:'JetBrains Mono', monospace; font-size:13px; color:var(--orange); letter-spacing:1px;}
.mining-label{display:flex; align-items:center; gap:7px; font-size:11.5px; color:var(--text-faint); white-space:nowrap;}
.mining-dot{width:6px; height:6px; border-radius:50%; background:var(--orange); animation:live-pulse 0.8s ease-in-out infinite;}
.continue-btn{margin-top:18px; padding:11px 22px; background:var(--orange); border:none; border-radius:9px; color:#181008; font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:13px; cursor:pointer;}
.no-quiz-note{margin-top:24px; font-size:13px; color:var(--text-dim);}

.cert-wrap{display:flex; flex-direction:column; align-items:center; margin-top:20px;}
.cert-card{
  width:100%; max-width:640px; background:linear-gradient(160deg, var(--surface), #1a1410);
  border:2px solid var(--orange); border-radius:20px; padding:44px 40px; text-align:center;
  box-shadow:0 0 50px rgba(247,147,26,0.15); position:relative; overflow:hidden;
}
.cert-top-bar{height:5px; background:linear-gradient(90deg, var(--orange), var(--mastered), var(--orange)); border-radius:3px; margin:-44px -40px 28px;}
.cert-block-label{font-family:'JetBrains Mono', monospace; font-size:11px; letter-spacing:.12em; color:var(--orange); margin-bottom:18px;}
.cert-name{font-family:'Space Grotesk', sans-serif; font-size:38px; font-weight:700; color:var(--text); margin-bottom:6px;}
.cert-sub{font-size:14px; color:var(--text-dim); margin-bottom:32px;}
.cert-stats{display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; margin-bottom:28px;}
.cert-stat-value{font-family:'Space Grotesk', sans-serif; font-size:20px; font-weight:700; color:var(--orange);}
.cert-stat-label{font-size:11px; color:var(--text-faint); margin-top:4px;}
.cert-hash{font-family:'JetBrains Mono', monospace; font-size:10.5px; color:var(--text-faint); letter-spacing:1px; word-break:break-all; border-top:1px solid var(--border); padding-top:16px; margin-bottom:10px;}
.cert-footer{font-size:11px; color:var(--text-faint);}
.cert-note{font-size:12.5px; color:var(--text-dim); margin-top:16px; text-align:center;}

@media print{
  .rail, .topbar, .fab-ask, .cert-note, #cert-print-btn{display:none !important;}
  body, .app, .main, .view, .course-wrap{background:#fff !important; padding:0 !important; margin:0 !important;}
  .cert-card{border-color:#F7931A !important; box-shadow:none !important; color:#000 !important;}
  .cert-name, .cert-stat-value{color:#000 !important;}
}

.book-wrap{max-width:820px; margin:0 auto; padding:44px 32px 100px;}
.book-title{font-family:'Space Grotesk', sans-serif; font-size:42px; font-weight:700; margin-bottom:6px;}
.book-sub{font-size:13px; color:var(--text-dim); margin-bottom:36px;}
.book-chapter{margin-bottom:52px;}
.book-chapter-head{
  border-bottom:2px solid var(--orange); padding:20px 18px 14px 4px; margin-bottom:24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='90' viewBox='0 0 220 90'%3E%3Cg fill='none' stroke='%23F7931A' stroke-width='1' opacity='0.08'%3E%3Cpath d='M0 20 H60 V50 H140 V20 H220'/%3E%3Ccircle cx='60' cy='20' r='3'/%3E%3Ccircle cx='140' cy='50' r='3'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: top right;
}
.book-chapter-eyebrow{font-family:'JetBrains Mono', monospace; font-size:11px; color:var(--orange); text-transform:uppercase; letter-spacing:.08em; margin-bottom:6px;}
.book-chapter-title{font-family:'Space Grotesk', sans-serif; font-size:26px; font-weight:700;}
.book-section{
  margin-bottom:28px; padding:24px 26px; background:var(--surface); border:1.5px solid var(--orange);
  clip-path:polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}
.book-section-title{font-family:'Space Grotesk', sans-serif; font-size:17px; font-weight:600; margin-bottom:8px; display:flex; align-items:baseline; gap:8px;}
.book-section-title .num{color:var(--orange); font-family:'JetBrains Mono', monospace; font-size:14px;}
.book-activity{font-size:11.5px; color:var(--amber); font-style:italic; margin-bottom:10px;}
.book-body{font-size:20px; line-height:1.7; color:#D5D2CB; white-space:pre-line;}
.book-toc{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px 24px; margin-bottom:40px;}
.book-toc h3{font-family:'Space Grotesk', sans-serif; font-size:13px; margin-bottom:12px; color:var(--text-dim);}
.book-toc a{display:block; font-size:13px; color:var(--text-dim); text-decoration:none; padding:4px 0;}
.book-toc a:hover{color:var(--orange);}

.live-wrap{max-width:980px; margin:0 auto; padding:56px 32px 60px;}
.live-header{text-align:center; margin-bottom:44px;}
.live-header-badge{
  display:inline-flex; align-items:center; gap:8px; font-family:'JetBrains Mono', monospace; font-size:11px;
  color:var(--mastered); background:var(--mastered-soft); padding:6px 16px; border-radius:20px; margin-bottom:18px;
  letter-spacing:.1em;
}
.live-title{font-family:'Space Grotesk', sans-serif; font-size:44px; font-weight:700; margin-bottom:10px;}
.live-sub{font-size:14px; color:var(--text-dim); max-width:520px; margin:0 auto;}
.live-grid{display:grid; grid-template-columns:repeat(2, 1fr); gap:16px;}
.live-card{background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:26px 28px; transition:border-color .2s ease;}
.live-card:hover{border-color:var(--orange);}
.live-card-wide{grid-column:1 / -1; background:linear-gradient(135deg, var(--surface), var(--surface-2)); border-color:var(--orange); box-shadow:0 0 30px rgba(247,147,26,0.12);}
.live-card-label{font-family:'JetBrains Mono', monospace; font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-faint); margin-bottom:10px;}
.live-card-value{font-family:'Space Grotesk', sans-serif; font-size:40px; font-weight:700; color:var(--text); line-height:1.1;}
.live-price{color:var(--orange); font-size:52px;}
.halving-card{background:linear-gradient(135deg, var(--surface), #1a1410); border-color:var(--amber); box-shadow:0 0 30px rgba(251,191,36,0.1);}
.halving-value{font-family:'JetBrains Mono', monospace; color:var(--amber); font-size:36px; letter-spacing:1px;}
.live-card-sub{font-size:12.5px; color:var(--text-dim); margin-top:8px;}
.live-mono{font-family:'JetBrains Mono', monospace;}
.live-unit{font-size:16px; color:var(--text-faint); font-weight:500;}
.live-footer{text-align:center; font-size:11.5px; color:var(--text-faint); font-style:italic; margin-top:32px;}
@media (max-width: 640px){ .live-grid{grid-template-columns:1fr;} .live-title{font-size:32px;} .live-price{font-size:38px;} .halving-value{font-size:26px;} }

.dash-wrap{max-width:920px; margin:0 auto; padding:44px 32px 60px;}
h1.dash-title{font-family:'Space Grotesk', sans-serif; font-size:42px; font-weight:700; margin-bottom:6px;}
.sats-earned-card{
  display:flex; align-items:center; gap:16px; background:var(--surface); border:1px solid var(--orange);
  border-radius:var(--radius); padding:18px 22px; margin-bottom:28px; box-shadow:0 0 0 3px var(--orange-soft);
}
.sats-earned-icon{font-size:28px; flex-shrink:0;}
.sats-earned-value{font-family:'Space Grotesk', sans-serif; font-size:20px; font-weight:700; color:var(--orange);}
.sats-earned-sub{font-size:12.5px; color:var(--text-dim); margin-top:2px;}
.dash-sub{font-size:13px; color:var(--text-dim); margin-bottom:28px;}

.path-wrap{position:relative; padding:20px 0 60px; margin-bottom:20px;}
.path-svg{position:absolute; top:0; left:0; z-index:0; pointer-events:none;}
.path-node{
  position:relative; z-index:1; display:flex; align-items:flex-start;
  width:min(78%, 340px); margin-bottom:54px; cursor:pointer;
}
.path-node.left{margin-left:0;}
.path-node.right{margin-left:auto; justify-content:flex-end;}

.path-bubble{
  position:relative; width:100%; background:var(--surface); border:1.5px solid var(--border);
  border-radius:14px; padding:16px 16px 14px; transition:transform .15s ease, box-shadow .15s ease;
  overflow:visible;
}
.path-node:hover .path-bubble{transform:translateY(-2px);}
.path-bubble-bar{height:4px; border-radius:3px; background:var(--border); margin-bottom:14px;}
.path-bubble.in_progress .path-bubble-bar{background:var(--orange);}
.path-bubble.mastered .path-bubble-bar{background:var(--mastered);}
.path-bubble.in_progress{border-color:var(--orange); box-shadow:0 0 0 3px var(--orange-soft);}
.path-bubble.mastered{border-color:var(--mastered); box-shadow:0 0 0 3px var(--mastered-soft), 0 0 16px rgba(63,206,142,0.25);}

.path-bubble-tail{
  position:absolute; bottom:-9px; left:28px; width:18px; height:18px;
  background:var(--surface); border-right:1.5px solid var(--border); border-bottom:1.5px solid var(--border);
  transform:rotate(45deg); border-radius:0 0 3px 0;
}
.path-bubble.in_progress .path-bubble-tail{border-color:var(--orange);}
.path-bubble.mastered .path-bubble-tail{border-color:var(--mastered);}
.path-node.right .path-bubble-tail{left:auto; right:28px;}

.path-coin{
  width:44px; height:44px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center;
  font-size:18px; font-weight:700; font-family:'Space Grotesk', sans-serif; color:#0B0D10;
  background:var(--surface-3); border:2px solid var(--border); margin-bottom:10px;
}
.path-coin.locked{background:var(--surface-3); color:var(--text-faint); border-color:var(--border);}
.path-coin.in_progress{background:linear-gradient(135deg, var(--orange), #C9720F); color:#0B0D10; border-color:var(--orange);}
.path-coin.mastered{background:linear-gradient(135deg, var(--mastered), #22A96B); color:#062015; border-color:var(--mastered);}
.path-node-label{font-size:13.5px; font-weight:600; color:var(--text); line-height:1.4;}
.path-node-num{display:block; font-family:'JetBrains Mono', monospace; font-size:10.5px; font-weight:500; color:var(--orange); text-transform:uppercase; letter-spacing:.06em; margin-bottom:4px;}

.chapter-card{background:var(--surface); border:1.5px solid var(--orange-soft); border-radius:var(--radius); padding:18px 20px; margin-bottom:14px;}
.chapter-card-head{display:flex; justify-content:space-between; align-items:center; margin-bottom:12px;}
.chapter-card-head h3{font-family:'Space Grotesk', sans-serif; font-size:15px;}
.chapter-card-head span{font-family:'JetBrains Mono', monospace; font-size:11px; color:var(--text-dim);}
.chip-row{display:flex; flex-wrap:wrap; gap:3px; align-items:center; padding:6px 0;}
.chip{
  width:28px; height:28px; border-radius:6px; display:flex; align-items:center; justify-content:center;
  font-family:'JetBrains Mono',monospace; font-size:9px; cursor:default; position:relative; z-index:1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.chip:not(:first-child)::before{
  content:''; position:absolute; left:-5px; top:50%; transform:translateY(-50%);
  width:5px; height:2px; background:var(--locked); z-index:0;
}
.chip.mastered:not(:first-child)::before{background:var(--mastered);}
.chip.reinforced:not(:first-child)::before{background:var(--amber);}
.chip.in_progress:not(:first-child)::before{background:var(--orange);}
.chip.mastered{box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 0 0 1px var(--mastered), 0 0 8px rgba(63,206,142,0.35);}
.chip.locked{background:var(--surface-3); color:var(--text-faint);}
.chip.in_progress{background:var(--orange-soft); color:var(--orange); border:1.5px solid var(--orange);}
.chip.mastered{background:var(--mastered-soft); color:var(--mastered);}
.chip.reinforced{background:rgba(251,191,36,0.12); color:var(--amber);}

::-webkit-scrollbar{width:8px;}
::-webkit-scrollbar-thumb{background:var(--surface-3); border-radius:4px;}

/* ---- Postgrad library ---- */
.pg-wrap{max-width:860px; margin:0 auto; padding:44px 32px 80px;}
.pg-list{display:flex; flex-direction:column; gap:14px;}
.pg-book{display:flex; justify-content:space-between; gap:20px; align-items:center; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px 22px;}
.pg-book-main h3{font-family:'Space Grotesk',sans-serif; font-size:18px; margin-bottom:2px;}
.pg-book-author{font-size:12px; color:var(--text-faint);}
.pg-book-desc{font-size:13px; color:var(--text-dim); line-height:1.5; margin-top:8px;}
.pg-book-side{display:flex; flex-direction:column; align-items:flex-end; gap:10px; flex-shrink:0;}
.pg-book-side .continue-btn{margin-top:0;}
.chip.book-chip{width:auto; height:auto; padding:5px 10px; font-size:10.5px; white-space:nowrap;}
.chip.unread{background:var(--surface-3); color:var(--text-faint);}
.chip.completed{background:var(--mastered-soft); color:var(--mastered);}
.chip.failed{background:rgba(248,113,113,0.12); color:#f87171;}
.pg-back{background:none; border:none; color:var(--text-dim); font-size:13px; cursor:pointer; margin-bottom:16px; padding:0;}
.pg-back:hover{color:var(--orange);}
.pdf-frame-wrap{border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; background:var(--surface);}
.pdf-frame{width:100%; height:72vh; border:0; display:block;}
.pg-hint{font-size:12px; color:var(--text-faint); margin-top:10px;}
.pg-hint a{color:var(--orange);}
.pg-text{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:28px; font-size:17px; line-height:1.75; color:#D5D2CB; white-space:pre-wrap;}
.pg-test-cta{margin-top:28px;}
.pg-secondary{background:var(--surface-3); color:var(--text);}
.pg-result{padding:16px 20px; border-radius:var(--radius); font-size:14px; line-height:1.6; margin-bottom:16px; border:1px solid var(--border);}
.pg-result.completed{background:var(--mastered-soft); color:var(--mastered); border-color:var(--mastered);}
.pg-result.failed{background:rgba(248,113,113,0.1); color:#f87171; border-color:#f87171;}
.chip.book-chip::before{display:none !important;}
@media (max-width:700px){ .pg-book{flex-direction:column; align-items:flex-start;} .pg-book-side{align-items:flex-start;} }
