/* Renalworld — site styles */

:root {
  --blue: #66a6ff;
  --blue-pale: #f4f9ff;
  --nav-current: #116dff;
  --ink: #2b312f;
  --title-gray: #525452;
  --rust: #ae3a00;
  --row-tint: #f4e6fd;
  --link-purple: #6f56d9;
  --sans: "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Times New Roman", Times, Georgia, serif;
  --max: 1280px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
  background: #fff;
  padding: 8px 12px;
  z-index: 10;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--blue);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px clamp(8px, 2.5vw, 36px);
}

.site-nav a {
  display: block;
  padding: 6px 10px;
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  color: var(--nav-current);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 36px);
  padding: 24px 0 12px;
  text-decoration: none;
}

.masthead-title {
  margin: 0;
  color: var(--title-gray);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 10.2vw, 132px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.masthead-logo {
  width: clamp(72px, 17vw, 220px);
  flex: none;
  align-self: flex-end;
}

/* ---------- Home ---------- */

.home-main {
  background: var(--blue-pale);
  padding: 40px 0 32px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 28px;
}

.card-image {
  display: block;
}

.card-image img {
  width: 100%;
  aspect-ratio: 381 / 491;
  object-fit: cover;
}

.card h2 {
  margin: 24px 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
}

.card h2 a {
  color: #000;
}

.card p {
  margin: 0;
  font-size: 15px;
  color: #000;
}

/* ---------- Link tables (calc / disease / journals) ---------- */

.list-main {
  padding: 36px 0 64px;
}

.list-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.touchcalc-logo {
  width: clamp(160px, 22vw, 264px);
}

.list-top h1 {
  margin: 0 0 12px;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
}

.tag-filter label {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.tag-filter select {
  width: min(320px, 80vw);
  padding: 12px 14px;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 16px;
}

.link-table {
  width: 100%;
  margin-top: 48px;
  border-collapse: collapse;
  text-align: center;
}

.link-table th {
  padding: 14px 8px;
  border-bottom: 2px solid #000;
  font-size: 20px;
  font-weight: 400;
  color: #000;
}

.link-table td {
  padding: 0;
}

.link-table td a {
  display: block;
  padding: 10px 8px;
  color: var(--link-purple);
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
}

.link-table td a:hover,
.link-table td a:focus-visible {
  text-decoration: underline;
}

.link-table tbody tr.tint {
  background: var(--row-tint);
}

.link-table tr[hidden] {
  display: none;
}

.no-results {
  text-align: center;
  padding: 24px;
}

.narrow {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- QA (NephroQuest) ---------- */

.qa {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  background: var(--rust);
  color: #fff;
}

.qa-text {
  padding: clamp(24px, 4vw, 44px) clamp(20px, 10vw, 138px);
}

.qa-text h1 {
  margin: 0 0 48px;
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.qa-text p {
  margin: 0;
  max-width: 13em;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600;
  line-height: 1.3;
}

.qa-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- Books ---------- */

.books-main h1 {
  margin: 40px 0 48px;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
}

.book-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding-bottom: 56px;
}

.book-feature-text {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.55;
}

.book-feature-text h2 {
  margin: 0;
  font-family: "Arial Black", "Arial Bold", Arial, sans-serif;
  font-size: 20px;
  font-weight: 900;
}

.book-feature-text .editors {
  margin: 0 0 1.5em;
}

.book-feature-text p {
  margin: 0 0 1.5em;
}

.book-cover {
  text-align: center;
  font-size: 15px;
}

.book-cover img {
  width: 100%;
  margin-bottom: 16px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 20px;
  padding-bottom: 64px;
}

.book h2,
.book h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}

.book p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.7;
}

.band {
  padding: 36px 0 28px;
}

.band-blue {
  background: var(--blue);
  color: #fff;
}

.band-dark {
  background: var(--ink);
  color: #fff;
}

.band h2 {
  margin: 0 0 20px;
  font-size: 38px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.band-blue h2 {
  color: var(--ink);
}

.band p {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
}

.band-image img {
  width: 100%;
}

.band-image {
  display: block;
  width: min(820px, 100%);
  margin: 0 auto 24px;
}

.pill {
  display: block;
  width: 160px;
  margin: 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
}

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

.book-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: start;
}

.book-pair h3 {
  margin: 20px 0 8px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.book-pair p {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
}

.book-pair img {
  width: 100%;
}

/* ---------- Bio ---------- */

.bio-page {
  background: var(--blue);
}

.bio-main {
  color: #fff;
  padding-bottom: 72px;
}

.bio-main h1 {
  margin: 0 0 12px;
  padding-top: 12px;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-align: center;
}

.bio-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.48fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.bio-side {
  text-align: center;
}

.bio-side img {
  width: 100%;
}

.bio-side ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: clamp(20px, 2.4vw, 31px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.bio-text {
  font-size: clamp(18px, 2.4vw, 31px);
  font-weight: 300;
  line-height: 1.55;
}

.bio-text p {
  margin: 0 0 1.55em;
}

/* ---------- 404 ---------- */

.notfound {
  padding: 72px 0 96px;
  text-align: center;
}

/* ---------- Small screens ---------- */

@media (max-width: 800px) {
  .site-nav ul {
    justify-content: center;
    padding-top: 12px;
  }

  .site-nav a {
    font-size: 14px;
    padding: 6px 8px;
  }

  .card-grid,
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .list-top {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .qa,
  .book-feature,
  .book-pair,
  .bio-layout {
    grid-template-columns: 1fr;
  }

  .bio-side {
    max-width: 380px;
    margin: 0 auto;
  }

  .link-table td a {
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .card-grid,
  .book-grid {
    grid-template-columns: 1fr;
  }
}
