*{box-sizing:border-box}
:root{
 --posn-bg:#f5f7fb;--posn-ink:#17202c;--posn-muted:#687386;
 --posn-line:#dfe6ef;--posn-red:#bd1e2c;--posn-gold:#e4b24d;
 font-family:Inter,"Noto Sans Thai",system-ui,sans-serif
}
body.posn-dedicated-page{margin:0;background:var(--posn-bg);color:var(--posn-ink)}
.posn-container{width:min(1240px,calc(100% - 32px));margin:auto}
.posn-dedicated-hero{position:relative;overflow:hidden;min-height:520px;display:grid;align-items:center;color:#fff;background:
linear-gradient(110deg,rgba(7,17,31,.97),rgba(22,37,62,.9) 55%,rgba(62,34,68,.87)),
radial-gradient(circle at 82% 22%,rgba(228,178,77,.28),transparent 30%)}
.posn-dedicated-hero::after{content:"";position:absolute;right:-100px;bottom:-150px;width:540px;height:540px;border-radius:50%;border:90px solid rgba(255,255,255,.035)}
.posn-dedicated-hero .inner{position:relative;z-index:1;padding:70px 0}
.posn-kicker{display:inline-flex;padding:7px 11px;border:1px solid rgba(228,178,77,.4);border-radius:999px;background:rgba(228,178,77,.08);color:#f0c764;font-size:.72rem;font-weight:900;letter-spacing:.14em}
.posn-dedicated-hero h1{max-width:850px;margin:14px 0 15px;font-size:clamp(2.7rem,6vw,5.6rem);line-height:1.02;letter-spacing:-.045em}
.posn-dedicated-hero h1 em{font-style:normal;color:#f0c764}
.posn-dedicated-hero p{max-width:780px;margin:0;color:#d5dce8;line-height:1.75;font-size:1.04rem}
.posn-hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:25px}
.posn-btn{display:inline-flex;align-items:center;justify-content:center;min-height:45px;padding:10px 16px;border-radius:13px;text-decoration:none;font-weight:900}
.posn-btn.primary{background:var(--posn-red);color:#fff;box-shadow:0 10px 27px rgba(189,30,44,.26)}
.posn-btn.ghost{border:1px solid rgba(255,255,255,.24);background:rgba(255,255,255,.06);color:#fff}
.posn-section{padding:58px 0}
.posn-section.white{background:#fff}
.posn-heading{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin-bottom:22px}
.posn-heading small{color:var(--posn-red);font-weight:900;letter-spacing:.13em}
.posn-heading h2{margin:6px 0 5px;font-size:clamp(1.9rem,3vw,2.8rem)}
.posn-heading p{margin:0;color:var(--posn-muted)}
.posn-subject-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.posn-subject-card{position:relative;overflow:hidden;display:grid;grid-template-columns:92px 1fr;gap:18px;padding:21px;border:1px solid var(--posn-line);border-radius:23px;background:#fff;box-shadow:0 12px 34px rgba(15,23,42,.055)}
.posn-subject-card::after{content:"";position:absolute;right:-55px;top:-70px;width:185px;height:185px;border-radius:50%;background:var(--soft)}
.posn-subject-icon{position:relative;z-index:1;display:grid;place-items:center;width:82px;height:82px;border-radius:22px;background:linear-gradient(135deg,var(--color),var(--dark));color:#fff;font-size:2rem;font-weight:1000;box-shadow:0 12px 26px color-mix(in srgb,var(--color) 35%,transparent)}
.posn-subject-copy{position:relative;z-index:1}
.posn-subject-copy small{color:var(--color);font-weight:900;letter-spacing:.11em}
.posn-subject-copy h3{margin:5px 0 7px;font-size:1.4rem}
.posn-subject-copy p{margin:0;color:var(--posn-muted);line-height:1.55}
.posn-subject-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}
.posn-subject-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:9px 13px;border-radius:11px;text-decoration:none;font-weight:900}
.posn-subject-actions .content{background:var(--color);color:#fff}
.posn-subject-actions .exams{border:1px solid color-mix(in srgb,var(--color) 35%,white);background:var(--soft);color:var(--dark)}
.posn-guide{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}
.posn-guide article{display:flex;gap:12px;padding:18px;border:1px solid var(--posn-line);border-radius:18px;background:#fff}
.posn-guide b{display:grid;place-items:center;flex:0 0 45px;height:45px;border-radius:14px;background:#101d31;color:#fff}
.posn-guide h3{margin:2px 0 5px}.posn-guide p{margin:0;color:var(--posn-muted);line-height:1.55}
.posn-subject-hero{padding:42px 0 28px;color:#fff;background:linear-gradient(115deg,#101d31,#273653 62%,var(--dark))}
.posn-subject-hero.exams{background:linear-gradient(115deg,#101d31,#342233 62%,var(--dark))}
.posn-back{display:inline-flex;margin-bottom:17px;color:#d6deea;text-decoration:none;font-weight:800}
.posn-subject-title{display:flex;align-items:center;gap:18px}
.posn-subject-badge{display:grid;place-items:center;flex:0 0 96px;height:96px;border-radius:25px;background:linear-gradient(135deg,var(--color),var(--dark));box-shadow:0 16px 34px rgba(0,0,0,.24);font-size:1.25rem;font-weight:1000}
.posn-subject-title h1{margin:7px 0 6px;font-size:clamp(2.1rem,4.3vw,3.8rem)}
.posn-subject-title p{max-width:790px;margin:0;color:#d5dce8;line-height:1.6}
.posn-page-tabs{display:flex;gap:9px;flex-wrap:wrap;margin-top:23px}
.posn-page-tabs a{display:inline-flex;min-height:42px;align-items:center;padding:9px 14px;border-radius:12px;border:1px solid rgba(255,255,255,.22);color:#fff;text-decoration:none;font-weight:900}
.posn-page-tabs a.active{background:#fff;color:#17202c}
.posn-all-subjects{position:sticky;top:0;z-index:15;border-bottom:1px solid var(--posn-line);background:rgba(255,255,255,.95);backdrop-filter:blur(10px)}
.posn-all-subjects .links{display:flex;gap:7px;overflow:auto;padding:10px 0}
.posn-all-subjects a{white-space:nowrap;padding:8px 11px;border-radius:999px;background:#edf1f6;color:#4c5a70;text-decoration:none;font-size:.78rem;font-weight:900}
.posn-all-subjects a.active{background:var(--color);color:#fff}
.posn-content-layout{display:grid;gap:30px}
.posn-content-group{display:grid;gap:14px}
.posn-group-heading{display:flex;justify-content:space-between;gap:14px;align-items:center}
.posn-group-heading h2{margin:0}.posn-group-heading span{color:var(--posn-muted)}
.posn-resource-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.posn-resource-card{overflow:hidden;border:1px solid var(--posn-line);border-radius:20px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.055)}
.posn-resource-cover{position:relative;aspect-ratio:16/9;background:linear-gradient(135deg,var(--color),var(--dark));background-size:cover;background-position:center}
.posn-resource-cover::after{content:"";position:absolute;inset:0;background:linear-gradient(transparent 35%,rgba(0,0,0,.68))}
.posn-resource-cover span{position:absolute;z-index:1}
.posn-resource-cover .type{top:10px;left:10px;padding:6px 9px;border-radius:999px;background:rgba(10,18,31,.8);color:#fff;font-size:.7rem;font-weight:900}
.posn-resource-cover .fallback{left:14px;bottom:12px;color:#fff;font-size:1.2rem;font-weight:1000}
.posn-resource-body{padding:16px}
.posn-resource-body h3{margin:0 0 7px;font-size:1.1rem;line-height:1.38}
.posn-resource-body p{display:-webkit-box;min-height:48px;margin:0;color:var(--posn-muted);line-height:1.5;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.posn-meta{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}
.posn-meta span{padding:6px 8px;border-radius:999px;background:#f0f3f7;color:#526075;font-size:.7rem;font-weight:800}
.posn-card-footer{display:flex;justify-content:space-between;gap:10px;align-items:center;padding-top:12px;border-top:1px solid var(--posn-line)}
.posn-card-footer small{color:var(--posn-muted)}
.posn-card-footer a{padding:9px 12px;border-radius:11px;background:var(--color);color:#fff;text-decoration:none;font-weight:900}
.posn-filterbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}
.posn-filterbar input,.posn-filterbar select{min-height:43px;padding:9px 12px;border:1px solid var(--posn-line);border-radius:12px;background:#fff}
.posn-filterbar input{min-width:280px;flex:1}
.posn-empty{padding:28px;border:1px dashed #cbd5e1;border-radius:18px;background:#fff;color:var(--posn-muted);text-align:center}
.posn-empty b{display:block;margin-bottom:5px;color:var(--posn-ink)}
.posn-loading{position:fixed;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;gap:10px;background:rgba(15,23,42,.58);color:#fff;backdrop-filter:blur(5px)}
.posn-loading span{width:27px;height:27px;border:3px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite}
.hidden{display:none!important}
@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:950px){.posn-resource-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.posn-guide{grid-template-columns:1fr}.posn-subject-grid{grid-template-columns:1fr}}
@media(max-width:680px){.posn-container{width:min(100% - 20px,1240px)}.posn-dedicated-hero{min-height:500px}.posn-subject-card{grid-template-columns:68px 1fr;padding:16px}.posn-subject-icon{width:64px;height:64px;border-radius:18px;font-size:1.4rem}.posn-resource-grid{grid-template-columns:1fr}.posn-subject-title{align-items:flex-start}.posn-subject-badge{flex-basis:70px;height:70px;border-radius:19px;font-size:.9rem}.posn-filterbar{display:grid;grid-template-columns:1fr 1fr}.posn-filterbar input{grid-column:1/-1;min-width:0}}

/* V10.3.8 live portal additions — preserve the existing POSN visual design */
.posn-expert-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:#1b1630;color:#f2d16e;font-size:.7rem;font-weight:1000;letter-spacing:.06em}
.posn-route-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:22px}.posn-route-card{display:block;padding:22px;border:1px solid var(--posn-line);border-radius:22px;background:#fff;color:var(--posn-ink);text-decoration:none;box-shadow:0 12px 34px rgba(15,23,42,.06);transition:.2s}.posn-route-card:hover{transform:translateY(-3px)}.posn-route-card span{color:var(--subject-color,var(--posn-red));font-size:.72rem;font-weight:1000;letter-spacing:.12em}.posn-route-card h2{margin:8px 0}.posn-route-card p{margin:0;color:var(--posn-muted);line-height:1.6}.posn-route-card b{display:inline-flex;margin-top:15px;padding:9px 13px;border-radius:11px;background:var(--subject-color,var(--posn-red));color:#fff}
.posn-live-home-v1038{padding:62px 0;background:#f5f7fb}.posn-live-home-v1038 .posn-home-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-end;margin-bottom:22px}.posn-live-home-v1038 .posn-home-head small{color:#bd1e2c;font-weight:1000;letter-spacing:.13em}.posn-live-home-v1038 h2{margin:6px 0;font-size:clamp(2rem,3.4vw,3rem)}.posn-live-home-v1038 p{margin:0;color:#687386}.posn-home-subjects{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.posn-home-subject{display:block;padding:17px;border:1px solid #dfe6ef;border-radius:19px;background:#fff;color:#17202c;text-decoration:none;box-shadow:0 10px 28px rgba(15,23,42,.055)}.posn-home-subject .icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,var(--color),var(--dark));color:#fff;font-size:1.25rem}.posn-home-subject h3{margin:12px 0 5px}.posn-home-subject small{color:#687386}.posn-home-subject .links{display:flex;gap:6px;margin-top:12px}.posn-home-subject .links span{padding:6px 8px;border-radius:999px;background:var(--soft);color:var(--dark);font-size:.67rem;font-weight:900}
.posn-live-empty{grid-column:1/-1;padding:28px;border:1px dashed #cbd5e1;border-radius:18px;background:#fff;text-align:center;color:#687386}.posn-level-note{margin:0 0 18px;padding:13px 15px;border:1px solid #eadca9;border-radius:15px;background:#fff8df;color:#6f5d2b}.posn-resource-card[data-level="expert"] .posn-resource-cover .status{background:#1b1630;color:#f2d16e}
@media(max-width:980px){.posn-home-subjects{grid-template-columns:repeat(2,1fr)}}@media(max-width:680px){.posn-route-grid{grid-template-columns:1fr}.posn-home-subjects{grid-template-columns:1fr}.posn-live-home-v1038 .posn-home-head{align-items:stretch;flex-direction:column}}

/* V10.3.9 — restore subject-specific icons without changing card design */
.posn-original-subject-icon{
  display:block;
  width:72%;
  height:72%;
  object-fit:contain;
  filter:drop-shadow(0 5px 8px rgba(0,0,0,.2));
}
.posn-original-subject-icon.compact{width:70%;height:70%}
.posn-subject-glyph{display:grid;place-items:center;width:100%;height:100%;line-height:1}
.posn-inline-subject-icon{width:20px;height:20px;object-fit:contain;vertical-align:middle;margin-right:3px}
.posn-subject-nav a{display:inline-flex;align-items:center;gap:4px}
