:root{
  /* MarginBuilt — bank green (Niterria-style) */
  --bg:#070B09;
  --fg:#F4F8F5;
  --muted:#B6C6BD;
  --link:#FFFFFF;

  /* stronger separation like Niterria */
  --glass:rgba(255,255,255,.055);
  --glass2:rgba(255,255,255,.095);
  --stroke:rgba(255,255,255,.10);

  /* Brand greens */
  --p:#4FA37A;
  --s:#1F3D2B;
  --t:#7FE0B1;

  --r:22px;
  --shadow:0 22px 70px -28px rgba(79,163,122,.28);
}
*{box-sizing:border-box}
body{
  margin:0; color:var(--fg);
  font-family:Manrope,system-ui,Segoe UI,Roboto,Arial,sans-serif;

  /* Niterria-style sweep + bank glow */
  background:
    radial-gradient(1100px 520px at 62% 14%, rgba(79,163,122,.28), transparent 62%),
    radial-gradient(900px 520px at 20% 30%, rgba(31,61,43,.55), transparent 60%),
    radial-gradient(700px 420px at 88% 72%, rgba(127,224,177,.10), transparent 60%),
    linear-gradient(135deg, #143124 0%, #0B1712 42%, #070B09 100%);
  background-attachment: scroll;
}
@media (prefers-reduced-motion: reduce){
  *{animation:none!important; transition:none!important}
}
a{color:var(--link); text-decoration:none}
.wrap{max-width:1260px; margin:0 auto; padding:0 22px}

/* NAV — Niterria-like bar */
.nav{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:saturate(140%) blur(10px);

  background:linear-gradient(90deg,
    rgba(20,49,36,.92) 0%,
    rgba(11,23,18,.72) 55%,
    rgba(7,11,9,.55) 100%
  );

  border-bottom:1px solid rgba(255,255,255,.10);
  box-shadow:0 12px 34px rgba(0,0,0,.32);
}
.wrap{
  max-width:1260px;
  margin:0 auto;
  padding:0 22px;
}
.nav-in{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--fg);
  text-decoration:none;
}
.bt small{
  display:block;
  letter-spacing:.18em;
  color:rgba(182,198,189,.88);
  opacity:.95;
  text-transform:uppercase;
  font-size:11px;
}
.bt b{
  display:block;
  font-weight:800;
  color:var(--fg);
}
.nav-links{
  display:flex;
  align-items:center;
  gap:18px;
}
.nav-links a{
  color:var(--fg);
  text-decoration:none;
  font-weight:500;
  font-size:15px;
  padding:8px 14px;
  border-radius:12px;
  transition:.25s;
}
.nav-links a:hover{ background:var(--glass2); }
.nav-links .ghost{
  border:1px solid rgba(255,255,255,.12);
  background:var(--glass);
}

/* HEADER */
.header{padding:38px 0 12px}
.header h1{font-family:'Playfair Display', serif; font-size:34px; margin:0}
.header b{
  color:var(--t);
  background:none;
  -webkit-background-clip:initial;
  background-clip:initial;
}

/* GRID */
.grid{display:grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap:24px; padding: 10px 0 60px}
@media(max-width: 980px){ .grid{ grid-template-columns:1fr; } }

/* HERO POST */
.hero{padding:44px 0 18px}
.post-hero{display:grid; grid-template-columns:1fr; gap:16px}
.headline{font-family:'Playfair Display', serif; font-size:44px; line-height:1.08; margin:0}
.sub{color:var(--muted); font-size:18px}
.meta{color:rgba(182,198,189,.80); font-size:13px}
.hero-img{
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.035));
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 26px 80px -56px rgba(79,163,122,.35);
}
.hero-img .img-wrap{position:relative}
.hero-img img{width:100%; display:block; object-fit:cover; transition:transform .6s ease}
.hero-img:hover img{transform:scale(1.02)}

/* ARTICLE */
.article{
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.035));
  border-radius:22px;
  padding:22px;
  line-height:1.7;
  font-size:18px;
}
.disclosure{font-size:13px; color:rgba(182,198,189,.84); text-align:center; margin-bottom:10px}
.article h2, .article h3{font-family:'Playfair Display', serif}

