:root{
  --bg:#fbfbfb;
  --paper:#ffffff;
  --text:#111;
  --muted:rgba(0,0,0,.68);
  --border:rgba(0,0,0,.10);
  --shadow:0 8px 26px rgba(0,0,0,.06);
  --radius:18px;
  --max:1100px;

  /* Readability */
  --lh:1.68;
  --ls:0.01em;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  /* newspaper-like */
  font-family:"Source Serif 4", Georgia, "Times New Roman", serif;
  line-height:var(--lh);
  letter-spacing:var(--ls);
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a{color:inherit}
a:hover{opacity:.9}

.container{
  max-width:var(--max);
  margin:0 auto;
  padding:0 1rem;
}

.navbar{
  position: sticky !important;
  top: 0 !important;
  z-index:50;
  background:rgba(251,251,251,.86);
  backdrop-filter:saturate(160%) blur(10px);
  border-bottom:1px solid var(--border);
}

.nav-inner{
  display:flex;
  gap:1rem;
  align-items:center;
  justify-content:space-between;
  padding:.8rem 0;
}

.brand{
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight:800;
  letter-spacing:0.01em;
  text-decoration:none;
  white-space:nowrap;
}

.nav-links{
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:.95rem;
}

.nav-links a{
  text-decoration:none;
  padding:.4rem .65rem;
  border-radius:999px;
  border:1px solid transparent;
}
.nav-links a:hover{
  border-color:var(--border);
  background:var(--paper);
}

main{
  padding:1rem 0 3rem;
}

/* Comfortable reading width */
.prose{
  max-width:72ch;
}

.card{
  background:var(--paper);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

h1,h2,h3{
  line-height:1.2;
  letter-spacing:0;
}
h1{
  font-size:clamp(1.55rem, 2.7vw, 2.2rem);
  margin:.3rem 0 .8rem;
}
p{margin:.6rem 0}

/* Tables: mobile scroll */
.table-wrap{
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}

/* Inputs/buttons feel crisp */
input, select, button{
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
input, select{
  background:var(--paper);
}

/* Back-to-top */
#backToTop{
  position:fixed;
  right:16px;
  bottom:16px;
  width:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.92);
  box-shadow:var(--shadow);
  text-decoration:none;
  opacity:0;
  transform:translateY(8px);
  pointer-events:none;
  transition:opacity .15s ease, transform .15s ease;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
#backToTop.show{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

/* Small screens */
@media (max-width: 680px){
  .nav-inner{gap:.6rem}
  .nav-links{gap:.35rem;font-size:.92rem}
  .nav-links a{padding:.35rem .55rem}
  main{padding:.8rem 0 3rem}
}


.status-badges{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  align-items:center;
  margin:.5rem 0 0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:.9rem;
}
.sb{
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  border-radius:999px;
  padding:.28rem .6rem;
  box-shadow:0 6px 18px rgba(0,0,0,.04);
  opacity:.92;
}


/* Shadow only when page is scrolled */
.navbar{ transition: box-shadow .15s ease, background-color .15s ease; }
.navbar.scrolled{ box-shadow: 0 10px 26px rgba(0,0,0,.08); }


/* Subtle shrink on scroll (news-site feel) */
.nav-inner{ transition: padding .15s ease; }
.navbar.scrolled .nav-inner{ padding: .55rem 0 !important; }


/* Mobile reading comfort */
@media (max-width: 680px){
  body{ font-size:17px; line-height:1.78; }
  .prose{ max-width: 68ch; }
}
