/* AVENSCI EXPERIENCE — shared UI foundation */

/* Page headings */
.xp-pagehead{
  background:#f3f8fc;
  border-bottom:1px solid var(--fmp-line);
  padding:28px 0;
}
.xp-pagehead h1{
  margin:0;
  color:var(--fmp-navy);
  font-size:34px;
}
.xp-pagehead p{
  margin:5px 0 0;
  color:var(--fmp-muted);
}

/* Reader */
.reader-shell{
  min-height:calc(100vh - 78px);
  display:grid;
  grid-template-columns:320px 1fr;
  background:#f6f8fb;
}
.reader-toc{
  background:#fff;
  border-right:1px solid var(--fmp-line);
  padding:24px;
  height:calc(100vh - 78px);
  overflow:auto;
}
.reader-back{
  font-size:12px;
  color:var(--fmp-blue);
  font-weight:700;
}
.reader-toc h2{
  font-size:17px;
  color:var(--fmp-navy);
}
.reader-toc__list a{
  display:grid;
  grid-template-columns:28px 1fr;
  gap:9px;
  padding:10px 7px;
  border-top:1px solid #eef1f4;
  font-size:12px;
}
.reader-toc__list a.active{
  background:#eef6ff;
  color:var(--fmp-blue);
}
.reader-main{
  padding:25px 42px 60px;
}
.reader-article{
  background:#fff;
  border:1px solid var(--fmp-line);
  border-radius:7px;
  max-width:900px;
  margin:auto;
  padding:45px 58px;
}
.reader-article h1{
  font-size:39px;
  line-height:1.1;
  color:var(--fmp-navy);
}
.reader-placeholder{
  margin-top:35px;
  border-top:1px solid var(--fmp-line);
  padding:35px 0;
  color:var(--fmp-muted);
}

/* Legacy-compatible account foundations.
   Final account presentation is defined in account.css. */
.account-grid{
  display:grid;
  grid-template-columns:230px 1fr;
  gap:36px;
  padding:35px 0 65px;
}
.account-menu{
  border:1px solid var(--fmp-line);
  border-radius:6px;
  align-self:start;
}
.account-menu a{
  display:block;
  padding:12px 15px;
  border-bottom:1px solid #eef1f4;
  font-size:13px;
}
.account-menu a.active{
  background:#eef6ff;
  color:var(--fmp-blue);
  font-weight:800;
}

/* Shared account cards */
.stat-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:15px;
  margin-bottom:30px;
}
.stat-grid div{
  background:#f4f8fc;
  border:1px solid var(--fmp-line);
  padding:22px;
  border-radius:7px;
}
.stat-grid strong{
  display:block;
  font-size:31px;
  color:var(--fmp-navy);
}

.library-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}
.library-card{
  display:grid;
  grid-template-columns:90px 1fr;
  gap:15px;
  border:1px solid var(--fmp-line);
  border-radius:7px;
  padding:15px;
}
.library-card img{
  width:80px;
  max-height:115px;
  object-fit:cover;
}

/* Shared empty state: final effective style */
.xp-empty{
  padding:28px;
  border:1px dashed #cbd5e1;
  border-radius:12px;
  background:#f8fafc;
  color:#64748b;
}

/* Legacy order/table foundation.
   Some modern order rules are intentionally retained in
   experience-modules.css until their dedicated audit. */

/* Shared form grid */
.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px;
}
.form-grid label{
  font-size:12px;
  font-weight:700;
}
.form-grid input,
.form-grid select{
  width:100%;
  margin-top:5px;
  padding:10px;
  border:1px solid #bdc9d5;
  border-radius:4px;
}

@media(max-width:900px){
  .reader-shell{
    grid-template-columns:1fr;
  }
  .reader-toc{
    height:auto;
  }
  .account-grid{
    grid-template-columns:1fr;
  }
  .library-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:650px){
  .reader-main{
    padding:15px;
  }
  .reader-article{
    padding:25px 20px;
  }
  .reader-article h1{
    font-size:30px;
  }
  .stat-grid,
  .form-grid{
    grid-template-columns:1fr;
  }
  
  
}
