:root {
  --opl-primary: #194257;
  --opl-primary-dark: #0e242f;
  --opl-secondary: #1e78a2;
  --opl-link: #02729e;
  --opl-link-hover: #014e6c;
  --opl-heading: #194257;
  --opl-text: #474747;
  --opl-muted: #666;
  --opl-border: #ccc;
  --opl-page: #e5e5e5;
  --opl-white: #fff;
  --opl-green: #2e7d32;
  --opl-cloud: #f6f6f6;
  --font-sans: 'Public Sans', Helvetica, Arial, sans-serif;
  --font-display: 'Candal', Helvetica, Arial, sans-serif;
  /* IRSC's colors, from its brand guide: River Blue and Peregrine Yellow, with white; its
     navy and gray are secondary. Blue is the spine (rails, bars, buttons), pages are white,
     and yellow marks what's current. */
  --irsc-blue: #003da5;
  --irsc-yellow: #fedb00;
  --irsc-navy: #062551;
  --irsc-gray: #cfd2d3;
  --libby-paper: #fff;
  --libby-paper-2: #f5f6f6;
  --libby-ink: #000;
  --libby-ink-2: #4d4d4d;
  --libby-muted: #666;
  --libby-rule: var(--irsc-gray);
  --libby-rule-strong: #8c8c8c;
  --libby-accent: var(--irsc-blue);
  --libby-accent-dark: var(--irsc-navy);
  --libby-serif: 'Source Serif 4', Georgia, serif;
  --libby-sans: 'Source Sans 3', 'Public Sans', sans-serif;
  --wrap: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }
html, body, #root { min-height: 100%; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--opl-text);
  background: var(--opl-page);
  line-height: 1.5;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--opl-link); text-decoration: none; }
a:hover { color: var(--opl-link-hover); text-decoration: underline; }
button, input { font-family: inherit; }
h1, h2, h3 { font-family: var(--font-display); color: var(--opl-heading); font-weight: 400; line-height: 1.2; margin: 0 0 0.5rem; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.wrap { width: min(var(--wrap), calc(100% - 32px)); margin: 0 auto; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid #ddd; position: sticky; top: 0; z-index: 40; }
.util-bar { background: #fff; border-bottom: 1px solid #eee; font-size: 13px; }
.util-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; }
.util-left, .util-right { display: flex; align-items: center; gap: 16px; }
.util-left a { color: var(--opl-text); }
.lang-btn { background: none; border: 0; color: var(--opl-text); cursor: pointer; }
.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--opl-primary);
  color: #fff;
  border: 0;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}
.login-btn svg { width: 16px; height: 16px; }
.login-btn:hover { background: var(--opl-primary-dark); }

.brand-bar-inner { display: flex; align-items: center; gap: 24px; padding: 16px 0; }
.logo-link { flex: 0 0 auto; }
.logo-img { height: 56px; width: auto; max-width: 280px; object-fit: contain; object-position: left center; }
.catalog-search { margin-left: auto; width: min(420px, 100%); }
.catalog-search label { display: block; font-size: 13px; font-weight: 600; color: var(--opl-heading); margin-bottom: 4px; }
.catalog-search-row { display: flex; }
.catalog-search-row input {
  flex: 1;
  border: 1px solid #bbb;
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
}
.catalog-search-row input:focus { border-color: var(--opl-secondary); box-shadow: 0 0 0 3px rgba(30, 120, 162, 0.2); }
.catalog-search-row button {
  background: var(--opl-primary);
  color: #fff;
  border: 0;
  padding: 0 18px;
  font-weight: 600;
  cursor: pointer;
}
.catalog-search-row button:hover { background: var(--opl-primary-dark); }
.mobile-search, .hamburger {
  display: none;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  padding: 8px;
  cursor: pointer;
  color: var(--opl-primary);
}
.mobile-search svg, .hamburger svg { width: 100%; height: 100%; }

