/* THE FEED — daily heartbeat app. All rules scoped to .w-feed. */

.win.w-feed {
  --c: var(--c-web);
  width: min(1100px, calc(100vw - 420px));   /* clears Avery Tunes (380px) + margin */
  height: calc(100vh - var(--taskbar-h) - 28px);
  background: var(--paper);
  color: var(--ink);
}
.w-feed .win-body { display: flex; flex-direction: column; overflow: hidden; padding: 0; }

/* faux browser url bar */
.w-feed .feed-urlbar {
  display: flex; align-items: center; gap: 8px; flex: none;
  background: var(--white); border-bottom: 2px solid var(--ink); padding: 6px 12px;
}
.w-feed .feed-urlbar .nav {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 13px;
  border: 2px solid var(--ink); background: var(--paper); width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.w-feed .feed-urlbar .addr {
  flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500;
  border: 2px solid var(--ink); background: var(--paper); padding: 4px 10px;
}
.w-feed .feed-urlbar .addr b { color: var(--c-web); -webkit-text-stroke: 0.4px var(--ink); }

.w-feed .feed-scroll { flex: 1; overflow-y: auto; scrollbar-width: thin; min-height: 0; }

/* masthead */
.w-feed .feed-mast {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border-bottom: 4px solid var(--ink); padding: 14px 26px 12px; background: var(--paper);
  position: sticky; top: 0; z-index: 5;
}
.w-feed .feed-mast h2 {
  font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 38px;
  line-height: 0.95; letter-spacing: -0.02em; margin: 0;
}
.w-feed .feed-mast h2 span { color: var(--c-web); -webkit-text-stroke: 1.5px var(--ink); }
.w-feed .feed-streak {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  border: 2px solid var(--ink); background: var(--c-arcade); padding: 4px 10px; box-shadow: 3px 3px 0 var(--ink);
}
.w-feed .feed-dateline {
  margin-left: auto; display: flex; gap: 18px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
}

/* layout: stream + sticky rail */
.w-feed .feed-layout {
  display: grid; grid-template-columns: 1fr 390px; gap: 20px; padding: 20px 26px 8px;
  background: repeating-linear-gradient(0deg, transparent 0 26px, rgba(10,10,10,0.03) 26px 27px);
}
@media (max-width: 1100px) {
  .w-feed .feed-layout { grid-template-columns: 1fr; }
  .w-feed .feed-rail { position: static; }
}
.w-feed .feed-rail { display: flex; flex-direction: column; gap: 16px; align-self: start; position: sticky; top: 84px; }

/* shared kicker + visit */
.w-feed .kicker {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; display: inline-block; border: 2px solid var(--ink); padding: 2px 7px;
}
.w-feed .visit {
  display: inline-block; font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 13px;
  background: var(--accent); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  padding: 8px 16px; cursor: pointer; text-decoration: none; color: var(--ink);
}
.w-feed .visit:hover { background: var(--hover); transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }

/* stream posts */
.w-feed .post { border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); background: var(--white); margin-bottom: 18px; }
.w-feed .post-head { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 2px solid var(--ink); }
.w-feed .post-head .avatar {
  width: 32px; height: 32px; border: 2px solid var(--ink); display: flex; align-items: center;
  justify-content: center; font-size: 16px; background: var(--paper); flex: none;
}
.w-feed .post-head .who { font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 14px; }
.w-feed .post-head .what { font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.1em; opacity: 0.6; text-transform: uppercase; }
.w-feed .post-head .when { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; opacity: 0.5; }
.w-feed .post-body { padding: 13px 16px; }
.w-feed .post-body h4 { font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 19px; margin: 0 0 6px; }
.w-feed .post-body p { font-size: 13.5px; line-height: 1.55; max-width: 640px; margin: 0; }
.w-feed .post.p-holiday .avatar { background: var(--c-arcade); }   /* orange */
.w-feed .post.p-site    .avatar { background: var(--c-create); }   /* lime */
.w-feed .post.p-web     .avatar { background: var(--c-web); }      /* purple */
.w-feed .post.p-fact    .avatar { background: var(--c-flyers); }   /* cyan */
.w-feed .post.p-thought .avatar { background: var(--c-create); }   /* lime — Mr. Avery */
.w-feed .post.p-history .avatar { background: var(--c-block); }    /* red-orange */
.w-feed .post.p-thought .post-body p { font-size: 16px; font-weight: 600; font-style: italic; }

