/* MTsN 1 Tana Toraja — Tinta.com UI alignment hotfix V5.
   Scope strictly to public Tinta.com, no changes to content, links, forms, handlers.
   Requires DS46 + Neumorphism V3/V4. */

/* Cards: category chips must not cross the curve of the rounded top corner.
   Use internal padding instead of a relative-position hack, retaining responsive layout. */
body.tv-site .tv-grid > article.post-item.tv-card[data-title-outside-image],
body.tv-site .tv-news-sidebar article.post-item.tv-card[data-title-outside-image]{
  position:relative;
  padding:clamp(22px,3vw,30px)!important;
  border-radius:30px!important;
  min-width:0;
  overflow:visible;
  background:var(--nm-bg,#e7ebf0)!important;
  box-shadow:var(--nm-raised-light,6px 6px 13px rgba(163,177,198,.42), -6px -6px 13px rgba(255,255,255,.95))!important;
}
body.tv-site .tv-grid > article.post-item.tv-card[data-title-outside-image] > .badge-category,
body.tv-site .tv-news-sidebar article.post-item.tv-card[data-title-outside-image] > .badge-category{
  position:static!important;
  inset:auto!important;
  transform:none!important;
  display:inline-flex!important;
  align-items:center;
  width:max-content;
  max-width:100%;
  margin:0 0 10px!important;
  padding:8px 13px!important;
  border-radius:12px!important;
  border:1px solid rgba(255,255,255,.65)!important;
  background:var(--nm-bg,#e7ebf0)!important;
  color:#205b61!important;
  letter-spacing:.08em;
  line-height:1.3;
  overflow-wrap:anywhere;
  box-shadow:inset 3px 3px 7px rgba(163,177,198,.36),inset -3px -3px 7px rgba(255,255,255,.94)!important;
}
body.tv-site .tv-grid > article.post-item.tv-card[data-title-outside-image] > h3.title{
  margin:12px 0 18px!important;
  padding:0!important;
  overflow-wrap:anywhere;
}
body.tv-site .tv-grid > article.post-item.tv-card[data-title-outside-image] .image{
  border-radius:16px!important;
  overflow:hidden;
  margin:0 0 15px;
}
body.tv-site .tv-grid > article.post-item.tv-card[data-title-outside-image] .post-meta{
  margin:12px 0 0!important;
  color:#54616f!important;
}
body.tv-site .tv-grid > article.post-item.tv-card[data-title-outside-image] .description{
  color:#586572!important;
}

/* Tinta.com category/menu navigation: same raised pill geometry as reference.
   Keep anchor href and details open/closed behavior owned by existing application. */
body.tv-site .tv-nav .tv-container > a{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto;
  min-height:52px!important;
  padding:12px 19px!important;
  border:1px solid rgba(255,255,255,.72)!important;
  border-radius:17px!important;
  background:#e7ebf0!important;
  background-image:none!important;
  color:#0064dd!important;
  font-size:14px!important;
  font-weight:750!important;
  line-height:1.3!important;
  text-align:center;
  text-decoration:none!important;
  text-shadow:none!important;
  white-space:normal;
  box-shadow:8px 8px 16px rgba(163,177,198,.55),-8px -8px 16px rgba(255,255,255,.96)!important;
  transition:box-shadow .18s ease,transform .18s ease!important;
}
body.tv-site .tv-nav .tv-container > a:hover{
  box-shadow:10px 10px 18px rgba(163,177,198,.62),-10px -10px 18px #fff!important;
  transform:translateY(-1px);
}
body.tv-site .tv-nav .tv-container > a:is(:active,[aria-current="page"],.is-active){
  box-shadow:inset 6px 6px 12px rgba(163,177,198,.55),inset -6px -6px 12px rgba(255,255,255,.96)!important;
  transform:none;
  color:#0055c3!important;
}
body.tv-site .tv-nav .tv-container > a:focus-visible,
body.tv-site .tv-navigation > summary:focus-visible{
  outline:3px solid #3479e3!important;
  outline-offset:3px!important;
}
body.tv-site .tv-navigation > summary{
  display:flex;
  align-items:center;
  justify-content:center;
  width:52px!important;
  height:52px!important;
  padding:0!important;
  border-radius:17px!important;
  border:1px solid rgba(255,255,255,.7)!important;
  background:#e7ebf0!important;
  color:#145a54!important;
  box-shadow:8px 8px 16px rgba(163,177,198,.52),-8px -8px 16px rgba(255,255,255,.96)!important;
  cursor:pointer;
}
body.tv-site .tv-navigation[open] > summary{
  box-shadow:inset 5px 5px 10px rgba(163,177,198,.54),inset -5px -5px 10px #fff!important;
}
body.tv-site .tv-site-link,
body.tv-site .tv-news-filters > summary,
body.tv-site .tv-chips > a,
body.tv-site .tv-pagination a,
body.tv-site .pagination a,
body.tv-site .tv-button{
  border-radius:17px!important;
  border:1px solid rgba(255,255,255,.7)!important;
  background:#e7ebf0!important;
  color:#0064dd!important;
  box-shadow:8px 8px 16px rgba(163,177,198,.55),-8px -8px 16px rgba(255,255,255,.96)!important;
  text-decoration:none!important;
}
body.tv-site .tv-chips > a[aria-current="page"],
body.tv-site .tv-news-filters[open] > summary{
  box-shadow:inset 5px 5px 10px rgba(163,177,198,.5),inset -5px -5px 10px #fff!important;
}

/* Mobile dropdown: full-width two-column raised buttons; no cramped uneven pills. */
@media(max-width:760px){
  body.tv-site .tv-header .tv-navigation[open] > .tv-nav{
    display:block!important;
    top:100%;
    left:0;
    right:0;
    padding:20px 16px 26px!important;
    max-height:min(72dvh,600px);
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    background:#e7ebf0!important;
    border:1px solid rgba(255,255,255,.7)!important;
    box-shadow:0 18px 30px rgba(119,139,164,.25)!important;
    z-index:30;
  }
  body.tv-site .tv-navigation[open] > .tv-nav > .tv-container{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:15px!important;
    justify-content:stretch!important;
    align-items:stretch!important;
    width:100%!important;
    max-width:100%!important;
    padding:6px!important;
    overflow:visible!important;
  }
  body.tv-site .tv-navigation[open] > .tv-nav > .tv-container > a{
    min-width:0!important;
    width:100%!important;
    min-height:56px!important;
    padding:12px 11px!important;
    white-space:normal!important;
    overflow-wrap:anywhere;
    font-size:14px!important;
    box-shadow:6px 6px 13px rgba(163,177,198,.48),-6px -6px 13px #fff!important;
  }
  body.tv-site .tv-grid > article.post-item.tv-card[data-title-outside-image]{
    padding:24px 21px!important;
  }
}
@media(max-width:380px){
  body.tv-site .tv-navigation[open] > .tv-nav > .tv-container{
    gap:13px!important;
  }
  body.tv-site .tv-navigation[open] > .tv-nav > .tv-container > a{
    font-size:13px!important;
    padding-inline:8px!important;
  }
}
@media(min-width:761px){
  body.tv-site .tv-desktop-nav .tv-container{
    gap:14px!important;
    padding:16px 8px!important;
    overflow-x:auto;
    scrollbar-width:thin;
  }
  body.tv-site .tv-desktop-nav .tv-container > a{
    white-space:nowrap;
  }
}
@media(prefers-reduced-motion:reduce){
  body.tv-site .tv-nav .tv-container > a{transition:none!important;transform:none!important;}
}