.main-nav { background: #fff; border-top: 1px solid #eee; }
.main-nav-list { display: flex; list-style: none; margin: 0; padding: 0; gap: 4px; }
.nav-trigger {
  background: none;
  border: 0;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--opl-heading);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.nav-trigger svg { width: 14px; height: 14px; }
.main-nav-list > li { position: static; }
.main-nav-list > li.is-open .nav-trigger,
.nav-trigger:hover { background: var(--opl-cloud); }
.mega {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 3px solid var(--opl-secondary);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
  padding: 28px 0 36px;
}
.main-nav-list > li.is-open .mega { display: block; }
.mega h2 { font-size: 28px; margin-bottom: 18px; }
.mega-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.mega h3 { font-family: var(--font-sans); font-size: 14px; font-weight: 700; text-transform: none; margin-bottom: 10px; }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li { margin: 0 0 8px; }
.mega a { color: var(--opl-link); }
.mobile-catalog-search { display: none; padding: 12px 0 20px; }

/* Home */
.home { padding-bottom: 40px; }
.hero-split {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  min-height: 420px;
  background: #111;
}
.hero-carousel { position: relative; min-height: 420px; }
.hero-slide {
  height: 100%;
  min-height: 420px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
.hero-overlay {
  background: linear-gradient(transparent, rgba(10, 24, 32, 0.85));
  color: #fff;
  padding: 48px 40px 56px;
  width: 100%;
}
.hero-overlay h2 { color: #fff; font-size: clamp(26px, 3.4vw, 40px); max-width: 14em; hyphens: none; -webkit-hyphens: none; }
.hero-overlay p { max-width: 46ch; margin: 0 0 16px; }
.hero-kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; margin: 0 0 8px; }
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  color: var(--opl-primary);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.hero-arrow svg { width: 22px; height: 22px; }
.hero-arrow.next { right: 16px; }
.hero-arrow.next svg { transform: rotate(180deg); }
.hero-arrow.prev { left: 16px; }
.hero-dots { position: absolute; bottom: 16px; left: 40px; display: flex; gap: 8px; }
.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}
.hero-dots button.is-active { background: #fff; }

.whats-new { background: #fff; padding: 24px 22px; }
.whats-new ul { list-style: none; margin: 0; padding: 0; }
.news-item { display: grid; grid-template-columns: 96px 1fr; gap: 12px; color: inherit; padding: 12px 0; border-bottom: 1px solid #eee; }
.news-item img { width: 96px; height: 64px; object-fit: cover; }
.news-type { display: block; font-size: 12px; color: var(--opl-secondary); font-weight: 700; text-transform: uppercase; }
.news-item strong { display: block; color: var(--opl-heading); font-weight: 600; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: 28px; }
.section-lead { margin: -8px 0 18px; color: var(--opl-muted); }
.band { padding: 40px 0; }
.band-white { background: #fff; }
.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.event-card { background: #fff; display: flex; flex-direction: column; }
.event-card-media { position: relative; display: block; }
.event-card-media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.open-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--opl-green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 2px;
}
.event-card-body { padding: 12px 4px 8px; }
.kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--opl-muted); margin: 0 0 4px; }
.event-card h3 { font-family: var(--font-sans); font-size: 18px; font-weight: 700; }
.event-card h3 a { color: var(--opl-heading); }
.event-meta, .event-place, .event-topic { margin: 4px 0; font-size: 14px; }
.event-place { color: var(--opl-link); }
.text-link { font-size: 14px; }

.explore { display: grid; grid-template-columns: 1.7fr 1fr; gap: 32px; }
.exhibit-list { list-style: none; margin: 0; padding: 0; }
.exhibit { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid #ddd; color: inherit; }
.exhibit-date { background: var(--opl-primary); color: #fff; text-align: center; padding: 8px 4px; }
.exhibit-date span { display: block; font-size: 12px; text-transform: uppercase; }
.exhibit-date strong { font-size: 22px; }
.exhibit h3 { font-family: var(--font-sans); font-size: 16px; font-weight: 700; }

.book-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 140px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.rail-card { color: inherit; }
.rail-card .cover { width: 140px; }
.rail-title, .rail-author { display: block; }
.rail-title { margin-top: 8px; font-weight: 600; color: var(--opl-heading); font-size: 14px; }
.rail-author { font-size: 13px; color: var(--opl-muted); }

.promo {
  min-height: 360px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  position: relative;
}
.promo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 36, 47, 0.78), rgba(14, 36, 47, 0.25));
}
.promo-inner { position: relative; color: #fff; padding: 48px 0; max-width: 520px; }
.promo-inner h2 { color: #fff; font-size: 42px; text-transform: capitalize; }
.age-intro { margin-bottom: 28px; max-width: 640px; }
.eyebrow { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--opl-secondary); margin: 0 0 8px; }
.age-intro h2 { font-family: var(--font-sans); font-size: 22px; font-weight: 500; margin-bottom: 16px; }
.support { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.support img { width: 100%; height: 240px; object-fit: cover; }
.footer-support { color: #d7e6ee; font-size: 14px; }

.btn-primary, .btn-outline-light, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--opl-primary); color: #fff; border-color: var(--opl-primary); }
.btn-primary:hover { background: var(--opl-primary-dark); color: #fff; text-decoration: none; }
.btn-outline-light { border-color: #fff; color: #fff; background: transparent; }
.btn-outline-light:hover { background: #fff; color: var(--opl-primary); text-decoration: none; }
.btn-ghost { background: none; border-color: var(--opl-border); color: var(--opl-heading); }

.site-footer { background: var(--opl-primary); color: #fff; padding-top: 40px; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer h3 { color: #fff; font-family: var(--font-sans); font-size: 16px; font-weight: 700; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-bottom: 32px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 0 0 8px; }
.footer-bottom { background: var(--opl-primary-dark); padding: 14px 0; font-size: 13px; }

.inner { background: #fff; padding: 48px 0 80px; }
.inner h1 { font-size: 42px; }
.lede { font-size: 18px; max-width: 62ch; }
.inner-events { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; }
.inner-events li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; }
.inner-events img { width: 96px; height: 96px; object-fit: cover; }

.modal-scrim, .sheet-scrim {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.45);
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal, .sheet {
  background: #fff;
  width: min(440px, 100%);
  padding: 28px 24px 24px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.modal h2 { font-size: 26px; }
.modal label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0; }
.modal input { width: 100%; padding: 10px; border: 1px solid #bbb; margin-top: 4px; }
.modal-close, .sheet-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: none;
  width: 36px;
  height: 36px;
  cursor: pointer;
}
.modal-close svg, .sheet-close svg { width: 18px; height: 18px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.muted { color: var(--opl-muted); }
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--opl-primary);
  color: #fff;
  padding: 12px 18px;
  z-index: 90;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Covers */
.cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--libby-paper-2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  /* The lettering is sized in cqw, so a cover reads the same at 104 px and at 180 px. */
  container-type: inline-size;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover--audio { aspect-ratio: 1; }
/* A drawn cover: the title at the top, so a row of covers starts level, and the
   authors in a band at the foot. The book's color is deepened under the text for contrast. */
.cover-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 10cqw 8cqw 0;
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--cover) 82%, #000);
  color: #fff;
}
.cover-fallback-title {
  font-family: var(--libby-serif);
  font-weight: 600;
  font-size: min(17cqw, calc(84cqw / (var(--longest, 8) * 0.62)));
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  /* Sizing keeps the longest word whole; if a face runs wider than planned, it hyphenates properly. */
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}
.cover-fallback-sub {
  margin-top: 3cqw;
  font-family: var(--libby-serif);
  font-style: italic;
  font-size: 9.5cqw;
  line-height: 1.2;
  color: color-mix(in srgb, var(--cover) 18%, #fff);
}
.cover-fallback-sub + .cover-fallback-sub { margin-top: 0.5cqw; }
.cover-fallback-author {
  margin: auto -8cqw 0;
  padding: 5.5cqw 8cqw 7cqw;
  background: color-mix(in srgb, var(--cover) 48%, #000);
  font-size: 8.5cqw;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.9);
}
/* Clamped inside the band's padding, which would otherwise show a sliver of a third line. */
.cover-fallback-author > span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.cover-audio-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: grid;
  place-items: center;
}
.cover-audio-badge svg { width: 16px; height: 16px; }

/* Libby */
.libby {
  min-height: 100vh;
  background: var(--libby-paper);
  color: var(--libby-ink);
  font-family: var(--libby-sans);
  display: grid;
  grid-template-columns: 88px 1fr;
  overflow-x: clip;
}
.libby h1, .libby h2, .libby h3 { font-family: var(--libby-serif); color: var(--libby-ink); font-weight: 600; }
.libby a { color: var(--libby-ink); text-decoration: underline; text-underline-offset: 3px; }
.libby-rail {
  background: var(--irsc-blue);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 16px 8px;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.libby-rail-item, .libby-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  color: var(--libby-ink);
  text-decoration: none;
  font-size: 11px;
  padding: 10px 4px;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
}
.libby-rail-item svg, .libby-tab svg { width: 22px; height: 22px; }
/* On the blue spine: white, and yellow for where you are. */
.libby .libby-rail-item, .libby .libby-tab { color: #fff; text-decoration: none; }
.libby .libby-rail-item:hover, .libby .libby-tab:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.libby .libby-rail-item.active, .libby .libby-tab.active { background: rgba(255, 255, 255, 0.14); color: var(--irsc-yellow); }
.libby-rail :focus-visible, .libby-tabbar :focus-visible { outline: 2px solid var(--irsc-yellow); outline-offset: 2px; }
.libby-rail-item i {
  position: absolute;
  top: 6px;
  right: 10px;
  background: var(--irsc-yellow);
  color: var(--irsc-navy);
  border-radius: 99px;
  font-size: 10px;
  font-style: normal;
  min-width: 16px;
  padding: 1px 4px;
  text-align: center;
}
.libby-tabbar { display: none; }
.libby-main { min-width: 0; }
.libby-top {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  background: var(--libby-paper);
  z-index: 5;
}
.libby-top h1 { font-size: 16px; font-weight: 600; text-align: center; margin: 0; font-family: var(--libby-sans); }
.libby-top { border-bottom: 1px solid var(--libby-rule); }
.libby-back, .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--libby-ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.libby-back:hover, .icon-btn:hover { background: rgba(0, 0, 0, 0.06); }
.libby-back svg, .icon-btn svg { width: 22px; height: 22px; }

.title-page { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: 8px 0 80px; min-width: 0; }
.title-hero { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; margin-bottom: 28px; }
.title-covers { width: 180px; }
.title-main-cover, .title-main-cover.cover { width: 180px; }
.format-switch { display: flex; gap: 8px; margin-top: 12px; }
.format-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 4px 0;
  font-size: 14px;
  color: var(--libby-muted);
  cursor: pointer;
  text-transform: lowercase;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.format-chip-btn.is-active { color: var(--libby-ink); font-weight: 700; }
.format-chip-btn svg { width: 16px; height: 16px; }
.format-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  text-transform: lowercase;
}
.format-chip svg { width: 16px; height: 16px; }
.title-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 8px; }
.libby-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  color: var(--libby-accent);
  font-size: 20px;
  font-family: var(--libby-serif);
  padding: 8px 0;
  cursor: pointer;
}
.libby-action svg { width: 22px; height: 22px; }
a.libby-action { text-decoration: none; color: var(--libby-accent); }
.libby-action.is-on { color: var(--libby-ink); }
.wait-note { font-size: 14px; color: var(--libby-muted); margin: 8px 0 0; max-width: 36ch; }
.title-meta h2 { font-size: clamp(32px, 5vw, 44px); margin: 0 0 6px; }
.series-line { color: var(--libby-muted); font-size: 14px; margin: 0 0 4px; }
.byline { font-size: 18px; margin: 0 0 10px; }
.rating-line { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; }
.stars { display: inline-flex; color: var(--libby-accent); }
.stars svg { width: 16px; height: 16px; }
.title-quote {
  font-family: var(--libby-serif);
  font-size: 20px;
  font-style: italic;
  margin: 0 0 18px;
  color: var(--libby-ink);
  overflow-wrap: anywhere;
}
.blurb { max-height: 7.5em; overflow: hidden; overflow-wrap: anywhere; }
.blurb.is-open { max-height: none; }
.blurb p { margin: 0 0 12px; font-size: 16.5px; }
.more-btn {
  background: none;
  border: 0;
  color: var(--libby-accent);
  font-size: 16px;
  cursor: pointer;
  padding: 0 0 24px;
  text-decoration: underline;
}
.about-block { border-top: 1px solid rgba(0, 0, 0, 0.15); padding-top: 20px; margin-top: 8px; }
.about-block dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  margin: 0;
}
.about-block dt { color: var(--libby-muted); }
.about-block dd { margin: 0; }
.cap { text-transform: capitalize; }
.subjects { margin: 28px 0; }
.subject-row { display: flex; flex-wrap: wrap; gap: 10px 18px; max-width: 100%; }
.subject-row a { font-size: 16px; }
.libby-rail-books {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 110px;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 0 20px;
  max-width: 100%;
}
.mini-cover { text-decoration: none; color: inherit; }
.mini-cover span { display: block; font-size: 13px; margin-top: 6px; }
.mini-cover .cover { width: 110px; }

.sheet {
  background: var(--libby-paper);
  color: var(--libby-ink);
  border-radius: 18px;
  width: min(420px, 100%);
  text-align: center;
}
.sheet-kicker { font-family: var(--libby-serif); font-size: 22px; margin: 8px 0 16px; }
.sheet-kicker em { font-style: italic; }
.underline-btn { background: none; border: 0; color: var(--libby-accent); text-decoration: underline; cursor: pointer; font: inherit; }
.sheet-card {
  display: flex;
  gap: 12px;
  text-align: left;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin: 16px 0;
}
.sheet-card .cover { width: 56px; flex: 0 0 56px; box-shadow: none; }
.sheet-card p { margin: 4px 0 0; color: var(--libby-muted); font-size: 13px; }
.maroon-btn {
  width: 100%;
  background: var(--libby-accent);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.maroon-btn:hover { background: var(--libby-accent-dark); }
.sheet-fine { font-size: 13px; color: var(--libby-muted); margin-top: 14px; }
.wait-hero { font-family: var(--libby-serif); font-size: 28px; margin: 0 0 8px; }
.sample-body { text-align: left; font-size: 16px; line-height: 1.6; }
.toast-libby { background: var(--libby-accent); bottom: 88px; }

.browse { width: min(720px, calc(100% - 40px)); margin: 0 auto; padding: 8px 0 96px; min-width: 0; }
.home-library { width: min(860px, calc(100% - 40px)); }
.home-kicker { margin: 0 0 12px; color: var(--libby-muted); font-size: 14px; }
.home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 28px;
}
.home-chips a {
  color: var(--libby-accent);
  font-size: 16px;
  text-transform: lowercase;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}
.home-shelf { margin: 0 0 36px; }
.shelf-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.shelf-head h2 { font-size: 28px; margin: 0; }
.shelf-head h2 a { text-decoration: none; }
.shelf-head h2 a:hover { text-decoration: underline; }
.shelf-head > a { color: var(--libby-accent); font-size: 15px; }
.shelf-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 118px;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 0 12px;
}
.shelf-card { text-decoration: none; color: inherit; }
.shelf-card .cover { width: 118px; }
.libby-filters { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 8px; }
.filter-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--libby-accent);
  font-size: 16px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-transform: lowercase;
}
.filter-link.is-on { color: var(--libby-ink); font-weight: 700; }
.libby-list { list-style: none; margin: 0; padding: 0; }
.libby-item {
  padding: 28px 0 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.14);
}
.libby-item-top { display: flex; align-items: flex-start; gap: 22px; }
.libby-item-cover { display: block; width: 128px; flex: 0 0 128px; text-decoration: none; color: inherit; }
.libby-item-cover .cover { width: 128px; }
.under-cover {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--libby-muted);
}
.under-cover svg { width: 16px; height: 16px; }
.libby-item-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 4px; }
.libby-item .libby-action { font-size: 18px; }
.libby-item h3 {
  font-family: var(--libby-serif);
  font-size: 28px;
  font-weight: 600;
  margin: 14px 0 2px;
}
.libby-item h3 a { text-decoration: none; }
.libby-item h3 a:hover { text-decoration: underline; }
.libby-item-author { margin: 0; font-size: 17px; }
.libby-item-author a { color: var(--libby-ink); }
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 28px 0 8px;
  font-size: 16px;
}
.pager a { color: var(--libby-accent); }
.filter-sheet { text-align: left; }
.filter-group { margin: 0 0 18px; }
.filter-group h3 { font-family: var(--libby-sans); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--libby-muted); margin-bottom: 8px; }
.filter-group button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px 0;
  font-size: 18px;
  color: var(--libby-accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.filter-group button.is-on { color: var(--libby-ink); font-weight: 700; }
a.maroon-btn { display: block; text-decoration: none; color: #fff; text-align: center; box-sizing: border-box; }
a.maroon-btn:hover { color: #fff; }
.libby-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.libby-search svg { width: 18px; height: 18px; color: var(--libby-muted); }
.libby-search input { flex: 1; border: 0; background: transparent; font-size: 16px; outline: none; color: var(--libby-ink); }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px; }
.chip {
  border: 0;
  background: transparent;
  color: var(--libby-accent);
  font-size: 16px;
  padding: 6px 4px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.chip.is-on { color: var(--libby-ink); font-weight: 700; text-decoration-thickness: 2px; }
.browse-head h2 { font-size: 34px; margin-bottom: 4px; }
.browse-head p { color: var(--libby-muted); margin: 0 0 18px; }
.title-list { list-style: none; margin: 0; padding: 0; }
.title-row {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  color: inherit;
  text-decoration: none;
  align-items: start;
}
.title-row .cover { width: 84px; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18); }
.title-row-body h3 { font-size: 20px; margin: 0 0 2px; }
.title-row-body p { margin: 0; color: var(--libby-muted); }
.title-row-format { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 6px !important; }
.title-row-format svg { width: 14px; height: 14px; }
.row-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--libby-accent);
  font-size: 13px;
  min-width: 72px;
  text-align: center;
}
.row-cta svg { width: 22px; height: 22px; }
.libby-empty { padding: 24px 0; color: var(--libby-muted); }
.shelf-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.text-action {
  background: none;
  border: 0;
  color: var(--libby-accent);
  cursor: pointer;
  font-size: 15px;
  padding: 0;
  text-decoration: underline;
  display: inline;
}
.timeline p { border-top: 1px solid rgba(0, 0, 0, 0.12); padding: 12px 0; margin: 0; }

