/* /reddit: Wurt's Reddit-style home feed, hosted on wurt.app. */
:root {
  --bg: #dae0e6;
  --card: #ffffff;
  --ink: #1a1a1b;
  --soft: #576f76;
  --line: #ccd5dc;
  --orange: #ff4500;
  --orange-dark: #d93a00;
  --blue: #0079d3;
  --down: #7193ff;
  --font: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--font); }
a { color: var(--blue); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 30; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; background: var(--card); border-bottom: 1px solid var(--line); padding: 8px 20px; }
.brand { font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand::before { content: ""; width: 30px; height: 30px; border-radius: 50%; background: var(--orange); box-shadow: inset 0 0 0 5px #fff3; }
.search { flex: 1; max-width: 560px; margin: 0 auto; }
.search input { width: 100%; font: inherit; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: #f6f7f8; color: var(--ink); }
.search input:hover { border-color: var(--blue); }
.open { font-weight: 700; color: #fff; background: var(--orange); text-decoration: none; padding: 8px 18px; border-radius: 999px; white-space: nowrap; }
.open:hover { background: var(--orange-dark); }

.banner { height: 120px; position: relative; overflow: hidden; background: linear-gradient(110deg, #ff4500, #ff8717 40%, #ffb000 60%, #ff4500); background-size: 300% 100%; animation: shift 12s ease-in-out infinite alternate; }
@keyframes shift { to { background-position: 100% 0; } }
.banner i { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .18); animation: float 9s ease-in-out infinite; }
.banner i:nth-child(1) { width: 120px; height: 120px; left: 8%; top: -30px; }
.banner i:nth-child(2) { width: 70px; height: 70px; left: 55%; top: 40px; animation-delay: -3s; }
.banner i:nth-child(3) { width: 160px; height: 160px; right: 2%; top: -60px; animation-delay: -6s; }
@keyframes float { 50% { transform: translateY(14px) scale(1.05); } }

.community { background: var(--card); }
.community-in { max-width: 1000px; margin: 0 auto; padding: 0 20px 14px; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.community-icon { width: 88px; height: 88px; border-radius: 50%; border: 4px solid #fff; background: #ffe9dc; object-fit: cover; margin-top: -22px; }
.community-text { flex: 1; min-width: 220px; }
h1 { font-size: clamp(22px, 3vw, 30px); line-height: 1.2; margin: 10px 0 2px; font-weight: 800; }
.handle { margin: 0; color: var(--soft); font-size: 14px; }
.join { display: inline-block; font-weight: 700; color: #fff; background: var(--blue); text-decoration: none; padding: 8px 22px; border-radius: 999px; }
.join:hover { background: #1484d6; }

.layout { max-width: 1000px; margin: 0 auto; padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 24px; align-items: start; }

.flairs { display: flex; flex-wrap: wrap; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; }
.flairs button { font: 700 13px var(--font); color: var(--soft); background: #f6f7f8; border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.flairs button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.post { display: grid; grid-template-columns: 44px minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; overflow: hidden; }
.post:hover { border-color: #898989; }
.post.pinned { border-color: var(--orange); }
.votes { background: #f8f9fa; display: flex; flex-direction: column; align-items: center; padding: 8px 0; gap: 2px; }
.votes span { font-size: 11px; font-weight: 700; color: var(--soft); }
.votes button { width: 26px; height: 24px; border: 0; background: transparent; cursor: pointer; border-radius: 4px; position: relative; color: #878a8c; }
.votes button::before { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; }
.votes .up::before { border-bottom: 10px solid currentColor; }
.votes .down::before { border-top: 10px solid currentColor; }
.votes button:hover { background: #e8e8e8; }
.votes .up[aria-pressed="true"] { color: var(--orange); animation: bump .35s ease; }
.votes .down[aria-pressed="true"] { color: var(--down); animation: bump .35s ease; }
.votes.voted-up span { color: var(--orange); }
.votes.voted-down span { color: var(--down); }
@keyframes bump { 40% { transform: scale(1.35); } }
.post-body { padding: 10px 14px 12px; }
.meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 6px; font-size: 12px; color: var(--soft); }
.meta img { width: 20px; height: 20px; border-radius: 50%; background: #ffe9dc; object-fit: cover; }
.meta b { color: var(--ink); }
.flair { font-weight: 700; border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.f-pin { background: #ffe1d4; color: var(--orange-dark); }
.f-img { background: #dbeafe; color: #1d4ed8; }
.f-vid { background: #fee2e2; color: #b91c1c; }
.f-meme { background: #fef3c7; color: #92400e; }
.f-gif { background: #ede9fe; color: #6d28d9; }
.f-anime { background: #fce7f3; color: #be185d; }
.f-photo { background: #dcfce7; color: #15803d; }
.f-port { background: #ffe4e6; color: #be123c; }
.f-guide { background: #e0f2fe; color: #0369a1; }
.f-sub { background: #f1f5f9; color: #334155; }
.post h3 { font-size: 18px; line-height: 1.3; margin: 0 0 6px; font-weight: 600; }
.post p { margin: 0 0 10px; }
.media { position: relative; margin: 4px 0 12px; border-radius: 8px; overflow: hidden; background: #000; }
.media img { display: block; width: 100%; height: auto; max-height: 460px; object-fit: cover; }
.vbar { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 10px; color: #fff; font-size: 13px; }
.vbar b { width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .55); display: grid; place-items: center; font-size: 11px; }
.vbar i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .35); position: relative; overflow: hidden; }
.vbar i::after { content: ""; position: absolute; inset: 0; background: var(--orange); transform-origin: left; animation: progress 6s linear infinite; }
.vbar.long i::after { animation-duration: 30s; }
.vbar em { font-style: normal; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.meme span { position: absolute; left: 0; right: 0; text-align: center; font: 900 clamp(20px, 3.4vw, 34px)/1.05 Impact, "Arial Black", sans-serif; color: #fff; text-transform: uppercase; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 0 2px 0 #000; padding: 0 10px; }
.meme .cap-top { top: 12px; }
.meme .cap-bottom { bottom: 12px; }
.gif .badge { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, .65); color: #fff; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.gallery { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 4px 0 12px; border-radius: 8px; overflow: hidden; }
.gallery img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 35%; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 4px 0 12px; border-radius: 8px; overflow: hidden; }
.ba figure { margin: 0; position: relative; }
.ba img { display: block; width: 100%; height: auto; }
.ba figcaption { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.act { font-weight: 700; font-size: 13px; color: #fff; background: var(--orange); text-decoration: none; padding: 6px 14px; border-radius: 999px; }
.act:hover { background: var(--orange-dark); }
.act.ghost { background: transparent; color: var(--blue); border: 1px solid var(--blue); }
.empty { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 18px; text-align: center; color: var(--soft); }

.faq { margin-top: 22px; }
.faq h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .04em; color: var(--soft); margin: 0 0 10px; }
.faq-post { background: var(--card); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 8px; padding: 0 14px; }
.faq-post summary { cursor: pointer; font-size: 16px; font-weight: 600; padding: 12px 0; list-style: none; }
.faq-post summary::-webkit-details-marker { display: none; }
.faq-post summary::before { content: "Q"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 12px; font-weight: 800; }
.faq-post p { margin: 0 0 14px 30px; }

.side { position: sticky; top: 70px; display: grid; gap: 14px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.box h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--soft); margin: 0 0 10px; }
.box p { margin: 0 0 12px; }
.facts { list-style: none; margin: 0 0 14px; padding: 12px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts b { display: block; font-size: 17px; }
.facts span { font-size: 12px; color: var(--soft); }
.join.wide { display: block; text-align: center; }
.make { display: block; text-align: center; margin-top: 8px; font-weight: 700; color: var(--blue); text-decoration: none; border: 1px solid var(--blue); border-radius: 999px; padding: 7px 0; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12px; font-weight: 700; background: #f6f7f8; border-radius: 999px; padding: 4px 10px; }
.ideas { margin: 0; padding-left: 20px; }
.ideas li { margin-bottom: 6px; }

.site-foot { max-width: 1000px; margin: 0 auto; padding: 10px 20px 40px; font-size: 13px; color: var(--soft); }
.site-foot p { margin: 0; }
.site-foot a { color: var(--soft); }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
}
@media (max-width: 560px) {
  .topbar { gap: 10px; padding: 8px 12px; }
  .brand { font-size: 0; gap: 0; }
  .open { padding: 8px 12px; font-size: 13px; }
  .layout { padding: 12px; }
  .banner { height: 80px; }
  .community-in { padding: 0 12px 12px; }
  .post { grid-template-columns: 36px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .banner, .banner i, .votes button, .vbar i::after { animation: none !important; }
}
