:root{
  --bg:#f7f2ea;
  --surface:#ffffff;
  --navy:#172033;
  --orange:#f26d4a;
  --yellow:#ffdc7b;
  --text:#172033;
  --muted:#64748b;
  --border:#e7dfd3;
}

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

body{
  background:var(--bg);
  color:var(--text);
  font-family:Inter,system-ui,sans-serif;
  line-height:1.6;
}

a{
  text-decoration:none;
  color:inherit;
}

img{
  width:100%;
  display:block;
}

/* NAVBAR */

.site-header{
  background:var(--navy);
  position:sticky;
  top:0;
  z-index:100;
}

.nav-shell{
  max-width:1200px;
  margin:auto;
  padding:18px 20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  color:white;
  font-weight:800;
  font-size:1.2rem;
}

.brand-mark{
  width:38px;
  height:38px;
  border-radius:10px;
  background:var(--orange);
  color:white;
  display:flex;
  align-items:center;
  justify-content:center;
}

.nav-links{
  display:flex;
  gap:24px;
}

.nav-links a{
  color:white;
  opacity:.9;
}

.nav-links a:hover{
  opacity:1;
}

/* FILTER BAR */

.toolbar{
  max-width:1200px;
  margin:auto;
  padding:28px 20px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  flex-wrap:wrap;
}

.category-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.category-list button{
  border:none;
  background:white;
  border:1px solid var(--border);
  padding:10px 18px;
  border-radius:999px;
  cursor:pointer;
  font-weight:600;
}

.category-list button.active{
  background:var(--navy);
  color:white;
}

.search-box{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.search-box span{
  font-size:.9rem;
  color:var(--muted);
}

.search-box input{
  width:320px;
  max-width:100%;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid var(--border);
  background:white;
}

/* CONTENT */

.content-grid{
  max-width:1200px;
  margin:auto;
  padding:0 20px 50px;
}

/* FEATURED */

.featured-card{
  overflow:hidden;
  border-radius:24px;
  background:white;
  margin-bottom:28px;
  box-shadow:0 10px 25px rgba(0,0,0,.06);
}

.featured-card img{
  height:380px;
  object-fit:cover;
}

.featured-body{
  padding:24px;
}

.featured-body h2{
  font-size:2rem;
  margin:10px 0;
}

.featured-body p{
  color:var(--muted);
}

.tag{
  color:var(--orange);
  font-size:.8rem;
  font-weight:800;
  text-transform:uppercase;
}

.meta{
  margin-top:16px;
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  color:var(--muted);
  font-size:.9rem;
}

/* ARTICLES */

.article-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(320px,1fr));
  gap:22px;
}

.story-card{
  overflow:hidden;
  border-radius:20px;
  background:white;
  box-shadow:0 10px 24px rgba(0,0,0,.05);
  transition:.2s;
}

.story-card:hover{
  transform:translateY(-4px);
}

.story-card img{
  height:220px;
  object-fit:cover;
}

.story-card div{
  padding:18px;
}

.story-card h3{
  margin:8px 0;
  line-height:1.3;
}

.story-card p{
  color:var(--muted);
}

.compact{
  margin-top:12px;
}

/* STATUS */

.status-card{
  background:white;
  border-radius:20px;
  padding:40px;
  text-align:center;
}

/* EDITOR */

.editor-body{
  background:var(--bg);
}

.editor-header{
  background:var(--navy);
}

.editor-shell{
  max-width:900px;
  margin:40px auto;
  padding:0 20px;
}

.editor-card{
  background:white;
  border-radius:24px;
  padding:24px;
  box-shadow:0 10px 24px rgba(0,0,0,.05);
}

.editor-card-heading{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:24px;
}

.eyebrow{
  color:var(--orange);
  font-weight:700;
  font-size:.85rem;
  text-transform:uppercase;
}

.editor-form{
  display:grid;
  gap:16px;
}

.editor-form label{
  display:grid;
  gap:8px;
  font-weight:600;
}

.editor-form input,
.editor-form textarea{
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:14px;
  width:100%;
}

.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.checkbox-row{
  display:flex !important;
  align-items:center;
  gap:10px;
}

.form-actions{
  display:flex;
  gap:12px;
}

.button{
  border:none;
  border-radius:14px;
  padding:12px 18px;
  cursor:pointer;
  font-weight:700;
}

.primary{
  background:var(--orange);
  color:white;
}

.ghost{
  background:white;
  border:1px solid var(--border);
}

.form-message{
  margin-top:8px;
}

#connectionStatus{
  background:#e8fff0;
  color:#0f8a4b;
  padding:8px 12px;
  border-radius:999px;
  font-size:.85rem;
  font-weight:700;
}

/* MOBILE */

@media (max-width:768px){

  .nav-links{
    display:none;
  }

  .featured-card img{
    height:240px;
  }

  .featured-body h2{
    font-size:1.5rem;
  }

  .form-grid{
    grid-template-columns:1fr;
  }

  .search-box{
    width:100%;
  }

  .search-box input{
    width:100%;
  }
}
/* =====================================
ARTICLE LINK IMPROVEMENTS
===================================== */

.article-link{
text-decoration:none;
color:inherit;
display:block;
}

.article-link:hover{
color:inherit;
}

/* FEATURED CARD */

.featured-card{
transition:.25s ease;
cursor:pointer;
}

.featured-card:hover{
transform:translateY(-4px);
}

.featured-card img{
height:420px;
object-fit:cover;
}