/* Reader: contents sidebar and search around a PDF (continuous pages) or a
   web edition (one section at a time). Colors are variables so the web
   edition's Light and Dark themes reach every part of the reader. Light,
   the default, is white pages with IRSC's blue, and its contents side is
   the blue spine every course page has; Dark is for night. */
.reader {
  --r-chrome: #fff;
  --r-page: #fff;
  --r-stage: #e8eaeb;
  --r-ink: #000;
  --r-muted: #595959;
  --r-rule: rgba(0, 0, 0, 0.1);
  --r-rule-strong: rgba(0, 0, 0, 0.2);
  --r-field: #fff;
  --r-field-rule: rgba(0, 0, 0, 0.18);
  --r-hover: rgba(0, 0, 0, 0.05);
  --r-accent: var(--irsc-blue);
  --r-accent-soft: rgba(0, 61, 165, 0.12);
  --r-box: rgba(0, 61, 165, 0.045);
  --r-box-rule: rgba(0, 61, 165, 0.34);
  --r-link: var(--irsc-blue);
  --r-hit: rgb(254 219 0 / 0.5);
  --r-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    'top top'
    'side stage'
    'side bar';
  overflow: hidden;
  background: var(--r-chrome);
  color: var(--r-ink);
  font-family: var(--libby-sans);
}
.reader[data-theme='dark'] {
  color-scheme: dark;
  --r-chrome: #1a1a1a;
  --r-page: #121212;
  --r-stage: #0d0d0d;
  --r-ink: #e8e8e8;
  --r-muted: #a6a6a6;
  --r-rule: rgba(255, 255, 255, 0.1);
  --r-rule-strong: rgba(255, 255, 255, 0.2);
  --r-field: #242424;
  --r-field-rule: rgba(255, 255, 255, 0.16);
  --r-hover: rgba(255, 255, 255, 0.06);
  --r-accent: #99b1db;
  --r-accent-soft: rgba(153, 177, 219, 0.16);
  --r-box: rgba(153, 177, 219, 0.06);
  --r-box-rule: rgba(153, 177, 219, 0.4);
  --r-link: #b3c5e4;
  --r-hit: rgb(254 219 0 / 0.32);
  --r-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
/* In Light, the contents side is IRSC's blue spine: white on blue, yellow for the section being
   read. Its fields stay white with black text. */
.reader:not([data-theme='dark']) .reader-side {
  --r-chrome: var(--irsc-blue);
  --r-ink: #fff;
  --r-muted: rgba(255, 255, 255, 0.78);
  --r-rule: rgba(255, 255, 255, 0.22);
  --r-rule-strong: rgba(255, 255, 255, 0.36);
  --r-hover: rgba(255, 255, 255, 0.1);
  --r-accent: var(--irsc-yellow);
  --r-accent-soft: rgba(255, 255, 255, 0.14);
  border-right: 0;
}
.reader:not([data-theme='dark']) .reader-side :focus-visible { outline: 2px solid var(--irsc-yellow); outline-offset: 2px; }
.reader:not([data-theme='dark']) :is(.reader-search, .view-switch button[aria-pressed='true'], .side-tool) {
  --r-ink: #000;
  --r-muted: #595959;
}
.reader:not([data-theme='dark']) .reader-side .result-snippet mark { background: var(--irsc-yellow); color: var(--irsc-navy); }
.reader:not([data-theme='dark']) .reader-side .reader-course { background: transparent; border-color: var(--r-rule); color: #fff; }
.reader:not([data-theme='dark']) .reader-side .reader-course:hover { border-color: var(--irsc-yellow); }
.reader:not([data-theme='dark']) .reader-side .reader-course .course-code { background: var(--irsc-yellow); color: var(--irsc-navy); }
.reader[data-view='web'] { grid-template-areas: 'top top' 'side stage' 'side stage'; }
.reader[data-side='closed'] { grid-template-columns: 0 minmax(0, 1fr); }
.reader [hidden] { display: none !important; }
.reader a:hover { text-decoration: none; }
.reader .icon-btn { color: var(--r-ink); }
.reader .icon-btn:hover { background: var(--r-hover); }

.reader-top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--r-rule);
  background: var(--r-chrome);
  min-width: 0;
}
.reader-heading { flex: 1; min-width: 0; padding: 0 8px; text-align: center; }
.reader-heading h1,
.reader-heading p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-heading h1 { font-family: var(--libby-serif); font-size: 17px; font-weight: 600; color: var(--r-ink); }
.reader-heading p { font-size: 13px; color: var(--r-muted); min-height: 1.4em; }

