/* UnseenSMP: home page news (rendered by unseen-news.js). Uses the --u-* colours from unseen-polish.css. */
.page-index .un-news{margin:0 0 42px;animation:none}
.un-news{text-align:left}
.un-news *,.un-reader *{box-sizing:border-box}
.un-news .un-title{margin:0 0 30px;font-size:1.75rem;font-weight:800;line-height:1.2;letter-spacing:-.04em;color:var(--u-text);text-align:left}

/* Category colour (the post's kicker): bright on the night art, darker on the light theme. */
[data-kind]{--k:#c9a6ff}
[data-kind="launch"]{--k:#d08cff}
[data-kind="vote"]{--k:#8ef07a}
[data-kind="rules"]{--k:#ffb86b}
[data-kind="media"]{--k:#ff8ad8}
[data-kind="store"]{--k:#ffc94d}
[data-kind="event"]{--k:#ff9d57}
[data-kind="patch"]{--k:#8fb6ff}
:root[data-theme="light"] .un-row,:root[data-theme="light"] .un-reader{--k:#6435e8}
:root[data-theme="light"] .un-row[data-kind="launch"],:root[data-theme="light"] .un-reader[data-kind="launch"]{--k:#7a2fd0}
:root[data-theme="light"] .un-row[data-kind="vote"],:root[data-theme="light"] .un-reader[data-kind="vote"]{--k:#2f7d22}
:root[data-theme="light"] .un-row[data-kind="rules"],:root[data-theme="light"] .un-reader[data-kind="rules"]{--k:#a55200}
:root[data-theme="light"] .un-row[data-kind="media"],:root[data-theme="light"] .un-reader[data-kind="media"]{--k:#b8236a}
:root[data-theme="light"] .un-row[data-kind="store"],:root[data-theme="light"] .un-reader[data-kind="store"]{--k:#8f5d00}
:root[data-theme="light"] .un-row[data-kind="event"],:root[data-theme="light"] .un-reader[data-kind="event"]{--k:#a8480a}
:root[data-theme="light"] .un-row[data-kind="patch"],:root[data-theme="light"] .un-reader[data-kind="patch"]{--k:#2d5fc4}

.un-meta{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;margin:0 0 12px;font-size:.875rem;line-height:1.4}
.un-cat{font-size:.875rem;font-weight:700;color:var(--k)}
.un-date{color:var(--u-muted)}
.un-head{flex:0 0 auto;width:28px;height:28px;border-radius:4px;image-rendering:pixelated;background:rgba(0,0,0,.25)}
.un-head.is-empty{background:none}
.un-by{display:inline-flex;align-items:center;gap:9px;font-size:.875rem;font-weight:600;color:var(--u-text-2)}

/* ---------------------------------------------------------------- featured story (always on the night art) */
.un-feature{--u-text:#f8f4ff;--u-text-2:#ddd3ee;--u-muted:#b9acd0;position:relative;isolation:isolate;display:flex;min-height:280px;border:1px solid rgba(190,150,255,.28);border-radius:20px;color:var(--u-text);background:#0d0a16 url('/assets/bg/ruins-dark.jpg') 75% 38%/cover no-repeat}
.un-feature::before{content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;background:linear-gradient(90deg,rgba(10,7,18,.95) 0%,rgba(10,7,18,.86) 45%,rgba(10,7,18,.25) 100%)}
.un-feature-text{display:flex;flex-direction:column;max-width:64ch;padding:34px 36px 30px}
.un-news .un-feature-title{margin:0 0 10px;font-size:clamp(1.75rem,3vw,2.5rem);font-weight:800;line-height:1.08;letter-spacing:-.045em;color:#fff;text-align:left;text-wrap:balance}
.un-feature-excerpt{margin:0;font-size:1.0625rem;line-height:1.6;color:var(--u-text-2)}
.un-feature-foot{display:flex;flex-wrap:wrap;align-items:center;gap:14px 20px;margin-top:auto;padding-top:26px}
.un-feature-foot .usmp-button{flex:0 0 auto}

/* ---------------------------------------------------------------- earlier posts */
.un-list,.store-text .un-news ul.un-list{margin:16px 0 0;padding:0;list-style:none;overflow:hidden;border:1px solid var(--u-border);border-radius:16px;background:var(--u-surface)}
.un-row+.un-row{border-top:1px solid var(--u-border)}
.un-row[hidden]{display:none}
.un-row-btn{all:unset;box-sizing:border-box;display:grid;grid-template-columns:52px minmax(0,1fr) 28px;align-items:center;gap:20px;width:100%;padding:18px 22px;cursor:pointer;transition:background .15s}
.un-row-btn:hover{background:var(--u-surface-hover)}
.un-row-btn:focus-visible{outline:2px solid var(--u-accent);outline-offset:-3px;border-radius:14px}
.un-row-date{display:flex;flex-direction:column;align-items:center;line-height:1;color:var(--u-muted)}
.un-row-date b{font-size:1.5rem;font-weight:800;letter-spacing:-.03em;color:var(--u-text)}
.un-row-date span{margin-top:5px;font-size:.75rem;font-weight:600}
.un-row-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.un-row-main .un-cat{font-size:.8125rem}
.un-row-title{font-size:1.0625rem;font-weight:700;line-height:1.35;color:var(--u-text)}
.un-row-btn:hover .un-row-title{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.un-row-excerpt{overflow:hidden;font-size:.875rem;line-height:1.5;color:var(--u-muted);text-overflow:ellipsis;white-space:nowrap}
.un-older{display:flex;margin:16px auto 0}

/* ---------------------------------------------------------------- reader window */
html.un-lock{overflow:hidden}
.un-reader{position:fixed;inset:0;z-index:1000;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:32px 20px;border:0;overflow:auto;overscroll-behavior:contain;background:rgba(6,4,12,.68);color:var(--u-text);font:inherit;text-align:left}
.un-reader:not([open]){display:none}
.un-reader[open]{display:flex;animation:un-fade .2s ease both}
.un-reader::backdrop{background:transparent}
.un-reader.is-closing{animation:un-fade-out .16s ease both}
.un-reader-panel{position:relative;width:min(720px,100%);margin:auto;border:1px solid var(--u-border-strong);border-radius:18px;background:var(--u-surface-solid);box-shadow:0 30px 80px rgba(0,0,0,.5);animation:un-rise .28s cubic-bezier(.2,.8,.2,1) both}
.un-reader.is-closing .un-reader-panel{animation:un-sink .16s ease both}
@keyframes un-fade{from{opacity:0}}
@keyframes un-fade-out{to{opacity:0}}
@keyframes un-rise{from{opacity:0;transform:translateY(16px)}}
@keyframes un-sink{to{opacity:0;transform:translateY(10px)}}
.un-reader-head{padding:30px 34px 22px;border-bottom:1px solid var(--u-border)}
.un-reader-title{margin:0 0 16px;padding-right:44px;font-size:clamp(1.5rem,3.4vw,2.1rem);font-weight:800;line-height:1.15;letter-spacing:-.035em;color:var(--u-text);text-wrap:balance}
.un-reader-body{max-width:68ch;padding:24px 34px 6px;font-size:1rem;line-height:1.7;color:var(--u-text-2)}
.un-reader-body p{margin:0 0 14px;white-space:pre-line;overflow-wrap:anywhere}
.un-reader-body .un-reader-lead{font-size:1.125rem;line-height:1.6;color:var(--u-text)}
.un-reader-body h4{margin:24px 0 8px;font-size:1rem;font-weight:700;color:var(--u-text)}
.un-reader-body ul{display:grid;gap:6px;margin:0 0 16px;padding:0;list-style:none}
.un-reader-body li{position:relative;padding-left:20px}
.un-reader-body li::before{content:'';position:absolute;left:3px;top:.68em;width:6px;height:6px;background:var(--k)}
.un-reader-body a{color:var(--u-accent);text-decoration:underline;text-underline-offset:3px}
.un-reader-foot{display:flex;flex-wrap:wrap;gap:10px;padding:16px 34px 30px}
.un-reader-foot .usmp-button{flex:0 0 auto}
.un-reader-x{-webkit-appearance:none;appearance:none;position:absolute;top:18px;right:18px;display:grid;place-items:center;width:40px;height:40px;margin:0;padding:0;border:1px solid var(--u-border-strong);border-radius:10px;background:transparent;color:var(--u-text);cursor:pointer;transition:background .15s}
.un-reader-x:hover{background:var(--u-surface-hover)}
.un-reader-x:focus-visible{outline:2px solid var(--u-accent);outline-offset:2px}
.un-reader-x svg{display:block;width:18px;height:18px}

/* ---------------------------------------------------------------- responsive */
@media(max-width:650px){
  .un-news .un-title{margin-bottom:22px;font-size:1.5rem}
  .un-feature{min-height:0;border-radius:16px;background-position:62% 30%}
  .un-feature::before{background:linear-gradient(180deg,rgba(10,7,18,.55) 0%,rgba(10,7,18,.92) 60%)}
  .un-feature-text{padding:22px 18px 20px}
  .un-news .un-feature-title{font-size:1.75rem}
  .un-feature-excerpt{font-size:1rem}
  .un-feature-foot{flex-direction:row-reverse;justify-content:space-between;padding-top:20px}
  .un-feature-foot .usmp-button{flex:0 0 auto;min-height:44px}
  .un-list,.store-text .un-news ul.un-list{border-radius:14px}
  .un-row-btn{grid-template-columns:40px minmax(0,1fr);gap:14px;padding:16px}
  .un-row-btn>.un-head{display:none}
  .un-row-date b{font-size:1.25rem}
  .un-row-excerpt{display:-webkit-box;white-space:normal;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .un-reader{padding:0}
  .un-reader-panel{width:100%;margin:auto 0 0;border-radius:18px 18px 0 0;animation-name:un-sheet}
  @keyframes un-sheet{from{transform:translateY(100%)}}
  .un-reader-head{padding:24px 18px 18px}
  .un-reader-body{padding:20px 18px 4px}
  .un-reader-foot{padding:12px 18px 26px}
  .un-reader-foot .usmp-button{flex:1 1 auto}
  .un-reader-x{top:14px;right:14px}
}
@media(prefers-reduced-motion:reduce){
  .un-reader[open],.un-reader.is-closing,.un-reader-panel,.un-reader.is-closing .un-reader-panel{animation:none}
}
.usmp-lite .un-reader[open],.usmp-lite .un-reader-panel{animation:none}

/* ---------------------------------------------------------------- light theme: featured story on the daytime ruins */
:root[data-theme="light"] .un-feature{--u-text:#1d1430;--u-text-2:#3d3156;--u-muted:#685a84;--k:#6435e8;border-color:rgba(122,76,245,.26);box-shadow:0 18px 50px rgba(92,56,170,.14);background:#efe8ff url('/assets/bg/ruins-light.jpg') 75% 38%/cover no-repeat}
:root[data-theme="light"] .un-feature[data-kind="launch"]{--k:#7a2fd0}
:root[data-theme="light"] .un-feature[data-kind="vote"]{--k:#2f7d22}
:root[data-theme="light"] .un-feature[data-kind="rules"]{--k:#a55200}
:root[data-theme="light"] .un-feature[data-kind="media"]{--k:#b8236a}
:root[data-theme="light"] .un-feature[data-kind="store"]{--k:#8f5d00}
:root[data-theme="light"] .un-feature[data-kind="event"]{--k:#a8480a}
:root[data-theme="light"] .un-feature[data-kind="patch"]{--k:#2d5fc4}
:root[data-theme="light"] .un-feature::before{background:linear-gradient(90deg,rgba(251,248,255,.96) 0%,rgba(247,242,255,.86) 45%,rgba(247,242,255,.28) 100%)}
:root[data-theme="light"] .un-news .un-feature-title{color:var(--u-text)}
:root[data-theme="light"] .un-feature .un-head{background:rgba(122,76,245,.12)}
@media(max-width:650px){
  :root[data-theme="light"] .un-feature::before{background:linear-gradient(180deg,rgba(251,248,255,.7) 0%,rgba(247,242,255,.95) 60%)}
}