/* ARTICLE CARDS */

.story-card{
cursor:pointer;
height:100%;
display:flex;
flex-direction:column;
transition:.25s ease;
}

.story-card:hover{
transform:translateY(-4px);
}

/* BETTER SPACING */

.article-list{
align-items:stretch;
}

/* MOBILE */

@media (max-width:768px){

.featured-card img{
height:260px;
}

}
/* SINGLE ARTICLE */

.single-article{
max-width:900px;
margin:40px auto;
background:white;
border-radius:24px;
overflow:hidden;
box-shadow:0 10px 24px rgba(0,0,0,.05);
}

.single-article-image{
width:100%;
height:500px;
object-fit:cover;
}

.single-article-content{
padding:32px;
}

.single-article-content h1{
font-size:2.5rem;
line-height:1.2;
margin:12px 0 18px;
}

.article-summary{
font-size:1.1rem;
color:var(--muted);
margin:20px 0;
}

.article-body{
margin-top:30px;
line-height:1.9;
font-size:1.05rem;
}

@media (max-width:768px){

.single-article-image{
height:260px;
}

.single-article-content{
padding:22px;
}

.single-article-content h1{
font-size:1.8rem;
}
}


/* =====================================
MINIMAL ARTICLE PAGE
===================================== */

.article-page-body{
  background:#f7f2ea;
  color:#172033;
}

#articleContainer{
  width:100%;
}

.single-article{
  max-width:900px;
  margin:0 auto;
  padding:50px 24px 100px;
  background:transparent;
  box-shadow:none;
  border:none;
  border-radius:0;
}

.single-article-image{
  width:100%;
  max-height:600px;
  object-fit:cover;
  border-radius:0;
  margin-bottom:60px;
}

.single-article-content{
  max-width:760px;
  margin:auto;
  padding:0;
}

.single-article-content .tag{
  color:var(--orange);
  font-size:.8rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:18px;
}

.single-article-content h1{
  font-size:4rem;
  line-height:1.05;
  font-weight:800;
  color:var(--navy);
  margin-bottom:24px;
}

.single-article-content .meta{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  color:var(--muted);
  font-size:.95rem;
  margin-bottom:32px;
}

.article-summary{
  font-size:1.35rem;
  line-height:1.7;
  color:var(--muted);
  margin-bottom:40px;
}

.article-body{
  font-size:1.15rem;
  line-height:2;
  color:var(--text);
}

.article-body p{
  margin-bottom:24px;
}

.article-body br{
  display:block;
  content:"";
  margin-bottom:14px;
}

/* MOBILE */

@media (max-width:900px){

  .single-article{
    padding:30px 20px 70px;
  }

  .single-article-image{
    max-height:350px;
    margin-bottom:40px;
  }

  .single-article-content h1{
    font-size:2.7rem;
  }

  .article-summary{
    font-size:1.15rem;
  }

  .article-body{
    font-size:1rem;
    line-height:1.9;
  }
}

@media (max-width:600px){

  .single-article{
    padding:24px 16px 60px;
  }

  .single-article-image{
    max-height:240px;
  }

  .single-article-content h1{
    font-size:2rem;
  }

  .article-summary{
    font-size:1rem;
  }

  .article-body{
    font-size:.98rem;
  }
}


/* =====================================
ARTICLE HEADER
===================================== */

.article-topbar{
  max-width:1200px;
  margin:0 auto;
  padding:50px 30px 25px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.article-back{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:14px 22px;
  border-radius:999px;
  background:#ffffff;
  border:1px solid var(--border);
  color:var(--navy);
  font-weight:700;
  font-size:1rem;
  box-shadow:0 4px 12px rgba(0,0,0,.05);
  transition:.25s ease;
}

.article-back:hover{
  background:var(--orange);
  color:white;
  transform:translateY(-2px);
}

.article-logo{
  font-family:"Cormorant Garamond", serif;
  font-size:3.2rem;
  font-weight:700;
  color:var(--navy);
  letter-spacing:-1px;
}

/* MOBILE */

@media (max-width:768px){

  .article-topbar{
    padding:30px 16px 15px;
  }

  .article-back{
    padding:12px 16px;
    font-size:.9rem;
  }

  .article-logo{
    font-size:2.2rem;
  }
}
.site-footer{
  margin-top:80px;
  background:#0f172a;
  color:#fff;
}

.footer-container{
  max-width:1200px;
  margin:auto;
  padding:60px 24px;
  display:flex;
  justify-content:space-between;
  gap:60px;
  flex-wrap:wrap;
}

.footer-brand{
  max-width:420px;
}

.footer-brand h3{
  margin-bottom:12px;
}

.footer-brand p{
  opacity:.8;
  line-height:1.7;
}

.footer-links{
  display:flex;
  gap:60px;
  flex-wrap:wrap;
}

.footer-column{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.footer-column h4{
  margin-bottom:8px;
}

.footer-column a{
  color:#cbd5e1;
  text-decoration:none;
}

.footer-column a:hover{
  color:#fff;
}

.footer-bottom{
  border-top:1px solid rgba(255,255,255,.1);
  text-align:center;
  padding:20px;
  color:#cbd5e1;
}
.brand{
display:flex;
align-items:center;
gap:2px;
text-decoration:none;
}

.brand-logo{
width:68px;
height:68px;
border-radius:2px;
object-fit:cover;
}

.brand span{
font-size:2.0rem;
font-weight:800;
color:inherit;
}