.reader-side {
  grid-area: side;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--r-chrome);
  border-right: 1px solid var(--r-rule);
}
.reader[data-side='closed'] .reader-side { visibility: hidden; }
.reader-side-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 12px 0; }
.view-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--r-hover); border: 1px solid var(--r-rule); }
.view-switch button {
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--r-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 16px;
  cursor: pointer;
}
.view-switch button[aria-pressed='true'] { background: var(--r-field); color: var(--r-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14); }
.reader .side-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid var(--r-field-rule);
  border-radius: 999px;
  background: var(--r-field);
  color: var(--r-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.reader .side-tool:hover { border-color: var(--r-accent); color: var(--r-accent); }
.side-tool svg { width: 16px; height: 16px; }
.reader-search {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 12px 8px;
  padding: 0 14px;
  background: var(--r-field);
  border: 1px solid var(--r-field-rule);
  border-radius: 999px;
}
.reader-search:focus-within { border-color: var(--r-accent); box-shadow: 0 0 0 3px var(--r-accent-soft); }
.reader-search svg { flex: none; width: 18px; height: 18px; color: var(--r-muted); }
.reader-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 10px 0;
  font: inherit;
  font-size: 15px;
  color: var(--r-ink);
  outline: none;
}
/* Reading for a course, its card leads back to the unit being read. */
.reader .reader-course {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--r-field-rule);
  border-radius: 12px;
  background: var(--r-field);
  color: var(--r-ink);
  text-decoration: none;
}
.reader .reader-course:hover { border-color: var(--r-accent); }
.reader-course .course-code { height: 22px; padding: 0 9px; font-size: 12px; }
.reader-course strong { font-family: var(--libby-serif); font-size: 16px; font-weight: 600; line-height: 1.25; }
.reader-side-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 32px; }
.reader-note { margin: 8px 10px; font-size: 14px; color: var(--r-muted); }

.reader-toc ol { list-style: none; margin: 0; padding: 0; }
.reader-toc .toc-children > ol { padding-left: 28px; }
.toc-row { display: flex; align-items: flex-start; }
.toc-toggle {
  flex: none;
  width: 28px;
  height: 33px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--r-muted);
  cursor: pointer;
}
.toc-toggle:hover { background: var(--r-hover); color: var(--r-ink); }
.toc-toggle svg { width: 16px; height: 16px; transition: transform 0.15s ease; }
.toc-toggle[aria-expanded='true'] svg { transform: rotate(90deg); }
.reader .toc-group {
  flex: 1;
  width: auto;
  height: auto;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  text-align: left;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--r-ink);
}
/* Chevron plus gap lines chapter numbers up with the entries below them. */
.reader .toc-group svg { flex: none; margin: 3px 8px 0 0; color: var(--r-muted); }
.reader .toc-link {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--r-ink);
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
}
.reader-toc > ol > li > .toc-row > .toc-link { font-weight: 600; }
.reader-toc > ol > li > .toc-row > .toc-link:first-child { margin-left: 28px; }
.reader .toc-link:hover { background: var(--r-hover); color: var(--r-ink); }
.reader .toc-link[aria-current] { background: var(--r-accent-soft); color: var(--r-accent); }
.toc-number { flex: none; min-width: 2.2em; color: var(--r-muted); font-variant-numeric: tabular-nums; }
.toc-link[aria-current] .toc-number { color: inherit; }