/* LIKE */
.like-row{display:flex; align-items:center; gap:12px; margin:14px 0 6px}
.heart{
  display:inline-grid; place-items:center;
  width:44px; height:44px; border-radius:50%;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
  transition:transform .15s ease, box-shadow .25s, border-color .25s;
}
.heart:hover{transform:translateY(-2px); border-color:rgba(79,163,122,.22)}
.heart.liked{background:linear-gradient(135deg,#f43f5e,#fb7185); box-shadow:0 10px 30px -10px rgba(244,63,94,.7)}
.heart svg{display:block}

/* COMMENTS */
.comments{margin-top:18px}
.c-form{
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.035));
  border-radius:16px;
  padding:16px;
}
textarea{
  width:100%;
  border-radius:12px;
  padding:12px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color:var(--fg);
}
.c-list{display:grid; gap:12px; margin-top:16px}
.c-item{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:12px;
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.035));
  border-radius:16px;
  padding:12px;
}
.avatar{width:52px; height:52px; border-radius:50%; object-fit:cover; border:1px solid rgba(255,255,255,.10)}
.c-head{display:flex; align-items:center; justify-content:space-between}
.c-name{font-weight:700}
.c-date{color:rgba(182,198,189,.72); font-size:12px}
.c-actions a{margin-left:10px}
.edit-inp{
  width:100%;
  border-radius:10px;
  padding:10px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color:var(--fg)
}

