/* Syndicator.net — hand-written, no framework, no build step. */

:root {
  color-scheme: light dark;

  --serif: Georgia, Times, "Times New Roman", serif;
  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;

  --ink: #222;
  --paper: #f5f5f5;
  --pale: #ddd;
  --grey: #999;
  --mid: #666;
  --dark: #333;

  --bg: var(--paper);
  --fg: var(--ink);
  --heading: var(--ink);
  --muted: var(--mid);
  --rule: #cfcfcf;
  --chip: #e2e2e2;
  --chip-fg: #333;
  --off: var(--grey);
}

html.dark {
  --bg: var(--ink);
  --fg: var(--pale);
  --heading: var(--paper);
  --muted: var(--grey);
  --rule: #3a3a3a;
  --chip: #333;
  --chip-fg: #ddd;
  --off: var(--dark);
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --bg: var(--ink);
    --fg: var(--pale);
    --heading: var(--paper);
    --muted: var(--grey);
    --rule: #3a3a3a;
    --chip: #333;
    --chip-fg: #ddd;
    --off: var(--dark);
  }
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  -webkit-text-size-adjust: 100%;
}

main {
  flex: 1;
}

.wrap {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1rem;
}

h1,
h2,
h3 {
  font-family: var(--sans);
  line-height: 1.2;
  color: var(--heading);
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.6rem;
}

p,
li {
  font-size: 1.25rem;
  line-height: 1.75;
}

a {
  color: inherit;
}

main p a,
main li a,
footer a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

main p a:hover,
main li a:hover,
footer a:hover {
  text-decoration: none;
}

.icon {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
  vertical-align: -0.15em;
  margin-right: 0.3em;
}

/* --- skip link --- */

.skip {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border: 3px solid var(--fg);
  background: var(--bg);
  font-family: var(--sans);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease-in-out;
}

.skip:focus {
  top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .skip {
    transition: none;
  }
}

/* --- header / nav --- */

header {
  background: #191818;
  color: #ededed;
  font-family: var(--sans);
  margin-bottom: 1.5rem;
}

.bar {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 44px;
}

.brand {
  font-size: 1.3rem;
  padding: 0.6rem 0.5rem;
  color: #bbb;
  text-decoration: none;
  margin-right: auto;
}

.brand:hover,
.brand:focus {
  color: #ededed;
}

.nav {
  display: flex;
  gap: 0.25rem 1rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav li {
  font-size: 1rem;
  line-height: 1;
}

.nav a,
.theme {
  display: inline-block;
  padding: 0.6rem 0.25rem;
  color: #999;
  font: inherit;
  font-size: 1rem;
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus,
.theme:hover,
.theme:focus {
  color: #ededed;
  text-decoration: underline;
}

.toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.toggle span {
  display: block;
  width: 1.75rem;
  height: 2px;
  margin: 0.3rem auto;
  background: #888;
  transition: transform 0.25s;
}

.toggle[aria-expanded="true"] span:first-child {
  transform: translateY(5px) rotate(45deg);
}

.toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 47.99em) {
  .toggle {
    display: block;
  }

  .nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    padding-bottom: 0.5rem;
  }

  .nav.open {
    display: flex;
  }

  .nav a,
  .theme {
    padding: 0.55rem 0.25rem;
    font-size: 1.1rem;
  }
}

/* --- article cards --- */

.page-heading {
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

.card {
  padding: 1.5rem 0.25rem;
  border-bottom: 1px solid var(--rule);
}

.card h2 {
  margin: 0.75rem 0 0;
  font-size: 1.6rem;
}

.card h2 a {
  text-decoration: none;
}

.card h2 a:hover,
.card h2 a:focus {
  text-decoration: underline;
}

.source {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  background: var(--chip);
  color: var(--chip-fg);
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
}

.source:hover,
.source:focus {
  text-decoration: underline;
}

.when {
  display: flex;
  align-items: center;
  margin: 0.85rem 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.95rem;
}

.excerpt {
  margin: 0;
}

/* --- pager --- */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 3rem 0;
  font-family: var(--sans);
  font-size: 1rem;
}

.pager a,
.pager .off {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.75rem;
  height: 2.5rem;
  border-radius: 1.25rem;
  text-decoration: none;
}

.pager a:hover,
.pager a:focus {
  text-decoration: underline;
}

.pager .off {
  visibility: hidden;
}

.pager .count {
  color: var(--muted);
}

/* --- sites list --- */

.sites {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.75rem 1.5rem;
  margin: 2.5rem 0;
  padding: 0;
  list-style: none;
}

.sites h2 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
}

.sites h2 a {
  text-decoration: none;
}

.sites h2 a:hover,
.sites h2 a:focus {
  text-decoration: underline;
}

.feedlink {
  display: flex;
  align-items: center;
  margin: 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--muted);
}

.stale {
  margin-left: 0.6rem;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-size: 0.8rem;
}

/* --- footer --- */

footer {
  margin-top: 3rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
}

footer p {
  font-family: var(--sans);
  font-size: 1rem;
  margin: 0.4rem 0;
}

footer .meta {
  color: var(--muted);
  font-size: 0.95rem;
}

/* --- small screens --- */

@media (max-width: 30em) {
  h1 {
    font-size: 1.5rem;
  }

  .card h2,
  h2 {
    font-size: 1.35rem;
  }

  p,
  li {
    font-size: 1.05rem;
    line-height: 1.6;
  }

  .pager a,
  .pager .off {
    min-width: 0;
  }
}