.reader-results-count { margin: 8px 10px 4px; font-size: 14px; color: var(--r-muted); }
.result-groups,
.result-groups ol { list-style: none; margin: 0; padding: 0; }
.result-section { margin: 16px 10px 4px; font-size: 14px; font-weight: 600; color: var(--r-ink); }
.reader .result {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--r-ink);
  text-decoration: none;
}
.reader .result:hover { background: var(--r-hover); color: var(--r-ink); }
.reader .result.is-active { background: var(--r-accent-soft); }
.result-page { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--r-muted); }
.result-snippet { font-size: 14px; line-height: 1.45; }
.result-snippet mark { background: var(--r-hit); color: inherit; border-radius: 2px; }

.reader-scrim { display: none; }

.reader-stage { grid-area: stage; position: relative; min-width: 0; min-height: 0; background: var(--r-stage); }
.reader-scroll { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; outline: none; }
.reader-scroll:focus-visible { box-shadow: inset 0 0 0 2px var(--r-accent-soft); }
.reader-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  text-align: center;
  font-size: 16px;
  color: var(--r-ink);
  pointer-events: none;
}

/* PDF edition */

/* pdf.js assumes content-box sizing; the site defaults to border-box. */
.reader .pdfViewer,
.reader .pdfViewer *,
.reader .pdfViewer *::before,
.reader .pdfViewer *::after { box-sizing: content-box; }
.reader .pdfViewer { padding: 20px 0 28px; }
.reader .pdfViewer.removePageBorders .page { margin: 0 auto 20px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 8px 28px rgba(0, 0, 0, 0.18); }
.reader .pdfViewer .page.loadingIcon::after { background: none; }
.reader .textLayer .search-hit {
  position: static;
  margin: -1px;
  padding: 1px;
  border-radius: 2px;
  background: rgb(255 196 0 / 0.45);
}

.reader-bar {
  grid-area: bar;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--r-rule);
  background: var(--r-chrome);
  min-width: 0;
}
.reader-bar-center { display: flex; align-items: center; gap: 20px; min-width: 0; }
.reader-nav {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--r-field-rule);
  border-radius: 999px;
  background: var(--r-field);
  color: var(--r-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.reader-nav-next { padding: 6px 8px 6px 14px; }
.reader-nav svg { width: 18px; height: 18px; }
.reader-nav:not(:disabled):hover { border-color: var(--r-accent); color: var(--r-accent); }
.reader-nav:disabled { opacity: 0.45; cursor: default; }
.reader-page-field { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--r-muted); white-space: nowrap; }
.reader-page-field input {
  width: 3.4em;
  padding: 5px 4px;
  border: 1px solid var(--r-field-rule);
  border-radius: 8px;
  background: var(--r-field);
  color: var(--r-ink);
  font: inherit;
  text-align: center;
}
.reader-zoom { display: inline-flex; align-items: center; gap: 2px; }
.reader-zoom .icon-btn { width: 34px; height: 34px; }
.reader-zoom .icon-btn svg { width: 18px; height: 18px; }
.reader-zoom-level {
  min-width: 4em;
  padding: 6px 4px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--r-ink);
  font: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.reader-zoom-level:hover { background: var(--r-hover); }

/* Web edition */

