/*
 * Content hubs: /blog (field notes) and /research (reports).
 * Plain CSS on the design tokens in main.css, so posts don't depend on
 * Tailwind class scanning.
 */

.hub-header {
  padding: 120px 0 40px;
  background: linear-gradient(135deg, var(--color-gray-50) 0%, var(--color-white) 100%);
}

.hub-header h1 {
  font-size: var(--font-size-4xl);
  color: var(--color-gray-900);
  margin-bottom: 12px;
}

.hub-header p {
  font-size: var(--font-size-lg);
  color: var(--color-gray-600);
  max-width: 680px;
}

.hub-list {
  list-style: none;
  padding: 40px 0 80px;
  max-width: 760px;
}

.hub-list li {
  padding: 24px 0;
  border-bottom: 1px solid var(--color-gray-200);
}

.hub-list h2 {
  font-size: var(--font-size-xl);
  margin-bottom: 6px;
}

.hub-list h2 a {
  color: var(--color-gray-900);
  text-decoration: none;
}

.hub-list h2 a:hover {
  color: var(--color-primary);
}

.hub-meta {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
}

.hub-empty {
  color: var(--color-gray-600);
  padding: 40px 0 80px;
  max-width: 760px;
}

/* ---- Article ---------------------------------------------------------- */

.post {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px var(--container-padding) 64px;
}

.post-kicker {
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.post h1 {
  font-size: var(--font-size-4xl);
  line-height: 1.2;
  color: var(--color-gray-900);
  margin-bottom: 16px;
}

.post-byline {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
  margin-bottom: 32px;
}

.post-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 20px;
  padding: 16px 20px;
  margin-bottom: 40px;
  background: var(--color-gray-50);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
}

.post-facts dt {
  font-weight: 600;
  color: var(--color-gray-700);
}

.post-facts dd {
  color: var(--color-gray-700);
}

.post-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-gray-800);
}

.post-body > * + * {
  margin-top: 1.25em;
}

.post-body h2 {
  font-size: var(--font-size-2xl);
  margin-top: 2em;
  color: var(--color-gray-900);
}

.post-body h3 {
  font-size: var(--font-size-xl);
  margin-top: 1.6em;
  color: var(--color-gray-900);
}

.post-body ul,
.post-body ol {
  padding-left: 1.4em;
}

.post-body ul {
  list-style: disc;
}

.post-body ol {
  list-style: decimal;
}

.post-body li + li {
  margin-top: 0.4em;
}

.post-body a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--color-gray-100);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.post-body pre {
  overflow-x: auto;
  padding: 16px;
  background: var(--color-gray-900);
  color: var(--color-gray-50);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.6;
}

.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.post-body blockquote {
  border-left: 3px solid var(--color-gray-300);
  padding-left: 1em;
  color: var(--color-gray-600);
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  display: block;
  overflow-x: auto;
}

.post-body th,
.post-body td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-gray-200);
}

.post-body th {
  font-weight: 600;
}

/* Wide tables scroll inside the column, never the page. */
.post-body .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.post-body .table-scroll table {
  display: table;
  min-width: 600px;
}

.post-body .table-scroll th,
.post-body .table-scroll td {
  vertical-align: top;
}

.post-body .table-scroll:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Example entry on /research/corrections/ */
.post-body .corrections-format {
  padding: 12px 16px;
  background: var(--color-gray-50);
  border-left: 3px solid var(--color-gray-300);
  border-radius: var(--radius-md);
}

.post-body img {
  max-width: 100%;
  height: auto;
}

.post-body figure {
  margin-left: 0;
  margin-right: 0;
}

.post-body figure img {
  display: block;
}

.post-body figcaption {
  margin-top: 0.75em;
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: var(--color-gray-600);
}

.post-body figcaption p + p {
  margin-top: 0.25em;
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--color-gray-200);
  margin-top: 2.5em;
}

/* The one quiet line at the end of every post */
.post-cta {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--color-gray-200);
  font-size: var(--font-size-base);
  color: var(--color-gray-600);
}

.post-cta a {
  color: var(--color-primary);
}
