*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  font-family:Arial, sans-serif;
  background:#f4f7fb;
  color:#1d1d1d;
  line-height:1.7;
}

.back-btn{
  position:fixed;
  top:16px;
  left:16px;
  z-index:100;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 16px;
  background:white;
  color:#102a43;
  border:1px solid #dce6f2;
  border-radius:999px;
  font-weight:bold;
  text-decoration:none;
  box-shadow:0 4px 14px rgba(0,0,0,0.12);
}

.back-btn::before{
  content:"<";
  margin-right:8px;
  font-weight:900;
}

.back-btn:hover{
  background:#d9ecff;
}

/* TOPBAR */

.topbar{
  background:#ffffff;
  border-bottom:3px solid #dce6f2;
  padding:40px 20px;
  text-align:center;
  box-shadow:0 2px 10px rgba(0,0,0,0.05);
}

.topbar h1{
  font-size:3rem;
  margin-bottom:15px;
  color:#102a43;
}

.topbar p{
  max-width:850px;
  margin:auto;
  color:#486581;
  font-size:1.05rem;
}

/* STATUS SECTION */

.status-section{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:20px;
  padding:30px 20px;
}

.status-card{
  background:white;
  border-radius:18px;
  padding:22px;
  box-shadow:0 4px 18px rgba(0,0,0,0.08);
  border:2px solid #e6edf5;
}

.status-card h3{
  margin-bottom:15px;
  color:#52606d;
  font-size:1rem;
}

.status-card p{
  font-weight:bold;
  margin-top:10px;
}

/* METERS */

.meter{
  width:100%;
  height:18px;
  background:#e6edf5;
  border-radius:999px;
  overflow:hidden;
}

.fill{
  height:100%;
}

.budget-fill{
  width:32%;
  background:#2bb673;
}

.stress-fill{
  width:78%;
  background:#ff6b6b;
}

.energy-fill{
  width:12%;
  background:#f7b731;
}

.confidence-fill{
  width:28%;
  background:#4d96ff;
}

/* GENERAL CARDS */

.story-card,
.table-card,
.emergency-section{
  margin:20px;
  padding:32px;
  background:white;
  border-radius:20px;
  box-shadow:0 5px 20px rgba(0,0,0,0.06);
  border:2px solid #e6edf5;
}

.story-card h2,
.table-card h2,
.emergency-section h2{
  margin-bottom:20px;
  color:#102a43;
  font-size:2rem;
}

.story-card p{
  margin-bottom:18px;
  color:#334e68;
}

.story-card ul{
  padding-left:20px;
}

.story-card li{
  margin-bottom:10px;
  color:#334e68;
}

/* TABLE */

.table-wrapper{
  overflow-x:auto;
  scroll-behavior:smooth;
  border:1px solid #d9e2ec;
  border-radius:14px;
}

.table-scroll-controls{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-bottom:12px;
}

.scroll-btn{
  min-width:48px;
  min-height:42px;
  padding:10px 14px;
  border-radius:10px;
}

.scroll-btn:disabled{
  background:#cbd5e1;
  cursor:not-allowed;
  transform:none;
}

table{
  width:100%;
  border-collapse:collapse;
  min-width:1720px;
  background:white;
}

th,
td{
  padding:18px;
  border:1px solid #d9e2ec;
  text-align:left;
  vertical-align:top;
}

th{
  background:#d9ecff;
  color:#102a43;
  font-size:1rem;
  position:sticky;
  top:0;
}

tr:nth-child(even){
  background:#f8fbff;
}

td{
  color:#243b53;
}

.item-thumb{
  width:110px;
  height:86px;
  object-fit:cover;
  display:block;
  margin:auto;
  background:#f8fbff;
  border:1px solid #d9e2ec;
  border-radius:14px;
  padding:8px;
}

/* HIGHLIGHT IMPORTANT COLUMNS */

td:nth-child(5){
  background:#ecfff4;
  font-weight:bold;
}

td:nth-child(8){
  background:#fff8e7;
}

.hint-box{
  margin:0;
}

.hint-box summary{
  display:inline-block;
  background:#4d96ff;
  color:white;
  border:none;
  padding:12px 18px;
  border-radius:12px;
  cursor:pointer;
  font-weight:bold;
  list-style:none;
}

.hint-box summary:hover{
  background:#2f7df6;
}

.hint-box[open] summary{
  display:block;
  width:fit-content;
  margin-bottom:10px;
}

.hint-box summary::-webkit-details-marker{
  display:none;
}

/* EMERGENCY CARDS */

.emergency-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
}

.emergency-card{
  background:#fff4f4;
  border:2px solid #ffc9c9;
  color:#9b1c1c;
  padding:22px;
  border-radius:16px;
  font-weight:bold;
  box-shadow:0 4px 10px rgba(255,0,0,0.05);
}

/* BUTTONS */

button{
  background:#4d96ff;
  color:white;
  border:none;
  padding:14px 22px;
  border-radius:12px;
  cursor:pointer;
  font-weight:bold;
  transition:0.3s;
  font-size:1rem;
}

button:hover{
  background:#2f7df6;
}

/* WARNING BOX */

.warning-box{
  background:#fff4e5;
  border-left:6px solid #ff9f43;
  padding:18px;
  border-radius:12px;
  color:#8a4b08;
  margin-top:20px;
}

/* TEACHER SLANG PRACTICE */

.slang-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:16px;
}

.slang-card{
  background:#f8fbff;
  border:1px solid #d9e2ec;
  border-radius:16px;
  padding:18px;
}

.slang-card h3{
  color:#102a43;
  font-size:1.05rem;
  margin-bottom:8px;
}

.slang-card p{
  margin-bottom:8px;
  color:#334e68;
}

.slang-line{
  color:#102a43;
  font-weight:bold;
}

/* RESPONSIVE */

@media(max-width:768px){

  .topbar h1{
    font-size:2.2rem;
  }

  .story-card,
  .table-card,
  .emergency-section{
    padding:20px;
  }

  table{
    min-width:1400px;
  }

}