/* compact site-of-the-day row */
.w-feed .site-row { display: flex; gap: 14px; align-items: stretch; }
.w-feed .site-row img { width: 170px; border: 2px solid var(--ink); object-fit: cover; display: block; background: #ddd; flex: none; }
.w-feed .site-row .txt { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.w-feed .site-row .txt p { flex: 1; }

/* end cap */
.w-feed .caught-up {
  text-align: center; font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 15px;
  border: 2px dashed var(--ink); padding: 14px; margin-bottom: 6px; background: var(--paper);
}
.w-feed .caught-up small { display: block; font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 10px; margin-top: 4px; opacity: 0.6; }

/* "Coming in September" placeholder (pre-launch) */
.w-feed .feed-soon {
  text-align: center; max-width: 520px; margin: 40px auto;
  border: 2px solid var(--ink); background: var(--white);
  box-shadow: 6px 6px 0 var(--ink); padding: 34px 30px;
}
.w-feed .feed-soon-emoji { font-size: 56px; line-height: 1; margin-bottom: 10px; }
.w-feed .feed-soon h3 {
  font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 28px;
  letter-spacing: -0.01em; margin: 0 0 12px; color: var(--c-web);
  -webkit-text-stroke: 1.2px var(--ink);
}
.w-feed .feed-soon p { font-size: 14px; line-height: 1.55; margin: 0 auto; max-width: 420px; }
.w-feed .feed-soon-sub {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; letter-spacing: 0.06em;
  margin-top: 14px !important; opacity: 0.7;
}

/* rail tiles */
.w-feed .rail-tile { border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); background: var(--white); padding: 13px 15px; }
.w-feed .rail-tile .kicker { margin-bottom: 9px; }
.w-feed .rail-tile h4 { font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 16px; margin: 0 0 5px; }
.w-feed .rail-tile p { font-size: 12.5px; line-height: 1.5; margin: 0; }
.w-feed .rail-tile.t-joke .kicker { background: var(--c-tech); color: var(--white); }
.w-feed .rail-tile.t-trivia .kicker { background: var(--c-arcade); }
.w-feed .rail-tile.t-word .kicker { background: var(--c-flyers); }
.w-feed .rail-tile.t-wyr { background: var(--ink); color: var(--white); }
.w-feed .rail-tile.t-wyr .kicker { background: var(--c-tech); color: var(--white); border-color: var(--white); }

/* WYR voting */
.w-feed .wyr-opt {
  position: relative; display: block; width: 100%; text-align: left; margin-top: 10px;
  font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 13.5px;
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--c-tech); background: var(--paper); color: var(--ink);
  padding: 11px 12px; cursor: pointer; overflow: hidden;
}
.w-feed .wyr-opt:hover:not(.voted) { background: var(--accent); }
.w-feed .wyr-opt .bar { position: absolute; inset: 0; width: 0; background: var(--c-tech); opacity: 0.85; transition: width 0.7s cubic-bezier(0.2,0.8,0.2,1); z-index: 0; }
.w-feed .wyr-opt .t { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 8px; }
.w-feed .wyr-opt .pct { font-family: 'JetBrains Mono', monospace; font-size: 12px; opacity: 0; }
.w-feed .wyr-opt.voted { cursor: default; }
.w-feed .wyr-opt.voted .pct { opacity: 1; }
.w-feed .wyr-opt.picked { outline: 3px solid var(--accent); outline-offset: -3px; }
.w-feed .wyr-foot { font-family: 'JetBrains Mono', monospace; font-size: 10px; margin-top: 9px; opacity: 0.7; }

/* trivia */
.w-feed .triv-opt {
  display: block; width: 100%; text-align: left; margin-top: 8px;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 13px;
  border: 2px solid var(--ink); background: var(--paper); padding: 9px 11px; cursor: pointer; color: var(--ink);
}
.w-feed .triv-opt:hover:not(:disabled) { background: var(--accent); }
.w-feed .triv-opt.correct { background: var(--accent); }
.w-feed .triv-opt.wrong { background: var(--hover); color: var(--white); }
.w-feed .triv-opt:disabled { cursor: default; }
.w-feed .triv-result { display: none; margin-top: 10px; border: 2px solid var(--ink); padding: 9px 11px; font-size: 12.5px; line-height: 1.5; background: var(--paper); }
.w-feed .triv-result.show { display: block; }
.w-feed .triv-result b { font-family: 'Geologica', sans-serif; }

/* mystery word */
.w-feed .mw-blanks { display: flex; gap: 6px; justify-content: center; margin: 6px 0 10px; flex-wrap: wrap; }
.w-feed .mw-blanks span {
  width: 34px; height: 40px; border: 2px solid var(--ink); background: var(--paper);
  font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 22px;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase;
}
.w-feed .mw-blanks span.hit { background: var(--accent); }
.w-feed .mw-lives { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-align: center; margin-bottom: 9px; }
.w-feed .mw-kb { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.w-feed .mw-kb button {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 13px;
  border: 2px solid var(--ink); background: var(--white); padding: 7px 0; cursor: pointer; text-transform: uppercase; color: var(--ink);
}
.w-feed .mw-kb button:hover:not(:disabled) { background: var(--accent); }
.w-feed .mw-kb button.hit { background: var(--accent); }
.w-feed .mw-kb button.miss { background: var(--ink); color: var(--white); opacity: 0.45; }
.w-feed .mw-kb button:disabled { pointer-events: none; }
.w-feed .mw-reveal { display: none; margin-top: 11px; border: 2px solid var(--ink); padding: 10px 12px; background: var(--paper); font-size: 12.5px; line-height: 1.55; }
.w-feed .mw-reveal.show { display: block; }
.w-feed .mw-reveal .verdict { font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 15px; margin-bottom: 5px; }
.w-feed .mw-reveal .wd { font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 17px; }
.w-feed .mw-reveal .pos { font-weight: 400; font-size: 11px; }
.w-feed .mw-reveal .sent { margin-top: 6px; border-left: 4px solid var(--c-flyers); padding-left: 9px; font-style: italic; }
