:root{
  /* AfterTheShift — industrial amber (Niterria-style depth) */
  --bg:#0C1014;
  --fg:#EEF1F4;
  --muted:#A9B4C3;
  --link:#FFFFFF;

  /* stronger separation like premium themes */
  --glass:rgba(255,255,255,.045);
  --glass2:rgba(255,255,255,.085);
  --stroke:rgba(255,255,255,.10);

  /* Brand amber */
  --p:#E68A2E;   /* primary */
  --s:#B85E22;   /* deep */
  --t:#F2C078;   /* highlight */

  --r:22px;
  --shadow:0 22px 70px -28px rgba(230,138,46,.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 + industrial glow */
  background:
    radial-gradient(1100px 520px at 62% 14%, rgba(230,138,46,.22), transparent 62%),
    radial-gradient(900px 520px at 18% 34%, rgba(184,94,34,.40), transparent 60%),
    radial-gradient(700px 420px at 88% 72%, rgba(242,192,120,.10), transparent 60%),
    linear-gradient(135deg, #2A1A10 0%, #111316 42%, #0C1014 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(42,26,16,.92) 0%,
    rgba(17,19,22,.72) 55%,
    rgba(12,16,20,.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(201,210,225,.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}
/* No gradient text (techy). Keep solid industrial accent. */
.header b{
  color:var(--p);
  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:#B6C0CF; font-size:13px}
.hero-img{border:1px solid var(--stroke); background:var(--glass); border-radius:22px; overflow:hidden}
.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 var(--stroke); background:var(--glass); border-radius:22px; padding:22px; line-height:1.7; font-size:18px}
.disclosure{font-size:13px; color:#b9c2d1; 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 var(--stroke); background:var(--glass); transition:transform .15s ease, box-shadow .25s}
.heart:hover{transform:translateY(-2px)}
.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 var(--stroke); background:var(--glass); border-radius:16px; padding:16px}
textarea{width:100%; border-radius:12px; padding:12px; background:var(--glass2); border:1px solid var(--stroke); 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 var(--stroke); background:var(--glass); border-radius:16px; padding:12px}
.avatar{width:52px; height:52px; border-radius:50%; object-fit:cover; border:1px solid var(--stroke)}
.c-head{display:flex; align-items:center; justify-content:space-between}
.c-name{font-weight:700}
.c-date{color:#AEB6C7; font-size:12px}
.c-actions a{margin-left:10px}
.edit-inp{width:100%; border-radius:10px; padding:10px; background:var(--glass2); border:1px solid var(--stroke); color:var(--fg)}

/* SIDEBAR (sticky) */
aside{position: sticky; top: 92px; height: max-content}
.box{border:1px solid var(--stroke); background:var(--glass); border-radius:22px; padding:16px; margin-bottom:16px}
.box h4{margin:4px 0 10px; font-size:12px; letter-spacing:.18em; text-transform:uppercase; color:#D8DFF0}
.search{position:relative; display:flex; gap:8px}
.search input{flex:1; border-radius:14px; padding:12px 14px; background:var(--glass2); border:1px solid var(--stroke); color:var(--fg)}
/* matte CTA button */
.search button{
  border:1px solid var(--stroke);
  background:linear-gradient(135deg,
    color-mix(in oklab, var(--p) 85%, #000),
    color-mix(in oklab, var(--s) 85%, #000)
  );
  color:white;
  border-radius:14px;
  padding:12px 14px;
  cursor:pointer
}
.chips{display:flex; flex-wrap:wrap; gap:8px}
.chip{border:1px solid var(--stroke); background:var(--glass2); 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 var(--stroke)}

/* FOOTER */
footer{border-top:1px solid var(--stroke); background:color-mix(in oklab, var(--bg) 88%, var(--s))}
.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:var(--glass); border:1px solid var(--stroke); 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 var(--stroke);
  background:linear-gradient(135deg,
    color-mix(in oklab, var(--p) 85%, #000),
    color-mix(in oklab, var(--s) 85%, #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)}

.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 var(--stroke) inset;
}
.btn-glass:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 25px -10px rgba(230,138,46,.22),0 0 0 1px var(--p) 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) 85%, #000),
    color-mix(in oklab, var(--s) 85%, #000)
  );
  color:#fff;
}
.btn-glass.confirm:hover{
  box-shadow:0 10px 30px -10px rgba(230,138,46,.28);
  transform:translateY(-2px) scale(1.02);
}

/* burger hidden on desktop */
.menu-toggle{
  display:none;border:1px solid var(--stroke);background:var(--glass);
  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 var(--stroke);
    background:rgba(12,16,20,.98);
    z-index: 50;
  }
  .nav-links.open{ display:flex !important; }
  .nav-links a{
    display:block; width:100%; padding:12px 10px;
    border:1px solid var(--stroke); border-radius:12px; background:var(--glass);
  }
  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 — kill purple glow, keep matte industrial */
.article table{
  width:100%;
  max-width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin:26px 0;
  border:1px solid var(--stroke);
  border-radius:18px;
  overflow:hidden;
  background:var(--glass);
  box-shadow:0 20px 60px -26px rgba(230,138,46,.18);
  backdrop-filter:blur(14px);
  table-layout:fixed;
}
.article th, .article td{
  padding:14px 18px;
  text-align:left;
  border-bottom:1px solid var(--stroke);
  word-break:break-word;
}
.article th{
  background:linear-gradient(135deg,
    color-mix(in oklab, var(--p) 85%, #000),
    color-mix(in oklab, var(--s) 85%, #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) 10%, 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 — remove neon cyan/purple */
.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(230,138,46,.18);
}
.readmeta__sep{ opacity:.5; padding:0 6px; }
