/* BAY Hub — UX/UI-first home surface
   Isolated from the shared site styles so inner pages keep their current behavior. */
body.home{
  --home-bg:#f3f9fe;
  --home-surface:#ffffff;
  --home-ink:#10284b;
  --home-muted:#66758b;
  --home-line:#dbe4ef;
  --home-navy:#0b2f63;
  --home-blue:#176de5;
  --home-blue-soft:#edf4ff;
  --home-green:#167651;
  --home-amber:#98620a;
  margin:0;
  min-width:320px;
  color:var(--home-ink);
  background:
    radial-gradient(circle at 8% -5%,rgba(46,168,255,.15),transparent 25rem),
    radial-gradient(circle at 92% 3%,rgba(255,122,26,.10),transparent 22rem),
    var(--home-bg);
  font-family:"Leelawadee UI","Noto Sans Thai","Segoe UI",Tahoma,sans-serif;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body.home a{color:inherit}
body.home :focus-visible{outline:3px solid rgba(42,99,215,.28);outline-offset:3px}

.hub-header{
  position:sticky;
  top:0;
  z-index:50;
  padding-top:env(safe-area-inset-top);
  border-bottom:1px solid rgba(210,221,234,.85);
  background:#fff;
}
.hub-header-inner{
  width:min(1240px,calc(100% - 36px));
  min-height:72px;
  margin:auto;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:24px;
}
.hub-brand{display:inline-flex;align-items:center;gap:11px;text-decoration:none;min-width:max-content}
.hub-brand-mark{
  width:42px;height:42px;display:grid;place-items:center;border-radius:13px;
  background:#fff;border:1px solid #d9e8f6;box-shadow:0 8px 20px rgba(28,72,145,.10);font-size:0;font-weight:950;padding:4px;
}
.hub-brand-copy strong,.hub-brand-copy small{display:block}
.hub-brand-copy strong{font-size:15px;letter-spacing:-.01em}
.hub-brand-copy small{margin-top:1px;color:#7c8ba0;font-size:10px;font-weight:700;letter-spacing:.04em}
.hub-nav{display:flex;justify-content:center;gap:4px}
.hub-nav a{
  min-height:42px;display:inline-flex;align-items:center;padding:8px 12px;border-radius:12px;
  color:#56677e;text-decoration:none;font-size:13px;font-weight:850;white-space:nowrap;
}
.hub-nav a:hover,.hub-nav a.active{color:#173b73;background:#eaf1fb}
.hub-header-action{
  min-height:42px;display:inline-flex;align-items:center;justify-content:center;padding:9px 15px;
  border:1px solid #c9d8eb;border-radius:13px;background:#fff;color:#173b73;text-decoration:none;
  font-size:12px;font-weight:900;box-shadow:0 6px 18px rgba(18,39,72,.05);
}

.home-shell{width:min(1240px,calc(100% - 36px));margin:28px auto 72px}
.home-hero{
  position:relative;overflow:hidden;min-height:500px;display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(330px,.72fr);gap:44px;align-items:center;
  padding:clamp(34px,5vw,64px);border:1px solid #d9e8f6;border-radius:34px;color:var(--home-ink);
  background:
    radial-gradient(circle at 88% 10%,rgba(255,122,26,.12),transparent 18rem),
    radial-gradient(circle at 74% 78%,rgba(46,168,255,.16),transparent 22rem),
    #fff;
  box-shadow:0 28px 72px rgba(15,39,75,.18);
}
.home-hero:before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
  background-size:34px 34px;mask-image:linear-gradient(to bottom,rgba(0,0,0,.65),transparent 88%);
}
.home-hero-copy,.home-pulse{position:relative;z-index:1}
.home-eyebrow{margin:0 0 10px;color:#ff7a1a;font-size:11px;font-weight:950;letter-spacing:.12em}
.home-hero h1{margin:0;max-width:760px;font-size:clamp(48px,6.5vw,78px);line-height:1.16;letter-spacing:-.05em;text-wrap:balance}
.home-hero h1 span{color:#1559a8}
.home-lead{max-width:690px;margin:20px 0 0;color:#647b96;font-size:clamp(15px,1.8vw,18px);line-height:1.8}
.home-hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}
.home-button{
  min-height:50px;display:inline-flex;align-items:center;justify-content:center;padding:10px 18px;
  border-radius:15px;text-decoration:none;font-size:13px;font-weight:900;
}
.home-button.primary{background:#0b2f63;color:#fff;box-shadow:0 12px 28px rgba(11,47,99,.16)}
.home-button.secondary{border:1px solid #d2e2f1;background:#fff;color:#1559a8}
.home-connection{margin-top:18px;padding:10px 13px;border:1px solid rgba(255,255,255,.16);border-radius:13px;background:rgba(255,255,255,.08);font-size:12px;color:#eef5ff}

.home-pulse{
  align-self:stretch;min-height:350px;display:flex;flex-direction:column;justify-content:space-between;
  padding:24px;border:1px solid #d7e8f6;border-radius:28px;
  background:linear-gradient(145deg,#eaf7ff,#fff4e9);
  box-shadow:0 24px 54px rgba(23,67,111,.10);
}
.home-pulse-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.home-pulse-kicker{color:#5a7593;font-size:10px;font-weight:900;letter-spacing:.08em}
.home-status-pill{
  display:inline-flex;align-items:center;gap:7px;min-height:30px;padding:5px 9px;border-radius:999px;
  background:#fff;color:#155f4a;font-size:10px;font-weight:850;
}
.home-status-pill i{width:8px;height:8px;border-radius:50%;background:#a8b3c2;box-shadow:0 0 0 4px rgba(46,168,255,.08)}
.home-status-pill.ok i{background:#66dda6}
.home-status-pill.warn i{background:#ffd36e}
.home-status-pill.bad i{background:#ff8f8f}
.home-pulse-main{display:flex;align-items:flex-start;gap:14px;padding:26px 0}
.home-pulse-icon{
  width:48px;height:48px;display:grid;place-items:center;flex:0 0 auto;border-radius:16px;
  background:rgba(255,255,255,.12);font-size:23px;
}
.home-pulse-main small,.home-pulse-main strong{display:block}
.home-pulse-main small{color:#6f86a0;font-size:10px;font-weight:800}
.home-pulse-main strong{max-width:250px;margin-top:4px;font-size:20px;line-height:1.4}
.home-pulse-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding-top:18px;border-top:1px solid rgba(255,255,255,.14)}
.home-pulse-grid div{min-width:0}
.home-pulse-grid small,.home-pulse-grid strong{display:block}
.home-pulse-grid small{color:#aebfda;font-size:9px;line-height:1.35}
.home-pulse-grid strong{margin-top:4px;font-size:17px;white-space:nowrap}

.home-section{margin-top:42px;scroll-margin-top:100px}
.home-section-head{display:flex;align-items:end;justify-content:space-between;gap:24px;margin:0 3px 17px}
.home-section-head>div>p{margin:0;color:#4e6f99;font-size:11px;font-weight:950;letter-spacing:.05em}
.home-section-head h2{margin:5px 0 2px;font-size:clamp(29px,4vw,39px);line-height:1.18;letter-spacing:-.04em}
.home-section-head>div>span{display:block;margin-top:6px;color:var(--home-muted);font-size:13px}
.home-section-head>a{
  min-height:42px;display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid var(--home-line);
  border-radius:13px;background:#fff;text-decoration:none;color:#35547a;font-size:12px;font-weight:850;
}
.home-section-head.compact{align-items:start}

.front-door-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.front-card{
  position:relative;overflow:hidden;min-height:330px;display:flex;flex-direction:column;justify-content:space-between;
  padding:25px;border:1px solid var(--home-line);border-radius:27px;background:rgba(255,255,255,.94);
  box-shadow:0 15px 38px rgba(18,39,72,.07);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.front-card:before{content:"";position:absolute;left:0;right:0;top:0;height:4px;background:#92b8ef}
.front-card-school:before{background:#f1a04a}.front-card-learn:before{background:#5eb6eb}.front-card-awh:before{background:#ff9b52}.front-card-web:before{background:#62b998}
.front-card:hover{transform:translateY(-2px);border-color:#c5d4e8;box-shadow:0 22px 50px rgba(18,39,72,.11)}
.front-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.front-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:18px;background:#eff5fd;font-size:25px}
.front-card-school .front-icon{background:#fff3e5}.front-card-learn .front-icon{background:#edf8ff}.front-card-awh .front-icon{background:#fff1e4}.front-card-web .front-icon{background:#edf8f3}
.human-badge{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;border-radius:999px;background:#eef4fb;color:#4b6380;font-size:10px;font-weight:850}
.human-badge.soft{background:#fff3e7;color:#9b581e}
.front-product{margin:25px 0 3px;color:#6b7d94;font-size:10px;font-weight:950;letter-spacing:.08em;text-transform:uppercase}
.front-card h3{margin:0;font-size:25px;line-height:1.28;letter-spacing:-.035em}
.front-card>div>p:last-child{margin:10px 0 0;max-width:530px;color:var(--home-muted);font-size:13px;line-height:1.7}
.front-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:24px}
.front-actions.split{display:grid;grid-template-columns:minmax(0,1fr) auto}
.front-primary,.front-secondary{
  min-height:47px;display:inline-flex;align-items:center;justify-content:center;padding:9px 14px;border-radius:14px;
  text-decoration:none;font-size:12px;font-weight:900;text-align:center;
}
.front-primary{background:#163a70;color:#fff;box-shadow:0 10px 22px rgba(21,56,107,.12)}
.front-secondary{border:1px solid #d4deea;background:#f8fafc;color:#35547a}

.today-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.today-card{
  min-height:245px;display:flex;flex-direction:column;padding:22px;border:1px solid var(--home-line);
  border-radius:23px;background:#fff;box-shadow:0 12px 32px rgba(18,39,72,.055);
}
.today-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#eef4fb;color:#315e9d;font-size:16px;font-weight:900}
.today-card small{display:block;margin-top:18px;color:#77869a;font-size:10px;font-weight:900}
.today-card strong{display:block;margin-top:4px;font-size:19px;line-height:1.42}
.today-card p{margin:8px 0 18px;color:var(--home-muted);font-size:12px;line-height:1.6}
.today-card a{margin-top:auto;color:#2d5cad;text-decoration:none;font-size:11px;font-weight:900}
.today-status-card .today-icon{background:#edf8f2;color:#20805c}

.home-help-band{
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:26px;padding:28px 30px;
  border-radius:28px;background:#10294f;color:#fff;box-shadow:0 20px 50px rgba(15,39,75,.14);
}
.home-help-band p{margin:0;color:#9ab9e3;font-size:10px;font-weight:900;letter-spacing:.06em}
.home-help-band h2{margin:4px 0;font-size:30px;letter-spacing:-.035em}
.home-help-band span{color:#c9d7e9;font-size:13px}
.home-help-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.home-help-actions a{
  min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:8px 13px;border-radius:13px;
  border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08);color:#fff;text-decoration:none;font-size:11px;font-weight:850;
}

.home-technical{margin:18px 2px 0;color:#6d7c90;font-size:11px}
.home-technical summary{width:max-content;cursor:pointer;color:#596d87;font-weight:800}
.home-technical p{max-width:850px;line-height:1.65}
.home-footer{
  width:min(1240px,calc(100% - 36px));margin:0 auto;padding:20px 0 calc(30px + env(safe-area-inset-bottom));
  border-top:1px solid #d9e2ed;color:#7b899d;text-align:center;font-size:10px;
}
.home-footer strong,.home-footer span{display:block}
.home-footer strong{color:#40546d;font-size:12px}
.home-footer span{margin-top:3px}

@media(max-width:1000px){
  .hub-header-inner{grid-template-columns:auto 1fr}.hub-header-action{display:none}
  .hub-nav{justify-content:flex-end}
  .home-hero{grid-template-columns:1fr;min-height:0}.home-pulse{min-height:290px}
  .today-grid{grid-template-columns:1fr 1fr}.today-card:last-child{grid-column:1/-1}
}
@media(max-width:760px){
  .hub-header-inner{width:min(100% - 24px,680px);min-height:auto;grid-template-columns:1fr;padding:10px 0 9px;gap:8px}
  .hub-brand{justify-self:start}.hub-brand-mark{width:38px;height:38px;border-radius:12px}
  .hub-nav{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
  .hub-nav a{justify-content:center;min-width:0;padding-inline:4px;font-size:11px}
  .home-shell{width:min(100% - 20px,680px);margin-top:13px}
  .home-hero{padding:30px 21px;border-radius:26px;gap:26px}
  .home-hero h1{font-size:clamp(42px,13vw,58px);line-height:1.16}
  .home-lead{font-size:14px;line-height:1.72}
  .home-pulse{padding:20px;border-radius:22px}
  .home-section{margin-top:32px}
  .home-section-head{align-items:flex-start;flex-direction:column;gap:12px}
  .front-door-grid{grid-template-columns:1fr}
  .front-card{min-height:300px;padding:21px;border-radius:23px}
  .today-grid{grid-template-columns:1fr}.today-card:last-child{grid-column:auto}
  .home-help-band{grid-template-columns:1fr;padding:24px 21px;border-radius:23px}
  .home-help-actions{justify-content:flex-start}
  .home-footer{width:calc(100% - 24px)}
}
@media(max-width:480px){
  .home-hero{padding:27px 18px}.home-eyebrow{font-size:9.5px}
  .home-hero-actions{display:grid;grid-template-columns:1fr}.home-button{width:100%}
  .home-pulse-grid strong{font-size:15px}.home-pulse-grid small{font-size:8.5px}
  .front-actions.split{grid-template-columns:1fr}.front-primary,.front-secondary{width:100%}
  .home-section-head h2{font-size:29px}.front-card h3{font-size:23px}
  .home-help-actions{display:grid;grid-template-columns:1fr;width:100%}.home-help-actions a{width:100%}
}
@media(prefers-reduced-motion:reduce){
  body.home *{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}

/* UX closure — task-first front door */
.home-pulse{min-height:280px}
.home-pulse-main{padding:28px 0 18px}
.home-pulse-link{min-height:46px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;border:1px solid rgba(255,255,255,.16);border-radius:14px;background:#fff;color:#0b2f63;text-decoration:none;font-size:12px;font-weight:900}
.home-pulse-link:hover,.home-pulse-link:focus-visible{background:rgba(255,255,255,.14)}
.front-card{min-height:290px}
.front-card h3{margin:26px 0 0}
.front-card .front-card-top + div p{margin-top:10px}
.front-primary,.front-secondary,.home-help-actions a,.hub-nav a,.hub-header-action,.home-button{min-height:48px}
.front-card:focus-within{border-color:#b8cbed;box-shadow:0 22px 50px rgba(28,54,92,.12)}
.home-admin-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.home-admin-links a{min-height:42px;display:inline-flex;align-items:center;padding:8px 11px;border:1px solid var(--home-line);border-radius:12px;background:#fff;color:#405b7c;text-decoration:none;font-size:11px;font-weight:850}
.home-technical[open]{padding:14px 0 4px}
@media(max-width:760px){
  .home-pulse{min-height:240px}
  .front-card{min-height:270px}
  .front-card h3{margin-top:22px}
}
@media(max-width:420px){
  .hub-nav a{font-size:10px;padding-inline:2px}
  .hub-brand-copy strong{font-size:14px}
  .hub-brand-copy small{font-size:9px}
  .home-hero h1{font-size:clamp(40px,12.5vw,52px)}
  .home-pulse-head{align-items:flex-start;flex-direction:column}
  .front-card{padding:19px}
}

/* Preserve explicit action contrast against body.home link inheritance. */
body.home .front-primary{color:#fff}
body.home .front-secondary{color:#35547a}
body.home .home-help-actions a{color:#fff}
body.home .home-pulse-link{color:#0b2f63}
body.home .home-button.primary{color:#fff}
body.home .home-button.secondary{color:#1559a8}
.home-technical summary{min-height:44px;display:inline-flex;align-items:center}
.home-admin-links a{min-height:44px}

.hub-brand-mark img,.front-icon img{width:100%;height:100%;object-fit:contain}.front-icon{padding:8px}.home-pulse-main{align-items:center}.home-pulse-mascot{width:150px;height:150px;object-fit:contain;filter:drop-shadow(0 16px 24px rgba(11,47,99,.12))}.home-pulse-main>div{min-width:0}.home-pulse-link{border-color:#cfe2f2!important;background:#fff!important;color:#0b2f63!important}.home-status-pill{border:1px solid #d7e8f6}.home-pulse-head{color:#0b2f63}@media(max-width:480px){.home-pulse-mascot{width:112px;height:112px}}
