/* =========================================================
   PTD Today — WSJ-style front-end
   ========================================================= */

/* --------- Reset & Base --------- */
:root {
  --bg: #e8ddcb;
  --text: #1a1918;
  --accent: #143A79;
  --border: #d9ccb3;
  --muted: #6f675d;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Georgia', serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* --------- Header --------- */
.site-header {
  text-align: center;
  margin: 40px 10px 25px;
}
.logo a {
  font-size: 40px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.tagline {
  font-style: italic;
  font-size: 16px;
  margin-top: 4px;
  color: var(--muted);
}

/* --------- Section --------- */
.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 40px;
}
.section-title {
  font-size: 24px;
  text-align: center;
  margin: 0 0 20px;
}

/* --------- Pills --------- */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  min-height: 36px;
  line-height: 1;
  border-radius: 22px;
  background: #e8ddcb;
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.1px;
  user-select: none;
  cursor: pointer;
  transition: transform .02s ease-in, background .15s ease;
}
.pill:active { transform: translateY(1px); }
.pill[aria-selected="true"] {
  background: #d6c8af;
  box-shadow: inset 0 0 0 2px #c7b898;
}

/* --------- Update timestamp --------- */
.updated {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 6px 0 12px;
}

/* --------- Cards --------- */
.results {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
  gap: 20px;
}
.card {
  background: #f7f2e8;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.content {
  padding: 12px 16px 16px;
}
.meta {
  color: var(--muted);
  opacity: .9;
  font-size: 12.5px;
  line-height: 1.25;
  letter-spacing: .02em;
  font-variant-caps: all-small-caps;
}
.headline {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  margin: 6px 0 10px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.btn {
  border: 1px solid var(--border);
  background: #ddd0b8;
  color: var(--accent);
  padding: 9px 14px;
  border-radius: 18px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.btn.secondary {
  background: #efe6d6;
}
.btn.linkish {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 13px;
  padding: 8px 8px;
}
.btn:hover {
  background: #d6c8af;
}

/* --------- Empty state --------- */
.empty {
  text-align: center;
  margin-top: 40px;
  color: var(--muted);
  font-style: italic;
}

/* --------- Footer --------- */
.footer {
  text-align: center;
  padding: 30px 10px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* --------- Responsive tweaks --------- */
@media (max-width: 520px) {
  .logo a { font-size: 32px; }
  .headline { font-size: 16px; }
}
/* --- Video play badge overlay --- */
.thumb {
  position: relative;
}
.thumb.is-video .play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-block;
  padding: 10px 14px;
  border-radius: 50px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-weight: 700;
  line-height: 1;
  font-size: 16px;
  backdrop-filter: blur(1px);
}