/* SIDEBAR (sticky) */
aside{position: sticky; top: 92px; height: max-content}
.box{
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.035));
  border-radius:22px;
  padding:16px;
  margin-bottom:16px;
}
.box h4{
  margin:4px 0 10px;
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:rgba(244,248,245,.88)
}
.search{position:relative; display:flex; gap:8px}
.search input{
  flex:1;
  border-radius:14px;
  padding:12px 14px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color:var(--fg)
}
.search button{
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(135deg,
    color-mix(in oklab, var(--p) 78%, #000),
    color-mix(in oklab, var(--s) 88%, #000)
  );
  color:white;
  border-radius:14px;
  padding:12px 14px;
  cursor:pointer;
  box-shadow:0 16px 46px -26px rgba(79,163,122,.50);
}
.chips{display:flex; flex-wrap:wrap; gap:8px}
.chip{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
  padding:8px 12px;
  border-radius:12px;
  font-size:14px
}
.popular{display:grid; gap:10px}
.popular a{display:flex; gap:10px; color:var(--fg)}
.popular img{width:110px; height:78px; object-fit:cover; border-radius:10px; border:1px solid rgba(255,255,255,.10)}

/* FOOTER */
footer{
  border-top:1px solid rgba(255,255,255,.10);
  background:linear-gradient(90deg, rgba(20,49,36,.35), rgba(7,11,9,.65));
}
.foot{display:grid; grid-template-columns:1fr auto; gap:12px; padding:22px 0}
@media(max-width:800px){.foot{grid-template-columns:1fr}}
.icons{display:flex; gap:12px}
.icon{
  width:42px;
  height:42px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  display:grid;
  place-items:center
}

/* BACK TO TOP */
.to-top{
  position:fixed; right:18px; bottom:18px;
  width:48px; height:48px; display:grid; place-items:center;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(135deg,
    color-mix(in oklab, var(--p) 78%, #000),
    color-mix(in oklab, var(--s) 88%, #000)
  );
  color:white; box-shadow:var(--shadow);
  opacity:0; pointer-events:none; transform:translateY(10px);
  transition:.25s
}
.to-top.show{opacity:1; pointer-events:auto; transform:translateY(0)}

/* BUTTONS */
.btn-glass{
  padding:10px 18px;
  border:none;
  border-radius:14px;
  font-weight:600;
  font-family:Manrope,system-ui,Segoe UI,Roboto,Arial,sans-serif;
  cursor:pointer;
  color:var(--fg);
  background:linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.035));
  backdrop-filter:blur(10px) saturate(140%);
  transition:all .25s ease;
  box-shadow:0 0 0 1px rgba(255,255,255,.10) inset;
}
.btn-glass:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 25px -10px rgba(79,163,122,.26),0 0 0 1px rgba(79,163,122,.22) inset;
}
.btn-glass.cancel:hover{
  box-shadow:0 10px 25px -10px rgba(255,80,80,.35),0 0 0 1px #ff5050 inset;
}
.btn-glass.confirm{
  background:linear-gradient(135deg,
    color-mix(in oklab, var(--p) 78%, #000),
    color-mix(in oklab, var(--s) 88%, #000)
  );
  color:#fff;
}
.btn-glass.confirm:hover{
  box-shadow:0 12px 40px -18px rgba(79,163,122,.45);
  transform:translateY(-2px) scale(1.02);
}

/* burger hidden on desktop */
.menu-toggle{
  display:none;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  padding:10px 12px;
  border-radius:12px;
  color:var(--fg);
  cursor:pointer
}

/* mobile dropdown */
@media(max-width:900px){
  .menu-toggle{ display:inline-flex; align-items:center; justify-content:center; }
  .nav-links{
    display:none !important;
    position:absolute; left:0; right:0; top:100%;
    flex-direction:column; gap:10px; padding:14px 18px 18px;
    border-top:1px solid rgba(255,255,255,.10);
    background:linear-gradient(180deg, rgba(20,49,36,.95), rgba(7,11,9,.98));
    z-index: 50;
  }
  .nav-links.open{ display:flex !important; }
  .nav-links a{
    display:block; width:100%; padding:12px 10px;
    border:1px solid rgba(255,255,255,.10);
    border-radius:12px;
    background:rgba(255,255,255,.04);
  }
  body.menu-open{ overflow:hidden; }
}

/* ===== Mobile first polish ===== */
@media (max-width: 900px){
  .wrap{ padding:0 14px }
  .nav-in{ padding:10px 0 }
  .badge img{ height:36px }
  .bt small{ font-size:10px; letter-spacing:.16em }
  .bt b{ font-size:16px }

  .hero{ padding:44px 0 18px }
  .hero-title{ font-size:28px; line-height:1.15 }

  .feat-row{ grid-template-columns:1fr; gap:12px }
  .tile{ border-radius:16px }
  .img-wrap img{ aspect-ratio:16/9 }
  .tile-in{ padding:12px }
  .tile h3{ font-size:16px }

  .grid{ grid-template-columns:1fr; gap:16px }
  .list{ gap:14px }

  .post{ grid-template-columns:1fr }
  .post .img-wrap{ height:auto }
  .post .img-wrap img{ aspect-ratio:16/9 }
  .post .b{ padding:14px 12px }
  .post h2{ font-size:18px; margin:4px 0 6px }
  .post p{ font-size:14px; -webkit-line-clamp:2 }

  aside{ position:static }
  .box{ padding:12px; border-radius:16px }
  .box h4{ font-size:11px; margin:0 0 8px }
  .search input, .search button{ padding:10px 12px; border-radius:12px }
  .chips{ gap:6px }
  .chip{ font-size:13px; padding:7px 10px }

  .pager{ padding:6px; border-radius:14px }
  .page{ min-width:40px; height:40px; border-radius:12px }
  .ghost{ padding:10px 12px; border-radius:12px }

  .foot{ grid-template-columns:1fr; padding:16px 0; gap:8px }
}

/* Ultra-small phones */
@media (max-width: 600px){
  .hero-title{ font-size:24px }
  .post h2{ font-size:17px }
  .popular img{ width:96px; height:68px }
}

/* Better scroll perf + accessibility */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important }
}

/* 1) Absolute stop: no image can exceed its box */
img, video, canvas, svg { max-width:100%; height:auto; display:block }

.content a { color: color-mix(in oklab, var(--p) 78%, white); }

/* TABLES — luxury green, matte */
.article table{
  width:100%;
  max-width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin:26px 0;
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  overflow:hidden;
  background:rgba(255,255,255,.04);
  box-shadow:0 20px 60px -26px rgba(79,163,122,.16);
  backdrop-filter:blur(14px);
  table-layout:fixed;
}
.article th, .article td{
  padding:14px 18px;
  text-align:left;
  border-bottom:1px solid rgba(255,255,255,.10);
  word-break:break-word;
}
.article th{
  background:linear-gradient(135deg,
    color-mix(in oklab, var(--p) 78%, #000),
    color-mix(in oklab, var(--s) 88%, #000)
  );
  color:#fff;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em;
  font-size:13px;
}
.article tr:last-child td{border-bottom:none;}
.article tr:hover td{
  background:color-mix(in oklab, var(--s) 12%, transparent);
  transition:.25s;
}
.article td{
  font-size:15px;
  color:var(--fg);
}
.article caption{
  caption-side:top;
  text-align:left;
  color:var(--muted);
  font-size:14px;
  margin-bottom:8px;
}

/* ===== MOBILE FIX ===== */
@media(max-width:700px){
  .article table{ width:100%; table-layout:fixed; word-wrap:break-word; }
  .article th, .article td{ white-space:normal !important; word-break:break-word; padding:10px 8px; }
  .article th{ font-size:12px; }
  .article td{ font-size:14px; }
  .article{ overflow-x:hidden; }
}

/* Read meta pill — luxury green */
.readmeta{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color:color-mix(in oklab, var(--fg) 86%, var(--muted));
  font:600 13px/1.1 system-ui,-apple-system,Segoe UI,Roboto,Arial;
  letter-spacing:.2px;
  margin:10px 0 14px;
}
.readmeta__dot{
  width:8px;height:8px;border-radius:50%;
  background: linear-gradient(90deg,var(--p),var(--t));
  box-shadow:0 0 10px rgba(79,163,122,.16);
}
.readmeta__sep{ opacity:.5; padding:0 6px; }