.reader[data-view='web'] .reader-stage { background: var(--r-page); }
.web-progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 2; pointer-events: none; }
.web-progress span { display: block; height: 100%; background: var(--r-accent); transform: scaleX(0); transform-origin: 0 50%; }
.web-article {
  max-width: 40em;
  margin: 0 auto;
  padding: 2.4em 1.5em 4em;
  font-size: calc(18px * var(--web-scale, 1));
  color: var(--r-ink);
}
.web-kicker {
  margin: 0 0 0.9em;
  font-family: var(--libby-sans);
  font-size: 0.74em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--r-muted);
}
.web-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8em;
  margin: 3em 0 1.6em;
  padding-top: 1.6em;
  border-top: 1px solid var(--r-rule);
  font-family: var(--libby-sans);
}
.reader .web-pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  padding: 0.85em 1em;
  border: 1px solid var(--r-field-rule);
  border-radius: 12px;
  background: var(--r-field);
  color: var(--r-ink);
  text-decoration: none;
}
.reader .web-pager-link:hover { border-color: var(--r-accent); color: var(--r-ink); }
.web-pager-link[rel='next'] { grid-column: 2; text-align: right; }
.web-pager-link span { font-size: 0.72em; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--r-accent); }
.web-pager-link strong { font-size: 0.92em; font-weight: 600; line-height: 1.35; }
.web-pager-link .web-pager-time { font-size: 0.8em; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--r-muted); }
.web-credit { font-family: var(--libby-sans); font-size: 0.74em; line-height: 1.55; color: var(--r-muted); }
.web-credit p { margin: 0; }
.reader .web-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.web-settings-anchor { position: relative; }
.web-settings {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 16px;
  width: 17.5rem;
  padding: 16px;
  border: 1px solid var(--r-rule);
  border-radius: 14px;
  background: var(--r-field);
  box-shadow: var(--r-shadow);
  color: var(--r-ink);
  font-family: var(--libby-sans);
}
.web-setting { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.web-setting-label { padding: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--r-muted); }
.web-stepper { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border: 1px solid var(--r-field-rule); border-radius: 10px; overflow: hidden; }
.web-stepper button { height: 40px; border: 0; background: none; color: var(--r-ink); cursor: pointer; font-family: var(--libby-serif); }
.web-stepper button:hover { background: var(--r-hover); }
.web-small-a { font-size: 14px; }
.web-large-a { font-size: 22px; }
.web-stepper output { min-width: 4.5em; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.web-choices { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 6px; }
.web-choice { position: relative; }
.web-choice input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.web-choice span { display: block; padding: 8px 4px; border: 1px solid var(--r-field-rule); border-radius: 10px; font-size: 14px; text-align: center; }
.web-choice input:checked + span { border-color: var(--r-accent); background: var(--r-accent-soft); color: var(--r-accent); font-weight: 600; }
.web-choice input:focus-visible + span { outline: 2px solid var(--r-accent); outline-offset: 2px; }

/* OpenStax content: section markup as imported by openstax.py */
.book-content {
  font-family: var(--libby-serif);
  line-height: 1.7;
  overflow-wrap: break-word;
  color: var(--r-ink);
}
.reader[data-font='sans'] .book-content { font-family: var(--libby-sans); line-height: 1.65; }
.book-content :is(h1, h2, h3, h4, h5, h6) { margin: 1.7em 0 0.6em; color: var(--r-ink); font-family: inherit; font-weight: 650; line-height: 1.25; }
.book-content :is(h1, h2)[data-type='document-title'] { margin: 0 0 1em; font-size: 1.9em; font-weight: 600; }
.book-content [data-type='document-title'] .os-number { margin-right: 0.3em; color: var(--r-accent); }
.book-content h3 { font-size: 1.35em; }
.book-content h4 { font-size: 1.12em; }
.book-content p { margin: 0 0 1em; }
.book-content :is(ul, ol) { margin: 0 0 1em; padding-left: 1.4em; }
.book-content li { margin: 0.3em 0; }
.book-content li > p:last-child { margin-bottom: 0; }
.reader .book-content a { color: var(--r-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.reader .book-content a:has(> :is(h2, h3, h4)) { color: inherit; text-decoration: none; }
.reader .book-content a:has(> :is(h2, h3, h4)):hover :is(h2, h3, h4) { text-decoration: underline; }
.book-content :is(strong, b, [data-type='term'], .os-term) { font-weight: 650; }
.book-content :is(sup, sub) { line-height: 0; }
.book-content blockquote { margin: 1.3em 0; padding: 0.1em 0 0.1em 1.1em; border-left: 3px solid var(--r-rule-strong); }
.book-content hr { border: 0; border-top: 1px solid var(--r-rule); margin: 2em 0; }
.book-content :is(pre, code) { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.88em; }
.book-content pre { overflow-x: auto; padding: 0.9em 1em; border-radius: 8px; background: var(--r-box); }
.book-content img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 4px; }
.reader[data-theme='dark'] .book-content img { filter: brightness(0.88); }
.book-content .os-figure { margin: 1.9em 0; }
.book-content figure { margin: 0; }
.book-content .scaled-down img { max-width: min(100%, max(60%, 16rem)); }
.book-content .scaled-down-30 img { max-width: min(100%, max(30%, 12rem)); }
.book-content .os-caption-container { margin-top: 0.7em; font-family: var(--libby-sans); font-size: 0.84em; line-height: 1.5; color: var(--r-muted); }
.book-content .os-caption-container :is(.os-title-label, .os-number, .os-title) { font-weight: 700; color: var(--r-ink); }
.book-content .missing-image { display: block; padding: 1em; border: 1px dashed var(--r-rule-strong); border-radius: 8px; color: var(--r-muted); font-style: italic; }
.book-content :is([data-type='note'], [data-type='example'], section.learning-objectives) {
  /* Browsers don't wrap long equations; a box scrolls rather than spill over. */
  overflow-x: auto;
  margin: 1.9em 0;
  padding: 1.1em 1.3em;
  border: 1px solid var(--r-rule);
  border-left: 4px solid var(--r-box-rule);
  border-radius: 10px;
  background: var(--r-box);
}
.book-content :is([data-type='note'], [data-type='example']) > :is(.os-title, h3, h4):first-child,
.book-content section.learning-objectives > h3:first-child {
  margin: 0 0 0.8em;
  font-family: var(--libby-sans);
  font-size: 0.76em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--r-accent);
}
.book-content :is([data-type='note'], [data-type='example']) .os-number { margin-left: 0.3em; }
.book-content :is(.os-note-body, [data-type='example'], section.learning-objectives) > :last-child { margin-bottom: 0; }
.book-content [data-type='exercise'] { margin: 1.3em 0; }
.book-content [data-type='exercise-question'] { display: flex; gap: 0.5em; margin: 1em 0; }
.book-content [data-type='exercise-question'] > .os-number { flex: none; font-weight: 700; }
.book-content [data-type='exercise-question'] > .os-divider { display: none; }
.book-content .os-problem-container > :last-child { margin-bottom: 0.4em; }
.book-content [data-type='solution'] { margin-top: 0.8em; }
.book-content [data-type='example'] [data-type='solution'] { padding-top: 0.8em; border-top: 1px dashed var(--r-rule-strong); }
.book-content [data-type='solution-title'] { margin: 0 0 0.5em; font-family: var(--libby-sans); font-size: 0.78em; letter-spacing: 0.07em; text-transform: uppercase; color: var(--r-muted); }
.book-content details.os-solution-toggle { margin: 0.6em 0 1em; }
.book-content details.os-solution-toggle > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.35em 0.9em;
  border: 1px solid var(--r-field-rule);
  border-radius: 999px;
  background: var(--r-field);
  color: var(--r-accent);
  font-family: var(--libby-sans);
  font-size: 0.85em;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.book-content details.os-solution-toggle > summary::-webkit-details-marker { display: none; }
.book-content details.os-solution-toggle[open] > summary { margin-bottom: 0.4em; }
.book-content .os-solution-area { margin: 0 0 1.6em; }
.book-content .os-note-number {
  display: block;
  margin: 1.4em 0 0.5em;
  padding-bottom: 0.2em;
  border-bottom: 1px solid var(--r-rule);
  font-family: var(--libby-sans);
  font-weight: 700;
  color: var(--r-accent);
}
.book-content .os-solution-area > :is([data-type='solution'], [data-type='question-solution']) {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  margin: 0.45em 0;
}
.book-content .os-solution-area > [data-type] > .os-number { flex: none; min-width: 1.6em; font-weight: 700; }
.reader .book-content .os-solution-area > [data-type] > a.os-number { text-decoration: none; }
.book-content .os-solution-area > [data-type] > .os-divider { display: none; }
.book-content .os-solution-container { flex: 1; min-width: 0; }
.book-content .os-solution-container > :first-child { margin-top: 0; }
.book-content .os-solution-container > :last-child { margin-bottom: 0; }
.book-content .os-table { overflow-x: auto; margin: 1.7em 0; }
.book-content table { border-collapse: collapse; font-size: 0.88em; line-height: 1.45; }
.book-content :is(th, td) { padding: 0.5em 0.75em; border: 1px solid var(--r-rule-strong); text-align: left; vertical-align: top; }
.book-content th { background: var(--r-box); font-weight: 650; }
.book-content [data-align='center'] { text-align: center; }
.book-content [data-align='right'] { text-align: right; }
/* block math keeps the browser's math layout, which centers it; plain block would not. */
.book-content math[display='block'] { display: block math; overflow-x: auto; overflow-y: hidden; margin: 1em 0; }
.book-content dl { margin: 0 0 1em; }
.book-content dt { font-weight: 700; }
.book-content dd { margin: 0.15em 0 0; }
.book-content .os-glossary-list dl { margin-bottom: 1.1em; }
.book-content .group-by { margin: 1.5em 0; }
.book-content .group-label {
  display: block;
  margin-bottom: 0.6em;
  padding-bottom: 0.2em;
  border-bottom: 1px solid var(--r-rule);
  font-family: var(--libby-sans);
  font-weight: 700;
  color: var(--r-accent);
}
.book-content .os-index-item { margin: 0.3em 0; font-size: 0.92em; }
.book-content .os-index-item .os-term { margin-right: 0.5em; }
.book-content .os-term-section-link { margin-right: 0.6em; font-size: 0.9em; }
.book-content :is([data-type='footnote-refs'], [role='doc-footnote']) { font-size: 0.85em; color: var(--r-muted); }
.book-content .embed-link { font-family: var(--libby-sans); font-weight: 600; }
.book-content mark.search-hit { padding: 0 0.05em; border-radius: 2px; background: var(--r-hit); color: inherit; }
.book-content .is-target { border-radius: 4px; animation: web-target 2.4s ease-out; }
@keyframes web-target {
  from { background: var(--r-hit); box-shadow: 0 0 0 0.35em var(--r-hit); }
  to { background: transparent; box-shadow: 0 0 0 0.35em transparent; }
}

@media (max-width: 899px) {
  .reader,
  .reader[data-side='closed'] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'top' 'stage' 'bar';
  }
  .reader[data-view='web'] { grid-template-areas: 'top' 'stage' 'stage'; }
  .reader-side {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: min(88vw, 360px);
    border-right: 0;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.22s ease, visibility 0s;
  }
  .reader[data-side='closed'] .reader-side {
    transform: translateX(-100%);
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
  }
  .reader[data-side='open'] .reader-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 29;
    border: 0;
    background: rgba(0, 0, 0, 0.45);
  }
  .reader-top { padding: 6px 4px; gap: 0; }
  .reader-heading h1 { font-size: 16px; }
  .reader-bar { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .reader-bar-center { gap: 8px; }
  .reader-nav, .reader-nav-next { padding: 7px; }
  .reader-nav span, .reader-page-field > span:first-child { display: none; }
  .reader-zoom-level { min-width: 3.4em; }
  .web-article { padding: 1.6em 1.15em 3em; }
  .web-settings { position: fixed; top: 56px; right: 8px; left: auto; width: min(18rem, calc(100vw - 16px)); }
}
@media (max-width: 520px) {
  .web-pager { grid-template-columns: 1fr; }
  .web-pager-link[rel='next'] { grid-column: auto; grid-row: 1; }
}
.book-content .os-table:focus-visible { outline: 2px solid var(--r-accent); outline-offset: 4px; }

