/* Huyances: light, Helvetica, ranked lists. Three columns on desktop, a swipeable strip on mobile. */

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  background: hsl(215 45% 98%);
  color: #111827;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; }

/* Mobile tabs: hidden on desktop, sticky strip on phones */
.tabs {
  display: none; justify-content: center; gap: 4px;
  height: 48px; align-items: center;
  background: #fff; border-bottom: 1px solid #e3e8ef;
  position: sticky; top: 0; z-index: 2;
}
.tab {
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  color: #6b7280; padding: 0 14px; line-height: 46px;
  border-bottom: 2px solid transparent;
}
.tab.current { color: #111827; border-bottom-color: #1d4ed8; }

/* Columns */
.columns {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  max-width: 1500px; margin: 0 auto; padding: 16px;
}
.col { background: #fff; border: 1px solid #e3e8ef; border-radius: 10px; padding: 0 18px 16px; min-width: 0; scroll-margin-top: 16px; }
.col-title {
  position: sticky; top: 0; z-index: 1;
  margin: 0 -18px 12px; padding: 14px 18px 10px;
  background: #fff; border-bottom: 1px solid #eef1f5; border-radius: 10px 10px 0 0;
  font-size: 12px; letter-spacing: 0.09em; font-weight: 600; color: #6b7280; text-transform: uppercase;
}
.notice { font-size: 14.5px; color: #6b7280; margin: 8px 0; }

/* Stories */
.digest { display: flex; flex-direction: column; }
.story {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid #eef1f5;
}
.story:first-child { padding-top: 0; }
.story:last-child { border-bottom: none; padding-bottom: 0; }
.story-rank {
  flex: 0 0 24px; padding-top: 2px;
  font-size: 12px; font-weight: 600; color: #9ca3af; font-variant-numeric: tabular-nums;
}
.story-body { flex: 1 1 auto; min-width: 0; }
.story-title { font-size: 15.5px; line-height: 1.35; font-weight: 500; display: block; color: #111827; }
.story-title:hover { color: #1d4ed8; }
.story-title:visited { color: #6b7280; }
.story-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  margin-top: 5px; font-size: 12.5px; color: #6b7280;
}
.story-src, .story-also a { display: inline-flex; align-items: center; gap: 5px; }
.story-also { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; }
.story-also a { color: #6b7280; }
.story-also a:hover { color: #111827; }
.favicon { width: 14px; height: 14px; border-radius: 3px; flex: 0 0 14px; }
.story-score {
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 3px 6px; border-radius: 999px;
  background: #eef1f5; color: #6b7280; font-variant-numeric: tabular-nums;
}
.story-score.hot { background: #fde68a; color: #78350f; }
.story-why { font-size: 14px; line-height: 1.45; color: #374151; margin: 5px 0 0; }
.story-thumb {
  flex: 0 0 72px; width: 72px; height: 54px; margin-top: 2px;
  border-radius: 8px; overflow: hidden; background: #eef1f5;
}
.story-thumb img { width: 100%; height: 100%; object-fit: cover; }
.digest-footer { margin-top: 12px; font-size: 12px; color: #9ca3af; }

/* Narrow desktop: three columns still fit, the thumbnails do not */
@media (min-width: 1000px) and (max-width: 1250px) {
  .story-thumb { display: none; }
}

/* Phones and tablets: one column per screen, swipe between them */
@media (max-width: 999px) {
  .tabs { display: flex; }
  .columns {
    display: flex; gap: 0; padding: 0; max-width: none;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .columns::-webkit-scrollbar { display: none; }
  .col {
    flex: 0 0 100%; scroll-snap-align: start;
    border: none; border-radius: 0; padding: 0 12px 16px;
    background: transparent; scroll-margin-top: 48px; /* the sticky tab strip */
  }
  .col-title { display: none; } /* the tab strip already names the column */
  .digest { padding-top: 12px; }
  .story { gap: 10px; }
  .story-title { font-size: 16px; }
}
