/* 0Rad.com — reading-room dark, with a light mode for daylight people. */
:root {
  --bg: #0d0e0f;
  --text: #d9d8d3;
  --muted: #8a8a86;
  --faint: #2a2b2d;
  --accent: #e8e6df;
  --link: #c9c5b6;
  --title: #8ec5ff;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f5f1;
    --text: #1d1d1b;
    --muted: #6d6c67;
    --faint: #dcdad3;
    --accent: #0d0e0f;
    --link: #3a3935;
    --title: #1c5fa8;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 40rem;
  padding: 0 1.25rem;
  background: var(--bg);
  color: var(--text);
  font: 400 1.15rem/1.65 var(--serif);
  font-optical-sizing: auto;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }

/* Masthead */
.masthead { padding: 4.5rem 0 2.5rem; }
.mark {
  display: inline-block;
  font: 500 2.6rem/1 var(--mono);
  letter-spacing: -0.02em;
  color: var(--accent);
  text-decoration: none;
}
.tagline {
  margin: 1rem 0 0;
  max-width: 30rem;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--muted);
}
/* a grayscale window/level bar, for the radiologists */
.ramp {
  height: 6px;
  margin-top: 2.25rem;
  background: linear-gradient(90deg, #000 0%, #fff 100%);
  opacity: 0.55;
}

/* Posts */
main { min-height: 40vh; }
article { padding: 2.25rem 0; border-top: 1px solid var(--faint); }
article:first-child { border-top: 0; padding-top: 0.5rem; }
.date {
  font: 400 0.78rem/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
}
.date:hover { color: var(--accent); }
h2 {
  margin: 0.7rem 0 0;
  font-size: 1.55rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--title);
}
h2 a { color: inherit; text-decoration: none; }
h2 a:hover { text-decoration: underline; }
.body { margin-top: 0.9rem; overflow-wrap: anywhere; }
.body p { margin: 0 0 1em; }
.body > :last-child { margin-bottom: 0; }
.body h3 { font-size: 1.2rem; margin: 1.4em 0 0.4em; color: var(--accent); }
.body ul, .body ol { margin: 0 0 1em; padding-left: 1.3em; }
.body blockquote {
  margin: 0 0 1em;
  padding-left: 1rem;
  border-left: 2px solid var(--faint);
  color: var(--muted);
}
.empty { color: var(--muted); font-style: italic; }

/* Pager + footer */
.pager {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--faint);
  font: 400 0.85rem/1 var(--mono);
}
.pager a { text-decoration: none; }
footer {
  padding: 3rem 0 3.5rem;
  font: 400 0.75rem/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
}

@media (max-width: 480px) {
  body { font-size: 1.08rem; }
  .masthead { padding-top: 3rem; }
  .mark { font-size: 2.2rem; }
}

/* Link preview cards */
.card {
  display: block;
  margin: 0 0 1em;
  border: 1px solid var(--faint);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--muted); color: var(--text); }
.card img {
  display: block;
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  border-bottom: 1px solid var(--faint);
}
.card-text { display: block; padding: 0.9rem 1rem 1rem; }
.card-title { display: block; font-weight: 600; line-height: 1.3; color: var(--title); }
.card-desc { display: block; margin-top: 0.35rem; font-size: 0.95rem; line-height: 1.45; color: var(--muted); }
.card-site {
  display: block;
  margin-top: 0.6rem;
  font: 400 0.72rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
