/* Polyglot AI 5.4 — Scientific Feature Architecture */
:root{
  --v54-bg:#0c1528;
  --v54-panel:#14233f;
  --v54-panel-2:#192b4b;
  --v54-text:#f7f9ff;
  --v54-soft:#9eafca;
  --v54-line:rgba(255,255,255,.105);
  --v54-primary:#7c5cff;
  --v54-cyan:#35bdf3;
  --v54-green:#31d29c;
  --v54-amber:#f6bd48;
  --v54-danger:#fb7185;
  --v54-safe:env(safe-area-inset-bottom,0px);
}

/* The 5.4 information architecture replaces only navigation and dashboard framing. */
.v53-nav,.v53-mobile-nav{display:none!important}
.v54-original-sidebar{display:none!important}
body.v54-hub-open{overflow:hidden!important}

.v54-desktop-nav{
  width:214px;min-width:214px;align-self:stretch;position:sticky;top:78px;height:calc(100vh - 94px);
  border:1px solid var(--v54-line);border-radius:20px;background:linear-gradient(165deg,rgba(25,43,75,.96),rgba(12,22,41,.97));
  padding:12px;display:flex;flex-direction:column;gap:6px;overflow:auto;box-shadow:0 18px 48px rgba(0,0,0,.22)
}
.v54-nav-brand{padding:8px 9px 13px;border-bottom:1px solid var(--v54-line);margin-bottom:4px}
.v54-nav-brand small{display:block;color:#8fa3c5;font-size:9px;letter-spacing:.14em;font-weight:800}
.v54-nav-brand b{display:block;color:#fff;font-size:15px;margin-top:5px}
.v54-desktop-nav>button,.v54-mobile-nav>button{
  border:0;background:transparent;color:#9eafca;cursor:pointer;font:inherit;font-weight:750
}
.v54-desktop-nav>button{min-height:46px;border-radius:13px;padding:8px 10px;display:grid;grid-template-columns:29px 1fr;gap:8px;align-items:center;text-align:left}
.v54-desktop-nav>button:hover{background:rgba(255,255,255,.045);color:#fff}
.v54-desktop-nav>button.active{color:#fff;background:linear-gradient(145deg,rgba(124,92,255,.31),rgba(53,189,243,.09));box-shadow:inset 0 0 0 1px rgba(180,164,255,.27)}
.v54-nav-icon{width:28px;height:28px;border-radius:10px;display:grid;place-items:center;background:rgba(255,255,255,.055);font-size:16px}
.v54-desktop-nav>button span:last-child{display:flex;flex-direction:column;gap:2px}
.v54-desktop-nav>button b{font-size:12px;line-height:1.15}
.v54-desktop-nav>button small{font-size:8px;color:#7586a6;line-height:1.2;font-weight:650}
.v54-desktop-nav>button.active small{color:#b9c7df}
.v54-nav-cycle{margin-top:auto;border:1px solid var(--v54-line);border-radius:15px;padding:10px;background:rgba(255,255,255,.035)}
.v54-nav-cycle strong{display:block;font-size:10px;color:#fff;margin-bottom:7px}
.v54-nav-cycle div{display:flex;align-items:center;gap:4px;color:#6f82a4;font-size:8px}
.v54-nav-cycle i{flex:1;height:3px;border-radius:99px;background:linear-gradient(90deg,var(--v54-primary),var(--v54-cyan),var(--v54-green));opacity:.75}

.v54-mobile-nav{display:none}

/* Scientific dashboard */
.v54-dashboard{display:flex;flex-direction:column;gap:12px;margin-bottom:14px}
.v54-dashboard-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:2px 2px 4px}
.v54-dashboard-head small{color:#a99aff;font-size:9px;letter-spacing:.14em;font-weight:850}
.v54-dashboard-head h1{font-size:30px;line-height:1.13;margin:6px 0 6px;letter-spacing:-.035em}
.v54-dashboard-head p{margin:0;color:var(--v54-soft);font-size:12px;line-height:1.6;max-width:720px}
.v54-cycle{
  display:grid;grid-template-columns:repeat(7,auto);align-items:center;justify-content:center;gap:8px;
  border:1px solid var(--v54-line);border-radius:17px;padding:10px 14px;background:rgba(255,255,255,.035)
}
.v54-cycle button{border:0;background:transparent;color:#8193b2;cursor:pointer;display:flex;align-items:center;gap:7px;padding:5px 7px;border-radius:11px}
.v54-cycle button:hover{background:rgba(255,255,255,.045);color:#fff}
.v54-cycle button span{width:26px;height:26px;border-radius:9px;display:grid;place-items:center;background:rgba(255,255,255,.055);font-size:11px;font-weight:900}
.v54-cycle button b{font-size:10px;white-space:nowrap}
.v54-cycle>i{width:18px;height:1px;background:rgba(255,255,255,.16)}
.v54-cycle button:first-child{color:#fff;background:rgba(124,92,255,.14)}
.v54-cycle button:first-child span{background:var(--v54-primary)}

.v54-next-card{
  display:grid;grid-template-columns:54px minmax(0,1fr) auto;gap:14px;align-items:center;
  border:1px solid rgba(174,157,255,.25);border-radius:21px;padding:17px;
  background:linear-gradient(145deg,rgba(124,92,255,.18),rgba(53,189,243,.055));box-shadow:0 14px 38px rgba(0,0,0,.18)
}
.v54-next-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(145deg,var(--v54-primary),#5146e9);font-size:23px}
.v54-next-copy small{font-size:9px;letter-spacing:.13em;color:#a99aff;font-weight:850}
.v54-next-copy h2{font-size:21px;margin:5px 0 4px}
.v54-next-copy p{font-size:11px;color:var(--v54-soft);margin:0}
.v54-next-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:9px}.v54-next-meta span{font-size:9px;color:#b8c6dd;border:1px solid var(--v54-line);border-radius:999px;padding:5px 8px;background:rgba(255,255,255,.035)}
.v54-primary-action{height:43px;border:0;border-radius:13px;padding:0 17px;background:linear-gradient(135deg,var(--v54-primary),#5247e9);color:#fff;font-weight:850;cursor:pointer;white-space:nowrap}

.v54-dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.v54-dashboard-card{border:1px solid var(--v54-line);border-radius:17px;background:rgba(255,255,255,.035);padding:13px;display:grid;grid-template-columns:38px 1fr 18px;gap:10px;align-items:center;color:#fff;text-align:left;cursor:pointer}
.v54-dashboard-card:hover{background:rgba(255,255,255,.055)}
.v54-dashboard-card>span{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;background:rgba(255,255,255,.06);font-size:17px}
.v54-dashboard-card small{display:block;color:#899bb9;font-size:8px;letter-spacing:.11em;font-weight:850}
.v54-dashboard-card b{display:block;font-size:12px;margin-top:4px}.v54-dashboard-card p{font-size:9px;color:#9eafca;margin:3px 0 0}.v54-dashboard-card em{font-style:normal;color:#788ba9;font-size:18px}
.v54-details-row{display:flex;justify-content:center}.v54-details-row button{border:1px solid var(--v54-line);background:rgba(255,255,255,.035);color:#b8c5da;border-radius:12px;min-height:38px;padding:0 14px;cursor:pointer;font-size:11px;font-weight:750}
.v54-details-open .v53-hidden-dashboard{display:block!important}
.v54-details-open>.v53-home-heading,.v54-details-open>.v53-primary,.v54-details-open>.v53-home-grid,.v54-details-open>.v53-home-quick,.v54-details-open>.v53-details-toggle{display:none!important}

/* Hide 5.3 dashboard replacement, retain underlying detail panels on demand. */
.v54-ready .v53-dashboard>.v53-home-heading,
.v54-ready .v53-dashboard>.v53-primary,
.v54-ready .v53-dashboard>.v53-home-grid,
.v54-ready .v53-dashboard>.v53-home-quick,
.v54-ready .v53-dashboard>.v53-details-toggle{display:none!important}
.v54-ready .v53-dashboard:not(.v54-details-open)>.v53-hidden-dashboard{display:none!important}

/* Group hub */
.v54-overlay{position:fixed;inset:0;z-index:3600;background:rgba(2,7,18,.76);backdrop-filter:blur(14px);display:grid;place-items:center;padding:16px}
.v54-hub{width:min(920px,96vw);max-height:90vh;overflow:auto;border:1px solid rgba(255,255,255,.14);border-radius:25px;background:linear-gradient(160deg,#1a2c4d,#0f192e);box-shadow:0 36px 110px rgba(0,0,0,.62);padding:16px}
.v54-hub-head{display:grid;grid-template-columns:46px 1fr 40px;gap:12px;align-items:start;padding:4px 4px 14px;border-bottom:1px solid var(--v54-line)}
.v54-stage-icon{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(145deg,rgba(124,92,255,.35),rgba(53,189,243,.12));font-size:20px}
.v54-hub-head small{font-size:8px;letter-spacing:.14em;color:#a99aff;font-weight:850}.v54-hub-head h2{font-size:24px;margin:4px 0}.v54-hub-head p{font-size:11px;color:var(--v54-soft);margin:0;line-height:1.55}.v54-close{width:38px;height:38px;border:1px solid var(--v54-line);border-radius:12px;background:rgba(255,255,255,.045);color:#fff;font-size:20px;cursor:pointer}
.v54-principle{margin:11px 3px 0;border:1px solid rgba(53,189,243,.15);border-radius:12px;background:rgba(53,189,243,.055);padding:9px 11px;color:#b7c8e1;font-size:10px}.v54-principle b{color:#fff}
.v54-hub-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding-top:12px}
.v54-hub-item{min-height:92px;border:1px solid var(--v54-line);border-radius:16px;background:rgba(255,255,255,.035);color:#fff;padding:11px;display:grid;grid-template-columns:39px 1fr 17px;gap:10px;align-items:center;text-align:left;cursor:pointer}
.v54-hub-item:hover{border-color:rgba(174,157,255,.32);background:rgba(124,92,255,.08)}
.v54-hub-item>span{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:rgba(255,255,255,.055);font-size:18px}.v54-hub-item small{display:block;color:#8fa1bf;font-size:8px;letter-spacing:.08em;font-weight:750}.v54-hub-item b{display:block;font-size:12px;margin:4px 0}.v54-hub-item p{font-size:9px;color:#9eafca;line-height:1.45;margin:0}.v54-hub-item em{font-style:normal;color:#7486a4;font-size:18px}

/* Page context: tells the user why the page belongs here. */
.v54-context{display:flex;align-items:center;gap:8px;margin:0 0 9px;padding:7px 10px;border:1px solid var(--v54-line);border-radius:12px;background:rgba(255,255,255,.028);color:#9aabc6;font-size:9px}.v54-context b{color:#fff;font-size:10px}.v54-context i{width:5px;height:5px;border-radius:50%;background:var(--v54-primary)}

/* Source build helpers */
.guided-principle{display:inline-flex;margin-top:10px;border:1px solid var(--v54-line);border-radius:999px;padding:6px 10px;color:#aebed6;font-size:10px;background:rgba(255,255,255,.035)}
.guided-learning-cycle{display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--v54-line);border-radius:16px;padding:10px;background:rgba(255,255,255,.035)}
.guided-learning-cycle>span{display:flex;align-items:center;gap:5px;width:27px;height:27px;padding:0 9px;border-radius:10px;background:rgba(255,255,255,.055);overflow:hidden;transition:width .2s;color:#fff;font-weight:850}.guided-learning-cycle>span small{white-space:nowrap;font-size:9px}.guided-learning-cycle>span:hover{width:90px}.guided-learning-cycle>span.done{background:rgba(124,92,255,.25)}.guided-learning-cycle>i{color:#6f82a4;font-style:normal}

@media(max-width:980px){
  .v54-desktop-nav{display:none!important}
  body{padding-bottom:calc(76px + var(--v54-safe))!important}
  .app-body{display:block!important;padding-bottom:calc(94px + var(--v54-safe))!important}
  .v54-mobile-nav{position:fixed;left:7px;right:7px;bottom:calc(7px + var(--v54-safe));z-index:3500;height:66px;border:1px solid rgba(255,255,255,.14);border-radius:20px;background:rgba(9,17,33,.98);box-shadow:0 20px 58px rgba(0,0,0,.55);padding:5px;display:grid;grid-template-columns:repeat(5,1fr);gap:3px;backdrop-filter:blur(20px)}
  .v54-mobile-nav>button{min-width:0;border-radius:14px;padding:3px 1px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#8192af;font-size:8px}
  .v54-mobile-nav>button .v54-nav-icon{width:25px;height:24px;background:transparent;font-size:17px}
  .v54-mobile-nav>button small{display:none}.v54-mobile-nav>button b{font-size:8px;white-space:nowrap}
  .v54-mobile-nav>button.active{color:#fff;background:linear-gradient(145deg,rgba(124,92,255,.38),rgba(53,189,243,.09))}
  .v54-dashboard-head h1{font-size:26px}.v54-dashboard-head p{font-size:11px;-webkit-line-clamp:2;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}
  .v54-cycle{justify-content:flex-start;overflow-x:auto;scrollbar-width:none;padding:9px}.v54-cycle::-webkit-scrollbar{display:none}.v54-cycle button{flex:0 0 auto}.v54-cycle>i{flex:0 0 16px}
  .v54-next-card{grid-template-columns:44px 1fr;padding:13px;gap:10px}.v54-next-icon{width:42px;height:42px;border-radius:13px}.v54-next-copy h2{font-size:18px}.v54-next-copy p{font-size:10px}.v54-primary-action{grid-column:1/-1;width:100%}
  .v54-dashboard-grid{grid-template-columns:1fr}.v54-dashboard-card p{display:none}
  .v54-overlay{padding:0;place-items:end center}.v54-hub{width:100%;max-height:91vh;border-radius:24px 24px 0 0;padding:13px 11px calc(17px + var(--v54-safe))}.v54-hub-head{grid-template-columns:40px 1fr 38px}.v54-stage-icon{width:39px;height:39px}.v54-hub-head h2{font-size:21px}.v54-hub-grid{grid-template-columns:1fr}.v54-hub-item{min-height:78px;padding:9px}.v54-hub-item p{display:none}
  .guided-learning-cycle{justify-content:flex-start;overflow-x:auto}.guided-learning-cycle>span{flex:0 0 80px;width:80px}
}
@media(max-width:380px){.v54-mobile-nav{left:4px;right:4px;bottom:calc(4px + var(--v54-safe));height:63px}.v54-mobile-nav>button b{font-size:7.5px}.v54-dashboard-head h1{font-size:23px}}
