/* Top 5 Reddit Agencies - editorial design system */
:root {
  --heading: #14171a;
  --body: #2b2f36;
  --muted: #6b7280;
  --hairline: #e7e9ec;
  --bg: #ffffff;
  --panel: #f7f8f9;
  --cream: #fbfaf7;
  --cream-border: #ece7dd;
  --accent: #b8472a;
  --link: #1a4fb0;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--body); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { max-width: 740px; margin: 0 auto; padding: 0 24px; }

/* Masthead */
.masthead {
  border-bottom: 1px solid var(--hairline);
  padding: 22px 0 18px;
}
.masthead-inner {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.wordmark {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: -0.015em;
}
.wordmark .dot { color: var(--accent); }
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a {
  color: var(--body);
  text-decoration: none;
  font-size: 14.5px;
}
.nav a:hover { color: var(--accent); }

/* Typography */
h1, h2, h3, h4 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  color: var(--heading);
  letter-spacing: -0.015em;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
}
h1 { font-size: 41px; line-height: 1.15; margin-top: 40px; margin-bottom: 12px; }
h2 { font-size: 28px; margin-top: 44px; }
h3 { font-size: 22px; margin-top: 32px; }

p { margin: 0 0 18px; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration: none; }
small, .small { font-size: 14.5px; color: var(--muted); }

.standfirst {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 22px;
  color: var(--body);
  line-height: 1.45;
  margin: 0 0 12px;
}
.byline {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 20px;
}

/* Cream note panel */
.note {
  background: var(--cream);
  border: 1px solid var(--cream-border);
  padding: 18px 22px;
  margin: 24px 0 36px;
}
.note strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--heading);
  margin-bottom: 6px;
}
.note p { margin: 0; font-size: 16.5px; color: var(--body); }

/* Ordered short list (rankings) */
.short-list { list-style: none; padding: 0; margin: 0 0 24px; }
.short-list li {
  display: flex;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 17px;
}
.short-list .num {
  font-family: Georgia, serif;
  color: var(--accent);
  font-weight: 700;
  min-width: 22px;
}

/* Comparison table */
.table-wrap { overflow-x: auto; margin: 24px 0 40px; }
table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
}
table.compare th {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--hairline);
}
table.compare td {
  padding: 14px 12px 14px 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
table.compare td:first-child { font-weight: 700; color: var(--heading); }

/* Ranked entry */
.entry { margin: 48px 0; padding-top: 20px; border-top: 1px solid var(--hairline); }
.entry-header { display: flex; gap: 20px; align-items: baseline; margin-bottom: 6px; }
.entry-num {
  font-family: Georgia, serif;
  color: var(--accent);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}
.entry-title {
  font-family: Georgia, serif;
  font-size: 28px;
  color: var(--heading);
  margin: 0;
  letter-spacing: -0.015em;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 14px;
  padding-left: 42px;
}
.entry-body { }
.facts {
  background: var(--panel);
  padding: 14px 18px;
  font-size: 15.5px;
  margin: 18px 0 10px;
  border: 1px solid var(--hairline);
}
.facts strong { color: var(--heading); }

/* FAQ accordion (details) */
.faq { margin: 24px 0 40px; }
.faq details {
  border-bottom: 1px solid var(--hairline);
  padding: 16px 0;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 19px;
  color: var(--heading);
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  color: var(--accent);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  width: 14px;
  display: inline-block;
}
.faq details[open] summary::before { content: "\2013"; }
.faq .answer { padding: 10px 0 4px 28px; color: var(--body); }
.faq .answer p { margin: 0; }

/* Blog index */
.post-list { list-style: none; padding: 0; margin: 24px 0 48px; }
.post-list li { padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.post-list h2 { font-size: 24px; margin: 0 0 6px; }
.post-list h2 a { color: var(--heading); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); }
.post-list p { margin: 0; color: var(--body); font-size: 16.5px; }

/* Footer */
footer.site {
  background: var(--panel);
  border-top: 1px solid var(--hairline);
  margin-top: 80px;
  padding: 40px 0;
  color: var(--muted);
  font-size: 14.5px;
}
footer.site .container { display: flex; flex-direction: column; gap: 10px; }
footer.site a { color: var(--muted); }

/* Back link */
.backlink { display: inline-block; margin: 32px 0 0; font-size: 15px; }

@media (max-width: 620px) {
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  .standfirst { font-size: 19px; }
  .entry-num { font-size: 34px; }
  .entry-title { font-size: 24px; }
  .eyebrow { padding-left: 34px; }
}
