*{box-sizing:border-box}
.app-shell{display:grid;grid-template-rows:62px minmax(0,1fr);min-height:100vh}
.app-topbar{position:sticky;z-index:1000;top:0;height:62px;display:flex;align-items:center;gap:28px;background:linear-gradient(100deg,#07375d,#032b4d);padding:0 28px;color:#fff;box-shadow:0 1px 0 rgba(255,255,255,.08),0 3px 15px rgba(7,38,65,.11)}
.app-brand{display:flex;align-items:center;gap:9px;color:#fff;text-decoration:none}
.app-brand img{width:42px;height:42px;border-radius:50%}
.app-brand strong{font:800 15px/.92 Inter,system-ui,sans-serif;letter-spacing:.04em;text-transform:uppercase}
.topbar-about-mobile{display:none}
.topbar-primary{display:flex;align-self:stretch}
.topbar-primary a{position:relative;display:flex;align-items:center;padding:0 20px;color:#e9f1f7;text-decoration:none;font:700 14px Inter,system-ui,sans-serif}
.topbar-primary a:hover,.topbar-primary a.active{background:rgba(255,255,255,.07);color:#fff}
.topbar-primary a.active:after{content:"";position:absolute;right:16px;bottom:0;left:16px;height:3px;border-radius:3px 3px 0 0;background:#1f88ff}
.topbar-more{position:relative;align-self:stretch}
.topbar-more>summary{display:flex;height:100%;align-items:center;gap:7px;padding:0 15px;color:#e9f1f7;font:700 14px Inter,system-ui,sans-serif;cursor:pointer;list-style:none}
.topbar-more>summary::-webkit-details-marker{display:none}
.topbar-more:hover>summary,.topbar-more[open]>summary,.topbar-more.active>summary{background:rgba(255,255,255,.07);color:#fff}
.topbar-more-menu{position:absolute;top:54px;left:0;width:270px;display:grid;gap:2px;border:1px solid #d6e1eb;border-radius:11px;background:#fff;padding:9px;box-shadow:0 18px 45px rgba(10,43,75,.22);color:#102b52}
.topbar-more-menu>strong{padding:9px 10px 4px;color:#6b7c91;font:800 9px Inter,system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase}
.topbar-more-menu a,.topbar-more-menu button{display:flex;width:100%;min-height:38px;align-items:center;border:0;border-radius:7px;background:transparent;color:#102b52;padding:7px 10px;font:700 13px Inter,system-ui,sans-serif;text-align:left;text-decoration:none}
.topbar-more-menu a:hover,.topbar-more-menu button:hover{background:#eef5fb}
.topbar-more-menu form{margin-top:5px;padding-top:5px;border-top:1px solid #e1e8ee}
.topbar-more-menu button{color:#9d2f2f;cursor:pointer}
.topbar-user{display:flex;align-items:center;gap:10px;margin-left:auto}
.topbar-moon{display:flex;align-items:center;gap:6px;color:#e9f1f7;font:750 11px Inter,system-ui,sans-serif;white-space:nowrap}
.topbar-moon-icon{font-size:22px;line-height:1}
.topbar-account{display:grid;width:36px;height:36px;place-items:center;border-radius:50%;background:#fff;color:#102b52;font:800 13px Inter,system-ui,sans-serif;text-decoration:none}
.mobile-bottom-nav{display:none}
.river-check-logout{display:none}
.data-source-label{display:inline;line-height:inherit}
.data-source-label a{color:inherit;font-weight:800;text-decoration:underline;text-decoration-color:currentColor;text-underline-offset:2px}
.data-source-label-compact{font-size:inherit}
.interpretation-label{display:inline;color:inherit}
.placeholder-page{padding:36px 32px;color:#10233f}
.placeholder-card{max-width:720px;background:#fff;border:1px solid #dbe4eb;border-radius:8px;padding:28px;box-shadow:0 8px 26px rgba(13,39,68,.05)}
.placeholder-card h1{margin:0 0 8px;font-family:Georgia,"Times New Roman",serif;font-size:34px;text-transform:uppercase;letter-spacing:.04em}
.placeholder-card p{margin:0;color:#52667d}

@media(max-width:960px){
  .app-shell{grid-template-rows:56px minmax(0,1fr)}
  body{padding-bottom:calc(70px + env(safe-area-inset-bottom))}
  .app-topbar{height:56px;gap:12px;padding:0 14px}
  .app-brand img{width:38px;height:38px}
  .app-brand strong{font-size:14px}
  .topbar-about-mobile{position:relative;display:flex;height:100%;align-items:center;margin-left:auto;padding:0 12px;color:#e9f1f7;text-decoration:none;font:700 12px Inter,system-ui,sans-serif}
  .topbar-about-mobile.active:after{content:"";position:absolute;right:9px;bottom:0;left:9px;height:3px;border-radius:3px 3px 0 0;background:#1f88ff}
  .topbar-primary,.topbar-more{display:none}
  .topbar-user{display:flex;gap:8px;margin-left:0}
  .topbar-account{width:32px;height:32px;font-size:12px}
  .mobile-bottom-nav{position:fixed;z-index:1100;right:0;bottom:0;left:0;display:grid;grid-template-columns:repeat(5,1fr);min-height:64px;padding:5px 5px calc(5px + env(safe-area-inset-bottom));background:rgba(3,36,60,.98);box-shadow:0 -4px 18px rgba(13,39,68,.2)}
  .mobile-nav-item{min-width:0;min-height:54px;display:grid;place-items:center;align-content:center;gap:3px;border:0;border-radius:8px;background:transparent;color:#dce9f1;text-decoration:none;font:700 10px/1.1 Inter,system-ui,sans-serif;cursor:pointer}
  .mobile-nav-item.active,.mobile-more.active>.mobile-nav-item,.mobile-more[open]>.mobile-nav-item{background:rgba(255,255,255,.14);color:#fff}
  .mobile-nav-icon{width:25px;height:25px;display:flex;align-items:center;justify-content:center}
  .mobile-nav-icon img{display:block;width:24px;height:24px;object-fit:contain}
  .mobile-nav-icon svg{width:24px;height:24px;fill:currentColor;stroke:currentColor;stroke-width:1.5}
  .mobile-more{min-width:0;position:relative}
  .mobile-more>summary{list-style:none}
  .mobile-more>summary::-webkit-details-marker{display:none}
  .mobile-more-menu{position:fixed;right:10px;bottom:calc(72px + env(safe-area-inset-bottom));width:min(290px,calc(100vw - 20px));display:grid;gap:4px;border:1px solid #d7e2ea;border-radius:14px;background:#fff;padding:10px;box-shadow:0 18px 48px rgba(13,39,68,.24);color:#10233f}
  .mobile-more-menu>strong{padding:7px 9px 9px;color:#607086;font-size:11px;letter-spacing:.12em;text-transform:uppercase}
  .mobile-more-menu a,.mobile-more-menu button{display:flex;width:100%;align-items:center;min-height:42px;border:0;border-radius:8px;background:transparent;color:#10233f;text-decoration:none;padding:8px 10px;font:700 14px Inter,system-ui,sans-serif;text-align:left}
  .mobile-more-menu a:hover,.mobile-more-menu button:hover{background:#eef4f7}
  .mobile-more-menu form{margin:5px 0 0;padding-top:5px;border-top:1px solid #e1e8ee}
  .mobile-more-menu button{color:#9d2f2f;cursor:pointer}
  .placeholder-page{padding:24px 16px 36px}
}

@media(max-width:520px){
  .topbar-about-mobile{padding-inline:6px}
  .topbar-user{gap:6px}
  .topbar-moon>span:last-child{display:none}
}

@media(orientation:landscape) and (min-width:600px) and (max-width:960px){
  body{padding-bottom:0}
  .app-topbar{gap:12px;padding-inline:14px}
  .app-brand img{width:36px;height:36px}
  .app-brand strong{display:none}
  .topbar-about-mobile{display:none}
  .topbar-primary{display:flex}
  .topbar-primary a{padding-inline:10px;font-size:12px}
  .topbar-more{display:block}
  .topbar-more>summary{padding-inline:8px;font-size:12px}
  .topbar-user{display:flex}
  .mobile-bottom-nav{display:none}
}