/* Printing a web section prints just the section and its credit. */
@media print {
  .reader[data-view='web'] { display: block; height: auto; overflow: visible; background: #fff; }
  .reader[data-view='web'] :is(.reader-top, .reader-side, .reader-scrim, .web-progress, .web-pager, .reader-status) { display: none !important; }
  .reader[data-view='web'] :is(.reader-stage, .reader-scroll) { position: static; overflow: visible; background: #fff; }
  .reader[data-view='web'] .web-article { max-width: none; padding: 0; font-size: 11pt; color: #000; }
  .reader[data-view='web'] details.os-solution-toggle > summary { display: none; }
}

@media (max-width: 960px) {
  .hero-split, .explore, .support, .title-hero { grid-template-columns: 1fr; }
  .event-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .title-covers { justify-content: flex-start; }
  .libby { grid-template-columns: 1fr; }
  .libby-main { min-width: 0; }
  .libby-rail { display: none; }
  .about-block dl { grid-template-columns: 110px 1fr; }
  .libby-tabbar {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    position: sticky;
    bottom: 0;
    background: var(--irsc-blue);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    z-index: 6;
  }
  .libby-tab { font-size: 10px; }
}

@media (max-width: 760px) {
  .util-left { display: none; }
  .catalog-search { display: none; }
  .mobile-search, .hamburger { display: grid; }
  .brand-bar-inner { padding: 10px 0; }
  .logo-img { height: 44px; }
  .main-nav { display: none; }
  .main-nav.is-open { display: block; border-bottom: 1px solid #ddd; max-height: calc(100vh - 110px); overflow: auto; }
  .main-nav-list { flex-direction: column; }
  .mega { position: static; box-shadow: none; border-top: 0; padding: 0 0 12px 16px; }
  .main-nav-list > li.is-open .mega { display: block; }
  .mobile-catalog-search { display: block; }
  .event-grid { grid-template-columns: 1fr; }
  .hero-overlay, .hero-dots { padding-left: 20px; }
  .title-hero { grid-template-columns: 1fr; }
  .title-covers, .title-main-cover, .title-main-cover.cover { width: 150px; }
  .title-row { grid-template-columns: 72px 1fr; }
  .row-cta { grid-column: 2; flex-direction: row; justify-content: flex-start; }
  .libby-item-cover, .libby-item-cover .cover { width: 104px; flex-basis: 104px; }
  .libby-item h3 { font-size: 24px; }
  .libby-item .libby-action { font-size: 16px; }
}

@media (min-width: 761px) {
  .main-nav { display: block !important; }
}

/* Courses: the list of IRSC courses, and one course with its book's chapters as units. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.course-code {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--libby-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.courses-page { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 8px 0 80px; }
.courses-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.courses-head h2 { margin: 0; font-size: 34px; line-height: 1.15; }
.courses-head p { margin: 0; max-width: 60ch; font-size: 17px; }
.courses-find { max-width: 480px; }
.courses-subjects { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.libby .courses-subjects a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--libby-rule-strong);
  border-radius: 999px;
  color: var(--libby-ink);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
}
.libby .courses-subjects a:hover { border-color: var(--libby-accent); color: var(--libby-accent); }
.courses-subjects span { color: var(--libby-muted); font-weight: 400; }
.courses-group { margin-bottom: 36px; scroll-margin-top: 72px; }
.courses-group h3 { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--libby-rule); font-size: 24px; }
.course-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 8px 28px;
}
.libby .course-card a {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 10px;
  margin: 0 -10px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}
.libby .course-card a:hover { background: rgba(0, 61, 165, 0.07); }
/* 104 px is the smallest a drawn cover keeps every title word whole (tests/test_covers_browser.py). */
.course-card-cover { flex: 0 0 104px; }
.course-card-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 4px; }
.course-card-title { font-family: var(--libby-serif); font-size: 18px; font-weight: 600; line-height: 1.25; }
.course-card-meta { font-size: 14px; color: var(--libby-muted); }

/* A course's home: what it is, its textbook, and what to do in it. */
.course-home { display: flex; flex-direction: column; gap: 36px; width: min(1000px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 80px; }
.course-head { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 48px; align-items: start; }
.course-head-text { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.course-kicker { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 15px; font-weight: 600; color: var(--libby-ink-2); }
.course-kicker .course-code { height: 28px; padding: 0 12px; font-size: 14px; }
.libby .course-head h2 { margin: 0; max-width: 20ch; font-size: 46px; line-height: 1.06; letter-spacing: -0.015em; text-wrap: balance; }
.course-lede { margin: 0; max-width: 68ch; font-size: 17px; line-height: 1.6; color: var(--libby-ink-2); }
.course-book { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.course-book-cover { width: 200px; }
.course-book figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--libby-muted); }
.course-book-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.course-book strong { font-family: var(--libby-serif); font-size: 17px; font-weight: 600; line-height: 1.25; color: var(--libby-ink); }
.course-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.libby .course-tool {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  box-sizing: border-box;
  padding: 20px;
  border: 1px solid var(--libby-rule);
  border-radius: 14px;
  color: var(--libby-ink);
  text-decoration: none;
}
.libby a.course-tool:hover { border-color: var(--libby-accent); }
.libby .course-tool.is-primary { border-color: var(--libby-accent); background: var(--libby-accent); color: #fff; }
.libby .course-tool.is-primary:hover { background: var(--libby-accent-dark); }
.course-tool.is-coming { border-style: dashed; color: var(--libby-muted); }
.course-tool-icon { display: grid; flex: none; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: rgba(0, 61, 165, 0.08); color: var(--libby-accent); }
.course-tool.is-primary .course-tool-icon { background: rgba(255, 255, 255, 0.16); color: var(--irsc-yellow); }
.course-tool.is-coming .course-tool-icon { background: var(--libby-paper-2); color: var(--libby-muted); }
.course-tool-icon svg { width: 24px; height: 24px; }
.course-tool-text { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; }
.course-tool-text strong { font-family: var(--libby-serif); font-size: 20px; font-weight: 600; line-height: 1.25; }
.course-tool-text span { font-size: 14.5px; color: var(--libby-muted); }
.course-tool.is-primary .course-tool-text span { color: rgba(255, 255, 255, 0.85); }
.course-coming {
  flex: none;
  padding: 2px 9px;
  border: 1px dashed var(--libby-rule-strong);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--libby-muted);
}
.course-more { margin: 0; font-size: 15px; color: var(--libby-ink-2); }
.libby .course-more a { color: var(--libby-accent); }

@media (max-width: 760px) {
  .courses-head h2 { font-size: 28px; }
  .course-list { grid-template-columns: minmax(0, 1fr); }
  .course-home { gap: 26px; padding-top: 20px; }
  .course-head { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .course-book { order: -1; flex-direction: row; align-items: center; gap: 16px; }
  .course-book-cover { width: 96px; flex: none; }
  .libby .course-head h2 { font-size: 32px; line-height: 1.12; }
  .course-lede { font-size: 15.5px; }
}

/* On phones the header continues the blue spine. */
@media (max-width: 960px) {
  .libby-top { background: var(--irsc-blue); border-bottom: 0; }
  .libby .libby-top h1, .libby-top :is(.libby-back, .icon-btn) { color: #fff; }
  .libby-top :is(.libby-back, .icon-btn):hover { background: rgba(255, 255, 255, 0.12); }
  .libby-top :focus-visible { outline: 2px solid var(--irsc-yellow); outline-offset: 2px; }
}

/* Math the browser draws itself (mathcore.py rewrote it into MathML Core at import). */
.book-content math { font-family: 'STIX Two Math', 'Zibili Math', math; }
.book-content mtd[columnalign='left'] { text-align: left; }
.book-content mtd[columnalign='right'] { text-align: right; }
/* A styled word stays a word, and CSS gives it the style, in a text face with a real bold and
   italic: the math font has neither, and the bold Safari makes up from it barely shows. */
.book-content .mathvariant-bold, .book-content .mathvariant-italic,
.book-content .mathvariant-bold-italic { font-family: 'STIX Two Text', 'Source Serif 4', serif; }
.book-content .mathvariant-bold, .book-content .mathvariant-bold-italic,
.book-content .mathvariant-bold-sans-serif, .book-content .mathvariant-sans-serif-bold-italic { font-weight: bold; }
.book-content .mathvariant-italic, .book-content .mathvariant-bold-italic,
.book-content .mathvariant-sans-serif-italic, .book-content .mathvariant-sans-serif-bold-italic { font-style: italic; }
.book-content .mathvariant-sans-serif, .book-content .mathvariant-bold-sans-serif,
.book-content .mathvariant-sans-serif-italic, .book-content .mathvariant-sans-serif-bold-italic { font-family: 'Source Sans 3', sans-serif; }
.book-content .mathvariant-monospace { font-family: monospace; }
/* columnspacing: each cell carries its share of the space as <mspace>, so the browser's padding goes. */
.book-content .mtable-spaced > mtr > mtd, .book-content .mtable-spaced > mlabeledtr > mtd { padding-left: 0; padding-right: 0; }
/* rowspacing, at the steps mathcore.py rounds it to: half above each cell, half below. */
.book-content mtable[rowspacing='0em'] > * > mtd { padding-top: 0; padding-bottom: 0; }
.book-content mtable[rowspacing='0.1em'] > * > mtd { padding-top: 0.05em; padding-bottom: 0.05em; }
.book-content mtable[rowspacing='0.2em'] > * > mtd { padding-top: 0.1em; padding-bottom: 0.1em; }
.book-content mtable[rowspacing='0.3em'] > * > mtd { padding-top: 0.15em; padding-bottom: 0.15em; }
.book-content mtable[rowspacing='0.5em'] > * > mtd { padding-top: 0.25em; padding-bottom: 0.25em; }
.book-content mtable[rowspacing='1em'] > * > mtd { padding-top: 0.5em; padding-bottom: 0.5em; }
.book-content mrow[class*='menclose-'] { padding: 0.25em 0.2em; }
.book-content .menclose-box { border: 1px solid currentColor; }
.book-content .menclose-roundedbox { border: 1px solid currentColor; border-radius: 0.4em; }
.book-content .menclose-circle { border: 1px solid currentColor; border-radius: 50%; }
.book-content .menclose-left { border-left: 1px solid currentColor; }
.book-content .menclose-right { border-right: 1px solid currentColor; }
.book-content .menclose-top { border-top: 1px solid currentColor; }
.book-content .menclose-bottom { border-bottom: 1px solid currentColor; }
.book-content .menclose-longdiv { border-top: 1px solid currentColor; border-left: 1px solid currentColor; border-top-left-radius: 0.5em; }
.book-content .menclose-actuarial { border-top: 1px solid currentColor; border-right: 1px solid currentColor; }
/* Strikes are a thin line with soft edges, so a diagonal doesn't stair-step. A gradient to a
   corner runs its middle line between the other two corners: "to bottom right" draws the line
   up from bottom left, which is updiagonalstrike. */
.book-content .menclose-horizontalstrike { background: linear-gradient(to bottom, transparent calc(50% - 0.05em), currentColor calc(50% - 0.025em), currentColor calc(50% + 0.025em), transparent calc(50% + 0.05em)); }
.book-content .menclose-verticalstrike { background: linear-gradient(to right, transparent calc(50% - 0.05em), currentColor calc(50% - 0.025em), currentColor calc(50% + 0.025em), transparent calc(50% + 0.05em)); }
.book-content .menclose-updiagonalstrike { background: linear-gradient(to bottom right, transparent calc(50% - 0.05em), currentColor calc(50% - 0.025em), currentColor calc(50% + 0.025em), transparent calc(50% + 0.05em)); }
.book-content .menclose-downdiagonalstrike { background: linear-gradient(to top right, transparent calc(50% - 0.05em), currentColor calc(50% - 0.025em), currentColor calc(50% + 0.025em), transparent calc(50% + 0.05em)); }

/* Sign in: one card on the paper, with no rail or tabs until you're in. */
.libby.sign-in { display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--irsc-blue); }
.sign-in-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--libby-rule);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sign-in-card .sign-in-mark { margin: 0; font-family: var(--libby-serif); color: var(--libby-accent); font-weight: 600; }
.libby .sign-in-card h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.2; }
.sign-in-card p { margin: 0 0 12px; color: var(--libby-ink-2); }
.sign-in-form { display: flex; flex-direction: column; gap: 8px; }
.sign-in-form label { font-weight: 600; }
.sign-in-form input {
  font: inherit;
  font-size: 17px;
  padding: 12px 14px;
  border: 1px solid var(--libby-rule-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--libby-ink);
}
.sign-in-form input:focus-visible { outline: 2px solid var(--libby-accent); outline-offset: 1px; }
.sign-in-button {
  font: inherit;
  font-weight: 600;
  font-size: 17px;
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--libby-accent);
  color: #fff;
  cursor: pointer;
}
.sign-in-button:hover { background: var(--libby-accent-dark); }
.sign-in-button:disabled { opacity: 0.6; cursor: default; }
.sign-in-again {
  align-self: flex-start;
  font: inherit;
  background: none;
  border: 0;
  padding: 8px 0;
  color: var(--libby-accent);
  text-decoration: underline;
  cursor: pointer;
}
.sign-in-card .sign-in-note { padding: 10px 12px; border-radius: 10px; background: var(--libby-paper-2); color: var(--libby-ink); }
.sign-in-card .sign-in-error { margin: 4px 0 0; color: var(--libby-accent-dark); font-weight: 600; }
