/* Slightly tighter max width for readability */
main.container {
  max-width: 750px;
  margin: auto;
  padding: 1.5rem;
}
h1, h2, h3 {
  margin-top: 2rem;
}
footer {
  max-width: 750px;
  margin: auto;
  margin-top: 3rem;
}

.callout {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
}

.callout.warning {
  background: rgba(255, 200, 150, 0.08);
  overflow: visible;
  border-left: 4px solid #e57373;
}

.callout.warning ul {
  margin: 0 0 1rem 1.5rem;
  padding-left: 0;
}

/* Restore bullet point lists in callout warnings */
.callout.warning li {
  list-style-type: square;
  display: list-item;
}

.callout.info {
  background: rgba(150, 200, 255, 0.08);
}

p.lede {
  margin: 0 0 1.5rem;
}

.answer {
  margin-top: .75rem;
}
.answer p {
  margin: .6rem 0;
}

details {
  margin: 1rem 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--pico-card-border-color);
  border-radius: var(--pico-border-radius);
  background: var(--pico-card-background-color);
}

details > summary {
  font-weight: 600;
}

/* right-side caret */
details > summary::after {
  float: right;
  transition: transform 0.15s ease-in-out;
  opacity: 0.8;
}

details[open] > summary::after {
  transform: rotate(90deg);
}

/* spacing between summary and content */
details[open] > summary {
  margin-bottom: 0.5rem;
}

/* indent paragraphs inside details */
details > :not(summary) {
  padding-left: 0.5rem;
}

/* make inner paragraphs not blend together */
details > p {
  margin-bottom: 0.75rem;
}

details > p:last-child {
  margin-bottom: 0;
}

/* Skip link for keyboard/screen reader users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--pico-background-color, #fff);
  border: 2px solid currentColor;
  border-radius: 0.25rem;
  z-index: 200;
}

.papers {
  display: grid;
  gap: 1.5rem;
}

.paper-card {
  border-radius: 0.5rem;
  border: 1px solid var(--pico-muted-border-color);
  padding: 1.25rem 1.5rem;
}

.paper-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.paper-meta {
  font-size: 0.9rem;
  color: var(--pico-muted-color);
  margin-bottom: 0.5rem;
}

.paper-title {
  margin: 0;
  font-size: 1.05rem;
}

.doi-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.doi-label {
  font-weight: 600;
}

/* clipboard icon */
.icon-button {
  border: none;
  background: none;
  padding: 0.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--pico-contrast);
}

.icon-button:focus-visible {
  outline: 2px solid var(--pico-primary);
  outline-offset: 2px;
}

.icon-button svg {
  width: 1rem;
  height: 1rem;
  stroke: var(--pico-contrast);
}

.icon-button.copied {
  outline: 1px solid var(--pico-primary);
}

.helper-text {
  font-size: 0.9rem;
  color: var(--pico-muted-color);
  margin-bottom: 1.5rem;
}

/* Simple responsive nav bar */
.site-header {
  margin: 0 auto 1.5rem auto;
  max-width: 750px;
  padding: 0 1.5rem;
}
.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-title {
  font-weight: 600;
  text-decoration: none;
}
.site-nav-list {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.site-nav-list a[aria-current="page"] {
  text-decoration: underline;
}

/* Theme toggle styles */
.theme-toggle-nav {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: none;
  border: none;
  color: var(--pico-contrast);
}

.theme-toggle-nav .theme-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.theme-toggle-nav svg {
  display: block;
}

/* Light theme: sun visible, moon tucked away */
[data-theme="light"] .theme-icon--light {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

[data-theme="light"] .theme-icon--dark {
  opacity: 0;
  transform: scale(0.6) rotate(25deg);
}

/* Dark theme: moon visible, sun tucked away */
[data-theme="dark"] .theme-icon--light {
  opacity: 0;
  transform: scale(0.6) rotate(-25deg);
}

[data-theme="dark"] .theme-icon--dark {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* post-list page */
.post-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 1rem;
}

.post-list {
  padding: 0;
  margin: 1rem 0 3rem;
  display: grid;
  gap: 1rem;
}

.post-list > li {
  list-style: none;
}

.post-card {
  border: 1px solid var(--pico-card-border-color);
  border-radius: var(--pico-border-radius);
  padding: 1rem 1.1rem;
  background: var(--pico-card-background-color);
}

.post-link {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 650;
  text-decoration: none;
}

.post-link:hover {
  text-decoration: underline;
}

.post-excerpt {
  margin: 0.5rem 0 0.75rem;
  opacity: 0.85;
  line-height: 1.5;
}

.post-readmore {
  font-weight: 600;
  text-decoration: none;
}

.post-readmore:hover {
  text-decoration: underline;
}

@media (min-width: 900px) {
  .post-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* No telephone numbers in footnotes
 * or footnotes inside references sections */
#references ~ .footnotes a[href^="tel:"],
.footnotes a[href^="tel:"] {
  color: inherit;
  text-decoration: none;
  pointer-events: none;
  cursor: default;
}

.footnotes { /* suppress iOS long-press callout */
  -webkit-touch-callout: none;
}

/* RSS button styling */
.rss-pill {
  font-size: var(--pico-font-size-small);
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;

  color: var(--pico-primary-inverse);
  border: 1px solid var(--pico-primary-border);
  border-radius: 999px;

  text-decoration: none;
  line-height: 1;
}

/* Link anchors */
:is(h1, h2, h3) a:first-child::before {
    content: "#";
    padding-right: 0.25em;
}
