/* MSCiLab: styles shared by the landing page and the members area.
 * Imitates the al-folio theme used on moralsciencelab.com. */

:root {
  --global-bg-color: #ffffff;
  --global-text-color: #000000;
  --global-text-color-light: #828282;
  --global-theme-color: #b509ac;
  --global-hover-color: #b509ac;
  --global-divider-color: rgba(0, 0, 0, 0.1);
  --global-card-bg-color: #ffffff;
  --global-error-color: #c00;
  color-scheme: light;
}

html[data-theme="dark"] {
  --global-bg-color: #1c1c1d;
  --global-text-color: #e8e8e8;
  --global-text-color-light: #9a9a9a;
  --global-theme-color: #2698ba;
  --global-hover-color: #2698ba;
  --global-divider-color: #424246;
  --global-card-bg-color: #212529;
  --global-error-color: #ff8a80;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--global-text-color);
  background-color: var(--global-bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s, color .2s;
}

a {
  color: var(--global-theme-color);
  text-decoration: none;
}

a:hover {
  color: var(--global-hover-color);
  text-decoration: underline;
}

b,
strong {
  font-weight: 700;
}

.container {
  width: 100%;
  max-width: 930px;
  margin: 0 auto;
  padding: 0 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- navbar ---------- */
body>header {
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar {
  background-color: var(--global-bg-color);
  border-bottom: 1px solid var(--global-divider-color);
  opacity: .97;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 57px;
  gap: 12px;
}

.navbar-brand {
  color: var(--global-text-color);
  font-size: 1.25rem;
  font-weight: 300;
  white-space: nowrap;
}

.navbar-brand:hover {
  color: var(--global-text-color);
  text-decoration: none;
}

.navbar-brand b {
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.nav button {
  display: block;
  padding: 8px 10px;
  color: var(--global-text-color);
  font: inherit;
  font-size: 1rem;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav a:hover,
.nav button:hover {
  color: var(--global-hover-color);
  text-decoration: none;
}

.nav .active>a {
  color: var(--global-theme-color);
  font-weight: bolder;
}

.nav .lang {
  display: flex;
}

.nav .lang button {
  padding: 8px 4px;
  color: var(--global-text-color-light);
}

.nav .lang button[aria-pressed="true"] {
  color: var(--global-theme-color);
  font-weight: bolder;
}

#light-toggle {
  display: flex;
  align-items: center;
  padding: 8px 4px 8px 10px;
}

#light-toggle svg {
  width: 20px;
  height: 20px;
}

#light-toggle .moon {
  display: none;
}

html[data-theme="dark"] #light-toggle .sun {
  display: none;
}

html[data-theme="dark"] #light-toggle .moon {
  display: block;
}

@media (max-width: 575px) {
  .navbar .container {
    flex-wrap: wrap;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .navbar-brand {
    font-size: 1.1rem;
  }

  .nav a,
  .nav button {
    padding: 6px 7px;
    font-size: .95rem;
  }
}

/* ---------- page header ---------- */
main,
main.container {
  flex: 1;
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.post-header {
  margin-bottom: 2rem;
}

.post-title {
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1.2;
  margin: 0 0 .5rem;
}

.post-title b {
  font-weight: 700;
}

.post-header h4,
.desc {
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

h2 {
  color: var(--global-theme-color);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 2.5rem 0 1rem;
}

.muted {
  color: var(--global-text-color-light);
}

/* ---------- study / resource list (al-folio publication style) ---------- */
ol.bibliography,
ul.bibliography {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bibliography li {
  border-top: 1px solid var(--global-divider-color);
}

.bibliography li:last-child {
  border-bottom: 1px solid var(--global-divider-color);
}

.bibliography a.row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 4px;
  color: var(--global-text-color);
}

.bibliography a.row:hover {
  text-decoration: none;
}

.bibliography a.row:hover .title {
  color: var(--global-hover-color);
}

.abbr {
  flex: 0 0 auto;
  min-width: 46px;
  text-align: center;
  background-color: var(--global-theme-color);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 3px 6px;
  border-radius: 3px;
}

.bibliography .text {
  flex: 1;
  min-width: 0;
}

.bibliography .title {
  font-weight: 700;
  transition: color .15s;
}

.bibliography .meta {
  display: block;
  font-size: .9rem;
  color: var(--global-text-color-light);
}

.bibliography .go {
  color: var(--global-text-color-light);
  font-size: 1.2rem;
  transition: transform .15s, color .15s;
}

.bibliography a.row:hover .go {
  color: var(--global-hover-color);
  transform: translateX(3px);
}

/* ---------- forms (members login) ---------- */
.card {
  background: var(--global-card-bg-color);
  border: 1px solid var(--global-divider-color);
  border-radius: 4px;
  padding: 24px;
  max-width: 380px;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .08), 0 2px 10px 0 rgba(0, 0, 0, .06);
}

label {
  display: block;
  font-size: .9rem;
  color: var(--global-text-color-light);
  margin: 0 0 4px;
}

input[type=text],
input[type=password] {
  width: 100%;
  font: inherit;
  color: var(--global-text-color);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--global-text-color-light);
  border-radius: 0;
  padding: 6px 0;
  margin-bottom: 22px;
}

input:focus {
  outline: none;
  border-bottom: 2px solid var(--global-theme-color);
  padding-bottom: 5px;
}

.btn {
  font: inherit;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--global-theme-color);
  color: #fff;
  border: 0;
  border-radius: 3px;
  padding: 10px 22px;
  cursor: pointer;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .16);
}

.btn:hover {
  filter: brightness(1.08);
}

.error {
  color: var(--global-error-color);
  margin-bottom: 16px;
}

code {
  font-size: .9em;
  color: var(--global-theme-color);
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--global-divider-color);
  padding: 40px 0;
  font-size: .9rem;
  text-align: center;
  color: var(--global-text-color);
}

footer a {
  color: var(--global-theme-color);
}

/* ---------- language switch (landing page) ---------- */
html[lang="es"] .en,
html:not([lang="es"]) .es {
  display: none;
}

/* ---------- upload form ---------- */
.card.wide {
  max-width: 560px;
}

textarea {
  width: 100%;
  font: inherit;
  color: var(--global-text-color);
  background: transparent;
  border: 1px solid var(--global-divider-color);
  border-radius: 3px;
  padding: 8px 10px;
  margin-bottom: 22px;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: var(--global-theme-color);
}

input[type=file] {
  display: block;
  width: 100%;
  font: inherit;
  font-size: .9rem;
  color: var(--global-text-color);
  margin: 4px 0 8px;
}

input[type=file]::file-selector-button {
  font: inherit;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--global-theme-color);
  background: transparent;
  cursor: pointer;
  border: 1px solid var(--global-theme-color);
  border-radius: 3px;
  padding: 6px 12px;
  margin-right: 12px;
}

.hint {
  font-size: .85rem;
  color: var(--global-text-color-light);
  margin-bottom: 20px;
}

.notice {
  border-left: 3px solid var(--global-theme-color);
  padding: 10px 14px;
  margin-bottom: 24px;
  background: color-mix(in srgb, var(--global-theme-color) 8%, transparent);
}

/* ---------- two-column study list (landing page) ---------- */
@media (min-width: 700px) {
  .bibliography.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
  }

  /* each item gets a bottom line; the first row also gets a top line */
  .bibliography.two-col li {
    border-top: 0;
    border-bottom: 1px solid var(--global-divider-color);
  }

  .bibliography.two-col li:nth-child(-n+2) {
    border-top: 1px solid var(--global-divider-color);
  }
}